import { type ContextDatabase } from "../../features/magic-context/storage";
import type { PluginContext } from "../../plugin/types";
import { type PreparedCompartmentInjection } from "./inject-compartments";
import type { MessageLike } from "./transform-operations";
export declare function clearCompressorCooldown(sessionId: string): void;
interface RunCompartmentPhaseArgs {
    canRunCompartments: boolean;
    fullFeatureMode: boolean;
    sessionMeta: {
        compartmentInProgress: boolean;
    };
    contextUsage: {
        percentage: number;
    };
    client?: PluginContext["client"];
    db: ContextDatabase;
    sessionId: string;
    resolvedSessionId: string;
    historianChunkTokens: number;
    historyBudgetTokens?: number;
    historianTimeoutMs?: number;
    fallbackModels?: readonly string[];
    compartmentDirectory: string;
    messages: MessageLike[];
    pendingCompartmentInjection: PreparedCompartmentInjection | null;
    fallbackModelId?: string;
    projectPath?: string;
    injectionBudgetTokens?: number;
    getNotificationParams?: () => import("./send-session-notification").NotificationParams;
    /** True when this pass is already safe for background compression to run. */
    safeForBackgroundCompression?: boolean;
    /** True when this pass is already rebuilding history; suppress standalone compressor. */
    suppressBackgroundCompressionThisPass?: boolean;
    deferredHistoryRefreshSessions: Set<string>;
    /** True when transform already triggered recovery/emergency historian work this pass. */
    skipAwaitForThisPass?: boolean;
    /** When true, inject compaction markers into OpenCode's DB after historian publication */
    experimentalCompactionMarkers?: boolean;
    /** When true, extract user behavior observations from historian output */
    experimentalUserMemories?: boolean;
    /** When true, inject wall-clock dates on compartments in <session-history>. */
    experimentalTemporalAwareness?: boolean;
    /** When true, run a second editor pass after historian to clean U: lines. */
    historianTwoPass?: boolean;
    /** Compressor floor ratio: floor = ceil(lastEndMessage / minCompartmentRatio). */
    compressorMinCompartmentRatio?: number;
    /** Compressor max merge depth (1-5). Compartments at or above this depth are skipped. */
    compressorMaxMergeDepth?: number;
    /** Compressor cooldown in milliseconds between background runs. */
    compressorCooldownMs?: number;
    /** Cross-session memory feature gate (`memory.enabled`). Issue #44. */
    memoryEnabled?: boolean;
    /** Auto-promotion gate (`memory.auto_promote`). Issue #44. */
    autoPromote?: boolean;
    /** Forwarded to compartment runner — see CompartmentRunnerDeps.onCompartmentStatePublished. */
    onCompartmentStatePublished?: (sessionId: string) => void;
}
export declare function runCompartmentPhase(args: RunCompartmentPhaseArgs): Promise<{
    pendingCompartmentInjection: PreparedCompartmentInjection | null;
    awaitedCompartmentRun: boolean;
    compartmentInProgress: boolean;
    published: boolean;
    justAwaitedPublication: boolean;
    rebuiltHistoryThisPass: boolean;
}>;
export {};
//# sourceMappingURL=transform-compartment-phase.d.ts.map