Add schema selection values and ownership

This commit is contained in:
2026-11-20 15:20:29 +00:00
parent e775a3c116
commit fbe3d427a2
17 changed files with 186 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ package domain
import (
"context"
"io/fs"
"time"
)
@@ -156,6 +157,8 @@ type PromptDefinition struct {
Inputs []PromptInput `yaml:"inputs"`
Templates []PromptMessageTemplate `yaml:"templates"`
Validation OutputContract `yaml:"validation"`
SchemaRoot *ResourceBinding `json:"-" yaml:"-"`
SchemaFile *ResourceBinding `json:"-" yaml:"-"`
}
// PromptInspection is lightweight metadata for prompt requirement selection.
@@ -253,10 +256,18 @@ type ExecutionTarget struct {
type OutputContract struct {
Format OutputFormat `yaml:"format"`
ValidationMode ValidationMode `yaml:"validation_mode"`
Schema any `yaml:"schema,omitempty" json:"schema,omitempty"`
SchemaFile *string `yaml:"schema_file,omitempty" json:"schema_file,omitempty"`
SchemaPath string `yaml:"schema_path"`
RepairAttempts int `yaml:"repair_attempts"`
}
// ResourceBinding identifies a resource in its originating filesystem.
type ResourceBinding struct {
FS fs.FS
Path string
}
// RenderedPrompt represents the prompt after template application.
type RenderedPrompt struct {
SessionID string `json:"session_id,omitempty"`