jules-orchestrator-kit 0.72.2 → 0.73.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/.agent/prompts/{Overseer.md → Auditor.md} +3 -3
- package/.agent/prompts/{Alchemist.md → Database.md} +1 -1
- package/.agent/prompts/Debugger.md +25 -0
- package/.agent/prompts/{Scribe.md → Docs.md} +8 -5
- package/.agent/prompts/{Spectator.md → E2E.md} +9 -6
- package/.agent/prompts/{Janitor.md → Hygiene.md} +2 -2
- package/.agent/prompts/{Bolt.md → Performance.md} +1 -1
- package/.agent/prompts/Resilience.md +20 -0
- package/.agent/prompts/Security.md +21 -0
- package/.agent/prompts/Testing.md +30 -0
- package/.agent/prompts/Types.md +19 -0
- package/.agent/rules/jules-protocol.md +4 -3
- package/AGENTS.md +78 -96
- package/CHANGELOG.md +193 -0
- package/JULES_RULES_TEMPLATE.md +83 -96
- package/LICENSE +1 -1
- package/README.md +77 -439
- package/ROADMAP_V1.md +22 -132
- package/bin/agentctl.mjs +443 -144
- package/bin/init.js +6 -3
- package/index.mjs +9 -6
- package/package.json +1 -1
- package/scripts/asset-integrity-check.mjs +1 -1
- package/scripts/doc-sync-check.mjs +47 -0
- package/scripts/generate-command-reference.mjs +39 -0
- package/scripts/jules-dispatch.mjs +12 -113
- package/scripts/jules-merge-swarm.mjs +8 -196
- package/scripts/jules-patch.mjs +7 -8
- package/scripts/jules-queue-runner.mjs +6 -8
- package/scripts/jules-scan-todos.mjs +10 -38
- package/scripts/jules-self-audit.mjs +8 -139
- package/scripts/jules-status.mjs +32 -38
- package/scripts/jules-webhook-receiver.mjs +1 -1
- package/src/assertions.mjs +5 -50
- package/src/bidi-guard.mjs +36 -0
- package/src/budget.mjs +3 -14
- package/src/config.mjs +2 -6
- package/src/dashboard.mjs +7 -9
- package/src/dispatch.mjs +212 -0
- package/src/engine.mjs +40 -16
- package/src/evidence.mjs +10 -41
- package/src/execution-envelope.mjs +13 -1
- package/src/flaky-ledger.mjs +1 -1
- package/src/fs-atomic.mjs +72 -0
- package/src/git.mjs +298 -27
- package/src/mcp.mjs +296 -7
- package/src/memory.mjs +0 -0
- package/src/merge-swarm.mjs +202 -0
- package/src/ops/cli-intent.mjs +1 -0
- package/src/ops/command-registry.mjs +796 -70
- package/src/ops/doctor-registry.mjs +134 -47
- package/src/ops/handover.mjs +3 -27
- package/src/ops/pr-harvest.mjs +1 -1
- package/src/prompt-guard.mjs +33 -3
- package/src/provider.mjs +51 -7
- package/src/remediation.mjs +2 -2
- package/src/role-resolver.mjs +113 -3
- package/src/router.mjs +19 -11
- package/src/runtime-env.mjs +67 -0
- package/src/scaffold.mjs +3 -1
- package/src/scope-guard.mjs +249 -0
- package/src/secret-scanner.mjs +530 -0
- package/src/security.mjs +81 -2972
- package/src/self-audit.mjs +140 -0
- package/src/session-ops.mjs +29 -0
- package/src/stability.mjs +8 -1
- package/src/stack-detector.mjs +5 -2
- package/src/state.mjs +45 -0
- package/src/swarm.mjs +76 -0
- package/src/task-optimizer.mjs +34 -7
- package/src/telemetry.mjs +23 -0
- package/src/test-tamper-guard.mjs +2173 -0
- package/src/todo-scanner.mjs +129 -0
- package/src/web-templates.mjs +3 -3
- package/src/webhook.mjs +10 -3
- package/src/wizard-init.mjs +12 -20
- package/src/wizard-oracle.mjs +4 -3
- package/src/wizard-task.mjs +37 -9
- package/.agent/prompts/Sentinel.md +0 -18
- package/scripts/utils.mjs +0 -241
|
@@ -43,17 +43,17 @@ export const COMMAND_REGISTRY = [
|
|
|
43
43
|
"agentctl assert --config assert.json --json",
|
|
44
44
|
],
|
|
45
45
|
flags: [
|
|
46
|
-
{ name: "dir", type: "string", description: "Target directory path for dir-size assertion" },
|
|
47
|
-
{ name: "file", type: "string", description: "Target file path for file-size assertion" },
|
|
48
|
-
{ name: "targets", type: "string", description: "Target glob/path for pattern matching" },
|
|
49
|
-
{ name: "patterns", type: "string", description: "Comma-separated patterns or regex to ban" },
|
|
46
|
+
{ name: "dir", type: "string", description: "Target directory path for dir-size assertion (-d)" },
|
|
47
|
+
{ name: "file", type: "string", description: "Target file path for file-size assertion (-f)" },
|
|
48
|
+
{ name: "targets", type: "string", description: "Target glob/path for pattern matching (-t)" },
|
|
49
|
+
{ name: "patterns", type: "string", description: "Comma-separated patterns or regex to ban (-p)" },
|
|
50
50
|
{ name: "patterns-file", type: "string", description: "Path to JSON file containing banned patterns" },
|
|
51
51
|
{ name: "max-bytes", type: "string", description: "Maximum byte limit" },
|
|
52
52
|
{ name: "max-kb", type: "string", description: "Maximum KiB limit" },
|
|
53
53
|
{ name: "max-mb", type: "string", description: "Maximum MiB limit" },
|
|
54
54
|
{ name: "gzip", type: "boolean", description: "Measure gzip compressed byte size" },
|
|
55
|
-
{ name: "config", type: "string", description: "Path to assertion JSON/YAML config" },
|
|
56
|
-
{ name: "json", type: "boolean", description: "Output structured JSON assertion result" },
|
|
55
|
+
{ name: "config", type: "string", description: "Path to assertion JSON/YAML config (-c)" },
|
|
56
|
+
{ name: "json", type: "boolean", description: "Output structured JSON assertion result (-j)" },
|
|
57
57
|
{ name: "json-report", type: "string", description: "Write structured JSON report to target path" },
|
|
58
58
|
],
|
|
59
59
|
},
|
|
@@ -80,7 +80,7 @@ export const COMMAND_REGISTRY = [
|
|
|
80
80
|
// list when an apply step exists.
|
|
81
81
|
flags: [
|
|
82
82
|
{ name: "probe", type: "boolean", description: "Actively start the provider CLI to check it answers, rather than only finding it on PATH" },
|
|
83
|
-
{ name: "json", type: "boolean", description: "Output structured JSON doctor report" },
|
|
83
|
+
{ name: "json", type: "boolean", description: "Output structured JSON doctor report (-j)" },
|
|
84
84
|
],
|
|
85
85
|
},
|
|
86
86
|
{
|
|
@@ -104,13 +104,16 @@ export const COMMAND_REGISTRY = [
|
|
|
104
104
|
"agentctl queue --dag --concurrency 3",
|
|
105
105
|
"agentctl queue --json",
|
|
106
106
|
],
|
|
107
|
+
// `--interactive` and `--limit` were listed here and implemented nowhere:
|
|
108
|
+
// the handler parses only --dag, --concurrency, --dry-run and --json.
|
|
109
|
+
// Advertising flags the command silently ignores is the same defect as
|
|
110
|
+
// documenting `queue` as a read-only browser. They come back when an
|
|
111
|
+
// implementation exists.
|
|
107
112
|
flags: [
|
|
108
113
|
{ name: "dag", type: "boolean", description: "Resolve depends-on order via Kahn's algorithm before running" },
|
|
109
|
-
{ name: "concurrency", type: "string", description: "Parallel worker slots (defaults to limits.concurrency)" },
|
|
110
|
-
{ name: "dry-run", type: "boolean", description: "Report what would run without dispatching or moving anything" },
|
|
111
|
-
{ name: "
|
|
112
|
-
{ name: "json", type: "boolean", description: "Output structured JSON queue snapshot" },
|
|
113
|
-
{ name: "limit", type: "string", description: "Maximum tasks to include in snapshot" },
|
|
114
|
+
{ name: "concurrency", type: "string", description: "Parallel worker slots (defaults to limits.concurrency) (-c)" },
|
|
115
|
+
{ name: "dry-run", type: "boolean", description: "Report what would run without dispatching or moving anything (-d)" },
|
|
116
|
+
{ name: "json", type: "boolean", description: "Output structured JSON queue snapshot (-j)" },
|
|
114
117
|
],
|
|
115
118
|
},
|
|
116
119
|
{
|
|
@@ -133,11 +136,29 @@ export const COMMAND_REGISTRY = [
|
|
|
133
136
|
"agentctl swarm --concurrency 3 --json",
|
|
134
137
|
],
|
|
135
138
|
flags: [
|
|
136
|
-
{ name: "concurrency", type: "string", description: "Parallel worker slots (defaults to limits.concurrency)" },
|
|
137
|
-
{ name: "dry-run", type: "boolean", description: "Report what would run without dispatching" },
|
|
138
|
-
{ name: "json", type: "boolean", description: "Output structured JSON swarm result" },
|
|
139
|
+
{ name: "concurrency", type: "string", description: "Parallel worker slots (defaults to limits.concurrency) (-c)" },
|
|
140
|
+
{ name: "dry-run", type: "boolean", description: "Report what would run without dispatching (-d)" },
|
|
141
|
+
{ name: "json", type: "boolean", description: "Output structured JSON swarm result (-j)" },
|
|
139
142
|
],
|
|
140
143
|
},
|
|
144
|
+
{
|
|
145
|
+
id: "task",
|
|
146
|
+
path: ["task"],
|
|
147
|
+
title: "task",
|
|
148
|
+
description: "Manage task envelopes: create, template, or optimize prompts (see task create | task template | task optimize)",
|
|
149
|
+
category: "Create",
|
|
150
|
+
mutates: true,
|
|
151
|
+
risk: "moderate",
|
|
152
|
+
interactive: "authoring-auto",
|
|
153
|
+
requiresRepository: true,
|
|
154
|
+
shortcuts: [],
|
|
155
|
+
examples: [
|
|
156
|
+
'agentctl task create --title "Fix webhook" --prompt "Add retry handling"',
|
|
157
|
+
"agentctl task template --list",
|
|
158
|
+
'agentctl task optimize "Refactor auth" --fix',
|
|
159
|
+
],
|
|
160
|
+
flags: [],
|
|
161
|
+
},
|
|
141
162
|
{
|
|
142
163
|
id: "task-create",
|
|
143
164
|
path: ["task", "create"],
|
|
@@ -148,7 +169,7 @@ export const COMMAND_REGISTRY = [
|
|
|
148
169
|
risk: "moderate",
|
|
149
170
|
interactive: "authoring-auto",
|
|
150
171
|
requiresRepository: true,
|
|
151
|
-
shortcuts: ["tc"
|
|
172
|
+
shortcuts: ["tc"],
|
|
152
173
|
examples: [
|
|
153
174
|
'agentctl task create --title "Fix webhook" --prompt "Add retry handling" --verify-cmd "npm test"',
|
|
154
175
|
"agentctl task create --interactive",
|
|
@@ -157,11 +178,13 @@ export const COMMAND_REGISTRY = [
|
|
|
157
178
|
{ name: "title", type: "string", description: "Short title for task (-t)" },
|
|
158
179
|
{ name: "prompt", type: "string", description: "Detailed task instructions (-p)" },
|
|
159
180
|
{ name: "prompt-file", type: "string", description: "Read prompt from file (-f)" },
|
|
160
|
-
{ name: "role", type: "string", description: "Specialist role (
|
|
181
|
+
{ name: "role", type: "string", description: "Specialist role (auditor, performance, security, hygiene, resilience, types, debugger, testing, e2e, database, docs, a11y) (-r)" },
|
|
161
182
|
{ name: "tier", type: "string", description: "Execution tier override (fast | complex)" },
|
|
162
183
|
{ name: "template", type: "string", description: "Task template preset ID" },
|
|
163
184
|
{ name: "depends-on", type: "string", description: "Comma-separated task dependency IDs" },
|
|
185
|
+
{ name: "depends", type: "string", description: "Alias for --depends-on" },
|
|
164
186
|
{ name: "verify-cmd", type: "string", description: "Verification command override (-v)" },
|
|
187
|
+
{ name: "verify", type: "string", description: "Alias for --verify-cmd" },
|
|
165
188
|
{ name: "auto-pr", type: "boolean", description: "Automatically create GitHub PR upon completion" },
|
|
166
189
|
{ name: "require-plan-approval", type: "boolean", description: "Require approval of agent plan before execution" },
|
|
167
190
|
{ name: "repoless", type: "boolean", description: "Execute in repoless sandbox mode" },
|
|
@@ -173,6 +196,29 @@ export const COMMAND_REGISTRY = [
|
|
|
173
196
|
{ name: "json", type: "boolean", description: "Output structured JSON envelope (-j)" },
|
|
174
197
|
],
|
|
175
198
|
},
|
|
199
|
+
{
|
|
200
|
+
id: "task-template",
|
|
201
|
+
path: ["task", "template"],
|
|
202
|
+
title: "task template",
|
|
203
|
+
description: "List and synthesize web task template envelopes",
|
|
204
|
+
category: "Create",
|
|
205
|
+
mutates: false,
|
|
206
|
+
risk: "low",
|
|
207
|
+
interactive: "never",
|
|
208
|
+
requiresRepository: true,
|
|
209
|
+
shortcuts: ["tt"],
|
|
210
|
+
examples: [
|
|
211
|
+
"agentctl task template --list",
|
|
212
|
+
"agentctl task template <id> --json",
|
|
213
|
+
],
|
|
214
|
+
flags: [
|
|
215
|
+
{ name: "list", type: "boolean", description: "List available task templates (-l)" },
|
|
216
|
+
{ name: "verify-cmd", type: "string", description: "Verification command override (-v)" },
|
|
217
|
+
{ name: "verify", type: "string", description: "Alias for --verify-cmd" },
|
|
218
|
+
{ name: "dry-run", type: "boolean", description: "Simulate envelope synthesis (-d)" },
|
|
219
|
+
{ name: "json", type: "boolean", description: "Output structured JSON envelope (-j)" },
|
|
220
|
+
],
|
|
221
|
+
},
|
|
176
222
|
{
|
|
177
223
|
id: "task-optimize",
|
|
178
224
|
path: ["task", "optimize"],
|
|
@@ -190,10 +236,16 @@ export const COMMAND_REGISTRY = [
|
|
|
190
236
|
'agentctl task optimize --file prompt.txt --json',
|
|
191
237
|
],
|
|
192
238
|
flags: [
|
|
193
|
-
{ name: "fix", type: "boolean", description: "Synthesize optimized markdown task envelope" },
|
|
194
|
-
{ name: "
|
|
195
|
-
{ name: "file", type: "string", description: "
|
|
196
|
-
{ name: "
|
|
239
|
+
{ name: "fix", type: "boolean", description: "Synthesize optimized markdown task envelope (-f)" },
|
|
240
|
+
{ name: "prompt", type: "string", description: "Task prompt text to score (-p)" },
|
|
241
|
+
{ name: "prompt-file", type: "string", description: "Read prompt from file" },
|
|
242
|
+
{ name: "file", type: "string", description: "Alias for --prompt-file: path to text file containing task prompt" },
|
|
243
|
+
{ name: "dir", type: "string", description: "Target repository directory root (-d)" },
|
|
244
|
+
{ name: "web", type: "boolean", description: "Enable web-intent detection and optimization (-w)" },
|
|
245
|
+
{ name: "verify-cmd", type: "string", description: "Verification command override (-v)" },
|
|
246
|
+
{ name: "verify", type: "string", description: "Alias for --verify-cmd" },
|
|
247
|
+
{ name: "dry-run", type: "boolean", description: "Simulate scoring without side effects" },
|
|
248
|
+
{ name: "json", type: "boolean", description: "Output structured JSON prompt evaluation (-j)" },
|
|
197
249
|
],
|
|
198
250
|
},
|
|
199
251
|
{
|
|
@@ -214,6 +266,8 @@ export const COMMAND_REGISTRY = [
|
|
|
214
266
|
],
|
|
215
267
|
flags: [
|
|
216
268
|
{ name: "tier", type: "string", description: "Target configuration tier (free, pro, ultra, enterprise) (-t)" },
|
|
269
|
+
{ name: "provider", type: "string", description: "Provider preset to record in the manifest (jules, claude-code, codex, gemini-flash)" },
|
|
270
|
+
{ name: "profile", type: "string", description: "Verification profile to record (minimal, standard, max)" },
|
|
217
271
|
{ name: "interactive", type: "boolean", description: "Launch interactive onboarding wizard (-i)" },
|
|
218
272
|
{ name: "non-interactive", type: "boolean", description: "Run non-interactively with defaults" },
|
|
219
273
|
{ name: "no-interactive", type: "boolean", description: "Alias for --non-interactive" },
|
|
@@ -237,9 +291,10 @@ export const COMMAND_REGISTRY = [
|
|
|
237
291
|
examples: [
|
|
238
292
|
"agentctl dashboard",
|
|
239
293
|
"agentctl dashboard --port 3000",
|
|
294
|
+
"agentctl dashboard 3000",
|
|
240
295
|
],
|
|
241
296
|
flags: [
|
|
242
|
-
{ name: "port", type: "string", description: "HTTP server port (default
|
|
297
|
+
{ name: "port", type: "string", description: "HTTP server port (default 4100)" },
|
|
243
298
|
{ name: "host", type: "string", description: "Bind host address (default 127.0.0.1)" },
|
|
244
299
|
],
|
|
245
300
|
},
|
|
@@ -257,13 +312,17 @@ export const COMMAND_REGISTRY = [
|
|
|
257
312
|
examples: [
|
|
258
313
|
"agentctl budget",
|
|
259
314
|
"agentctl budget --json",
|
|
315
|
+
"agentctl budget --by-user",
|
|
260
316
|
"agentctl budget reset --dry-run",
|
|
261
317
|
"agentctl budget reset --yes",
|
|
318
|
+
"agentctl budget reset --yes --all",
|
|
262
319
|
],
|
|
263
320
|
flags: [
|
|
264
321
|
{ name: "json", type: "boolean", description: "Output structured JSON budget snapshot" },
|
|
322
|
+
{ name: "by-user", type: "boolean", description: "Show per-author attribution table (-u)" },
|
|
265
323
|
{ name: "dry-run", type: "boolean", description: "Report what reset would release, write nothing" },
|
|
266
|
-
{ name: "yes", type: "boolean", description: "Confirm releasing
|
|
324
|
+
{ name: "yes", type: "boolean", description: "Confirm releasing open reservations (-y)" },
|
|
325
|
+
{ name: "all", type: "boolean", description: "Also release reservations that reached the provider (reset only)" },
|
|
267
326
|
],
|
|
268
327
|
},
|
|
269
328
|
{
|
|
@@ -303,15 +362,16 @@ export const COMMAND_REGISTRY = [
|
|
|
303
362
|
"agentctl escalate --clear",
|
|
304
363
|
],
|
|
305
364
|
flags: [
|
|
306
|
-
{ name: "reason", type: "string", description: "Escalation reason category" },
|
|
307
|
-
{ name: "branch", type: "string", description: "Target git branch" },
|
|
308
|
-
{ name: "logs", type: "string", description: "Error logs text" },
|
|
365
|
+
{ name: "reason", type: "string", description: "Escalation reason category (-r)" },
|
|
366
|
+
{ name: "branch", type: "string", description: "Target git branch (-b)" },
|
|
367
|
+
{ name: "logs", type: "string", description: "Error logs text (-l)" },
|
|
368
|
+
{ name: "log-file", type: "string", description: "Read error logs from file" },
|
|
309
369
|
{ name: "critical", type: "boolean", description: "Bypass Silence Governor and alert immediately" },
|
|
310
370
|
{ name: "flush", type: "boolean", description: "Flush buffered escalation digest" },
|
|
311
371
|
{ name: "status", type: "boolean", description: "Inspect digest status and interruption budget" },
|
|
312
372
|
{ name: "clear", type: "boolean", description: "Clear pending digest buffer" },
|
|
313
|
-
{ name: "dry-run", type: "boolean", description: "Simulate dispatch without sending HTTP requests" },
|
|
314
|
-
{ name: "json", type: "boolean", description: "Output JSON structured response" },
|
|
373
|
+
{ name: "dry-run", type: "boolean", description: "Simulate dispatch without sending HTTP requests (-d)" },
|
|
374
|
+
{ name: "json", type: "boolean", description: "Output JSON structured response (-j)" },
|
|
315
375
|
],
|
|
316
376
|
},
|
|
317
377
|
{
|
|
@@ -333,10 +393,10 @@ export const COMMAND_REGISTRY = [
|
|
|
333
393
|
],
|
|
334
394
|
flags: [
|
|
335
395
|
{ name: "dispatch", type: "boolean", description: "Dispatch healing tasks directly to AI agents" },
|
|
336
|
-
{ name: "role", type: "string", description: "Agent persona role (default:
|
|
337
|
-
{ name: "test-cmd", type: "string", description: "Target specific test command" },
|
|
338
|
-
{ name: "dry-run", type: "boolean", description: "Simulate healing swarm generation without writing" },
|
|
339
|
-
{ name: "json", type: "boolean", description: "Output JSON structured response" },
|
|
396
|
+
{ name: "role", type: "string", description: "Agent persona role (default: hygiene) (-r)" },
|
|
397
|
+
{ name: "test-cmd", type: "string", description: "Target specific test command (-t)" },
|
|
398
|
+
{ name: "dry-run", type: "boolean", description: "Simulate healing swarm generation without writing (-d)" },
|
|
399
|
+
{ name: "json", type: "boolean", description: "Output JSON structured response (-j)" },
|
|
340
400
|
],
|
|
341
401
|
},
|
|
342
402
|
{
|
|
@@ -356,12 +416,15 @@ export const COMMAND_REGISTRY = [
|
|
|
356
416
|
'agentctl handover create sess-123 --intent "Refactor auth" --status rolled-back',
|
|
357
417
|
],
|
|
358
418
|
flags: [
|
|
359
|
-
{ name: "intent", type: "string", description: "Task intent or goal description" },
|
|
360
|
-
{ name: "status", type: "string", description: "Handover status (aborted, rolled-back, escalated, failed)" },
|
|
361
|
-
{ name: "
|
|
362
|
-
{ name: "
|
|
363
|
-
{ name: "
|
|
364
|
-
{ name: "
|
|
419
|
+
{ name: "intent", type: "string", description: "Task intent or goal description (-i)" },
|
|
420
|
+
{ name: "status", type: "string", description: "Handover status (aborted, rolled-back, escalated, failed) (-s)" },
|
|
421
|
+
{ name: "completed", type: "string", description: "Completed progress summary (-c)" },
|
|
422
|
+
{ name: "assumptions", type: "string", description: "Validated assumptions (-a)" },
|
|
423
|
+
{ name: "landmines", type: "string", description: "Obstacles or error summary (-l)" },
|
|
424
|
+
{ name: "next-steps", type: "string", description: "Actionable next steps for successor agent (-n)" },
|
|
425
|
+
{ name: "limit", type: "string", description: "Maximum handovers to list or keep on prune" },
|
|
426
|
+
{ name: "context", type: "boolean", description: "Print show output as injectable prompt context (show only)" },
|
|
427
|
+
{ name: "json", type: "boolean", description: "Output JSON structured response (-j)" },
|
|
365
428
|
],
|
|
366
429
|
},
|
|
367
430
|
{
|
|
@@ -374,19 +437,49 @@ export const COMMAND_REGISTRY = [
|
|
|
374
437
|
risk: "low",
|
|
375
438
|
interactive: "never",
|
|
376
439
|
requiresRepository: true,
|
|
377
|
-
shortcuts: [
|
|
440
|
+
shortcuts: [],
|
|
378
441
|
examples: [
|
|
379
442
|
"agentctl mutate",
|
|
380
443
|
"agentctl mutate --min-score 80",
|
|
381
|
-
'agentctl mutate --max-mutants 20 --
|
|
444
|
+
'agentctl mutate --max-mutants 20 --cmd "npm test"',
|
|
382
445
|
],
|
|
383
446
|
flags: [
|
|
447
|
+
{ name: "base", type: "string", description: "Base comparison branch (default: main or config base_branch) (-b)" },
|
|
448
|
+
{ name: "mode", type: "string", description: "Evaluation mode (working-tree | committed | staged) (-m)" },
|
|
449
|
+
{ name: "working-tree", type: "boolean", description: "Evaluate the working tree (default mode)" },
|
|
450
|
+
{ name: "staged", type: "boolean", description: "Evaluate staged changes" },
|
|
451
|
+
{ name: "committed", type: "boolean", description: "Evaluate committed changes" },
|
|
384
452
|
{ name: "min-score", type: "string", description: "Target minimum mutation score threshold (0-100)" },
|
|
385
453
|
{ name: "max-mutants", type: "string", description: "Maximum number of mutants to generate and test" },
|
|
386
|
-
{ name: "
|
|
387
|
-
{ name: "
|
|
388
|
-
|
|
389
|
-
|
|
454
|
+
{ name: "cmd", type: "string", description: "Test command override" },
|
|
455
|
+
{ name: "json", type: "boolean", description: "Output structured JSON mutation report (-j)" },
|
|
456
|
+
],
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
id: "mutation",
|
|
460
|
+
path: ["mutation"],
|
|
461
|
+
title: "mutation",
|
|
462
|
+
description: "Alias of mutate: run zero-dependency diff mutation testing harness",
|
|
463
|
+
category: "Inspect",
|
|
464
|
+
mutates: false,
|
|
465
|
+
risk: "low",
|
|
466
|
+
interactive: "never",
|
|
467
|
+
requiresRepository: true,
|
|
468
|
+
shortcuts: [],
|
|
469
|
+
examples: [
|
|
470
|
+
"agentctl mutation",
|
|
471
|
+
"agentctl mutation --min-score 80",
|
|
472
|
+
'agentctl mutation --max-mutants 20 --cmd "npm test"',
|
|
473
|
+
],
|
|
474
|
+
flags: [
|
|
475
|
+
{ name: "base", type: "string", description: "Base comparison branch (default: main or config base_branch) (-b)" },
|
|
476
|
+
{ name: "mode", type: "string", description: "Evaluation mode (working-tree | committed | staged) (-m)" },
|
|
477
|
+
{ name: "working-tree", type: "boolean", description: "Evaluate the working tree (default mode)" },
|
|
478
|
+
{ name: "staged", type: "boolean", description: "Evaluate staged changes" },
|
|
479
|
+
{ name: "committed", type: "boolean", description: "Evaluate committed changes" },
|
|
480
|
+
{ name: "min-score", type: "string", description: "Target minimum mutation score threshold (0-100)" },
|
|
481
|
+
{ name: "max-mutants", type: "string", description: "Maximum number of mutants to generate and test" },
|
|
482
|
+
{ name: "cmd", type: "string", description: "Test command override" },
|
|
390
483
|
{ name: "json", type: "boolean", description: "Output structured JSON mutation report (-j)" },
|
|
391
484
|
],
|
|
392
485
|
},
|
|
@@ -407,11 +500,11 @@ export const COMMAND_REGISTRY = [
|
|
|
407
500
|
'agentctl coverage --cmd "node --test"',
|
|
408
501
|
],
|
|
409
502
|
flags: [
|
|
410
|
-
{ name: "min", type: "string", description: "Minimum diff line coverage percentage required" },
|
|
411
|
-
{ name: "
|
|
412
|
-
{ name: "
|
|
413
|
-
{ name: "
|
|
414
|
-
{ name: "
|
|
503
|
+
{ name: "min", type: "string", description: "Minimum diff line coverage percentage required (-m)" },
|
|
504
|
+
{ name: "min-coverage", type: "string", description: "Alias for --min" },
|
|
505
|
+
{ name: "cmd", type: "string", description: "Test command override to run with V8 coverage (-c)" },
|
|
506
|
+
{ name: "base", type: "string", description: "Base comparison branch (default: main or config base_branch) (-b)" },
|
|
507
|
+
{ name: "mode", type: "string", description: "Evaluation mode (working-tree | committed | staged)" },
|
|
415
508
|
{ name: "json", type: "boolean", description: "Output structured JSON coverage report (-j)" },
|
|
416
509
|
],
|
|
417
510
|
},
|
|
@@ -425,7 +518,7 @@ export const COMMAND_REGISTRY = [
|
|
|
425
518
|
risk: "low",
|
|
426
519
|
interactive: "never",
|
|
427
520
|
requiresRepository: true,
|
|
428
|
-
shortcuts: [
|
|
521
|
+
shortcuts: [],
|
|
429
522
|
examples: [
|
|
430
523
|
"agentctl gate",
|
|
431
524
|
"agentctl gate --mode working-tree",
|
|
@@ -433,13 +526,89 @@ export const COMMAND_REGISTRY = [
|
|
|
433
526
|
"agentctl gate --json",
|
|
434
527
|
],
|
|
435
528
|
flags: [
|
|
529
|
+
{ name: "base", type: "string", description: "Base comparison branch (default: main or config base_branch) (-b)" },
|
|
436
530
|
{ name: "mode", type: "string", description: "Evaluation mode (working-tree | committed | staged) (-m)" },
|
|
437
|
-
{ name: "
|
|
531
|
+
{ name: "working-tree", type: "boolean", description: "Evaluate the working tree (default mode)" },
|
|
532
|
+
{ name: "staged", type: "boolean", description: "Evaluate staged changes" },
|
|
533
|
+
{ name: "committed", type: "boolean", description: "Evaluate committed changes" },
|
|
534
|
+
{ name: "fix", type: "boolean", description: "Trigger automated OODA self-repair loop on failure" },
|
|
438
535
|
{ name: "allow-protected", type: "boolean", description: "Bypass protected path checks for authorized maintainers" },
|
|
536
|
+
{ name: "allow-unreadable-tests", type: "boolean", description: "Permit unreadable test dialects for this run" },
|
|
537
|
+
{ name: "allow-test-modifications", type: "boolean", description: "Waive every test-tampering check for this run" },
|
|
538
|
+
{ name: "allow-test-change", type: "string", description: "Waive one tampering check kind (repeatable)" },
|
|
539
|
+
{ name: "strict-locks", type: "boolean", description: "Enforce strict anti-tampering verification on test files" },
|
|
540
|
+
{ name: "dry-run", type: "boolean", description: "Simulate gate evaluation without persisting evidence (-d)" },
|
|
541
|
+
{ name: "json", type: "boolean", description: "Output structured JSON gate report (-j)" },
|
|
542
|
+
{ name: "json-report", type: "string", description: "Write structured JSON report to target path" },
|
|
543
|
+
],
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
id: "check",
|
|
547
|
+
path: ["check"],
|
|
548
|
+
title: "check",
|
|
549
|
+
description: "Alias of gate: run all-in-one CI security, rules, and stack verification gate",
|
|
550
|
+
category: "Inspect",
|
|
551
|
+
mutates: false,
|
|
552
|
+
risk: "low",
|
|
553
|
+
interactive: "never",
|
|
554
|
+
requiresRepository: true,
|
|
555
|
+
shortcuts: [],
|
|
556
|
+
examples: [
|
|
557
|
+
"agentctl check",
|
|
558
|
+
"agentctl check --base main --strict-locks",
|
|
559
|
+
"agentctl gate --strict-locks # canonical spelling; check is an alias",
|
|
560
|
+
"agentctl check --fix",
|
|
561
|
+
"agentctl check --json",
|
|
562
|
+
],
|
|
563
|
+
flags: [
|
|
564
|
+
{ name: "base", type: "string", description: "Base comparison branch (default: main or config base_branch) (-b)" },
|
|
565
|
+
{ name: "mode", type: "string", description: "Evaluation mode (working-tree | committed | staged) (-m)" },
|
|
566
|
+
{ name: "working-tree", type: "boolean", description: "Evaluate the working tree (default mode)" },
|
|
567
|
+
{ name: "staged", type: "boolean", description: "Evaluate staged changes" },
|
|
568
|
+
{ name: "committed", type: "boolean", description: "Evaluate committed changes" },
|
|
569
|
+
{ name: "fix", type: "boolean", description: "Trigger automated OODA self-repair loop on failure" },
|
|
570
|
+
{ name: "allow-protected", type: "boolean", description: "Bypass protected path checks for authorized maintainers" },
|
|
571
|
+
{ name: "allow-unreadable-tests", type: "boolean", description: "Permit unreadable test dialects for this run" },
|
|
572
|
+
{ name: "allow-test-modifications", type: "boolean", description: "Waive every test-tampering check for this run" },
|
|
573
|
+
{ name: "allow-test-change", type: "string", description: "Waive one tampering check kind (repeatable)" },
|
|
574
|
+
{ name: "strict-locks", type: "boolean", description: "Enforce strict anti-tampering verification on test files" },
|
|
575
|
+
{ name: "dry-run", type: "boolean", description: "Simulate gate evaluation without persisting evidence (-d)" },
|
|
576
|
+
{ name: "json", type: "boolean", description: "Output structured JSON gate report (-j)" },
|
|
577
|
+
{ name: "json-report", type: "string", description: "Write structured JSON report to target path" },
|
|
578
|
+
],
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
id: "audit",
|
|
582
|
+
path: ["audit"],
|
|
583
|
+
title: "audit",
|
|
584
|
+
description: "Alias of gate: run CI security and verification gate against current branch",
|
|
585
|
+
category: "Inspect",
|
|
586
|
+
mutates: false,
|
|
587
|
+
risk: "low",
|
|
588
|
+
interactive: "never",
|
|
589
|
+
requiresRepository: true,
|
|
590
|
+
shortcuts: [],
|
|
591
|
+
examples: [
|
|
592
|
+
"agentctl audit",
|
|
593
|
+
"agentctl audit --mode working-tree",
|
|
594
|
+
"agentctl audit --fix",
|
|
595
|
+
"agentctl audit --json",
|
|
596
|
+
],
|
|
597
|
+
flags: [
|
|
598
|
+
{ name: "base", type: "string", description: "Base comparison branch (default: main or config base_branch) (-b)" },
|
|
599
|
+
{ name: "mode", type: "string", description: "Evaluation mode (working-tree | committed | staged) (-m)" },
|
|
600
|
+
{ name: "working-tree", type: "boolean", description: "Evaluate the working tree (default mode)" },
|
|
601
|
+
{ name: "staged", type: "boolean", description: "Evaluate staged changes" },
|
|
602
|
+
{ name: "committed", type: "boolean", description: "Evaluate committed changes" },
|
|
439
603
|
{ name: "fix", type: "boolean", description: "Trigger automated OODA self-repair loop on failure" },
|
|
604
|
+
{ name: "allow-protected", type: "boolean", description: "Bypass protected path checks for authorized maintainers" },
|
|
605
|
+
{ name: "allow-unreadable-tests", type: "boolean", description: "Permit unreadable test dialects for this run" },
|
|
606
|
+
{ name: "allow-test-modifications", type: "boolean", description: "Waive every test-tampering check for this run" },
|
|
607
|
+
{ name: "allow-test-change", type: "string", description: "Waive one tampering check kind (repeatable)" },
|
|
440
608
|
{ name: "strict-locks", type: "boolean", description: "Enforce strict anti-tampering verification on test files" },
|
|
441
609
|
{ name: "dry-run", type: "boolean", description: "Simulate gate evaluation without persisting evidence (-d)" },
|
|
442
610
|
{ name: "json", type: "boolean", description: "Output structured JSON gate report (-j)" },
|
|
611
|
+
{ name: "json-report", type: "string", description: "Write structured JSON report to target path" },
|
|
443
612
|
],
|
|
444
613
|
},
|
|
445
614
|
{
|
|
@@ -452,18 +621,51 @@ export const COMMAND_REGISTRY = [
|
|
|
452
621
|
risk: "low",
|
|
453
622
|
interactive: "never",
|
|
454
623
|
requiresRepository: true,
|
|
455
|
-
shortcuts: [
|
|
624
|
+
shortcuts: [],
|
|
456
625
|
examples: [
|
|
457
626
|
"agentctl probe",
|
|
458
627
|
"agentctl probe --repeat 10",
|
|
459
628
|
'agentctl probe --repeat 5 --cmd "pytest"',
|
|
460
629
|
],
|
|
461
630
|
flags: [
|
|
462
|
-
{ name: "repeat", type: "string", description: "Number of probe executions (default: 5)" },
|
|
463
|
-
{ name: "
|
|
464
|
-
{ name: "
|
|
465
|
-
{ name: "
|
|
466
|
-
{ name: "
|
|
631
|
+
{ name: "repeat", type: "string", description: "Number of probe executions (default: 5) (-r)" },
|
|
632
|
+
{ name: "iterations", type: "string", description: "Alias for --repeat (-n)" },
|
|
633
|
+
{ name: "min", type: "string", description: "Minimum pass rate 0-1 (alias for --min-pass-rate) (-m)" },
|
|
634
|
+
{ name: "min-pass-rate", type: "string", description: "Minimum pass rate 0-1 (default: 1.0)" },
|
|
635
|
+
{ name: "cmd", type: "string", description: "Test command to probe (-c)" },
|
|
636
|
+
{ name: "test-cmd", type: "string", description: "Alias for --cmd (-t)" },
|
|
637
|
+
{ name: "verify-cmd", type: "string", description: "Alias for --cmd" },
|
|
638
|
+
{ name: "record", type: "boolean", description: "Persist results to flaky quarantine ledger (default: true)" },
|
|
639
|
+
{ name: "no-record", type: "boolean", description: "Skip recording to flaky quarantine ledger" },
|
|
640
|
+
{ name: "json", type: "boolean", description: "Output structured JSON probe telemetry (-j)" },
|
|
641
|
+
],
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
id: "stability",
|
|
645
|
+
path: ["stability"],
|
|
646
|
+
title: "stability",
|
|
647
|
+
description: "Alias of probe: run test flakiness stability probe across N repetitions",
|
|
648
|
+
category: "Inspect",
|
|
649
|
+
mutates: false,
|
|
650
|
+
risk: "low",
|
|
651
|
+
interactive: "never",
|
|
652
|
+
requiresRepository: true,
|
|
653
|
+
shortcuts: [],
|
|
654
|
+
examples: [
|
|
655
|
+
"agentctl stability",
|
|
656
|
+
"agentctl stability --repeat 10",
|
|
657
|
+
'agentctl stability --repeat 5 --cmd "pytest"',
|
|
658
|
+
],
|
|
659
|
+
flags: [
|
|
660
|
+
{ name: "repeat", type: "string", description: "Number of probe executions (default: 5) (-r)" },
|
|
661
|
+
{ name: "iterations", type: "string", description: "Alias for --repeat (-n)" },
|
|
662
|
+
{ name: "min", type: "string", description: "Minimum pass rate 0-1 (alias for --min-pass-rate) (-m)" },
|
|
663
|
+
{ name: "min-pass-rate", type: "string", description: "Minimum pass rate 0-1 (default: 1.0)" },
|
|
664
|
+
{ name: "cmd", type: "string", description: "Test command to probe (-c)" },
|
|
665
|
+
{ name: "test-cmd", type: "string", description: "Alias for --cmd (-t)" },
|
|
666
|
+
{ name: "verify-cmd", type: "string", description: "Alias for --cmd" },
|
|
667
|
+
{ name: "record", type: "boolean", description: "Persist results to flaky quarantine ledger (default: true)" },
|
|
668
|
+
{ name: "no-record", type: "boolean", description: "Skip recording to flaky quarantine ledger" },
|
|
467
669
|
{ name: "json", type: "boolean", description: "Output structured JSON probe telemetry (-j)" },
|
|
468
670
|
],
|
|
469
671
|
},
|
|
@@ -477,17 +679,39 @@ export const COMMAND_REGISTRY = [
|
|
|
477
679
|
risk: "low",
|
|
478
680
|
interactive: "never",
|
|
479
681
|
requiresRepository: true,
|
|
480
|
-
shortcuts: [
|
|
682
|
+
shortcuts: [],
|
|
481
683
|
examples: [
|
|
482
684
|
"agentctl perf",
|
|
483
685
|
'agentctl perf --max-ms 50 --cmd "npm test"',
|
|
484
686
|
],
|
|
485
687
|
flags: [
|
|
486
|
-
{ name: "max-ms", type: "string", description: "Maximum allowable event loop delay threshold in ms" },
|
|
487
|
-
{ name: "
|
|
488
|
-
{ name: "
|
|
489
|
-
{ name: "
|
|
490
|
-
{ name: "
|
|
688
|
+
{ name: "max-ms", type: "string", description: "Maximum allowable event loop delay threshold in ms (-m)" },
|
|
689
|
+
{ name: "threshold", type: "string", description: "Alias for --max-ms (-t)" },
|
|
690
|
+
{ name: "cmd", type: "string", description: "Command to execute during performance monitoring (-c)" },
|
|
691
|
+
{ name: "resolution", type: "string", description: "Sampling resolution in ms (default: 10) (-r)" },
|
|
692
|
+
{ name: "json", type: "boolean", description: "Output structured JSON performance report (-j)" },
|
|
693
|
+
],
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
id: "event-loop",
|
|
697
|
+
path: ["event-loop"],
|
|
698
|
+
title: "event-loop",
|
|
699
|
+
description: "Alias of perf: monitor Node.js event loop delay and Big-O performance lag",
|
|
700
|
+
category: "Inspect",
|
|
701
|
+
mutates: false,
|
|
702
|
+
risk: "low",
|
|
703
|
+
interactive: "never",
|
|
704
|
+
requiresRepository: true,
|
|
705
|
+
shortcuts: [],
|
|
706
|
+
examples: [
|
|
707
|
+
"agentctl event-loop",
|
|
708
|
+
'agentctl event-loop --max-ms 50 --cmd "npm test"',
|
|
709
|
+
],
|
|
710
|
+
flags: [
|
|
711
|
+
{ name: "max-ms", type: "string", description: "Maximum allowable event loop delay threshold in ms (-m)" },
|
|
712
|
+
{ name: "threshold", type: "string", description: "Alias for --max-ms (-t)" },
|
|
713
|
+
{ name: "cmd", type: "string", description: "Command to execute during performance monitoring (-c)" },
|
|
714
|
+
{ name: "resolution", type: "string", description: "Sampling resolution in ms (default: 10) (-r)" },
|
|
491
715
|
{ name: "json", type: "boolean", description: "Output structured JSON performance report (-j)" },
|
|
492
716
|
],
|
|
493
717
|
},
|
|
@@ -501,23 +725,30 @@ export const COMMAND_REGISTRY = [
|
|
|
501
725
|
risk: "moderate",
|
|
502
726
|
interactive: "never",
|
|
503
727
|
requiresRepository: true,
|
|
504
|
-
shortcuts: [
|
|
728
|
+
shortcuts: [],
|
|
505
729
|
examples: [
|
|
506
730
|
'agentctl dispatch --prompt "Add retry handling to src/webhook.js"',
|
|
507
|
-
'agentctl dispatch -p "Fix type errors" --role
|
|
731
|
+
'agentctl dispatch -p "Fix type errors" --role types --tier fast',
|
|
508
732
|
'agentctl dispatch --prompt-file task.md --dry-run',
|
|
509
733
|
],
|
|
510
734
|
flags: [
|
|
735
|
+
{ name: "title", type: "string", description: "Task title (-t)" },
|
|
511
736
|
{ name: "prompt", type: "string", description: "Task prompt instructions (-p)" },
|
|
512
737
|
{ name: "prompt-file", type: "string", description: "Read prompt from file (-f)" },
|
|
513
|
-
{ name: "role", type: "string", description: "Specialist role (
|
|
738
|
+
{ name: "role", type: "string", description: "Specialist role (auditor, performance, security, hygiene, resilience, types, debugger, testing, e2e, database, docs, a11y) (-r)" },
|
|
514
739
|
{ name: "tier", type: "string", description: "Execution tier override (fast | complex)" },
|
|
515
740
|
{ name: "check-premise", type: "boolean", description: "Verify premise locally before dispatching" },
|
|
741
|
+
{ name: "idempotent", type: "boolean", description: "Alias for --check-premise" },
|
|
742
|
+
{ name: "author", type: "string", description: "Attribution author for the dispatch" },
|
|
743
|
+
{ name: "verify-cmd", type: "string", description: "Verification command override (-v)" },
|
|
744
|
+
{ name: "verify", type: "string", description: "Alias for --verify-cmd" },
|
|
516
745
|
{ name: "source", type: "string", description: "Jules repository source identifier (-s)" },
|
|
517
746
|
{ name: "branch", type: "string", description: "Starting branch for task execution (-b)" },
|
|
518
747
|
{ name: "repoless", type: "boolean", description: "Dispatch task in repoless execution mode" },
|
|
519
748
|
{ name: "auto-pr", type: "boolean", description: "Automatically create PR upon completion" },
|
|
520
749
|
{ name: "require-plan-approval", type: "boolean", description: "Require human approval for proposed plan" },
|
|
750
|
+
{ name: "auto-approve-plans", type: "boolean", description: "Run unattended without pausing for plan approval" },
|
|
751
|
+
{ name: "auto-approve", type: "boolean", description: "Alias for --auto-approve-plans" },
|
|
521
752
|
{ name: "dry-run", type: "boolean", description: "Simulate dispatch without sending to provider (-d)" },
|
|
522
753
|
{ name: "json", type: "boolean", description: "Output JSON structured dispatch result (-j)" },
|
|
523
754
|
],
|
|
@@ -553,7 +784,7 @@ export const COMMAND_REGISTRY = [
|
|
|
553
784
|
risk: "moderate",
|
|
554
785
|
interactive: "never",
|
|
555
786
|
requiresRepository: true,
|
|
556
|
-
shortcuts: ["
|
|
787
|
+
shortcuts: ["pr"],
|
|
557
788
|
examples: [
|
|
558
789
|
"agentctl pr harvest",
|
|
559
790
|
"agentctl pr harvest --auto",
|
|
@@ -570,6 +801,31 @@ export const COMMAND_REGISTRY = [
|
|
|
570
801
|
{ name: "json", type: "boolean", description: "Output structured JSON harvest report (-j)" },
|
|
571
802
|
],
|
|
572
803
|
},
|
|
804
|
+
{
|
|
805
|
+
id: "harvest",
|
|
806
|
+
path: ["harvest"],
|
|
807
|
+
title: "harvest",
|
|
808
|
+
description: "Harvest failure traces and record resolution observations into system memory",
|
|
809
|
+
category: "Operate",
|
|
810
|
+
mutates: true,
|
|
811
|
+
risk: "low",
|
|
812
|
+
interactive: "never",
|
|
813
|
+
requiresRepository: true,
|
|
814
|
+
shortcuts: [],
|
|
815
|
+
examples: [
|
|
816
|
+
"agentctl harvest --exit-code 4 --task TASK-1 --agent jules",
|
|
817
|
+
"agentctl harvest --exit-code 1 --log ./fail.log --json",
|
|
818
|
+
],
|
|
819
|
+
flags: [
|
|
820
|
+
{ name: "exit-code", type: "string", description: "Failing command exit code (default: 4)" },
|
|
821
|
+
{ name: "log", type: "string", description: "Path to failure log file" },
|
|
822
|
+
{ name: "diff", type: "string", description: "Diff text or path describing the attempted change" },
|
|
823
|
+
{ name: "task", type: "string", description: "Task identifier for the failure" },
|
|
824
|
+
{ name: "agent", type: "string", description: "Agent name that produced the failure (default: jules)" },
|
|
825
|
+
{ name: "dry-run", type: "boolean", description: "Simulate harvesting without writing (-d)" },
|
|
826
|
+
{ name: "json", type: "boolean", description: "Output structured JSON harvest result (-j)" },
|
|
827
|
+
],
|
|
828
|
+
},
|
|
573
829
|
{
|
|
574
830
|
id: "session-get",
|
|
575
831
|
path: ["session", "get"],
|
|
@@ -591,6 +847,30 @@ export const COMMAND_REGISTRY = [
|
|
|
591
847
|
{ name: "json", type: "boolean", description: "Output structured JSON session data (-j)" },
|
|
592
848
|
],
|
|
593
849
|
},
|
|
850
|
+
{
|
|
851
|
+
id: "session-list",
|
|
852
|
+
path: ["session", "list"],
|
|
853
|
+
title: "session list",
|
|
854
|
+
description: "List recent and active Jules sessions from remote API or local ledger",
|
|
855
|
+
category: "Inspect",
|
|
856
|
+
mutates: false,
|
|
857
|
+
risk: "low",
|
|
858
|
+
interactive: "never",
|
|
859
|
+
requiresRepository: true,
|
|
860
|
+
shortcuts: ["sessions"],
|
|
861
|
+
examples: [
|
|
862
|
+
"agentctl session list",
|
|
863
|
+
"agentctl session list --limit 10",
|
|
864
|
+
"agentctl session list --json",
|
|
865
|
+
],
|
|
866
|
+
flags: [
|
|
867
|
+
{ name: "limit", type: "string", description: "Maximum number of sessions to list (default: 20) (-l)" },
|
|
868
|
+
{ name: "page-size", type: "string", description: "Alias for --limit" },
|
|
869
|
+
{ name: "remote", type: "boolean", description: "Query remote Jules API" },
|
|
870
|
+
{ name: "dry-run", type: "boolean", description: "Simulate listing without remote requests (-d)" },
|
|
871
|
+
{ name: "json", type: "boolean", description: "Output structured JSON session list (-j)" },
|
|
872
|
+
],
|
|
873
|
+
},
|
|
594
874
|
{
|
|
595
875
|
id: "plan-approve",
|
|
596
876
|
path: ["plan", "approve"],
|
|
@@ -626,9 +906,12 @@ export const COMMAND_REGISTRY = [
|
|
|
626
906
|
examples: [
|
|
627
907
|
"agentctl lock status",
|
|
628
908
|
"agentctl lock acquire agent-1 task-1 src/main.js",
|
|
909
|
+
"agentctl lock acquire agent-1 task-1 src/main.js --ttl 60",
|
|
629
910
|
"agentctl lock release task-1",
|
|
630
911
|
],
|
|
631
912
|
flags: [
|
|
913
|
+
{ name: "ttl", type: "string", description: "Lease duration in minutes for acquire (default: 120)" },
|
|
914
|
+
{ name: "pid", type: "string", description: "Bind the lock to a process id instead of a time lease" },
|
|
632
915
|
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
633
916
|
],
|
|
634
917
|
},
|
|
@@ -636,7 +919,7 @@ export const COMMAND_REGISTRY = [
|
|
|
636
919
|
id: "evidence",
|
|
637
920
|
path: ["evidence"],
|
|
638
921
|
title: "evidence",
|
|
639
|
-
description: "
|
|
922
|
+
description: "Manage cryptographic audit evidence (generate | verify | show)",
|
|
640
923
|
category: "Inspect",
|
|
641
924
|
mutates: false,
|
|
642
925
|
risk: "low",
|
|
@@ -644,11 +927,394 @@ export const COMMAND_REGISTRY = [
|
|
|
644
927
|
requiresRepository: true,
|
|
645
928
|
shortcuts: [],
|
|
646
929
|
examples: [
|
|
647
|
-
"agentctl evidence
|
|
930
|
+
"agentctl evidence generate",
|
|
648
931
|
"agentctl evidence verify",
|
|
649
|
-
"agentctl evidence
|
|
932
|
+
"agentctl evidence show --json",
|
|
650
933
|
],
|
|
651
934
|
flags: [
|
|
935
|
+
{ name: "output", type: "string", description: "Output path for generate (-o)" },
|
|
936
|
+
{ name: "manifest", type: "string", description: "Manifest path for verify or show (-m)" },
|
|
937
|
+
{ name: "markdown", type: "string", description: "Markdown output path for generate" },
|
|
938
|
+
{ name: "dry-run", type: "boolean", description: "Simulate without writing (-d)" },
|
|
939
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
940
|
+
],
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
id: "fix",
|
|
944
|
+
path: ["fix"],
|
|
945
|
+
title: "fix",
|
|
946
|
+
description: "Auto-repair from piped terminal logs or error trace (npm test 2>&1 | agentctl fix)",
|
|
947
|
+
category: "Repair",
|
|
948
|
+
mutates: true,
|
|
949
|
+
risk: "moderate",
|
|
950
|
+
interactive: "never",
|
|
951
|
+
requiresRepository: true,
|
|
952
|
+
shortcuts: [],
|
|
953
|
+
examples: [
|
|
954
|
+
"npm test 2>&1 | agentctl fix",
|
|
955
|
+
"agentctl fix --file ./fail.log",
|
|
956
|
+
'agentctl fix --input "Error: boom" --task --json',
|
|
957
|
+
],
|
|
958
|
+
flags: [
|
|
959
|
+
{ name: "input", type: "string", description: "Inline error log text (-i)" },
|
|
960
|
+
{ name: "file", type: "string", description: "Path to file containing error logs (-f)" },
|
|
961
|
+
{ name: "cmd", type: "string", description: "Verification command for the repair task (-c)" },
|
|
962
|
+
{ name: "task", type: "boolean", description: "Synthesize a repair task envelope instead of dispatching (-t)" },
|
|
963
|
+
{ name: "author", type: "string", description: "Attribution author for the repair" },
|
|
964
|
+
{ name: "dry-run", type: "boolean", description: "Simulate repair without dispatching" },
|
|
965
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
966
|
+
],
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
id: "patch",
|
|
970
|
+
path: ["patch"],
|
|
971
|
+
title: "patch",
|
|
972
|
+
description: "Extract and test/apply git patch from a Jules session",
|
|
973
|
+
category: "Operate",
|
|
974
|
+
mutates: true,
|
|
975
|
+
risk: "moderate",
|
|
976
|
+
interactive: "never",
|
|
977
|
+
requiresRepository: true,
|
|
978
|
+
shortcuts: [],
|
|
979
|
+
examples: [
|
|
980
|
+
"agentctl patch <sessionId>",
|
|
981
|
+
"agentctl patch <sessionId> --apply",
|
|
982
|
+
"agentctl patch <sessionId> --save ./fix.patch --json",
|
|
983
|
+
],
|
|
984
|
+
flags: [
|
|
985
|
+
{ name: "session", type: "string", description: "Session ID (positional also accepted) (-s)" },
|
|
986
|
+
{ name: "apply", type: "boolean", description: "Apply the patch to the working tree (-a)" },
|
|
987
|
+
{ name: "save", type: "string", description: "Save patch content to file path" },
|
|
988
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
989
|
+
],
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
id: "retry",
|
|
993
|
+
path: ["retry"],
|
|
994
|
+
title: "retry",
|
|
995
|
+
description: "Retry failed session with automated failure-trace injection",
|
|
996
|
+
category: "Operate",
|
|
997
|
+
mutates: true,
|
|
998
|
+
risk: "moderate",
|
|
999
|
+
interactive: "never",
|
|
1000
|
+
requiresRepository: true,
|
|
1001
|
+
shortcuts: [],
|
|
1002
|
+
examples: [
|
|
1003
|
+
"agentctl retry <sessionId>",
|
|
1004
|
+
"agentctl retry <sessionId> --role debugger",
|
|
1005
|
+
"agentctl retry <sessionId> --dry-run --json",
|
|
1006
|
+
],
|
|
1007
|
+
flags: [
|
|
1008
|
+
{ name: "session", type: "string", description: "Session ID (positional also accepted) (-s)" },
|
|
1009
|
+
{ name: "role", type: "string", description: "Specialist role for the retry (-r)" },
|
|
1010
|
+
{ name: "title", type: "string", description: "Title for the retry session (-t)" },
|
|
1011
|
+
{ name: "without-failure", type: "boolean", description: "Retry without injecting previous failure diagnostics" },
|
|
1012
|
+
{ name: "dry-run", type: "boolean", description: "Simulate retry without dispatching (-d)" },
|
|
1013
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
1014
|
+
],
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
id: "prune",
|
|
1018
|
+
path: ["prune"],
|
|
1019
|
+
title: "prune",
|
|
1020
|
+
description: "Batch-archive or delete stale sessions via Jules API",
|
|
1021
|
+
category: "Operate",
|
|
1022
|
+
mutates: true,
|
|
1023
|
+
risk: "moderate",
|
|
1024
|
+
interactive: "never",
|
|
1025
|
+
requiresRepository: true,
|
|
1026
|
+
shortcuts: [],
|
|
1027
|
+
examples: [
|
|
1028
|
+
"agentctl prune --json",
|
|
1029
|
+
"agentctl prune --age 7d --dry-run",
|
|
1030
|
+
"agentctl prune --age 30d --state COMPLETED --yes",
|
|
1031
|
+
],
|
|
1032
|
+
flags: [
|
|
1033
|
+
{ name: "age", type: "string", description: "Only match sessions older than this (e.g. 7d) (-a)" },
|
|
1034
|
+
{ name: "state", type: "string", description: "Only match sessions in this state (-s)" },
|
|
1035
|
+
{ name: "delete", type: "boolean", description: "Delete matched sessions instead of archiving" },
|
|
1036
|
+
{ name: "dry-run", type: "boolean", description: "Report matches without archiving (-d)" },
|
|
1037
|
+
{ name: "yes", type: "boolean", description: "Confirm archiving matched sessions (-y)" },
|
|
1038
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
1039
|
+
],
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
id: "clean",
|
|
1043
|
+
path: ["clean"],
|
|
1044
|
+
title: "clean",
|
|
1045
|
+
description: "Clean stale branches, worktrees, locks, and ledgers",
|
|
1046
|
+
category: "Operate",
|
|
1047
|
+
mutates: true,
|
|
1048
|
+
risk: "low",
|
|
1049
|
+
interactive: "never",
|
|
1050
|
+
requiresRepository: true,
|
|
1051
|
+
shortcuts: [],
|
|
1052
|
+
examples: [
|
|
1053
|
+
"agentctl clean",
|
|
1054
|
+
],
|
|
1055
|
+
flags: [],
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
id: "provider",
|
|
1059
|
+
path: ["provider"],
|
|
1060
|
+
title: "provider",
|
|
1061
|
+
description: "Show provider readiness or switch the active provider (provider set <name>)",
|
|
1062
|
+
category: "Configure",
|
|
1063
|
+
mutates: true,
|
|
1064
|
+
risk: "low",
|
|
1065
|
+
interactive: "never",
|
|
1066
|
+
requiresRepository: true,
|
|
1067
|
+
shortcuts: [],
|
|
1068
|
+
examples: [
|
|
1069
|
+
"agentctl provider",
|
|
1070
|
+
"agentctl provider set codex",
|
|
1071
|
+
"agentctl provider --json",
|
|
1072
|
+
],
|
|
1073
|
+
flags: [
|
|
1074
|
+
{ name: "json", type: "boolean", description: "Output structured JSON provider list (-j)" },
|
|
1075
|
+
],
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
id: "providers",
|
|
1079
|
+
path: ["providers"],
|
|
1080
|
+
title: "providers",
|
|
1081
|
+
description: "List agent providers and whether this machine can reach them",
|
|
1082
|
+
category: "Inspect",
|
|
1083
|
+
mutates: false,
|
|
1084
|
+
risk: "low",
|
|
1085
|
+
interactive: "never",
|
|
1086
|
+
requiresRepository: true,
|
|
1087
|
+
shortcuts: [],
|
|
1088
|
+
examples: [
|
|
1089
|
+
"agentctl providers",
|
|
1090
|
+
"agentctl providers --json",
|
|
1091
|
+
"agentctl provider set codex",
|
|
1092
|
+
],
|
|
1093
|
+
flags: [
|
|
1094
|
+
{ name: "json", type: "boolean", description: "Output structured JSON provider list (-j)" },
|
|
1095
|
+
],
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
id: "profile",
|
|
1099
|
+
path: ["profile"],
|
|
1100
|
+
title: "profile",
|
|
1101
|
+
description: "Show or set the verification profile",
|
|
1102
|
+
category: "Configure",
|
|
1103
|
+
mutates: true,
|
|
1104
|
+
risk: "low",
|
|
1105
|
+
interactive: "never",
|
|
1106
|
+
requiresRepository: true,
|
|
1107
|
+
shortcuts: [],
|
|
1108
|
+
examples: [
|
|
1109
|
+
"agentctl profile",
|
|
1110
|
+
"agentctl profile --list",
|
|
1111
|
+
"agentctl profile --set max",
|
|
1112
|
+
],
|
|
1113
|
+
flags: [
|
|
1114
|
+
{ name: "list", type: "boolean", description: "List available verification profiles (-l)" },
|
|
1115
|
+
{ name: "set", type: "string", description: "Set the active verification profile" },
|
|
1116
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
1117
|
+
],
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
id: "ci",
|
|
1121
|
+
path: ["ci", "init"],
|
|
1122
|
+
title: "ci init",
|
|
1123
|
+
description: "Generate a stack-aware CI gate workflow",
|
|
1124
|
+
category: "Configure",
|
|
1125
|
+
mutates: true,
|
|
1126
|
+
risk: "moderate",
|
|
1127
|
+
interactive: "never",
|
|
1128
|
+
requiresRepository: true,
|
|
1129
|
+
shortcuts: ["ci-init"],
|
|
1130
|
+
examples: [
|
|
1131
|
+
"agentctl ci init",
|
|
1132
|
+
"agentctl ci init --target gitlab --force",
|
|
1133
|
+
"agentctl ci init --dry-run --json",
|
|
1134
|
+
],
|
|
1135
|
+
flags: [
|
|
1136
|
+
{ name: "target", type: "string", description: "CI target (github | gitlab, default: github)" },
|
|
1137
|
+
{ name: "force", type: "boolean", description: "Overwrite existing workflow file (-f)" },
|
|
1138
|
+
{ name: "dry-run", type: "boolean", description: "Report what would be written (-d)" },
|
|
1139
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
1140
|
+
],
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
id: "review-repair",
|
|
1144
|
+
path: ["review-repair"],
|
|
1145
|
+
title: "review-repair",
|
|
1146
|
+
description: "Parse PR review comments and synthesize OODA repair tasks",
|
|
1147
|
+
category: "Repair",
|
|
1148
|
+
mutates: false,
|
|
1149
|
+
risk: "low",
|
|
1150
|
+
interactive: "never",
|
|
1151
|
+
requiresRepository: true,
|
|
1152
|
+
shortcuts: [],
|
|
1153
|
+
examples: [
|
|
1154
|
+
"agentctl review-repair ./reviews.json",
|
|
1155
|
+
],
|
|
1156
|
+
flags: [],
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
id: "scan",
|
|
1160
|
+
path: ["scan"],
|
|
1161
|
+
title: "scan",
|
|
1162
|
+
description: "Scan codebase for TODO/FIXME task candidates",
|
|
1163
|
+
category: "Inspect",
|
|
1164
|
+
mutates: false,
|
|
1165
|
+
risk: "low",
|
|
1166
|
+
interactive: "never",
|
|
1167
|
+
requiresRepository: true,
|
|
1168
|
+
shortcuts: [],
|
|
1169
|
+
examples: [
|
|
1170
|
+
"agentctl scan",
|
|
1171
|
+
],
|
|
1172
|
+
flags: [],
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
id: "rollback",
|
|
1176
|
+
path: ["rollback"],
|
|
1177
|
+
title: "rollback",
|
|
1178
|
+
description: "Restore git state and working tree to atomic pre-flight checkpoint",
|
|
1179
|
+
category: "Repair",
|
|
1180
|
+
mutates: true,
|
|
1181
|
+
risk: "high",
|
|
1182
|
+
interactive: "never",
|
|
1183
|
+
requiresRepository: true,
|
|
1184
|
+
shortcuts: [],
|
|
1185
|
+
examples: [
|
|
1186
|
+
"agentctl rollback --latest",
|
|
1187
|
+
"agentctl rollback <sessionId> --json",
|
|
1188
|
+
'agentctl rollback --latest --reason "bad deploy"',
|
|
1189
|
+
],
|
|
1190
|
+
flags: [
|
|
1191
|
+
{ name: "reason", type: "string", description: "Rollback reason recorded in the handover (-r)" },
|
|
1192
|
+
{ name: "intent", type: "string", description: "Intent recorded in the handover (-i)" },
|
|
1193
|
+
{ name: "handover", type: "boolean", description: "Write a Baton Pass handover envelope (default: true)" },
|
|
1194
|
+
{ name: "latest", type: "boolean", description: "Restore the newest checkpoint explicitly" },
|
|
1195
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
1196
|
+
],
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
id: "resume",
|
|
1200
|
+
path: ["resume"],
|
|
1201
|
+
title: "resume",
|
|
1202
|
+
description: "Resume warm session with human response",
|
|
1203
|
+
category: "Operate",
|
|
1204
|
+
mutates: true,
|
|
1205
|
+
risk: "moderate",
|
|
1206
|
+
interactive: "never",
|
|
1207
|
+
requiresRepository: true,
|
|
1208
|
+
shortcuts: [],
|
|
1209
|
+
examples: [
|
|
1210
|
+
'agentctl resume <sessionId> --response "approved, continue"',
|
|
1211
|
+
"agentctl resume <sessionId> --dry-run --json",
|
|
1212
|
+
],
|
|
1213
|
+
flags: [
|
|
1214
|
+
{ name: "response", type: "string", description: "Human response text for the warm session (-r)" },
|
|
1215
|
+
{ name: "dry-run", type: "boolean", description: "Simulate resume without provider call (-d)" },
|
|
1216
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
1217
|
+
],
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
id: "test-gen",
|
|
1221
|
+
path: ["test-gen"],
|
|
1222
|
+
title: "test-gen",
|
|
1223
|
+
description: "Scaffold and run automated TDD Red-to-Green test cycle",
|
|
1224
|
+
category: "Create",
|
|
1225
|
+
mutates: true,
|
|
1226
|
+
risk: "moderate",
|
|
1227
|
+
interactive: "never",
|
|
1228
|
+
requiresRepository: true,
|
|
1229
|
+
shortcuts: [],
|
|
1230
|
+
examples: [
|
|
1231
|
+
"agentctl test-gen --title my-feature --spec \"Handles EOF\"",
|
|
1232
|
+
"agentctl test-gen --title my-feature --run",
|
|
1233
|
+
"agentctl test-gen --title my-feature --json",
|
|
1234
|
+
],
|
|
1235
|
+
flags: [
|
|
1236
|
+
{ name: "title", type: "string", description: "Feature title for the generated test (-t)" },
|
|
1237
|
+
{ name: "spec", type: "string", description: "Requirement specification text (-s)" },
|
|
1238
|
+
{ name: "run", type: "boolean", description: "Run the TDD Red check after scaffolding (-r)" },
|
|
1239
|
+
{ name: "dry-run", type: "boolean", description: "Simulate scaffolding without writing (-d)" },
|
|
1240
|
+
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
1241
|
+
],
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
id: "mcp",
|
|
1245
|
+
path: ["mcp"],
|
|
1246
|
+
title: "mcp",
|
|
1247
|
+
description: "Start stdio MCP server or scaffold IDE integration config (mcp init)",
|
|
1248
|
+
category: "Configure",
|
|
1249
|
+
mutates: true,
|
|
1250
|
+
risk: "low",
|
|
1251
|
+
interactive: "never",
|
|
1252
|
+
requiresRepository: true,
|
|
1253
|
+
shortcuts: [],
|
|
1254
|
+
examples: [
|
|
1255
|
+
"agentctl mcp",
|
|
1256
|
+
"agentctl mcp init cursor",
|
|
1257
|
+
"agentctl mcp init --target vscode --dry-run",
|
|
1258
|
+
],
|
|
1259
|
+
flags: [
|
|
1260
|
+
{ name: "target", type: "string", description: "IDE target for init (cursor | vscode | claude | all) (-t)" },
|
|
1261
|
+
{ name: "dry-run", type: "boolean", description: "Report what would be written for init (-d)" },
|
|
1262
|
+
{ name: "json", type: "boolean", description: "Output structured JSON init result (-j)" },
|
|
1263
|
+
],
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
id: "hydrate",
|
|
1267
|
+
path: ["hydrate"],
|
|
1268
|
+
title: "hydrate",
|
|
1269
|
+
description: "Prepend active system learnings and baton-pass state to a prompt",
|
|
1270
|
+
category: "Inspect",
|
|
1271
|
+
mutates: false,
|
|
1272
|
+
risk: "low",
|
|
1273
|
+
interactive: "never",
|
|
1274
|
+
requiresRepository: true,
|
|
1275
|
+
shortcuts: [],
|
|
1276
|
+
examples: [
|
|
1277
|
+
'agentctl hydrate "Fix the flaky login test"',
|
|
1278
|
+
"agentctl hydrate",
|
|
1279
|
+
],
|
|
1280
|
+
flags: [],
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
id: "learning",
|
|
1284
|
+
path: ["learning"],
|
|
1285
|
+
title: "learning",
|
|
1286
|
+
description: "Record a system learning rule into .agent/knowledge/",
|
|
1287
|
+
category: "Operate",
|
|
1288
|
+
mutates: true,
|
|
1289
|
+
risk: "low",
|
|
1290
|
+
interactive: "never",
|
|
1291
|
+
requiresRepository: true,
|
|
1292
|
+
shortcuts: [],
|
|
1293
|
+
examples: [
|
|
1294
|
+
'agentctl learning add "flaky port bind" "retry with port 0"',
|
|
1295
|
+
],
|
|
1296
|
+
flags: [],
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
id: "rules",
|
|
1300
|
+
path: ["rules"],
|
|
1301
|
+
title: "rules",
|
|
1302
|
+
description: "Audit rule token budgets or compile rule sentinels (check | compile)",
|
|
1303
|
+
category: "Inspect",
|
|
1304
|
+
mutates: true,
|
|
1305
|
+
risk: "low",
|
|
1306
|
+
interactive: "never",
|
|
1307
|
+
requiresRepository: true,
|
|
1308
|
+
shortcuts: [],
|
|
1309
|
+
examples: [
|
|
1310
|
+
"agentctl rules check",
|
|
1311
|
+
"agentctl rules check --json",
|
|
1312
|
+
"agentctl rules compile --out .agent/rules.compiled.md",
|
|
1313
|
+
],
|
|
1314
|
+
flags: [
|
|
1315
|
+
{ name: "max-chars", type: "string", description: "Override max characters per file for check" },
|
|
1316
|
+
{ name: "max-lines", type: "string", description: "Override max lines per file for check" },
|
|
1317
|
+
{ name: "out", type: "string", description: "Write compiled rules to file for compile (-o)" },
|
|
652
1318
|
{ name: "json", type: "boolean", description: "Output structured JSON result (-j)" },
|
|
653
1319
|
],
|
|
654
1320
|
},
|
|
@@ -725,3 +1391,63 @@ export function formatRegistryJson() {
|
|
|
725
1391
|
commands: COMMAND_REGISTRY,
|
|
726
1392
|
};
|
|
727
1393
|
}
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Format the full command registry as a Markdown reference document.
|
|
1397
|
+
* Single source of truth for docs/COMMAND_REFERENCE.md: the doc-sync gate
|
|
1398
|
+
* regenerates this string and diffs it against the file on disk.
|
|
1399
|
+
* @returns {string}
|
|
1400
|
+
*/
|
|
1401
|
+
export function formatRegistryMarkdown() {
|
|
1402
|
+
const lines = [];
|
|
1403
|
+
lines.push("# agentctl Command Reference");
|
|
1404
|
+
lines.push("");
|
|
1405
|
+
lines.push(
|
|
1406
|
+
"> Auto-generated from `src/ops/command-registry.mjs`. Do not edit by hand —",
|
|
1407
|
+
"run `node scripts/generate-command-reference.mjs` to regenerate."
|
|
1408
|
+
);
|
|
1409
|
+
lines.push("");
|
|
1410
|
+
lines.push(`Total commands: ${COMMAND_REGISTRY.length}`);
|
|
1411
|
+
lines.push("");
|
|
1412
|
+
lines.push("## Index");
|
|
1413
|
+
lines.push("");
|
|
1414
|
+
for (const cmd of COMMAND_REGISTRY) {
|
|
1415
|
+
const anchor = cmd.id.toLowerCase().replace(/[^a-z0-9]+/g, "-");
|
|
1416
|
+
lines.push(`- [\`agentctl ${cmd.path.join(" ")}\`](#${anchor}) — ${cmd.description}`);
|
|
1417
|
+
}
|
|
1418
|
+
lines.push("");
|
|
1419
|
+
for (const cmd of COMMAND_REGISTRY) {
|
|
1420
|
+
lines.push(`## \`agentctl ${cmd.path.join(" ")}\``);
|
|
1421
|
+
lines.push("");
|
|
1422
|
+
lines.push(`**ID:** \`${cmd.id}\` · **Category:** ${cmd.category} · **Risk:** ${cmd.risk.toUpperCase()} · **Mutates:** ${cmd.mutates ? "yes" : "no"}`);
|
|
1423
|
+
lines.push("");
|
|
1424
|
+
lines.push(cmd.description);
|
|
1425
|
+
lines.push("");
|
|
1426
|
+
if (cmd.shortcuts && cmd.shortcuts.length > 0) {
|
|
1427
|
+
lines.push(`**Shortcuts:** ${cmd.shortcuts.map((s) => `\`${s}\``).join(", ")}`);
|
|
1428
|
+
lines.push("");
|
|
1429
|
+
}
|
|
1430
|
+
if (cmd.flags && cmd.flags.length > 0) {
|
|
1431
|
+
lines.push("**Flags:**");
|
|
1432
|
+
lines.push("");
|
|
1433
|
+
lines.push("| Flag | Type | Description |");
|
|
1434
|
+
lines.push("| :--- | :--- | :--- |");
|
|
1435
|
+
for (const flag of cmd.flags) {
|
|
1436
|
+
lines.push(`| \`--${flag.name}\` | ${flag.type} | ${flag.description} |`);
|
|
1437
|
+
}
|
|
1438
|
+
lines.push("");
|
|
1439
|
+
} else {
|
|
1440
|
+
lines.push("**Flags:** none.");
|
|
1441
|
+
lines.push("");
|
|
1442
|
+
}
|
|
1443
|
+
if (cmd.examples && cmd.examples.length > 0) {
|
|
1444
|
+
lines.push("**Examples:**");
|
|
1445
|
+
lines.push("");
|
|
1446
|
+
lines.push("```sh");
|
|
1447
|
+
for (const ex of cmd.examples) lines.push(ex);
|
|
1448
|
+
lines.push("```");
|
|
1449
|
+
lines.push("");
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
return lines.join("\n");
|
|
1453
|
+
}
|