import type { CustomMessage } from "@caupulican/pi-agent-core"; import type { ForegroundRecoveryController, ForegroundSubmissionLease } from "./foreground-recovery-controller.ts"; import type { GoalSessionController } from "./goals/goal-session-controller.ts"; interface DurableCustomMessageTurnControllerDeps { foreground: ForegroundRecoveryController; goals: Pick; enqueueSteeringMessage(message: CustomMessage): void; } /** * Starts an internal custom-message turn and separates durable input acceptance from full model-run * completion. Notification outboxes may acknowledge after `start` resolves, while the foreground * owner retains its lease until the returned completion settles. */ export declare class DurableCustomMessageTurnController { private readonly deps; private readonly pending; constructor(deps: DurableCustomMessageTurnControllerDeps); /** Accept only the exact custom-message object after SessionManager append succeeds. */ notePersisted(message: CustomMessage): boolean; /** Reject queued delivery receipts that can no longer reach persistence during session shutdown. */ shutdown(): void; /** Queue a custom message for the next provider boundary and resolve only after durable append. */ enqueue(message: Pick, "customType" | "content" | "display" | "details">): Promise; start(message: Pick, "customType" | "content" | "display" | "details">, submissionLease: ForegroundSubmissionLease, goalId?: string): Promise<{ completion: Promise; }>; private prepare; } export {}; //# sourceMappingURL=durable-custom-message-turn-controller.d.ts.map