/**
 * The single owner of the chat-daemon client (T-CHAT-FINALIZE-REMOVE-LEGACY CL.1).
 *
 * Before this module the one-shot JSON-RPC-over-UNIX-socket dance was copy-pasted into
 * ~5 call sites (agent_bridge/tools/chat_send, mcp/chat-bridge-server, setup/cli/
 * chat_actions_test_step, functions/ensure_umbrella_topic) plus the socket-path
 * derivation in ~5 places — duplication left over from when the chat-daemon client
 * lived in the now-removed `src.legacy/` tree. This is that shared client (the home the
 * chat_send.ts comment named). STRICT extraction: the
 * socket/timeout/decode behavior matches the prior `defaultDaemonSend` byte-for-byte;
 * `daemonRpc` just generalizes it over the RPC `method` + result type.
 *
 * Scope (Simplicity — no method without a present caller): socket-path resolution, one
 * one-shot `daemonRpc`, and the typed `sendChat` wrapper. No pooling / retry / streaming —
 * the daemon calls are one-shot, so a one-shot client is the correct shape.
 *
 * Imports from: node:net, node:os, ../runtime/paths.js.
 * Imported by: the chat-daemon call sites (CL.3).
 */
/**
 * The chat-daemon socket address. Unix: the canonical `chatDaemonSockPath()`
 * (`<home>/chat-daemon.sock`). Win32: a named pipe whose fingerprint = the last path
 * segment of the data root (keeps multiple installs isolated — the convention the legacy
 * `daemonSockAddress` used). This is the ONE place the Win32 branch lives now.
 */
export declare function daemonSocketPath(): string;
/** The `send` RPC result (the narrow slice the callers use). */
export interface DaemonSendResult {
    ok: boolean;
    platform: string;
    message_id: string;
    delivered_at: string;
}
/**
 * One-shot JSON-RPC over the daemon UNIX socket: connect → write a single newline-framed
 * request → read the first newline-framed response → resolve its `result` (or reject on
 * RPC error / malformed JSON / connection error / timeout). Never spawns the daemon — a
 * down daemon surfaces as a connection-error rejection.
 */
export declare function daemonRpc<T>(method: string, params: Record<string, unknown>, opts?: {
    timeoutMs?: number;
}): Promise<T>;
/** Parameters for the daemon `send` RPC (the daemon's media field is `mediaPath`). */
export interface DaemonSendParams {
    channel: string;
    text: string;
    replyTo?: string;
    threadId?: string;
    /** Absolute path to a local image delivered as a photo (text → caption). */
    imagePath?: string;
}
/** Typed `send` RPC — the one-shot reply path used by the agent-bridge + MCP bridge. */
export declare const sendChat: (params: DaemonSendParams) => Promise<DaemonSendResult>;
/** Typed `create_topic` RPC — creates one Telegram forum topic, returns its thread id. */
export declare const createTopic: (chatId: string, name: string) => Promise<{
    message_thread_id: number;
    name: string;
}>;
/** Liveness gate — true iff a chat-daemon answers `ping` on its socket. Any failure ⇒ false. */
export declare const pingDaemon: (timeoutMs?: number) => Promise<boolean>;
//# sourceMappingURL=client.d.ts.map