@cotal-ai/connector-core 0.84.0 → 0.86.0

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 +1 @@
1
- {"version":3,"file":"docs-bundle.generated.js","sourceRoot":"","sources":["../src/docs-bundle.generated.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC;AAErC,MAAM,UAAU,cAAc;IAC5B,OAAO;QACP,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,mEAAmE;QACpF,OAAO,EAAE;YACP;gBACE,MAAM,EAAE,eAAe;gBACvB,OAAO,EAAE,eAAe;gBACxB,MAAM,EAAE,0BAA0B;gBAClC,SAAS,EAAE,+FAA+F;gBAC1G,MAAM,EAAE,81IAA81I;aACv2I;YACD;gBACE,MAAM,EAAE,iBAAiB;gBACzB,OAAO,EAAE,YAAY;gBACrB,MAAM,EAAE,0BAA0B;gBAClC,SAAS,EAAE,gHAAgH;gBAC3H,MAAM,EAAE,4tYAA4tY;aACruY;YACD;gBACE,MAAM,EAAE,cAAc;gBACtB,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,uBAAuB;gBAC/B,SAAS,EAAE,wMAAwM;gBACnN,MAAM,EAAE,y2nBAAy2nB;aACl3nB;YACD;gBACE,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,kBAAkB;gBAC3B,MAAM,EAAE,mEAAmE;gBAC3E,SAAS,EAAE,wMAAwM;gBACnN,MAAM,EAAE,4mwCAA4mwC;aACrnwC;YACD;gBACE,MAAM,EAAE,0BAA0B;gBAClC,OAAO,EAAE,qBAAqB;gBAC9B,MAAM,EAAE,mCAAmC;gBAC3C,SAAS,EAAE,gGAAgG;gBAC3G,MAAM,EAAE,6qMAA6qM;aACtrM;YACD;gBACE,MAAM,EAAE,mBAAmB;gBAC3B,OAAO,EAAE,UAAU;gBACnB,MAAM,EAAE,uBAAuB;gBAC/B,SA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E,MAAM,EAAE,cAAc;gBACtB,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,qBAAqB;gBAC7B,SAAS,EAAE,uHAAuH;gBAClI,MAAM,EAAE,0tsBAA0tsB;aACnusB;YACD;gBACE,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,eAAe;gBACxB,MAAM,EAAE,uBAAuB;gBAC/B,SAAS,EAAE,kHAAkH;gBAC7H,MAAM,EAAE,wq8CAAwq8C;aACjr8C;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,0BAA0B;YACnC,MAAM,EAAE,ip7iBAAip7iB;SAC1p7iB;QACD,MAAM,EAAE;YACN,OAAO,EAAE,mCAAmC;YAC5C,MAAM,EAAE,i9mGAAi9mG;SAC19mG;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,oCAAoC;YAC7C,MAAM,EAAE,m4pBAAm4pB;SAC54pB;KACF,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"docs-bundle.generated.js","sourceRoot":"","sources":["../src/docs-bundle.generated.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC;AAErC,MAAM,UAAU,cAAc;IAC5B,OAAO;QACP,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,mEAAmE;QACpF,OAAO,EAAE;YACP;gBACE,MAAM,EAAE,eAAe;gBACvB,OAAO,EAAE,eAAe;gBACxB,MAAM,EAAE,0BAA0B;gBAClC,SAAS,EAAE,+FAA+F;gBAC1G,MAAM,EAAE,81IAA81I;aACv2I;YACD;gBACE,MAAM,EAAE,iBAAiB;gBACzB,OAAO,EAAE,YAAY;gBACrB,MAAM,EAAE,0BAA0B;gBAClC,SAAS,EAAE,gHAAgH;gBAC3H,MAAM,EAAE,4tYAA4tY;aACruY;YACD;gBACE,MAAM,EAAE,cAAc;gBACtB,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,uBAAuB;gBAC/B,SAAS,EAAE,wMAAwM;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AE,WAAW;gBACnB,OAAO,EAAE,qBAAqB;gBAC9B,MAAM,EAAE,uBAAuB;gBAC/B,SAAS,EAAE,kGAAkG;gBAC7G,MAAM,EAAE,8uPAA8uP;aACvvP;YACD;gBACE,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,uBAAuB;gBAChC,MAAM,EAAE,uBAAuB;gBAC/B,SAAS,EAAE,kGAAkG;gBAC7G,MAAM,EAAE,ugQAAugQ;aAChhQ;YACD;gBACE,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,gCAAgC;gBACzC,MAAM,EAAE,qBAAqB;gBAC7B,SAAS,EAAE,iEAAiE;gBAC5E,MAAM,EAAE,isjFAAisjF;aAC1sjF;YACD;gBACE,MAAM,EAAE,cAAc;gBACtB,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,qBAAqB;gBAC7B,SAAS,EAAE,uHAAuH;gBAClI,MAAM,EAAE,63sBAA63sB;aACt4sB;YACD;gBACE,MAAM,EAAE,WAAW;gBACnB,OAAO,EAAE,eAAe;gBACxB,MAAM,EAAE,uBAAuB;gBAC/B,SAAS,EAAE,kHAAkH;gBAC7H,MAAM,EAAE,wq8CAAwq8C;aACjr8C;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,0BAA0B;YACnC,MAAM,EAAE,+pijBAA+pijB;SACxqijB;QACD,MAAM,EAAE;YACN,OAAO,EAAE,mCAAmC;YAC5C,MAAM,EAAE,8toGAA8toG;SACvuoG;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,oCAAoC;YAC7C,MAAM,EAAE,m4pBAAm4pB;SAC54pB;KACF,CAAC;AACF,CAAC"}
package/dist/framing.js CHANGED
@@ -15,7 +15,7 @@
15
15
  * core's peer label, so the hook relay can reach it without pulling a tool surface in behind it, and
16
16
  * so neither surface can drift into a second convention.
17
17
  */
18
- import { peerLabel } from "@cotal-ai/core";
18
+ import { peerLabel } from "@cotal-ai/core/peer-label";
19
19
  /**
20
20
  * What counts as a line break, which is more than what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;AACtG,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,UAAU,CAAC,OAA2B;IACpD,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACnD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,OAAO,CAAC,IAAwB;IAC9C,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAChD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AACxC,CAAC"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * The Cotal tool surface for a REMOTE MCP server: one server, many conversations.
3
+ *
4
+ * A stdio connector is one process per session, so its tools reach the mesh through the one
5
+ * {@link MeshAgent} that process owns. A remote server has no such anchor. A hosted MCP client such
6
+ * as Claude pools one OAuth bearer and one MCP transport session across every conversation of an
7
+ * account, so nothing on a request says which conversation sent it. Each conversation therefore
8
+ * opens its own connection with `cotal_connect` and names it on every later call. A missing or
9
+ * foreign handle refuses and runs nothing. No call falls back to the account's last, only or most
10
+ * recent connection, because that would put one conversation's words under another's identity.
11
+ *
12
+ * The embedder owns everything account-shaped through {@link GatewayHost}: authentication,
13
+ * credential issuance and revocation, and durable records. This module owns the surface, the name
14
+ * rule and, through {@link handleGatewayRequest}, the MCP server itself, so an embedder never needs
15
+ * an MCP SDK of its own.
16
+ */
17
+ import type { IncomingMessage, ServerResponse } from "node:http";
18
+ import type { Readable, Writable } from "node:stream";
19
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
20
+ import type { AuthInfo } from "@modelcontextprotocol/sdk/server/auth/types.js";
21
+ import type { MeshAgent } from "./agent.js";
22
+ import type { AgentConfig } from "./config.js";
23
+ /** Thrown by {@link GatewayHost.open} when, and only when, the issuer reports that the name already
24
+ * exists. It is the one failure that moves `cotal_connect` to the next candidate name. An auth,
25
+ * quota, permission or network failure must be any other error, so it reaches the caller instead
26
+ * of being retried under a different name. */
27
+ export declare class NameTaken extends Error {
28
+ readonly taken: string;
29
+ constructor(taken: string);
30
+ }
31
+ /** One live connection: a mesh identity serving one conversation. */
32
+ export interface GatewayConnection {
33
+ readonly id: string;
34
+ readonly agent: MeshAgent;
35
+ readonly config: AgentConfig;
36
+ }
37
+ /** What the embedding service supplies. Every method receives the authenticated account, never a
38
+ * value a tool argument chose. */
39
+ export interface GatewayHost {
40
+ /** The account the request authenticated as. Throw when the request carries no valid
41
+ * authentication; the tool then runs nothing. */
42
+ account(auth: AuthInfo | undefined): string;
43
+ /** Open a fresh connection for `account` named exactly `name`. Throw {@link NameTaken} only for
44
+ * an authoritative name collision. The collision check and the issue must be one atomic step per
45
+ * account: an `open` racing another for the same name throws `NameTaken` rather than also
46
+ * succeeding, or two conversations end up sharing one name. Error messages reach the caller,
47
+ * so they must not carry secrets. */
48
+ open(account: string, name: string): Promise<GatewayConnection>;
49
+ /** The connection `id` if `account` owns it, otherwise undefined. Never a default. */
50
+ find(account: string, id: string): Promise<GatewayConnection | undefined>;
51
+ /** Stop and release one connection `account` owns. False when it owns no such connection. */
52
+ close(account: string, id: string): Promise<boolean>;
53
+ }
54
+ /** The mesh tools a remote conversation may call. Process and seat authority (spawn, despawn,
55
+ * persona, run, yield, reconnect) belongs to a supervised local seat and is not offered here. */
56
+ export declare const GATEWAY_TOOLS: ReadonlySet<string>;
57
+ /** How many names `cotal_connect` tries: the requested one, then `_2` up to this suffix. */
58
+ export declare const GATEWAY_NAME_ATTEMPTS = 20;
59
+ /** The longest `cotal_wait` holds one call when the embedder sets no bound, in seconds. A held call
60
+ * has to end before anything in front of the gateway does. The reply is one JSON body, so its first
61
+ * byte goes out when the wait ends: Claude Code gives a remote server 60 seconds to that byte,
62
+ * Cloudflare ends an origin response after about 100, and claude.ai ends a tool call after 240. */
63
+ export declare const GATEWAY_WAIT_SECONDS = 50;
64
+ /** How an embedder tunes the surface for what sits in front of it. */
65
+ export interface GatewayOptions {
66
+ /** The longest `cotal_wait` may hold one call, in whole seconds. Defaults to
67
+ * {@link GATEWAY_WAIT_SECONDS}. Keep it under every proxy and client timeout on the path. */
68
+ waitSeconds?: number;
69
+ /** A way to wake the client other than a held `cotal_wait`, for an embedder whose client can be
70
+ * woken. Without it a conversation hears messages only when it calls a tool. */
71
+ wake?: GatewayWake;
72
+ }
73
+ /** How an embedder wakes its client when a connection has something to read. */
74
+ export interface GatewayWake {
75
+ /** Called when a connection gets something that ends a `cotal_wait` while none holds it, and
76
+ * not again for that connection until a `cotal_inbox` or `cotal_wait` reads its messages.
77
+ * Return false when no client heard it, so the next rewake signals it again. */
78
+ signal(connection: GatewayConnection): boolean;
79
+ /** What `cotal_connect` adds about listening, read when the connection opens: whether this
80
+ * client will be woken. */
81
+ listening(): string;
82
+ /** Called once with the rewake: call it when a client starts listening, and every connection
83
+ * with something to read that no client heard about is signalled. */
84
+ attach?(rewake: () => void): void;
85
+ }
86
+ /** The names `cotal_connect` tries for `base`, in order. */
87
+ export declare function gatewayNames(base: string, attempts?: number): string[];
88
+ /**
89
+ * Register the remote surface on `server`: `cotal_connect`, `cotal_disconnect`, `cotal_wait`, and
90
+ * each tool in {@link GATEWAY_TOOLS} with a required `connection_id`.
91
+ *
92
+ * Each call is parsed and run against the spec built from that connection's own configuration, so a
93
+ * connection's channels and grants decide what the call does.
94
+ *
95
+ * A remote MCP client gives the server no way to start a turn, so a conversation hears a message
96
+ * only when it calls a tool. `cotal_wait` is the call that listens: it holds until a message
97
+ * arrives and then returns it, and every other routed tool says when messages are waiting.
98
+ */
99
+ export declare function registerCotalGatewayTools(server: McpServer, host: GatewayHost, source?: string, options?: GatewayOptions): void;
100
+ /** How a conversation hears messages when nothing can wake it: the last part of
101
+ * {@link GATEWAY_INSTRUCTIONS}. */
102
+ export declare const GATEWAY_LISTENING: string;
103
+ /** How a conversation joins and names its connection: the first part of {@link GATEWAY_INSTRUCTIONS}. */
104
+ export declare const GATEWAY_CONNECTING: string;
105
+ /** The server instructions {@link handleGatewayRequest} sends when the embedder gives none. */
106
+ export declare const GATEWAY_INSTRUCTIONS = "Cotal connects this conversation to the person's Cotal space. Call cotal_connect once with a short name for this conversation, then pass the returned connection_id on every other cotal tool call. Each conversation needs its own connection. Never reuse another conversation's connection_id. Messages reach you only when you call a tool: to listen, call cotal_wait, which returns as soon as a message arrives. When the person asks you to stay on Cotal or keep listening, call cotal_wait again each time it returns and handle each message as it arrives, until they ask you to stop.";
107
+ /** One HTTP request to a gateway endpoint. */
108
+ export interface GatewayRequest {
109
+ req: IncomingMessage;
110
+ res: ServerResponse;
111
+ /** The parsed JSON body, for a framework that already read the request stream. Omit it and the
112
+ * body is read from `req`. */
113
+ body?: unknown;
114
+ /** What the embedder authenticated this request as, handed to {@link GatewayHost.account}.
115
+ * Without it every tool refuses and runs nothing. */
116
+ auth?: AuthInfo;
117
+ /** The source tag on messages this endpoint sends. */
118
+ source?: string;
119
+ instructions?: string;
120
+ /** See {@link GatewayOptions.waitSeconds}. */
121
+ waitSeconds?: number;
122
+ }
123
+ /**
124
+ * Serve one HTTP request to a gateway endpoint with this package's own MCP server and Streamable
125
+ * HTTP transport. The embedder authenticates and routes. It never builds an MCP server, so its own
126
+ * SDK or zod version cannot disagree with the one these tools were written against.
127
+ *
128
+ * The endpoint is stateless. Each POST gets a fresh server and transport and a JSON response, so
129
+ * nothing survives between requests except what the host stores. There is no server-initiated
130
+ * stream and no session to end, so every other method answers 405, as the Streamable HTTP
131
+ * transport allows. A `cotal_wait` call holds its POST open for up to `waitSeconds`.
132
+ */
133
+ export declare function handleGatewayRequest(host: GatewayHost, r: GatewayRequest): Promise<void>;
134
+ /** One local client that launches the gateway as a process and speaks MCP over its pipes. */
135
+ export interface GatewayStdio {
136
+ /** Defaults to `process.stdin`. */
137
+ input?: Readable;
138
+ /** Defaults to `process.stdout`, so every diagnostic must go to stderr. */
139
+ output?: Writable;
140
+ /** The source tag on messages this server sends. */
141
+ source?: string;
142
+ instructions?: string;
143
+ /** See {@link GatewayOptions.waitSeconds}. */
144
+ waitSeconds?: number;
145
+ /** See {@link GatewayOptions.wake}. */
146
+ wake?: GatewayWake;
147
+ }
148
+ /**
149
+ * Serve the gateway surface over stdio with this package's own MCP server, for a client such as
150
+ * Claude Desktop that runs one local process for every conversation. A stdio request carries no
151
+ * authentication, so `host.account` receives `undefined` and names the local user. A client that
152
+ * cancels a call aborts its signal, as a closed HTTP request does.
153
+ */
154
+ export declare function serveGatewayStdio(host: GatewayHost, o?: GatewayStdio): Promise<{
155
+ close(): Promise<void>;
156
+ }>;
157
+ //# sourceMappingURL=gateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAI/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;+CAG+C;AAC/C,qBAAa,SAAU,SAAQ,KAAK;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAInC;AAED,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,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AAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAQpH"}
@@ -0,0 +1,402 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
+ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
4
+ import { z } from "zod";
5
+ import { assertValidName } from "@cotal-ai/core";
6
+ import { cotalToolSpecs, parseToolArgs } from "./tool-specs.js";
7
+ /** Thrown by {@link GatewayHost.open} when, and only when, the issuer reports that the name already
8
+ * exists. It is the one failure that moves `cotal_connect` to the next candidate name. An auth,
9
+ * quota, permission or network failure must be any other error, so it reaches the caller instead
10
+ * of being retried under a different name. */
11
+ export class NameTaken extends Error {
12
+ taken;
13
+ constructor(taken) {
14
+ super(`name ${JSON.stringify(taken)} is taken`);
15
+ this.taken = taken;
16
+ this.name = "NameTaken";
17
+ }
18
+ }
19
+ /** The mesh tools a remote conversation may call. Process and seat authority (spawn, despawn,
20
+ * persona, run, yield, reconnect) belongs to a supervised local seat and is not offered here. */
21
+ export const GATEWAY_TOOLS = new Set([
22
+ "cotal_orientation",
23
+ "cotal_connection_status",
24
+ "cotal_roster",
25
+ "cotal_inbox",
26
+ "cotal_send",
27
+ "cotal_dm",
28
+ "cotal_anycast",
29
+ "cotal_status",
30
+ "cotal_channel_info",
31
+ "cotal_channels",
32
+ "cotal_channel_mode",
33
+ "cotal_join",
34
+ "cotal_leave",
35
+ ]);
36
+ /** How many names `cotal_connect` tries: the requested one, then `_2` up to this suffix. */
37
+ export const GATEWAY_NAME_ATTEMPTS = 20;
38
+ /** The longest `cotal_wait` holds one call when the embedder sets no bound, in seconds. A held call
39
+ * has to end before anything in front of the gateway does. The reply is one JSON body, so its first
40
+ * byte goes out when the wait ends: Claude Code gives a remote server 60 seconds to that byte,
41
+ * Cloudflare ends an origin response after about 100, and claude.ai ends a tool call after 240. */
42
+ export const GATEWAY_WAIT_SECONDS = 50;
43
+ /** The names `cotal_connect` tries for `base`, in order. */
44
+ export function gatewayNames(base, attempts = GATEWAY_NAME_ATTEMPTS) {
45
+ return [base, ...Array.from({ length: attempts - 1 }, (_, i) => `${base}_${i + 2}`)];
46
+ }
47
+ const CONNECTION_REQUIRED = "CONNECTION_REQUIRED: no connection with that connection_id belongs to this account. Call cotal_connect " +
48
+ "for this conversation and pass the connection_id it returns. Nothing was done.";
49
+ /** One tool list serves every connection, so the advertised shapes come from a configuration with
50
+ * no identity and no channels. Each call still runs against its connection's own configuration. */
51
+ const ADVERTISED = {
52
+ space: "",
53
+ name: "",
54
+ servers: "",
55
+ subscribe: [],
56
+ allowSubscribe: [],
57
+ allowPublish: [],
58
+ kind: "agent",
59
+ tls: false,
60
+ };
61
+ /** `cotal_send`'s channel description is the one advertised text that names a configuration's
62
+ * default channel. Connections can read different channels, so the advertised text names none. */
63
+ const SEND_CHANNEL = "Channel to send on. Omit it to use this connection's default, the first concrete channel it reads and " +
64
+ "may post to (cotal_orientation lists both); with none, an omitted channel is refused. Concrete only, not " +
65
+ "a wildcard like team.>; reply on the channel you received a message on.";
66
+ const CONNECTION_ID = z
67
+ .string()
68
+ .min(1)
69
+ .describe("The connection_id cotal_connect returned in THIS conversation. Never reuse another conversation's.");
70
+ function toContent(r) {
71
+ const content = [{ type: "text", text: r.text }];
72
+ return r.isError ? { content, isError: true } : { content };
73
+ }
74
+ const refuse = (text) => toContent({ text, isError: true });
75
+ function errorText(e) {
76
+ return e instanceof Error ? e.message : String(e);
77
+ }
78
+ /** Focus @mentions per agent since a gateway read last cleared them. In `focus` an @mention is
79
+ * acked at ingest and recalled by the next `cotal_inbox`, so nothing buffered marks it, and one
80
+ * that arrives between two waits would otherwise end neither. */
81
+ const focusMentions = new WeakMap();
82
+ /** `agent`'s focus @mention count, counted from the first time the gateway asks. Attention reaches
83
+ * `focus` only through a gateway call, and every call asks, so the count starts in time. */
84
+ function mentionsOf(agent) {
85
+ let mentions = focusMentions.get(agent);
86
+ if (!mentions) {
87
+ const m = { count: 0 };
88
+ agent.on("mention-wake", () => (m.count += 1));
89
+ focusMentions.set(agent, (mentions = m));
90
+ }
91
+ return mentions;
92
+ }
93
+ /** What should wake a gateway connection: {@link MeshAgent.inboxWake}, the rule a local seat's push
94
+ * follows (direct messages, role requests and @mentions always, other channel traffic only in
95
+ * `open`), plus the focus @mentions it has not read. */
96
+ function wakeCount(agent) {
97
+ return agent.inboxWake() + mentionsOf(agent).count;
98
+ }
99
+ /**
100
+ * Resolve true once `agent` has something that should wake it, or false after `ms`, on abort, or
101
+ * when the agent stops.
102
+ *
103
+ * The SDK aborts `signal` when the request's connection closes, so a wait its client gave up on
104
+ * stops listening instead of taking the next message to a closed socket. The signal belongs to that
105
+ * one request, so its listener ends with the request and needs no removal. The handler awaits the
106
+ * host first, so the signal can already be aborted and the agent already stopped here, and neither
107
+ * then fires an event.
108
+ */
109
+ function waitForWake(agent, ms, signal) {
110
+ if (signal.aborted || agent.stopping)
111
+ return Promise.resolve(false);
112
+ if (wakeCount(agent) > 0)
113
+ return Promise.resolve(true);
114
+ return new Promise((resolve) => {
115
+ const check = () => {
116
+ if (wakeCount(agent) > 0)
117
+ finish(true);
118
+ };
119
+ const mentioned = () => finish(true);
120
+ const stopped = () => finish(false);
121
+ const abort = () => finish(false);
122
+ const timer = setTimeout(() => finish(false), ms);
123
+ function finish(woke) {
124
+ clearTimeout(timer);
125
+ agent.off("incoming", check);
126
+ agent.off("mention-wake", mentioned);
127
+ agent.off("stopping", stopped);
128
+ resolve(woke);
129
+ }
130
+ agent.on("incoming", check);
131
+ agent.on("mention-wake", mentioned);
132
+ agent.on("stopping", stopped);
133
+ signal.addEventListener("abort", abort, { once: true });
134
+ });
135
+ }
136
+ /** Run `spec` for a connection with the request's signal, so a read whose client is gone clears
137
+ * nothing. A `cotal_inbox` read that clears also clears the focus @mention count, since its recall
138
+ * carries them. */
139
+ async function runFor(spec, c, args, signal) {
140
+ const result = await spec.run(c.agent, c.config, parseToolArgs(spec, args), { signal });
141
+ if (spec.name === "cotal_inbox" && !args.peek && !signal.aborted)
142
+ mentionsOf(c.agent).count = 0;
143
+ return result;
144
+ }
145
+ /** The line every routed tool except `cotal_inbox` adds when messages are waiting, so a
146
+ * conversation that never polls still learns of them on its next call. */
147
+ function waitingNotice(agent) {
148
+ const n = wakeCount(agent);
149
+ if (!n)
150
+ return undefined;
151
+ return { type: "text", text: `${n} new message${n === 1 ? "" : "s"} waiting. Read ${n === 1 ? "it" : "them"} with cotal_inbox.` };
152
+ }
153
+ /**
154
+ * Register the remote surface on `server`: `cotal_connect`, `cotal_disconnect`, `cotal_wait`, and
155
+ * each tool in {@link GATEWAY_TOOLS} with a required `connection_id`.
156
+ *
157
+ * Each call is parsed and run against the spec built from that connection's own configuration, so a
158
+ * connection's channels and grants decide what the call does.
159
+ *
160
+ * A remote MCP client gives the server no way to start a turn, so a conversation hears a message
161
+ * only when it calls a tool. `cotal_wait` is the call that listens: it holds until a message
162
+ * arrives and then returns it, and every other routed tool says when messages are waiting.
163
+ */
164
+ export function registerCotalGatewayTools(server, host, source = "gateway", options = {}) {
165
+ const waitSeconds = options.waitSeconds ?? GATEWAY_WAIT_SECONDS;
166
+ if (!Number.isInteger(waitSeconds) || waitSeconds < 1) {
167
+ throw new Error(`waitSeconds must be a whole number of seconds, at least 1; got ${waitSeconds}`);
168
+ }
169
+ const wake = options.wake;
170
+ // Connections signalled and not read since, how many cotal_wait calls hold each one, and the
171
+ // check for each watched connection, which the rewake runs again.
172
+ const signalled = new WeakSet();
173
+ const holding = new WeakMap();
174
+ const watched = new Set();
175
+ wake?.attach?.(() => {
176
+ for (const fire of watched)
177
+ fire();
178
+ });
179
+ const watch = (c) => {
180
+ if (!wake)
181
+ return;
182
+ // Counted before `fire` runs, so a focus @mention is in the count `fire` reads.
183
+ mentionsOf(c.agent);
184
+ const fire = () => {
185
+ if (c.agent.stopping || signalled.has(c.agent) || (holding.get(c.agent) ?? 0) > 0 || wakeCount(c.agent) === 0)
186
+ return;
187
+ if (wake.signal(c))
188
+ signalled.add(c.agent);
189
+ };
190
+ watched.add(fire);
191
+ c.agent.on("incoming", fire);
192
+ c.agent.on("mention-wake", fire);
193
+ c.agent.once("stopping", () => {
194
+ watched.delete(fire);
195
+ c.agent.off("incoming", fire);
196
+ c.agent.off("mention-wake", fire);
197
+ });
198
+ };
199
+ server.registerTool("cotal_connect", {
200
+ title: "Cotal: connect this conversation",
201
+ description: "Join the Cotal mesh as a new agent for THIS conversation and return its connection_id. Call it once per " +
202
+ "conversation, keep the connection_id, and pass it on every other cotal_* call. If the name is taken, the " +
203
+ "next free name is chosen (name_2, name_3, ...) and reported. Never reuse a connection_id from another " +
204
+ "conversation, and call this again if you no longer have this conversation's connection_id.",
205
+ inputSchema: z.strictObject({
206
+ name: z.string().min(1).describe("The agent name to request, for example claude_web."),
207
+ }),
208
+ }, async ({ name }, extra) => {
209
+ let account;
210
+ try {
211
+ account = host.account(extra.authInfo);
212
+ }
213
+ catch (e) {
214
+ return refuse(`not authenticated: ${errorText(e)}`);
215
+ }
216
+ for (const candidate of gatewayNames(name)) {
217
+ // A name the mesh would refuse is the caller's to fix, not a collision to rename around.
218
+ try {
219
+ assertValidName(candidate);
220
+ }
221
+ catch (e) {
222
+ return refuse(`cotal_connect: ${errorText(e)}`);
223
+ }
224
+ try {
225
+ const c = await host.open(account, candidate);
226
+ watch(c);
227
+ const renamed = candidate === name ? "" : ` (${JSON.stringify(name)} was taken)`;
228
+ const listening = wake ? `\n${wake.listening()}` : "";
229
+ return toContent({
230
+ text: `Connected as ${c.config.name}${renamed}.\nconnection_id: ${c.id}\nPass this connection_id on every cotal_* call in this conversation.${listening}`,
231
+ });
232
+ }
233
+ catch (e) {
234
+ if (e instanceof NameTaken)
235
+ continue;
236
+ return refuse(`cotal_connect failed for ${JSON.stringify(candidate)}: ${errorText(e)}`);
237
+ }
238
+ }
239
+ return refuse(`cotal_connect: ${JSON.stringify(name)} and its next ${GATEWAY_NAME_ATTEMPTS - 1} variants are all taken. Choose another name.`);
240
+ });
241
+ server.registerTool("cotal_disconnect", {
242
+ title: "Cotal: disconnect this conversation",
243
+ description: "Leave the mesh for this conversation's connection. Other conversations stay connected.",
244
+ inputSchema: z.strictObject({ connection_id: CONNECTION_ID }),
245
+ }, async ({ connection_id }, extra) => {
246
+ let account;
247
+ try {
248
+ account = host.account(extra.authInfo);
249
+ }
250
+ catch (e) {
251
+ return refuse(`not authenticated: ${errorText(e)}`);
252
+ }
253
+ return (await host.close(account, connection_id))
254
+ ? toContent({ text: `Disconnected ${connection_id}.` })
255
+ : refuse(CONNECTION_REQUIRED);
256
+ });
257
+ server.registerTool("cotal_wait", {
258
+ title: "Cotal: wait for a message",
259
+ description: `Wait for a message to this connection, and return it as cotal_inbox would. It returns at once when one is ` +
260
+ `already waiting, and otherwise as soon as one arrives, or after at most ${waitSeconds} seconds with none. ` +
261
+ "Call it again to keep listening. Direct messages, role requests and @mentions always end the wait; other " +
262
+ "channel traffic ends it only in open attention (cotal_status sets attention).",
263
+ inputSchema: z.strictObject({
264
+ connection_id: CONNECTION_ID,
265
+ seconds: z
266
+ .number()
267
+ .int()
268
+ .min(1)
269
+ .max(waitSeconds)
270
+ .optional()
271
+ .describe(`The longest to wait, in seconds. Defaults to ${waitSeconds}, the most allowed.`),
272
+ }),
273
+ }, async ({ connection_id, seconds }, extra) => {
274
+ let account;
275
+ try {
276
+ account = host.account(extra.authInfo);
277
+ }
278
+ catch (e) {
279
+ return refuse(`not authenticated: ${errorText(e)}`);
280
+ }
281
+ const c = await host.find(account, connection_id);
282
+ if (!c)
283
+ return refuse(CONNECTION_REQUIRED);
284
+ const inbox = cotalToolSpecs(c.config, source, undefined, GATEWAY_TOOLS).find((s) => s.name === "cotal_inbox");
285
+ if (!inbox)
286
+ return refuse("cotal_wait is not available on this connection.");
287
+ const limit = seconds ?? waitSeconds;
288
+ holding.set(c.agent, (holding.get(c.agent) ?? 0) + 1);
289
+ let woke;
290
+ try {
291
+ woke = await waitForWake(c.agent, limit * 1000, extra.signal);
292
+ }
293
+ finally {
294
+ holding.set(c.agent, (holding.get(c.agent) ?? 1) - 1);
295
+ }
296
+ if (c.agent.stopping)
297
+ return refuse(CONNECTION_REQUIRED);
298
+ if (!woke) {
299
+ return toContent({ text: `No new messages in ${limit} second${limit === 1 ? "" : "s"}. Call cotal_wait again to keep listening.` });
300
+ }
301
+ signalled.delete(c.agent);
302
+ try {
303
+ return toContent(await runFor(inbox, c, {}, extra.signal));
304
+ }
305
+ catch (e) {
306
+ return refuse(errorText(e));
307
+ }
308
+ });
309
+ for (const spec of cotalToolSpecs(ADVERTISED, source, undefined, GATEWAY_TOOLS)) {
310
+ const channel = spec.name === "cotal_send" ? spec.schema.shape.channel : undefined;
311
+ const shape = channel ? spec.schema.extend({ channel: channel.describe(SEND_CHANNEL) }) : spec.schema;
312
+ server.registerTool(spec.name, {
313
+ title: spec.title,
314
+ description: `${spec.description} Requires this conversation's connection_id from cotal_connect.`,
315
+ inputSchema: shape.extend({ connection_id: CONNECTION_ID }),
316
+ }, async (args, extra) => {
317
+ const { connection_id, ...rest } = args;
318
+ let account;
319
+ try {
320
+ account = host.account(extra.authInfo);
321
+ }
322
+ catch (e) {
323
+ return refuse(`not authenticated: ${errorText(e)}`);
324
+ }
325
+ const c = await host.find(account, connection_id);
326
+ if (!c)
327
+ return refuse(CONNECTION_REQUIRED);
328
+ const own = cotalToolSpecs(c.config, source, undefined, GATEWAY_TOOLS).find((s) => s.name === spec.name);
329
+ // Unreachable while GATEWAY_TOOLS holds no capability-gated tool; a future one refuses here.
330
+ if (!own)
331
+ return refuse(`${spec.name} is not available on this connection.`);
332
+ let result;
333
+ if (spec.name === "cotal_inbox")
334
+ signalled.delete(c.agent);
335
+ try {
336
+ result = toContent(await runFor(own, c, rest, extra.signal));
337
+ }
338
+ catch (e) {
339
+ result = refuse(errorText(e));
340
+ }
341
+ // cotal_inbox already says what it left buffered.
342
+ const notice = spec.name === "cotal_inbox" ? undefined : waitingNotice(c.agent);
343
+ return notice ? { ...result, content: [...result.content, notice] } : result;
344
+ });
345
+ }
346
+ }
347
+ /** How a conversation hears messages when nothing can wake it: the last part of
348
+ * {@link GATEWAY_INSTRUCTIONS}. */
349
+ export const GATEWAY_LISTENING = "Messages reach you only when you call a tool: to listen, call cotal_wait, which returns as soon as a " +
350
+ "message arrives. When the person asks you to stay on Cotal or keep listening, call cotal_wait again each " +
351
+ "time it returns and handle each message as it arrives, until they ask you to stop.";
352
+ /** How a conversation joins and names its connection: the first part of {@link GATEWAY_INSTRUCTIONS}. */
353
+ export const GATEWAY_CONNECTING = "Cotal connects this conversation to the person's Cotal space. Call cotal_connect once with a short name " +
354
+ "for this conversation, then pass the returned connection_id on every other cotal tool call. Each " +
355
+ "conversation needs its own connection. Never reuse another conversation's connection_id.";
356
+ /** The server instructions {@link handleGatewayRequest} sends when the embedder gives none. */
357
+ export const GATEWAY_INSTRUCTIONS = `${GATEWAY_CONNECTING} ${GATEWAY_LISTENING}`;
358
+ /**
359
+ * Serve one HTTP request to a gateway endpoint with this package's own MCP server and Streamable
360
+ * HTTP transport. The embedder authenticates and routes. It never builds an MCP server, so its own
361
+ * SDK or zod version cannot disagree with the one these tools were written against.
362
+ *
363
+ * The endpoint is stateless. Each POST gets a fresh server and transport and a JSON response, so
364
+ * nothing survives between requests except what the host stores. There is no server-initiated
365
+ * stream and no session to end, so every other method answers 405, as the Streamable HTTP
366
+ * transport allows. A `cotal_wait` call holds its POST open for up to `waitSeconds`.
367
+ */
368
+ export async function handleGatewayRequest(host, r) {
369
+ if (r.req.method !== "POST") {
370
+ r.res
371
+ .writeHead(405, { allow: "POST", "content-type": "application/json" })
372
+ .end(JSON.stringify({ jsonrpc: "2.0", error: { code: -32000, message: "Method not allowed." }, id: null }));
373
+ return;
374
+ }
375
+ const server = new McpServer({ name: "cotal", version: "0.0.0" }, { instructions: r.instructions ?? GATEWAY_INSTRUCTIONS });
376
+ registerCotalGatewayTools(server, host, r.source, r.waitSeconds === undefined ? {} : { waitSeconds: r.waitSeconds });
377
+ const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined, enableJsonResponse: true });
378
+ r.res.on("close", () => {
379
+ void transport.close();
380
+ void server.close();
381
+ });
382
+ // The transport hands `req.auth` to each tool as `extra.authInfo`.
383
+ r.req.auth = r.auth;
384
+ await server.connect(transport);
385
+ await transport.handleRequest(r.req, r.res, r.body);
386
+ }
387
+ /**
388
+ * Serve the gateway surface over stdio with this package's own MCP server, for a client such as
389
+ * Claude Desktop that runs one local process for every conversation. A stdio request carries no
390
+ * authentication, so `host.account` receives `undefined` and names the local user. A client that
391
+ * cancels a call aborts its signal, as a closed HTTP request does.
392
+ */
393
+ export async function serveGatewayStdio(host, o = {}) {
394
+ const server = new McpServer({ name: "cotal", version: "0.0.0" }, { instructions: o.instructions ?? GATEWAY_INSTRUCTIONS });
395
+ registerCotalGatewayTools(server, host, o.source, {
396
+ ...(o.waitSeconds === undefined ? {} : { waitSeconds: o.waitSeconds }),
397
+ ...(o.wake ? { wake: o.wake } : {}),
398
+ });
399
+ await server.connect(new StdioServerTransport(o.input, o.output));
400
+ return { close: () => server.close() };
401
+ }
402
+ //# sourceMappingURL=gateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway.js","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAuC,MAAM,iBAAiB,CAAC;AAIrG;;;+CAG+C;AAC/C,MAAM,OAAO,SAAU,SAAQ,KAAK;IACb;IAArB,YAAqB,KAAa;QAChC,K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