Skip to main content

Module artifacts

Module artifacts 

Source
Expand description

Session-scoped artifact metadata.

Large tool outputs are written under the owning session directory and saved sessions keep a durable metadata index for resume/listing flows.

Structs§

ArtifactRecord

Enums§

ArtifactKind

Constants§

ARTIFACTS_DIR_NAME

Functions§

artifact_id_for_tool_call
artifact_sessions_root
The root every session artifact is written under. Readers that serve artifacts by a recorded reference resolve through this same function, so a configured Runtime sessions_dir can never point a read at a different tree than the writer used.
format_artifact_relative_path
format_byte_size
is_valid_session_id
open_session_relative
The same confined session directory for mutable sidecars and immutable artifacts. The saved-session owner remains responsible for session state.
record_tool_output_artifact
record_tool_output_artifact_with_size
session_artifact_absolute_path
The recorded spelling of a session artifact path: for receipts, metadata and display, not for opening. It is built from the state root as spelled (a user may have relocated that root behind a link), so an opener must go through open_session_relative instead of this value; readers that do consume it compare canonicalized forms.
session_artifact_relative_path
write_session_artifact
write_session_artifact_bytes
Write arbitrary fetched bytes into a session artifact with a validated extension. Media fetches use this after magic-byte validation.
write_session_artifact_immutable
write_session_artifact_immutable_from_reader
write_session_relative_immutable
Publish immutable session-owned bytes without replacing an earlier handle. A duplicate replay with identical bytes is idempotent; a different payload for the same relative path fails closed.