import type { AgentRpcRequest } from "../protocol/wire/index.js";
import { type CommunityHandlerHost } from "./handlers/community-handler.js";
import { type ConfigHandlerHost } from "./handlers/config-handler.js";
import { type ControlHandlerHost } from "./handlers/control-handler.js";
import { type FilesHandlerHost } from "./handlers/files-handler.js";
import { type MediaHandlerHost } from "./handlers/media-handler.js";
import { type MemoryHandlerHost } from "./handlers/memory-handler.js";
import { type PetConfirmHandlerHost } from "./handlers/pet-confirm-handler.js";
import { type PetHandlerHost } from "./handlers/pet-handler.js";
import { type WorkflowHandlerHost } from "./handlers/workflow-handler.js";
import { type ProjectHandlerHost } from "./handlers/project-handler.js";
import { type SessionHandlerHost } from "./handlers/session-handler.js";
import { type SettingsHandlerHost } from "./handlers/settings-handler.js";
import { type SkillsHandlerHost } from "./handlers/skills-handler.js";
import { type TurnControlHandlerHost } from "./handlers/turn-handler.js";
import { type DreamHandlerHost } from "./handlers/dream-handler.js";
import type { MultiAgentHandlerHost } from "./multi-agent-handler-host.js";
export type RpcMethodHandler = (msg: AgentRpcRequest) => void;
/**
 * Per-domain host adapters the RPC registry binds handlers to. Each field is
 * typed to exactly ONE handler's narrow contract, so the host (StdioServer)
 * builds the bundle under COMPILER CHECK: for every domain it passes `this`
 * directly, tsc verifies StdioServer satisfies that interface — if a member a
 * handler needs ever disappears, the build breaks at the bundle literal instead
 * of failing at runtime.
 *
 * A few domains' contracts are deliberately divergent views of shared state
 * (e.g. `memoryProvider` is `MemoryHandlerProvider` for memory but
 * `PetMemoryProviderLike` for pet; `sessionState` differs likewise). Those can't
 * be one structural type, so the host supplies them via a localized cast at the
 * bundle literal — the cast surface is one member-domain, not the whole host.
 *
 * The pattern mirrors the existing createDreamHandlerHost / createMultiAgentHandlerHost
 * adapters, just applied uniformly across every RPC domain.
 */
export interface RpcHandlerHosts {
    config: ConfigHandlerHost;
    control: ControlHandlerHost;
    session: SessionHandlerHost;
    memory: MemoryHandlerHost;
    files: FilesHandlerHost;
    media: MediaHandlerHost;
    skills: SkillsHandlerHost;
    pet: PetHandlerHost;
    petConfirm: PetConfirmHandlerHost;
    project: ProjectHandlerHost;
    community: CommunityHandlerHost;
    settings: SettingsHandlerHost;
    dream: DreamHandlerHost;
    turn: TurnControlHandlerHost;
    /** agents/solo/product are served by the multi-agent sub-host. */
    multiAgent: MultiAgentHandlerHost;
    /**
     * workflow.* binds to its own host: it needs `toolCatalog` plus the lazy engine slots
     * (controller/store/scheduler/processManager) that the multi-agent sub-host lacks. The host
     * (StdioServer) supplies a dedicated WorkflowHostAdapter that sources acpDetector from the
     * multi-agent sub-host and toolCatalog from the runtime — so this binding is compiler-checked
     * like every other domain, with no cast.
     */
    workflow: WorkflowHandlerHost;
}
export declare function createRpcMethodRegistry(host: RpcHandlerHosts): ReadonlyMap<string, RpcMethodHandler>;
