Skip to main content

Crate starweaver_session

Crate starweaver_session 

Source
Expand description

Shared durable session contracts for Starweaver.

Structs§

AcquireBackgroundSubagentContinuation
Atomic durable continuation admission request.
AcquireRunAdmission
Request for atomic one-active-run admission.
AdmitRunControl
Request to atomically reserve a receipt and its durable control effect.
AgentDisplayPage
Page of sanitized historical display evidence.
AgentReplayQuery
Display-safe replay query.
AgentRunListQuery
Compact run list query.
AgentRunPage
Page of compact runs.
AgentRunView
Prompt-safe compact run projection.
AgentSessionControlError
Prompt-safe control error.
AgentSessionInclude
Sections requested by a get-session operation.
AgentSessionListQuery
Compact query for canonical session listing.
AgentSessionPage
Page of compact sessions.
AgentSessionQueryError
Prompt-safe query error.
AgentSessionScope
Host-derived authority supplied separately from model arguments.
AgentSessionView
Prompt-safe compact session projection.
ApprovalDecision
Recorded approval decision.
ApprovalMutationResult
Durable result of an atomic approval decision.
ApprovalRecord
Durable approval prompt record.
AttachEnvironment
Atomic attachment creation command. All provider-private resolution has already occurred.
BackgroundSubagentArtifact
Durable host-owned oversized result artifact.
BackgroundSubagentArtifactLimits
Host policy limits applied atomically to retained result artifacts.
BackgroundSubagentContinuationCause
Typed immutable cause for one result-triggered continuation.
BackgroundSubagentContinuationReceipt
Atomic durable continuation admission receipt.
BackgroundSubagentRecord
Durable service-host projection of one background attempt.
BackgroundSubagentTerminalCommit
Atomic terminal evidence and optional oversized-result artifact commit.
BinaryRef
Binary resource legacy reference submitted as session input.
CheckpointRef
Stable reference to a persisted checkpoint.
ClarificationAnswer
Validated answer to one clarification question.
ClarificationMutationResult
Durable result of an atomic clarification resolution.
ClarificationOption
One option in a durable clarification question.
ClarificationQuestion
One question parsed from durable ask_user_question request evidence.
ClarificationResolution
Durable typed clarification resolution.
CompactRunTrace
Compact run projection for tools, CLI, and UI.
CompactSessionTrace
Compact session projection for lists, CLI inspect, and UI sidebars.
ContinuationEffectState
Typed host-visible projection for a continuation whose effect outcome cannot be proven.
CreateManagedSession
Allowlisted create-session command.
DecideApproval
Atomic approval-decision command.
DeferredMutationResult
Durable result of an atomic deferred-tool mutation.
DeferredToolRecord
Durable deferred tool record.
DeferredToolRequest
SDK-facing deferred tool request.
DeferredToolRequests
Collection of deferred tool requests.
DeferredToolResult
SDK-facing deferred tool result.
DeferredToolResults
Collection of deferred tool results.
DeleteManagedSession
Revision-checked tombstone command. Evidence purge is intentionally absent.
DetachEnvironment
Atomic attachment detachment command.
DurableBackgroundSubagentDeliveryClaim
Atomic durable delivery claim.
DurableBackgroundSubagentOwnerLease
Durable fenced owner lease for one process-local background execution.
DurableBackgroundSubagentResultRef
Bounded terminal result material retained by the durable host.
DurableControlReceipt
Durable receipt stored independently from a process-local control handle.
DurableEnvironmentAttachment
Safe durable projection of an environment attachment.
DurableEnvironmentMount
Safe durable projection of one mounted resource.
DurableHostEventPage
One bounded, eligibility-filtered durable host-event page.
DurableHostEventQuery
Bounded storage query over one resource scope and an admitted set of event classes.
DurableHostEventRecord
One materialized durable host-event record.
DurableModelSelection
Authority-bound durable model selection.
DurableRunControlIntent
Receipt plus durable steering inbox entry or interrupt intent.
DurableRunStatus
Durable run status composed from admission state and the shared runtime lifecycle.
EnvironmentAttachmentMutationResult
Durable result of an attachment mutation.
EnvironmentAttachmentPage
Stable bounded attachment page.
EnvironmentAttachmentPageKey
Stable keyset position for attachment queries.
EnvironmentAttachmentPageKeyProjection
Serializable form of an attachment page key.
EnvironmentAttachmentQuery
Bounded authority-scoped attachment query.
EnvironmentHostEventContext
Stable identity and visibility scope for an environment event projected at commit time.
EnvironmentMountMutationResult
Durable result of a mount mutation.
EnvironmentMountQuery
Bounded stable active-mount query for one run.
EnvironmentMutationContext
Shared authority, idempotency, timestamp, and event evidence for an environment mutation.
EnvironmentStateRef
Stable reference to an exported environment provider state.
EventPublicationKey
Stable deterministic identity for one logical transition’s event publication.
FileRef
Provider-scoped legacy file reference submitted as session input.
HitlResumeClaim
Exclusive durable claim acquired before a waiting run may execute a continuation.
InMemorySessionStore
In-memory session store for deterministic tests and single-process hosts.
InitializeModelSelection
Caller-supplied default used only when an authority has no durable selection yet.
InteractionMutationContext
Shared authority, concurrency, idempotency, and publication evidence for an interaction command.
InteractionPage
One stable page of approval or deferred-tool records.
InteractionPageKey
Stable key identifying one HITL record’s position in updated-time ordering.
InteractionPageQuery
Bounded keyset query over approval or deferred-tool records.
InterruptManagedRun
Cooperative interruption command.
ManagedRunTarget
Composite identity of a durable run. A run id is never globally unique.
ManagedSessionPatch
Typed session update patch.
ManagedSessionTarget
Composite identity of a durable session.
ModelSelectionMutationReceipt
Durable result of one model-selection mutation.
MountEnvironmentResource
Atomic allowlisted-resource mount command.
MutationReceipt
Durable, wire-independent projection of an idempotent mutation receipt.
OutputAvailableProjection
Product-neutral durable output_available event projection.
PendingHostEventPublication
One view-independent host event waiting for durable-log materialization.
PendingStreamPublication
One transactionally enqueued stream-publication batch.
PreparedContinuation
Side-effect-free continuation package shared by every product host.
QueuedRunStatus
A queued durable run has not entered an executable runtime lifecycle.
RelatedRunUpdate
Atomic transition applied to an existing run together with a new run evidence commit.
ResolveClarification
Atomic clarification-resolution command.
ResolveDeferredTool
Atomic deferred-tool completion/failure command.
RunAdmissionLease
Durable one-active-run lease owned by a host instance.
RunAdmissionReceipt
Result of admission or an exact retry.
RunChangedProjection
Product-neutral durable run_changed event projection.
RunChangedSummary
Product-neutral run summary used by durable run_changed projections.
RunControlReceipt
Accepted steering/interruption result.
RunEvidenceCommit
Complete product-neutral durable evidence for one run.
RunRecord
Durable run record.
RunStartReceipt
Accepted non-blocking run result.
RunTerminalError
Product-neutral diagnostic retained with a terminal durable run.
RunTerminalProjection
Atomic terminal status, output, and diagnostic projection.
SelectModel
Atomic model-selection mutation request.
SessionContinuationFence
Deletion/continuation hook exposed to async supervisors without coupling both control planes.
SessionFilter
Query filters for listing sessions.
SessionId
Session identifier shared by SDK, CLI, and service layers.
SessionMutationReceipt
Session mutation result.
SessionPage
One stable page of durable sessions.
SessionPageKey
Stable key identifying one session’s position in the updated-time ordering.
SessionPageQuery
Bounded keyset query over sessions ordered by update time and stable identity descending.
SessionRecord
Durable session record.
SessionResumeSnapshot
Resume package loaded from a durable session store.
SessionSearchCapabilities
Provider capability advertisement.
SessionSearchCheckpoint
Durable writer acknowledgement/watermark.
SessionSearchCoverage
Coverage and freshness for every returned page, including empty pages.
SessionSearchCursorBinding
Cursor payload shared by conforming providers. Callers treat its encoded form as opaque.
SessionSearchCursorCodec
Keyed cursor encoder/validator. Encoded cursors contain no paths or backend row ids.
SessionSearchDocument
Redacted document accepted by optional index writers.
SessionSearchFilter
Typed filters for search and metadata browsing.
SessionSearchHighlight
Highlight range using UTF-8 byte offsets into the returned snippet.
SessionSearchHit
One discovery hit.
SessionSearchLocation
Match provenance. Archive scope and source run identity remain distinct.
SessionSearchMutation
Versioned, idempotent search-index mutation.
SessionSearchPage
One page of discovery results.
SessionSearchQuery
A bounded search request. text is never a regular expression or shell expression.
SessionSearchScope
Host-constructed authorization namespace. It is deliberately separate from user input.
SessionSearchSnippet
Bounded plain-text snippet.
SessionSearchSummary
Minimal canonical session projection.
SessionSearchTimeRange
Inclusive lower / exclusive upper timestamp range.
SessionSearchWarning
Safe coverage warning. Messages must not contain backend paths or indexed content.
SessionStoreExecutor
Executor adapter that persists runtime checkpoints into a session store.
StartManagedRun
Non-blocking run start command.
SteerManagedRun
Structured steering command.
StreamCursorRef
Stable durable reference to a family-aware stream replay position.
StreamPublicationTargets
External sink families selected for reliable publication.
ToolReturnRecordInput
Tool-return evidence used to derive durable HITL records without depending on model crates.
UnmountEnvironmentResource
Atomic resource unmount command.
UpdateManagedSession
Revision-checked session update.

