StepContext

Interface: StepContext

Defined in: packages/workflow-core/src/types.ts:224

Passed to a ctx.step() function. The deterministic id is the idempotency-key candidate for external systems — it stays the same across retries within a single step's execution AND across replays of the same run.

Properties

attempt

ts
attempt: number;
attempt: number;

Defined in: packages/workflow-core/src/types.ts:228

Current attempt number (1-indexed).


id

ts
id: string;
id: string;

Defined in: packages/workflow-core/src/types.ts:226

Deterministic step ID. Stable across retries and replays.


signal

ts
signal: AbortSignal;
signal: AbortSignal;

Defined in: packages/workflow-core/src/types.ts:232

Per-attempt AbortSignal. Fires on:

  • step timeout firing
  • run-level abort (Ctrl+C / external cancellation)