@cotal-ai/cli 0.92.2 → 0.94.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.
@@ -1,346 +0,0 @@
1
- /**
2
- * `cotal spawn -f cotal.yaml` — deploy a mesh manifest onto a RUNNING mesh (additive). The only
3
- * command that touches a mesh it doesn't own, so it is creation-only + ownership-scoped:
4
- *
5
- * - classifies channels (new → seed + own · existing → `exists-unmanaged`, card untouched) and
6
- * agents (will-create · already-owned · stale) against the live mesh + any prior ledger;
7
- * - boots agents through the serving manager's admin `launch` op — a manager in THIS checkout
8
- * reads the run spec by id; a manager in another checkout/host gets the resolved spec pushed
9
- * inline over the control plane (it validates + persists it itself, and mints from the resolved
10
- * policy — the control wire carries no authority, and never a path);
11
- * - records exactly what it created in a `cotal-ledger/v1` ledger so `down -f` removes only that;
12
- * - flags unmanaged actors on declared channels as a SECURITY warning (an explicit lower bound).
13
- *
14
- * `--dry-run` prints the plan and mutates nothing; a stale declared agent exits non-zero unless
15
- * `--allow-stale <names>`.
16
- */
17
- import { readFileSync } from "node:fs";
18
- import { resolve } from "node:path";
19
- import { DEFAULT_SERVER, MANAGER_LEASE_TTL_MS, mintCreds, newIdentity, principalKey, readChannelRegistry, seedChannelRegistry, } from "@cotal-ai/core";
20
- import { findMesh } from "@cotal-ai/workspace";
21
- import { c } from "../ui.js";
22
- import { cotalRoot } from "../lib/paths.js";
23
- import { connectOrExit, userViewAuthOrExit } from "../lib/connect.js";
24
- import { assertManagerRecordReplaceable, managerLogDisplayPath, startManagerDetached } from "../lib/manager-proc.js";
25
- import { loadManifest } from "../lib/manifest/index.js";
26
- import { buildLaunchSpec, channelsSeed, genRunId, preflightConnectors, writeLaunchSpec } from "../lib/manifest/apply.js";
27
- import { buildLedger, buildLedgerAgentRow, hashManifestSource, listLedgers, writeLedger } from "../lib/manifest/ledger.js";
28
- import { classifyAgents, classifyChannels, detectUnmanagedActors } from "../lib/manifest/spawn-plan.js";
29
- import { connectProbe, launchAgent, settleRoster, waitLeaseGone, waitManagerReady } from "../lib/manifest/live.js";
30
- import { renderInherited, renderSpawnPlan, renderSpawnSummary, renderWarnings } from "../lib/manifest/render.js";
31
- import { serverUrlProblems } from "../lib/manifest/resolve.js";
32
- import { failManifest, refuseManifestSpaceMismatch } from "./topology.js";
33
- import { preflightRuntime } from "../ext-loader.js";
34
- /** Short control-plane probe to tell a LIVE lease-holder from a stale lease a crashed manager left
35
- * behind (its key lingers until the bucket TTL). Kept well under {@link MANAGER_LEASE_TTL_MS}. */
36
- const MANAGER_PROBE_MS = 3_000;
37
- export async function spawnManifest(file, flags) {
38
- const abs = resolve(file);
39
- let prepared;
40
- try {
41
- prepared = loadManifest(abs);
42
- }
43
- catch (e) {
44
- failManifest(e);
45
- }
46
- refuseManifestSpaceMismatch(prepared, flags.space);
47
- const serverProblems = flags.server === undefined ? [] : serverUrlProblems(flags.server, "--server");
48
- if (serverProblems.length) {
49
- for (const problem of serverProblems)
50
- console.error(c.red(`✗ ${problem}`));
51
- process.exit(1);
52
- }
53
- const eff = applyOverrides(prepared, flags);
54
- const m = eff.manifest;
55
- const space = m.space;
56
- const runtime = m.runtime ?? "pty";
57
- // Connectors + their binaries must exist before any mutation (no fallback).
58
- const connErr = await preflightConnectors(eff);
59
- if (connErr) {
60
- console.error(c.red(`✗ connector preflight failed: ${connErr}`));
61
- process.exit(1);
62
- }
63
- // spawn -f deploys onto a RUNNING mesh — the broker MUST be reachable (opposite of up -f). Resolve
64
- // the mesh + mint a scoped `deployer` cred from the local registry/auth (same-checkout): the one
65
- // connectProbe endpoint below reads live state (roster/registry/membership/lease) AND control-
66
- // calls the manager's `launch`/`ps` — no `$JS.>`, no STREAM.DELETE, no DM read, no self-post. The
67
- // channel SEED rides a separate `channel-writer` cred (below), so the deploy cred writes no KV.
68
- //
69
- // USER MODE: the same read/probe surface rides a "deployer" VIEW bearer — exchange-gated on
70
- // ledger scope "spawn" (deploying YOUR OWN team is spawn-grade, the own-agent owner-domain
71
- // model) — with the control calls on the PRIVILEGED tier, where the manager enforces that the
72
- // launch spec's stamped owner equals the caller's owner. The channel seed alone stays
73
- // operator-grade (a "channel-writer" view, scope "admin", below).
74
- const connection = await connectOrExit({ server: m.broker?.servers ?? flags.server, space }, "deployer");
75
- const user = connection.bearer ? await userViewAuthOrExit(connection, "deployer") : undefined;
76
- const root = cotalRoot();
77
- // Deploy-home invariant (UX): the ledger and any locally-minted creds live under THIS checkout's
78
- // `.cotal`, and `down -f` later resolves them from here — so the deploy must run from the
79
- // checkout the mesh is REGISTERED to on this machine. (The serving MANAGER may live elsewhere;
80
- // that's the remote path below.) A raw off-registry target (no recorded root) isn't supported
81
- // for a manifest deploy.
82
- if (!connection.root) {
83
- console.error(c.red(`✗ spawn -f needs a mesh registered to this checkout - a raw off-registry target (--server/--space) isn't supported for a manifest deploy`));
84
- process.exit(1);
85
- }
86
- if (resolve(connection.root) !== resolve(root)) {
87
- console.error(c.red(`✗ mesh "${space}" is registered to another checkout on this machine (${connection.root}) - run \`spawn -f\` / \`down -f\` from there (the deploy's ledger lives with the registration)`));
88
- process.exit(1);
89
- }
90
- const manifestHash = hashManifestSource(readFileSync(abs, "utf8"));
91
- // A prior ledger for this manifest content ⇒ a re-apply (reuse its runId, classify against it).
92
- // listLedgers fails closed (throws) on a symlinked `.cotal/manifests` — surface it cleanly.
93
- let priors;
94
- try {
95
- priors = listLedgers(root).filter((l) => l.ledger.manifestHash === manifestHash && l.ledger.space === space);
96
- }
97
- catch (e) {
98
- console.error(c.red(`✗ ${e.message}`));
99
- process.exit(1);
100
- }
101
- if (priors.length > 1) {
102
- console.error(c.red(`✗ ${priors.length} runs already deployed this manifest (${priors.map((p) => p.ledger.runId).join(", ")}) - tear one down first: \`cotal down -f ${file} --run <id>\``));
103
- process.exit(1);
104
- }
105
- const prior = priors[0]?.ledger;
106
- const runId = prior?.runId ?? genRunId();
107
- const ownedKeys = new Set(prior?.created.channels ?? []);
108
- const ownedIds = new Set((prior?.created.agents ?? []).map((a) => a.id));
109
- const ownedNames = new Set((prior?.created.agents ?? []).map((a) => a.name));
110
- const liveRegistry = await readChannelRegistry({
111
- servers: connection.server,
112
- space,
113
- ...(user ? { bearer: user.bearer, sentinelCreds: user.sentinelCreds } : { creds: connection.creds }),
114
- });
115
- const ep = await connectProbe({
116
- space,
117
- server: connection.server,
118
- creds: connection.creds,
119
- lifecycleUid: user ? user.lifecycleUid : connection.epCaller?.uid,
120
- user: user ? { source: user.source, sentinelCreds: user.sentinelCreds, owner: user.owner, actor: user.actor } : undefined,
121
- });
122
- try {
123
- const roster = await settleRoster(ep);
124
- const membership = await ep.readMembership().catch((e) => {
125
- // An open mesh (or a space with no membership feed yet) has no bucket to read → degrade to null.
126
- // But an AUTHORIZATION rejection means this cred should hold the membership-feed read and doesn't
127
- // (a grant regression) — surface it rather than silently drop detectUnmanagedActors' safety check.
128
- if (/authoriz|permission|not authorized/i.test(e?.message ?? ""))
129
- throw e;
130
- return null;
131
- });
132
- const channelPlan = classifyChannels(m.channels, liveRegistry, ownedKeys);
133
- const agentPlan = classifyAgents(eff.agents, roster, prior);
134
- const unmanaged = detectUnmanagedActors(m.channels.map((ch) => ch.name), membership, roster, { ids: ownedIds, names: ownedNames });
135
- if (flags.dryRun) {
136
- console.log(renderSpawnPlan(eff, channelPlan, agentPlan, unmanaged, { server: connection.server, runId, dryRun: true }));
137
- return;
138
- }
139
- // Stale gate (apply-only): a re-declared owned agent whose resolved policy changed must restart —
140
- // never silently keep running the old policy. Exit non-zero unless explicitly waived by name.
141
- const allow = new Set(flags.allowStale ?? []);
142
- const unwaived = agentPlan.stale.filter((e) => !allow.has(e.agent.name));
143
- if (unwaived.length) {
144
- console.error(c.red(`✗ ${unwaived.length} declared agent(s) are stale (policy changed) - restart required:`));
145
- for (const e of unwaived)
146
- console.error(c.red(` ${e.agent.name}: ${e.prior?.name} hash ${e.prior?.hash.slice(0, 8)} → ${e.hash.slice(0, 8)}`));
147
- console.error(c.dim(` Waive (they keep running the OLD policy until restarted): --allow-stale ${unwaived.map((e) => e.agent.name).join(",")}`));
148
- process.exit(1);
149
- }
150
- // A live manager already proves its runtime. If no manager answers, preflight the provider and
151
- // backend before seeding channels or writing launch state, so a missing app cannot strand an
152
- // unledgered partial deploy.
153
- const held = agentPlan.willCreate.length ? await ep.readManagerLease() : undefined;
154
- const heldReady = Boolean(held && await waitManagerReady(ep, MANAGER_PROBE_MS));
155
- if (heldReady && held) {
156
- // A manager in another checkout (or on another host) is fine — the deploy goes REMOTE below,
157
- // pushing the resolved spec over the control plane. Only a runtime mismatch is unresolvable.
158
- if (held.runtime !== runtime)
159
- throw new Error(`a ${held.runtime} manager already serves "${space}" but runtime ${runtime} was requested - stop it, or match it with --runtime ${held.runtime}`);
160
- }
161
- else if (agentPlan.willCreate.length) {
162
- await preflightRuntime(runtime);
163
- }
164
- console.log(renderSpawnPlan(eff, channelPlan, agentPlan, unmanaged, { server: connection.server, runId, dryRun: false }), "\n");
165
- // 1) Seed ONLY brand-new channel keys — no defaults, no pre-existing/unmanaged card mutation. The
166
- // write rides a SEPARATE, narrow `channel-writer` cred (the `deployer` cred writes no KV); open/raw
167
- // meshes have no signing seed → fall back to the connection creds. USER MODE: the seed is
168
- // space-level infrastructure — a one-shot "channel-writer" VIEW (ledger scope "admin"); a
169
- // channel-declaring manifest under a spawn-only caller refuses HERE, naming the exact
170
- // re-grant, before any write (deploying without channel declarations needs only "spawn").
171
- if (channelPlan.create.length) {
172
- const seedAuth = user
173
- ? await userViewAuthOrExit(connection, "channel-writer").then((p) => ({ bearer: p.bearer, sentinelCreds: p.sentinelCreds }))
174
- : { creds: connection.auth ? await mintCreds(connection.auth, newIdentity(), "channel-writer") : connection.creds };
175
- await seedChannelRegistry({ servers: connection.server, space, ...seedAuth, file: channelsSeed(channelPlan.create) });
176
- }
177
- // 2-4) Boot the will-create agents through the workspace-local manager's admin `launch` op,
178
- // capturing the SPAWNED name + id the ledger keys on (creds are filed under the
179
- // collision-numbered spawned name, not the manifest key). Skipped entirely for a
180
- // channels-only deploy — no need to stand up a manager.
181
- const agents = [...(prior?.created.agents ?? [])];
182
- const launchedNow = [];
183
- const pendingNow = [];
184
- const failedNow = [];
185
- if (agentPlan.willCreate.length) {
186
- // The manager reads the run spec by runId on each `launch` (a remote manager gets it pushed
187
- // inline instead, below). USER MODE stamps the deploy's owner (the login's derived owner,
188
- // read from the deployer-view bearer) into the spec — the manager launches the agents under
189
- // it AND enforces it equals the launch caller's owner.
190
- const spec = buildLaunchSpec(eff, runId, user?.owner);
191
- writeLaunchSpec(root, spec, { update: Boolean(prior) });
192
- // Ensure a manager is SERVING this space, then validate it's ours — the lease is the authoritative
193
- // owner record. A held lease alone is not proof a manager is alive (a crashed holder's key lingers
194
- // until the bucket TTL, MANAGER_LEASE_TTL_MS), so read it (fast) and, when one exists, PROBE control to tell
195
- // a LIVE holder from a stale key. Never trust `.cotal/manager.pid` (blind to a manager started
196
- // another way — two managers queue-split every control op).
197
- const launchHeld = await ep.readManagerLease();
198
- const launchReady = launchHeld
199
- ? (launchHeld.holder === held?.holder ? heldReady : await waitManagerReady(ep, MANAGER_PROBE_MS))
200
- : false;
201
- // A manifest deploy can be the thing that stands a manager up, and it never carries a `--host`
202
- // of its own — so it reads the mesh's recorded exposure, or it would quietly replace a
203
- // reachable attach face with a loopback-only one.
204
- const attachHost = findMesh(space)?.attachHost;
205
- const maxSessions = findMesh(space)?.maxSessions;
206
- if (!launchHeld) {
207
- // Nobody owns the space — stand up a manager (it acquires the lease on boot). The lease says
208
- // nobody is ANSWERING; it does not say the recorded pid is dead, so the pidfile is checked
209
- // before we overwrite it. This path used to skip that entirely.
210
- assertManagerRecordReplaceable(undefined, undefined, space);
211
- startManagerDetached({ space, server: connection.server, runtime, attachHost, maxSessions });
212
- }
213
- else if (!launchReady) {
214
- // A lease exists but its holder doesn't answer control — a STALE key a crashed manager left. It
215
- // blocks a replacement's acquire until the bucket TTL expires; wait it out, then stand one up.
216
- console.log(c.dim(` ~ a manager lease for "${space}" is present but unanswered (holder pid ${launchHeld.pid}); waiting up to ${Math.ceil(MANAGER_LEASE_TTL_MS / 1000)}s for it to expire…`));
217
- if (!(await waitLeaseGone(ep, MANAGER_LEASE_TTL_MS + 5_000))) {
218
- console.error(c.red(`✗ a manager lease for "${space}" is still held by an unresponsive holder (pid ${launchHeld.pid}) after its TTL - stop it or check ${managerLogDisplayPath(space)}`));
219
- process.exit(1);
220
- }
221
- assertManagerRecordReplaceable(undefined, undefined, space); // an expired lease still says nothing about the recorded pid
222
- startManagerDetached({ space, server: connection.server, runtime, attachHost, maxSessions });
223
- }
224
- // else: a live manager already answered — reuse it. All paths converge here: confirm a manager is
225
- // serving, then validate THE HOLDER THAT ACTUALLY ANSWERED by re-reading the CURRENT lease (not the
226
- // `held` snapshot, which can turn over during the probe / a concurrent start — TOCTOU). Fail LOUD if
227
- // a foreign-checkout or wrong-runtime manager won the space before we launch into it.
228
- if (!(await waitManagerReady(ep))) {
229
- console.error(c.red(`✗ manager did not become ready for control - see ${managerLogDisplayPath(space)}`));
230
- process.exit(1);
231
- }
232
- const live = await ep.readManagerLease();
233
- if (!live) {
234
- console.error(c.red(`✗ "${space}" has no manager lease after the manager became ready - re-run \`cotal spawn -f\``));
235
- process.exit(1);
236
- }
237
- if (live.runtime !== runtime) {
238
- console.error(c.red(`✗ a ${live.runtime} manager already serves "${space}" but runtime ${runtime} was requested - stop it, or match it with --runtime ${live.runtime}`));
239
- process.exit(1);
240
- }
241
- // A manager from another checkout/host serves the space → REMOTE deploy: each `launch` call
242
- // carries the resolved spec inline (the manager validates it as untrusted input and persists
243
- // it under ITS OWN run tree). The ledger — and so `down -f` — stays with THIS checkout.
244
- const remote = resolve(live.root) !== resolve(root);
245
- if (remote) {
246
- const wireBytes = Buffer.byteLength(JSON.stringify(spec));
247
- if (wireBytes > 512 * 1024) {
248
- console.error(c.red(`✗ launch spec too large to push over the control plane (${Math.round(wireBytes / 1024)}KB > 512KB) - deploy from the manager's checkout (${live.root})`));
249
- process.exit(1);
250
- }
251
- console.log(c.dim(` ~ remote manager serves "${space}" (root ${live.root}) - pushing the launch spec over the control plane`));
252
- }
253
- for (const e of agentPlan.willCreate) {
254
- const reply = await launchAgent(ep, runId, e.agent.name, remote ? spec : undefined);
255
- // An uncertain launch is still managed and may yet join, so this run owns it as it owns a
256
- // started one: left out of the ledger, `down -f` would never stop it.
257
- const pending = reply.code === "uncertain";
258
- if (!reply.ok && !pending) {
259
- console.error(c.red(`✗ ${e.agent.name}: ${reply.error ?? "launch failed"}`));
260
- failedNow.push(e.agent.name);
261
- continue;
262
- }
263
- // `requested`/`hash` come from the PLAN, not the reply: they are this caller's own inputs,
264
- // and the launch acceptance floor deliberately does not carry them (P2 item 2 ruling 3).
265
- // The reply supplies only the SPAWNED identity — including the incarnation uid, so `down -f`
266
- // derives the lifecycle-keyed cred path this spawn materialized (a pre-split manager's reply
267
- // carries none → legacy name-keyed path). Parsed, not cast: a row that the reader would
268
- // refuse now fails HERE, naming the field, instead of at teardown.
269
- const d = pending ? acceptedAgent(reply.data, Boolean(user)) : (reply.data ?? {});
270
- agents.push(buildLedgerAgentRow({ requested: e.agent.name, hash: e.hash }, d));
271
- if (pending) {
272
- pendingNow.push(String(d.name));
273
- console.log(c.yellow(`~ ${e.agent.name}: ${reply.error}`) + c.dim(" This run owns it, so do not launch it again."));
274
- continue;
275
- }
276
- launchedNow.push(String(d.name));
277
- console.log(c.green(`✓ launched ${d.name}`) + c.dim(` (${e.agent.agentType})`));
278
- }
279
- }
280
- // 5) Write/update the creation-only ownership ledger (prior owned ∪ this run's new).
281
- const createdChannels = dedupe([...(prior?.created.channels ?? []), ...channelPlan.create.map((ch) => ch.name)]);
282
- const ledger = buildLedger({ runId, space, server: connection.server, manifestHash, manifestPath: abs, channels: createdChannels, agents: dedupeAgents(agents) });
283
- const ledgerPath = writeLedger(root, ledger, { update: Boolean(prior) });
284
- // 6) Summary + the exact ownership-scoped teardown command.
285
- console.log("\n" + renderSpawnSummary({
286
- space,
287
- server: connection.server,
288
- runId,
289
- ledgerPath,
290
- manifestPath: abs,
291
- created: channelPlan.create.map((ch) => ch.name),
292
- launched: launchedNow,
293
- pending: pendingNow,
294
- failed: failedNow,
295
- existsUnmanaged: channelPlan.existsUnmanaged.map((x) => x.channel.name),
296
- unmanaged,
297
- }));
298
- const inh = renderInherited(eff);
299
- if (inh)
300
- console.log("\n" + inh);
301
- if (eff.warnings.length)
302
- console.log("\n" + renderWarnings(eff.warnings));
303
- if (failedNow.length)
304
- process.exitCode = 1; // not a full deploy
305
- }
306
- finally {
307
- await ep.stop();
308
- }
309
- }
310
- /** CLI overrides for `spawn -f` (flag > manifest > default): the connect target + runtime. No
311
- * host/open — we connect to an existing broker, not bind one. */
312
- function applyOverrides(prepared, o) {
313
- const m = prepared.manifest;
314
- const broker = { ...m.broker };
315
- if (o.server)
316
- broker.servers = o.server;
317
- if (!broker.servers)
318
- broker.servers = DEFAULT_SERVER;
319
- return {
320
- ...prepared,
321
- manifest: {
322
- ...m,
323
- broker,
324
- runtime: o.runtime ?? m.runtime,
325
- },
326
- };
327
- }
328
- const dedupe = (xs) => [...new Set(xs)];
329
- /** The spawned identity of an `uncertain` launch. Its reply carries only the acceptance, which names
330
- * the agent by owner and actor, so `id` is derived as the manager derives it for a started one:
331
- * `owner.actor` under user auth, the bare actor otherwise. */
332
- function acceptedAgent(data, userAuth) {
333
- const a = (data ?? {});
334
- if (!userAuth)
335
- return { name: a.name, id: a.actor, lifecycleUid: a.uid };
336
- const id = typeof a.owner === "string" && typeof a.actor === "string" ? principalKey(a.owner, a.actor).key : undefined;
337
- return { name: a.name, id, lifecycleUid: a.uid };
338
- }
339
- /** Keep one entry per nkey id (defensive — `willCreate` excludes prior-owned, so no dup in practice). */
340
- function dedupeAgents(agents) {
341
- const byId = new Map();
342
- for (const a of agents)
343
- byId.set(a.id, a);
344
- return [...byId.values()];
345
- }
346
- //# sourceMappingURL=spawn-manifest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":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