Skip to main content

Module artifacts

Module artifacts 

Source
Expand description

Artifact spill storage and the shared inline output budget.

Re-exported from agent_sdk_tools::artifacts.

Structs§

ArtifactQuotaExceeded
Typed admission failure: the per-thread artifact byte quota cannot admit the payload. Downcast this from an error chain to distinguish a durable resource-limit rejection from transient I/O failures.
ArtifactRetentionPolicy
Deterministic per-thread expiry and quota policy.
ArtifactRetentionSnapshot
Durable liveness and reference snapshot supplied by the host.
ArtifactStorage
Process-wide multiplexer handing out one ArtifactStore per active thread.
ArtifactStore
Per-thread spill store for oversized tool output.
ArtifactSweepFence
Existing artifact directories fenced before the host reads durable liveness.
ArtifactSweepReport
Observable outcome of one artifact retention sweep.
ArtifactThreadRetention
Per-thread facts that make artifacts ineligible for retention.
SavedArtifact
A spilled artifact: its store-local ID and the backing file.

Constants§

ARTIFACT_URI_SCHEME
URI scheme under which spilled artifacts are addressable.
DEFAULT_INLINE_OUTPUT_BUDGET_BYTES
A tool result whose output plus serialized auxiliary payload exceeds this many bytes is spilled to the artifact store.

Functions§

artifact_footer
The recovery footer spliced into a capped inline result.
artifact_thread_key
Stable directory key used by ArtifactStorage and host retention snapshots.
artifact_uri
Recovery URI for a spilled artifact.
canonical_inline_output_matches
Compare a legacy inline spill boundary with the durable artifact without buffering or scanning the artifact body.
canonical_streamed_inline_output_matches
Compare the bounded output produced by cap_inline_from_windows with its durable artifact while reading only bounded head and tail windows.
cap_inline_from_windows
Render already-captured head and tail windows with the canonical footer.
cap_inline_output
Bounded inline replacement for an over-budget output: head + elision marker + tail + recovery footer, all within budget bytes.
enforce_inline_budget
Enforce the shared tool-result payload budget with a truthful bounded fail-closed result when lossless artifact persistence is unavailable.