@cotal-ai/cli 0.20.0 → 0.21.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/commands/agents.d.ts +53 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +81 -7
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/spawn.d.ts +8 -0
- package/dist/commands/spawn.d.ts.map +1 -1
- package/dist/commands/spawn.js +46 -6
- package/dist/commands/spawn.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/control.d.ts +61 -4
- package/dist/lib/control.d.ts.map +1 -1
- package/dist/lib/control.js +242 -36
- package/dist/lib/control.js.map +1 -1
- package/dist/lib/manager-proc.d.ts +40 -11
- package/dist/lib/manager-proc.d.ts.map +1 -1
- package/dist/lib/manager-proc.js +67 -25
- package/dist/lib/manager-proc.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,19 +1,48 @@
|
|
|
1
|
-
import { type LivenessProbe } from "@cotal-ai/workspace";
|
|
1
|
+
import { type CommandReader, type LivenessProbe } from "@cotal-ai/workspace";
|
|
2
2
|
/** Exported so the delivery cutover preflight can NAME the pid it refused on: an error that says
|
|
3
3
|
* "cannot be attributed" without saying which pid is not actionable. */
|
|
4
4
|
export declare const MANAGER_PID_PATH: () => string;
|
|
5
|
-
/** The recorded manager's
|
|
6
|
-
* what made this dangerous. Both collapses are silent and both are wrong:
|
|
5
|
+
/** The recorded manager's state. THREE-VALUED liveness plus absent, because collapsing it to a
|
|
6
|
+
* boolean is what made this dangerous. Both collapses are silent and both are wrong:
|
|
7
7
|
* `!== "dead"` -> an `unknown` reports UP forever; no retry clears it and nothing starts.
|
|
8
8
|
* `=== "alive"` -> an `unknown` reports DOWN and a second manager launches onto a possibly-live one.
|
|
9
9
|
* `unknown` is REACHABLE on a real kernel, not just under a test shim: a Linux seccomp filter
|
|
10
10
|
* (`SECCOMP_RET_ERRNO`) or an LSM policy can return an arbitrary errno for `kill(pid, 0)` without
|
|
11
11
|
* executing it at all, and libuv preserves it. Proven with a live seccomp BPF filter, not by
|
|
12
|
-
* interposition. So the caller has to SEE the third state and refuse.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
12
|
+
* interposition. So the caller has to SEE the third state and refuse.
|
|
13
|
+
*
|
|
14
|
+
* `foreign` is the fifth: the recorded pid is ALIVE and is provably NOT a manager. A record
|
|
15
|
+
* outliving its process is the same class of defect one layer down from a service registration
|
|
16
|
+
* outliving its host, and it resolves the same way — the number is eventually reused by an
|
|
17
|
+
* unrelated process, and from `kill(pid, 0)` alone that reads as a healthy manager forever. */
|
|
18
|
+
export type ManagerRecordState = "alive" | "dead" | "unknown" | "absent" | "unattributable" | "foreign";
|
|
19
|
+
/** The recorded manager, with the evidence behind the verdict — callers that must EXPLAIN a refusal
|
|
20
|
+
* need the pid and the command line that earned it, and a bare state cannot carry them. */
|
|
21
|
+
export interface ManagerRecord {
|
|
22
|
+
state: ManagerRecordState;
|
|
23
|
+
/** The recorded pid, when the file held one. */
|
|
24
|
+
pid?: number;
|
|
25
|
+
/** The live process's command line, when it was readable (present on `alive` and `foreign`). */
|
|
26
|
+
command?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Read + attribute the manager record in one place, so every caller decides on the same evidence.
|
|
29
|
+
*
|
|
30
|
+
* ATTRIBUTION MAY ONLY DOWNGRADE ON PROOF. A live pid is demoted to `foreign` when its command line
|
|
31
|
+
* was READ and does not name the manager daemon — never when the read failed, never on a platform
|
|
32
|
+
* that cannot look, never on a process that died during the read. The asymmetry is the safety
|
|
33
|
+
* argument, and it is the same one the liveness probe makes: absence of evidence must fail toward
|
|
34
|
+
* the old behaviour (trust the record), because the opposite error starts a second manager on top
|
|
35
|
+
* of a live one. */
|
|
36
|
+
export declare function managerRecordState(probe?: LivenessProbe, readCommand?: CommandReader): ManagerRecord;
|
|
37
|
+
/** {@link managerRecordState}'s verdict alone, for the callers that only branch on it. */
|
|
38
|
+
export declare function managerLiveness(probe?: LivenessProbe, readCommand?: CommandReader): ManagerRecordState;
|
|
39
|
+
/** One line describing what was found behind the record, for a caller that has to explain itself. */
|
|
40
|
+
export declare function describeManagerRecord(r: ManagerRecord): string;
|
|
41
|
+
/** True only if the manager is PROVABLY running. `unknown` is not up, and neither is `foreign` — a
|
|
42
|
+
* live process that is not a manager answers no control plane. Callers that would ACT on that
|
|
43
|
+
* answer must use {@link managerRecordState} instead: this boolean cannot express the difference
|
|
44
|
+
* between "not running", "cannot tell" and "someone else's process", and acting on the difference
|
|
45
|
+
* is the whole point. */
|
|
17
46
|
export declare function managerUp(): boolean;
|
|
18
47
|
/** True if the live manager carries a delivery-aware marker BOUND to its current pid (i.e. it's THIS
|
|
19
48
|
* build, non-hosting). Fail-closed: the marker stores the pid it was written for, and this requires it
|
|
@@ -48,7 +77,7 @@ export declare function startManagerDetached(o?: {
|
|
|
48
77
|
* says nobody is ANSWERING; it does not say the recorded pid is dead. Overwriting an unknown or
|
|
49
78
|
* unattributable record is the same defect as deleting it, reached through a different verb, which
|
|
50
79
|
* is the third time that shape has appeared in this change. Any future starter calls this first. */
|
|
51
|
-
export declare function assertManagerRecordReplaceable(probe?: LivenessProbe): void;
|
|
80
|
+
export declare function assertManagerRecordReplaceable(probe?: LivenessProbe, readCommand?: CommandReader): void;
|
|
52
81
|
export declare function ensureManager(o?: {
|
|
53
82
|
space?: string;
|
|
54
83
|
server?: string;
|
|
@@ -59,7 +88,7 @@ export declare function ensureManager(o?: {
|
|
|
59
88
|
resumeAttempt?: string;
|
|
60
89
|
resumeCommitToken?: string;
|
|
61
90
|
wsPort?: number;
|
|
62
|
-
}, probe?: LivenessProbe): {
|
|
91
|
+
}, probe?: LivenessProbe, readCommand?: CommandReader): {
|
|
63
92
|
running: boolean;
|
|
64
93
|
};
|
|
65
94
|
/** A signal, injectable for the same reason the probe is: `EPERM` from `kill` is producible only by
|
|
@@ -82,5 +111,5 @@ export type StopVerdict = "stopped" | "already-gone";
|
|
|
82
111
|
* A correct fix upstream reaching a latent destructive bug downstream is the worst shape available,
|
|
83
112
|
* so this refuses instead: records are removed only on proven death, never on a signal we could not
|
|
84
113
|
* send or a death we could not confirm. Found by review, with a kernel seccomp proof. */
|
|
85
|
-
export declare function stopManager(probe?: LivenessProbe, signal?: SignalFn | undefined): Promise<StopVerdict>;
|
|
114
|
+
export declare function stopManager(probe?: LivenessProbe, signal?: SignalFn | undefined, readCommand?: CommandReader): Promise<StopVerdict>;
|
|
86
115
|
//# sourceMappingURL=manager-proc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager-proc.d.ts","sourceRoot":"","sources":["../../src/lib/manager-proc.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"manager-proc.d.ts","sourceRoot":"","sources":["../../src/lib/manager-proc.ts"],"names":[],"mappings":"AAMA,OAAO,EAE2C,KAAK,aAAa,EAAE,KAAK,aAAa,EACvF,MAAM,qBAAqB,CAAC;AAE7B;yEACyE;AACzE,eAAO,MAAM,gBAAgB,QAAO,MAAoC,CAAC;AASzE;;;;;;;;;;;;gGAYgG;AAChG,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAExG;4FAC4F;AAC5F,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,gDAAgD;IAChD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;qBAOqB;AACrB,wBAAgB,kBAAkB,CAAC,KAAK,GAAE,aAA6B,EAAE,WAAW,GAAE,aAAkC,GAAG,aAAa,CAgBvI;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,KAAK,GAAE,aAA6B,EAAE,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O,EAAE,OAAO,CAAA;CAAE,CAMtB;AAED;;8CAE8C;AAC9C,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC;AAErE,uGAAuG;AACvG,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,cAAc,CAAC;AAErD;;iGAEiG;AAGjG;;;;;;;;;;0FAU0F;AAC1F,wBAAsB,WAAW,CAC/B,KAAK,GAAE,aAA6B,EACpC,MAAM,GAAE,QAAQ,GAAG,SAAqB,EACxC,WAAW,GAAE,aAAkC,GAC9C,OAAO,CAAC,WAAW,CAAC,CAmFtB"}
|
package/dist/lib/manager-proc.js
CHANGED
|
@@ -4,44 +4,65 @@ import { DEFAULT_SERVER } from "@cotal-ai/core";
|
|
|
4
4
|
import { selfArgv } from "./self-exec.js";
|
|
5
5
|
import { resolveSpace } from "./status.js";
|
|
6
6
|
import { cotalPath } from "./paths.js";
|
|
7
|
-
import { parsePid, probeLiveness } from "@cotal-ai/workspace";
|
|
7
|
+
import { commandIsCotalSupervisor, parsePid, probeLiveness, readProcessCommand, MANAGER_DELIVERY_AWARE_MARKER, MANAGER_PIDFILE, } from "@cotal-ai/workspace";
|
|
8
8
|
/** Exported so the delivery cutover preflight can NAME the pid it refused on: an error that says
|
|
9
9
|
* "cannot be attributed" without saying which pid is not actionable. */
|
|
10
|
-
export const MANAGER_PID_PATH = () => cotalPath(
|
|
10
|
+
export const MANAGER_PID_PATH = () => cotalPath(MANAGER_PIDFILE);
|
|
11
11
|
const PID_PATH = MANAGER_PID_PATH;
|
|
12
12
|
/** Sibling marker of `manager.pid`: written by THIS build's manager (which no longer hosts Plane-3 —
|
|
13
13
|
* the server-side delivery daemon does). Its presence beside a live `manager.pid` proves the manager is
|
|
14
14
|
* "delivery-aware" / non-hosting. A live `manager.pid` WITHOUT this marker is an OLD (pre-delivery-daemon)
|
|
15
15
|
* manager that still calls `startPlane3` — the delivery preflight stops it before the daemon binds, so an
|
|
16
16
|
* old hosting manager never double-binds `fanout`/`reader` against the new daemon. */
|
|
17
|
-
const DELIVERY_AWARE_MARKER = () => cotalPath(
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
export function
|
|
17
|
+
const DELIVERY_AWARE_MARKER = () => cotalPath(MANAGER_DELIVERY_AWARE_MARKER);
|
|
18
|
+
/** Read + attribute the manager record in one place, so every caller decides on the same evidence.
|
|
19
|
+
*
|
|
20
|
+
* ATTRIBUTION MAY ONLY DOWNGRADE ON PROOF. A live pid is demoted to `foreign` when its command line
|
|
21
|
+
* was READ and does not name the manager daemon — never when the read failed, never on a platform
|
|
22
|
+
* that cannot look, never on a process that died during the read. The asymmetry is the safety
|
|
23
|
+
* argument, and it is the same one the liveness probe makes: absence of evidence must fail toward
|
|
24
|
+
* the old behaviour (trust the record), because the opposite error starts a second manager on top
|
|
25
|
+
* of a live one. */
|
|
26
|
+
export function managerRecordState(probe = probeLiveness, readCommand = readProcessCommand) {
|
|
27
27
|
const p = PID_PATH();
|
|
28
28
|
if (!existsSync(p))
|
|
29
|
-
return "absent";
|
|
29
|
+
return { state: "absent" };
|
|
30
30
|
const raw = readFileSync(p, "utf8").trim();
|
|
31
31
|
if (raw === "")
|
|
32
|
-
return "absent"; // a pre-protocol husk: nothing is behind it
|
|
32
|
+
return { state: "absent" }; // a pre-protocol husk: nothing is behind it
|
|
33
33
|
const pid = parsePid(raw);
|
|
34
34
|
// NOT `absent`. Folding non-empty corrupt content into "no manager recorded" is what let the
|
|
35
35
|
// ensure paths OVERWRITE it and launch a replacement, which is the same defect as deleting it:
|
|
36
36
|
// that record may front a live process nobody can identify. `absent` means no pidfile (or an
|
|
37
37
|
// empty husk); corrupt content is its own state and every action path must refuse on it.
|
|
38
38
|
if (pid === undefined)
|
|
39
|
-
return "unattributable";
|
|
40
|
-
|
|
39
|
+
return { state: "unattributable" };
|
|
40
|
+
const liveness = probe(pid);
|
|
41
|
+
if (liveness !== "alive")
|
|
42
|
+
return { state: liveness, pid };
|
|
43
|
+
const cmd = readCommand(pid);
|
|
44
|
+
if (cmd.kind !== "command")
|
|
45
|
+
return { state: "alive", pid }; // gone/unreadable: established nothing
|
|
46
|
+
return { state: commandIsCotalSupervisor(cmd.command) ? "alive" : "foreign", pid, command: cmd.command };
|
|
47
|
+
}
|
|
48
|
+
/** {@link managerRecordState}'s verdict alone, for the callers that only branch on it. */
|
|
49
|
+
export function managerLiveness(probe = probeLiveness, readCommand = readProcessCommand) {
|
|
50
|
+
return managerRecordState(probe, readCommand).state;
|
|
41
51
|
}
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
|
|
52
|
+
/** One line describing what was found behind the record, for a caller that has to explain itself. */
|
|
53
|
+
export function describeManagerRecord(r) {
|
|
54
|
+
if (r.state === "absent")
|
|
55
|
+
return "no manager pid recorded";
|
|
56
|
+
if (r.state === "unattributable")
|
|
57
|
+
return `the manager pidfile holds content that is not a pid`;
|
|
58
|
+
const who = r.command !== undefined ? ` running \`${r.command}\`` : "";
|
|
59
|
+
return `recorded manager pid ${String(r.pid)} is ${r.state}${who}`;
|
|
60
|
+
}
|
|
61
|
+
/** True only if the manager is PROVABLY running. `unknown` is not up, and neither is `foreign` — a
|
|
62
|
+
* live process that is not a manager answers no control plane. Callers that would ACT on that
|
|
63
|
+
* answer must use {@link managerRecordState} instead: this boolean cannot express the difference
|
|
64
|
+
* between "not running", "cannot tell" and "someone else's process", and acting on the difference
|
|
65
|
+
* is the whole point. */
|
|
45
66
|
export function managerUp() {
|
|
46
67
|
return managerLiveness() === "alive";
|
|
47
68
|
}
|
|
@@ -121,8 +142,16 @@ export function startManagerDetached(o = {}) {
|
|
|
121
142
|
* says nobody is ANSWERING; it does not say the recorded pid is dead. Overwriting an unknown or
|
|
122
143
|
* unattributable record is the same defect as deleting it, reached through a different verb, which
|
|
123
144
|
* is the third time that shape has appeared in this change. Any future starter calls this first. */
|
|
124
|
-
export function assertManagerRecordReplaceable(probe = probeLiveness) {
|
|
125
|
-
const
|
|
145
|
+
export function assertManagerRecordReplaceable(probe = probeLiveness, readCommand = readProcessCommand) {
|
|
146
|
+
const record = managerRecordState(probe, readCommand);
|
|
147
|
+
const state = record.state;
|
|
148
|
+
// A FOREIGN record is replaceable, and saying what was found is the point of allowing it. The pid
|
|
149
|
+
// is alive, so `probeLiveness` alone would have called this a healthy manager and every start
|
|
150
|
+
// path would have skipped forever; it is provably not a manager, so nothing is orphaned by
|
|
151
|
+
// writing over it. Announced rather than silent: a recycled pid means the record outlived its
|
|
152
|
+
// process, and an operator who never hears that will meet it again.
|
|
153
|
+
if (state === "foreign")
|
|
154
|
+
console.error(`! ${describeManagerRecord(record)} - that is not a manager, so the record is stale (its process exited and the pid was reused). Replacing it.`);
|
|
126
155
|
if (state === "unattributable")
|
|
127
156
|
throw new Error(`the manager pidfile at ${PID_PATH()} holds content that is not a pid (${JSON.stringify(readFileSync(PID_PATH(), "utf8").trim())}).\n` +
|
|
128
157
|
`Refusing to start a manager over it: that record may front a live process nobody can identify, and overwriting it would orphan the process while reporting a healthy control plane.\n` +
|
|
@@ -132,11 +161,11 @@ export function assertManagerRecordReplaceable(probe = probeLiveness) {
|
|
|
132
161
|
`Refusing to start a manager over it: it may still be running and bound to the control plane.\n` +
|
|
133
162
|
`NEXT: verify with \`ps -p <pid>\`. If it is gone, remove \`.cotal/manager.pid\` and re-run.`);
|
|
134
163
|
}
|
|
135
|
-
export function ensureManager(o = {}, probe = probeLiveness) {
|
|
136
|
-
const state = managerLiveness(probe);
|
|
164
|
+
export function ensureManager(o = {}, probe = probeLiveness, readCommand = readProcessCommand) {
|
|
165
|
+
const state = managerLiveness(probe, readCommand);
|
|
137
166
|
if (state === "alive")
|
|
138
167
|
return { running: true };
|
|
139
|
-
assertManagerRecordReplaceable(probe); // refuses on unknown / unattributable
|
|
168
|
+
assertManagerRecordReplaceable(probe, readCommand); // refuses on unknown / unattributable, reports foreign
|
|
140
169
|
startManagerDetached(o);
|
|
141
170
|
return { running: true };
|
|
142
171
|
}
|
|
@@ -155,7 +184,7 @@ export function ensureManager(o = {}, probe = probeLiveness) {
|
|
|
155
184
|
* A correct fix upstream reaching a latent destructive bug downstream is the worst shape available,
|
|
156
185
|
* so this refuses instead: records are removed only on proven death, never on a signal we could not
|
|
157
186
|
* send or a death we could not confirm. Found by review, with a kernel seccomp proof. */
|
|
158
|
-
export async function stopManager(probe = probeLiveness, signal = undefined) {
|
|
187
|
+
export async function stopManager(probe = probeLiveness, signal = undefined, readCommand = readProcessCommand) {
|
|
159
188
|
const send = signal ?? ((pid, sig) => process.kill(pid, sig));
|
|
160
189
|
const p = PID_PATH();
|
|
161
190
|
const marker = DELIVERY_AWARE_MARKER();
|
|
@@ -189,6 +218,19 @@ export async function stopManager(probe = probeLiveness, signal = undefined) {
|
|
|
189
218
|
clear();
|
|
190
219
|
return "already-gone";
|
|
191
220
|
}
|
|
221
|
+
// A LIVE pid that is provably NOT a manager is never signalled. The record outlived its process
|
|
222
|
+
// and the number was reused, so SIGTERM here would kill an unrelated process — the exact
|
|
223
|
+
// destructive shape the rest of this function refuses on doubt, reached through certainty. The
|
|
224
|
+
// record is removed because it is provably stale, and what was found is printed: an operator who
|
|
225
|
+
// is told only "already gone" will not know their pidfile was pointing at a stranger.
|
|
226
|
+
if (before === "alive") {
|
|
227
|
+
const cmd = readCommand(pid);
|
|
228
|
+
if (cmd.kind === "command" && !commandIsCotalSupervisor(cmd.command)) {
|
|
229
|
+
console.error(`! recorded manager pid ${pid} is alive but is running \`${cmd.command}\`, which is not a manager - not signalling it; removing the stale record instead.`);
|
|
230
|
+
clear();
|
|
231
|
+
return "already-gone";
|
|
232
|
+
}
|
|
233
|
+
}
|
|
192
234
|
if (before === "unknown")
|
|
193
235
|
throw new Error(`refusing to stop manager pid ${pid}: its liveness cannot be determined (the kernel answered neither "running" nor "no such process"; a seccomp filter or LSM policy does this).\n` +
|
|
194
236
|
`The pidfile and delivery-aware marker are LEFT IN PLACE: deleting them would orphan a process that may still be bound to the control plane.\n` +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager-proc.js","sourceRoot":"","sources":["../../src/lib/manager-proc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"manager-proc.js","sourceRoot":"","sources":["../../src/lib/manager-proc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACL,wBAAwB,EAAE,QAAQ,EAAE,aAAa,EAAE,kBAAkB,EACrE,6BAA6B,EAAE,eAAe,GAC/C,MAAM,qBAAqB,CAAC;AAE7B;yEAC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,4FAA4F;IAC5F,gGAAgG;IAChG,8FAA8F;IAC9F,sFAAsF;IACtF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,EAAE,CAAC,EAAE;QAAE,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACnG,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,IAAI,KAAK,KAAK,MAAM;QAClB,MAAM,IAAI,KAAK,CACb,eAAe,GAAG,mCAAmC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,cAAc;YACjH,8FAA8F;YAC9F,uBAAuB,GAAG,0CAA0C,CACvE,CAAC;IACJ,KAAK,EAAE,CAAC;IACR,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/cli",
|
|
3
3
|
"description": "Cotal mesh CLI: up, join, watch, console, spawn, mint, channels, history, ext.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.21.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"yaml": "^2.9.0",
|
|
29
29
|
"zod": "^4.4.3",
|
|
30
30
|
"ws": "^8.21.0",
|
|
31
|
-
"@cotal-ai/
|
|
32
|
-
"@cotal-ai/
|
|
31
|
+
"@cotal-ai/workspace": "0.21.0",
|
|
32
|
+
"@cotal-ai/core": "0.21.0"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
35
|
"@eplightning/nats-server-darwin-arm64": "^2.14.0",
|