#!/usr/bin/env node
/**
 * `opensquid-chat-bridge-mcp` — MCP server bridging Claude Code sessions
 * to the running chat-daemon's UMBRELLA Telegram routing.
 *
 * Why this is a SEPARATE MCP server from `opensquid-mcp`:
 *   `src/mcp/server.ts` is intentionally read-only by design (per its
 *   own header comment: "Mutations live behind hook bindings + rule
 *   processes; the MCP surface is read-only inspection so an external
 *   client can never bypass the dispatcher"). The chat bridge needs
 *   ONE mutation tool — `chat_send` — to be useful. Adding it to the
 *   read-only server would violate the dispatcher-bypass guard for the
 *   whole opensquid surface. Putting it in its own MCP binary keeps
 *   the guard intact: opensquid-mcp stays read-only; this server is
 *   the explicit + bounded exception.
 *
 * Tools (2):
 *   - `chat_poll_inbox` — read-only. Returns inbound messages from the
 *     active UMBRELLA's `~/.opensquid/umbrellas/<id>/inbox/<platform>.jsonl`
 *     since an optional `since` ISO-8601 timestamp. Caller tracks the
 *     cursor; server is stateless. Honors per-platform filter.
 *
 *   - `chat_send` — explicit mutation. Connects to the chat-daemon's
 *     UDS RPC server at `~/.opensquid/chat-daemon.sock` and calls its
 *     `send` JSON-RPC method. Accepts the `project:<platform>` shorthand
 *     that resolves to the active umbrella's outbound Telegram target via
 *     `channels.json`. Daemon must already be running (this server does
 *     NOT spawn it).
 *
 * Active-umbrella resolution (T-CHAT-AS-TERMINAL CAT.1c): resolve the cwd
 * (`CLAUDE_PROJECT_DIR` env, else `process.cwd()`) to its umbrella via
 * `loadChannelsConfig()` + `resolveUmbrellaForCwd` (longest-prefix over
 * `members`). `channels.json` is synthesized at the CAT.1d cutover, so an
 * absent config / unresolved umbrella is treated as "no inbox" (empty,
 * fail-quiet), never an error.
 *
 * Transport: stdio. stdout reserved for MCP JSON-RPC; diagnostics to
 * stderr only. NO `console.log` in this binary or its imports.
 *
 * Imports from: @modelcontextprotocol/sdk + zod + zod-to-json-schema.
 * Imported by: nothing in src/. Wired as the `opensquid-chat-bridge-mcp`
 * bin in package.json.
 */
export {};
//# sourceMappingURL=chat-bridge-server.d.ts.map