@agent-compose/sdk 0.8.4 → 0.8.6

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 (106) hide show
  1. package/README.md +213 -189
  2. package/dist/agent/agent-context.d.ts +9 -1
  3. package/dist/agent/agent-loop.d.ts +14 -6
  4. package/dist/agent/perf-sampler.d.ts +27 -2
  5. package/dist/agent/run-agent.d.ts +1 -1
  6. package/dist/client.d.ts +250 -59
  7. package/dist/directives.d.ts +14 -0
  8. package/dist/display.d.ts +7 -0
  9. package/dist/errors.d.ts +1 -1
  10. package/dist/generated/agentc-commands.d.ts +34 -0
  11. package/dist/index.d.ts +13 -11
  12. package/dist/index.js +1692 -194
  13. package/dist/request-context/request-context.d.ts +1 -1
  14. package/dist/runtimes/_cli-agent.d.ts +278 -58
  15. package/dist/runtimes/claude-code.d.ts +90 -1
  16. package/dist/runtimes/claude.d.ts +1 -1
  17. package/dist/runtimes/codex.d.ts +94 -6
  18. package/dist/runtimes/codex.mid-turn-hook.test.d.ts +10 -0
  19. package/dist/runtimes/openai-desktop.d.ts +50 -0
  20. package/dist/runtimes/openai-desktop.js +1689 -211
  21. package/dist/runtimes/openai-desktop.test.d.ts +20 -0
  22. package/dist/runtimes/opencode.d.ts +48 -11
  23. package/dist/runtimes/opencode.test.d.ts +14 -0
  24. package/dist/runtimes/tool-pulse.test.d.ts +17 -0
  25. package/dist/sandbox/baked-clis.d.ts +75 -0
  26. package/dist/sandbox/devbox.d.ts +5 -5
  27. package/dist/sandbox/exec-stream.d.ts +1 -2
  28. package/dist/sandbox/network-policy.d.ts +23 -5
  29. package/dist/sandbox/registry.d.ts +12 -0
  30. package/dist/sandbox/sizes.d.ts +11 -5
  31. package/dist/sandbox.d.ts +5 -3
  32. package/dist/step-invocation/protocol.d.ts +3 -4
  33. package/dist/step-invocation/server.d.ts +2 -2
  34. package/dist/step-invocation/types.d.ts +2 -2
  35. package/dist/types/api-conversations.d.ts +513 -27
  36. package/dist/types/api-factory.d.ts +183 -3
  37. package/dist/types/api-projects.d.ts +480 -0
  38. package/dist/types/api-runs.d.ts +8 -0
  39. package/dist/types/api-scopes.d.ts +32 -3
  40. package/dist/types/conversation-stream.d.ts +27 -1
  41. package/dist/types/execution-context.d.ts +1 -1
  42. package/dist/types/protocol.d.ts +182 -2
  43. package/dist/types/runtime.d.ts +80 -2
  44. package/dist/types/workflow-metadata.d.ts +2 -4
  45. package/dist/types/workflow-plan.d.ts +1 -3
  46. package/dist/utils/bundler.d.ts +23 -0
  47. package/dist/workflow-steps/observability.d.ts +2 -3
  48. package/dist/workflow-steps/runner.d.ts +5 -8
  49. package/dist/workflow-steps/types.d.ts +8 -10
  50. package/dist/workflow-steps/workflow.d.ts +2 -1
  51. package/dist/workflows/engine.d.ts +3 -5
  52. package/dist/workflows/invoke-child.d.ts +2 -2
  53. package/package.json +2 -2
  54. package/src/agent/agent-context.ts +193 -116
  55. package/src/agent/agent-loop.ts +16 -9
  56. package/src/agent/desktop-open.ts +13 -1
  57. package/src/agent/perf-sampler.ts +54 -3
  58. package/src/agent/run-agent.ts +1 -1
  59. package/src/client.ts +418 -80
  60. package/src/directives.ts +21 -1
  61. package/src/display.ts +12 -0
  62. package/src/errors.ts +1 -0
  63. package/src/generated/agentc-commands.ts +571 -0
  64. package/src/index.ts +65 -18
  65. package/src/pause/pause-core.ts +2 -1
  66. package/src/request-context/request-context.ts +1 -1
  67. package/src/runtimes/_cli-agent.ts +607 -132
  68. package/src/runtimes/claude-code.ts +427 -20
  69. package/src/runtimes/claude.ts +1 -1
  70. package/src/runtimes/codex.ts +188 -19
  71. package/src/runtimes/openai-desktop.ts +82 -19
  72. package/src/runtimes/opencode.ts +195 -26
  73. package/src/sandbox/baked-clis.ts +86 -0
  74. package/src/sandbox/devbox.ts +5 -5
  75. package/src/sandbox/exec-stream.ts +1 -2
  76. package/src/sandbox/network-policy.ts +51 -7
  77. package/src/sandbox/providers/e2b.ts +63 -19
  78. package/src/sandbox/providers/vercel.ts +6 -6
  79. package/src/sandbox/registry.ts +19 -1
  80. package/src/sandbox/sizes.ts +11 -5
  81. package/src/sandbox.ts +9 -2
  82. package/src/step-invocation/invoker.ts +2 -6
  83. package/src/step-invocation/protocol.ts +3 -4
  84. package/src/step-invocation/server.ts +2 -2
  85. package/src/types/api-conversations.ts +424 -29
  86. package/src/types/api-factory.ts +189 -3
  87. package/src/types/api-projects.ts +443 -0
  88. package/src/types/api-runs.ts +5 -0
  89. package/src/types/api-scopes.ts +32 -3
  90. package/src/types/conversation-stream.ts +29 -1
  91. package/src/types/execution-context.ts +1 -1
  92. package/src/types/protocol.ts +180 -2
  93. package/src/types/runtime.ts +71 -2
  94. package/src/types/sandbox-environment.ts +1 -2
  95. package/src/types/workflow-metadata.ts +2 -4
  96. package/src/types/workflow-plan.ts +1 -3
  97. package/src/utils/bundler.ts +88 -19
  98. package/src/workflow-steps/observability.ts +2 -3
  99. package/src/workflow-steps/runner.ts +5 -8
  100. package/src/workflow-steps/types.ts +8 -10
  101. package/src/workflow-steps/workflow.ts +2 -1
  102. package/src/workflows/engine.ts +3 -5
  103. package/src/workflows/invoke-child.ts +2 -2
  104. package/dist/pause/__tests__/errors.test.d.ts +0 -1
  105. package/dist/pause/__tests__/wrappers.test.d.ts +0 -1
  106. package/dist/step-invocation/__tests__/protocol.test.d.ts +0 -1
