@cotal-ai/connector-claude-code 0.8.1 → 0.8.2
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.
- package/dist/extension.d.ts.map +1 -1
- package/dist/extension.js +13 -4
- package/dist/extension.js.map +1 -1
- package/dist/hook.cjs +15 -272
- package/dist/mcp.cjs +83 -34
- package/dist/mcp.js +29 -18
- package/dist/mcp.js.map +1 -1
- package/package.json +3 -3
package/dist/extension.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAIA,OAAO,EAA2D,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAoB3I;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SAyG7B,CAAC"}
|
package/dist/extension.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { mkdtempSync
|
|
1
|
+
import { mkdtempSync } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { loadAgentFile, registry } from "@cotal-ai/core";
|
|
6
|
-
import { aclEnv, launchEnv, mcpServerEnvKeys } from "@cotal-ai/connector-core";
|
|
5
|
+
import { hardenPrivate, loadAgentFile, registry, writeSecretFile } from "@cotal-ai/core";
|
|
6
|
+
import { aclEnv, controlEndpoint, launchEnv, mcpServerEnvKeys } from "@cotal-ai/connector-core";
|
|
7
7
|
/** Name the cotal MCP server is registered under via --mcp-config (see buildLaunch). */
|
|
8
8
|
const MCP_SERVER_NAME = "cotal";
|
|
9
9
|
/** Channel ref for `--dangerously-load-development-channels`, which turns on the cotal MCP server's
|
|
@@ -37,6 +37,11 @@ export const claudeConnector = {
|
|
|
37
37
|
// The OS allow-list (PATH/HOME/TERM/…) is the only thing inherited from the manager env, plus
|
|
38
38
|
// — only when a shared server declares them via `${VAR}` — the named secrets it needs (mcpKeys,
|
|
39
39
|
// by name). The operator's unrelated secrets don't reach the child (P3).
|
|
40
|
+
// The session's local control endpoint: the in-process MCP server LISTENS on it (auth), and the
|
|
41
|
+
// lifecycle hooks (child processes of `claude`, which inherit this env) CONNECT to it. Both read
|
|
42
|
+
// path+token from the env — never recomputed from public identity — and the manager keeps the
|
|
43
|
+
// pair (returned as `control` below) to drive a cooperative shutdown on Windows.
|
|
44
|
+
const control = controlEndpoint(opts.space, opts.name);
|
|
40
45
|
const env = {
|
|
41
46
|
...launchEnv({ mcpKeys: mcpServerEnvKeys(shared) }),
|
|
42
47
|
...aclEnv(opts),
|
|
@@ -45,6 +50,8 @@ export const claudeConnector = {
|
|
|
45
50
|
// Force the connector to emit channel wake-nudges: Claude doesn't advertise the
|
|
46
51
|
// `claude/channel` capability back over MCP, so auto-detection would see it "off".
|
|
47
52
|
COTAL_CHANNEL: "1",
|
|
53
|
+
COTAL_CONTROL_SOCKET: control.path,
|
|
54
|
+
COTAL_CONTROL_TOKEN: control.token, // env only — never argv/logs/persisted (token hygiene)
|
|
48
55
|
};
|
|
49
56
|
// A session can mirror its own transcript to `tr-<name>` so peers can read what the
|
|
50
57
|
// agent actually did — OFF by default (transcripts are verbose and may carry sensitive
|
|
@@ -97,8 +104,9 @@ export const claudeConnector = {
|
|
|
97
104
|
// overwrite). Left for the OS to reap: the file must outlive this call (Claude reads it at
|
|
98
105
|
// startup and on /mcp reconnect), and buildLaunch doesn't own the child's lifecycle.
|
|
99
106
|
const dir = mkdtempSync(join(tmpdir(), "cotal-mcp-"));
|
|
107
|
+
hardenPrivate(dir, "dir"); // win32: mkdtemp's 0700 is a no-op — harden the ACL before the config lands
|
|
100
108
|
mcpConfig = join(dir, "mcp.json");
|
|
101
|
-
|
|
109
|
+
writeSecretFile(mcpConfig, JSON.stringify({ mcpServers }, null, 2));
|
|
102
110
|
}
|
|
103
111
|
args.push("--strict-mcp-config", "--mcp-config", mcpConfig);
|
|
104
112
|
// An agent file carries identity (read in-session via COTAL_AGENT_FILE) plus
|
|
@@ -122,6 +130,7 @@ export const claudeConnector = {
|
|
|
122
130
|
// The dev-channels flag shows a one-time "Enter to confirm" prompt; the
|
|
123
131
|
// manager auto-clears it so a supervised launch needs no human keypress.
|
|
124
132
|
confirm: "Enter to confirm",
|
|
133
|
+
control,
|
|
125
134
|
};
|
|
126
135
|
},
|
|
127
136
|
};
|
package/dist/extension.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAoD,MAAM,gBAAgB,CAAC;AAC3I,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEhG,wFAAwF;AACxF,MAAM,eAAe,GAAG,OAAO,CAAC;AAChC;;;;;+EAK+E;AAC/E,MAAM,WAAW,GAAG,UAAU,eAAe,EAAE,CAAC;AAEhD;qEACqE;AACrE,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAClE;0DAC0D;AAC1D,MAAM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-core/dist/config.js
|
|
14708
|
-
var import_node_os = require("node:os");
|
|
14709
|
-
var import_node_fs2 = require("node:fs");
|
|
14710
|
-
|
|
14711
|
-
// ../../packages/core/dist/subjects.js
|
|
14712
|
-
function isConcreteChannel(channel) {
|
|
14713
|
-
return !channel.split(".").some((s) => s.trim() === "*" || s.trim() === ">");
|
|
14714
|
-
}
|
|
14715
|
-
function subjectMatches(pattern, subject) {
|
|
14716
|
-
const p = pattern.split(".");
|
|
14717
|
-
const s = subject.split(".");
|
|
14718
|
-
for (let i = 0; i < p.length; i++) {
|
|
14719
|
-
if (p[i] === ">")
|
|
14720
|
-
return i < s.length;
|
|
14721
|
-
if (i >= s.length)
|
|
14722
|
-
return false;
|
|
14723
|
-
if (p[i] === "*")
|
|
14724
|
-
continue;
|
|
14725
|
-
if (p[i] !== s[i])
|
|
14726
|
-
return false;
|
|
14727
|
-
}
|
|
14728
|
-
return p.length === s.length;
|
|
14729
|
-
}
|
|
14730
|
-
function assertValidChannel(channel) {
|
|
14731
|
-
const segs = channel.split(".");
|
|
14732
|
-
if (!channel.length || segs.some((s) => s.length === 0))
|
|
14733
|
-
throw new Error(`invalid channel "${channel}": empty segment (no leading/trailing/double dots)`);
|
|
14734
|
-
segs.forEach((s, i) => {
|
|
14735
|
-
if (s === ">") {
|
|
14736
|
-
if (i !== segs.length - 1)
|
|
14737
|
-
throw new Error(`invalid channel "${channel}": '>' is only valid as the last segment`);
|
|
14738
|
-
return;
|
|
14739
|
-
}
|
|
14740
|
-
if (s === "*")
|
|
14741
|
-
return;
|
|
14742
|
-
if (!/^[A-Za-z0-9_-]+$/.test(s))
|
|
14743
|
-
throw new Error(`invalid channel "${channel}": segment "${s}" must be a NATS-safe token ([A-Za-z0-9_-]), '*', or '>' \u2014 policy channel names can't contain characters the wire layer would rewrite`);
|
|
14744
|
-
});
|
|
14745
|
-
return channel;
|
|
14746
|
-
}
|
|
14747
|
-
function channelInAllow(allow, channel) {
|
|
14748
|
-
return allow.some((a) => subjectMatches(a, channel));
|
|
14749
|
-
}
|
|
14750
|
-
|
|
14751
|
-
// ../../packages/core/dist/resolve.js
|
|
14752
|
-
function assertValidName(name) {
|
|
14753
|
-
if (name.length === 0 || name !== name.trim())
|
|
14754
|
-
throw new Error(`invalid name ${JSON.stringify(name)}: must be non-empty with no surrounding whitespace`);
|
|
14755
|
-
if (/[\r\n]/.test(name))
|
|
14756
|
-
throw new Error(`invalid name ${JSON.stringify(name)}: must be a single line`);
|
|
14757
|
-
if (name.includes("/"))
|
|
14758
|
-
throw new Error(`invalid name ${JSON.stringify(name)}: "/" is reserved (the owner/name separator)`);
|
|
14759
|
-
}
|
|
14760
|
-
|
|
14761
|
-
// ../../packages/core/dist/link.js
|
|
14762
|
-
function parseJoinLink(link) {
|
|
14763
|
-
const tls = link.startsWith("cotals://");
|
|
14764
|
-
if (!tls && !link.startsWith("cotal://"))
|
|
14765
|
-
throw new Error(`not a Cotal link (expected cotal:// or cotals://): ${link}`);
|
|
14766
|
-
const u = new URL(link.replace(/^cotals?:\/\//, tls ? "https://" : "http://"));
|
|
14767
|
-
if (!u.hostname)
|
|
14768
|
-
throw new Error(`Cotal link has no host: ${link}`);
|
|
14769
|
-
const space = decodeURIComponent(u.pathname.replace(/^\/+/, "").split("/")[0] ?? "");
|
|
14770
|
-
if (!space)
|
|
14771
|
-
throw new Error(`Cotal link has no space (cotal://host/<space>): ${link}`);
|
|
14772
|
-
const chParam = u.searchParams.get("channels") ?? u.searchParams.get("channel");
|
|
14773
|
-
const channels = chParam ? chParam.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
|
|
14774
|
-
const user = u.username ? decodeURIComponent(u.username) : void 0;
|
|
14775
|
-
const pass = u.password ? decodeURIComponent(u.password) : void 0;
|
|
14776
|
-
return {
|
|
14777
|
-
servers: `nats://${u.hostname}:${u.port || "4222"}`,
|
|
14778
|
-
space,
|
|
14779
|
-
channels,
|
|
14780
|
-
tls,
|
|
14781
|
-
// userinfo with no ':' is a bare token; with ':' it's user/password.
|
|
14782
|
-
token: user && !pass ? user : void 0,
|
|
14783
|
-
user: pass ? user : void 0,
|
|
14784
|
-
pass: pass || void 0
|
|
14785
|
-
};
|
|
14786
|
-
}
|
|
14787
|
-
|
|
14788
14707
|
// ../../packages/core/dist/identity.js
|
|
14789
14708
|
var import_nkeys = __toESM(require_mod(), 1);
|
|
14790
14709
|
|
|
@@ -16435,123 +16354,13 @@ var import_kv5 = __toESM(require_mod6(), 1);
|
|
|
16435
16354
|
var import_kv6 = __toESM(require_mod6(), 1);
|
|
16436
16355
|
var import_transport_node4 = __toESM(require_transport_node(), 1);
|
|
16437
16356
|
|
|
16438
|
-
// ../../packages/core/dist/
|
|
16439
|
-
var
|
|
16440
|
-
function unquote(v) {
|
|
16441
|
-
if (v.startsWith('"') && v.endsWith('"') || v.startsWith("'") && v.endsWith("'"))
|
|
16442
|
-
return v.slice(1, -1);
|
|
16443
|
-
return v;
|
|
16444
|
-
}
|
|
16445
|
-
function parseFrontmatter(src) {
|
|
16446
|
-
const out = {};
|
|
16447
|
-
for (const raw of src.split("\n")) {
|
|
16448
|
-
const line = raw.trim();
|
|
16449
|
-
if (!line || line.startsWith("#"))
|
|
16450
|
-
continue;
|
|
16451
|
-
const colon = line.indexOf(":");
|
|
16452
|
-
if (colon < 1)
|
|
16453
|
-
throw new Error(`agent file: unparseable frontmatter line "${raw}"`);
|
|
16454
|
-
const key = line.slice(0, colon).trim();
|
|
16455
|
-
const val = line.slice(colon + 1).trim();
|
|
16456
|
-
if (val.startsWith("[")) {
|
|
16457
|
-
if (!val.endsWith("]"))
|
|
16458
|
-
throw new Error(`agent file: unterminated list for "${key}"`);
|
|
16459
|
-
out[key] = val.slice(1, -1).split(",").map((s) => unquote(s.trim())).filter(Boolean);
|
|
16460
|
-
} else {
|
|
16461
|
-
out[key] = unquote(val);
|
|
16462
|
-
}
|
|
16463
|
-
}
|
|
16464
|
-
return out;
|
|
16465
|
-
}
|
|
16466
|
-
function loadAgentFile(path) {
|
|
16467
|
-
const src = (0, import_node_fs.readFileSync)(path, "utf8");
|
|
16468
|
-
const m = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(src);
|
|
16469
|
-
if (!m)
|
|
16470
|
-
throw new Error(`agent file ${path}: missing "---" frontmatter block`);
|
|
16471
|
-
const fm = parseFrontmatter(m[1]);
|
|
16472
|
-
const persona = m[2].trim();
|
|
16473
|
-
const str = (k) => {
|
|
16474
|
-
const v = fm[k];
|
|
16475
|
-
if (Array.isArray(v))
|
|
16476
|
-
throw new Error(`agent file ${path}: "${k}" must be a scalar`);
|
|
16477
|
-
return v;
|
|
16478
|
-
};
|
|
16479
|
-
const list = (k) => {
|
|
16480
|
-
const v = fm[k];
|
|
16481
|
-
if (v === void 0)
|
|
16482
|
-
return void 0;
|
|
16483
|
-
return Array.isArray(v) ? v : [v];
|
|
16484
|
-
};
|
|
16485
|
-
const name = str("name");
|
|
16486
|
-
if (!name)
|
|
16487
|
-
throw new Error(`agent file ${path}: "name" is required`);
|
|
16488
|
-
assertValidName(name);
|
|
16489
|
-
const kind = str("kind");
|
|
16490
|
-
if (kind && kind !== "agent" && kind !== "endpoint")
|
|
16491
|
-
throw new Error(`agent file ${path}: "kind" must be "agent" or "endpoint"`);
|
|
16492
|
-
for (const old of ["channels", "publish"])
|
|
16493
|
-
if (old in fm)
|
|
16494
|
-
throw new Error(`agent file ${path}: "${old}" was renamed \u2014 use "subscribe"/"allowSubscribe" (read) and "allowPublish" (post)`);
|
|
16495
|
-
const subscribe = list("subscribe");
|
|
16496
|
-
const allowSubscribe = list("allowSubscribe");
|
|
16497
|
-
const allowPublish = list("allowPublish");
|
|
16498
|
-
const quiet = list("quiet");
|
|
16499
|
-
const muted = list("muted");
|
|
16500
|
-
for (const ch of [...subscribe ?? [], ...allowSubscribe ?? [], ...allowPublish ?? []])
|
|
16501
|
-
try {
|
|
16502
|
-
assertValidChannel(ch);
|
|
16503
|
-
} catch (e) {
|
|
16504
|
-
throw new Error(`agent file ${path}: ${e.message}`);
|
|
16505
|
-
}
|
|
16506
|
-
const effSubscribe = subscribe?.length ? subscribe : ["general"];
|
|
16507
|
-
const effAllow = allowSubscribe?.length ? allowSubscribe : effSubscribe;
|
|
16508
|
-
for (const ch of effSubscribe)
|
|
16509
|
-
if (!channelInAllow(effAllow, ch))
|
|
16510
|
-
throw new Error(`agent file ${path}: subscribe channel "${ch}" is not within allowSubscribe [${effAllow.join(", ")}]`);
|
|
16511
|
-
const both = (quiet ?? []).filter((c) => (muted ?? []).includes(c));
|
|
16512
|
-
if (both.length)
|
|
16513
|
-
throw new Error(`agent file ${path}: channel(s) [${both.join(", ")}] are in both quiet and muted \u2014 pick one`);
|
|
16514
|
-
for (const [field, chans] of [["quiet", quiet], ["muted", muted]])
|
|
16515
|
-
for (const ch of chans ?? []) {
|
|
16516
|
-
try {
|
|
16517
|
-
assertValidChannel(ch);
|
|
16518
|
-
} catch (e) {
|
|
16519
|
-
throw new Error(`agent file ${path}: ${e.message}`);
|
|
16520
|
-
}
|
|
16521
|
-
if (!isConcreteChannel(ch))
|
|
16522
|
-
throw new Error(`agent file ${path}: ${field} channel "${ch}" must be a concrete channel (no wildcard)`);
|
|
16523
|
-
if (!channelInAllow(effAllow, ch))
|
|
16524
|
-
throw new Error(`agent file ${path}: ${field} channel "${ch}" is not within your read ACL / allowSubscribe [${effAllow.join(", ")}]`);
|
|
16525
|
-
}
|
|
16526
|
-
const known = /* @__PURE__ */ new Set(["name", "role", "kind", "description", "tags", "subscribe", "allowSubscribe", "allowPublish", "quiet", "muted", "model", "capabilities", "owner"]);
|
|
16527
|
-
const meta = {};
|
|
16528
|
-
for (const [k, v] of Object.entries(fm))
|
|
16529
|
-
if (!known.has(k) && typeof v === "string")
|
|
16530
|
-
meta[k] = v;
|
|
16531
|
-
return {
|
|
16532
|
-
name,
|
|
16533
|
-
role: str("role"),
|
|
16534
|
-
kind,
|
|
16535
|
-
description: str("description"),
|
|
16536
|
-
tags: list("tags"),
|
|
16537
|
-
subscribe,
|
|
16538
|
-
allowSubscribe,
|
|
16539
|
-
allowPublish,
|
|
16540
|
-
quiet,
|
|
16541
|
-
muted,
|
|
16542
|
-
model: str("model"),
|
|
16543
|
-
capabilities: list("capabilities"),
|
|
16544
|
-
owner: str("owner"),
|
|
16545
|
-
meta: Object.keys(meta).length ? meta : void 0,
|
|
16546
|
-
persona: persona || void 0
|
|
16547
|
-
};
|
|
16548
|
-
}
|
|
16357
|
+
// ../../packages/core/dist/secret-fs.js
|
|
16358
|
+
var isWin = process.platform === "win32";
|
|
16549
16359
|
|
|
16550
16360
|
// ../../packages/core/dist/endpoint.js
|
|
16551
16361
|
var import_transport_node5 = __toESM(require_transport_node(), 1);
|
|
16552
16362
|
var import_jetstream2 = __toESM(require_mod4(), 1);
|
|
16553
16363
|
var import_kv7 = __toESM(require_mod6(), 1);
|
|
16554
|
-
var DEFAULT_SERVER = "nats://127.0.0.1:4222";
|
|
16555
16364
|
|
|
16556
16365
|
// ../../packages/core/dist/spaces.js
|
|
16557
16366
|
var import_transport_node6 = __toESM(require_transport_node(), 1);
|
|
@@ -16585,86 +16394,12 @@ var Registry = class {
|
|
|
16585
16394
|
var registry = new Registry();
|
|
16586
16395
|
|
|
16587
16396
|
// ../connector-core/dist/config.js
|
|
16588
|
-
function splitList(v) {
|
|
16589
|
-
if (!v)
|
|
16590
|
-
return [];
|
|
16591
|
-
return v.split(",").map((s) => s.trim()).filter(Boolean);
|
|
16592
|
-
}
|
|
16593
16397
|
function hasIdentity(env = process.env) {
|
|
16594
16398
|
return Boolean(env.COTAL_NAME?.trim() || env.COTAL_LINK?.trim() || env.COTAL_AGENT_FILE?.trim());
|
|
16595
16399
|
}
|
|
16596
|
-
function configFromEnv(env = process.env) {
|
|
16597
|
-
const link = env.COTAL_LINK?.trim() ? parseJoinLink(env.COTAL_LINK.trim()) : void 0;
|
|
16598
|
-
const def = env.COTAL_AGENT_FILE?.trim() ? loadAgentFile(env.COTAL_AGENT_FILE.trim()) : void 0;
|
|
16599
|
-
const name = env.COTAL_NAME?.trim() || def?.name || (link ? (0, import_node_os.userInfo)().username : void 0);
|
|
16600
|
-
if (!name)
|
|
16601
|
-
throw new Error("COTAL_NAME, COTAL_AGENT_FILE or COTAL_LINK is required \u2014 a Cotal session needs an explicit identity from its launcher");
|
|
16602
|
-
const subscribe = splitList(env.COTAL_SUBSCRIBE);
|
|
16603
|
-
const resolvedSubscribe = subscribe.length ? subscribe : def?.subscribe ?? link?.channels ?? ["general"];
|
|
16604
|
-
const allowSub = splitList(env.COTAL_ALLOW_SUBSCRIBE);
|
|
16605
|
-
const resolvedAllowSub = allowSub.length ? allowSub : def?.allowSubscribe ?? resolvedSubscribe;
|
|
16606
|
-
for (const ch of resolvedSubscribe)
|
|
16607
|
-
if (!channelInAllow(resolvedAllowSub, ch))
|
|
16608
|
-
throw new Error(`COTAL config: subscribe channel "${ch}" is not within allowSubscribe [${resolvedAllowSub.join(", ")}]`);
|
|
16609
|
-
const allowPub = splitList(env.COTAL_ALLOW_PUBLISH);
|
|
16610
|
-
const resolvedAllowPub = allowPub.length ? allowPub : def?.allowPublish ?? [];
|
|
16611
|
-
for (const ch of [...resolvedSubscribe, ...resolvedAllowSub, ...resolvedAllowPub])
|
|
16612
|
-
assertValidChannel(ch);
|
|
16613
|
-
const qEnv = splitList(env.COTAL_QUIET), mEnv = splitList(env.COTAL_MUTED);
|
|
16614
|
-
const resolvedQuiet = qEnv.length ? qEnv : def?.quiet ?? [];
|
|
16615
|
-
const resolvedMuted = mEnv.length ? mEnv : def?.muted ?? [];
|
|
16616
|
-
const bothModes = resolvedQuiet.filter((c) => resolvedMuted.includes(c));
|
|
16617
|
-
if (bothModes.length)
|
|
16618
|
-
throw new Error(`COTAL config: channel(s) [${bothModes.join(", ")}] are in both quiet and muted`);
|
|
16619
|
-
for (const [field, chans] of [["quiet", resolvedQuiet], ["muted", resolvedMuted]])
|
|
16620
|
-
for (const ch of chans) {
|
|
16621
|
-
assertValidChannel(ch);
|
|
16622
|
-
if (!isConcreteChannel(ch))
|
|
16623
|
-
throw new Error(`COTAL config: ${field} channel "${ch}" must be concrete (no wildcard)`);
|
|
16624
|
-
if (!channelInAllow(resolvedAllowSub, ch))
|
|
16625
|
-
throw new Error(`COTAL config: ${field} channel "${ch}" is not within allowSubscribe [${resolvedAllowSub.join(", ")}]`);
|
|
16626
|
-
}
|
|
16627
|
-
const credsPath = env.COTAL_CREDS?.trim();
|
|
16628
|
-
return {
|
|
16629
|
-
space: env.COTAL_SPACE?.trim() || link?.space || "demo",
|
|
16630
|
-
id: env.COTAL_ID?.trim() || void 0,
|
|
16631
|
-
creds: credsPath ? (0, import_node_fs2.readFileSync)(credsPath, "utf8") : void 0,
|
|
16632
|
-
name,
|
|
16633
|
-
role: env.COTAL_ROLE?.trim() || def?.role || void 0,
|
|
16634
|
-
description: def?.description,
|
|
16635
|
-
tags: def?.tags,
|
|
16636
|
-
meta: def?.meta,
|
|
16637
|
-
capabilities: def?.capabilities,
|
|
16638
|
-
model: env.COTAL_MODEL?.trim() || def?.model || void 0,
|
|
16639
|
-
servers: env.COTAL_SERVERS?.trim() || link?.servers || DEFAULT_SERVER,
|
|
16640
|
-
subscribe: resolvedSubscribe,
|
|
16641
|
-
allowSubscribe: resolvedAllowSub,
|
|
16642
|
-
// Post ACL is default-DENY: only what's explicitly declared (env > agent-file). The broker
|
|
16643
|
-
// enforces it under auth; in open mode posting is unrestricted regardless.
|
|
16644
|
-
allowPublish: resolvedAllowPub,
|
|
16645
|
-
quiet: resolvedQuiet,
|
|
16646
|
-
muted: resolvedMuted,
|
|
16647
|
-
kind: env.COTAL_KIND?.trim() || def?.kind || "agent",
|
|
16648
|
-
token: env.COTAL_TOKEN?.trim() || link?.token,
|
|
16649
|
-
user: link?.user,
|
|
16650
|
-
pass: link?.pass,
|
|
16651
|
-
tls: env.COTAL_TLS?.trim() === "1" || link?.tls || false,
|
|
16652
|
-
feedbackKey: env.COTAL_FEEDBACK_KEY?.trim() || void 0,
|
|
16653
|
-
feedbackUrl: env.COTAL_FEEDBACK_URL?.trim() || void 0
|
|
16654
|
-
};
|
|
16655
|
-
}
|
|
16656
16400
|
|
|
16657
|
-
// ../connector-core/dist/
|
|
16658
|
-
var
|
|
16659
|
-
var import_node_path = require("node:path");
|
|
16660
|
-
var ILLEGAL = /[^A-Za-z0-9_-]/g;
|
|
16661
|
-
function tok(s) {
|
|
16662
|
-
const t = s.trim().replace(ILLEGAL, "_");
|
|
16663
|
-
return t.length ? t.slice(0, 40) : "_";
|
|
16664
|
-
}
|
|
16665
|
-
function controlSocketPath(space, name) {
|
|
16666
|
-
return (0, import_node_path.join)((0, import_node_os2.tmpdir)(), `cotal-${tok(space)}-${tok(name)}.sock`);
|
|
16667
|
-
}
|
|
16401
|
+
// ../connector-core/dist/control.js
|
|
16402
|
+
var MAX_FRAME_BYTES = 1 << 20;
|
|
16668
16403
|
|
|
16669
16404
|
// ../connector-core/dist/relay.js
|
|
16670
16405
|
var import_node_net = require("node:net");
|
|
@@ -16690,9 +16425,17 @@ function done(out) {
|
|
|
16690
16425
|
async function runHookRelay() {
|
|
16691
16426
|
if (!hasIdentity())
|
|
16692
16427
|
return done("");
|
|
16428
|
+
const path = process.env.COTAL_CONTROL_SOCKET;
|
|
16429
|
+
const token2 = process.env.COTAL_CONTROL_TOKEN;
|
|
16430
|
+
if (!path || !token2)
|
|
16431
|
+
return done("");
|
|
16693
16432
|
const raw = (await readStdin()).trim() || "{}";
|
|
16694
|
-
|
|
16695
|
-
|
|
16433
|
+
let event = {};
|
|
16434
|
+
try {
|
|
16435
|
+
event = JSON.parse(raw);
|
|
16436
|
+
} catch {
|
|
16437
|
+
}
|
|
16438
|
+
const sock = (0, import_node_net.connect)(path);
|
|
16696
16439
|
let reply = "";
|
|
16697
16440
|
let settled = false;
|
|
16698
16441
|
const finish = (out) => {
|
|
@@ -16707,7 +16450,7 @@ async function runHookRelay() {
|
|
|
16707
16450
|
};
|
|
16708
16451
|
const timer = setTimeout(() => finish(""), TIMEOUT_MS);
|
|
16709
16452
|
sock.setEncoding("utf8");
|
|
16710
|
-
sock.on("connect", () => sock.write(
|
|
16453
|
+
sock.on("connect", () => sock.write(JSON.stringify({ token: token2, event }) + "\n"));
|
|
16711
16454
|
sock.on("data", (d) => {
|
|
16712
16455
|
reply += d;
|
|
16713
16456
|
const nl = reply.indexOf("\n");
|
package/dist/mcp.cjs
CHANGED
|
@@ -45862,6 +45862,8 @@ function assertValidName(name) {
|
|
|
45862
45862
|
throw new Error(`invalid name ${JSON.stringify(name)}: must be a single line`);
|
|
45863
45863
|
if (name.includes("/"))
|
|
45864
45864
|
throw new Error(`invalid name ${JSON.stringify(name)}: "/" is reserved (the owner/name separator)`);
|
|
45865
|
+
if (name.includes("\\"))
|
|
45866
|
+
throw new Error(`invalid name ${JSON.stringify(name)}: "\\" is reserved (a Windows path separator)`);
|
|
45865
45867
|
}
|
|
45866
45868
|
|
|
45867
45869
|
// ../../packages/core/dist/link.js
|
|
@@ -47956,6 +47958,9 @@ function loadAgentFile(path) {
|
|
|
47956
47958
|
};
|
|
47957
47959
|
}
|
|
47958
47960
|
|
|
47961
|
+
// ../../packages/core/dist/secret-fs.js
|
|
47962
|
+
var isWin = process.platform === "win32";
|
|
47963
|
+
|
|
47959
47964
|
// ../../packages/core/dist/endpoint.js
|
|
47960
47965
|
var import_node_events = require("node:events");
|
|
47961
47966
|
var import_node_crypto = require("node:crypto");
|
|
@@ -50809,18 +50814,6 @@ ${lines.join("\n")}`;
|
|
|
50809
50814
|
}
|
|
50810
50815
|
};
|
|
50811
50816
|
|
|
50812
|
-
// ../connector-core/dist/runtime.js
|
|
50813
|
-
var import_node_os2 = require("node:os");
|
|
50814
|
-
var import_node_path = require("node:path");
|
|
50815
|
-
var ILLEGAL2 = /[^A-Za-z0-9_-]/g;
|
|
50816
|
-
function tok(s) {
|
|
50817
|
-
const t = s.trim().replace(ILLEGAL2, "_");
|
|
50818
|
-
return t.length ? t.slice(0, 40) : "_";
|
|
50819
|
-
}
|
|
50820
|
-
function controlSocketPath(space, name) {
|
|
50821
|
-
return (0, import_node_path.join)((0, import_node_os2.tmpdir)(), `cotal-${tok(space)}-${tok(name)}.sock`);
|
|
50822
|
-
}
|
|
50823
|
-
|
|
50824
50817
|
// ../connector-core/dist/tool-specs.js
|
|
50825
50818
|
var import_node_child_process = require("node:child_process");
|
|
50826
50819
|
|
|
@@ -51363,6 +51356,14 @@ function registerCotalTools(server, agent, config2, source) {
|
|
|
51363
51356
|
// ../connector-core/dist/control.js
|
|
51364
51357
|
var import_node_net = require("node:net");
|
|
51365
51358
|
var import_node_fs3 = require("node:fs");
|
|
51359
|
+
var import_node_crypto2 = require("node:crypto");
|
|
51360
|
+
var MAX_FRAME_BYTES = 1 << 20;
|
|
51361
|
+
var AUTH_DEADLINE_MS = 5e3;
|
|
51362
|
+
function tokenMatches(presented, digest) {
|
|
51363
|
+
if (typeof presented !== "string")
|
|
51364
|
+
return false;
|
|
51365
|
+
return (0, import_node_crypto2.timingSafeEqual)((0, import_node_crypto2.createHash)("sha256").update(presented).digest(), digest);
|
|
51366
|
+
}
|
|
51366
51367
|
function who(i) {
|
|
51367
51368
|
return i.fromRole ? `${i.fromName}/${i.fromRole}` : i.fromName;
|
|
51368
51369
|
}
|
|
@@ -51383,26 +51384,53 @@ function formatInjection(items) {
|
|
|
51383
51384
|
${items.map(fmtItem2).join("\n")}
|
|
51384
51385
|
${tail}`;
|
|
51385
51386
|
}
|
|
51386
|
-
function startControlServer(agent,
|
|
51387
|
-
|
|
51387
|
+
function startControlServer(agent, endpoint, handle, opts = {}) {
|
|
51388
|
+
const { path } = endpoint;
|
|
51389
|
+
const digest = (0, import_node_crypto2.createHash)("sha256").update(endpoint.token).digest();
|
|
51390
|
+
if (process.platform !== "win32" && (0, import_node_fs3.existsSync)(path)) {
|
|
51388
51391
|
try {
|
|
51389
|
-
(0, import_node_fs3.unlinkSync)(
|
|
51392
|
+
(0, import_node_fs3.unlinkSync)(path);
|
|
51390
51393
|
} catch {
|
|
51391
51394
|
}
|
|
51392
51395
|
}
|
|
51393
51396
|
const server = (0, import_node_net.createServer)((sock) => {
|
|
51394
51397
|
let buf = "";
|
|
51398
|
+
let handled = false;
|
|
51395
51399
|
sock.setEncoding("utf8");
|
|
51400
|
+
const deadline = setTimeout(() => sock.destroy(), AUTH_DEADLINE_MS);
|
|
51401
|
+
deadline.unref?.();
|
|
51402
|
+
sock.on("close", () => clearTimeout(deadline));
|
|
51396
51403
|
sock.on("data", async (d) => {
|
|
51404
|
+
if (handled)
|
|
51405
|
+
return;
|
|
51397
51406
|
buf += d;
|
|
51407
|
+
if (buf.length > MAX_FRAME_BYTES) {
|
|
51408
|
+
sock.destroy();
|
|
51409
|
+
return;
|
|
51410
|
+
}
|
|
51398
51411
|
const nl = buf.indexOf("\n");
|
|
51399
51412
|
if (nl < 0)
|
|
51400
51413
|
return;
|
|
51401
|
-
|
|
51414
|
+
handled = true;
|
|
51415
|
+
clearTimeout(deadline);
|
|
51416
|
+
let frame = {};
|
|
51402
51417
|
try {
|
|
51403
|
-
|
|
51418
|
+
frame = JSON.parse(buf.slice(0, nl) || "{}");
|
|
51404
51419
|
} catch {
|
|
51405
51420
|
}
|
|
51421
|
+
if (!tokenMatches(frame.token, digest)) {
|
|
51422
|
+
sock.destroy();
|
|
51423
|
+
return;
|
|
51424
|
+
}
|
|
51425
|
+
if (frame.op === "shutdown") {
|
|
51426
|
+
try {
|
|
51427
|
+
sock.end(JSON.stringify({ ok: true }) + "\n");
|
|
51428
|
+
} catch {
|
|
51429
|
+
}
|
|
51430
|
+
opts.onShutdown?.();
|
|
51431
|
+
return;
|
|
51432
|
+
}
|
|
51433
|
+
const ev = frame.event ?? {};
|
|
51406
51434
|
const reply = await handle(agent, ev);
|
|
51407
51435
|
try {
|
|
51408
51436
|
sock.end(JSON.stringify(reply) + "\n");
|
|
@@ -51412,10 +51440,18 @@ function startControlServer(agent, socketPath, handle) {
|
|
|
51412
51440
|
sock.on("error", () => {
|
|
51413
51441
|
});
|
|
51414
51442
|
});
|
|
51415
|
-
|
|
51416
|
-
|
|
51417
|
-
|
|
51418
|
-
`)
|
|
51443
|
+
let bound = false;
|
|
51444
|
+
server.on("error", (e) => {
|
|
51445
|
+
process.stderr.write(`[cotal-connector] control server error: ${e.message}
|
|
51446
|
+
`);
|
|
51447
|
+
if (opts.fatalBind && !bound)
|
|
51448
|
+
process.exit(1);
|
|
51449
|
+
});
|
|
51450
|
+
server.listen(path, () => {
|
|
51451
|
+
bound = true;
|
|
51452
|
+
process.stderr.write(`[cotal-connector] control socket: ${path}
|
|
51453
|
+
`);
|
|
51454
|
+
});
|
|
51419
51455
|
return server;
|
|
51420
51456
|
}
|
|
51421
51457
|
|
|
@@ -51649,8 +51685,32 @@ async function main() {
|
|
|
51649
51685
|
agent.start();
|
|
51650
51686
|
if (/^(1|true|yes|on)$/i.test(process.env.COTAL_TRANSCRIPT ?? ""))
|
|
51651
51687
|
mirror = new TranscriptMirror(agent, transcriptChannel(config2.name));
|
|
51652
|
-
const
|
|
51653
|
-
const
|
|
51688
|
+
const controlPath = process.env.COTAL_CONTROL_SOCKET;
|
|
51689
|
+
const controlToken = process.env.COTAL_CONTROL_TOKEN;
|
|
51690
|
+
if (!controlPath || !controlToken) {
|
|
51691
|
+
process.stderr.write(
|
|
51692
|
+
"[cotal-connector] managed session missing COTAL_CONTROL_SOCKET/COTAL_CONTROL_TOKEN \u2014 cannot serve the control plane\n"
|
|
51693
|
+
);
|
|
51694
|
+
process.exit(1);
|
|
51695
|
+
}
|
|
51696
|
+
let controlServer;
|
|
51697
|
+
const shutdown = async () => {
|
|
51698
|
+
try {
|
|
51699
|
+
controlServer?.close();
|
|
51700
|
+
} catch {
|
|
51701
|
+
}
|
|
51702
|
+
try {
|
|
51703
|
+
await agent.stop();
|
|
51704
|
+
} finally {
|
|
51705
|
+
process.exit(0);
|
|
51706
|
+
}
|
|
51707
|
+
};
|
|
51708
|
+
controlServer = startControlServer(
|
|
51709
|
+
agent,
|
|
51710
|
+
{ path: controlPath, token: controlToken },
|
|
51711
|
+
claudeHandle,
|
|
51712
|
+
{ fatalBind: true, onShutdown: () => void shutdown() }
|
|
51713
|
+
);
|
|
51654
51714
|
const server = new McpServer(
|
|
51655
51715
|
{ name: "cotal", version: "0.0.0" },
|
|
51656
51716
|
{
|
|
@@ -51683,17 +51743,6 @@ async function main() {
|
|
|
51683
51743
|
(item) => nudge(item, `You were mentioned by ${fmtFrom(item)} on #${item.channel ?? "?"} \u2014 pull it with cotal_inbox.`)
|
|
51684
51744
|
);
|
|
51685
51745
|
agent.on("wake", () => nudge());
|
|
51686
|
-
const shutdown = async () => {
|
|
51687
|
-
try {
|
|
51688
|
-
controlServer.close();
|
|
51689
|
-
} catch {
|
|
51690
|
-
}
|
|
51691
|
-
try {
|
|
51692
|
-
await agent.stop();
|
|
51693
|
-
} finally {
|
|
51694
|
-
process.exit(0);
|
|
51695
|
-
}
|
|
51696
|
-
};
|
|
51697
51746
|
process.on("SIGINT", () => void shutdown());
|
|
51698
51747
|
process.on("SIGTERM", () => void shutdown());
|
|
51699
51748
|
const transport = new StdioServerTransport();
|
package/dist/mcp.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
12
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
13
|
-
import { configFromEnv, hasIdentity, MeshAgent,
|
|
13
|
+
import { configFromEnv, hasIdentity, MeshAgent, startControlServer, registerCotalTools, feedbackLine, ORIENTATION_BOOTSTRAP, formatInjection, fmtFrom, channelMeta, } from "@cotal-ai/connector-core";
|
|
14
14
|
import { TranscriptMirror, transcriptChannel } from "./transcript.js";
|
|
15
15
|
/** Mirrors this session's transcript to `tr-<name>` — set in main() iff COTAL_TRANSCRIPT
|
|
16
16
|
* is on (buildLaunch sets it for managed sessions; personal sessions never mirror). */
|
|
@@ -119,9 +119,34 @@ async function main() {
|
|
|
119
119
|
agent.start(); // background connect with retry — never blocks tool serving
|
|
120
120
|
if (/^(1|true|yes|on)$/i.test(process.env.COTAL_TRANSCRIPT ?? ""))
|
|
121
121
|
mirror = new TranscriptMirror(agent, transcriptChannel(config.name));
|
|
122
|
-
// Local control plane for the lifecycle hooks (presence + message injection)
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
// Local control plane for the lifecycle hooks (presence + message injection) and the manager's
|
|
123
|
+
// cooperative shutdown. Path + token come from the launch env (buildLaunch set them, and the hooks
|
|
124
|
+
// inherit this process's env) — a managed session without them is misconfigured, so fail loud
|
|
125
|
+
// rather than serve an unauthenticated/no control plane.
|
|
126
|
+
const controlPath = process.env.COTAL_CONTROL_SOCKET;
|
|
127
|
+
const controlToken = process.env.COTAL_CONTROL_TOKEN;
|
|
128
|
+
if (!controlPath || !controlToken) {
|
|
129
|
+
process.stderr.write("[cotal-connector] managed session missing COTAL_CONTROL_SOCKET/COTAL_CONTROL_TOKEN — cannot serve the control plane\n");
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
// Defined before the server so it can be the cooperative-shutdown handler; only ever CALLED after
|
|
133
|
+
// `controlServer` is assigned (on a signal or an authed `{op:"shutdown"}`), so the forward ref is safe.
|
|
134
|
+
let controlServer;
|
|
135
|
+
const shutdown = async () => {
|
|
136
|
+
try {
|
|
137
|
+
controlServer?.close();
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
/* ignore */
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
await agent.stop();
|
|
144
|
+
}
|
|
145
|
+
finally {
|
|
146
|
+
process.exit(0);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
controlServer = startControlServer(agent, { path: controlPath, token: controlToken }, claudeHandle, { fatalBind: true, onShutdown: () => void shutdown() });
|
|
125
150
|
const server = new McpServer({ name: "cotal", version: "0.0.0" }, {
|
|
126
151
|
// `claude/channel` makes this MCP server a Claude Code *channel*: peer
|
|
127
152
|
// messages can be pushed straight into the session (waking it if idle).
|
|
@@ -190,20 +215,6 @@ async function main() {
|
|
|
190
215
|
// — F4=B (wake-only). Its body isn't injected; cotal_inbox recalls it.
|
|
191
216
|
agent.on("mention-wake", (item) => nudge(item, `You were mentioned by ${fmtFrom(item)} on #${item.channel ?? "?"} — pull it with cotal_inbox.`));
|
|
192
217
|
agent.on("wake", () => nudge());
|
|
193
|
-
const shutdown = async () => {
|
|
194
|
-
try {
|
|
195
|
-
controlServer.close();
|
|
196
|
-
}
|
|
197
|
-
catch {
|
|
198
|
-
/* ignore */
|
|
199
|
-
}
|
|
200
|
-
try {
|
|
201
|
-
await agent.stop();
|
|
202
|
-
}
|
|
203
|
-
finally {
|
|
204
|
-
process.exit(0);
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
218
|
process.on("SIGINT", () => void shutdown());
|
|
208
219
|
process.on("SIGTERM", () => void shutdown());
|
|
209
220
|
const transport = new StdioServerTransport();
|
package/dist/mcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,OAAO,EACP,WAAW,GAGZ,MAAM,0BAA0B,CAAC;AAClC,O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C,aAAa,GAAG,OAAO;QACrB,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC;QACpC,CAAC,CAAC,OAAO,CAAE,UAAU,EAAE,YAAoD,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACnG,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,0CAA0C,IAAI,CAAC,SAAS,CAAC,UAAU,IAAI,EAAE,CAAC,cAAc,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAC7H,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,gDAAgD,MAAM,CAAC,KAAK,WAAW,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CACtI,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4BAA6B,CAAW,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACtF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/connector-claude-code",
|
|
3
3
|
"description": "Cotal connector for Claude Code: an installed plugin that joins a session to the mesh.",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
22
|
-
"@cotal-ai/connector-core": "0.8.
|
|
22
|
+
"@cotal-ai/connector-core": "0.8.2"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@cotal-ai/core": ">=0.1.0"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"esbuild": "^0.28.0",
|
|
29
29
|
"tsx": "^4.22.4",
|
|
30
|
-
"@cotal-ai/core": "0.8.
|
|
30
|
+
"@cotal-ai/core": "0.8.2"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|