Skip to main content

Module session_bundle

Module session_bundle 

Source
Expand description

Canonical session bundle export/import support.

A session bundle is the portable JSON envelope that downstream hosts use for local exports, sanitized shares, and replay-only handoffs. The bundle is intentionally built from existing Harn run-record surfaces so replay, transcripts, tool calls, HITL questions, and observability do not fork into a second persistence model.

Structs§

BundleAttachment
BundleEventLogPointer
BundleJsonEntry
BundleMountedRoot
BundlePermission
BundleProducer
BundleReplay
BundleRuntime
BundleSource
BundleToolCall
BundleTools
BundleTranscript
BundleTranscriptSection
BundleUsage
BundleWorkerSnapshot
BundleWorkspace
MaterializedWorkerSnapshot
RedactionManifest
SessionBundle
SessionBundleExportOptions
SessionBundleValidationOptions

Enums§

AgentSessionLiveness
Liveness of an agent session reconstructed from its event log.
SessionBundleError
SessionBundleExportMode

Constants§

REPLAY_ONLY_PLACEHOLDER
SESSION_BUNDLE_LIVENESS_KEY
metadata key carrying the machine-readable liveness verdict ("suspended" | "closed") so a resume host can decide continue-vs-replay without string-matching the human-facing status.
SESSION_BUNDLE_SCHEMA_ID
SESSION_BUNDLE_SCHEMA_VERSION
SESSION_BUNDLE_STATUS_COMPLETED
Bundle source.status fallback for a session that closed without an explicit status on its terminal SessionClosed event.
SESSION_BUNDLE_STATUS_SUSPENDED
Bundle source.status for a session reconstructed from an event stream that has no terminal SessionClosed event — a live loop frozen mid-turn for cross-compute migration (#3682), or a time-traveled prefix truncated before the close. The next action is still pending, so a consumer must CONTINUE the loop, not treat it as finished.
SESSION_BUNDLE_TYPE

Functions§

agent_session_liveness
Classify an agent session’s liveness from its replay event stream by finding the last terminal SessionClosed event. The keystone discriminator behind portable suspend/resume (#3682): without it, a frozen-mid-flight or time-traveled session is silently mislabeled completed and a resume host replays it instead of continuing the pending turn.
export_run_record_bundle
export_worker_snapshot_bundle
import_run_record_from_agent_session_events
import_run_record_value
import_run_record_value_with_materialized_worker_snapshots
materialize_worker_snapshots
run_record_from_worker_snapshot
session_bundle_from_agent_session_events
session_bundle_schema
session_bundle_schema_pretty
validate_session_bundle_str
validate_session_bundle_value