package/src/directives.ts CHANGED
@@ -61,7 +61,15 @@ export type CloudDirective =
61
61
  /** Interactive question card gated on a named approver — resolution and
62
62
  * the mentions ping are server-authoritative (`display_ask` shape). The
63
63
  * one write-bearing directive (see the module header). */
64
- | { kind: "ask"; prompt: string; approver: string; options?: Array<{ id: string; label: string }> };
64
+ | { kind: "ask"; prompt: string; approver: string; options?: Array<{ id: string; label: string }> }
65
+ /** Offer the human the desktop takeover door (`show_computer` handing the
66
+ * screen over): the server captures the current screen and posts a card
67
+ * with a signed takeover link — "You can take over from here." Grants nothing
68
+ * by itself: the link's viewer must still be a signed-in member with
69
+ * write access to THIS session (the server re-checks on every resolve).
70
+ * ONLY for structurally-human walls (a CAPTCHA, human-only verification)
71
+ * or when the user asked to do it themselves. */
72
+ | { kind: "takeover"; note?: string };
65
73
 
66
74
  /** `runId` values the run directives accept: a UUID, or the literal
67
75
  * `latest` (resolved server-side against the session's factory, optionally
@@ -85,6 +93,10 @@ export const ASK_DIRECTIVE_OPTION_LABEL_MAX = 60;
85
93
  export const ASK_APPROVER_MIN = 3;
86
94
  export const ASK_APPROVER_MAX = 320;
87
95
 
96
+ /** Takeover-note bound — one line naming what the human must do on the
97
+ * screen (mirrors the display-desktop caption cap). */
98
+ export const TAKEOVER_NOTE_MAX_CHARS = 200;
99
+
88
100
  function validDirectivePath(v: unknown): string | null {
89
101
  return typeof v === "string" && v.length >= 1 && v.length <= DIRECTIVE_PATH_MAX ? v : null;
90
102
  }
@@ -152,6 +164,14 @@ function validDirective(value: unknown): CloudDirective | null {
152
164
  }
153
165
  return { kind: "ask", prompt, approver, ...(options !== undefined ? { options } : {}) };
154
166
  }
167
+ if (d.kind === "takeover") {
168
+ const note = d.note;
169
+ if (note !== undefined
170
+ && (typeof note !== "string" || note.length < 1 || note.length > TAKEOVER_NOTE_MAX_CHARS)) {
171
+ return null;
172
+ }
173
+ return { kind: "takeover", ...(note !== undefined ? { note } : {}) };
174
+ }
155
175
  return null;
156
176
  }
157
177
 
package/src/display.ts CHANGED
@@ -681,6 +681,18 @@ function runIdIn(text: string): { runId: string; parsed: Record<string, unknown>
681
681
  return m ? { runId: m[1], parsed: null } : null;
682
682
  }
683
683
 
