Documentation
¶
Index ¶
- Constants
- func ClosureFingerprint(sourceThreadID, destinationThreadID string, items []ManifestItem) (string, error)
- func EqualClosure(left, right Closure) bool
- func IsZeroClosure(closure Closure) bool
- func RefFingerprint(ref Ref) (string, error)
- func SafeLabel(value string, maxChars int) string
- func TextSHA256(text string) string
- func ValidateClosure(closure Closure) error
- func ValidateRef(ref Ref) error
- type Closure
- type Content
- type FullOutput
- type ManifestItem
- type Record
- type Ref
Constants ¶
const ( DefaultKind = "tool_output" DefaultMIME = "text/plain; charset=utf-8" DefaultSafeLabelMaxChars = 80 )
Variables ¶
This section is empty.
Functions ¶
func ClosureFingerprint ¶ added in v0.18.0
func ClosureFingerprint(sourceThreadID, destinationThreadID string, items []ManifestItem) (string, error)
func EqualClosure ¶ added in v0.18.0
func IsZeroClosure ¶ added in v0.18.0
func RefFingerprint ¶ added in v0.18.0
func TextSHA256 ¶ added in v0.18.0
func ValidateClosure ¶ added in v0.18.0
ValidateClosure rejects non-canonical manifests. Callers must bind even an empty fork path to its exact source and destination thread identities.
func ValidateRef ¶ added in v0.18.0
Types ¶
type Closure ¶ added in v0.18.0
type Closure struct {
SourceThreadID string `json:"source_thread_id"`
DestinationThreadID string `json:"destination_thread_id"`
Items []ManifestItem `json:"items"`
Fingerprint string `json:"fingerprint"`
}
Closure is the deterministic deduplicated artifact manifest for one exact source path and one destination thread.
func CloneClosure ¶ added in v0.18.0
type Content ¶ added in v0.18.0
Content is the only artifact read result exposed above the storage kernel.
type FullOutput ¶ added in v0.18.0
type FullOutput struct {
Text string `json:"text"`
Kind string `json:"kind"`
MIME string `json:"mime"`
}
FullOutput is the immutable full-text payload presented to the artifact authority as part of one effect-dispatch terminal commit.
func NormalizeFullOutput ¶ added in v0.18.0
func NormalizeFullOutput(in FullOutput) FullOutput
NormalizeFullOutput returns the canonical payload policy values.
type ManifestItem ¶ added in v0.18.0
type ManifestItem struct {
SourceEntryID string `json:"source_entry_id"`
ArtifactID string `json:"artifact_id"`
Ref Ref `json:"ref"`
RefFingerprint string `json:"ref_fingerprint"`
PayloadSHA256 string `json:"payload_sha256"`
}
ManifestItem pins one on-path canonical entry/reference/payload relation for a root or SubAgent fork copy.
func CloneManifest ¶ added in v0.18.0
func CloneManifest(items []ManifestItem) []ManifestItem
type Record ¶ added in v0.18.0
type Record struct {
ThreadID string
Ref Ref
Text string
CanonicalEntryID string
CreatedAt time.Time
}
Record is one immutable thread-scoped artifact row. CanonicalEntryID binds the payload to the exact tool-result entry admitted in the same transaction.
func CloneRecord ¶ added in v0.18.0
type Ref ¶
type Ref struct {
ID string `json:"id,omitempty"`
SafeLabel string `json:"safe_label,omitempty"`
Kind string `json:"kind,omitempty"`
MIME string `json:"mime,omitempty"`
SizeBytes int64 `json:"size_bytes,omitempty"`
SHA256 string `json:"sha256,omitempty"`
}
Ref is the immutable public-safe identity of one Floret-owned artifact. It intentionally contains no host route, filesystem path, or product key.
func CloneRefPtr ¶ added in v0.18.0
func RefForEffect ¶ added in v0.18.0
func RefForEffect(effectAttemptID, toolName string, full FullOutput) (Ref, error)
RefForEffect deterministically derives a thread-scoped reference from the Store-assigned effect-attempt identity and immutable payload.