Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/core / / ReadonlyRunState
Interface: ReadonlyRunState
Defined in: packages/core/src/types/run.ts:178
Read-only projection of RunState handed to tools and hooks via RunContext.state (W-047). 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.