/**
 * ContextManagerV2 manages V2 context lifecycle, caching, and persistence.
 *
 * Responsibilities:
 * - Load/save context state from/to storage
 * - Cache active contexts in memory
 * - Create ephemeral contexts for one-off operations
 * - Migrate older context versions to current version
 */
import type { LanguageModel } from "ai";
import type { LLMObsTracer } from "../../llmobs/tracer.js";
import type { ContextOptionsV2 } from "./config.js";
import { ContextV2 } from "./context.js";
import type { ContextStorageV2 } from "./storage/index.js";
import type { ContextId } from "./storage/types.js";
import type { ModeState } from "./types.js";
/**
 * Options for configuring the ContextManagerV2.
 */
export interface ContextManagerV2Options {
    /** Storage backend for persisting context state */
    storage: ContextStorageV2;
    rootDir: string;
    getModeState?: () => ModeState | undefined;
}
/**
 * Manager for creating and managing V2 conversation contexts.
 */
export declare class ContextManagerV2 {
    private storage;
    private contexts;
    private rootDir;
    private getModeState?;
    constructor(options: ContextManagerV2Options);
    private getContextKey;
    getOrCreateContext(id: ContextId | undefined, summarizationModel: LanguageModel, config?: Partial<ContextOptionsV2>, tracer?: LLMObsTracer): Promise<ContextV2>;
    /**
     * Gets an already-loaded context without async operations.
     * For use by tools executing within an LLM stream where context is already loaded.
     */
    getLoadedContext(id: ContextId): ContextV2 | undefined;
    /**
     * Clears a specific context from the in-memory cache only.
     */
    clearContext(id: ContextId): void;
    /**
     * Clears all contexts from cache and storage.
     */
    clearAllContexts(): Promise<void>;
    /**
     * Loads context from persistent storage.
     * Handles version migration automatically.
     */
    private loadContext;
    /**
     * Saves context to persistent storage.
     */
    private saveContext;
}
//# sourceMappingURL=manager.d.ts.map