import type { WorkflowBackend } from "../backends/types.js"; import type { StepExecutorConfig } from "../executor/step-executor.js"; import type { WorkflowExecutor } from "../executor/workflow-executor.js"; import type { CapturedTenantContext, WorkflowRun } from "../types.js"; interface EntrypointLogger { error: (message: string, ...args: unknown[]) => void; info: (message: string, ...args: unknown[]) => void; warn: (message: string, ...args: unknown[]) => void; } interface EntrypointExitCodes { SUCCESS: number; WORKFLOW_FAILED: number; } /** Return the immutable worker owner assigned to this isolated run execution. */ export declare function getRunExecutionWorkerId(): string | undefined; /** * Create an isolated executor with durable wait handling and no background timer. * * This executor serves one run and exits, so neither sweep belongs to it: both * exist to reclaim waits whose process is gone, which is the long-lived * client's job. */ export declare function createIsolatedWorkflowExecutor(backend: WorkflowBackend, debug?: boolean, stepExecutor?: StepExecutorConfig): WorkflowExecutor; export declare function getTenantFromEnv(): CapturedTenantContext | undefined; /** Hydrate injected project env into the run context. Returns null when the run no longer exists. */ export declare function hydrateRunContextEnv(backend: WorkflowBackend, runId: string, run: WorkflowRun, expectedWorkerId?: string): Promise; export declare function getFinalRunExitCode(logger: EntrypointLogger, exitCodes: EntrypointExitCodes, runId: string, finalRun: WorkflowRun | null, debug?: boolean): number; export declare function failRunExecution(backend: WorkflowBackend, logger: EntrypointLogger, exitCodes: EntrypointExitCodes, runId: string, error: unknown, expectedWorkerId?: string): Promise; export declare function runWithTenantContext(tenant: CapturedTenantContext, fn: () => Promise): Promise; export {}; //# sourceMappingURL=shared.d.ts.map