import type { WorkflowTurnIntentCause, WorkflowTurnIntentFacts, WorkflowTurnIntentRecord, WorkflowTurnIntentResolution } from "../controllers/sqlite.js"; export declare const DEFERRED_TURN_MESSAGE_TYPE = "pi-workflows-deferred-turn"; export declare const DEFERRED_TURN_MESSAGE_SCHEMA = "pi-workflows.deferred-turn-message.v1"; export type DeferredTurnSource = { runId: string; workflowName: string; targetSessionId: string; cause: WorkflowTurnIntentCause; sourceEventId: string; observedState: string; nodeId?: string | null; attemptId?: string | null; reason?: string | null; handoff?: boolean; }; export type DeferredTurnDescriptor = { intentId: string; sourceEventId: string; runId: string; workflowRef: string; targetSessionId: string; cause: WorkflowTurnIntentCause; nodeId: string | null; attemptId: string | null; fallbackFacts: WorkflowTurnIntentFacts; }; export type DeferredTurnMessageDetails = { schema: typeof DEFERRED_TURN_MESSAGE_SCHEMA; turnIntentId: string; runId: string; cause: WorkflowTurnIntentCause; }; export declare function deferredTurnSourceEventId(options: { runId: string; cause: WorkflowTurnIntentCause; nodeId?: string | null; attemptId?: string | null; source?: string; }): string; export declare function createDeferredTurnDescriptor(source: DeferredTurnSource): DeferredTurnDescriptor; export declare function createDeferredTurnFacts(source: DeferredTurnSource): WorkflowTurnIntentFacts; export declare function deferredTurnMessageId(intentId: string, resolution: WorkflowTurnIntentResolution): string; export declare function deferredTurnMessageDetails(intent: WorkflowTurnIntentRecord): DeferredTurnMessageDetails; export declare function buildDeferredTurnContent(intent: WorkflowTurnIntentRecord): string;