@cotal-ai/cli 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.
Files changed (157) hide show
  1. package/dist/command.d.ts +12 -3
  2. package/dist/command.d.ts.map +1 -1
  3. package/dist/command.js +58 -11
  4. package/dist/command.js.map +1 -1
  5. package/dist/commands/agents.d.ts +64 -0
  6. package/dist/commands/agents.d.ts.map +1 -0
  7. package/dist/commands/agents.js +83 -0
  8. package/dist/commands/agents.js.map +1 -0
  9. package/dist/commands/channels.d.ts +2 -1
  10. package/dist/commands/channels.d.ts.map +1 -1
  11. package/dist/commands/channels.js +3 -16
  12. package/dist/commands/channels.js.map +1 -1
  13. package/dist/commands/completion.d.ts +6 -5
  14. package/dist/commands/completion.d.ts.map +1 -1
  15. package/dist/commands/completion.js +37 -14
  16. package/dist/commands/completion.js.map +1 -1
  17. package/dist/commands/console.d.ts +2 -1
  18. package/dist/commands/console.d.ts.map +1 -1
  19. package/dist/commands/console.js +2 -12
  20. package/dist/commands/console.js.map +1 -1
  21. package/dist/commands/down.d.ts +3 -2
  22. package/dist/commands/down.d.ts.map +1 -1
  23. package/dist/commands/down.js +42 -16
  24. package/dist/commands/down.js.map +1 -1
  25. package/dist/commands/ext.d.ts +18 -0
  26. package/dist/commands/ext.d.ts.map +1 -0
  27. package/dist/commands/ext.js +220 -0
  28. package/dist/commands/ext.js.map +1 -0
  29. package/dist/commands/feedback.d.ts +2 -2
  30. package/dist/commands/feedback.d.ts.map +1 -1
  31. package/dist/commands/feedback.js +4 -283
  32. package/dist/commands/feedback.js.map +1 -1
  33. package/dist/commands/history.d.ts +2 -1
  34. package/dist/commands/history.d.ts.map +1 -1
  35. package/dist/commands/history.js +3 -13
  36. package/dist/commands/history.js.map +1 -1
  37. package/dist/commands/join.d.ts +2 -1
  38. package/dist/commands/join.d.ts.map +1 -1
  39. package/dist/commands/join.js +2 -18
  40. package/dist/commands/join.js.map +1 -1
  41. package/dist/commands/meshes.d.ts +2 -1
  42. package/dist/commands/meshes.d.ts.map +1 -1
  43. package/dist/commands/meshes.js +1 -1
  44. package/dist/commands/meshes.js.map +1 -1
  45. package/dist/commands/mint.d.ts +2 -1
  46. package/dist/commands/mint.d.ts.map +1 -1
  47. package/dist/commands/mint.js +3 -14
  48. package/dist/commands/mint.js.map +1 -1
  49. package/dist/commands/models.d.ts +29 -0
  50. package/dist/commands/models.d.ts.map +1 -0
  51. package/dist/commands/models.js +54 -0
  52. package/dist/commands/models.js.map +1 -0
  53. package/dist/commands/personas.d.ts +2 -2
  54. package/dist/commands/personas.d.ts.map +1 -1
  55. package/dist/commands/personas.js +23 -20
  56. package/dist/commands/personas.js.map +1 -1
  57. package/dist/commands/send.d.ts +2 -2
  58. package/dist/commands/send.d.ts.map +1 -1
  59. package/dist/commands/send.js +21 -24
  60. package/dist/commands/send.js.map +1 -1
  61. package/dist/commands/setup.d.ts +30 -8
  62. package/dist/commands/setup.d.ts.map +1 -1
  63. package/dist/commands/setup.js +151 -316
  64. package/dist/commands/setup.js.map +1 -1
  65. package/dist/commands/spawn.d.ts +122 -2
  66. package/dist/commands/spawn.d.ts.map +1 -1
  67. package/dist/commands/spawn.js +156 -49
  68. package/dist/commands/spawn.js.map +1 -1
  69. package/dist/commands/status.d.ts +15 -0
  70. package/dist/commands/status.d.ts.map +1 -0
  71. package/dist/commands/status.js +172 -0
  72. package/dist/commands/status.js.map +1 -0
  73. package/dist/commands/topology.d.ts +2 -1
  74. package/dist/commands/topology.d.ts.map +1 -1
  75. package/dist/commands/topology.js +4 -8
  76. package/dist/commands/topology.js.map +1 -1
  77. package/dist/commands/up.d.ts +9 -4
  78. package/dist/commands/up.d.ts.map +1 -1
  79. package/dist/commands/up.js +96 -56
  80. package/dist/commands/up.js.map +1 -1
  81. package/dist/commands/use.d.ts +2 -2
  82. package/dist/commands/use.d.ts.map +1 -1
  83. package/dist/commands/use.js +2 -2
  84. package/dist/commands/use.js.map +1 -1
  85. package/dist/ext-loader.d.ts +13 -0
  86. package/dist/ext-loader.d.ts.map +1 -0
  87. package/dist/ext-loader.js +121 -0
  88. package/dist/ext-loader.js.map +1 -0
  89. package/dist/index.d.ts +3 -0
  90. package/dist/index.d.ts.map +1 -1
  91. package/dist/index.js +219 -67
  92. package/dist/index.js.map +1 -1
  93. package/dist/lib/attach-client.d.ts +20 -0
  94. package/dist/lib/attach-client.d.ts.map +1 -0
  95. package/dist/lib/attach-client.js +218 -0
  96. package/dist/lib/attach-client.js.map +1 -0
  97. package/dist/lib/completion.d.ts +8 -0
  98. package/dist/lib/completion.d.ts.map +1 -0
  99. package/dist/lib/completion.js +66 -0
  100. package/dist/lib/completion.js.map +1 -0
  101. package/dist/lib/connect.d.ts +1 -73
  102. package/dist/lib/connect.d.ts.map +1 -1
  103. package/dist/lib/connect.js +4 -90
  104. package/dist/lib/connect.js.map +1 -1
  105. package/dist/lib/control.d.ts +34 -0
  106. package/dist/lib/control.d.ts.map +1 -0
  107. package/dist/lib/control.js +65 -0
  108. package/dist/lib/control.js.map +1 -0
  109. package/dist/lib/delivery-proc.d.ts +2 -0
  110. package/dist/lib/delivery-proc.d.ts.map +1 -1
  111. package/dist/lib/manager-proc.d.ts +5 -13
  112. package/dist/lib/manager-proc.d.ts.map +1 -1
  113. package/dist/lib/manager-proc.js +3 -42
  114. package/dist/lib/manager-proc.js.map +1 -1
  115. package/dist/lib/manifest/apply.d.ts.map +1 -1
  116. package/dist/lib/manifest/apply.js +5 -0
  117. package/dist/lib/manifest/apply.js.map +1 -1
  118. package/dist/lib/manifest/live.d.ts.map +1 -1
  119. package/dist/lib/manifest/live.js +4 -1
  120. package/dist/lib/manifest/live.js.map +1 -1
  121. package/dist/lib/manifest/model.d.ts +2 -0
  122. package/dist/lib/manifest/model.d.ts.map +1 -1
  123. package/dist/lib/manifest/prepare.d.ts +2 -1
  124. package/dist/lib/manifest/prepare.d.ts.map +1 -1
  125. package/dist/lib/manifest/prepare.js +3 -1
  126. package/dist/lib/manifest/prepare.js.map +1 -1
  127. package/dist/lib/manifest/resolve.js +1 -0
  128. package/dist/lib/manifest/resolve.js.map +1 -1
  129. package/dist/lib/manifest/schema.d.ts +2 -0
  130. package/dist/lib/manifest/schema.d.ts.map +1 -1
  131. package/dist/lib/manifest/schema.js +3 -2
  132. package/dist/lib/manifest/schema.js.map +1 -1
  133. package/dist/lib/self-exec.d.ts +7 -2
  134. package/dist/lib/self-exec.d.ts.map +1 -1
  135. package/dist/lib/self-exec.js +14 -3
  136. package/dist/lib/self-exec.js.map +1 -1
  137. package/dist/lib/status.d.ts +8 -4
  138. package/dist/lib/status.d.ts.map +1 -1
  139. package/dist/lib/status.js +42 -9
  140. package/dist/lib/status.js.map +1 -1
  141. package/dist/ui.d.ts +1 -12
  142. package/dist/ui.d.ts.map +1 -1
  143. package/dist/ui.js +4 -12
  144. package/dist/ui.js.map +1 -1
  145. package/package.json +8 -6
  146. package/dist/commands/demo.d.ts +0 -2
  147. package/dist/commands/demo.d.ts.map +0 -1
  148. package/dist/commands/demo.js +0 -163
  149. package/dist/commands/demo.js.map +0 -1
  150. package/dist/commands/web.d.ts +0 -32
  151. package/dist/commands/web.d.ts.map +0 -1
  152. package/dist/commands/web.js +0 -307
  153. package/dist/commands/web.js.map +0 -1
  154. package/dist/web/app.js +0 -823
  155. package/dist/web/graph.html +0 -207
  156. package/dist/web/graph.js +0 -528
  157. package/dist/web/index.html +0 -350
