import type { AgentMessage } from '../../../core/index.js';
import { DurableMemoryWorkspace } from '../../extensions/durable-memory/workspace.js';
import type { ExtensionContext, PostTurnHandler } from '../../extensions/types.js';
export declare class DurableMemoryCoordinator {
    private readonly workspace;
    private activeBackgroundRun?;
    private pendingBackgroundRun?;
    /** Construct the coordinator with an optional pre-built durable-memory workspace (for tests). */
    constructor(workspace?: DurableMemoryWorkspace);
    /** Ensure the durable-memory workspace exists on disk. */
    initialize(): void;
    /** Return the durable-memory index fragment to inject into the agent's system prompt. */
    getPromptFragment(): string | null;
    /** Build the post-turn handler that schedules durable-memory checkpoints on cadence. */
    createPostTurnHandler(): PostTurnHandler;
    /** Hook called before message compaction; flushes pending checkpoints and runs a pre-compact one. */
    onBeforeCompaction(messagesToSummarize: AgentMessage[], ctx: ExtensionContext, signal: AbortSignal): Promise<void>;
    /** Begin a user-initiated durable-memory scan; returns false if no model context is available. */
    startManualScan(ctx: ExtensionContext, manualRequest?: string): boolean;
    /** Capture the per-run context (model, paths, trimmed messages) needed for a checkpoint run. */
    private buildRunContext;
    /** Either start the checkpoint immediately or replace any pending one when a run is in flight. */
    private enqueueCheckpoint;
    /** Run the next checkpoint in the background, chaining to any pending run when finished. */
    private startBackgroundCheckpoint;
    /** Await any active background checkpoint until the queue is fully drained. */
    private waitForBackgroundCheckpointDrain;
    /** Execute one durable-memory checkpoint via the forked agent and emit the resulting status. */
    private runCheckpoint;
}
//# sourceMappingURL=coordinator.d.ts.map