Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/core / / RunContext

Interface: RunContext<TDeps>

Defined in: packages/core/src/types/run.ts:288

Per-run dependency / context bag handed to every tool, hook and provider middleware in scope. Generic over the user-defined deps shape.

tracer, signal, usage and state are always present; everything else is optional.

Stable

Type Parameters

Type ParameterDefault type
TDepsunknown

Properties

PropertyModifierTypeDescriptionDefined in
agentIdreadonlystring-packages/core/src/types/run.ts:292
depsreadonlyTDeps-packages/core/src/types/run.ts:293
messagesreadonlyreadonly Message[]-packages/core/src/types/run.ts:298
runIdreadonlystring-packages/core/src/types/run.ts:289
sessionIdreadonlystring-packages/core/src/types/run.ts:290
signalreadonlyAbortSignal-packages/core/src/types/run.ts:295
span?readonlyAISpan<SpanType>C7: the current agent.step span (when the runtime traces). Spans created inside tool execution parent under it so a run's traces form one tree.packages/core/src/types/run.ts:311
statereadonlyReadonlyRunStateRead-only snapshot of the run's state (W-047). Tools observe the run; they do not mutate its bookkeeping - writes to status, pendingApprovals etc. are compile errors. The runtime keeps the only mutable reference.packages/core/src/types/run.ts:305
stepNumberreadonlynumber-packages/core/src/types/run.ts:297
tracerreadonlyTracer-packages/core/src/types/run.ts:294
usagereadonlyUsageAccumulator-packages/core/src/types/run.ts:296
userId?readonlystring-packages/core/src/types/run.ts:291