@cotal-ai/connector-claude-code 0.9.1 → 0.10.1
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 +5 -1
- package/dist/extension.js.map +1 -1
- package/dist/hook.cjs +1 -0
- package/dist/mcp.cjs +21 -11
- 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,EAA2D,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAoB3I;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,
|
|
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,SAuH7B,CAAC"}
|
package/dist/extension.js
CHANGED
|
@@ -33,6 +33,8 @@ export const claudeConnector = {
|
|
|
33
33
|
requires: ["claude"],
|
|
34
34
|
supportsResume: true, // renders `--resume <id> --fork-session` (fork-from, never hijack) — see buildLaunch
|
|
35
35
|
buildLaunch(opts) {
|
|
36
|
+
if (opts.variant)
|
|
37
|
+
throw new Error("claude connector: model variants are not supported");
|
|
36
38
|
// Operator MCP servers shared with this agent (default none — see the --mcp-config block).
|
|
37
39
|
const shared = opts.mcpServers ?? {};
|
|
38
40
|
// claude auths via macOS Keychain / an OAuth token, not an env key → forward NO provider key.
|
|
@@ -123,8 +125,10 @@ export const claudeConnector = {
|
|
|
123
125
|
model ??= def.model;
|
|
124
126
|
}
|
|
125
127
|
// The `--model` flag wins over the agent file, and applies even with no agent file.
|
|
126
|
-
if (model)
|
|
128
|
+
if (model) {
|
|
127
129
|
args.push("--model", model);
|
|
130
|
+
env.COTAL_MODEL = model;
|
|
131
|
+
}
|
|
128
132
|
// Fork an existing session INTO the mesh (opts.resume, an opaque host-local id). `--fork-session`
|
|
129
133
|
// is pushed in the SAME branch — resume here is fork-only, never a hijack: claude mints a NEW
|
|
130
134
|
// session id from that transcript and leaves the original untouched. The id is a single argv
|
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,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,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAEnH,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,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAExD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,+EAA+E;IAClG,UAAU,EAAE,WAAW;IACvB,QAAQ,EAAE,CAAC,QAA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,CAAC;QAC1B,CAAC;QAED,kGAAkG;QAClG,8FAA8F;QAC9F,6FAA6F;QAC7F,+FAA+F;QAC/F,kFAAkF;QAClF,IAAI,IAAI,CAAC,MAAM;YAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAEtE,OAAO;YACL,OAAO,EAAE,QAAQ;YACjB,IAAI;YACJ,GAAG;YACH,wEAAwE;YACxE,yEAAyE;YACzE,OAAO,EAAE,kBAAkB;YAC3B,OAAO;SACR,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC"}
|
package/dist/hook.cjs
CHANGED
|
@@ -16316,6 +16316,7 @@ var Algorithms;
|
|
|
16316
16316
|
|
|
16317
16317
|
// ../../packages/core/dist/provision.js
|
|
16318
16318
|
var import_nkeys2 = __toESM(require_mod(), 1);
|
|
16319
|
+
var FIVE_MINUTES = 5 * 60;
|
|
16319
16320
|
var BASE_LIMITS = {
|
|
16320
16321
|
subs: -1,
|
|
16321
16322
|
conn: -1,
|
package/dist/mcp.cjs
CHANGED
|
@@ -47517,6 +47517,7 @@ var Algorithms;
|
|
|
47517
47517
|
|
|
47518
47518
|
// ../../packages/core/dist/provision.js
|
|
47519
47519
|
var import_nkeys2 = __toESM(require_mod(), 1);
|
|
47520
|
+
var FIVE_MINUTES = 5 * 60;
|
|
47520
47521
|
var BASE_LIMITS = {
|
|
47521
47522
|
subs: -1,
|
|
47522
47523
|
conn: -1,
|
|
@@ -47936,7 +47937,7 @@ function loadAgentFile(path) {
|
|
|
47936
47937
|
if (!channelInAllow(effAllow, ch))
|
|
47937
47938
|
throw new Error(`agent file ${path}: ${field} channel "${ch}" is not within your read ACL / allowSubscribe [${effAllow.join(", ")}]`);
|
|
47938
47939
|
}
|
|
47939
|
-
const known = /* @__PURE__ */ new Set(["name", "role", "kind", "description", "tags", "subscribe", "allowSubscribe", "allowPublish", "quiet", "muted", "model", "capabilities", "owner"]);
|
|
47940
|
+
const known = /* @__PURE__ */ new Set(["name", "role", "kind", "description", "tags", "subscribe", "allowSubscribe", "allowPublish", "quiet", "muted", "model", "variant", "capabilities", "owner"]);
|
|
47940
47941
|
const meta3 = {};
|
|
47941
47942
|
for (const [k, v] of Object.entries(fm))
|
|
47942
47943
|
if (!known.has(k) && typeof v === "string")
|
|
@@ -47953,6 +47954,7 @@ function loadAgentFile(path) {
|
|
|
47953
47954
|
quiet,
|
|
47954
47955
|
muted,
|
|
47955
47956
|
model: str("model"),
|
|
47957
|
+
variant: str("variant"),
|
|
47956
47958
|
capabilities: list("capabilities"),
|
|
47957
47959
|
owner: str("owner"),
|
|
47958
47960
|
meta: Object.keys(meta3).length ? meta3 : void 0,
|
|
@@ -50272,6 +50274,7 @@ function configFromEnv(env = process.env) {
|
|
|
50272
50274
|
meta: def?.meta,
|
|
50273
50275
|
capabilities: splitList(env.COTAL_CAPABILITIES).length ? splitList(env.COTAL_CAPABILITIES) : def?.capabilities,
|
|
50274
50276
|
model: env.COTAL_MODEL?.trim() || def?.model || void 0,
|
|
50277
|
+
variant: env.COTAL_VARIANT?.trim() || def?.variant || void 0,
|
|
50275
50278
|
servers: env.COTAL_SERVERS?.trim() || link?.servers || DEFAULT_SERVER,
|
|
50276
50279
|
subscribe: resolvedSubscribe,
|
|
50277
50280
|
allowSubscribe: resolvedAllowSub,
|
|
@@ -50296,10 +50299,13 @@ function feedbackLine(config2) {
|
|
|
50296
50299
|
|
|
50297
50300
|
// ../connector-core/dist/agent.js
|
|
50298
50301
|
var import_node_events2 = require("node:events");
|
|
50302
|
+
var SPAWN_TIMEOUT_MS = 4e4;
|
|
50299
50303
|
function buildMeta(config2) {
|
|
50300
50304
|
const meta3 = { ...config2.meta ?? {} };
|
|
50301
50305
|
if (config2.model)
|
|
50302
50306
|
meta3.model = config2.model;
|
|
50307
|
+
if (config2.variant)
|
|
50308
|
+
meta3.variant = config2.variant;
|
|
50303
50309
|
if (config2.connector)
|
|
50304
50310
|
meta3.connector = config2.connector;
|
|
50305
50311
|
return Object.keys(meta3).length ? meta3 : void 0;
|
|
@@ -50657,11 +50663,14 @@ var MeshAgent = class extends import_node_events2.EventEmitter {
|
|
|
50657
50663
|
}
|
|
50658
50664
|
// ---- supervision ---------------------------------------------------------
|
|
50659
50665
|
/** Ask the manager to spawn a new teammate into this space (its `start` op).
|
|
50666
|
+
* #159 B1: the manager replies to `start` only on a REAL outcome — presence join, process exit,
|
|
50667
|
+
* or its ~30s readiness backstop — so the request must outlive that window ({@link SPAWN_TIMEOUT_MS}),
|
|
50668
|
+
* not the 5s op default.
|
|
50660
50669
|
* How it lands — a detached PTY, a tmux window, a cmux tab — is the manager's
|
|
50661
50670
|
* runtime; from here it just joins the mesh as a lateral peer. `opts.agent` picks
|
|
50662
|
-
* the harness (default the manager's `cotal`/Claude), `opts.model`
|
|
50663
|
-
* persona file's
|
|
50664
|
-
* than the manager's workspace — the same knobs the operator's `cotal
|
|
50671
|
+
* the harness (default the manager's `COTAL_DEFAULT_AGENT`, else `cotal`/Claude), `opts.model` /
|
|
50672
|
+
* `opts.variant` override the persona file's model selectors, and `opts.cwd` roots the new peer at a different folder/repo
|
|
50673
|
+
* than the manager's workspace — the same knobs the operator's `cotal spawn --detach` carries, so
|
|
50665
50674
|
* the agent and operator spawn doors share one control-op contract. (Session `resume` is
|
|
50666
50675
|
* intentionally NOT forwarded here: forking a host-local `~/.claude` transcript is an
|
|
50667
50676
|
* operator-local intent, kept off the peer-facing spawn door — see #159.) */
|
|
@@ -50669,8 +50678,8 @@ var MeshAgent = class extends import_node_events2.EventEmitter {
|
|
|
50669
50678
|
this.assertConnected();
|
|
50670
50679
|
return this.ep.requestControl(CONTROL_PRIVILEGED, {
|
|
50671
50680
|
op: "start",
|
|
50672
|
-
args: { name, role, agent: opts?.agent, model: opts?.model, cwd: opts?.cwd }
|
|
50673
|
-
});
|
|
50681
|
+
args: { name, role, agent: opts?.agent, model: opts?.model, variant: opts?.variant, cwd: opts?.cwd }
|
|
50682
|
+
}, SPAWN_TIMEOUT_MS);
|
|
50674
50683
|
}
|
|
50675
50684
|
/** Ask the manager to tear a teammate down (its `stop` op). Graceful by default —
|
|
50676
50685
|
* the session is told to exit cleanly (so it leaves the mesh) before the
|
|
@@ -51248,18 +51257,19 @@ ${info}${caught}`);
|
|
|
51248
51257
|
schema: {
|
|
51249
51258
|
name: external_exports.string().describe("Which persona to spawn \u2014 the persona FILENAME in .cotal/agents (e.g. `review-critic`), without the .md. The new peer joins under the persona's own `name:` (auto-numbered, e.g. socrates-2, if that's taken). Fails if no such persona file exists \u2014 spawn an existing persona, don't invent a name."),
|
|
51250
51259
|
role: external_exports.string().optional().describe("Optional role for the new peer (e.g. worker, reviewer); overrides the persona file's role."),
|
|
51251
|
-
agent: external_exports.string().optional().describe("Optional harness the new peer runs on \u2014 the agent/connector type (claude, opencode, hermes), NOT the persona to spawn (that's `name`). Defaults to the manager's
|
|
51260
|
+
agent: external_exports.string().optional().describe("Optional harness the new peer runs on \u2014 the agent/connector type (claude, opencode, hermes), NOT the persona to spawn (that's `name`). Defaults to the manager's COTAL_DEFAULT_AGENT, else Claude."),
|
|
51252
51261
|
model: external_exports.string().optional().describe("Optional model override (e.g. opus, sonnet) \u2014 wins over the persona file's model:."),
|
|
51262
|
+
variant: external_exports.string().optional().describe("Optional model variant override (connector-defined; for OpenCode, a model variant such as high/max/low)."),
|
|
51253
51263
|
cwd: external_exports.string().optional().describe("Optional working directory to root the new peer at (e.g. a different repo). A relative path resolves against the manager's workspace; omitted \u2192 it shares the manager's workspace.")
|
|
51254
51264
|
// NOTE: session `resume` is deliberately NOT exposed here. Forking a host-local `~/.claude`
|
|
51255
51265
|
// transcript is an operator-local intent; letting a spawn-capable mesh PEER name a host
|
|
51256
51266
|
// session id would expand `spawn` into host-transcript disclosure with no broker-enforced
|
|
51257
|
-
// boundary. Resume lives only on the operator CLI (`cotal spawn --resume
|
|
51258
|
-
// --
|
|
51267
|
+
// boundary. Resume lives only on the operator CLI (`cotal spawn --resume`, foreground or
|
|
51268
|
+
// --detach); a peer-facing, capability-gated resume is deferred (see #159).
|
|
51259
51269
|
},
|
|
51260
|
-
async run(agent, _config, { name, role, agent: agentType, model, cwd }) {
|
|
51270
|
+
async run(agent, _config, { name, role, agent: agentType, model, variant, cwd }) {
|
|
51261
51271
|
try {
|
|
51262
|
-
const reply = await agent.spawn(name, role, { agent: agentType, model, cwd });
|
|
51272
|
+
const reply = await agent.spawn(name, role, { agent: agentType, model, variant, cwd });
|
|
51263
51273
|
if (!reply.ok)
|
|
51264
51274
|
return err(`Couldn't spawn ${name}: ${reply.error ?? "manager refused"}`);
|
|
51265
51275
|
const d = reply.data;
|
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.
|
|
4
|
+
"version": "0.10.1",
|
|
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.
|
|
22
|
+
"@cotal-ai/connector-core": "0.10.1"
|
|
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.
|
|
30
|
+
"@cotal-ai/core": "0.10.1"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|