@cotal-ai/connector-claude-code 0.68.0 → 0.70.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/agui-map.d.ts +18 -20
- package/dist/agui-map.d.ts.map +1 -1
- package/dist/hook.cjs +224 -197
- package/dist/index.js +23 -17
- package/dist/mcp.cjs +3527 -3456
- package/dist/setup.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13,14 +13,18 @@ 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
|
-
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";
|
|
24
|
+
import { normalizeMentions, RUN_LAUNCH_DEADLINE_MS, subjectMatches, isConcreteChannel as isConcreteChannel2, assertValidChannel as assertValidChannel2, channelInAllow as channelInAllow2, resolvePeer as resolvePeerInRoster, peerLabel as peerLabel2, CotalEndpoint, BASELINE_LIFECYCLE_ENDPOINT as BASELINE_LIFECYCLE_ENDPOINT2, BIND_SPLIT_REISSUES, assertLifecycleToken as assertLifecycleToken3, EpEnvelopeError, isPublishPermissionDenied, unansweredRequest, renderLifecycleBlocked, controlReplyFrom, bearerCommandFailure, partsToText, routeToken } from "@cotal-ai/core";
|
|
25
|
+
|
|
26
|
+
// ../connector-core/dist/framing.js
|
|
27
|
+
import { peerLabel } from "@cotal-ai/core";
|
|
24
28
|
|
|
25
29
|
// ../connector-core/dist/manager-call.js
|
|
26
30
|
import { BASELINE_LIFECYCLE_ENDPOINT, assertLifecycleToken as assertLifecycleToken2, dialerFor, invokeCommand, isPermissionDenied, issuedUserCaller, replyRefusedBeforeEffect, resolveService, standaloneConnectOpts } from "@cotal-ai/core";
|
|
@@ -199,14 +203,11 @@ function mcpServerEnvKeys(servers) {
|
|
|
199
203
|
// ../connector-core/dist/agui.js
|
|
200
204
|
import { AGUI_FRAME_KIND, AGUI_EVENT_TYPE, isAguiFramePart } from "@cotal-ai/core";
|
|
201
205
|
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
206
|
var TRUNCATABLE_FIELDS = [
|
|
204
207
|
{ type: AGUI_EVENT_TYPE2.TOOL_CALL_ARGS, field: "delta" },
|
|
205
208
|
{ type: AGUI_EVENT_TYPE2.TOOL_CALL_RESULT, field: "content" },
|
|
206
209
|
{ type: AGUI_EVENT_TYPE2.TEXT_MESSAGE_CONTENT, field: "delta" }
|
|
207
210
|
];
|
|
208
|
-
var SIZING_ID = "S".repeat(64);
|
|
209
|
-
var SIZING_EXPECTATION = Number.MAX_SAFE_INTEGER;
|
|
210
211
|
var EGRESS_FORBIDDEN_TYPES = /* @__PURE__ */ new Set([
|
|
211
212
|
AGUI_EVENT_TYPE2.TOOL_CALL_ARGS,
|
|
212
213
|
AGUI_EVENT_TYPE2.TOOL_CALL_RESULT
|
|
@@ -229,6 +230,11 @@ var KNOWN_EVENT_KEYS_BY_TYPE = /* @__PURE__ */ new Map([
|
|
|
229
230
|
[AGUI_EVENT_TYPE2.CUSTOM, /* @__PURE__ */ new Set(["type", "timestamp", "rawEvent", "name", "value", "cotal"])]
|
|
230
231
|
]);
|
|
231
232
|
|
|
233
|
+
// ../connector-core/dist/agui-emitter.js
|
|
234
|
+
import { isAguiFramePart as isAguiFramePart3, isCasLoss, principalKey as principalKey2 } from "@cotal-ai/core";
|
|
235
|
+
var SIZING_ID = "S".repeat(64);
|
|
236
|
+
var SIZING_EXPECTATION = Number.MAX_SAFE_INTEGER;
|
|
237
|
+
|
|
232
238
|
// ../connector-core/dist/event-wal.js
|
|
233
239
|
import { assertIdToken } from "@cotal-ai/core";
|
|
234
240
|
|
|
@@ -236,7 +242,7 @@ import { assertIdToken } from "@cotal-ai/core";
|
|
|
236
242
|
import { ensureDirNoSymlink } from "@cotal-ai/core";
|
|
237
243
|
|
|
238
244
|
// ../connector-core/dist/agui-render.js
|
|
239
|
-
import { AGUI_EVENT_TYPE as AGUI_EVENT_TYPE3, AGUI_FRAME_KIND as AGUI_FRAME_KIND3, isAguiFramePart as
|
|
245
|
+
import { AGUI_EVENT_TYPE as AGUI_EVENT_TYPE3, AGUI_FRAME_KIND as AGUI_FRAME_KIND3, isAguiFramePart as isAguiFramePart4, registry } from "@cotal-ai/core";
|
|
240
246
|
var str = (v) => typeof v === "string" ? v : void 0;
|
|
241
247
|
var CONT = " \xB7 ";
|
|
242
248
|
var TEXT_PREFIX = "\xBB ";
|
|
@@ -343,7 +349,7 @@ var aguiFramePartRenderer = Object.freeze({
|
|
|
343
349
|
kind: "part-renderer",
|
|
344
350
|
name: AGUI_FRAME_KIND3,
|
|
345
351
|
render(part) {
|
|
346
|
-
if (!
|
|
352
|
+
if (!isAguiFramePart4(part))
|
|
347
353
|
return `[not an AG-UI frame]`;
|
|
348
354
|
const events = part.events;
|
|
349
355
|
if (!Array.isArray(events) || events.length === 0)
|
|
@@ -14874,7 +14880,10 @@ function date4(params) {
|
|
|
14874
14880
|
config(en_default());
|
|
14875
14881
|
|
|
14876
14882
|
// ../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";
|
|
14883
|
+
import { isConcreteChannel as isConcreteChannel3, channelInAllow as channelInAllow3, AmbiguousPeerError, peerLabel as peerLabel4, assertLifecycleToken as assertLifecycleToken4, isPermissionDenied as isPermissionDenied2, renderLifecycleBlocked as renderLifecycleBlocked2, LANG_PROBLEM_DETAIL_KIND, formatAge, presenceAges } from "@cotal-ai/core";
|
|
14884
|
+
|
|
14885
|
+
// ../connector-core/dist/orientation.js
|
|
14886
|
+
import { peerLabel as peerLabel3 } from "@cotal-ai/core";
|
|
14878
14887
|
|
|
14879
14888
|
// ../connector-core/dist/docs.js
|
|
14880
14889
|
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 +14898,6 @@ var MAX_FRAME_BYTES = 1 << 20;
|
|
|
14889
14898
|
var PACKAGE_ROOT = fileURLToPath(new URL("..", import.meta.url));
|
|
14890
14899
|
var DOCS_URL = "https://github.com/Cotal-AI/Cotal/blob/main/docs/connect-claude.md";
|
|
14891
14900
|
var MARKETPLACE = "cotal-mesh";
|
|
14892
|
-
var REMOTE_TRANSPORTS = /* @__PURE__ */ new Set(["http", "sse", "ws"]);
|
|
14893
14901
|
function cotalHome() {
|
|
14894
14902
|
if (process.env.COTAL_HOME) return process.env.COTAL_HOME;
|
|
14895
14903
|
if (process.platform === "win32" && process.env.LOCALAPPDATA) return join2(process.env.LOCALAPPDATA, "Cotal");
|
|
@@ -15031,12 +15039,10 @@ function userServers() {
|
|
|
15031
15039
|
}
|
|
15032
15040
|
return config2?.mcpServers ?? {};
|
|
15033
15041
|
}
|
|
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
|
-
);
|
|
15042
|
+
function copyable(name, spec) {
|
|
15043
|
+
if (mcpServerProblem(name, spec) !== void 0) return false;
|
|
15044
|
+
const { env, headers } = spec;
|
|
15045
|
+
return [env, headers].every((values) => values === void 0 || Object.values(values).every((v) => v.replace(ENV_REFERENCE, "") === ""));
|
|
15040
15046
|
}
|
|
15041
15047
|
var assistSession;
|
|
15042
15048
|
var claudeSetupProvider = {
|
|
@@ -15085,8 +15091,8 @@ var claudeSetupProvider = {
|
|
|
15085
15091
|
context: [DOCS_URL],
|
|
15086
15092
|
run({ seed }) {
|
|
15087
15093
|
const installed = Object.entries(userServers());
|
|
15088
|
-
const shared = Object.fromEntries(installed.filter((entry) => copyable(entry
|
|
15089
|
-
const left = installed.filter((
|
|
15094
|
+
const shared = Object.fromEntries(installed.filter((entry) => copyable(...entry)));
|
|
15095
|
+
const left = installed.filter((entry) => !copyable(...entry)).map(([name]) => name);
|
|
15090
15096
|
const path = globalConfigPath();
|
|
15091
15097
|
if (!seed(shared)) return `kept the list ${path} already declares`;
|
|
15092
15098
|
const parts = [`${Object.keys(shared).join(", ") || "none"} via ${path}`];
|