@cotal-ai/connector-claude-code 0.68.0 → 0.69.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.
- package/dist/hook.cjs +12 -4
- package/dist/index.js +16 -16
- package/dist/mcp.cjs +246 -198
- package/dist/setup.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/hook.cjs
CHANGED
|
@@ -26467,6 +26467,12 @@ var import_transport_node19 = __toESM(require_transport_node(), 1);
|
|
|
26467
26467
|
var import_jetstream18 = __toESM(require_mod4(), 1);
|
|
26468
26468
|
var import_kv9 = __toESM(require_mod6(), 1);
|
|
26469
26469
|
|
|
26470
|
+
// ../../packages/core/dist/loopback.js
|
|
26471
|
+
var import_node_net = require("node:net");
|
|
26472
|
+
var LOOPBACK = new import_node_net.BlockList();
|
|
26473
|
+
LOOPBACK.addSubnet("127.0.0.0", 8, "ipv4");
|
|
26474
|
+
LOOPBACK.addAddress("::1", "ipv6");
|
|
26475
|
+
|
|
26470
26476
|
// ../../packages/core/dist/managed-handoff.js
|
|
26471
26477
|
var TARGET_FIELDS = ["space", "owner", "actor", "lifecycleUid"];
|
|
26472
26478
|
var STRING_FIELDS = [...TARGET_FIELDS, "kind", "server", "authProvider", "exchangeUrl", "sentinelCreds", "actorToken"];
|
|
@@ -26640,8 +26646,6 @@ var TRUNCATABLE_FIELDS = [
|
|
|
26640
26646
|
{ type: AGUI_EVENT_TYPE.TOOL_CALL_RESULT, field: "content" },
|
|
26641
26647
|
{ type: AGUI_EVENT_TYPE.TEXT_MESSAGE_CONTENT, field: "delta" }
|
|
26642
26648
|
];
|
|
26643
|
-
var SIZING_ID = "S".repeat(64);
|
|
26644
|
-
var SIZING_EXPECTATION = Number.MAX_SAFE_INTEGER;
|
|
26645
26649
|
var EGRESS_FORBIDDEN_TYPES = /* @__PURE__ */ new Set([
|
|
26646
26650
|
AGUI_EVENT_TYPE.TOOL_CALL_ARGS,
|
|
26647
26651
|
AGUI_EVENT_TYPE.TOOL_CALL_RESULT
|
|
@@ -26664,6 +26668,10 @@ var KNOWN_EVENT_KEYS_BY_TYPE = /* @__PURE__ */ new Map([
|
|
|
26664
26668
|
[AGUI_EVENT_TYPE.CUSTOM, /* @__PURE__ */ new Set(["type", "timestamp", "rawEvent", "name", "value", "cotal"])]
|
|
26665
26669
|
]);
|
|
26666
26670
|
|
|
26671
|
+
// ../connector-core/dist/agui-emitter.js
|
|
26672
|
+
var SIZING_ID = "S".repeat(64);
|
|
26673
|
+
var SIZING_EXPECTATION = Number.MAX_SAFE_INTEGER;
|
|
26674
|
+
|
|
26667
26675
|
// ../connector-core/dist/agui-render.js
|
|
26668
26676
|
var str = (v) => typeof v === "string" ? v : void 0;
|
|
26669
26677
|
var CONT = " \xB7 ";
|
|
@@ -41312,7 +41320,7 @@ var HANDOFF_RECEIPT = '{"handoff":"ok"}\n';
|
|
|
41312
41320
|
var MAX_FRAME_BYTES = 1 << 20;
|
|
41313
41321
|
|
|
41314
41322
|
// ../connector-core/dist/relay.js
|
|
41315
|
-
var
|
|
41323
|
+
var import_node_net2 = require("node:net");
|
|
41316
41324
|
var TIMEOUT_MS = 2e3;
|
|
41317
41325
|
var CONNECT_RETRY_INITIAL_MS = 25;
|
|
41318
41326
|
var CONNECT_RETRY_MAX_MS = 250;
|
|
@@ -41421,7 +41429,7 @@ async function runHookRelay() {
|
|
|
41421
41429
|
const dial = () => {
|
|
41422
41430
|
if (settled)
|
|
41423
41431
|
return;
|
|
41424
|
-
const candidate = (0,
|
|
41432
|
+
const candidate = (0, import_node_net2.connect)(path);
|
|
41425
41433
|
sock = candidate;
|
|
41426
41434
|
let connected = false;
|
|
41427
41435
|
let reply = "";
|
package/dist/index.js
CHANGED
|
@@ -13,11 +13,12 @@ import { dirname, join as join2 } from "node:path";
|
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import {
|
|
15
15
|
globalConfigPath,
|
|
16
|
+
mcpServerProblem,
|
|
16
17
|
registry as registry3
|
|
17
18
|
} from "@cotal-ai/core";
|
|
18
19
|
|
|
19
20
|
// ../connector-core/dist/config.js
|
|
20
|
-
import { DEFAULT_SERVER, DEV_OWNER, LAUNCH_MATERIAL_ENV, discardLaunchMaterial, assertLifecycleToken, assertValidChannel, channelInAllow, credsClaims, eventChannel, idFromCreds, isConcreteChannel, loadAgentFile, parseJoinLink, readLaunchMaterial } from "@cotal-ai/core";
|
|
21
|
+
import { DEFAULT_SERVER, DEV_OWNER, LAUNCH_MATERIAL_ENV, discardLaunchMaterial, assertLifecycleToken, assertValidChannel, channelInAllow, credsClaims, eventChannel, idFromCreds, isConcreteChannel, loadAgentFile, parseJoinLink, readLaunchMaterial, resolveReadAcl } from "@cotal-ai/core";
|
|
21
22
|
|
|
22
23
|
// ../connector-core/dist/agent.js
|
|
23
24
|
import { normalizeMentions, RUN_LAUNCH_DEADLINE_MS, subjectMatches, isConcreteChannel as isConcreteChannel2, assertValidChannel as assertValidChannel2, channelInAllow as channelInAllow2, resolvePeer as resolvePeerInRoster, CotalEndpoint, BASELINE_LIFECYCLE_ENDPOINT as BASELINE_LIFECYCLE_ENDPOINT2, BIND_SPLIT_REISSUES, assertLifecycleToken as assertLifecycleToken3, EpEnvelopeError, isPublishPermissionDenied, unansweredRequest, renderLifecycleBlocked, bearerCommandFailure, partsToText, routeToken } from "@cotal-ai/core";
|
|
@@ -199,14 +200,11 @@ function mcpServerEnvKeys(servers) {
|
|
|
199
200
|
// ../connector-core/dist/agui.js
|
|
200
201
|
import { AGUI_FRAME_KIND, AGUI_EVENT_TYPE, isAguiFramePart } from "@cotal-ai/core";
|
|
201
202
|
import { AGUI_FRAME_KIND as AGUI_FRAME_KIND2, AGUI_EVENT_TYPE as AGUI_EVENT_TYPE2, isAguiFramePart as isAguiFramePart2 } from "@cotal-ai/core";
|
|
202
|
-
import { isCasLoss, principalKey as principalKey2 } from "@cotal-ai/core";
|
|
203
203
|
var TRUNCATABLE_FIELDS = [
|
|
204
204
|
{ type: AGUI_EVENT_TYPE2.TOOL_CALL_ARGS, field: "delta" },
|
|
205
205
|
{ type: AGUI_EVENT_TYPE2.TOOL_CALL_RESULT, field: "content" },
|
|
206
206
|
{ type: AGUI_EVENT_TYPE2.TEXT_MESSAGE_CONTENT, field: "delta" }
|
|
207
207
|
];
|
|
208
|
-
var SIZING_ID = "S".repeat(64);
|
|
209
|
-
var SIZING_EXPECTATION = Number.MAX_SAFE_INTEGER;
|
|
210
208
|
var EGRESS_FORBIDDEN_TYPES = /* @__PURE__ */ new Set([
|
|
211
209
|
AGUI_EVENT_TYPE2.TOOL_CALL_ARGS,
|
|
212
210
|
AGUI_EVENT_TYPE2.TOOL_CALL_RESULT
|
|
@@ -229,6 +227,11 @@ var KNOWN_EVENT_KEYS_BY_TYPE = /* @__PURE__ */ new Map([
|
|
|
229
227
|
[AGUI_EVENT_TYPE2.CUSTOM, /* @__PURE__ */ new Set(["type", "timestamp", "rawEvent", "name", "value", "cotal"])]
|
|
230
228
|
]);
|
|
231
229
|
|
|
230
|
+
// ../connector-core/dist/agui-emitter.js
|
|
231
|
+
import { isAguiFramePart as isAguiFramePart3, isCasLoss, principalKey as principalKey2 } from "@cotal-ai/core";
|
|
232
|
+
var SIZING_ID = "S".repeat(64);
|
|
233
|
+
var SIZING_EXPECTATION = Number.MAX_SAFE_INTEGER;
|
|
234
|
+
|
|
232
235
|
// ../connector-core/dist/event-wal.js
|
|
233
236
|
import { assertIdToken } from "@cotal-ai/core";
|
|
234
237
|
|
|
@@ -236,7 +239,7 @@ import { assertIdToken } from "@cotal-ai/core";
|
|
|
236
239
|
import { ensureDirNoSymlink } from "@cotal-ai/core";
|
|
237
240
|
|
|
238
241
|
// ../connector-core/dist/agui-render.js
|
|
239
|
-
import { AGUI_EVENT_TYPE as AGUI_EVENT_TYPE3, AGUI_FRAME_KIND as AGUI_FRAME_KIND3, isAguiFramePart as
|
|
242
|
+
import { AGUI_EVENT_TYPE as AGUI_EVENT_TYPE3, AGUI_FRAME_KIND as AGUI_FRAME_KIND3, isAguiFramePart as isAguiFramePart4, registry } from "@cotal-ai/core";
|
|
240
243
|
var str = (v) => typeof v === "string" ? v : void 0;
|
|
241
244
|
var CONT = " \xB7 ";
|
|
242
245
|
var TEXT_PREFIX = "\xBB ";
|
|
@@ -343,7 +346,7 @@ var aguiFramePartRenderer = Object.freeze({
|
|
|
343
346
|
kind: "part-renderer",
|
|
344
347
|
name: AGUI_FRAME_KIND3,
|
|
345
348
|
render(part) {
|
|
346
|
-
if (!
|
|
349
|
+
if (!isAguiFramePart4(part))
|
|
347
350
|
return `[not an AG-UI frame]`;
|
|
348
351
|
const events = part.events;
|
|
349
352
|
if (!Array.isArray(events) || events.length === 0)
|
|
@@ -14874,7 +14877,7 @@ function date4(params) {
|
|
|
14874
14877
|
config(en_default());
|
|
14875
14878
|
|
|
14876
14879
|
// ../connector-core/dist/tool-specs.js
|
|
14877
|
-
import { isConcreteChannel as isConcreteChannel3, channelInAllow as channelInAllow3, AmbiguousPeerError, assertLifecycleToken as assertLifecycleToken4, isPermissionDenied as isPermissionDenied2, renderLifecycleBlocked as renderLifecycleBlocked2, LANG_PROBLEM_DETAIL_KIND } from "@cotal-ai/core";
|
|
14880
|
+
import { isConcreteChannel as isConcreteChannel3, channelInAllow as channelInAllow3, AmbiguousPeerError, assertLifecycleToken as assertLifecycleToken4, isPermissionDenied as isPermissionDenied2, renderLifecycleBlocked as renderLifecycleBlocked2, LANG_PROBLEM_DETAIL_KIND, formatAge, presenceAges } from "@cotal-ai/core";
|
|
14878
14881
|
|
|
14879
14882
|
// ../connector-core/dist/docs.js
|
|
14880
14883
|
var STOP = new Set("a an and are as at be by do for from has how in is it of on or that the this to use using was what when where which who with you your".split(" "));
|
|
@@ -14889,7 +14892,6 @@ var MAX_FRAME_BYTES = 1 << 20;
|
|
|
14889
14892
|
var PACKAGE_ROOT = fileURLToPath(new URL("..", import.meta.url));
|
|
14890
14893
|
var DOCS_URL = "https://github.com/Cotal-AI/Cotal/blob/main/docs/connect-claude.md";
|
|
14891
14894
|
var MARKETPLACE = "cotal-mesh";
|
|
14892
|
-
var REMOTE_TRANSPORTS = /* @__PURE__ */ new Set(["http", "sse", "ws"]);
|
|
14893
14895
|
function cotalHome() {
|
|
14894
14896
|
if (process.env.COTAL_HOME) return process.env.COTAL_HOME;
|
|
14895
14897
|
if (process.platform === "win32" && process.env.LOCALAPPDATA) return join2(process.env.LOCALAPPDATA, "Cotal");
|
|
@@ -15031,12 +15033,10 @@ function userServers() {
|
|
|
15031
15033
|
}
|
|
15032
15034
|
return config2?.mcpServers ?? {};
|
|
15033
15035
|
}
|
|
15034
|
-
function copyable(spec) {
|
|
15035
|
-
|
|
15036
|
-
const
|
|
15037
|
-
return
|
|
15038
|
-
(values) => values === void 0 || isRecord(values) && Object.values(values).every((v) => typeof v === "string" && v.replace(ENV_REFERENCE, "") === "")
|
|
15039
|
-
);
|
|
15036
|
+
function copyable(name, spec) {
|
|
15037
|
+
if (mcpServerProblem(name, spec) !== void 0) return false;
|
|
15038
|
+
const { env, headers } = spec;
|
|
15039
|
+
return [env, headers].every((values) => values === void 0 || Object.values(values).every((v) => v.replace(ENV_REFERENCE, "") === ""));
|
|
15040
15040
|
}
|
|
15041
15041
|
var assistSession;
|
|
15042
15042
|
var claudeSetupProvider = {
|
|
@@ -15085,8 +15085,8 @@ var claudeSetupProvider = {
|
|
|
15085
15085
|
context: [DOCS_URL],
|
|
15086
15086
|
run({ seed }) {
|
|
15087
15087
|
const installed = Object.entries(userServers());
|
|
15088
|
-
const shared = Object.fromEntries(installed.filter((entry) => copyable(entry
|
|
15089
|
-
const left = installed.filter((
|
|
15088
|
+
const shared = Object.fromEntries(installed.filter((entry) => copyable(...entry)));
|
|
15089
|
+
const left = installed.filter((entry) => !copyable(...entry)).map(([name]) => name);
|
|
15090
15090
|
const path = globalConfigPath();
|
|
15091
15091
|
if (!seed(shared)) return `kept the list ${path} already declares`;
|
|
15092
15092
|
const parts = [`${Object.keys(shared).join(", ") || "none"} via ${path}`];
|