pub struct Session {Show 13 fields
pub id: SessionId,
pub agent_id: AgentId,
pub working_branch: String,
pub head: ObjectId,
pub parent_session: Option<SessionId>,
pub delegated_intent: Option<IntentId>,
pub report_to: Option<String>,
pub path_scope: Option<String>,
pub scope_tenant: Option<String>,
pub scope_namespace: Option<Namespace>,
pub status: SessionStatus,
pub created_at: DateTime<Utc>,
pub ended_at: Option<DateTime<Utc>>,
}Expand description
A durable agent session record.
head tracks the current tip of the session’s working branch; it’s
updated by SessionManager::update_head. All other fields are
set at creation and frozen except for status / ended_at which
are updated by end_session.
Fields§
§id: SessionId§agent_id: AgentId§working_branch: String§head: ObjectId§parent_session: Option<SessionId>Who spawned this session (the parent session id, if any).
delegated_intent: Option<IntentId>The intent this session was created to fulfill.
report_to: Option<String>Who to report back to.
path_scope: Option<String>Path scope restriction (if set, the agent can only modify paths under this prefix).
scope_tenant: Option<String>Tenant scope restriction. When set, PolicyStore::evaluate /
evaluate_change consulted with a tenant_filter tied to this
session consult only policies whose tenant_id matches or is
None (global). Added in 0.7.5-beta.1 §3a. None = no tenant
scoping, same behaviour as pre-0.7.5.
scope_namespace: Option<Namespace>Namespace scope. When set, this session’s Repository will use this
namespace for all ref operations, overriding the Repository’s
configured default namespace. None = use the Repository default.
Added alongside the namespace primitive (§namespace).
status: SessionStatusLifecycle status.
created_at: DateTime<Utc>When this session was created.
ended_at: Option<DateTime<Utc>>When this session ended (None while Active).