/** * daemon/core-handlers.ts — Hub-level IPC handlers. * * Registers the core methods that any adapter or MCP client can call * on the hub socket. Transport-specific methods (send, contacts, history) * are NOT registered here — adapters handle those on their own sockets. * * Phase 1 methods: * register_adapter — adapter announces itself to the hub * unregister_adapter * adapter_list — list connected adapters * sessions — list hybrid sessions * switch — switch active session * end_session — end a hybrid session * broadcast_status — push status to all PAILot clients * voice_config — get/set TTS config * status — hub health/connection summary */ import type { IpcServer } from "../ipc/server.js"; import type { AdapterRegistry } from "./adapter-registry.js"; import type { APIBackend } from "../backend/api.js"; import type { HybridSessionManager } from "../core/hybrid.js"; import type { IpcRequest } from "../types/ipc.js"; /** * Best human-readable identity for whoever made this call, for the audit trail. * * Falls back through raw ids rather than to "unknown": an unattributed action * is the thing the audit log exists to prevent, so a GUID beats a blank. */ /** * The caller's iTerm2 session id, from whichever field carried it. * * Two fields hold the same fact and callers do not agree on which to fill, so * asking only one of them silently loses the identity. That is not theoretical: * a message between sessions arrived labelled * `[Session:w11t0p0:066504E1-…]` because `itermSessionId` was empty and the * resolution never ran — the raw composite id went out where the sender's NAME * belongs. The `w11t0p0:` prefix is the proof, since the normalisation below * strips it and so could never have printed it. * * That label is not cosmetic. It is the receiver's only evidence of who sent a * message, and it is the address they are told to reply to — and a reply tool * that takes a name or an index cannot use a GUID. A relay of the operator's * own instruction arrived unattributable and unanswerable. * * Both forms are accepted and normalised the same way: iTerm2 reports * `wtp:`, and only the uuid identifies the session * across a move between windows. */ export declare function callerItermId(req: IpcRequest): string | undefined; export declare function registerCoreHandlers(server: IpcServer, registry: AdapterRegistry, _apiBackend: APIBackend, manager: HybridSessionManager): void; //# sourceMappingURL=core-handlers.d.ts.map