package/dist/index.js CHANGED
@@ -1,14 +1,16 @@
1
1
  import { registry } from "@cotal-ai/core";
2
+ import { targetFlags } from "@cotal-ai/workspace";
2
3
  import { up } from "./commands/up.js";
3
4
  import { down } from "./commands/down.js";
4
5
  import { use, useComplete } from "./commands/use.js";
5
6
  import { meshes } from "./commands/meshes.js";
6
- import { setup, go } from "./commands/setup.js";
7
+ import { setup, setupFlags } from "./commands/setup.js";
7
8
  import { join } from "./commands/join.js";
8
9
  import { console_ } from "./commands/console.js";
9
- import { demo } from "./commands/demo.js";
10
- import { web } from "./commands/web.js";
11
- import { spawn, spawnComplete } from "./commands/spawn.js";
10
+ import { spawn, spawnComplete, spawnFlags } from "./commands/spawn.js";
11
+ import { attach, attachFlags, managedAgentComplete, ps, psFlags, stop, stopFlags } from "./commands/agents.js";
12
+ import { models, modelsComplete, modelsFlags } from "./commands/models.js";
13
+ import { c } from "./ui.js";
12
14
  import { personas, personasComplete } from "./commands/personas.js";
13
15
  import { completion, completionComplete, complete } from "./commands/completion.js";
