Skip to content

EngineConfig

Defined in: packages/engine/src/lib/config.ts:11

Dependencies and optional policies used to construct an Engine.

readonly optional history?: HistoryConfig<unknown>

Defined in: packages/engine/src/lib/config.ts:37

Optional history configuration. When omitted, chart_request turns still process normally but nothing is recorded, and assistant_message messages produce a validationError (‘history not configured’) since they have nowhere to be injected.


readonly optional instrument?: Instrument

Defined in: packages/engine/src/lib/config.ts:44

Optional telemetry seam (defaults to noopInstrument). Stages receive it as StageContext.instrument; pipeline wraps every stage with instrument.stage per request, and stages report model calls and other events through instrument.event.


readonly optional logger?: Logger

Defined in: packages/engine/src/lib/config.ts:30

Optional logger (defaults to consoleLogger). Stages receive it as StageContext.logger.


readonly planner: ClarifyingPlanner

Defined in: packages/engine/src/lib/config.ts:21

Produces the candidate response for every chart_request. Use a planner implementation as is, or compose stages with pipeline and withFallback. The Engine heals and validates whatever the planner returns against the request the client sent. Validation accepts a needs-clarification result only for a request that set skipReply: true, and Engine.handle currently refuses it even then with Err(ValidationError) on field skipReply.


readonly optional retry?: false | WithRetryOptions

Defined in: packages/engine/src/lib/config.ts:54

Retry policy the Engine wraps around EngineConfig.planner with withRetry. { max } re-runs the planner up to max times while validation recommends a retry (max is a non-negative integer). false (or { max: 0 }) runs the planner once; the Engine still heals and validates the candidate. Use false for planners that retry their own steps. Default { max: 1 }. See the README’s Retry section for the full policy.


readonly optional validatePlan?: PlanValidator

Defined in: packages/engine/src/lib/config.ts:28

Optional synchronous check of application requirements on the healed response. Issues use the configured retry budget. Unresolved issues return a ValidationError on validatePlan, including when retries are disabled. Without this hook, the existing healing and retry policy is unchanged.