Interface: AgentTurnSessionState<TIn, TOut, THandle>
Defined in: runtime/agent/agent-turn-session-state.ts:36
Mutable session state passed across P.agent turn-loop phase functions (Rule 3.1 — zero closure state machines).
Encapsulates the passive AgentNode, validated input, current AgentContinuationFrame, outer continuation frames, pre-indexed tool/skill/rule tables, runtime managers, and stores.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TIn | unknown | Validated agent input payload type. |
TOut | unknown | Validated agent output payload type. |
THandle | unknown | Runtime handle type of the active isolation scope. |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
accumulatedLessonOutcomes | readonly | Record<string, LessonOutcome> | Mutable deduplicated lessonId -> LessonOutcome map for the current session. | runtime/agent/agent-turn-session-state.ts:100 |
actorGroundingTexts? | readonly | readonly string[] | Resolved actor-specific .grounding() text blocks. | runtime/agent/agent-turn-session-state.ts:54 |
actorInstructionTexts? | readonly | readonly string[] | Resolved actor-specific .instructions() text blocks. | runtime/agent/agent-turn-session-state.ts:56 |
agentFrame | public | AgentContinuationFrame | Current mutable reference to the session's AgentContinuationFrame. | runtime/agent/agent-turn-session-state.ts:44 |
baseScopeCheckpoint? | readonly | string | Optional base scope checkpoint captured at step start. | runtime/agent/agent-turn-session-state.ts:106 |
canRaiseInterruptsById | readonly | ReadonlyMap<string, InterruptNode<unknown>> | Pre-indexed map of .canRaise() voluntary interrupt descriptors keyed by interrupt.id. | runtime/agent/agent-turn-session-state.ts:74 |
continuationQueue | readonly | StepContinuationQueue | Serialized per-stepExecId continuation stack queue. | runtime/agent/agent-turn-session-state.ts:90 |
ctx | readonly | StepExecutionContext<THandle> | Active step execution context. | runtime/agent/agent-turn-session-state.ts:42 |
escalationsByInterruptId | readonly | ReadonlyMap<string, EscalateCapabilityNode<unknown, unknown>> | Pre-indexed map of .escalate() capability descriptors keyed by interrupt.id. | runtime/agent/agent-turn-session-state.ts:72 |
executeChildStep | readonly | (childNode, childInput, childCtx) => Promise<ChildForkExecutionOutcome<unknown>> | Callback executing a child StepASTNode (adjudicator, fork child, or speculative worker). | runtime/agent/agent-turn-session-state.ts:112 |
forksByToolName | readonly | ReadonlyMap<string, ForkCapabilityNode<TIn, unknown, unknown, unknown, THandle>> | Pre-indexed map of .fork() capability descriptors keyed by toolName. | runtime/agent/agent-turn-session-state.ts:62 |
humanAdaptersById | readonly | ReadonlyMap<string, HumanAdapter> | Map of HumanAdapter instances keyed by humanNode.id. | runtime/agent/agent-turn-session-state.ts:96 |
itemKey? | readonly | string | Optional enclosing work item key for .mutatePlan(). | runtime/agent/agent-turn-session-state.ts:104 |
laneId? | readonly | string | Optional enclosing lane ID for .mutatePlan(). | runtime/agent/agent-turn-session-state.ts:102 |
ledgerStore? | readonly | LedgerStore | Optional durable LedgerStore. | runtime/agent/agent-turn-session-state.ts:82 |
lessonStore? | readonly | LessonStore | Optional LessonStore. | runtime/agent/agent-turn-session-state.ts:86 |
lockManager | readonly | ScopeLockManager | Shared-read / exclusive-write scope lock manager. | runtime/agent/agent-turn-session-state.ts:88 |
modelDriver | public | ModelDriver | Active ModelDriver instance for modelNode. | runtime/agent/agent-turn-session-state.ts:78 |
modelNode | public | ModelASTNode | Selected ModelASTNode for the current turn. | runtime/agent/agent-turn-session-state.ts:76 |
node | readonly | AgentNode<TIn, TOut, THandle> | Passive AgentNode being executed. | runtime/agent/agent-turn-session-state.ts:38 |
outerFrames | readonly | ContinuationFrame[] | Outer continuation frames (loop-frame, etc.) prefixing agentFrame. | runtime/agent/agent-turn-session-state.ts:46 |
outputTypeMarker? | readonly | TOut | Optional phantom reference to TOut so the generic parameter is structurally used. | runtime/agent/agent-turn-session-state.ts:118 |
poolManager | readonly | PoolManager | Capacity pool manager for model and account seat selection. | runtime/agent/agent-turn-session-state.ts:92 |
previousSpawnedTipKey? | public | string | Most recent spawned task key ($T_{\text{prevTip}}$) for linear prerequisite chaining. | runtime/agent/agent-turn-session-state.ts:110 |
recalledLessons | readonly | readonly RecalledLoopLessonRecord[] | Active lessons recalled at session or loop start. | runtime/agent/agent-turn-session-state.ts:98 |
scopedRules | readonly | readonly InlineScopedRuleNode[] | Resolved InlineScopedRuleNode definitions mounted on node.rules. | runtime/agent/agent-turn-session-state.ts:58 |
serviceByToolName? | readonly | ReadonlyMap<string, string> | Map of service tool name to its owning serviceNode.id for ServiceSession.invokeTool dispatch. | runtime/agent/agent-turn-session-state.ts:52 |
serviceRegistry | readonly | ServiceSessionRegistry | Reference-counted ServiceSessionRegistry for skill daemons. | runtime/agent/agent-turn-session-state.ts:94 |
skillOwnerByToolName | readonly | ReadonlyMap<string, string> | Map of skill-unlocked tool or service tool name to its owning skill.id for pre-flight skill lease gating. | runtime/agent/agent-turn-session-state.ts:50 |
skillsById | readonly | ReadonlyMap<string, InlineSkillNode<THandle>> | Pre-indexed map of resolved InlineSkillNode definitions keyed by skill.id. | runtime/agent/agent-turn-session-state.ts:48 |
spawnedTasksCount | public | number | Number of tasks spawned so far in this run via spawnTasks. | runtime/agent/agent-turn-session-state.ts:108 |
speculationsByToolName | readonly | ReadonlyMap<string, SpeculateCapabilityNode<TIn, unknown, unknown, unknown, THandle, unknown, unknown>> | Pre-indexed map of .speculate() capability descriptors keyed by toolName. | runtime/agent/agent-turn-session-state.ts:67 |
toolsByName | readonly | ReadonlyMap<string, BuiltInToolASTNode<THandle>> | Pre-indexed map of all always-on and skill-unlocked ToolASTNode definitions by tool.name. | runtime/agent/agent-turn-session-state.ts:60 |
topologyStore? | readonly | TopologyStore | Optional TopologyStore. | runtime/agent/agent-turn-session-state.ts:84 |
validatedInput | readonly | TIn | Schema-validated input payload for the agent session. | runtime/agent/agent-turn-session-state.ts:40 |
wirePrefix? | readonly | CompiledWirePrefix | Optional pinned CompiledWirePrefix for node.prefixGroup. | runtime/agent/agent-turn-session-state.ts:80 |