/** * Local Op executor — runs an Op's phases in-process with no Temporal worker. * * A first-class peer to Temporal mode for dev loops, CI, and drift/observation * Ops. Provides phase sequencing, parallel phases, per-step retry + timeout via * activity profiles, `outcomeAttribute` capture, and `onFailure` compensation. * Gates and schedules are unsupported and rejected before any phase runs. * * The executor is deliberately decoupled from the Temporal lexicon: activity * implementations and profiles are passed in (loaded dynamically by the CLI), * so core never statically depends on `@intentius/chant-lexicon-temporal`. */ import type { OpConfig, GateStep } from "./types.js"; import { type ActivityFn, type ActivityProfile } from "./activity-registry.js"; export interface StepRecord { phase: string; fn: string; args: Record; status: "ok" | "fail" | "skipped"; durationMs: number; outcome?: { name: string; value: unknown; }; error?: string; } export interface OpRunResult { op: string; records: StepRecord[]; totalMs: number; ok: boolean; } /** Thrown when an Op contains a gate (or schedule) that local mode cannot run. */ export declare class LocalGateUnsupportedError extends Error { readonly signalName: string; constructor(signalName: string); } /** Thrown on terminal Op failure; carries the partial run result for rendering. */ export declare class OpRunFailure extends Error { readonly result: OpRunResult; constructor(result: OpRunResult); } /** Parse a Temporal duration string ("5m", "30s", "1h30m", "100ms") to ms. */ export declare function parseDuration(s: string): number; /** Find the first gate step anywhere in the Op (phases + onFailure), if any. */ export declare function findGate(config: OpConfig): GateStep | undefined; /** * Execute an Op locally. Resolves with the run result on success; rejects with * `OpRunFailure` (carrying the partial result) on terminal failure, after * running any `onFailure` phases in reverse order. Throws * `LocalGateUnsupportedError` up front if the Op contains a gate. */ export declare function runOpLocally(config: OpConfig, activities: Map, profiles: Record, signal?: AbortSignal): Promise; //# sourceMappingURL=local-executor.d.ts.map