Documentation
¶
Overview ¶
Package outschema loads a user-supplied JSON Schema for --output-schema and validates a run's structured result against it.
The accepted subset is the one tinyagent accepts for MCP tool input schemas (see mcptools.CheckSchema): a root "type": "object", every schema declaring a type, and only these keywords: type, description, title, default, examples, properties, required, items, additionalProperties (boolean), enum, const, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, minLength, maxLength, pattern, format, minItems, maxItems, uniqueItems, minProperties, maxProperties. "$schema" is ignored; "format" is an annotation and is not enforced.
Index ¶
Constants ¶
const MaxFileBytes = 64 << 10
MaxFileBytes caps the schema file size.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schema ¶
type Schema struct {
// Params is the schema (minus "$schema"), used as the submit tool's
// parameters.
Params map[string]any
// Digest is "sha256:<hex>" of the canonical JSON of Params.
Digest string
}
Schema is a loaded, checked output schema.