Graphorin API reference v0.15.1
Graphorin API reference / @graphorin/core / / ReadonlyRunState
Interface: ReadonlyRunState
Defined in: packages/core/src/types/run.ts:196
Stable
Read-only projection of RunState handed to tools and hooks via RunContext.state. Structurally identical to RunState - RunState is assignable to it - but every property is readonly and every array a ReadonlyArray, so typed tool code cannot corrupt run bookkeeping (splice pendingApprovals, flip status, ...). This is a compile-time contract only: there is no runtime freeze. A hand-written mirror (not a generic DeepReadonly): the nested types are already readonly-typed, and keyof-parity with RunState is pinned by type tests.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
agentId | readonly | string | - | packages/core/src/types/run.ts:198 |
currentAgentId | readonly | string | - | packages/core/src/types/run.ts:199 |
error? | readonly | RunError | - | packages/core/src/types/run.ts:222 |
finishedAt? | readonly | string | - | packages/core/src/types/run.ts:221 |
handoffs | readonly | readonly HandoffRecord[] | - | packages/core/src/types/run.ts:206 |
id | readonly | string | - | packages/core/src/types/run.ts:197 |
messages | readonly | readonly Message[] | - | packages/core/src/types/run.ts:204 |
pendingApprovals | readonly | readonly ToolApproval[] | - | packages/core/src/types/run.ts:205 |
pendingSubRuns? | readonly | readonly PendingSubRun[] | See RunState.pendingSubRuns. | packages/core/src/types/run.ts:219 |
promotedTools? | readonly | readonly string[] | See RunState.promotedTools. | packages/core/src/types/run.ts:213 |
sessionId | readonly | string | - | packages/core/src/types/run.ts:200 |
startedAt | readonly | string | - | packages/core/src/types/run.ts:220 |
status | readonly | RunStatus | - | packages/core/src/types/run.ts:202 |
steps | readonly | readonly RunStep[] | - | packages/core/src/types/run.ts:203 |
taintSummary? | readonly | RunTaintSummary | See RunState.taintSummary. | packages/core/src/types/run.ts:211 |
todos? | readonly | readonly TodoItem[] | See RunState.todos. | packages/core/src/types/run.ts:217 |
usage | readonly | Usage | - | packages/core/src/types/run.ts:207 |
usageByModel? | readonly | RunStateUsageByModel | See RunState.usageByModel. | packages/core/src/types/run.ts:209 |
userId? | readonly | string | - | packages/core/src/types/run.ts:201 |
verdicts? | readonly | RunVerdicts | See RunState.verdicts. | packages/core/src/types/run.ts:215 |