@cotal-ai/manager 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/commands.d.ts +0 -25
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +24 -282
- package/dist/commands.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/launch.d.ts +3 -2
- package/dist/launch.d.ts.map +1 -1
- package/dist/launch.js +6 -3
- package/dist/launch.js.map +1 -1
- package/dist/manager.d.ts +32 -1
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +99 -12
- package/dist/manager.js.map +1 -1
- package/package.json +5 -5
- package/dist/attach-client.d.ts +0 -20
- package/dist/attach-client.d.ts.map +0 -1
- package/dist/attach-client.js +0 -218
- package/dist/attach-client.js.map +0 -1
package/dist/commands.d.ts
CHANGED
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
import { type Profile } from "@cotal-ai/core";
|
|
2
|
-
type Values = Record<string, string | undefined>;
|
|
3
|
-
/** Resolve which running mesh a control command (`ps`/`start`/`stop`/`attach`) targets, with the
|
|
4
|
-
* same precedence + preflight as the rest of the CLI ({@link resolveMeshTarget} / `connectOrExit`):
|
|
5
|
-
* 1. explicit `--creds` → a raw off-registry connection (plain reachability, no prune). Space
|
|
6
|
-
* defaults to this folder's auth-space via {@link spaceFor} (a deliberate manager-command
|
|
7
|
-
* choice — more correct than `DEFAULT_SPACE` for a non-default-space project, and what these
|
|
8
|
-
* commands did before — NOT `connectOrExit`'s `DEFAULT_SPACE`).
|
|
9
|
-
* 2. `--server` + an UNregistered `--space` → a raw OPEN off-registry connection, no creds (the
|
|
10
|
-
* same escape hatch `connectOrExit` has; plain reachability, no prune).
|
|
11
|
-
* 3. otherwise the registry/`current` resolver, with the same stale-prune + friendly preflight —
|
|
12
|
-
* so `cotal ps --space <name>` reaches that mesh's RECORDED broker instead of silently assuming
|
|
13
|
-
* `DEFAULT_SERVER` (:4222); `--server` overrides. The tier-scoped caller cred (`profile`) is minted
|
|
14
|
-
* from the RESOLVED mesh's own recorded root (so `--space other` loads other's auth, guarded by
|
|
15
|
-
* `targetFromEntry`'s `auth.space === m.space` check), or none for an open mesh.
|
|
16
|
-
* Shares `@cotal-ai/workspace`'s `preflightTarget`/`pruneStaleMeshes` with the CLI, so a dead/mismatched entry gets
|
|
17
|
-
* the same one-sentence message + stale-prune the rest of the CLI gives — not a raw NATS trace. The
|
|
18
|
-
* pre-resolution sweep runs only for bare / `--server`-only resolution; an explicit `--space` is
|
|
19
|
-
* resolved + preflighted directly (so a `--server` override can recover a dead-recorded mesh).
|
|
20
|
-
* `ask()` can therefore trust the target is reachable + auth-valid. */
|
|
21
|
-
export declare function resolveManagerTarget(v: Values, profile: Profile): Promise<{
|
|
22
|
-
space: string;
|
|
23
|
-
server: string;
|
|
24
|
-
creds?: string;
|
|
25
|
-
}>;
|
|
26
1
|
export {};
|
|
27
2
|
//# sourceMappingURL=commands.d.ts.map
|
package/dist/commands.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":""}
|
package/dist/commands.js
CHANGED
|
@@ -1,266 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { CotalEndpoint, isReachable, DEFAULT_SERVER, DEFAULT_SPACE, mintCreds, newIdentity, registry, probeConnect, CONTROL_PRIVILEGED, CONTROL_ADMIN, } from "@cotal-ai/core";
|
|
5
|
-
import { authDir, findCotalRoot, loadSpaceAuth, findMesh, isWorkspaceTargetError, resolveMeshTarget, preflightTarget, pruneStaleMeshes, removeMesh, renderWorkspaceError, } from "@cotal-ai/workspace";
|
|
1
|
+
import { isReachable, DEFAULT_SERVER, DEFAULT_SPACE, registry, } from "@cotal-ai/core";
|
|
2
|
+
import { authDir, findCotalRoot, loadSpaceAuth } from "@cotal-ai/workspace";
|
|
6
3
|
import { Manager } from "./manager.js";
|
|
7
4
|
import { loadRoster } from "./roster.js";
|
|
8
5
|
import { loadLaunchSpec, materializePersona, launchAgentToStartOpts } from "./launch.js";
|
|
9
6
|
import {} from "./runtime/index.js";
|
|
10
|
-
import { attachClient } from "./attach-client.js";
|
|
11
7
|
import { c } from "./ui.js";
|
|
12
8
|
/** The space to operate on: explicit `--space`, else this folder's `.cotal/auth` space, else the
|
|
13
9
|
* default — so a manually-run manager matches the folder's mesh instead of assuming the default. */
|
|
14
10
|
function spaceFor(v) {
|
|
15
11
|
return v.space ?? loadSpaceAuth(authDir(findCotalRoot()))?.space ?? DEFAULT_SPACE;
|
|
16
12
|
}
|
|
17
|
-
/** Raw off-registry reachability — one plain sentence, never a registry/stale-entry message and
|
|
18
|
-
* never a prune. Used by the `--creds` and `--server`+unregistered-`--space` escape hatches, which
|
|
19
|
-
* connect to a broker the operator named, not the registry. The manager's copy of the CLI's
|
|
20
|
-
* `reachableOrExit` (an implementation can't import another); the wording lives in `@cotal-ai/workspace`. */
|
|
21
|
-
async function reachableOrExit(server, auth = {}) {
|
|
22
|
-
const probe = await probeConnect(server, auth);
|
|
23
|
-
if (probe.ok)
|
|
24
|
-
return;
|
|
25
|
-
console.error(c.red(renderWorkspaceError({ kind: "reachable", reason: probe.reason, server })));
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
/** Confirm a registry-resolved mesh is up + accepts these creds — replacing the raw NATS auth trace
|
|
29
|
-
* with one sentence and pruning a stale entry. The manager's copy of the CLI's `preflightOrExit`:
|
|
30
|
-
* the probe/classify/render/prune-decision live in `@cotal-ai/workspace` (`preflightTarget`); this owns
|
|
31
|
-
* the I/O — it acts on the prune decision, colours, and exits. */
|
|
32
|
-
async function preflightOrExit(target, probeCreds) {
|
|
33
|
-
const r = await preflightTarget(target, probeCreds);
|
|
34
|
-
if (r.ok)
|
|
35
|
-
return;
|
|
36
|
-
if (r.prune)
|
|
37
|
-
removeMesh(target.space);
|
|
38
|
-
console.error(c.red(renderWorkspaceError({ kind: "preflight", failure: r.kind, target, pruned: r.prune })));
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
/** Resolve which running mesh a control command (`ps`/`start`/`stop`/`attach`) targets, with the
|
|
42
|
-
* same precedence + preflight as the rest of the CLI ({@link resolveMeshTarget} / `connectOrExit`):
|
|
43
|
-
* 1. explicit `--creds` → a raw off-registry connection (plain reachability, no prune). Space
|
|
44
|
-
* defaults to this folder's auth-space via {@link spaceFor} (a deliberate manager-command
|
|
45
|
-
* choice — more correct than `DEFAULT_SPACE` for a non-default-space project, and what these
|
|
46
|
-
* commands did before — NOT `connectOrExit`'s `DEFAULT_SPACE`).
|
|
47
|
-
* 2. `--server` + an UNregistered `--space` → a raw OPEN off-registry connection, no creds (the
|
|
48
|
-
* same escape hatch `connectOrExit` has; plain reachability, no prune).
|
|
49
|
-
* 3. otherwise the registry/`current` resolver, with the same stale-prune + friendly preflight —
|
|
50
|
-
* so `cotal ps --space <name>` reaches that mesh's RECORDED broker instead of silently assuming
|
|
51
|
-
* `DEFAULT_SERVER` (:4222); `--server` overrides. The tier-scoped caller cred (`profile`) is minted
|
|
52
|
-
* from the RESOLVED mesh's own recorded root (so `--space other` loads other's auth, guarded by
|
|
53
|
-
* `targetFromEntry`'s `auth.space === m.space` check), or none for an open mesh.
|
|
54
|
-
* Shares `@cotal-ai/workspace`'s `preflightTarget`/`pruneStaleMeshes` with the CLI, so a dead/mismatched entry gets
|
|
55
|
-
* the same one-sentence message + stale-prune the rest of the CLI gives — not a raw NATS trace. The
|
|
56
|
-
* pre-resolution sweep runs only for bare / `--server`-only resolution; an explicit `--space` is
|
|
57
|
-
* resolved + preflighted directly (so a `--server` override can recover a dead-recorded mesh).
|
|
58
|
-
* `ask()` can therefore trust the target is reachable + auth-valid. */
|
|
59
|
-
export async function resolveManagerTarget(v, profile) {
|
|
60
|
-
if (v.creds) {
|
|
61
|
-
const server = v.server ?? DEFAULT_SERVER;
|
|
62
|
-
const creds = readFileSync(v.creds, "utf8");
|
|
63
|
-
await reachableOrExit(server, { creds });
|
|
64
|
-
return { space: spaceFor(v), server, creds };
|
|
65
|
-
}
|
|
66
|
-
// A raw OPEN off-registry mesh: explicit `--server` + a `--space` that isn't registered. Naming
|
|
67
|
-
// both is as deliberate as `--creds`, but an open broker has no creds to pass — connect bare,
|
|
68
|
-
// off-registry (no registry lookup, no prune). Mirrors `connectOrExit`'s same-shaped escape hatch;
|
|
69
|
-
// a registered `--space` still goes through the resolver below (which honors `--server` as override).
|
|
70
|
-
if (v.server && v.space && !findMesh(v.space)) {
|
|
71
|
-
await reachableOrExit(v.server, {});
|
|
72
|
-
return { space: v.space, server: v.server, creds: undefined };
|
|
73
|
-
}
|
|
74
|
-
// Sweep dead entries before resolving ONLY when we must CHOOSE one (bare / `--server`-only). An
|
|
75
|
-
// explicit `--space` names its target, so pre-pruning would erase a dead-recorded mesh that the
|
|
76
|
-
// operator is recovering with a live `--server` override — resolve it and let preflight verify +
|
|
77
|
-
// prune-on-dead (with the friendly message), honoring the override. Without `--space`, a dead
|
|
78
|
-
// entry must not be offered, so the sweep stays.
|
|
79
|
-
if (!v.space)
|
|
80
|
-
await pruneStaleMeshes();
|
|
81
|
-
let target;
|
|
82
|
-
try {
|
|
83
|
-
target = resolveMeshTarget(process.cwd(), { server: v.server, space: v.space });
|
|
84
|
-
}
|
|
85
|
-
catch (e) {
|
|
86
|
-
if (isWorkspaceTargetError(e)) {
|
|
87
|
-
console.error(c.red(renderWorkspaceError({ kind: "target", error: e })));
|
|
88
|
-
process.exit(1);
|
|
89
|
-
}
|
|
90
|
-
throw e;
|
|
91
|
-
}
|
|
92
|
-
const creds = target.auth ? await mintCreds(target.auth, newIdentity(), profile) : undefined;
|
|
93
|
-
await preflightOrExit(target, creds);
|
|
94
|
-
return { space: target.space, server: target.server, creds };
|
|
95
|
-
}
|
|
96
|
-
function parse(argv) {
|
|
97
|
-
const { values, positionals } = parseArgs({
|
|
98
|
-
args: argv,
|
|
99
|
-
allowPositionals: true,
|
|
100
|
-
options: {
|
|
101
|
-
space: { type: "string" },
|
|
102
|
-
server: { type: "string" },
|
|
103
|
-
name: { type: "string" },
|
|
104
|
-
role: { type: "string" },
|
|
105
|
-
agent: { type: "string" },
|
|
106
|
-
config: { type: "string" },
|
|
107
|
-
model: { type: "string" }, // start: model override, wins over the agent file's `model:`
|
|
108
|
-
resume: { type: "string" }, // start: fork an existing session id into the mesh (host-local; claude only)
|
|
109
|
-
roster: { type: "string" },
|
|
110
|
-
creds: { type: "string" },
|
|
111
|
-
runtime: { type: "string" }, // supervise: force pty | tmux | cmux (default pty)
|
|
112
|
-
"console-port": { type: "string" },
|
|
113
|
-
drive: { type: "boolean" },
|
|
114
|
-
transcript: { type: "boolean" },
|
|
115
|
-
"no-transcript": { type: "boolean" },
|
|
116
|
-
spawn: { type: "string" }, // comma-separated agent names to pre-spawn at startup
|
|
117
|
-
launch: { type: "string" }, // supervise: a resolved mesh-manifest launch spec (cotal up -f / spawn -f)
|
|
118
|
-
cwd: { type: "string" }, // working directory to root the spawned agent at
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
// These commands are flags-only — reject stray positionals instead of silently ignoring them
|
|
122
|
-
// (e.g. `cotal supervise up`, fat-fingering `cotal up`).
|
|
123
|
-
if (positionals.length) {
|
|
124
|
-
const x = positionals[0];
|
|
125
|
-
const hint = x === "up" ? " — did you mean `cotal up`?" : x === "go" ? " — did you mean `cotal go`?" : "";
|
|
126
|
-
console.error(c.red(`✗ unexpected argument: ${x}${hint}`));
|
|
127
|
-
process.exit(1);
|
|
128
|
-
}
|
|
129
|
-
return values;
|
|
130
|
-
}
|
|
131
|
-
/** Connect a short-lived client with the resolved creds, send one control request to the manager,
|
|
132
|
-
* disconnect. The target is already reachability- + auth-preflighted by {@link resolveManagerTarget}
|
|
133
|
-
* (which prints the friendly message + prunes on failure), so this connects straight through. `tier`
|
|
134
|
-
* picks the control subject: privileged for start/ps; admin for the operator's cross-agent ops
|
|
135
|
-
* (stop/attach/purge), which the manager refuses on the privileged subject for a non-owner. `creds`
|
|
136
|
-
* is the tier-scoped caller cred resolved by {@link resolveManagerTarget} (`control-caller-privileged`
|
|
137
|
-
* for start/ps, `control-caller-admin` for stop/attach — each holds ONLY its own tier's pub grant, so
|
|
138
|
-
* `tier` here matches the cred the caller minted), or undefined on an open mesh. */
|
|
139
|
-
async function ask(space, server, op, args, creds, tier = CONTROL_PRIVILEGED) {
|
|
140
|
-
const ep = new CotalEndpoint({
|
|
141
|
-
space,
|
|
142
|
-
servers: server,
|
|
143
|
-
creds,
|
|
144
|
-
channels: [],
|
|
145
|
-
consume: false, // request/reply only — binds no consumers (and under auth has no pre-created DM durable)
|
|
146
|
-
registerPresence: false,
|
|
147
|
-
watchPresence: false,
|
|
148
|
-
card: { name: "cli", kind: "endpoint" },
|
|
149
|
-
});
|
|
150
|
-
ep.on("error", (e) => console.error(c.red("! " + e.message)));
|
|
151
|
-
await ep.start();
|
|
152
|
-
try {
|
|
153
|
-
return await ep.requestControl(tier, { op, args });
|
|
154
|
-
}
|
|
155
|
-
catch (e) {
|
|
156
|
-
return { ok: false, error: `no manager reachable (${e.message})` };
|
|
157
|
-
}
|
|
158
|
-
finally {
|
|
159
|
-
await ep.stop();
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
function failIfNotOk(reply) {
|
|
163
|
-
if (!reply.ok) {
|
|
164
|
-
console.error(c.red(`✗ ${reply.error ?? "error"}`));
|
|
165
|
-
process.exit(1);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
async function start(argv) {
|
|
169
|
-
const v = parse(argv);
|
|
170
|
-
if (!v.name) {
|
|
171
|
-
console.error(c.red("--name is required"));
|
|
172
|
-
process.exit(1);
|
|
173
|
-
}
|
|
174
|
-
// `--resume ""` asked to resume but named no session — fail loud, don't silently start fresh.
|
|
175
|
-
if (v.resume !== undefined && !v.resume.trim()) {
|
|
176
|
-
console.error(c.red("--resume needs a session id (got an empty value)"));
|
|
177
|
-
process.exit(1);
|
|
178
|
-
}
|
|
179
|
-
const t = await resolveManagerTarget(v, "control-caller-privileged");
|
|
180
|
-
const reply = await ask(t.space, t.server, "start", {
|
|
181
|
-
name: v.name,
|
|
182
|
-
role: v.role,
|
|
183
|
-
agent: v.agent,
|
|
184
|
-
config: v.config,
|
|
185
|
-
model: v.model,
|
|
186
|
-
resume: v.resume, // fork an existing session into the mesh (host-local id; caveated for detached start — see docs)
|
|
187
|
-
// Opt-in: only sent when `--transcript` is given; absent => the daemon's default (mirror off).
|
|
188
|
-
transcript: v.transcript ? true : undefined,
|
|
189
|
-
cwd: v.cwd,
|
|
190
|
-
}, t.creds);
|
|
191
|
-
failIfNotOk(reply);
|
|
192
|
-
const d = reply.data;
|
|
193
|
-
console.log(c.green(`✓ started ${c.bold(d.name)}`) +
|
|
194
|
-
c.dim(` (${d.role ?? "no role"} · ${d.agent} · ${d.mode})`));
|
|
195
|
-
}
|
|
196
|
-
async function stop(argv) {
|
|
197
|
-
const v = parse(argv);
|
|
198
|
-
if (!v.name) {
|
|
199
|
-
console.error(c.red("--name is required"));
|
|
200
|
-
process.exit(1);
|
|
201
|
-
}
|
|
202
|
-
// Operator stop is a cross-agent (admin) op — the CLI operator isn't the agent's spawner, so the
|
|
203
|
-
// privileged subject would reject it; the admin tier reaches any agent. The scoped `control-caller-admin`
|
|
204
|
-
// cred holds ONLY `ctl.<admin>.<id>` (that IS the cross-agent authority — the manager doesn't re-check
|
|
205
|
-
// the caller), so it reaches this op and nothing else.
|
|
206
|
-
const t = await resolveManagerTarget(v, "control-caller-admin");
|
|
207
|
-
const reply = await ask(t.space, t.server, "stop", {
|
|
208
|
-
name: v.name,
|
|
209
|
-
}, t.creds, CONTROL_ADMIN);
|
|
210
|
-
failIfNotOk(reply);
|
|
211
|
-
console.log(c.dim(`✓ stopped ${v.name}`));
|
|
212
|
-
}
|
|
213
|
-
async function ps(argv) {
|
|
214
|
-
const v = parse(argv);
|
|
215
|
-
const t = await resolveManagerTarget(v, "control-caller-privileged");
|
|
216
|
-
const reply = await ask(t.space, t.server, "ps", undefined, t.creds);
|
|
217
|
-
failIfNotOk(reply);
|
|
218
|
-
const rows = reply.data ?? [];
|
|
219
|
-
if (!rows.length) {
|
|
220
|
-
console.log(c.dim("(no managed agents)"));
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
for (const r of rows) {
|
|
224
|
-
const status = r.mesh === "absent"
|
|
225
|
-
? c.yellow("starting…")
|
|
226
|
-
: r.mesh === "offline"
|
|
227
|
-
? c.dim("offline")
|
|
228
|
-
: r.mesh === "working"
|
|
229
|
-
? c.green("working")
|
|
230
|
-
: r.mesh === "waiting"
|
|
231
|
-
? c.yellow("waiting")
|
|
232
|
-
: c.cyan(r.mesh);
|
|
233
|
-
console.log(`${c.bold(r.name)}${r.role ? c.dim("/" + r.role) : ""} ${c.dim(r.agent + " · " + r.mode)} ${status}`);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
async function attach(argv) {
|
|
237
|
-
const v = parse(argv);
|
|
238
|
-
if (!v.name) {
|
|
239
|
-
console.error(c.red("--name is required"));
|
|
240
|
-
process.exit(1);
|
|
241
|
-
}
|
|
242
|
-
// Operator attach is a cross-agent (admin) op — same reasoning as stop (the operator isn't the
|
|
243
|
-
// spawner; admin reaches any agent). Scoped `control-caller-admin`: ctl.<admin> only.
|
|
244
|
-
const t = await resolveManagerTarget(v, "control-caller-admin");
|
|
245
|
-
const reply = await ask(t.space, t.server, "attach", {
|
|
246
|
-
name: v.name,
|
|
247
|
-
}, t.creds, CONTROL_ADMIN);
|
|
248
|
-
failIfNotOk(reply);
|
|
249
|
-
const { ws } = reply.data;
|
|
250
|
-
console.error(c.dim(`attached to ${v.name} — Ctrl-] to detach`));
|
|
251
|
-
await attachClient(ws);
|
|
252
|
-
console.error(c.dim(`\ndetached from ${v.name}`));
|
|
253
|
-
}
|
|
254
13
|
/** Run a manager daemon in this process (the long-lived supervisor), then block.
|
|
255
14
|
* `pty` ships with the manager; `tmux` and `cmux` need their integration imported by
|
|
256
|
-
* the composition root (the `cotal` binary does). Stays alive until SIGINT/SIGTERM.
|
|
15
|
+
* the composition root (the `cotal` binary does). Stays alive until SIGINT/SIGTERM.
|
|
16
|
+
*
|
|
17
|
+
* The operator CLIENTS of this daemon — detached launch (`cotal spawn --detach`), `stop`, `ps`,
|
|
18
|
+
* `attach` — live in `@cotal-ai/cli` since stage 2a of the CLI rework: they are thin control-plane
|
|
19
|
+
* request/reply commands, not daemon code. This package registers only the daemon runner. */
|
|
257
20
|
// `--runtime` forces the manager runtime; honored only on the `supervise` path (default
|
|
258
21
|
// pty). `cmux` gives each teammate its own cmux tab — `cotal supervise --runtime cmux` is
|
|
259
|
-
// the cmux-tab manager.
|
|
260
|
-
// contiguous, which is what `cmuxManagerRunning` pgreps for.
|
|
22
|
+
// the cmux-tab manager.
|
|
261
23
|
const RUNTIME_OVERRIDES = ["pty", "tmux", "cmux"];
|
|
262
|
-
async function runManager(
|
|
263
|
-
const v =
|
|
24
|
+
async function runManager(args, defaultRuntime) {
|
|
25
|
+
const v = args.values;
|
|
264
26
|
let runtime = defaultRuntime;
|
|
265
27
|
if (defaultRuntime === "auto" && v.runtime) {
|
|
266
28
|
if (!RUNTIME_OVERRIDES.includes(v.runtime)) {
|
|
@@ -295,13 +57,13 @@ async function runManager(argv, defaultRuntime) {
|
|
|
295
57
|
console.log(c.green("✓ manager up") +
|
|
296
58
|
c.dim(` (space ${space} · ${mgr.runtimeKind})`) +
|
|
297
59
|
`\n console: ${mgr.consoleUrl}` +
|
|
298
|
-
c.dim("\n spawn: cotal
|
|
60
|
+
c.dim("\n spawn: cotal spawn --detach <persona> · stop: cotal stop --name <n> (Ctrl-C to shut down)"));
|
|
299
61
|
// Register shutdown handlers before any spawning, so a Ctrl-C during the (possibly slow,
|
|
300
62
|
// staggered) boot tears the manager and its spawned teammates down rather than orphaning them.
|
|
301
63
|
const shutdown = () => void mgr.stop().then(() => process.exit(0));
|
|
302
64
|
process.on("SIGINT", shutdown);
|
|
303
65
|
process.on("SIGTERM", shutdown);
|
|
304
|
-
// Declarative boot: bring up each rostered agent through the same spawn path as
|
|
66
|
+
// Declarative boot: bring up each rostered agent through the same spawn path as a detached spawn.
|
|
305
67
|
// A failed entry is logged but non-fatal — healthy agents stay up and the operator can
|
|
306
68
|
// fix the roster without the supervisor crash-looping.
|
|
307
69
|
for (const entry of roster) {
|
|
@@ -366,44 +128,24 @@ async function runManager(argv, defaultRuntime) {
|
|
|
366
128
|
}
|
|
367
129
|
await new Promise(() => { });
|
|
368
130
|
}
|
|
369
|
-
/** The manager's
|
|
370
|
-
*
|
|
371
|
-
* binary resolves them from the registry. */
|
|
131
|
+
/** The manager's one command: the `supervise` daemon runner. Self-registered on import; the
|
|
132
|
+
* `cotal` binary resolves it from the registry. */
|
|
372
133
|
const managerCommands = [
|
|
373
134
|
{
|
|
374
135
|
kind: "command",
|
|
375
136
|
name: "supervise",
|
|
376
137
|
group: "Manager",
|
|
377
138
|
summary: "run a manager — [--runtime <pty|tmux|cmux>] (default pty; tmux/cmux are explicit-only, each teammate in its own window/tab) [--space <s>] [--server <url>] [--console-port <n>] [--roster <file>] [--launch <spec>]",
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
kind: "command",
|
|
389
|
-
name: "stop",
|
|
390
|
-
group: "Control plane",
|
|
391
|
-
summary: "ask the manager to stop an agent — --name <n>",
|
|
392
|
-
run: stop,
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
kind: "command",
|
|
396
|
-
name: "ps",
|
|
397
|
-
group: "Control plane",
|
|
398
|
-
summary: "list managed agents + their mesh status",
|
|
399
|
-
run: ps,
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
kind: "command",
|
|
403
|
-
name: "attach",
|
|
404
|
-
group: "Control plane",
|
|
405
|
-
summary: "stream + drive an agent's terminal (pty runtime) — --name <n>",
|
|
406
|
-
run: attach,
|
|
139
|
+
flags: [
|
|
140
|
+
{ name: "space", type: "string", value: "<s>", description: "space to supervise (default: this folder's auth space)" },
|
|
141
|
+
{ name: "server", type: "string", value: "<url>", description: "broker URL (default: the local mesh)" },
|
|
142
|
+
{ name: "runtime", type: "string", value: "<pty|tmux|cmux>", description: "agent runtime (default pty; tmux/cmux are explicit-only)" },
|
|
143
|
+
{ name: "console-port", type: "string", value: "<n>", description: "protocol-console port" },
|
|
144
|
+
{ name: "roster", type: "string", value: "<file>", description: "declarative roster to boot at startup" },
|
|
145
|
+
{ name: "launch", type: "string", value: "<spec>", description: "resolved mesh-manifest launch spec (cotal up -f / spawn -f)" },
|
|
146
|
+
{ name: "spawn", type: "string", value: "<names>", description: "comma-separated personas to pre-spawn at startup" },
|
|
147
|
+
],
|
|
148
|
+
run: (args) => runManager(args, "auto"),
|
|
407
149
|
},
|
|
408
150
|
];
|
|
409
151
|
registry.register(...managerCommands);
|
package/dist/commands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,aAAa,EACb,WAAW,EACX,cAAc,EACd,aAAa,EACb,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,aAAa,GAKd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,OAA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E,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,0DAA0D,EAAE;YACtI,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE;YAC5F,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,uCAAuC,EAAE;YACzG,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,6DAA6D,EAAE;YAC/H,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,kDAAkD,EAAE;SACrH;QACD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC;KACxC;CACF,CAAC;AAEF,QAAQ,CAAC,QAAQ,CAAC,GAAG,eAAe,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./commands.js";
|
|
2
|
-
export { Manager, type ManagerOptions } from "./manager.js";
|
|
2
|
+
export { Manager, READINESS_TIMEOUT_MS, type ManagerOptions } from "./manager.js";
|
|
3
3
|
export { createRuntime } from "./runtime/index.js";
|
|
4
4
|
export type { Runtime, AgentHandle, AttachSession, RuntimeKind, RuntimeMode } from "./runtime/index.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./commands.js"; // self-registers the control-plane commands on import
|
|
2
|
-
export { Manager } from "./manager.js";
|
|
2
|
+
export { Manager, READINESS_TIMEOUT_MS } from "./manager.js";
|
|
3
3
|
export { createRuntime } from "./runtime/index.js";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC,CAAC,sDAAsD;AAE9E,OAAO,EAAE,OAAO,EAAuB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC,CAAC,sDAAsD;AAE9E,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAuB,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/launch.d.ts
CHANGED
|
@@ -10,16 +10,17 @@ export declare function loadLaunchSpec(path: string): MeshLaunchSpec;
|
|
|
10
10
|
* applies, and the spec's self-declared `runId` must match the requested one. */
|
|
11
11
|
export declare function launchSpecForRun(root: string, runId: string): MeshLaunchSpec;
|
|
12
12
|
/** Materialize one resolved agent's persona to a transient file the connector reads, and return its
|
|
13
|
-
* path. Carries only what a connector needs (identity/role/model/description + body) plus a loud
|
|
13
|
+
* path. Carries only what a connector needs (identity/role/model/variant/description + body) plus a loud
|
|
14
14
|
* generated-artifact header — never ACL/capability frontmatter (creds come from the spec's policy). */
|
|
15
15
|
export declare function materializePersona(root: string, runId: string, a: MeshLaunchAgent): string;
|
|
16
|
-
/** Build the manager spawn opts for a launch agent: identity/role/model + the resolved object
|
|
16
|
+
/** Build the manager spawn opts for a launch agent: identity/role/model/variant + the resolved object
|
|
17
17
|
* (which carries the ACL authority) + the materialized configPath. */
|
|
18
18
|
export declare function launchAgentToStartOpts(a: MeshLaunchAgent, configPath: string): {
|
|
19
19
|
name: string;
|
|
20
20
|
agent: string;
|
|
21
21
|
role?: string;
|
|
22
22
|
model?: string;
|
|
23
|
+
variant?: string;
|
|
23
24
|
config: string;
|
|
24
25
|
resolved: MeshLaunchAgent;
|
|
25
26
|
};
|
package/dist/launch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgG,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgG,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAyCzK;qGACqG;AACrG,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAe3D;AAED;;;;;kFAKkF;AAClF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAe5E;AA2BD;;wGAEwG;AACxG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,eAAe,GAAG,MAAM,CAkB1F;AAED;uEACuE;AACvE,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,GAAG;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAEA"}
|
package/dist/launch.js
CHANGED
|
@@ -21,6 +21,7 @@ const LaunchAgentSchema = z.strictObject({
|
|
|
21
21
|
agent: z.string().regex(TOKEN, "agent must be a connector token ([A-Za-z0-9_-])"),
|
|
22
22
|
role: z.string().regex(TOKEN, "role must be a route-safe token ([A-Za-z0-9_-])").optional(),
|
|
23
23
|
model: z.string().optional(),
|
|
24
|
+
variant: z.string().min(1).optional(),
|
|
24
25
|
description: z.string().optional(),
|
|
25
26
|
body: z.string().optional(),
|
|
26
27
|
capabilities: z.array(z.string().regex(TOKEN, "capability must be a safe token ([A-Za-z0-9_-])")).optional(),
|
|
@@ -110,7 +111,7 @@ function validateLaunchPolicy(a) {
|
|
|
110
111
|
throw new Error(`${where}: unknown capability "${cap}" (known: ${[...KNOWN_CAPABILITIES].join(", ")})`);
|
|
111
112
|
}
|
|
112
113
|
/** Materialize one resolved agent's persona to a transient file the connector reads, and return its
|
|
113
|
-
* path. Carries only what a connector needs (identity/role/model/description + body) plus a loud
|
|
114
|
+
* path. Carries only what a connector needs (identity/role/model/variant/description + body) plus a loud
|
|
114
115
|
* generated-artifact header — never ACL/capability frontmatter (creds come from the spec's policy). */
|
|
115
116
|
export function materializePersona(root, runId, a) {
|
|
116
117
|
// 0700 dirs created component-by-component, refusing a symlinked parent (writes can't escape the
|
|
@@ -124,6 +125,8 @@ export function materializePersona(root, runId, a) {
|
|
|
124
125
|
fm.push(`role: ${scalar(a.role)}`);
|
|
125
126
|
if (a.model)
|
|
126
127
|
fm.push(`model: ${scalar(a.model)}`);
|
|
128
|
+
if (a.variant)
|
|
129
|
+
fm.push(`variant: ${scalar(a.variant)}`);
|
|
127
130
|
if (a.description)
|
|
128
131
|
fm.push(`description: ${scalar(a.description)}`);
|
|
129
132
|
fm.push("---", "");
|
|
@@ -134,10 +137,10 @@ export function materializePersona(root, runId, a) {
|
|
|
134
137
|
writeFileSync(path, `${fm.join("\n")}${header}\n\n${body}`, { mode: 0o600, flag: "wx" });
|
|
135
138
|
return path;
|
|
136
139
|
}
|
|
137
|
-
/** Build the manager spawn opts for a launch agent: identity/role/model + the resolved object
|
|
140
|
+
/** Build the manager spawn opts for a launch agent: identity/role/model/variant + the resolved object
|
|
138
141
|
* (which carries the ACL authority) + the materialized configPath. */
|
|
139
142
|
export function launchAgentToStartOpts(a, configPath) {
|
|
140
|
-
return { name: a.name, agent: a.agent, role: a.role, model: a.model, config: configPath, resolved: a };
|
|
143
|
+
return { name: a.name, agent: a.agent, role: a.role, model: a.model, variant: a.variant, config: configPath, resolved: a };
|
|
141
144
|
}
|
|
142
145
|
/** Quote a frontmatter scalar so the agent-file parser reads it back unchanged (it strips a matching
|
|
143
146
|
* outer quote pair). Plain tokens pass through; anything with structural chars is double-quoted. */
|
package/dist/launch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAA6C,MAAM,gBAAgB,CAAC;AAEzK;;;;;;;;GAQG;AAEH,6F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;qGACqG;AACrG,SAAS,MAAM,CAAC,CAAS;IACvB,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IACxE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC;IAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
package/dist/manager.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type { ControlReply, MeshLaunchAgent } from "@cotal-ai/core";
|
|
2
2
|
import { type RuntimeMode } from "./runtime/index.js";
|
|
3
|
+
/** Backstop for the detached-launch readiness race (#159 B1). `startAgent` waits on two REAL outcomes —
|
|
4
|
+
* the assigned id joining the mesh (presence) = started, the child process exiting = failed — NOT a
|
|
5
|
+
* liveness-inferring timer. This is only the last-resort bound for "neither happened in time": the launch
|
|
6
|
+
* is then reported UNCERTAIN (a non-success reply that does NOT deprovision — it may still be booting, or
|
|
7
|
+
* stuck before connector startup). Generous, since a real cold agent join can take several seconds. Held
|
|
8
|
+
* as an instance field ({@link Manager.readinessTimeoutMs}) so a test can shorten it. Exported so the
|
|
9
|
+
* launch-parity smoke can assert every launch client's request timeout OUTLIVES this window — the tier
|
|
10
|
+
* rule forbids the clients importing it directly. */
|
|
11
|
+
export declare const READINESS_TIMEOUT_MS = 30000;
|
|
3
12
|
export interface ManagerOptions {
|
|
4
13
|
space: string;
|
|
5
14
|
servers?: string;
|
|
@@ -17,14 +26,20 @@ export interface StartAgentOpts {
|
|
|
17
26
|
* `.cotal/agents/<name>.md`. NOT the mesh identity: the spawned peer presents under the file's
|
|
18
27
|
* own `name:` (auto-numbered on collision). The file must exist (no silent default-ACL fallback). */
|
|
19
28
|
name: string;
|
|
20
|
-
/** Connector / agent type — resolved from the registry. Defaults to `"cotal"`. */
|
|
29
|
+
/** Connector / agent type — resolved from the registry. Defaults to `COTAL_DEFAULT_AGENT`, else `"cotal"`. */
|
|
21
30
|
agent?: string;
|
|
22
31
|
role?: string;
|
|
23
32
|
/** Explicit agent-file path that overrides the `name` ref for *which file to load* (identity still
|
|
24
33
|
* comes from that file's `name:`). The file must exist. */
|
|
25
34
|
config?: string;
|
|
35
|
+
/** Presence-identity OVERRIDE (the `--name` flag with a positional/`--config` naming the file):
|
|
36
|
+
* wins over the persona file's `name:`, exactly as in foreground `cotal spawn`. Imperative-only —
|
|
37
|
+
* a manifest launch (`resolved`) is the identity authority and rejects it. */
|
|
38
|
+
identity?: string;
|
|
26
39
|
/** Model override (the `--model` flag). Takes precedence over the agent file's `model:`. */
|
|
27
40
|
model?: string;
|
|
41
|
+
/** Model variant override (the `--variant` flag). Takes precedence over the agent file's `variant:`. */
|
|
42
|
+
variant?: string;
|
|
28
43
|
/** Opaque host-local session id to FORK into the mesh (the `--resume` flag), forwarded verbatim to
|
|
29
44
|
* the connector. Only ever set from imperative control args (`opStart`), NEVER from `resolved` —
|
|
30
45
|
* the manifest path stays resume-free by construction. Unsupported connectors throw at buildLaunch. */
|
|
@@ -32,6 +47,19 @@ export interface StartAgentOpts {
|
|
|
32
47
|
/** Mirror the session's transcript to `tr-<name>`. Defaults to off; `true` (the
|
|
33
48
|
* `--transcript` flag) opts in. */
|
|
34
49
|
transcript?: boolean;
|
|
50
|
+
/** Initial prompt auto-submitted at session start (the `--prompt` flag), forwarded verbatim to
|
|
51
|
+
* the connector. Imperative-only: never set from `resolved` (a manifest carries no prompt). */
|
|
52
|
+
prompt?: string;
|
|
53
|
+
/** Access-policy overrides (the `--subscribe` / `--allow-subscribe` / `--allow-publish` flags):
|
|
54
|
+
* win over the persona file exactly as in foreground `cotal spawn`, and are minted into the
|
|
55
|
+
* creds AND forwarded to the connector from ONE source. Imperative-only — a manifest launch
|
|
56
|
+
* (`resolved`) is the access authority and rejects these. */
|
|
57
|
+
subscribe?: string[];
|
|
58
|
+
allowSubscribe?: string[];
|
|
59
|
+
allowPublish?: string[];
|
|
60
|
+
/** `--share-tools` selection narrowing which of the operator's configured MCP servers this
|
|
61
|
+
* agent gets (absent → all declared for the connector — the pre-merge manager behavior). */
|
|
62
|
+
shareTools?: string;
|
|
35
63
|
/** A fully-resolved launch profile (from a mesh manifest via `supervise --launch`). When present,
|
|
36
64
|
* `startAgent` takes identity/role/ACLs/capabilities/model from here — NOT from a persona file —
|
|
37
65
|
* and `config` points at the materialized transient persona the connector reads. The persona file
|
|
@@ -166,6 +194,9 @@ export declare class Manager {
|
|
|
166
194
|
waitForPresence(name: string, timeoutMs?: number): Promise<boolean>;
|
|
167
195
|
/** Parse an untyped control-plane `start` request into {@link StartAgentOpts}. */
|
|
168
196
|
private opStart;
|
|
197
|
+
/** Return connector-provided model catalogs for selector UIs. Optional by connector: a host with no
|
|
198
|
+
* local model-list API reports `supported:false` rather than blocking the manager. */
|
|
199
|
+
private opModels;
|
|
169
200
|
/** Boot one resolved agent from a mesh-manifest launch spec, for `cotal spawn -f` onto a RUNNING
|
|
170
201
|
* manager. The request carries a `{ runId, name }`, NEVER a path: the manager derives + validates
|
|
171
202
|
* `.cotal/run/<runId>.json` itself ({@link launchSpecForRun} — token-safe id, no-follow,
|