pub struct SessionRead(/* private fields */);Expand description
Deliberately does not implement Clone: read().clone() clones the Session,
preserving the existing detached-snapshot read contract.
Methods from Deref<Target = Session>§
Sourcepub fn last_run_diagnostic(&self) -> Option<LlmRequestDiagnostic>
pub fn last_run_diagnostic(&self) -> Option<LlmRequestDiagnostic>
Public/cold-read projection requires the same Session, run and exact canonical error. Old, foreign, malformed or overwritten evidence is absent.
Sourcepub fn supervisor_incarnation_id(&self) -> Option<Uuid>
pub fn supervisor_incarnation_id(&self) -> Option<Uuid>
Identity shape observed from an executing snapshot, never a live grant. Every management operation must still revalidate canonical storage.
Sourcepub fn independent_root_spawn_contract(&self) -> bool
pub fn independent_root_spawn_contract(&self) -> bool
Historical v2 stamp used to assess retained operation ambiguity and snapshot compatibility. Fresh tool routing is independent of this flag.
pub fn execution_compatibility(&self) -> SessionCompatibilityReport
pub fn check_execution_compatibility( &self, ) -> Result<(), SessionCompatibilityError>
Sourcepub fn conversation_generation_observation(
&self,
) -> ConversationGenerationObservation
pub fn conversation_generation_observation( &self, ) -> ConversationGenerationObservation
Capture data only; final use validates canonical state and authority.
Sourcepub fn conversation_revision(&self) -> u64
pub fn conversation_revision(&self) -> u64
Observation only, never an authority grant. Invalid ledgers are rejected
by validate_conversation_state and final canonical writer checks.
pub fn validate_conversation_state( &self, ) -> Result<(), ConversationGenerationError>
Sourcepub fn check_conversation_generation(
&self,
canonical: &Session,
) -> Result<(), ConversationGenerationError>
pub fn check_conversation_generation( &self, canonical: &Session, ) -> Result<(), ConversationGenerationError>
Preserve the exact canonical ledger, including receipts at the same revision. A copied revision number alone cannot authorize stale context. Original zero/zero Sessions retain their existing lifetime validation at their own caller/storage boundary; this method adds no new zero-state rebind or identity semantics.
Sourcepub fn conversation_reset_sha256(
&self,
) -> Result<Option<String>, ConversationGenerationError>
pub fn conversation_reset_sha256( &self, ) -> Result<Option<String>, ConversationGenerationError>
Bounded proof projection of the complete canonical ledger. The inline state stays authoritative; a hash alone is not a replacement ledger.
Sourcepub fn root_mode_birth_token(&self) -> String
pub fn root_mode_birth_token(&self) -> String
Opaque lifetime token, so a deleted Root ID cannot reuse an old CAS.
pub fn root_mode_operation( &self, operation_id: &str, ) -> Option<&RootModeOperationReceipt>
pub fn subagent_type(&self) -> Option<String>
pub fn last_run_status(&self) -> Option<String>
pub fn last_run_error(&self) -> Option<String>
Sourcepub fn child_launch_generation(&self) -> u64
pub fn child_launch_generation(&self) -> u64
The queued launch identity is durable on the logical Child session, independent of a process-local runner or scheduler entry.
pub fn is_child_launch_cancelled(&self, generation: u64) -> bool
Sourcepub fn recoverable_child_launch_generation(&self) -> Option<u64>
pub fn recoverable_child_launch_generation(&self) -> Option<u64>
Reconciliation is deliberately narrower than a pending status:
an old intent cannot borrow a later draft/retry generation.
pub fn provider_name(&self) -> Option<String>
Sourcepub fn pending_injected_messages(&self) -> Option<Vec<Value>>
pub fn pending_injected_messages(&self) -> Option<Vec<Value>>
Read the pending injected messages, decoding the legacy JSON-string form
defensively. Malformed legacy JSON yields None (never a panic).
Sourcepub fn has_pending_injected_messages(&self) -> bool
pub fn has_pending_injected_messages(&self) -> bool
True when there are queued injected messages on either plane.
pub fn session_inbox_admission(&self) -> Option<&SessionInboxAdmissionState>
Sourcepub fn selected_skill_ids(&self) -> Option<Vec<String>>
pub fn selected_skill_ids(&self) -> Option<Vec<String>>
Read selected skill ids. The typed field is preferred; the legacy
fallback parses the stored JSON-array string defensively (malformed →
None).
Sourcepub fn skill_mode(&self) -> Option<String>
pub fn skill_mode(&self) -> Option<String>
Read the skill mode. Resolution order: typed field, then legacy
skill_mode key, then the historical mode key. When both legacy keys
are present and disagree, a warning is logged and skill_mode wins.
pub fn reasoning_effort_meta(&self) -> Option<String>
pub fn enhance_prompt(&self) -> Option<String>
Sourcepub fn root_orchestration_prompt_enabled(&self) -> bool
pub fn root_orchestration_prompt_enabled(&self) -> bool
Host-selected delegation guidance is scoped to a genuine root Session. An imported or malformed child cannot acquire it from inherited metadata.
pub fn task_list_version_meta(&self) -> Option<String>
pub fn todo_list_version_meta(&self) -> Option<String>
pub fn workspace_path_meta(&self) -> Option<String>
Sourcepub fn project_id_meta(&self) -> Option<String>
pub fn project_id_meta(&self) -> Option<String>
Read the stable Project identity, preferring typed runtime metadata and falling back to the legacy metadata string during migration.
Sourcepub fn supervisor_orchestration_revision(&self) -> Option<u64>
pub fn supervisor_orchestration_revision(&self) -> Option<u64>
A trusted Supervisor’s delegation-only business authority is independent of thinking mode. Callers still need Storage’s canonical identity proof. Thinking-mode counters are not business permission epochs. Existing positive Work binding revisions remain in their canonical Ticket store; the Host verifies their unchanged Supervisor namespace separately.
pub fn root_thinking_mode(&self) -> RootThinkingMode
pub fn root_orchestration_only_enabled(&self) -> bool
Sourcepub fn validate_root_orchestration_compatibility(
&self,
) -> Result<(), RootToolAuthorityError>
pub fn validate_root_orchestration_compatibility( &self, ) -> Result<(), RootToolAuthorityError>
Keep the narrow tool catalog usable when an old turn or a new request carries a mode that requires tools outside the Root allowlist.
Sourcepub fn model_orchestration_only_enabled(&self) -> bool
pub fn model_orchestration_only_enabled(&self) -> bool
Derived model posture, not a persisted selection or permission grant. A trusted Supervisor orchestrates in both thinking modes. Children and ordinary Roots retain their own independent mode and permissions.
Sourcepub fn allows_model_tool_execution(&self, execution_name: &str) -> bool
pub fn allows_model_tool_execution(&self, execution_name: &str) -> bool
Defense in depth at both catalog projection and final dispatch.
Sourcepub fn effective_token_budget(&self) -> Option<&TokenBudget>
pub fn effective_token_budget(&self) -> Option<&TokenBudget>
The effective token budget: a genuine/child override (token_budget) if
set, otherwise the current round’s resolved-budget snapshot
(resolved_token_budget). Both are None until the first resolution.
Downstream readers should use this rather than token_budget directly so
they observe the engine-resolved budget without persisting it. Note the
snapshot is returned regardless of which model it was resolved for; that is
safe because resolve_token_budget runs at round start (re-keying to the
current model) before any reader — don’t call this expecting model-freshness
without a preceding same-round resolve. (#180)