Documentation
¶
Overview ¶
Package cas implements immutable local content-addressed storage for sanitized payloads and their strongly typed Evidence envelopes. It deliberately cannot accept arbitrary raw payload bytes.
Index ¶
- Constants
- Variables
- func SealEvidenceMeta(producer schema.Producer, createdAt schema.UTCTime, evidence schema.Evidence) (schema.EnvelopeMeta, error)
- type Store
- func (store *Store) Get(ctx context.Context, digest schema.Digest) ([]byte, error)
- func (store *Store) GetEvidence(ctx context.Context, ref schema.ObjectRef) (schema.Evidence, error)
- func (store *Store) Put(ctx context.Context, payload redaction.SanitizedPayload) (schema.ObjectRef, error)
- func (store *Store) PutEvidence(ctx context.Context, evidence schema.Evidence) (schema.ObjectRef, error)
- func (store *Store) Verify(ctx context.Context, digest schema.Digest) error
Constants ¶
const ( DefaultMaxObjectBytes int64 = 256 << 20 EvidenceSchemaVersion = "urn:agentapi-doctor:evidence:v1alpha2" )
Variables ¶
Functions ¶
func SealEvidenceMeta ¶
func SealEvidenceMeta(producer schema.Producer, createdAt schema.UTCTime, evidence schema.Evidence) (schema.EnvelopeMeta, error)
SealEvidenceMeta is the single definition of the recorder's immutable Evidence projection. Both recorder creation and CAS reads use it, so a projection change cannot silently make newly written references dangling.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetEvidence ¶
GetEvidence resolves a report Evidence ref to a strict canonical envelope. It verifies the full-envelope storage object, typed schema, envelope ref, independently recomputed immutable projection digest, payload, and complete relation graph.
func (*Store) Put ¶
func (store *Store) Put(ctx context.Context, payload redaction.SanitizedPayload) (schema.ObjectRef, error)
Put accepts only a SanitizedPayload, preserving the write-before-redaction type boundary for payload objects.
func (*Store) PutEvidence ¶
func (store *Store) PutEvidence(ctx context.Context, evidence schema.Evidence) (schema.ObjectRef, error)
PutEvidence persists one validated Evidence envelope. Its ObjectRef digest remains the digest of the immutable Evidence projection. A separate full-envelope content object protects all canonical envelope bytes at rest.