Move embedded prompts to PromptKit definitions

This commit is contained in:
2026-09-24 01:44:23 +00:00
parent 51e370b4c8
commit f8c18247a0
37 changed files with 572 additions and 595 deletions

View File

@@ -6,6 +6,7 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"io/fs"
"sort"
"strings"
)
@@ -16,6 +17,7 @@ type Key string
const (
CorrectionSetKey Key = "correction_set"
ValidatorDecisionSetKey Key = "validator_decision_set"
AssetRoot = "assets"
correctionSetSchemaID = "audita.correction_set"
validatorDecisionSchemaID = "audita.validator_decision_set"
schemaVersionV1 = "v1"
@@ -24,6 +26,20 @@ const (
//go:embed assets/*.json
var schemaAssets embed.FS
// Filesystem exposes the canonical embedded schemas to PromptKit.
func Filesystem() fs.FS { return schemaAssets }
func AssetPath(key Key) (string, bool) {
switch key {
case CorrectionSetKey:
return "correction_set.v1.json", true
case ValidatorDecisionSetKey:
return "validator_decision_set.v1.json", true
default:
return "", false
}
}
// Schema describes one registered structured response schema.
type Schema struct {
ID string `json:"id"`