cotal-ai 0.108.0 → 0.109.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/run.js +47 -23
- package/package.json +18 -18
- package/seeded-connectors/claude/dist/mcp.cjs +44 -8
- package/seeded-connectors/claude/package.json +1 -1
- package/seeded-connectors/codex/dist/host.js +44 -8
- package/seeded-connectors/codex/package.json +1 -1
- package/seeded-connectors/hermes/dist/launch.js +44 -8
- package/seeded-connectors/hermes/package.json +1 -1
- package/seeded-connectors/hermes/plugin/cotal/_sidecar/standalone.cjs +44 -8
- package/seeded-connectors/jcode/dist/host.js +44 -8
- package/seeded-connectors/jcode/dist/mcp.js +44 -8
- package/seeded-connectors/jcode/package.json +1 -1
- package/seeded-connectors/opencode/dist/plugin/index.js +44 -8
- package/seeded-connectors/opencode/package.json +1 -1
- package/seeded-connectors/pi/dist/index.js +6 -6
- package/seeded-connectors/pi/dist/standalone.js +44 -8
- package/seeded-connectors/pi/package.json +1 -1
- package/seeded-connectors/web/package.json +1 -1
package/dist/run.js
CHANGED
|
@@ -5,34 +5,59 @@
|
|
|
5
5
|
* (@cotal-ai/manager). The root just picks which surfaces to pull in; `runCli` resolves
|
|
6
6
|
* whatever registered. A new surface (another connector, a control client …) is one more import line.
|
|
7
7
|
*
|
|
8
|
+
* A daemon entry is the exception: it runs one command for the life of its process, so it imports
|
|
9
|
+
* only the surfaces that command needs (see the providers below), never the whole CLI.
|
|
10
|
+
*
|
|
8
11
|
* Reached only via ./cotal.ts, which runs the Node-version preflight first: everything imported
|
|
9
12
|
* here requires Node >= 22 (the UI stack and the bundled nats-server optional dep), so this module
|
|
10
13
|
* must never be the executable entry — importing it on an old Node crashes at parse time.
|
|
11
14
|
*/
|
|
12
|
-
// NOTE: registration order across these imports is NOT guaranteed (tsx's entry interop can
|
|
13
|
-
// evaluate the smaller daemon graphs first) — display order is a non-goal here; `help` ranks
|
|
14
|
-
// its groups explicitly (GROUP_ORDER in @cotal-ai/cli).
|
|
15
|
-
import { runCli, stdoutError } from "@cotal-ai/cli"; // self-registers the base surface incl. spawn (foreground + --detach) / stop / ps / attach
|
|
16
|
-
import "@cotal-ai/manager"; // self-registers `supervise` — the agent-supervisor daemon
|
|
17
|
-
import "@cotal-ai/delivery"; // self-registers `deliver` — the server-side Plane-3 delivery daemon
|
|
18
|
-
import "@cotal-ai/runtime"; // self-registers `run` — the workflow-run operator surface (start/resume/ps/journal/answer)
|
|
19
|
-
import "@cotal-ai/auth"; // self-registers login / logout — per-user IdP sessions (device-code sign-in)
|
|
20
|
-
import "./docs.js"; // self-registers `docs`; the docs bundle loads only when `docs` runs
|
|
21
|
-
import "./daemon/command.js"; // self-registers `daemon`: the local machine daemon's authenticated control endpoint (Linux)
|
|
22
|
-
// Self-registers the `ag-ui.frame` part renderer, so `cotal console` and `cotal join` draw an event
|
|
23
|
-
// frame instead of `[unrenderable part kind "ag-ui.frame"]`.
|
|
24
|
-
//
|
|
25
|
-
// IMPORTED HERE BECAUSE NOTHING ELSE IN THIS PROCESS WOULD. The four agent connectors are removable
|
|
26
|
-
// ext plugins materialized lazily by `runCli`, and no `implementations/*` package imports
|
|
27
|
-
// connector-core at runtime — measured, not assumed. So a renderer that only registered inside the
|
|
28
|
-
// connector would be absent from every process that RENDERS, which is the one place it is needed.
|
|
29
|
-
// The seam is worth nothing if the provider never loads at the display site.
|
|
30
|
-
//
|
|
31
|
-
// The narrow subpath rather than the package root, deliberately: the root pulls the MCP server
|
|
32
|
-
// runtime and its zod copy into CLI startup, and a renderer needs none of it.
|
|
33
|
-
import "@cotal-ai/connector-core/agui-render";
|
|
34
15
|
import { registry } from "@cotal-ai/core";
|
|
35
16
|
import { handOverStartupInterrupt, releaseStartupInterrupt } from "./startup-interrupt.js";
|
|
17
|
+
// Each surface self-registers when imported. The whole CLI imports them one after another in this
|
|
18
|
+
// order, which is the order the root's static imports evaluated them in; display order is still a
|
|
19
|
+
// non-goal, since `help` ranks its groups explicitly (GROUP_ORDER in @cotal-ai/cli).
|
|
20
|
+
const surfaces = {
|
|
21
|
+
cli: () => import("@cotal-ai/cli"), // the base surface incl. spawn (foreground + --detach) / stop / ps / attach
|
|
22
|
+
manager: () => import("@cotal-ai/manager"), // `supervise` — the agent-supervisor daemon
|
|
23
|
+
delivery: () => import("@cotal-ai/delivery"), // `deliver` — the server-side Plane-3 delivery daemon
|
|
24
|
+
runtime: () => import("@cotal-ai/runtime"), // `run` — the workflow-run operator surface (start/resume/ps/journal/answer)
|
|
25
|
+
auth: () => import("@cotal-ai/auth"), // login / logout — per-user IdP sessions (device-code sign-in)
|
|
26
|
+
docs: () => import("./docs.js"), // `docs`; the docs bundle loads only when `docs` runs
|
|
27
|
+
daemon: () => import("./daemon/command.js"), // `daemon`: the local machine daemon's authenticated control endpoint (Linux)
|
|
28
|
+
// The `ag-ui.frame` part renderer, so `cotal console` and `cotal join` draw an event frame instead
|
|
29
|
+
// of `[unrenderable part kind "ag-ui.frame"]`.
|
|
30
|
+
//
|
|
31
|
+
// IMPORTED HERE BECAUSE NOTHING ELSE IN THIS PROCESS WOULD. The four agent connectors are removable
|
|
32
|
+
// ext plugins materialized lazily by `runCli`, and no `implementations/*` package imports
|
|
33
|
+
// connector-core at runtime — measured, not assumed. So a renderer that only registered inside the
|
|
34
|
+
// connector would be absent from every process that RENDERS, which is the one place it is needed.
|
|
35
|
+
// The seam is worth nothing if the provider never loads at the display site.
|
|
36
|
+
//
|
|
37
|
+
// The narrow subpath rather than the package root, deliberately: the root pulls the MCP server
|
|
38
|
+
// runtime and its zod copy into CLI startup, and a renderer needs none of it.
|
|
39
|
+
aguiRender: () => import("@cotal-ai/connector-core/agui-render"),
|
|
40
|
+
};
|
|
41
|
+
const importing = (...names) => async () => { for (const name of names)
|
|
42
|
+
await surfaces[name](); };
|
|
43
|
+
const commands = (...names) => names.map((name) => ({ kind: "command", name }));
|
|
44
|
+
// The daemon entries. Each imports its own surface and the surfaces whose registrations its run
|
|
45
|
+
// resolves: the auth provider a user-auth mesh dials through (@cotal-ai/auth), and the workflow run
|
|
46
|
+
// host a manager hosts runs with (@cotal-ai/runtime). Nothing else in the CLI is imported, and the
|
|
47
|
+
// command's flags, refusals and exit are `runCli`'s as for any other command.
|
|
48
|
+
registry.provide({ provides: commands("supervise", "__daemon-manager", "__service-manager"), load: importing("manager", "auth", "runtime") });
|
|
49
|
+
registry.provide({ provides: commands("deliver", "__daemon-deliver", "__service-delivery", "feedback-intake", "__service-feedback-intake"), load: importing("delivery", "auth") });
|
|
50
|
+
registry.provide({ provides: commands("auth-service", "__daemon-auth-service", "__service-auth"), load: importing("auth") });
|
|
51
|
+
registry.provide({ provides: commands("__service-unit"), load: () => import("@cotal-ai/cli/service-unit") });
|
|
52
|
+
// The dispatch module reads the command word as `runCli` will, and loads no command. A word a
|
|
53
|
+
// provider declares imports that provider's surfaces; any other word imports them all.
|
|
54
|
+
const { commandWord, runCli, stdoutError } = await import("@cotal-ai/cli/dispatch");
|
|
55
|
+
const argv = process.argv.slice(2);
|
|
56
|
+
const word = commandWord(argv);
|
|
57
|
+
if (word !== undefined && registry.provides("command", word))
|
|
58
|
+
await registry.load("command", word);
|
|
59
|
+
else
|
|
60
|
+
await importing(...Object.keys(surfaces))();
|
|
36
61
|
// A CLI must exit quietly when its stdout is closed early — piped to `head`, a pager that quits,
|
|
37
62
|
// or a shell's process substitution (`source <(cotal completion script bash)`). Node otherwise turns the
|
|
38
63
|
// closed-pipe write into a fatal unhandled 'error' event with a stack trace. Mirror SIGPIPE: exit
|
|
@@ -49,5 +74,4 @@ process.stdout.on("error", stdoutError);
|
|
|
49
74
|
// the ONE composition root that loads operator-installed extensions (`cotal ext add …`) — commands,
|
|
50
75
|
// runtimes, connectors, and local process components all self-register from those packages. Library
|
|
51
76
|
// roots keep the explicit-import model.
|
|
52
|
-
const argv = process.argv.slice(2);
|
|
53
77
|
await runCli(registry, argv, { extensions: true, startupNotice: { release: releaseStartupInterrupt, handOver: handOverStartupInterrupt } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cotal-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.109.0",
|
|
4
4
|
"description": "Cotal — lateral agent coordination over NATS. Run `npx cotal-ai` for the CLI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -33,26 +33,26 @@
|
|
|
33
33
|
"node": ">=22"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@cotal-ai/auth": "0.
|
|
37
|
-
"@cotal-ai/cli": "0.
|
|
38
|
-
"@cotal-ai/connector-core": "0.
|
|
39
|
-
"@cotal-ai/core": "0.
|
|
40
|
-
"@cotal-ai/delivery": "0.
|
|
41
|
-
"@cotal-ai/manager": "0.
|
|
42
|
-
"@cotal-ai/runtime": "0.
|
|
43
|
-
"@cotal-ai/seat": "0.
|
|
44
|
-
"@cotal-ai/workspace": "0.
|
|
36
|
+
"@cotal-ai/auth": "0.109.0",
|
|
37
|
+
"@cotal-ai/cli": "0.109.0",
|
|
38
|
+
"@cotal-ai/connector-core": "0.109.0",
|
|
39
|
+
"@cotal-ai/core": "0.109.0",
|
|
40
|
+
"@cotal-ai/delivery": "0.109.0",
|
|
41
|
+
"@cotal-ai/manager": "0.109.0",
|
|
42
|
+
"@cotal-ai/runtime": "0.109.0",
|
|
43
|
+
"@cotal-ai/seat": "0.109.0",
|
|
44
|
+
"@cotal-ai/workspace": "0.109.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@cotal-ai/connector-claude-code": "0.
|
|
48
|
-
"@cotal-ai/connector-codex": "0.
|
|
49
|
-
"@cotal-ai/connector-hermes": "0.
|
|
50
|
-
"@cotal-ai/connector-jcode": "0.
|
|
51
|
-
"@cotal-ai/connector-opencode": "0.
|
|
52
|
-
"@cotal-ai/linear": "0.
|
|
53
|
-
"@cotal-ai/pi": "0.
|
|
47
|
+
"@cotal-ai/connector-claude-code": "0.109.0",
|
|
48
|
+
"@cotal-ai/connector-codex": "0.109.0",
|
|
49
|
+
"@cotal-ai/connector-hermes": "0.109.0",
|
|
50
|
+
"@cotal-ai/connector-jcode": "0.109.0",
|
|
51
|
+
"@cotal-ai/connector-opencode": "0.109.0",
|
|
52
|
+
"@cotal-ai/linear": "0.109.0",
|
|
53
|
+
"@cotal-ai/pi": "0.109.0",
|
|
54
54
|
"@cotal-ai/smoke-kit": "0.0.0",
|
|
55
|
-
"@cotal-ai/web": "0.
|
|
55
|
+
"@cotal-ai/web": "0.109.0",
|
|
56
56
|
"@nats-io/jetstream": "^3.4.0",
|
|
57
57
|
"@nats-io/transport-node": "^3.4.0",
|
|
58
58
|
"typescript": "^5.9.3"
|