Enums§

AgentSessionControlErrorCode
Required control error categories.
AgentSessionOperation
Agent-facing session operation class.
AgentSessionQueryErrorCode
Required query error categories.
ApprovalStatus
Durable approval status.
ContinuationEffectOutcome
Durable outcome classification for a continuation effect boundary.
ContinuationEffectPhase
Durable effect boundary reached by a continuation.
ContinuationPreparationError
Stable continuation preparation failures shared by CLI, RPC, and future hosts.
ContinuationPreparationMode
Continuation preparation mode selected by the host.
DeferredMutationOutcome
Terminal outcome supplied for a deferred tool.
DurableBackgroundSubagentDeliveryRelease
Durable reason for releasing a matching result-delivery claim.
DurableBackgroundSubagentDeliveryStatus
Orthogonal durable logical-delivery state.
DurableBackgroundSubagentExecutionStatus
Monotonic durable execution state for one background attempt.
DurableBackgroundSubagentRetentionStatus
Durable content-retention state, independent from execution and delivery.
DurableEnvironmentMountStatus
Durable mount lifecycle state.
DurableEnvironmentScope
Product-neutral attachment scope.
DurableEnvironmentStatus
Durable attachment lifecycle state.
DurableHostEventClass
Stable product-neutral event classes persisted by the session store.
DurableHostEventScope
Resource scope owned by one durable host event.
DurableRunControlEffect
Durable control effect carried by an admitted intent.
DurableRunControlStatus
Durable lifecycle of one admitted control effect.
EnvironmentMutationResult
Typed payload stored in the shared environment idempotency namespace.
ExecutionStatus
Generic execution status for approval, deferred, checkpoint, and archive workflows.
HitlResumeAbortOutcome
Result of atomically aborting a fenced HITL replacement before worker launch.
HitlResumeClaimState
Durable resume-claim phase.
InputConversionError
Failure converting legacy durable input into canonical model content.
InputPart
Serializable run input submitted by SDKs and product hosts.
RunTerminalProjectionError
Invalid new terminal run projection.
SessionDeletionFence
Explicit session deletion state/fence used by run and continuation admission.
SessionSearchConsistency
Search consistency behavior.
SessionSearchCoverageState
Completeness state for one page.
SessionSearchError
Required search error categories.
SessionSearchFilterKind
Filter vocabulary advertised by a provider.
SessionSearchGranularity
Result grouping level.
SessionSearchIndexError
Index-publication errors.
SessionSearchMutationOperation
Idempotent index operation.
SessionSearchQueryMode
Text interpretation mode.
SessionSearchSort
Stable ordering requested by the caller.
SessionSearchSource
Searchable projection family.
SessionSearchVisibility
Display visibility classes that a host may permit.
SessionSearchWarningKind
Safe warning category.
SessionStatus
Current durable session status.
SessionStoreError
Session store failure.
StreamCursorRefError
Invalid durable stream-cursor update.
StreamPublicationTarget
One independently acknowledged external stream sink.
ToolApprovalDecision
Tool approval decision supplied by a host or user.

