@cello-protocol/connect 0.0.43 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,38 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * cello-mcp — single-identity CELLO MCP server
3
+ * cello-mcp — thin stdio-to-IPC proxy (M7)
4
4
  *
5
- * One key file. One libp2p node. One client. One MCP server.
6
- * Two agents = two separate processes, each running this binary with their own CELLO_KEY_FILE.
5
+ * Connects to the running CELLO daemon via ~/.cello/daemon.sock and proxies
6
+ * all MCP tool calls through IPC. Holds no key material, opens no database,
7
+ * creates no libp2p node. Per-connection agent state is managed by the daemon.
7
8
  *
8
- * AC-002 (DX-001): TTY detection — if stdin is a TTY, print install instructions and exit.
9
- * AC-009 (DX-001): Lazy startup — MCP server connects and registers tools immediately;
10
- * bootstrap fetch, directory dial, SQLCipher open, and loadPersistedState move to background.
11
- * AC-001 (DX-001): Startup progress lines emitted to stderr at each step.
12
- *
13
- * Environment variables:
14
- * CELLO_KEY_FILE Path to Ed25519 key file (default: ~/.cello/key)
15
- * CELLO_AGENT_NAME Named agent identifier (M7+); lock file is per-agent
16
- * (default: null~/.cello/cello-mcp.pid; with name ~/.cello/agents/<name>/cello-mcp.pid)
17
- * CELLO_LOCK_FILE_PATH Override lock file path (test only; default: computed from CELLO_AGENT_NAME)
18
- * CELLO_LISTEN_ADDR libp2p listen address (default: /ip4/0.0.0.0/tcp/0)
19
- * CELLO_ANNOUNCE_ADDRS comma-separated libp2p announce multiaddrs (optional)
20
- * Required when the node is behind NAT/EIP and must advertise
21
- * its public address (e.g. /ip4/32.196.100.165/tcp/4001 on EC2)
22
- * CELLO_DIRECTORY_URL Production directory HTTP endpoint (default: http://directory-us1.cello.mygentic.ai)
23
- * Overridable for local/staging deployments. Relay multiaddr is
24
- * dynamically assigned per-session — no relay constant is baked in.
25
- * CELLO_DIRECTORY_MULTIADDR Directory libp2p multiaddr (optional; used when dialing libp2p directly)
26
- * NODE_ENV (unused — FROST bootstrap runs whenever CELLO_DIRECTORY_MULTIADDR is set)
27
- * CELLO_ENV Deployment environment: local | dev | staging | production
28
- * CELLO_DB_PATH Path to local SQLCipher database (default: ~/.cello/client.db)
29
- * BACKUP_S3_BUCKET S3 bucket for encrypted backups (required for S3 backup)
30
- * CELLO_AWS_REGION AWS region for S3 (default: eu-west-1; falls back to AWS_REGION)
31
- *
32
- * Backup selection (PERSIST-022):
33
- * CELLO_ENV=local → LocalCloudStorageProvider (filesystem)
34
- * CELLO_ENV != local + BACKUP_S3_BUCKET → S3CloudStorageProvider (uses CELLO_AWS_REGION or AWS_REGION)
35
- * CELLO_ENV != local + no BACKUP_S3_BUCKET → null (no backup; client.backup.not.configured logged)
9
+ * Startup:
10
+ * 1. --version flag
11
+ * 2. TTY detection (print "run cello login first")
12
+ * 3. Connect to daemon IPC socket
13
+ * 4. If ENOENT/ECONNREFUSED → exit 1 with daemon_not_running
14
+ * 5. Send ipc.connect frame
15
+ * 6. Open MCP stdio server
16
+ * 7. Register IPC proxy for every tool
17
+ * 8. On socket close ipc_connection_lost for all subsequent calls
36
18
  */
37
19
  export {};
38
20
  //# sourceMappingURL=cello-mcp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cello-mcp.d.ts","sourceRoot":"","sources":["../../src/bin/cello-mcp.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG"}
1
+ {"version":3,"file":"cello-mcp.d.ts","sourceRoot":"","sources":["../../src/bin/cello-mcp.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG"}
@@ -1,80 +1,58 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * cello-mcp — single-identity CELLO MCP server
3
+ * cello-mcp — thin stdio-to-IPC proxy (M7)
4
4
  *
5
- * One key file. One libp2p node. One client. One MCP server.
6
- * Two agents = two separate processes, each running this binary with their own CELLO_KEY_FILE.
5
+ * Connects to the running CELLO daemon via ~/.cello/daemon.sock and proxies
6
+ * all MCP tool calls through IPC. Holds no key material, opens no database,
7
+ * creates no libp2p node. Per-connection agent state is managed by the daemon.
7
8
  *
8
- * AC-002 (DX-001): TTY detection — if stdin is a TTY, print install instructions and exit.
9
- * AC-009 (DX-001): Lazy startup — MCP server connects and registers tools immediately;
10
- * bootstrap fetch, directory dial, SQLCipher open, and loadPersistedState move to background.
11
- * AC-001 (DX-001): Startup progress lines emitted to stderr at each step.
12
- *
13
- * Environment variables:
14
- * CELLO_KEY_FILE Path to Ed25519 key file (default: ~/.cello/key)
15
- * CELLO_AGENT_NAME Named agent identifier (M7+); lock file is per-agent
16
- * (default: null~/.cello/cello-mcp.pid; with name ~/.cello/agents/<name>/cello-mcp.pid)
17
- * CELLO_LOCK_FILE_PATH Override lock file path (test only; default: computed from CELLO_AGENT_NAME)
18
- * CELLO_LISTEN_ADDR libp2p listen address (default: /ip4/0.0.0.0/tcp/0)
19
- * CELLO_ANNOUNCE_ADDRS comma-separated libp2p announce multiaddrs (optional)
20
- * Required when the node is behind NAT/EIP and must advertise
21
- * its public address (e.g. /ip4/32.196.100.165/tcp/4001 on EC2)
22
- * CELLO_DIRECTORY_URL Production directory HTTP endpoint (default: http://directory-us1.cello.mygentic.ai)
23
- * Overridable for local/staging deployments. Relay multiaddr is
24
- * dynamically assigned per-session — no relay constant is baked in.
25
- * CELLO_DIRECTORY_MULTIADDR Directory libp2p multiaddr (optional; used when dialing libp2p directly)
26
- * NODE_ENV (unused — FROST bootstrap runs whenever CELLO_DIRECTORY_MULTIADDR is set)
27
- * CELLO_ENV Deployment environment: local | dev | staging | production
28
- * CELLO_DB_PATH Path to local SQLCipher database (default: ~/.cello/client.db)
29
- * BACKUP_S3_BUCKET S3 bucket for encrypted backups (required for S3 backup)
30
- * CELLO_AWS_REGION AWS region for S3 (default: eu-west-1; falls back to AWS_REGION)
31
- *
32
- * Backup selection (PERSIST-022):
33
- * CELLO_ENV=local → LocalCloudStorageProvider (filesystem)
34
- * CELLO_ENV != local + BACKUP_S3_BUCKET → S3CloudStorageProvider (uses CELLO_AWS_REGION or AWS_REGION)
35
- * CELLO_ENV != local + no BACKUP_S3_BUCKET → null (no backup; client.backup.not.configured logged)
9
+ * Startup:
10
+ * 1. --version flag
11
+ * 2. TTY detection (print "run cello login first")
12
+ * 3. Connect to daemon IPC socket
13
+ * 4. If ENOENT/ECONNREFUSED → exit 1 with daemon_not_running
14
+ * 5. Send ipc.connect frame
15
+ * 6. Open MCP stdio server
16
+ * 7. Register IPC proxy for every tool
17
+ * 8. On socket close ipc_connection_lost for all subsequent calls
36
18
  */
37
19
  import { homedir } from "node:os";
38
- import { join, normalize } from "node:path";
39
- import { createWriteStream, readFileSync } from "node:fs";
40
- // AC-001 (M6B-005): --version flag — exit cleanly with the package version.
20
+ import { join } from "node:path";
21
+ import { createWriteStream, mkdirSync } from "node:fs";
22
+ import { IpcProxy } from "../ipc-proxy.js";
23
+ // AC-020 (1): --version flag — exit cleanly with the package version.
41
24
  // Must precede TTY detection so `cello-mcp --version` works in any context.
42
25
  if (process.argv.includes("--version") || process.argv.includes("-v")) {
43
- // Read version from the package.json that ships with the npm package.
44
- // At runtime the compiled JS is in dist/bin/, package.json is at the package root.
45
26
  const { createRequire: cr } = await import("node:module");
46
27
  const req = cr(import.meta.url);
47
28
  const pkg = req("../../package.json");
48
29
  process.stdout.write(`${pkg.version}\n`);
49
30
  process.exit(0);
50
31
  }
51
- // AC-002 (DX-001): TTY detection — BEFORE anything else.
52
- // If stdin is a TTY, the binary was run directly in a terminal, not as an MCP subprocess.
53
- // Print install instructions to stdout and exit cleanly.
32
+ // AC-020 (2): TTY detection — if stdin is a TTY, print instructions and exit.
54
33
  if (process.stdin.isTTY) {
55
- // Read version for the TTY banner (AC-001 M6B-005)
56
34
  const { createRequire: cr } = await import("node:module");
57
35
  const req = cr(import.meta.url);
58
36
  const pkg = req("../../package.json");
59
37
  process.stdout.write(`cello-mcp v${pkg.version}\n` +
60
38
  "\n" +
61
- "This is a CELLO MCP server. It is designed to run as a subprocess of Claude Code.\n" +
39
+ "This is a CELLO MCP server. It communicates with the CELLO daemon process.\n" +
62
40
  "\n" +
63
- "To install, run:\n" +
64
- " npm install -g @cello-protocol/connect\n" +
41
+ "Run `cello login` to start the daemon first, then use this as an MCP server:\n" +
65
42
  " claude mcp add cello -- cello-mcp\n" +
66
43
  "\n" +
67
- "To upgrade to the latest version:\n" +
68
- " npm install -g @cello-protocol/connect@latest\n" +
69
- "\n" +
70
44
  "Then restart Claude Code (or run /mcp) to activate CELLO.\n");
71
45
  process.exit(0);
72
46
  }
73
- // Tee stderr to a log file for diagnostics (especially [sigstream] instrumentation)
74
- const stderrLog = createWriteStream("/tmp/cello-mcp-stderr.log", { flags: "a" });
47
+ // Resolve CELLO_DIR once (honored exactly as cello-daemon and the cello CLI do) and
48
+ // ensure it exists. Used for BOTH the diagnostics log and the daemon socket below, so
49
+ // every per-home isolation boundary CELLO_DIR establishes is respected — including the
50
+ // stderr tee, which previously went to a single global /tmp file shared across homes.
51
+ const celloDir = process.env.CELLO_DIR || join(homedir(), ".cello");
52
+ mkdirSync(celloDir, { recursive: true });
53
+ // AC-020 (3): Tee stderr to a log file under the home for diagnostics.
54
+ const stderrLog = createWriteStream(join(celloDir, "cello-mcp-stderr.log"), { flags: "a" });
75
55
  const origWrite = process.stderr.write.bind(process.stderr);
76
- // Override stderr.write to tee output to the log file.
77
- // We handle only the most common call signature (string/Buffer + optional encoding/callback).
78
56
  process.stderr.write = (chunk, encodingOrCb, cb) => {
79
57
  stderrLog.write(chunk);
80
58
  if (typeof encodingOrCb === "function") {
@@ -85,573 +63,148 @@ process.stderr.write = (chunk, encodingOrCb, cb) => {
85
63
  }
86
64
  return origWrite(chunk);
87
65
  };
88
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
89
- import { FileKeyProvider } from "@cello-protocol/crypto";
90
- import { createNode } from "@cello-protocol/transport";
91
- import { createClient, createMcpSessionServer, NetworkDirectoryNode, bootstrapNetworkKeyShares, ClientBackup, S3CloudStorageProvider, SQLCipherClientStore, ClientStatePersistence, AgentHashQueue, deriveDbKey } from "@cello-protocol/client";
92
- import { LocalCloudStorageProvider, LocalClientStore } from "@cello-protocol/interfaces/stubs";
93
- import { pushChannelNotification } from "../notifications.js";
94
- import { resolveDirectoryUrl, fetchBootstrapMultiaddr } from "../config.js";
95
- import { acquireLockFile, getLockFilePath } from "../lock-file.js";
96
- // AC-001 (DX-001): Startup progress — emit one line per step to stderr.
97
- // Format: 'cello: <step>... <outcome>'
98
- process.stderr.write("cello: starting...\n");
99
- // CELLO-M6B-001: Acquire PID lock file BEFORE any DB operations.
100
- // This kills any prior cello-mcp process holding the same lock, ensuring exactly
101
- // one cello-mcp per agent at all times. The cleanup function is registered to
102
- // release the lock on SIGTERM/SIGINT/normal exit.
103
- const agentName = process.env["CELLO_AGENT_NAME"] ?? null;
104
- const lockFilePath = process.env["CELLO_LOCK_FILE_PATH"] ?? getLockFilePath(agentName);
105
- // CRITICAL-2: Validate the final lock file path — reject paths outside ~/.cello/ in production.
106
- // This guard applies regardless of which env var sourced the path (CELLO_LOCK_FILE_PATH or
107
- // CELLO_AGENT_NAME), so a traversal-containing agent name (e.g. "../../../tmp/attack") is
108
- // rejected with the same check as a bad CELLO_LOCK_FILE_PATH.
109
- // Use path.normalize (without realpathSync) so this works on first run before the lock file
110
- // or ~/.cello/ directory exists. The normalized path is checked against the normalized ~/.cello/
111
- // prefix — this catches directory traversal ("../") in the raw path without requiring the file
112
- // to exist. Note: symlink-based path traversal requires the symlink to already exist at the
113
- // exact lock file path; if an attacker can already write arbitrary symlinks to ~/.cello/ they
114
- // have broader access. The normalize check prevents the common env-var injection attack where
115
- // CELLO_LOCK_FILE_PATH=~/../../../etc/passwd or CELLO_AGENT_NAME=../../tmp/attack is set.
116
- // Bypass only in NODE_ENV=test (integration test runners set this). Do NOT bypass for
117
- // CELLO_ENV=local — operators running in local mode are not running tests.
118
- {
119
- const isTestEnv = process.env["NODE_ENV"] === "test";
120
- if (!isTestEnv) {
121
- const userHome = homedir();
122
- const celloDir = normalize(join(userHome, ".cello")) + "/";
123
- const normalizedLockPath = normalize(lockFilePath);
124
- if (!normalizedLockPath.startsWith(celloDir)) {
125
- process.stderr.write(`cello-mcp: lock file path must be within ~/.cello/ directory\n`);
126
- process.stderr.write(`cello-mcp: Got: ${lockFilePath} (normalized to ${normalizedLockPath})\n`);
127
- process.exit(1);
128
- }
129
- }
130
- }
131
- const releaseLock = await acquireLockFile(lockFilePath, {
132
- logger: {
133
- info: (event, ctx) => process.stderr.write(`cello-mcp: [info] ${event} ${JSON.stringify(ctx)}\n`),
134
- warn: (event, ctx) => process.stderr.write(`cello-mcp: [warn] ${event} ${JSON.stringify(ctx)}\n`),
135
- },
136
- });
137
- // CRITICAL-1: Register cleanup on exit signals and normal exit.
138
- // The "exit" handler calls releaseLock() and runs on normal exit.
139
- // Signal handlers call process.exit() which triggers the exit handler.
140
- // Exception handlers MUST call releaseLock() before re-throwing because
141
- // Node.js terminates immediately on uncaught exceptions without firing
142
- // the "exit" event. Without this, every cello-mcp crash leaves a stale lock.
143
- //
144
- // NOTE: In-flight backup operations (cello_backup tool) are NOT awaited on SIGTERM/SIGINT.
145
- // This is acceptable risk for M6B scope because:
146
- // 1. Backups are idempotent (checksummed, retried on next run)
147
- // 2. Backup upload failures are logged and return error to the user
148
- // 3. Partial S3 uploads are eventually consistent and can be retried
149
- // 4. Adding graceful shutdown tracking requires wiring state across tool calls (out of scope)
150
- // If graceful shutdown becomes necessary, add a ClientBackup.shutdown() method that:
151
- // - Sets a shuttingDown flag
152
- // - Waits up to 5s for in-flight backup() calls to complete
153
- // - Then allows process.exit(0) to proceed
154
- // Late-bound client reference for graceful shutdown. Populated after createClient() below.
155
- // SIGTERM handler polls this to defer exit until any in-flight FROST ceremony completes.
156
- // Without this, a new cello-mcp startup (via lock-file kill) arriving mid-ceremony tears
157
- // down libp2p before session_assignment arrives, causing directory_unreachable on every
158
- // cello_initiate_session call. (Root cause identified M6-E2E-001, 2026-06-08.)
159
- let clientForShutdown = null;
160
- // Graceful SIGTERM: wait up to 4 seconds for any in-flight FROST ceremony to complete,
161
- // then exit. 4 seconds fits within the 5-second SIGTERM poll window in lock-file.ts,
162
- // leaving 1 second margin before the new process escalates to SIGKILL.
163
- async function gracefulShutdown() {
164
- // Capture in local const so inner loop accesses are null-safe and consistent with the guard.
165
- const client = clientForShutdown;
166
- try {
167
- if (client?.hasInFlightCryptoOperation()) {
168
- process.stderr.write("cello-mcp: [info] client.shutdown.waiting_for_ceremony {}\n");
169
- const deadline = Date.now() + 4000;
170
- while (Date.now() < deadline && client.hasInFlightCryptoOperation()) {
171
- await new Promise((resolve) => setTimeout(resolve, 50));
172
- }
173
- if (client.hasInFlightCryptoOperation()) {
174
- process.stderr.write("cello-mcp: [warn] client.shutdown.ceremony_timeout {}\n");
175
- }
176
- else {
177
- process.stderr.write("cello-mcp: [info] client.shutdown.ceremony_complete {}\n");
178
- }
179
- }
180
- }
181
- finally {
182
- process.exit(0);
183
- }
184
- }
185
- process.on("exit", () => {
186
- releaseLock();
187
- });
188
- process.on("SIGTERM", () => {
189
- void gracefulShutdown();
190
- });
191
- process.on("SIGINT", () => {
192
- process.exit(0);
193
- });
194
- process.on("uncaughtException", (err) => {
195
- process.stderr.write(`cello-mcp: [error] process.uncaught.exception ${JSON.stringify({ message: err.message, stack: err.stack })}\n`);
196
- releaseLock();
197
- process.exit(1);
198
- });
199
- process.on("unhandledRejection", (reason) => {
200
- const msg = reason instanceof Error ? reason.message : String(reason);
201
- const stack = reason instanceof Error ? reason.stack : undefined;
202
- process.stderr.write(`cello-mcp: [error] process.unhandled.rejection ${JSON.stringify({ reason: msg, stack })}\n`);
203
- releaseLock();
204
- process.exit(1);
205
- });
206
- const keyPath = process.env["CELLO_KEY_FILE"] ?? join(homedir(), ".cello", "key");
207
- const listenAddr = process.env["CELLO_LISTEN_ADDR"] ?? "/ip4/0.0.0.0/tcp/0";
208
- const announceAddrs = process.env["CELLO_ANNOUNCE_ADDRS"]
209
- ? process.env["CELLO_ANNOUNCE_ADDRS"].split(",").map((a) => a.trim()).filter(Boolean)
210
- : [];
211
- // AC-003 (REPOSPLIT-002): production directory endpoint baked in as default; overridable by env.
212
- // Relay multiaddr is dynamically assigned per-session — no relay constant is baked in.
213
- const directoryUrl = resolveDirectoryUrl(process.env);
214
- const directoryMultiaddr = process.env["CELLO_DIRECTORY_MULTIADDR"];
215
- const celloEnv = process.env["CELLO_ENV"] ?? "local";
216
- const dbPath = process.env["CELLO_DB_PATH"] ?? join(homedir(), ".cello", "client.db");
217
- const backupS3Bucket = process.env["BACKUP_S3_BUCKET"];
218
- // CELLO_AWS_REGION is the operator-settable variable (AWS_REGION is reserved by ECS/Lambda)
219
- const awsRegion = process.env["CELLO_AWS_REGION"] ?? process.env["AWS_REGION"] ?? "eu-west-1";
220
- // Load key
221
- let kp;
66
+ // Connect to daemon IPC socket under the same CELLO_DIR resolved above — otherwise an
67
+ // operator (or test) running the daemon under a non-default home would have cello-mcp
68
+ // look in ~/.cello and fail to find the socket.
69
+ const socketPath = join(celloDir, "daemon.sock");
70
+ const proxy = new IpcProxy(socketPath);
222
71
  try {
223
- kp = await FileKeyProvider.load(keyPath);
72
+ await proxy.connect();
224
73
  }
225
74
  catch (err) {
226
- const msg = typeof err === "object" && err !== null && "message" in err
227
- ? err.message
228
- : String(err);
229
- process.stderr.write(`cello-mcp: key file error: ${msg}\n`);
230
- process.exit(1);
231
- }
232
- // PERSIST-022: Read identity key (Ed25519 seed) from the key file for backup derivation.
233
- // Key file format (from packages/crypto/src/ed25519.ts):
234
- // Magic[0..3] = [0xce, 0x11, 0x0e, 0x01] ("CELLO\x01" marker)
235
- // version[4] = 0x01
236
- // seed[5..36] = 32-byte Ed25519 seed
237
- // Total: 37 bytes (KEY_FILE_SIZE)
238
- // The seed is used only for HKDF derivation (backup_key and db_key).
239
- // It is never stored, never logged, and is zeroed after ClientBackup construction.
240
- const KEY_FILE_MAGIC = new Uint8Array([0xce, 0x11, 0x0e, 0x01]);
241
- const KEY_FILE_VERSION = 0x01;
242
- const KEY_FILE_SIZE = 37; // Magic(4) + version(1) + seed(32)
243
- const SEED_OFFSET = 5; // KEY_FILE_MAGIC.length + 1
244
- const SEED_LENGTH = 32;
245
- let identityKeyBytes = null;
246
- try {
247
- const rawKeyFile = readFileSync(keyPath);
248
- // Validate exact file size
249
- if (rawKeyFile.length === KEY_FILE_SIZE) {
250
- // Validate magic bytes to ensure this is a valid CELLO key file
251
- const magicOk = KEY_FILE_MAGIC.every((b, i) => rawKeyFile[i] === b);
252
- // Validate version byte
253
- const versionOk = rawKeyFile[KEY_FILE_MAGIC.length] === KEY_FILE_VERSION;
254
- if (magicOk && versionOk) {
255
- identityKeyBytes = new Uint8Array(rawKeyFile.slice(SEED_OFFSET, SEED_OFFSET + SEED_LENGTH));
256
- }
257
- else {
258
- process.stderr.write(`cello-mcp: key file has invalid magic bytes or version — backup disabled\n`);
259
- }
75
+ const code = err.code;
76
+ if (code === "ENOENT" || code === "ECONNREFUSED") {
77
+ process.stderr.write("cello-mcp: daemon not running — run `cello login` to start it\n");
260
78
  }
261
79
  else {
262
- process.stderr.write(`cello-mcp: key file has unexpected size (${rawKeyFile.length} bytes, expected ${KEY_FILE_SIZE}) — backup disabled\n`);
80
+ const msg = err instanceof Error ? err.message : String(err);
81
+ process.stderr.write(`cello-mcp: failed to connect to daemon — ${msg}\n`);
263
82
  }
83
+ process.exit(1);
264
84
  }
265
- catch {
266
- // Non-fatal: if the key file can't be read for backup derivation, backup is disabled
267
- process.stderr.write(`cello-mcp: could not read identity key for backup derivation backup disabled\n`);
268
- }
269
- // PERSIST-022: Derive agentId from the public key
270
- const ownPubkeyForBackup = await kp.getPublicKey();
271
- const agentId = Buffer.from(ownPubkeyForBackup).toString("hex");
272
- // PERSIST-022: Select CloudStorageProvider based on CELLO_ENV and BACKUP_S3_BUCKET
273
- let cloudStorageForBackup = null;
274
- if (celloEnv === "local") {
275
- // Local: use filesystem-backed provider in ~/.cello/backups
276
- const localBackupDir = join(homedir(), ".cello", "backups");
277
- cloudStorageForBackup = new LocalCloudStorageProvider(localBackupDir);
278
- }
279
- else if (backupS3Bucket) {
280
- // Non-local with bucket configured: use S3
281
- cloudStorageForBackup = new S3CloudStorageProvider({ bucket: backupS3Bucket, region: awsRegion });
282
- }
283
- else {
284
- // Non-local without bucket: no backup configured — ClientBackup will log client.backup.not.configured
285
- }
286
- // PERSIST-022: Construct ClientBackup (only if identity key is available)
287
- // A minimal logger for the composition root backup instance that writes to stderr.
288
- // In production deployments the full structured logger is wired in via server.ts.
289
- const backupLogger = {
290
- debug: (event, ctx) => process.stderr.write(`cello-mcp: [debug] ${event} ${JSON.stringify(ctx ?? {})}\n`),
291
- info: (event, ctx) => process.stderr.write(`cello-mcp: [info] ${event} ${JSON.stringify(ctx ?? {})}\n`),
292
- warn: (event, ctx) => process.stderr.write(`cello-mcp: [warn] ${event} ${JSON.stringify(ctx ?? {})}\n`),
293
- error: (event, errorOrContext, context) => {
294
- if (errorOrContext instanceof Error) {
295
- process.stderr.write(`cello-mcp: [error] ${event} ${JSON.stringify({ message: errorOrContext.message, stack: errorOrContext.stack, ...context })}\n`);
296
- }
297
- else {
298
- process.stderr.write(`cello-mcp: [error] ${event} ${JSON.stringify(errorOrContext ?? {})}\n`);
299
- }
300
- },
301
- };
302
- // PERSIST-024 (CRIT-1): Derive dbKey for SQLCipher from identity key before zeroing.
303
- // The dbKey is derived via HKDF (RFC 5869) from the Ed25519 seed (SI-003: never stored).
304
- let dbKey = null;
305
- if (identityKeyBytes) {
306
- dbKey = deriveDbKey(identityKeyBytes, agentId);
85
+ // Send ipc.connect frame to register this connection as MCP client
86
+ const connectResult = await proxy.call("ipc.connect", { clientType: "mcp" });
87
+ if (connectResult && typeof connectResult === "object" && "reason" in connectResult) {
88
+ const r = connectResult;
89
+ if (r.reason === "version_mismatch") {
90
+ process.stderr.write("cello-mcp: daemon version mismatch — run `cello logout && cello login` to restart with a compatible daemon\n");
91
+ process.exit(1);
92
+ }
307
93
  }
308
- // PERSIST-024 (MED-2): clientPersistence is declared later (after SQLCipher store opens).
309
- // The setMetadata callback closes over the variable reference so it picks up the value
310
- // that is assigned later, at the point backup() is actually called.
311
- let clientPersistenceRef;
312
- let clientBackupInstance;
313
- if (identityKeyBytes) {
314
- clientBackupInstance = new ClientBackup({
315
- agentId,
316
- identityKey: identityKeyBytes,
317
- dbPath,
318
- cloudStorage: cloudStorageForBackup,
319
- logger: backupLogger,
320
- destinationType: celloEnv === "local" ? "local" : (backupS3Bucket ? "s3" : "local"),
321
- // PERSIST-024 (MED-2): persist backup metadata to structured DB table after successful upload.
322
- setMetadata: async (_key, value) => {
323
- if (!clientPersistenceRef)
324
- return;
325
- try {
326
- const meta = JSON.parse(Buffer.from(value).toString("utf8"));
327
- await clientPersistenceRef.persistBackupMetadata({
328
- completedAt: new Date(meta.timestamp).toISOString(),
329
- destinationUrl: meta.destinationUrl,
330
- checksum: meta.checksum,
331
- });
332
- }
333
- catch {
334
- // Non-fatal: metadata write failure does not affect the backup blob
335
- }
336
- },
337
- // PERSIST-024 (MED-2): read backup metadata from structured DB table for restore.
338
- getMetadata: async (_key) => {
339
- if (!clientPersistenceRef)
340
- return undefined;
341
- try {
342
- const row = await clientPersistenceRef.loadBackupMetadata();
343
- if (!row)
344
- return undefined;
345
- const meta = {
346
- timestamp: new Date(row.completed_at).getTime(),
347
- destinationUrl: row.destination_url,
348
- checksum: row.checksum,
349
- };
350
- return new Uint8Array(Buffer.from(JSON.stringify(meta), "utf8"));
351
- }
352
- catch {
353
- return undefined;
354
- }
355
- },
356
- });
357
- // Zero the identity key bytes immediately after construction — it must not linger in memory (SI-001)
358
- identityKeyBytes.fill(0);
359
- identityKeyBytes = null;
94
+ // Open MCP stdio server
95
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
96
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
97
+ import { z } from "zod";
98
+ // Read version from package.json (same source as --version flag)
99
+ const { createRequire: cr2 } = await import("node:module");
100
+ const req2 = cr2(import.meta.url);
101
+ const pkgForServer = req2("../../package.json");
102
+ function jsonText(value) {
103
+ return { content: [{ type: "text", text: JSON.stringify(value) }] };
360
104
  }
361
- // AC-009 (DX-001): Lazy startup.
362
- // Create the libp2p node synchronously (fast — no network), then create the client and MCP server.
363
- // The heavy operations (bootstrap fetch, directory dial, SQLCipher open, loadPersistedState)
364
- // move to a background async task. Tools that need the directory/FROST await readyPromise.
365
- // Create and start single node (fast — just opens a TCP port)
366
- const node = await createNode({
367
- keyProvider: kp,
368
- listenAddresses: [listenAddr],
369
- ...(announceAddrs.length ? { announceAddresses: announceAddrs } : {}),
105
+ const server = new McpServer({
106
+ name: "cello",
107
+ version: pkgForServer.version,
108
+ });
109
+ // ─── Agent management tools ─────────────────────────────────────────────────
110
+ server.tool("cello_start_agent", "Bring a registered CELLO agent online so it can participate in sessions", {
111
+ name: z.string().describe("Agent name to start"),
112
+ }, async ({ name }) => {
113
+ const result = await proxy.call("cello_start_agent", { name });
114
+ return jsonText(result);
115
+ });
116
+ server.tool("cello_stop_agent", "Take an online CELLO agent offline (back to registered state)", {
117
+ name: z.string().describe("Agent name to stop"),
118
+ }, async ({ name }) => {
119
+ const result = await proxy.call("cello_stop_agent", { name });
120
+ return jsonText(result);
121
+ });
122
+ server.tool("cello_use_agent", "Set which online agent this connection routes tool calls to", {
123
+ name: z.string().describe("Agent name to set as current for this connection"),
124
+ }, async ({ name }) => {
125
+ const result = await proxy.call("cello_use_agent", { name });
126
+ return jsonText(result);
127
+ });
128
+ server.tool("cello_list_agents", "List all agents with state from this connection's perspective", {}, async () => {
129
+ const result = await proxy.call("cello_list_agents");
130
+ return jsonText(result);
131
+ });
132
+ // ─── Session tools (proxied through daemon) ─────────────────────────────────
133
+ server.tool("cello_initiate_session", "Start a new CELLO session with a target agent", {
134
+ target_pubkey: z.string().describe("Hex-encoded public key of the target agent"),
135
+ }, async ({ target_pubkey }) => {
136
+ const result = await proxy.call("cello_initiate_session", { target_pubkey });
137
+ return jsonText(result);
138
+ });
139
+ server.tool("cello_await_session", "Wait for an inbound session request", {
140
+ timeout_ms: z.number().optional().describe("Timeout in milliseconds (default: 30000)"),
141
+ }, async ({ timeout_ms }) => {
142
+ const result = await proxy.call("cello_await_session", { timeout_ms });
143
+ return jsonText(result);
370
144
  });
371
- await node.start();
372
- // Late-bound server reference — set after createMcpServer returns.
373
- // The closure captures the box; notifications fired before server is assigned are dropped.
374
- let mcpServer;
375
- // AC-009: readySignal resolved when background init completes (or fails).
376
- // Tools that require the directory await this with a 10s timeout.
377
- let readyResolve = () => { };
378
- let readyReject = () => { };
379
- const readyPromise = new Promise((resolve, reject) => {
380
- readyResolve = resolve;
381
- readyReject = reject;
145
+ server.tool("cello_send", "Send a message in an active session", {
146
+ session_id: z.string().describe("Session ID"),
147
+ content: z.string().describe("Message content (UTF-8 text)"),
148
+ }, async ({ session_id, content }) => {
149
+ const result = await proxy.call("cello_send", { session_id, content });
150
+ return jsonText(result);
382
151
  });
383
- // Create client with no thresholdSigner initially background task populates it.
384
- // directoryEndpoint is also populated in the background task.
385
- const client = createClient(node, kp, {
386
- thresholdSigner: undefined,
387
- directoryEndpoint: undefined,
388
- persistence: undefined, // wired in background task after SQLCipher opens
389
- onMessageQueued: (senderHex) => {
390
- if (mcpServer)
391
- void pushChannelNotification(mcpServer, senderHex);
392
- },
152
+ server.tool("cello_receive", "Receive a message from an active session", {
153
+ session_id: z.string().describe("Session ID"),
154
+ timeout_ms: z.number().optional().describe("Timeout in milliseconds (default: 30000)"),
155
+ }, async ({ session_id, timeout_ms }) => {
156
+ const result = await proxy.call("cello_receive", { session_id, timeout_ms });
157
+ return jsonText(result);
393
158
  });
394
- // Wire client into graceful shutdown handler so SIGTERM can poll for in-flight ceremonies.
395
- clientForShutdown = client;
396
- // Create server with single identity.
397
- // PERSIST-017: checkpointStatusProvider is not available in the cello-mcp binary
398
- // (the client binary has no access to the directory's MmrStore). The provider is
399
- // wired in directory-facing deployments via the server.ts composition root.
400
- // Passing undefined is a safe fallback — the tools return M1 stub responses.
401
- // PERSIST-022: clientBackupInstance passed so cello_backup/cello_restore are registered
402
- // inside createMcpSessionServer (single canonical registration path).
403
- const server = createMcpSessionServer(node, client, kp, {
404
- clientBackup: clientBackupInstance,
405
- // AC-007 (DX-001): pass directoryUrl so agent_id lookup works in tool handlers
406
- directoryUrl,
407
- // AC-009 (DX-001): pass readyPromise so tools can await background init (up to 10s)
408
- readyPromise,
409
- // Wire logger so observability events (e.g. client.directory.agent_lookup.failed) are emitted
410
- logger: backupLogger,
159
+ server.tool("cello_receive_session", "Receive messages from an active session (alias)", {
160
+ session_id: z.string().describe("Session ID"),
161
+ timeout_ms: z.number().optional().describe("Timeout in milliseconds (default: 30000)"),
162
+ }, async ({ session_id, timeout_ms }) => {
163
+ const result = await proxy.call("cello_receive_session", { session_id, timeout_ms });
164
+ return jsonText(result);
411
165
  });
412
- mcpServer = server;
413
- // AC-009 (DX-001): Connect stdio transport NOW — before any network operations.
414
- // This ensures tools/list responds within 2s of process start.
166
+ server.tool("cello_close_session", "Close an active session and trigger the seal ceremony", {
167
+ session_id: z.string().describe("Session ID to close"),
168
+ }, async ({ session_id }) => {
169
+ const result = await proxy.call("cello_close_session", { session_id });
170
+ return jsonText(result);
171
+ });
172
+ server.tool("cello_list_sessions", "List all sessions for the current agent", {}, async () => {
173
+ const result = await proxy.call("cello_list_sessions");
174
+ return jsonText(result);
175
+ });
176
+ // ─── Status and utility tools ───────────────────────────────────────────────
177
+ server.tool("cello_status", "Get daemon and agent status", {}, async () => {
178
+ const result = await proxy.call("cello_status");
179
+ return jsonText(result);
180
+ });
181
+ server.tool("cello_backup", "Backup agent state to configured storage", {}, async () => {
182
+ const result = await proxy.call("cello_backup");
183
+ return jsonText(result);
184
+ });
185
+ server.tool("cello_restore", "Restore agent state from backup", {}, async () => {
186
+ const result = await proxy.call("cello_restore");
187
+ return jsonText(result);
188
+ });
189
+ server.tool("cello_get_sealed_receipt", "Get the sealed receipt for a closed session", {
190
+ session_id: z.string().describe("Session ID"),
191
+ }, async ({ session_id }) => {
192
+ const result = await proxy.call("cello_get_sealed_receipt", { session_id });
193
+ return jsonText(result);
194
+ });
195
+ server.tool("cello_get_transcript", "Get the durable, readable conversation transcript for a session (sent + received messages, in order) — recoverable after a daemon restart", {
196
+ session_id: z.string().describe("Session ID"),
197
+ }, async ({ session_id }) => {
198
+ const result = await proxy.call("cello_get_transcript", { session_id });
199
+ return jsonText(result);
200
+ });
201
+ server.tool("cello_get_inclusion_proof", "Get inclusion proof for a message in a sealed session", {
202
+ session_id: z.string().describe("Session ID"),
203
+ content_hash: z.string().describe("Content hash to prove inclusion of"),
204
+ }, async ({ session_id, content_hash }) => {
205
+ const result = await proxy.call("cello_get_inclusion_proof", { session_id, content_hash });
206
+ return jsonText(result);
207
+ });
208
+ // ─── Connect stdio transport ─────────────────────────────────────────────────
415
209
  await server.connect(new StdioServerTransport());
416
- await client.registerHandler();
417
- // AC-009 (DX-001): Background init task — runs concurrently with MCP tool calls.
418
- // All network and disk I/O happens here, not on the critical path of server startup.
419
- void (async () => {
420
- try {
421
- // Step 1: Open SQLCipher database
422
- process.stderr.write("cello: opening database...");
423
- let clientPersistence;
424
- let sqlCipherStore;
425
- const t0Db = Date.now();
426
- if (dbKey) {
427
- try {
428
- sqlCipherStore = new SQLCipherClientStore(dbKey, {
429
- dbPath,
430
- agentId,
431
- env: celloEnv,
432
- logger: backupLogger,
433
- });
434
- await sqlCipherStore.open();
435
- clientPersistence = new ClientStatePersistence({
436
- store: sqlCipherStore,
437
- agentPubkey: agentId,
438
- keyFilePath: keyPath,
439
- logger: backupLogger,
440
- });
441
- // PERSIST-024 (MED-2): expose to backup setMetadata/getMetadata callbacks (late binding)
442
- clientPersistenceRef = clientPersistence;
443
- // Wire persistence into client
444
- client.setPersistence?.(clientPersistence);
445
- const durationMs = Date.now() - t0Db;
446
- // AC-001: report schema version and table count when available
447
- const schemaInfo = sqlCipherStore.getSchemaInfo?.();
448
- if (schemaInfo) {
449
- process.stderr.write(` ok (V${schemaInfo.version}, ${schemaInfo.tableCount} tables)\n`);
450
- }
451
- else {
452
- process.stderr.write(` ok (${durationMs}ms)\n`);
453
- }
454
- backupLogger.info("client.startup.progress", { step: "opening_database", outcome: "ok", durationMs });
455
- }
456
- catch (err) {
457
- const msg = err instanceof Error ? err.message : String(err);
458
- process.stderr.write(` failed: ${msg}\n`);
459
- backupLogger.warn("client.startup.progress", { step: "opening_database", outcome: "failed", reason: msg, durationMs: Date.now() - t0Db });
460
- // Detect native module load failures
461
- const isNativeModuleError = msg.includes("Cannot find module") ||
462
- msg.includes("was compiled against a different Node.js version") ||
463
- msg.includes("NODE_MODULE_VERSION") ||
464
- msg.includes("invalid ELF header") ||
465
- msg.includes("dlopen") ||
466
- msg.includes("libcrypto") ||
467
- msg.includes("libssl");
468
- if (isNativeModuleError) {
469
- const platform = process.platform;
470
- if (platform === "win32") {
471
- process.stderr.write(`cello-mcp: Windows is not yet supported in the CELLO beta.\n`);
472
- process.stderr.write(`cello-mcp: Windows support is on the roadmap. Follow https://github.com/Mygentic-AI/cello-client for updates.\n`);
473
- }
474
- else if (platform === "linux") {
475
- process.stderr.write(`cello-mcp: Missing OpenSSL build dependencies on Linux.\n`);
476
- process.stderr.write(`cello-mcp: Run: sudo apt-get install build-essential libssl-dev\n`);
477
- process.stderr.write(`cello-mcp: Then re-run: npm install -g @cello-protocol/connect@latest\n`);
478
- }
479
- else {
480
- process.stderr.write(`cello-mcp: Xcode Command Line Tools are required on macOS.\n`);
481
- process.stderr.write(`cello-mcp: Run: xcode-select --install\n`);
482
- process.stderr.write(`cello-mcp: Then re-run: npm install -g @cello-protocol/connect@latest\n`);
483
- }
484
- process.stderr.write(`cello-mcp: Continuing without persistence — data will not survive restarts.\n`);
485
- }
486
- // Non-fatal: client continues without persistence
487
- clientPersistence = undefined;
488
- sqlCipherStore = undefined;
489
- }
490
- }
491
- else {
492
- process.stderr.write(` failed: identity key not available\n`);
493
- backupLogger.warn("client.startup.progress", { step: "opening_database", outcome: "failed", reason: "identity key not available", durationMs: Date.now() - t0Db });
494
- }
495
- // Step 2: Fetch directory address
496
- let resolvedDirectoryMultiaddr = directoryMultiaddr;
497
- let directoryEndpoint = undefined;
498
- if (!resolvedDirectoryMultiaddr) {
499
- process.stderr.write(`cello: fetching directory address...`);
500
- const t0Bootstrap = Date.now();
501
- try {
502
- const discovered = await fetchBootstrapMultiaddr(directoryUrl);
503
- if (discovered) {
504
- resolvedDirectoryMultiaddr = discovered;
505
- const parts = resolvedDirectoryMultiaddr.split("/");
506
- const p2pIndex = parts.findIndex((p) => p === "p2p");
507
- const peerId = p2pIndex !== -1 ? parts[p2pIndex + 1] : null;
508
- const shortPeerId = peerId ? peerId.slice(0, 20) + "..." : "(unknown)";
509
- process.stderr.write(` ok (${shortPeerId})\n`);
510
- backupLogger.info("client.startup.progress", { step: "fetching_directory_address", outcome: "ok", durationMs: Date.now() - t0Bootstrap });
511
- }
512
- else {
513
- const reason = "bootstrap endpoint unreachable";
514
- backupLogger.warn("client.bootstrap.fetch.failed", { directoryUrl, reason: "endpoint_returned_null", durationMs: Date.now() - t0Bootstrap });
515
- process.stderr.write(` failed: ${reason}\n`);
516
- backupLogger.warn("client.startup.progress", { step: "fetching_directory_address", outcome: "failed", reason, durationMs: Date.now() - t0Bootstrap });
517
- }
518
- }
519
- catch (err) {
520
- const msg = err instanceof Error ? err.message : String(err);
521
- backupLogger.warn("client.bootstrap.fetch.failed", { directoryUrl, reason: msg, durationMs: Date.now() - t0Bootstrap });
522
- process.stderr.write(` failed: ${msg}\n`);
523
- backupLogger.warn("client.startup.progress", { step: "fetching_directory_address", outcome: "failed", reason: msg, durationMs: Date.now() - t0Bootstrap });
524
- }
525
- }
526
- else {
527
- // CELLO_DIRECTORY_MULTIADDR is set — use it directly
528
- process.stderr.write(`cello: fetching directory address... ok (from CELLO_DIRECTORY_MULTIADDR)\n`);
529
- backupLogger.info("client.startup.progress", { step: "fetching_directory_address", outcome: "ok", durationMs: 0 });
530
- }
531
- if (resolvedDirectoryMultiaddr) {
532
- const parts = resolvedDirectoryMultiaddr.split("/");
533
- const p2pIndex = parts.findIndex((p) => p === "p2p");
534
- const peerId = p2pIndex !== -1 ? parts[p2pIndex + 1] : null;
535
- if (peerId) {
536
- directoryEndpoint = { peer_id: peerId, multiaddrs: [resolvedDirectoryMultiaddr] };
537
- }
538
- else {
539
- // Multiaddr is present but lacks /p2p/<peer-id> — setDirectoryEndpoint will not be called.
540
- backupLogger.warn("client.startup.multiaddr_parse.failed", { reason: "multiaddr_missing_peer_id", multiaddr: resolvedDirectoryMultiaddr });
541
- process.stderr.write("cello-mcp: directory multiaddr must include /p2p/<peer-id>\n");
542
- }
543
- }
544
- // AC-003 (DX-001): Set directoryEndpoint on the client BEFORE loadPersistedState() so that
545
- // loadPersistedState() can populate directoryNodeStubs in the reconstructed FrostThresholdSigner.
546
- // Only called when directoryEndpoint is parsed successfully (requires /p2p/<peer-id> in the
547
- // multiaddr). If multiaddr lacks peer ID, loadPersistedState() will reconstruct the
548
- // FrostThresholdSigner with directoryNodeStubs: undefined — ceremonies will fail until the
549
- // agent reconnects with a valid multiaddr.
550
- if (directoryEndpoint) {
551
- client.setDirectoryEndpoint?.(directoryEndpoint);
552
- }
553
- // Step 3: Load agent state (moved BEFORE directory connection/bootstrap)
554
- // Registered agents will have their FrostThresholdSigner reconstructed from DB here.
555
- // directoryEndpoint is already set, so directoryNodeStubs will be populated.
556
- process.stderr.write("cello: loading agent state...");
557
- const t0LoadState = Date.now();
558
- try {
559
- await client.loadPersistedState();
560
- process.stderr.write(" ok\n");
561
- backupLogger.info("client.startup.progress", { step: "loading_agent_state", outcome: "ok", durationMs: Date.now() - t0LoadState });
562
- }
563
- catch (err) {
564
- const msg = err instanceof Error ? err.message : String(err);
565
- process.stderr.write(` failed: ${msg}\n`);
566
- backupLogger.warn("client.startup.progress", { step: "loading_agent_state", outcome: "failed", reason: msg, durationMs: Date.now() - t0LoadState });
567
- throw err;
568
- }
569
- // PERSIST-024 AC-008: Build AgentHashQueue
570
- const loadedPendingHashes = client.getLoadedPendingHashes();
571
- const hashQueue = new AgentHashQueue({
572
- store: new LocalClientStore(),
573
- agentId,
574
- logger: backupLogger,
575
- });
576
- if (loadedPendingHashes.length > 0) {
577
- await hashQueue.loadPending(loadedPendingHashes);
578
- process.stderr.write(`cello-mcp: ${loadedPendingHashes.length} pending hash(es) loaded into AgentHashQueue\n`);
579
- }
580
- client.setHashQueue(hashQueue);
581
- // Check if the agent is already registered (FROST share was loaded from DB).
582
- // If so, skip bootstrap — the signer is already reconstructed from the DB.
583
- const regStateAfterLoad = typeof client.getRegistrationState === "function"
584
- ? client.getRegistrationState()
585
- : null;
586
- // Step 4: Connect to directory and bootstrap ONLY if not already registered
587
- let thresholdSigner;
588
- let primaryPubkey;
589
- const t0Connect = Date.now();
590
- if (resolvedDirectoryMultiaddr && directoryEndpoint) {
591
- process.stderr.write(`cello: connecting to directory...`);
592
- try {
593
- await node.dial(directoryEndpoint.multiaddrs[0]);
594
- // Announce to the directory immediately after dial so the directory registers
595
- // this agent in its #streams map. Without this, the directory considers the
596
- // agent offline even though the libp2p TCP connection succeeded.
597
- // registerHandler() was called before directoryEndpoint was set, so the
598
- // proactive announce inside it was skipped — this call makes up for that.
599
- await client.announceToDirectory();
600
- if (!regStateAfterLoad) {
601
- // Not yet registered — run bootstrap to initialize FROST key shares.
602
- // Registered agents already have their signer from loadPersistedState().
603
- const ownPubkey = await kp.getPublicKey();
604
- const networkNodes = [new NetworkDirectoryNode({
605
- id: `cello-test-node-0000`,
606
- node,
607
- directoryPeerId: directoryEndpoint.peer_id,
608
- directoryMultiaddrs: directoryEndpoint.multiaddrs,
609
- })];
610
- const bootstrap = await bootstrapNetworkKeyShares(ownPubkey, {
611
- threshold: 2,
612
- participants: 1,
613
- directoryNodes: networkNodes,
614
- });
615
- thresholdSigner = bootstrap.signer;
616
- primaryPubkey = bootstrap.primaryPubkey;
617
- }
618
- process.stderr.write(` ok\n`);
619
- backupLogger.info("client.startup.progress", { step: "connecting_to_directory", outcome: "ok", durationMs: Date.now() - t0Connect });
620
- }
621
- catch (err) {
622
- const msg = err instanceof Error ? `${err.name}: ${err.message}` : JSON.stringify(err);
623
- process.stderr.write(` failed: ${msg}\n`);
624
- process.stderr.write(`cello-mcp: continuing without threshold signer\n`);
625
- backupLogger.warn("client.startup.progress", { step: "connecting_to_directory", outcome: "failed", reason: msg, durationMs: Date.now() - t0Connect });
626
- }
627
- }
628
- else {
629
- process.stderr.write(`cello: connecting to directory... failed: no multiaddr configured\n`);
630
- backupLogger.warn("client.startup.progress", { step: "connecting_to_directory", outcome: "failed", reason: "no multiaddr configured", durationMs: Date.now() - t0Connect });
631
- }
632
- // Wire threshold signer into client only when bootstrap ran (unregistered agents).
633
- // Registered agents already have their signer from loadPersistedState().
634
- if (thresholdSigner) {
635
- client.setThresholdSigner?.(thresholdSigner);
636
- }
637
- if (primaryPubkey) {
638
- client.setPrimaryPubkey(primaryPubkey);
639
- }
640
- // Step 5: Emit final ready message (use regStateAfterLoad from loadPersistedState)
641
- if (regStateAfterLoad) {
642
- process.stderr.write(`cello: ready (registered as ${regStateAfterLoad.agent_id})\n`);
643
- }
644
- else {
645
- process.stderr.write(`cello: ready (not registered — call cello_setup_guidance for setup)\n`);
646
- }
647
- // durationMs: 0 — "ready" is a completion marker, not a timed operation.
648
- backupLogger.info("client.startup.progress", { step: "ready", outcome: "ok", durationMs: 0 });
649
- readyResolve();
650
- }
651
- catch (err) {
652
- const msg = err instanceof Error ? err.message : String(err);
653
- process.stderr.write(`cello-mcp: background init failed: ${msg}\n`);
654
- readyReject(err);
655
- }
656
- })();
657
210
  //# sourceMappingURL=cello-mcp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cello-mcp.js","sourceRoot":"","sources":["../../src/bin/cello-mcp.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;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AAK,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;IACxE,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE,uDAAuD,EAAE;IAChG,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC7C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;CACxE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,EAAE;IACxC,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IAC3F,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH,gFAAgF;AAChF,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * IPC Proxy — thin client for connecting cello-mcp to the daemon.
3
+ *
4
+ * Pseudocode:
5
+ * 1. connect(socketPath):
6
+ * a. Create net.Socket via createConnection
7
+ * b. On 'connect' event → resolve
8
+ * c. On 'error' → reject with ENOENT/ECONNREFUSED
9
+ * d. Set up JSON-newline framing reader
10
+ *
11
+ * 2. call(method, params):
12
+ * a. If socket is dead → return ipc_connection_lost immediately
13
+ * b. Generate numeric request ID (incrementing counter)
14
+ * c. Write { id, method, params } + '\n' to socket
15
+ * d. Await matching response by id
16
+ * e. If JSON parse error on response → return ipc_deserialization_error
17
+ * f. If response has error → extract and return as { ok: false, ... }
18
+ * g. Otherwise return result
19
+ *
20
+ * 3. On socket close: set dead flag. All subsequent calls return ipc_connection_lost.
21
+ */
22
+ export interface IpcProxyResult {
23
+ [key: string]: unknown;
24
+ }
25
+ export declare class IpcProxy {
26
+ #private;
27
+ constructor(socketPath: string);
28
+ /**
29
+ * Connect to the daemon IPC socket.
30
+ * Throws if the socket doesn't exist (ENOENT) or daemon isn't listening (ECONNREFUSED).
31
+ */
32
+ connect(): Promise<void>;
33
+ /**
34
+ * Send an IPC request and await the response.
35
+ * Returns the result directly if successful, or an error object with reason/guidance.
36
+ */
37
+ call(method: string, params?: Record<string, unknown>): Promise<unknown>;
38
+ close(): void;
39
+ get isDead(): boolean;
40
+ }
41
+ //# sourceMappingURL=ipc-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipc-proxy.d.ts","sourceRoot":"","sources":["../src/ipc-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAsBD,qBAAa,QAAQ;;gBAQP,UAAU,EAAE,MAAM;IAI9B;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA4CxB;;;OAGG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAgC9E,KAAK,IAAI,IAAI;IAQb,IAAI,MAAM,IAAI,OAAO,CAEpB;CAsDF"}
@@ -0,0 +1,188 @@
1
+ /**
2
+ * IPC Proxy — thin client for connecting cello-mcp to the daemon.
3
+ *
4
+ * Pseudocode:
5
+ * 1. connect(socketPath):
6
+ * a. Create net.Socket via createConnection
7
+ * b. On 'connect' event → resolve
8
+ * c. On 'error' → reject with ENOENT/ECONNREFUSED
9
+ * d. Set up JSON-newline framing reader
10
+ *
11
+ * 2. call(method, params):
12
+ * a. If socket is dead → return ipc_connection_lost immediately
13
+ * b. Generate numeric request ID (incrementing counter)
14
+ * c. Write { id, method, params } + '\n' to socket
15
+ * d. Await matching response by id
16
+ * e. If JSON parse error on response → return ipc_deserialization_error
17
+ * f. If response has error → extract and return as { ok: false, ... }
18
+ * g. Otherwise return result
19
+ *
20
+ * 3. On socket close: set dead flag. All subsequent calls return ipc_connection_lost.
21
+ */
22
+ import { createConnection } from "node:net";
23
+ const IPC_CONNECTION_LOST = {
24
+ ok: false,
25
+ reason: "ipc_connection_lost",
26
+ guidance: "The connection to the CELLO daemon was lost. Restart this MCP server (close and reopen Claude Code) to reconnect. The daemon itself may still be running — run `cello status` in a terminal to check.",
27
+ };
28
+ const IPC_DESERIALIZATION_ERROR = {
29
+ ok: false,
30
+ reason: "ipc_deserialization_error",
31
+ guidance: "The daemon sent a malformed response — this may be transient. Retry your operation. If the error persists, run `cello-mcp --version` and `cello status` to check for a version mismatch between cello-mcp and the running daemon.",
32
+ };
33
+ // CELLO-M7-MSG-001: must stay in sync with ipc-server.ts MAX_BUFFER_SIZE. Raised to
34
+ // 4 MB so a max-size (1 MB) cello_send content message + JSON envelope traverses IPC and
35
+ // reaches the daemon's content_too_large check, instead of tripping a fatal buffer
36
+ // overflow at the 1 MB content cap boundary.
37
+ const MAX_BUFFER_SIZE = 4 * 1024 * 1024; // 4MB — matches IPC server limit
38
+ export class IpcProxy {
39
+ #socketPath;
40
+ #socket = null;
41
+ #dead = false;
42
+ #nextId = 1;
43
+ #pending = new Map();
44
+ #buffer = "";
45
+ constructor(socketPath) {
46
+ this.#socketPath = socketPath;
47
+ }
48
+ /**
49
+ * Connect to the daemon IPC socket.
50
+ * Throws if the socket doesn't exist (ENOENT) or daemon isn't listening (ECONNREFUSED).
51
+ */
52
+ connect() {
53
+ return new Promise((resolve, reject) => {
54
+ const socket = createConnection(this.#socketPath);
55
+ this.#socket = socket;
56
+ socket.on("connect", () => {
57
+ resolve();
58
+ });
59
+ socket.on("error", (err) => {
60
+ this.#dead = true;
61
+ reject(err);
62
+ // Reject all pending requests
63
+ for (const [, p] of this.#pending) {
64
+ p.reject(new Error("Connection closed"));
65
+ }
66
+ this.#pending.clear();
67
+ });
68
+ socket.on("data", (chunk) => {
69
+ this.#buffer += chunk.toString("utf-8");
70
+ if (this.#buffer.length > MAX_BUFFER_SIZE) {
71
+ this.#dead = true;
72
+ socket.destroy();
73
+ for (const [, p] of this.#pending) {
74
+ p.resolve(IPC_CONNECTION_LOST);
75
+ }
76
+ this.#pending.clear();
77
+ return;
78
+ }
79
+ this.#processBuffer();
80
+ });
81
+ socket.on("close", () => {
82
+ this.#dead = true;
83
+ // Reject all pending requests
84
+ for (const [, p] of this.#pending) {
85
+ p.reject(new Error("Connection closed"));
86
+ }
87
+ this.#pending.clear();
88
+ });
89
+ });
90
+ }
91
+ /**
92
+ * Send an IPC request and await the response.
93
+ * Returns the result directly if successful, or an error object with reason/guidance.
94
+ */
95
+ async call(method, params) {
96
+ if (!method || typeof method !== "string") {
97
+ return { ok: false, reason: "invalid_method", guidance: "IPC method name must be a non-empty string." };
98
+ }
99
+ if (this.#dead) {
100
+ return IPC_CONNECTION_LOST;
101
+ }
102
+ const id = String(this.#nextId++);
103
+ return new Promise((resolve) => {
104
+ this.#pending.set(id, {
105
+ resolve,
106
+ reject: () => {
107
+ // On socket close/error, return ipc_connection_lost
108
+ resolve(IPC_CONNECTION_LOST);
109
+ },
110
+ });
111
+ const frame = JSON.stringify({ id, method, params }) + "\n";
112
+ try {
113
+ this.#socket.write(frame);
114
+ }
115
+ catch (err) {
116
+ const msg = err instanceof Error ? err.message : String(err);
117
+ process.stderr.write(`cello-mcp: IPC write failed: ${msg}\n`);
118
+ this.#dead = true;
119
+ this.#pending.delete(id);
120
+ resolve(IPC_CONNECTION_LOST);
121
+ }
122
+ });
123
+ }
124
+ close() {
125
+ if (this.#socket) {
126
+ this.#socket.end();
127
+ this.#socket = null;
128
+ }
129
+ this.#dead = true;
130
+ }
131
+ get isDead() {
132
+ return this.#dead;
133
+ }
134
+ #processBuffer() {
135
+ let newlineIdx;
136
+ while ((newlineIdx = this.#buffer.indexOf("\n")) !== -1) {
137
+ const line = this.#buffer.slice(0, newlineIdx);
138
+ this.#buffer = this.#buffer.slice(newlineIdx + 1);
139
+ if (line.trim().length === 0)
140
+ continue;
141
+ let frame;
142
+ try {
143
+ frame = JSON.parse(line);
144
+ }
145
+ catch {
146
+ // Malformed JSON — resolve the oldest pending request with deserialization error.
147
+ // In production the daemon never sends malformed frames; this handles transient
148
+ // corruption or version mismatch. We resolve the oldest pending because responses
149
+ // arrive in order for the single-socket serial protocol.
150
+ process.stderr.write(`cello-mcp: received malformed IPC frame (${line.length} bytes)\n`);
151
+ const oldestEntry = this.#pending.entries().next();
152
+ if (!oldestEntry.done) {
153
+ const [oldestId, resolver] = oldestEntry.value;
154
+ this.#pending.delete(oldestId);
155
+ resolver.resolve(IPC_DESERIALIZATION_ERROR);
156
+ }
157
+ continue;
158
+ }
159
+ // Check for notification frames (server-initiated, no id)
160
+ if ("notification" in frame) {
161
+ // Notifications are not correlated to requests; skip for now
162
+ continue;
163
+ }
164
+ // Regular response — correlate by id
165
+ const responseId = frame.id;
166
+ const pending = this.#pending.get(responseId);
167
+ if (pending) {
168
+ this.#pending.delete(responseId);
169
+ if ("error" in frame) {
170
+ const err = frame.error;
171
+ pending.resolve({
172
+ ok: false,
173
+ reason: err.code,
174
+ message: err.message,
175
+ guidance: err.guidance,
176
+ });
177
+ }
178
+ else {
179
+ pending.resolve(frame.result);
180
+ }
181
+ }
182
+ else if (responseId) {
183
+ process.stderr.write(`cello-mcp: orphaned IPC response for id=${responseId} (no pending request)\n`);
184
+ }
185
+ }
186
+ }
187
+ }
188
+ //# sourceMappingURL=ipc-proxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ipc-proxy.js","sourceRoot":"","sources":["../src/ipc-proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,gBAAgB,EAAe,MAAM,UAAU,CAAC;AAMzD,MAAM,mBAAmB,GAAG;IAC1B,EAAE,EAAE,KAAK;IACT,MAAM,EA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AC5B,6DAA6D;gBAC7D,SAAS;YACX,CAAC;YAED,qCAAqC;YACrC,MAAM,UAAU,GAAG,KAAK,CAAC,EAAY,CAAC;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC9C,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBACjC,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;oBACrB,MAAM,GAAG,GAAG,KAAK,CAAC,KAA4D,CAAC;oBAC/E,OAAO,CAAC,OAAO,CAAC;wBACd,EAAE,EAAE,KAAK;wBACT,MAAM,EAAE,GAAG,CAAC,IAAI;wBAChB,OAAO,EAAE,GAAG,CAAC,OAAO;wBACpB,QAAQ,EAAE,GAAG,CAAC,QAAQ;qBACvB,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;iBAAM,IAAI,UAAU,EAAE,CAAC;gBACtB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,2CAA2C,UAAU,yBAAyB,CAAC,CAAC;YACvG,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cello-protocol/connect",
3
- "version": "0.0.43",
3
+ "version": "0.0.46",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -30,9 +30,9 @@
30
30
  "@libp2p/peer-id": "^6.0.8",
31
31
  "@modelcontextprotocol/sdk": "^1.29.0",
32
32
  "zod": "^4.4.2",
33
- "@cello-protocol/client": "0.0.32",
34
- "@cello-protocol/crypto": "0.0.8",
35
- "@cello-protocol/transport": "0.0.4"
33
+ "@cello-protocol/client": "0.0.34",
34
+ "@cello-protocol/transport": "0.0.5",
35
+ "@cello-protocol/crypto": "0.0.8"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@claude-flow/testing": "3.0.0-alpha.6",