oracle

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package oracle evaluates schema, relational, and state-machine properties while keeping harness failures and insufficient evidence out of target FAIL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input[T any] struct {
	Value        T
	EvidenceRefs []schema.ObjectRef
	Complete     bool
	HarnessError error
}

type JSONType

type JSONType string
const (
	TypeObject  JSONType = "object"
	TypeArray   JSONType = "array"
	TypeString  JSONType = "string"
	TypeNumber  JSONType = "number"
	TypeBoolean JSONType = "boolean"
	TypeNull    JSONType = "null"
)

type Outcome

type Outcome struct {
	Verdict       schema.Verdict
	ReasonCode    schema.ReasonCode
	Code          string
	Expected      any
	Observed      any
	EvidenceRefs  []schema.ObjectRef
	TargetFailure bool
}

func EvaluateRelations

func EvaluateRelations(input Input[[]schema.IRItem]) Outcome

EvaluateRelations checks stable interaction, parent, and tool-call relationships. Lossy or unavailable normalization remains inconclusive.

func EvaluateSchema

func EvaluateSchema(input Input[json.RawMessage], expected Schema) Outcome

EvaluateSchema validates a bounded structural schema. A malformed observed value is a target failure only when evidence is complete and the harness schema itself is valid.

func EvaluateStateMachine

func EvaluateStateMachine(input Input[[]statemachine.Event]) Outcome

type Schema

type Schema struct {
	Types        []JSONType
	Properties   map[string]Schema
	Required     []string
	Items        *Schema
	AllowUnknown bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL