import type { ApprovalSignal, PromptWorkflowInput, PromptWorkflowResult, TaskWorkflowInput, SessionRuntimeCheckpointCreateInput, SessionRuntimeCheckpointRestoreInput, SessionRuntimeShellInput, TemporalSessionWorkflowInput, TemporalWorkflowQueryState } from "./types.js"; import type { ApprovalRequest, ApprovalResponse, DispatchInput } from "@fabric-harness/sdk"; export declare const APPROVAL_SIGNAL = "approval"; export declare const SESSION_STATE_QUERY = "sessionState"; export declare const PROMPT_WORKFLOW_NAME = "promptWorkflow"; export declare const HYBRID_PROMPT_WORKFLOW_NAME = "hybridPromptWorkflow"; export declare const CHECKPOINT_CREATE_WORKFLOW_NAME = "checkpointCreateWorkflow"; export declare const CHECKPOINT_RESTORE_WORKFLOW_NAME = "checkpointRestoreWorkflow"; export declare const SHELL_WORKFLOW_NAME = "shellWorkflow"; export declare const TASK_WORKFLOW_NAME = "taskWorkflow"; export declare const DISPATCH_WORKFLOW_NAME = "dispatchWorkflow"; export declare const CUSTOM_APPROVAL_WORKFLOW_NAME = "customApprovalWorkflow"; export declare const approvalSignal: import("@temporalio/workflow").SignalDefinition<[ApprovalSignal], string>; export declare const sessionStateQuery: import("@temporalio/workflow").QueryDefinition; /** * Durable dispatch: applies one dispatched input to a persistent instance via * the `processDispatch` activity. The activity is idempotent by `dispatchId`, * so Temporal retries (and worker restarts) won't double-apply. */ export declare function dispatchWorkflow(input: DispatchInput): Promise; export interface CustomApprovalWorkflowInput { sessionId: string; workflowId: string; request: ApprovalRequest; timeoutMs?: number; } /** Durable custom approval gate used by `session.approval.request()`. */ export declare function customApprovalWorkflow(input: CustomApprovalWorkflowInput): Promise; export interface SessionWorkflowDefinition { input: TemporalSessionWorkflowInput; prompt(input: PromptWorkflowInput): Promise; signalApproval(signal: ApprovalSignal): void; queryState(): TemporalWorkflowQueryState; } /** * Long-lived session coordination workflow. * * This first production Temporal integration supports approval signaling and * state queries. Prompt/shell/checkpoint operations are workflows below. */ export declare function sessionWorkflow(input: TemporalSessionWorkflowInput): Promise; /** * Coarse one-shot prompt workflow. Useful as a compatibility path while the * hybrid loop is still gaining lower-level activity implementations. */ export declare function promptWorkflow(input: PromptWorkflowInput): Promise; interface EventIndexState { eventIndex: number; } /** * Hybrid durable prompt workflow. * * The workflow owns deterministic turn orchestration while activities perform * nondeterministic effects: context construction, model calls, tool execution, * approval policy checks, and durable entry/event appends. */ export declare function hybridPromptWorkflow(input: PromptWorkflowInput, sharedEventState?: EventIndexState): Promise; export declare function taskWorkflow(input: TaskWorkflowInput): Promise; export declare function checkpointCreateWorkflow(input: SessionRuntimeCheckpointCreateInput & { sessionId: string; idempotency: { idempotencyKey: string; }; }): Promise; export declare function checkpointRestoreWorkflow(input: SessionRuntimeCheckpointRestoreInput & { sessionId: string; idempotency: { idempotencyKey: string; }; }): Promise; export declare function shellWorkflow(input: SessionRuntimeShellInput & { sessionId: string; idempotency: { idempotencyKey: string; }; }): Promise; export {}; //# sourceMappingURL=workflow.d.ts.map