14
16
  import { mint } from "./commands/mint.js";
@@ -16,38 +18,84 @@ import { channels } from "./commands/channels.js";
16
18
  import { history } from "./commands/history.js";
17
19
  import { feedback } from "./commands/feedback.js";
18
20
  import { send, sendComplete } from "./commands/send.js";
21
+ import { ext } from "./commands/ext.js";
19
22
  import { topology } from "./commands/topology.js";
20
- /** The minimal mesh CLI: thin NATS clients (up/join/console), plus `spawn` — a
21
- * foreground agent launch that reuses the connector's launch recipe. Self-registers
22
- * on import; heavier surfaces (the manager's control plane) register the same way
23
- * and are composed at a root. */
23
+ import { status, statusFlags } from "./commands/status.js";
24
+ /** The minimal mesh CLI: thin NATS clients (up/join/console), plus `spawn` — an agent launch
25
+ * (foreground or --detach) that reuses the connector's launch recipe. Self-registers on import;
26
+ * heavier surfaces (the manager daemon, delivery) register the same way and are composed at a
27
+ * root. Flags are DECLARED (here or co-located with the command) — the dispatcher parses them,
28
+ * generates each command's help/usage/completion, and hands `run` the parsed args. Groups follow
29
+ * the user's mental model (Setup · Mesh · Messaging · Agents · Observe), and the array is ordered
30
+ * by group — the help listing renders groups in first-seen order. */
24
31
  const baseCommands = [
32
+ // ---- Setup --------------------------------------------------------------------------------
25
33
  {
26
34
  kind: "command",
27
35
  name: "setup",
28
36
  group: "Setup",
29
- summary: "guided setup first run walks you through it; --yes for non-interactive (agents/CI), --full to redo",
37
+ summary: "guided setup (configure-only: installs + seeds, launches nothing) --yes non-interactive, --full to redo",
38
+ flags: setupFlags,
30
39
  run: setup,
31
40
  },
32
41
  {
33
42
  kind: "command",
34
- name: "go",
43
+ name: "ext",
35
44
  group: "Setup",
36
- summary: "open or resume your session (mesh + web + manager + your cmux tabs); first run installs",
37
- run: go,
45
+ summary: "operator-installed CLI extensions add an npm package's commands to this CLI",
46
+ usage: "ext <add <npm-package> | remove <name> | list>",
47
+ positionals: "<add <npm-package> | remove <name> | list>",
48
+ run: ext,
38
49
  },
50
+ {
51
+ kind: "command",
52
+ name: "completion",
53
+ group: "Setup",
54
+ summary: "shell completion — print a stub or install it persistently",
55
+ usage: "completion <bash|zsh|fish|powershell | install [shell]>",
56
+ positionals: "<bash|zsh|fish|powershell | install [shell]>",
57
+ run: completion,
58
+ complete: completionComplete,
59
+ },
60
+ {
61
+ kind: "command",
62
+ name: "__complete",
63
+ group: "Setup",
64
+ summary: "(internal) emit completion candidates for the current command line",
65
+ rawArgs: true,
66
+ positionals: "<words…>",
67
+ run: complete,
68
+ },
69
+ // ---- Mesh ---------------------------------------------------------------------------------
39
70
  {
40
71
  kind: "command",
41
72
  name: "up",
42
73
  group: "Mesh",
43
- summary: "start a local nats-server (JetStream, JWT auth by default; --open for an unauthenticated dev mesh) — or `-f <cotal.yaml>` to launch a whole mesh from a manifest [--dry-run; --server/--host/--space/--runtime/--open override the file]",
74
+ summary: "start a local mesh (nats-server + JetStream, JWT auth by default) — or `-f <cotal.yaml>` for a whole manifest",
75
+ flags: [
76
+ { name: "server", type: "string", value: "<url>", description: "listen URL override" },
77
+ { name: "host", type: "string", value: "<host>", description: "bind host override" },
78
+ { name: "space", type: "string", value: "<s>", description: "space name (default: the folder's)" },
79
+ { name: "store-dir", type: "string", value: "<dir>", description: "JetStream store directory" },
80
+ { name: "channels", type: "string", value: "<a,b>", description: "channels to pre-create" },
81
+ { name: "open", type: "boolean", description: "unauthenticated dev mesh (no JWT/ACLs)" },
82
+ { name: "detach", type: "boolean", description: "run in the background (stop with `cotal down`)" },
83
+ { name: "runtime", type: "string", value: "<pty|tmux|cmux>", description: "with -f: override the manifest's runtime" },
84
+ { name: "file", type: "string", short: "f", value: "<cotal.yaml>", description: "launch a whole mesh from a manifest" },
85
+ { name: "dry-run", type: "boolean", description: "with -f: print the plan, mutate nothing" },
86
+ ],
44
87
  run: up,
45
88
  },
46
89
  {
47
90
  kind: "command",
48
91
  name: "down",
49
92
  group: "Mesh",
50
- summary: "stop a background mesh started with `up --detach` — or `-f <cotal.yaml>` / `--run <id>` for an ownership-scoped teardown of a `spawn -f` deploy [--dry-run] (run from its project — local only)",
93
+ summary: "stop a background mesh — or `-f <cotal.yaml>` / `--run <id>` to tear down a `spawn -f` deploy",
94
+ flags: [
95
+ { name: "file", type: "string", short: "f", value: "<cotal.yaml>", description: "tear down this manifest's deploy" },
96
+ { name: "run", type: "string", value: "<id>", description: "tear down one `spawn -f` run by id" },
97
+ { name: "dry-run", type: "boolean", description: "print the plan, mutate nothing" },
98
+ ],
51
99
  run: down,
52
100
  },
53
101
  {
@@ -57,11 +105,20 @@ const baseCommands = [
57
105
  summary: "list the running meshes (a `*` marks the `current` default a bare spawn joins)",
58
106
  run: meshes,
59
107
  },
108
+ {
109
+ kind: "command",
110
+ name: "status",
111
+ group: "Mesh",
112
+ summary: "detailed read-only status for setup, local processes, recorded meshes, and the selected live mesh",
113
+ flags: statusFlags,
114
+ run: status,
115
+ },
60
116
  {
61
117
  kind: "command",
62
118
  name: "use",
63
119
  group: "Mesh",
64
- summary: "set the default mesh for a bare `cotal spawn` when several are running — use <space>",
120
+ summary: "set the default mesh for a bare `cotal spawn` when several are running",
121
+ positionals: "<space>",
65
122
  run: use,
66
123
  complete: useComplete,
67
124
  },
@@ -70,109 +127,204 @@ const baseCommands = [
70
127
  name: "join",
71
128
  group: "Mesh",
72
129
  summary: "join a space (interactive) — --space <s> --name <n> [--role <r>]",
130
+ flags: [
131
+ ...targetFlags,
132
+ { name: "name", type: "string", value: "<n>", description: "your presence name" },
133
+ { name: "role", type: "string", value: "<r>", description: "your role" },
134
+ { name: "channel", type: "string", value: "<c>", description: "channel to join" },
135
+ { name: "kind", type: "string", value: "<k>", description: "endpoint kind" },
136
+ { name: "link", type: "string", value: "<url>", description: "join link" },
137
+ { name: "token", type: "string", value: "<t>", description: "join token" },
138
+ { name: "tls", type: "boolean", description: "connect over TLS" },
139
+ ],
73
140
  run: join,
74
141
  },
75
142
  {
76
143
  kind: "command",
77
- name: "send",
144
+ name: "mint",
78
145
  group: "Mesh",
79
- summary: "send one message, then exit send <dm <agent> | msg <channel> | ask <role>> \"<text>\"",
146
+ summary: "mint a creds file for a space (auth mode); --signer emits a stripped account-signing file",
147
+ positionals: "<name>",
148
+ flags: [
149
+ { name: "profile", type: "string", value: "<agent|observer|admin>", description: "cred profile (default agent)" },
150
+ { name: "out", type: "string", value: "<path>", description: "output path (default .cotal/auth/creds/<name>.creds)" },
151
+ { name: "signer", type: "boolean", description: "emit a stripped account-signing file instead" },
152
+ { name: "force", type: "boolean", description: "with --signer: overwrite an existing file" },
153
+ { name: "allow-subscribe", type: "string", value: "<a,b>", description: "read ACL override (comma-separated)" },
154
+ { name: "allow-publish", type: "string", value: "<a,b>", description: "post ACL override (comma-separated)" },
155
+ ],
156
+ run: mint,
157
+ },
158
+ {
159
+ kind: "command",
160
+ name: "topology",
161
+ group: "Mesh",
162
+ summary: "validate + view a mesh manifest's access graph (read-only)",
163
+ positionals: "<view>",
164
+ flags: [{ name: "file", type: "string", short: "f", value: "<cotal.yaml>", description: "the manifest to inspect" }],
165
+ run: topology,
166
+ },
167
+ // ---- Messaging ----------------------------------------------------------------------------
168
+ {
169
+ kind: "command",
170
+ name: "send",
171
+ group: "Messaging",
172
+ summary: "send one message, then exit — dm a peer, msg a channel, or ask a role",
80
173
  usage: 'send <dm <agent> | msg <channel> | ask <role>> "<text>" [--space <s>] [--server <url>] [--creds <path>]',
174
+ positionals: '<dm <agent> | msg <channel> | ask <role>> "<text>"',
175
+ flags: [...targetFlags],
81
176
  run: send,
82
177
  complete: sendComplete,
83
178
  },
84
179
  {
85
180
  kind: "command",
86
- name: "console",
87
- group: "Mesh",
88
- summary: "live protocol view for a space — lazygit-style TUI, or a line stream on --plain — --space <s> [--plain]",
89
- run: console_,
181
+ name: "channels",
182
+ group: "Messaging",
183
+ summary: "inspect/set the channel registry (replay policy, description, instructions)",
184
+ usage: "channels <list | set <name> [--replay|--no-replay] [--desc <s>] [--instructions <s>] | default --replay|--no-replay>",
185
+ positionals: "<list | set <name> | default>",
186
+ flags: [
187
+ ...targetFlags,
188
+ { name: "replay", type: "boolean", description: "set/default: replay history to new joiners" },
189
+ { name: "no-replay", type: "boolean", description: "set/default: don't replay history" },
190
+ { name: "window", type: "string", value: "<n>", description: "set: replay window size" },
191
+ { name: "desc", type: "string", value: "<s>", description: "set: one-line channel description" },
192
+ { name: "instructions", type: "string", value: "<s>", description: "set: instructions shown to joiners" },
193
+ ],
194
+ run: channels,
90
195
  },
91
196
  {
92
197
  kind: "command",
93
- name: "demo",
94
- group: "Mesh",
95
- // A dev/test traffic generator (see docs/protocol-view.md) — runnable, but kept off the
96
- // top-level help so it doesn't clutter the user-facing surface.
97
- hidden: true,
98
- summary: "replay a scripted multi-agent trace (all message types) to exercise the console/web — --space <s> [--interval <ms>] [--once]",
99
- run: demo,
198
+ name: "history",
199
+ group: "Messaging",
200
+ summary: "clear retained message history",
201
+ usage: "history clear --force [--dms] [--space <s>]",
202
+ positionals: "<clear>",
203
+ flags: [
204
+ ...targetFlags,
205
+ { name: "dms", type: "boolean", description: "also clear DM history" },
206
+ { name: "force", type: "boolean", description: "required — clear without prompting" },
207
+ ],
208
+ run: history,
100
209
  },
101
210
  {
102
211
  kind: "command",
103
- name: "web",
104
- group: "Mesh",
105
- summary: "browser observability dashboard presence, channels, live feed --space <s> [--port <n>] [--no-open]",
106
- run: web,
212
+ name: "feedback",
213
+ group: "Messaging",
214
+ summary: 'send feedback to the Cotal developersfeedback "<summary>" [--type <t>] [--email <e>]',
215
+ positionals: '"<summary>"',
216
+ flags: [
217
+ { name: "type", type: "string", value: "<t>", description: "bug | idea | friction | praise | other" },
218
+ { name: "details", type: "string", value: "<text>", description: "longer free-form details" },
219
+ { name: "severity", type: "string", value: "<s>", description: "low | medium | high" },
220
+ { name: "area", type: "string", value: "<a>", description: "the part of Cotal this concerns" },
221
+ { name: "email", type: "string", value: "<e>", description: "contact email (required on the keyless public path)" },
222
+ { name: "name", type: "string", value: "<n>", description: "your name (optional)" },
223
+ { name: "url", type: "string", value: "<url>", description: "intake URL override" },
224
+ { name: "key", type: "string", value: "<k>", description: "feedback key (default: COTAL_FEEDBACK_KEY)" },
225
+ ],
226
+ run: feedback,
107
227
  },
228
+ // ---- Agents -------------------------------------------------------------------------------
108
229
  {
109
230
  kind: "command",
110
231
  name: "spawn",
111
232
  group: "Agents",
112
- summary: "launch an agent in this terminal from a file — spawn [<name-or-path>] (defaults to the `default` persona) | --name <n> --config <path> [--agent <a>] [--role <r>] [--resume <id>]",
233
+ summary: "launch an agent from a persona — spawn [<persona>] (defaults to COTAL_DEFAULT_PERSONA or `default`); --config accepts a persona name or path; foreground here, or --detach via the manager",
234
+ positionals: "[<persona>]",
235
+ flags: spawnFlags,
113
236
  run: spawn,
114
237
  complete: spawnComplete,
115
238
  },
116
239
  {
117
240
  kind: "command",
118
- name: "personas",
241
+ name: "models",
119
242
  group: "Agents",
120
- summary: "list/manage local personas (.cotal/agents) personas <list [-v] [--running] | show <name> | edit <name> | new <name> (--prompt <t>|--from <f>) [--role <r>] [--model <m>] | rm <name> --force>",
121
- run: personas,
122
- complete: personasComplete,
243
+ summary: "list connector model catalogs and variants from the manager",
244
+ flags: modelsFlags,
245
+ run: models,
246
+ complete: modelsComplete,
123
247
  },
124
248
  {
125
249
  kind: "command",
126
- name: "completion",
250
+ name: "start",
127
251
  group: "Agents",
128
- summary: "shell completion completion <bash|zsh|fish|powershell | install [shell]>",
129
- run: completion,
130
- complete: completionComplete,
252
+ // Tombstone (stage 2a): the verb is gone, the ability moved. Errors with the replacement —
253
+ // never a silent alias (no fallbacks). Hidden: not part of the surface, just a signpost.
254
+ hidden: true,
255
+ rawArgs: true,
256
+ positionals: "…",
257
+ summary: "(removed) `cotal start` was merged into `cotal spawn --detach`",
258
+ run: async () => {
259
+ console.error(c.red("✗ `cotal start` was merged into `cotal spawn --detach` — one launch grammar for foreground and detached (persona positional or --config; --name/--model/--cwd/--prompt/--subscribe/--allow-*/--share-tools all apply)"));
260
+ process.exit(1);
261
+ },
131
262
  },
132
263
  {
133
264
  kind: "command",
134
- name: "__complete",
265
+ name: "stop",
135
266
  group: "Agents",
136
- summary: "(internal) emit completion candidates for the current command line",
137
- run: complete,
138
- },
139
- {
140
- kind: "command",
141
- name: "mint",
142
- group: "Mesh",
143
- summary: "mint a creds file for a space (auth mode) — mint <name> --profile <agent|observer> [--out <path>]; --signer emits a stripped account-signing file (no operator key) for a containerized manager",
144
- run: mint,
267
+ summary: "ask the manager to stop an agent --name <n>",
268
+ flags: stopFlags,
269
+ run: stop,
270
+ complete: managedAgentComplete,
145
271
  },
146
272
  {
147
273
  kind: "command",
148
- name: "topology",
149
- group: "Mesh",
150
- summary: "validate + view a mesh manifest's access graph — topology view -f <cotal.yaml> (read-only; mutates nothing)",
151
- run: topology,
274
+ name: "ps",
275
+ group: "Agents",
276
+ summary: "list managed agents + their mesh status",
277
+ flags: psFlags,
278
+ run: ps,
152
279
  },
153
280
  {
154
281
  kind: "command",
155
- name: "channels",
156
- group: "Mesh",
157
- summary: "inspect/set channel registry channels <list | set <name> [--replay|--no-replay] [--desc <s>] [--instructions <s>] | default --replay|--no-replay>",
158
- run: channels,
282
+ name: "attach",
283
+ group: "Agents",
284
+ summary: "stream + drive an agent's terminal (pty runtime) --name <n>",
285
+ flags: attachFlags,
286
+ run: attach,
287
+ complete: managedAgentComplete,
159
288
  },
160
289
  {
161
290
  kind: "command",
162
- name: "history",
163
- group: "Mesh",
164
- summary: "clear retained message history — history clear --force [--dms] [--space <s>]",
165
- run: history,
291
+ name: "personas",
292
+ group: "Agents",
293
+ summary: "list/manage local personas (.cotal/agents)",
294
+ usage: "personas <list [-v] [--running] | show <name> | edit <name> | new <name> (--prompt <t>|--from <f>) [--role <r>] [--model <m>] | rm <name> --force>",
295
+ positionals: "<list | show <name> | edit <name> | new <name> | rm <name>>",
296
+ flags: [
297
+ ...targetFlags,
298
+ { name: "role", type: "string", value: "<r>", description: "new: the persona's role" },
299
+ { name: "model", type: "string", value: "<m>", description: "new: the persona's model" },
300
+ { name: "prompt", type: "string", value: "<t>", description: "new: the persona's prompt text" },
301
+ { name: "from", type: "string", value: "<f>", description: "new: seed the prompt from a file" },
302
+ { name: "verbose", type: "boolean", short: "v", description: "list: include role/model/description" },
303
+ { name: "running", type: "boolean", description: "list: mark personas live on the mesh" },
304
+ { name: "force", type: "boolean", description: "rm: required — delete without prompting" },
305
+ ],
306
+ run: personas,
307
+ complete: personasComplete,
166
308
  },
309
+ // ---- Observe ------------------------------------------------------------------------------
167
310
  {
168
311
  kind: "command",
169
- name: "feedback",
170
- group: "Mesh",
171
- summary: 'send feedback feedback "<summary>" [--type <t>] [--email <e>] or run the intake server: feedback --keys <keys.json> --creds <creds> [--port <n>]',
172
- run: feedback,
312
+ name: "console",
313
+ group: "Observe",
314
+ summary: "live protocol view for a space lazygit-style TUI, or a line stream on --plain",
315
+ flags: [...targetFlags, { name: "plain", type: "boolean", description: "line stream instead of the TUI" }],
316
+ run: console_,
173
317
  },
318
+ // `web` (dashboard) moved out to the `cotal-web` extension package (stage 4) — installed via
319
+ // `cotal ext add`, it self-registers here and appears in this same surface.
174
320
  ];
175
321
  registry.register(...baseCommands);
176
322
  export { runCli } from "./command.js";
177
323
  export { c, statusBadge } from "./ui.js";
324
+ // The full spawn grammar, for the composition root's launch-parity smoke (grammar ⊆ start-op ⊆ MCP).
325
+ export { spawnFlags } from "./commands/spawn.js";
326
+ // The launch-client timeout + the manifest launch client, for the same smoke: every launch door
327
+ // must outlive the manager's readiness wait (#159 B1).
328
+ export { START_TIMEOUT_MS } from "./lib/control.js";
329
+ export { launchAgent } from "./lib/manifest/live.js";
178
330
  //# sourceMappingURL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E,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The detach key — Ctrl-] (0x1d) by default, as in telnet/ssh escape conventions. `COTAL_DETACH_KEY`
3
+ * rebinds it to another control key when Ctrl-] clashes with a keybinding inside the agent's TUI;
4
+ * accepts `ctrl-<char>` or `^<char>` (e.g. `ctrl-b`, `^_`). Read at point of use, per the repo's
5
+ * `COTAL_*` convention. An unparseable value — including a set-but-empty or whitespace-only one —
6
+ * throws (named), never silently falling back; the caller turns that into a loud exit. Only an
7
+ * unset var = the Ctrl-] default.
8
+ */
9
+ export declare function detachKey(): {
10
+ byte: number;
11
+ label: string;
12
+ overridden: boolean;
13
+ };
14
+ /**
15
+ * Drive a manager's attach endpoint from the terminal: raw-mode stdin streams to
16
+ * the PTY, PTY output streams to stdout, and SIGWINCH-style resizes are forwarded.
17
+ * The detach key (Ctrl-] by default, {@link detachKey}) detaches without killing the agent.
18
+ */
19
+ export declare function attachClient(url: string): Promise<void>;
20
+ //# sourceMappingURL=attach-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attach-client.d.ts","sourceRoot":"","sources":["../../src/lib/attach-client.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,SAAS,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAYhF;AAwDD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmIvD"}