/** * The worker-side `ctx.state` namespace. Built locally from a `run` message — worker * mode supports `execution`/`workflow` atomic state but rejects `session` state, which * needs the engine host. Extracted from `workflow-runner.ts` so that module stays under * the line cap. * * @module workers/worker-state-namespace */ import type { WorkflowStateNamespace } from '../core/types.ts'; /** The `run`-message fields the state namespace needs to scope atomic state. */ export interface WorkerStateNamespaceScope { workflowId: string; workflowType: string; executionStateOwnerId?: string; } /** * Build the worker-side {@link WorkflowStateNamespace}. `execution` and `workflow` * scopes are supported; `session` throws because session state is an engine-host * capability the worker process cannot reach. */ export declare function createWorkerStateNamespace(message: WorkerStateNamespaceScope): WorkflowStateNamespace;