@cotal-ai/connector-claude-code 0.9.1 → 0.10.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 +1 -0
- package/dist/mcp.cjs +11 -6
- package/package.json +3 -3
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,
|
|
@@ -50296,6 +50297,7 @@ function feedbackLine(config2) {
|
|
|
50296
50297
|
|
|
50297
50298
|
// ../connector-core/dist/agent.js
|
|
50298
50299
|
var import_node_events2 = require("node:events");
|
|
50300
|
+
var SPAWN_TIMEOUT_MS = 4e4;
|
|
50299
50301
|
function buildMeta(config2) {
|
|
50300
50302
|
const meta3 = { ...config2.meta ?? {} };
|
|
50301
50303
|
if (config2.model)
|
|
@@ -50657,11 +50659,14 @@ var MeshAgent = class extends import_node_events2.EventEmitter {
|
|
|
50657
50659
|
}
|
|
50658
50660
|
// ---- supervision ---------------------------------------------------------
|
|
50659
50661
|
/** Ask the manager to spawn a new teammate into this space (its `start` op).
|
|
50662
|
+
* #159 B1: the manager replies to `start` only on a REAL outcome — presence join, process exit,
|
|
50663
|
+
* or its ~30s readiness backstop — so the request must outlive that window ({@link SPAWN_TIMEOUT_MS}),
|
|
50664
|
+
* not the 5s op default.
|
|
50660
50665
|
* How it lands — a detached PTY, a tmux window, a cmux tab — is the manager's
|
|
50661
50666
|
* 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` overrides the
|
|
50667
|
+
* the harness (default the manager's `COTAL_DEFAULT_AGENT`, else `cotal`/Claude), `opts.model` overrides the
|
|
50663
50668
|
* persona file's `model:`, and `opts.cwd` roots the new peer at a different folder/repo
|
|
50664
|
-
* than the manager's workspace — the same knobs the operator's `cotal
|
|
50669
|
+
* than the manager's workspace — the same knobs the operator's `cotal spawn --detach` carries, so
|
|
50665
50670
|
* the agent and operator spawn doors share one control-op contract. (Session `resume` is
|
|
50666
50671
|
* intentionally NOT forwarded here: forking a host-local `~/.claude` transcript is an
|
|
50667
50672
|
* operator-local intent, kept off the peer-facing spawn door — see #159.) */
|
|
@@ -50670,7 +50675,7 @@ var MeshAgent = class extends import_node_events2.EventEmitter {
|
|
|
50670
50675
|
return this.ep.requestControl(CONTROL_PRIVILEGED, {
|
|
50671
50676
|
op: "start",
|
|
50672
50677
|
args: { name, role, agent: opts?.agent, model: opts?.model, cwd: opts?.cwd }
|
|
50673
|
-
});
|
|
50678
|
+
}, SPAWN_TIMEOUT_MS);
|
|
50674
50679
|
}
|
|
50675
50680
|
/** Ask the manager to tear a teammate down (its `stop` op). Graceful by default —
|
|
50676
50681
|
* the session is told to exit cleanly (so it leaves the mesh) before the
|
|
@@ -51248,14 +51253,14 @@ ${info}${caught}`);
|
|
|
51248
51253
|
schema: {
|
|
51249
51254
|
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
51255
|
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
|
|
51256
|
+
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
51257
|
model: external_exports.string().optional().describe("Optional model override (e.g. opus, sonnet) \u2014 wins over the persona file's model:."),
|
|
51253
51258
|
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
51259
|
// NOTE: session `resume` is deliberately NOT exposed here. Forking a host-local `~/.claude`
|
|
51255
51260
|
// transcript is an operator-local intent; letting a spawn-capable mesh PEER name a host
|
|
51256
51261
|
// 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
|
-
// --
|
|
51262
|
+
// boundary. Resume lives only on the operator CLI (`cotal spawn --resume`, foreground or
|
|
51263
|
+
// --detach); a peer-facing, capability-gated resume is deferred (see #159).
|
|
51259
51264
|
},
|
|
51260
51265
|
async run(agent, _config, { name, role, agent: agentType, model, cwd }) {
|
|
51261
51266
|
try {
|
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.0",
|
|
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.0"
|
|
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.0"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|