Constants§

APPROVAL_DECIDE_OPERATION
Stable operation identifier for approval decisions.
ASK_USER_QUESTION_ACTION
Tool name whose approval records represent clarification requests.
BACKGROUND_SUBAGENT_RECORD_VERSION
Current durable background-subagent record schema.
CLARIFICATION_ANSWERS_METADATA_KEY
Approval-decision metadata key containing validated clarification answers.
CLARIFICATION_RESOLVE_OPERATION
Stable operation identifier for clarification resolution.
CLARIFICATION_RESPONSE_METADATA_KEY
Approval-decision metadata key containing an optional aggregate response.
CONTINUATION_EFFECT_METADATA_KEY
Durable metadata key carrying a typed continuation-effect recovery projection.
DEFAULT_BACKGROUND_RESULT_RETENTION_SECS
Default retained-result lifetime used by store-side interruption reconciliation.
DEFERRED_COMPLETE_OPERATION
Stable operation identifier for successful deferred-tool completion.
DEFERRED_FAIL_OPERATION
Stable operation identifier for failed deferred-tool completion.
ENVIRONMENT_ATTACH_OPERATION
Stable operation identifier for attachment creation.
ENVIRONMENT_DETACH_OPERATION
Stable operation identifier for attachment detachment.
ENVIRONMENT_MOUNT_OPERATION
Stable operation identifier for mounting an allowlisted resource.
ENVIRONMENT_UNMOUNT_OPERATION
Stable operation identifier for unmounting a resource.
LOCAL_SESSION_NAMESPACE
Backward-compatible namespace used by single-user local products.
MAX_ENVIRONMENT_MOUNTS_PER_RUN
Maximum active mounts retained for one run, matching the host result bound.
MAX_ENVIRONMENT_PAGE_SIZE
Maximum page size accepted by durable attachment queries, matching the host schema.
MAX_HOST_EVENT_PAGE_SIZE
Maximum number of durable host events returned by one storage query.
MAX_HOST_EVENT_POSITION
Largest backend position shared by memory and SQLite implementations.
MAX_STABLE_PAGE_SIZE
Maximum number of records returned by one stable keyset page.
MODEL_SELECTION_OPERATION
Stable operation identifier recorded for model-selection mutations.

Traits§

SessionSearchIndexWriter
Optional mutation target used by local or external indexes.
SessionSearchProvider
Read-only provider for session discovery projections.
SessionStore
Durable session store contract.

Functions§

append_authoritative_run_publications
Add authoritative run/output events unless the caller already supplied that class and scope.
background_subagent_input_digest
Compute a domain-separated SHA-256 digest of canonical durable input parts.
background_subagent_result_digest
Compute the versioned domain-separated digest for one logical terminal result.
deterministic_run_control_operation_id
Derive a deterministic operation id from all authority/idempotency identity components.
deterministic_run_control_receipt_id
Derive a deterministic receipt id from the operation identity.
output_available_publication
Build a durable output_available publication when a run has a user-visible preview.
run_changed_publication
Build a durable run_changed publication from authoritative storage-domain state.
validate_clarification_answers
Parse and strictly validate a durable clarification request and caller answers.

Type Aliases§

RunStatus
Backward-compatible public name for the durable run status.
SessionStoreResult
Result alias for session store operations.