import type { HookRegistry } from "../contracts/hooks.js";
import type { AcpSessionMeta } from "../protocol/wire/index.js";
import { createMemoryPrefetchState } from "../runtime/hooks/memory-hooks.js";
import type { SessionState } from "../runtime/session/session-state.js";
import type { SessionHistoryCoordinator } from "./session-history-coordinator.js";
/**
 * LLM config pinned on the session by the host (session/set_config_option /
 * session/set_model / the /model command). This is host-supplied INPUT — distinct
 * from the host's resolved-agent snapshot (stdio-server current*), which is
 * derived state and gets invalidated on every ModelRegistry change. Pinned config
 * must survive registry churn: a spawned team member is provisioned exactly this
 * way, and a background catalog hydration firing between the pin and the first
 * prompt must not wipe it (that wipe was the standalone NO_PROVIDER bug).
 */
export interface SessionLlmConfig {
    provider?: string;
    model?: string;
    apiKey?: string;
    baseUrl?: string;
}
export interface AcpSessionHost {
    /** Gateway-supplied per-session context (_meta from session/new); inherited by every prompt. */
    acpSessionMeta: AcpSessionMeta | null;
    /** Host-pinned per-session LLM config; overlaid into every prompt's turn config. */
    sessionLlmConfig: SessionLlmConfig;
    currentHooks: HookRegistry | null;
    currentSessionId: string;
    memoryPrefetchState: ReturnType<typeof createMemoryPrefetchState>;
    sessionHistory: Pick<SessionHistoryCoordinator, "saveResumedSession" | "withResumedHistory">;
    sessionState: SessionState | null;
    cancelIdleDreamTimer(): void;
    disposeSessionRuntime?(): void;
    enableIdleDream(): void;
    ensureDefaultProject(): void;
    /**
     * Ensure the model-registry catalog (this.models) is hydrated from the owner profile +
     * built-in/llmrouter catalog. A spawned/headless qlogicagent only runs load() (bindings +
     * enabled-overrides) — its catalog is empty, so getActiveModel() returns null and the turn fails
     * "No LLM provider". Awaiting this before a turn resolves the model lets the agent self-resolve its
     * own configured model (idempotent; the promise is cached).
     */
    ensureModelRegistryHydrated?(): Promise<void>;
    getActiveProjectRoot(): string;
    log(message: string): void;
    sendNotification(method: string, params: Record<string, unknown>): void;
    setActiveWorkdir(dir: string): void;
}
