/**
 * Session & Thread handlers - uses SessionLocator for all path resolution.
 *
 * Handles: thread.create, thread.list, session.create, session.resolve,
 *          session.list, session.get, session.getMessages, session.update,
 *          session.delete, session.deleteAll, session.archive, session.resume,
 *          session.getInfo, session.switchProject, session.getState
 *
 * Key invariant: every session operation resolves storage path via projectId,
 * never via the global `currentProjectRoot`. Sessions are immutably bound
 * to a project at creation time.
 */
import { SessionState } from "../../runtime/session/session-state.js";
import { createMemoryPrefetchState } from "../../runtime/hooks/memory-hooks.js";
import { type AgentRpcError, type AgentRpcErrorCode, type AgentRpcRequest } from "../../protocol/wire/index.js";
import type { SessionHistoryCoordinator } from "../session-history-coordinator.js";
export interface SessionHandlerHost {
    currentSessionId?: string;
    currentModel?: string;
    sessionState?: SessionState | null;
    memoryPrefetchState?: ReturnType<typeof createMemoryPrefetchState>;
    sessionHistory: Pick<SessionHistoryCoordinator, "saveResumedSession">;
    log(message: string): void;
    setActiveWorkdir(workdir: string): void;
    getActiveProjectRoot(): string;
    enableIdleDream(): void;
    sendNotification(method: string, params: Record<string, unknown>): void;
    sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
    sendError(id: string | number, code: AgentRpcErrorCode | number, message: string, data?: unknown): void;
}
export declare function handleThreadCreate(this: SessionHandlerHost, msg: AgentRpcRequest): void;
export declare function handleThreadList(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionCreate(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionResolve(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionList(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionGet(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionGetMessages(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionUpdate(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionDelete(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionDeleteAll(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionArchive(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionResume(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleSessionGetInfo(this: SessionHandlerHost, msg: AgentRpcRequest): void;
export declare function handleSessionSwitchProject(this: SessionHandlerHost, msg: AgentRpcRequest): void;
export declare function handleSessionGetState(this: SessionHandlerHost, msg: AgentRpcRequest): void;
/**
 * `session.focus` - Desktop UI reports which session is currently focused.
 * Agent switches active project/cwd to the session's owning project.
 */
export declare function handleSessionFocus(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
/**
 * `session.moveToProject` - Move a session from one project to another.
 * Physically copies session files, updates metadata.projectId, then removes the source.
 * Emits session:updated notification.
 */
export declare function handleSessionMoveToProject(this: SessionHandlerHost, msg: AgentRpcRequest): Promise<void>;
