Add candidate artifact codec decoding

This commit is contained in:
2026-08-09 00:57:03 +00:00
parent ee600975f0
commit 557809f364
13 changed files with 198 additions and 1 deletions

View File

@@ -50,6 +50,13 @@ type ArtifactCodec[T any] interface {
Decode([]byte) (T, error)
}
// CandidateArtifactCodec extends an artifact codec with strict representation
// decoding for values that have not yet passed semantic validation.
type CandidateArtifactCodec[T any] interface {
ArtifactCodec[T]
DecodeCandidate([]byte) (T, error)
}
// DigestArtifactSchema returns the SHA-256 digest of the exact JSON Schema
// bytes. Schema formatting is therefore part of the registered identity.
func DigestArtifactSchema(schema ArtifactSchema) string {