684
+ /** Every platform tool name `createDisplayPromoter` can put on a promoted
685
+ * `tool_call` — the closed set a local bridge daemon may legitimately post
686
+ * under a platform-owned name. The server's part-POST door
687
+ * (routes/bridge.ts) refuses every other platform tool name from a daemon,
688
+ * so a local agent cannot forge an approval, vault or takeover card. Kept
689
+ * beside the promoter so the two cannot drift. */
690
+ export const DISPLAY_PROMOTED_TOOL_NAMES: ReadonlySet<string> = new Set([
691
+ "display_run", "display_changes", "display_document", "display_plan", "display_image",
692
+ "display_desktop", "display_preview", "display_table", "display_chart", "display_diff",
693
+ "display_ask", "dispatch_workflow",
694
+ ]);
695
+
684
696
  export function createDisplayPromoter(ctx: DisplayPromoterContext = {}): DisplayPromoter {
685
697
  const pending = new Map<string, PendingPromotion>();
686
698
 
package/src/errors.ts CHANGED
@@ -7,6 +7,7 @@ export type AuthzErrorCode =
7
7
  | "capability_required"
8
8
  | "membership_required"
9
9
  | "last_owner"
10
+ | "creator_cannot_leave"
10
11
  | "approver_only";
11
12
 
12
13
  /** Thrown by AgentComposeClient when the server returns a non-2xx response. */
@@ -0,0 +1,571 @@
1
+ /**
2
+ * GENERATED FILE — DO NOT EDIT.
3
+ *
4
+ * Regenerate with `cd cli && bun run generate:commands` (the CLI build chains
5
+ * it). Source of truth: the commander registry in `cli/src/program.ts`.
6
+ * Generator: `cli/scripts/generate-command-list.ts`.
7
+ *
8
+ * This is the complete list of `agentc` verbs, shipped verbatim into every
9
+ * agent-facing context — the cloud-session system prompt
10
+ * (server/src/agent/cloud-executor.ts) and the in-sandbox platform manual
11
+ * (sdk/src/agent/agent-context.ts). It exists because a hand-maintained
12
+ * subset drifted: an agent told its owner the CLI "has no cancel verb"
13
+ * while `agentc cancel` had shipped long before. A lockstep test
14
+ * (cli/src/__tests__/command-list.test.ts) fails the build if a registered
15
+ * command is missing here, so the drift cannot recur.
16
+ */
17
+
18
+ /** One top-level verb, one subcommand level deep. `args` is a leaf verb's
19
+ * typed shape (positional args + mandatory options); subcommand entries
20
+ * carry their own signatures inline. */
21
+ export interface AgentcCommand {
22
+ name: string;
23
+ aliases: readonly string[];
24
+ args: string;
25
+ description: string;
26
+ subcommands: readonly string[];
27
+ }
28
+
29
+ /** Every registered top-level verb, sorted by name. */
30
+ export const AGENTC_COMMANDS: readonly AgentcCommand[] = [
31
+ {
32
+ "name": "access",
33
+ "aliases": [],
34
+ "args": "",
35
+ "description": "What this session can reach, by scope (workspace, project, personal):…",
36
+ "subcommands": []
37
+ },
38
+ {
39
+ "name": "auth",
40
+ "aliases": [],
41
+ "args": "",
42
+ "description": "Manage authentication",
43
+ "subcommands": [
44
+ "login <key>",
45
+ "logout",
46
+ "status"
47
+ ]
48
+ },
49
+ {
50
+ "name": "branch",
51
+ "aliases": [],
52
+ "args": "",
53
+ "description": "Session drive branches: claim/release write authority, rebase on main",
54
+ "subcommands": [
55
+ "claim <target>",
56
+ "rebase [target]",
57
+ "release [target]",
58
+ "status"
59
+ ]
60
+ },
61
+ {
62
+ "name": "bridge",
63
+ "aliases": [],
64
+ "args": "",
65
+ "description": "Connect a local coding agent (Claude Code / OpenCode) to…",
66
+ "subcommands": [
67
+ "login --agent <kind>",
68
+ "status",
69
+ "logout"
70
+ ]
71
+ },
72
+ {
73
+ "name": "calendar",
74
+ "aliases": [],
75
+ "args": "",
76
+ "description": "Check your owner's calendar",
77
+ "subcommands": []
78
+ },
79
+ {
80
+ "name": "cancel",
81
+ "aliases": [],
82
+ "args": "<run-id>",
83
+ "description": "Cancel an in-progress run",
84
+ "subcommands": []
85
+ },
86
+ {
87
+ "name": "compliance",
88
+ "aliases": [],
89
+ "args": "",
90
+ "description": "Break-glass compliance sessions",
91
+ "subcommands": [
92
+ "request --scope <kind> --reason <text> --ttl <duration>",
93
+ "approve <session-id>",
94
+ "revoke <session-id>",
95
+ "list",
96
+ "accesses <session-id>"
97
+ ]
98
+ },
99
+ {
100
+ "name": "connect",
101
+ "aliases": [],
102
+ "args": "",
103
+ "description": "Connect this machine: sign in if needed (one browser approval),…",
104
+ "subcommands": []
105
+ },
106
+ {
107
+ "name": "consent",
108
+ "aliases": [],
109
+ "args": "<id>",
110
+ "description": "Verify a consent id the platform named",
111
+ "subcommands": []
112
+ },
113
+ {
114
+ "name": "conv",
115
+ "aliases": [],
116
+ "args": "",
117
+ "description": "List and read conversations",
118
+ "subcommands": [
119
+ "list",
120
+ "read <conversationId>",
121
+ "members <conversationId>",
122
+ "invite <conversationId> <users...>",
123
+ "role"
124
+ ]
125
+ },
126
+ {
127
+ "name": "display",
128
+ "aliases": [],
129
+ "args": "",
130
+ "description": "Render a rich card into the conversation transcript",
131
+ "subcommands": [
132
+ "run <runId>",
133
+ "changes <runId>",
134
+ "document <drive-path>",
135
+ "plan --entries <json>",
136
+ "image <drive-path>",
137
+ "desktop",
138
+ "preview <drive-path>",
139
+ "table",
140
+ "chart --data <json> --kind <kind>",
141
+ "diff <drive-path> --from <rev> --to <rev>",
142
+ "ask --prompt <text>"
143
+ ]
144
+ },
145
+ {
146
+ "name": "events",
147
+ "aliases": [],
148
+ "args": "",
149
+ "description": "Send or list run events",
150
+ "subcommands": [
151
+ "send <run-id> <name>",
152
+ "list [run-id]"
153
+ ]
154
+ },
155
+ {
156
+ "name": "factory",
157
+ "aliases": [],
158
+ "args": "",
159
+ "description": "Manage factories",
160
+ "subcommands": [
161
+ "list",
162
+ "create <slug>",
163
+ "use <slug>",
164
+ "delete <slug>",
165
+ "show"
166
+ ]
167
+ },
168
+ {
169
+ "name": "files",
170
+ "aliases": [],
171
+ "args": "",
172
+ "description": "Read/write documents on a factory's drive",
173
+ "subcommands": [
174
+ "conflicts",
175
+ "mount [dir]",
176
+ "unmount",
177
+ "mounts",
178
+ "merge",
179
+ "flush",
180
+ "put <local-file> <drive-path>",
181
+ "ls [prefix]",
182
+ "read <drive-path>",
183
+ "write <drive-path>",
184
+ "pull <drive-path>",
185
+ "get <drive-path>"
186
+ ]
187
+ },
188
+ {
189
+ "name": "import",
190
+ "aliases": [],
191
+ "args": "",
192
+ "description": "Move a local Claude Code session into Agent Compose: history,…",
193
+ "subcommands": []
194
+ },
195
+ {
196
+ "name": "init",
197
+ "aliases": [],
198
+ "args": "",
199
+ "description": "Install agentc skills",
200
+ "subcommands": []
201
+ },
202
+ {
203
+ "name": "invoke",
204
+ "aliases": [],
205
+ "args": "[template]",
206
+ "description": "Invoke a registered workflow template or a platform default",
207
+ "subcommands": []
208
+ },
209
+ {
210
+ "name": "keys",
211
+ "aliases": [],
212
+ "args": "",
213
+ "description": "Manage API keys",
214
+ "subcommands": [
215
+ "create <name>",
216
+ "list"
217
+ ]
218
+ },
219
+ {
220
+ "name": "list",
221
+ "aliases": [],
222
+ "args": "",
223
+ "description": "List workflow templates you can invoke",
224
+ "subcommands": []
225
+ },
226
+ {
227
+ "name": "login",
228
+ "aliases": [],
229
+ "args": "",
230
+ "description": "Log in via your browser",
231
+ "subcommands": []
232
+ },
233
+ {
234
+ "name": "logout",
235
+ "aliases": [],
236
+ "args": "",
237
+ "description": "Clear this machine's browser-login credentials",
238
+ "subcommands": []
239
+ },
240
+ {
241
+ "name": "logs",
242
+ "aliases": [],
243
+ "args": "<run-id>",
244
+ "description": "Stream logs for a run",
245
+ "subcommands": []
246
+ },
247
+ {
248
+ "name": "machine",
249
+ "aliases": [],
250
+ "args": "",
251
+ "description": "Resize this session's machine",
252
+ "subcommands": [
253
+ "upsize"
254
+ ]
255
+ },
256
+ {
257
+ "name": "mail",
258
+ "aliases": [],
259
+ "args": "",
260
+ "description": "Check your owner's email",
261
+ "subcommands": [
262
+ "search [query...]",
263
+ "read <message-id>",
264
+ "sent <message-id>"
265
+ ]
266
+ },
267
+ {
268
+ "name": "members",
269
+ "aliases": [],
270
+ "args": "",
271
+ "description": "List teammates and flag them for attention",
272
+ "subcommands": [
273
+ "list",
274
+ "notify --user <id-or-email> --text <message>"
275
+ ]
276
+ },
277
+ {
278
+ "name": "merge",
279
+ "aliases": [],
280
+ "args": "",
281
+ "description": "Merge THIS session's own drive branch into the shared drive's…",
282
+ "subcommands": []
283
+ },
284
+ {
285
+ "name": "navigate",
286
+ "aliases": [],
287
+ "args": "<path>",
288
+ "description": "Take the user's dashboard to a page",
289
+ "subcommands": []
290
+ },
291
+ {
292
+ "name": "notify",
293
+ "aliases": [],
294
+ "args": "[need...]",
295
+ "description": "Push a need to your owner: `agentc notify \"Want the…",
296
+ "subcommands": []
297
+ },
298
+ {
299
+ "name": "pause",
300
+ "aliases": [],
301
+ "args": "--reason <text>",
302
+ "description": "Ask the human a question and block until they answer",
303
+ "subcommands": []
304
+ },
305
+ {
306
+ "name": "preview",
307
+ "aliases": [],
308
+ "args": "",
309
+ "description": "Expose a dev-server port on a hosted, member-gated URL",
310
+ "subcommands": [
311
+ "open|announce <port>",
312
+ "list",
313
+ "close <port>"
314
+ ]
315
+ },
316
+ {
317
+ "name": "project",
318
+ "aliases": [],
319
+ "args": "",
320
+ "description": "Create and manage projects",
321
+ "subcommands": [
322
+ "create <name>",
323
+ "list",
324
+ "show <ref>",
325
+ "delete <ref>",
326
+ "members <ref>",
327
+ "invite <ref>",
328
+ "role",
329
+ "remove-member <ref> <user>",
330
+ "leave <ref>",
331
+ "objects <ref>",
332
+ "add <ref> <objectRef>",
333
+ "refresh <ref> <sessionRef>",
334
+ "remove <ref> <objectRef>"
335
+ ]
336
+ },
337
+ {
338
+ "name": "register",
339
+ "aliases": [],
340
+ "args": "<workflow>",
341
+ "description": "Register a workflow with the server",
342
+ "subcommands": []
343
+ },
344
+ {
345
+ "name": "repos",
346
+ "aliases": [],
347
+ "args": "",
348
+ "description": "Link factory-drive directories to GitHub repositories",
349
+ "subcommands": [
350
+ "link <repoFullName> --prefix <dir>",
351
+ "create <name>",
352
+ "links",
353
+ "unlink <linkId>",
354
+ "clone <link>",
355
+ "restore",
356
+ "setup",
357
+ "gh-token [link]",
358
+ "git-credential [op]",
359
+ "mirror <link>"
360
+ ]
361
+ },
362
+ {
363
+ "name": "review",
364
+ "aliases": [],
365
+ "args": "",
366
+ "description": "In-sandbox toolbelt for a spawned diff-review session",
367
+ "subcommands": [
368
+ "findings",
369
+ "publish --notes <file>",
370
+ "git-credential <action>",
371
+ "changes",
372
+ "file <path>"
373
+ ]
374
+ },
375
+ {
376
+ "name": "run",
377
+ "aliases": [],
378
+ "args": "",
379
+ "description": "Dispatch workflows and check run status",
380
+ "subcommands": [
381
+ "dispatch <templateName> --input <json>",
382
+ "get <runId>",
383
+ "watch <runId>",
384
+ "list",
385
+ "artifacts <runId> [path]",
386
+ "latest"
387
+ ]
388
+ },
389
+ {
390
+ "name": "schedule",
391
+ "aliases": [],
392
+ "args": "",
393
+ "description": "Manage cron schedules attached to registered workflows",
394
+ "subcommands": [
395
+ "create <name> --workflow <name> --cron <expr>",
396
+ "list",
397
+ "delete <id>"
398
+ ]
399
+ },
400
+ {
401
+ "name": "search",
402
+ "aliases": [],
403
+ "args": "<query>",
404
+ "description": "Search factory files",
405
+ "subcommands": []
406
+ },
407
+ {
408
+ "name": "secrets",
409
+ "aliases": [],
410
+ "args": "",
411
+ "description": "Manage secrets",
412
+ "subcommands": [
413
+ "set <workflow> <key> <value>",
414
+ "list <workflow>",
415
+ "delete <workflow> <key>",
416
+ "factory",
417
+ "session"
418
+ ]
419
+ },
420
+ {
421
+ "name": "services",
422
+ "aliases": [],
423
+ "args": "",
424
+ "description": "Durable services manifest",
425
+ "subcommands": [
426
+ "list",
427
+ "add <name> --command <cmd>",
428
+ "remove <name>",
429
+ "restore [names...]"
430
+ ]
431
+ },
432
+ {
433
+ "name": "session",
434
+ "aliases": [
435
+ "chat"
436
+ ],
437
+ "args": "",
438
+ "description": "Interactive terminal chat on a conversation",
439
+ "subcommands": [
440
+ "login",
441
+ "logout",
442
+ "add",
443
+ "import",
444
+ "resume <conversationId>",
445
+ "terminal <conversationId>",
446
+ "fork [conversationId]",
447
+ "share <conversationId>",
448
+ "unshare <conversationId>",
449
+ "attach <channelId> [conversationId]",
450
+ "detach <channelId> [conversationId]",
451
+ "share-file <conversationId> <path>",
452
+ "unshare-file <conversationId> <path>",
453
+ "message <target> [text]",
454
+ "read",
455
+ "ask [question]",
456
+ "post [text]"
457
+ ]
458
+ },
459
+ {
460
+ "name": "setup",
461
+ "aliases": [],
462
+ "args": "",
463
+ "description": "Set this machine up so any agent on it can…",
464
+ "subcommands": []
465
+ },
466
+ {
467
+ "name": "share",
468
+ "aliases": [],
469
+ "args": "<ref>",
470
+ "description": "Share a drive document or a workflow template",
471
+ "subcommands": []
472
+ },
473
+ {
474
+ "name": "skills",
475
+ "aliases": [],
476
+ "args": "",
477
+ "description": "Bring your own skills: import local Claude Code skills into…",
478
+ "subcommands": [
479
+ "import",
480
+ "list",
481
+ "show <name>",
482
+ "adopt <name>",
483
+ "rm <name>",
484
+ "share <name>",
485
+ "unshare <name>"
486
+ ]
487
+ },
488
+ {
489
+ "name": "snapshot",
490
+ "aliases": [],
491
+ "args": "",
492
+ "description": "Manage captured sandbox snapshots",
493
+ "subcommands": [
494
+ "list",
495
+ "delete <run-id> [snapshot-id]",
496
+ "show <run-id>"
497
+ ]
498
+ },
499
+ {
500
+ "name": "takeover",
501
+ "aliases": [],
502
+ "args": "",
503
+ "description": "Offer the human this desktop",
504
+ "subcommands": []
505
+ },
506
+ {
507
+ "name": "thread",
508
+ "aliases": [],
509
+ "args": "",
510
+ "description": "Read this session's thread queue on your owner's board",
511
+ "subcommands": [
512
+ "progress [note...]"
513
+ ]
514
+ },
515
+ {
516
+ "name": "upgrade",
517
+ "aliases": [],
518
+ "args": "",
519
+ "description": "Update the agentc CLI to the latest published version",
520
+ "subcommands": []
521
+ },
522
+ {
523
+ "name": "usage",
524
+ "aliases": [],
525
+ "args": "",
526
+ "description": "Show billable usage",
527
+ "subcommands": []
528
+ },
529
+ {
530
+ "name": "wait",
531
+ "aliases": [],
532
+ "args": "",
533
+ "description": "Declare what this session is waiting for",
534
+ "subcommands": [
535
+ "list",
536
+ "cancel <id>"
537
+ ]
538
+ },
539
+ {
540
+ "name": "watch",
541
+ "aliases": [],
542
+ "args": "",
543
+ "description": "Connect the claude-code session already running in this directory to…",
544
+ "subcommands": []
545
+ },
546
+ {
547
+ "name": "web",
548
+ "aliases": [],
549
+ "args": "<query...>",
550
+ "description": "Search the web",
551
+ "subcommands": []
552
+ },
553
+ {
554
+ "name": "work",
555
+ "aliases": [],
556
+ "args": "",
557
+ "description": "Hold or release this session's background-work busy lease",
558
+ "subcommands": [
559
+ "hold",
560
+ "release"
561
+ ]
562
+ }
563
+ ] as const;
564
+
565
+ /** The rendered block: title, one framing line, then one line per verb.
566
+ * Ships verbatim in the server's cloud-session system prompt. */
567
+ export const AGENTC_COMMAND_LIST = "agentc verbs — the complete list:\nGenerated from the CLI's own registry — if a verb is listed here it EXISTS on your PATH; run `agentc <verb> --help` for its flags, and never tell anyone a capability is missing without checking this list first.\n- agentc access — What this session can reach, by scope (workspace, project, personal):…\n- agentc auth login <key>, logout, status — Manage authentication\n- agentc branch claim <target>, rebase [target], release [target], status — Session drive branches: claim/release write authority, rebase on main\n- agentc bridge login --agent <kind>, status, logout — Connect a local coding agent (Claude Code / OpenCode) to…\n- agentc calendar — Check your owner's calendar\n- agentc cancel <run-id> — Cancel an in-progress run\n- agentc compliance request --scope <kind> --reason <text> --ttl <duration>, approve <session-id>, revoke <session-id>, list, accesses <session-id> — Break-glass compliance sessions\n- agentc connect — Connect this machine: sign in if needed (one browser approval),…\n- agentc consent <id> — Verify a consent id the platform named\n- agentc conv list, read <conversationId>, members <conversationId>, invite <conversationId> <users...>, role — List and read conversations\n- agentc display run <runId>, changes <runId>, document <drive-path>, plan --entries <json>, image <drive-path>, desktop, preview <drive-path>, table, chart --data <json> --kind <kind>, diff <drive-path> --from <rev> --to <rev>, ask --prompt <text> — Render a rich card into the conversation transcript\n- agentc events send <run-id> <name>, list [run-id] — Send or list run events\n- agentc factory list, create <slug>, use <slug>, delete <slug>, show — Manage factories\n- agentc files conflicts, mount [dir], unmount, mounts, merge, flush, put <local-file> <drive-path>, ls [prefix], read <drive-path>, write <drive-path>, pull <drive-path>, get <drive-path> — Read/write documents on a factory's drive\n- agentc import — Move a local Claude Code session into Agent Compose: history,…\n- agentc init — Install agentc skills\n- agentc invoke [template] — Invoke a registered workflow template or a platform default\n- agentc keys create <name>, list — Manage API keys\n- agentc list — List workflow templates you can invoke\n- agentc login — Log in via your browser\n- agentc logout — Clear this machine's browser-login credentials\n- agentc logs <run-id> — Stream logs for a run\n- agentc machine upsize — Resize this session's machine\n- agentc mail search [query...], read <message-id>, sent <message-id> — Check your owner's email\n- agentc members list, notify --user <id-or-email> --text <message> — List teammates and flag them for attention\n- agentc merge — Merge THIS session's own drive branch into the shared drive's…\n- agentc navigate <path> — Take the user's dashboard to a page\n- agentc notify [need...] — Push a need to your owner: `agentc notify \"Want the…\n- agentc pause --reason <text> — Ask the human a question and block until they answer\n- agentc preview open|announce <port>, list, close <port> — Expose a dev-server port on a hosted, member-gated URL\n- agentc project create <name>, list, show <ref>, delete <ref>, members <ref>, invite <ref>, role, remove-member <ref> <user>, leave <ref>, objects <ref>, add <ref> <objectRef>, refresh <ref> <sessionRef>, remove <ref> <objectRef> — Create and manage projects\n- agentc register <workflow> — Register a workflow with the server\n- agentc repos link <repoFullName> --prefix <dir>, create <name>, links, unlink <linkId>, clone <link>, restore, setup, gh-token [link], git-credential [op], mirror <link> — Link factory-drive directories to GitHub repositories\n- agentc review findings, publish --notes <file>, git-credential <action>, changes, file <path> — In-sandbox toolbelt for a spawned diff-review session\n- agentc run dispatch <templateName> --input <json>, get <runId>, watch <runId>, list, artifacts <runId> [path], latest — Dispatch workflows and check run status\n- agentc schedule create <name> --workflow <name> --cron <expr>, list, delete <id> — Manage cron schedules attached to registered workflows\n- agentc search <query> — Search factory files\n- agentc secrets set <workflow> <key> <value>, list <workflow>, delete <workflow> <key>, factory, session — Manage secrets\n- agentc services list, add <name> --command <cmd>, remove <name>, restore [names...] — Durable services manifest\n- agentc session|chat login, logout, add, import, resume <conversationId>, terminal <conversationId>, fork [conversationId], share <conversationId>, unshare <conversationId>, attach <channelId> [conversationId], detach <channelId> [conversationId], share-file <conversationId> <path>, unshare-file <conversationId> <path>, message <target> [text], read, ask [question], post [text] — Interactive terminal chat on a conversation\n- agentc setup — Set this machine up so any agent on it can…\n- agentc share <ref> — Share a drive document or a workflow template\n- agentc skills import, list, show <name>, adopt <name>, rm <name>, share <name>, unshare <name> — Bring your own skills: import local Claude Code skills into…\n- agentc snapshot list, delete <run-id> [snapshot-id], show <run-id> — Manage captured sandbox snapshots\n- agentc takeover — Offer the human this desktop\n- agentc thread progress [note...] — Read this session's thread queue on your owner's board\n- agentc upgrade — Update the agentc CLI to the latest published version\n- agentc usage — Show billable usage\n- agentc wait list, cancel <id> — Declare what this session is waiting for\n- agentc watch — Connect the claude-code session already running in this directory to…\n- agentc web <query...> — Search the web\n- agentc work hold/release — Hold or release this session's background-work busy lease";
568
+
569
+ /** The same block as a markdown `##` section — ships verbatim inside the
570
+ * in-sandbox platform manual (`AGENT_COMPOSE_MANUAL`). Same verb lines. */
571
+ export const AGENTC_COMMAND_LIST_MD = "## agentc verbs — the complete list\n\nGenerated from the CLI's own registry — if a verb is listed here it EXISTS on your PATH; run `agentc <verb> --help` for its flags, and never tell anyone a capability is missing without checking this list first.\n\n- agentc access — What this session can reach, by scope (workspace, project, personal):…\n- agentc auth login <key>, logout, status — Manage authentication\n- agentc branch claim <target>, rebase [target], release [target], status — Session drive branches: claim/release write authority, rebase on main\n- agentc bridge login --agent <kind>, status, logout — Connect a local coding agent (Claude Code / OpenCode) to…\n- agentc calendar — Check your owner's calendar\n- agentc cancel <run-id> — Cancel an in-progress run\n- agentc compliance request --scope <kind> --reason <text> --ttl <duration>, approve <session-id>, revoke <session-id>, list, accesses <session-id> — Break-glass compliance sessions\n- agentc connect — Connect this machine: sign in if needed (one browser approval),…\n- agentc consent <id> — Verify a consent id the platform named\n- agentc conv list, read <conversationId>, members <conversationId>, invite <conversationId> <users...>, role — List and read conversations\n- agentc display run <runId>, changes <runId>, document <drive-path>, plan --entries <json>, image <drive-path>, desktop, preview <drive-path>, table, chart --data <json> --kind <kind>, diff <drive-path> --from <rev> --to <rev>, ask --prompt <text> — Render a rich card into the conversation transcript\n- agentc events send <run-id> <name>, list [run-id] — Send or list run events\n- agentc factory list, create <slug>, use <slug>, delete <slug>, show — Manage factories\n- agentc files conflicts, mount [dir], unmount, mounts, merge, flush, put <local-file> <drive-path>, ls [prefix], read <drive-path>, write <drive-path>, pull <drive-path>, get <drive-path> — Read/write documents on a factory's drive\n- agentc import — Move a local Claude Code session into Agent Compose: history,…\n- agentc init — Install agentc skills\n- agentc invoke [template] — Invoke a registered workflow template or a platform default\n- agentc keys create <name>, list — Manage API keys\n- agentc list — List workflow templates you can invoke\n- agentc login — Log in via your browser\n- agentc logout — Clear this machine's browser-login credentials\n- agentc logs <run-id> — Stream logs for a run\n- agentc machine upsize — Resize this session's machine\n- agentc mail search [query...], read <message-id>, sent <message-id> — Check your owner's email\n- agentc members list, notify --user <id-or-email> --text <message> — List teammates and flag them for attention\n- agentc merge — Merge THIS session's own drive branch into the shared drive's…\n- agentc navigate <path> — Take the user's dashboard to a page\n- agentc notify [need...] — Push a need to your owner: `agentc notify \"Want the…\n- agentc pause --reason <text> — Ask the human a question and block until they answer\n- agentc preview open|announce <port>, list, close <port> — Expose a dev-server port on a hosted, member-gated URL\n- agentc project create <name>, list, show <ref>, delete <ref>, members <ref>, invite <ref>, role, remove-member <ref> <user>, leave <ref>, objects <ref>, add <ref> <objectRef>, refresh <ref> <sessionRef>, remove <ref> <objectRef> — Create and manage projects\n- agentc register <workflow> — Register a workflow with the server\n- agentc repos link <repoFullName> --prefix <dir>, create <name>, links, unlink <linkId>, clone <link>, restore, setup, gh-token [link], git-credential [op], mirror <link> — Link factory-drive directories to GitHub repositories\n- agentc review findings, publish --notes <file>, git-credential <action>, changes, file <path> — In-sandbox toolbelt for a spawned diff-review session\n- agentc run dispatch <templateName> --input <json>, get <runId>, watch <runId>, list, artifacts <runId> [path], latest — Dispatch workflows and check run status\n- agentc schedule create <name> --workflow <name> --cron <expr>, list, delete <id> — Manage cron schedules attached to registered workflows\n- agentc search <query> — Search factory files\n- agentc secrets set <workflow> <key> <value>, list <workflow>, delete <workflow> <key>, factory, session — Manage secrets\n- agentc services list, add <name> --command <cmd>, remove <name>, restore [names...] — Durable services manifest\n- agentc session|chat login, logout, add, import, resume <conversationId>, terminal <conversationId>, fork [conversationId], share <conversationId>, unshare <conversationId>, attach <channelId> [conversationId], detach <channelId> [conversationId], share-file <conversationId> <path>, unshare-file <conversationId> <path>, message <target> [text], read, ask [question], post [text] — Interactive terminal chat on a conversation\n- agentc setup — Set this machine up so any agent on it can…\n- agentc share <ref> — Share a drive document or a workflow template\n- agentc skills import, list, show <name>, adopt <name>, rm <name>, share <name>, unshare <name> — Bring your own skills: import local Claude Code skills into…\n- agentc snapshot list, delete <run-id> [snapshot-id], show <run-id> — Manage captured sandbox snapshots\n- agentc takeover — Offer the human this desktop\n- agentc thread progress [note...] — Read this session's thread queue on your owner's board\n- agentc upgrade — Update the agentc CLI to the latest published version\n- agentc usage — Show billable usage\n- agentc wait list, cancel <id> — Declare what this session is waiting for\n- agentc watch — Connect the claude-code session already running in this directory to…\n- agentc web <query...> — Search the web\n- agentc work hold/release — Hold or release this session's background-work busy lease";