Add semantic reconciliation proposal validation

This commit is contained in:
2026-08-09 16:00:01 +00:00
parent ee71dc4937
commit 297d58f090
5 changed files with 592 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
package semanticreconcile
import (
"fmt"
"io/fs"
rootassets "gitea.maximumdirect.net/eric/notarius/assets"
"gitea.maximumdirect.net/eric/notarius/internal/framework/llm"
)
const (
ResponseSchemaKey = llm.ResponseSchemaKey("semantic_reconciliation_llm")
ResponseSchemaID = "notarius.generic.semantic_reconciliation.llm"
ResponseSchemaName = "notarius_semantic_reconciliation_llm_v1"
SchemaVersion = "v1"
SchemaAssetPath = "schemas/semantic_reconciliation_llm.v1.json"
)
func schemaAssetFS() (fs.FS, error) {
assets, err := fs.Sub(rootassets.FS(), "generic/normalize/deduplication")
if err != nil {
return nil, fmt.Errorf("scope semantic reconciliation assets: %w", err)
}
return assets, nil
}
// LoadResponseSchema returns the private request-local integer proposal
// contract. It is separate from every durable artifact schema.
func LoadResponseSchema() (llm.ResponseSchema, error) {
assets, err := schemaAssetFS()
if err != nil {
return llm.ResponseSchema{}, err
}
return llm.LoadResponseSchema(assets, llm.ResponseSchemaDefinition{
Key: ResponseSchemaKey,
ID: ResponseSchemaID,
Version: SchemaVersion,
Name: ResponseSchemaName,
AssetPath: SchemaAssetPath,
})
}