StageContext
Defined in: packages/engine/src/lib/planner/stage.ts:71
Request-scoped services the Engine gives every stage of a Planner.
Properties
Section titled “Properties”enumSnapshot?
Section titled “enumSnapshot?”
readonlyoptionalenumSnapshot?:ActionParameterEnumSnapshot
Defined in: packages/engine/src/lib/planner/stage.ts:100
The Action parameter enum values StageContext.validate checks actions against, captured once from the Vessel catalog in StageContext.origin. A stage that renders enum values for that same catalog (for example into a prompt) should read them from here, so it shows exactly the literals validation accepts even for values whose serialization is not stable across calls. The Engine always sets it; combinators that derive a context must forward it unchanged.
instrument
Section titled “instrument”
readonlyinstrument:Instrument
Defined in: packages/engine/src/lib/planner/stage.ts:86
The Engine’s telemetry seam. pipeline wraps every stage with it;
a stage reports what happens inside it (for example a model call) with
instrument.event. The Engine always sets it, to a no-op when none is
configured; combinators that derive a context must forward it unchanged.
logger
Section titled “logger”
readonlylogger:Logger
Defined in: packages/engine/src/lib/planner/stage.ts:79
The Engine’s logger. Log through it so stage logs share the Engine’s sink and redaction.
origin
Section titled “origin”
readonlyorigin:PlanningInput
Defined in: packages/engine/src/lib/planner/stage.ts:88
The untouched input the Engine passed to the first stage.
signal?
Section titled “signal?”
readonlyoptionalsignal?:AbortSignal
Defined in: packages/engine/src/lib/planner/stage.ts:77
Cancels in-flight work for the request. Every stage must honour it so that cancelled requests, and later concurrent combinators, stop spending on work nobody will use.
validate
Section titled “validate”
readonlyvalidate:ValidateCandidate
Defined in: packages/engine/src/lib/planner/stage.ts:90
Heals and validates a candidate against the request in StageContext.origin.