opencode-swarm 7.77.3 → 7.77.5
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/.opencode/skills/swarm-pr-feedback/SKILL.md +8 -0
- package/dist/cli/index.js +770 -695
- package/dist/commands/registry.d.ts +109 -0
- package/dist/commands/tool-policy.d.ts +2 -2
- package/dist/index.js +1084 -916
- package/package.json +1 -1
|
@@ -45,6 +45,21 @@ export type CommandEntry = {
|
|
|
45
45
|
deprecated?: boolean;
|
|
46
46
|
/** If set, this command shares a name with a Claude Code built-in slash command */
|
|
47
47
|
clashesWithNativeCcCommand?: string;
|
|
48
|
+
/**
|
|
49
|
+
* How the swarm_command chat tool treats this command.
|
|
50
|
+
* - 'agent' — agent-callable: in the tool allowlist AND the z.enum schema (agent runs it).
|
|
51
|
+
* - 'human-only' — in the z.enum AND HUMAN_ONLY set: agent may attempt via the tool and receives an "ask the user" refusal.
|
|
52
|
+
* - 'restricted' — in HUMAN_ONLY set only, NOT in the z.enum: Zod rejects the input before classifySwarmCommandToolUse runs (most safety-sensitive human-only commands).
|
|
53
|
+
* - 'none' (or absent) — not in any tool surface; must be run via CLI or chat.
|
|
54
|
+
* This field is the single source of truth from which SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, and the SWARM_COMMAND_TOOL_COMMANDS z.enum are derived (see src/commands/tool-policy.ts).
|
|
55
|
+
*/
|
|
56
|
+
toolPolicy?: 'agent' | 'human-only' | 'restricted' | 'none';
|
|
57
|
+
/**
|
|
58
|
+
* When true, the swarm_command tool rejects any arguments passed to this command
|
|
59
|
+
* (replaces membership in the hand-maintained NO_ARGS set in tool-policy.ts).
|
|
60
|
+
* Only meaningful for toolPolicy: 'agent' or 'human-only' commands.
|
|
61
|
+
*/
|
|
62
|
+
toolNoArgs?: boolean;
|
|
48
63
|
};
|
|
49
64
|
export declare const COMMAND_REGISTRY: {
|
|
50
65
|
readonly 'acknowledge-spec-drift': {
|
|
@@ -52,18 +67,22 @@ export declare const COMMAND_REGISTRY: {
|
|
|
52
67
|
readonly description: "Acknowledge that the spec has drifted from the plan and suppress further warnings";
|
|
53
68
|
readonly args: "";
|
|
54
69
|
readonly category: "diagnostics";
|
|
70
|
+
readonly toolPolicy: "restricted";
|
|
55
71
|
};
|
|
56
72
|
readonly status: {
|
|
57
73
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
58
74
|
readonly description: "Show current swarm state";
|
|
59
75
|
readonly category: "core";
|
|
60
76
|
readonly clashesWithNativeCcCommand: "/status";
|
|
77
|
+
readonly toolPolicy: "agent";
|
|
78
|
+
readonly toolNoArgs: true;
|
|
61
79
|
};
|
|
62
80
|
readonly 'show-plan': {
|
|
63
81
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
64
82
|
readonly description: "Show current plan (optionally filter by phase number)";
|
|
65
83
|
readonly category: "core";
|
|
66
84
|
readonly args: "[phase-number]";
|
|
85
|
+
readonly toolPolicy: "agent";
|
|
67
86
|
};
|
|
68
87
|
readonly plan: {
|
|
69
88
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -78,6 +97,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
78
97
|
readonly description: "List registered agents";
|
|
79
98
|
readonly category: "core";
|
|
80
99
|
readonly clashesWithNativeCcCommand: "/agents";
|
|
100
|
+
readonly toolPolicy: "agent";
|
|
101
|
+
readonly toolNoArgs: true;
|
|
81
102
|
};
|
|
82
103
|
readonly help: {
|
|
83
104
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -85,24 +106,31 @@ export declare const COMMAND_REGISTRY: {
|
|
|
85
106
|
readonly category: "core";
|
|
86
107
|
readonly args: "[command]";
|
|
87
108
|
readonly details: "Without argument, shows full command listing. With argument, shows detailed help for a specific command.";
|
|
109
|
+
readonly toolPolicy: "agent";
|
|
88
110
|
};
|
|
89
111
|
readonly history: {
|
|
90
112
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
91
113
|
readonly description: "Show completed phases summary";
|
|
92
114
|
readonly category: "utility";
|
|
93
115
|
readonly clashesWithNativeCcCommand: "/history";
|
|
116
|
+
readonly toolPolicy: "agent";
|
|
117
|
+
readonly toolNoArgs: true;
|
|
94
118
|
};
|
|
95
119
|
readonly config: {
|
|
96
120
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
97
121
|
readonly description: "Show current resolved configuration";
|
|
98
122
|
readonly category: "config";
|
|
99
123
|
readonly clashesWithNativeCcCommand: "/config";
|
|
124
|
+
readonly toolPolicy: "agent";
|
|
125
|
+
readonly toolNoArgs: true;
|
|
100
126
|
};
|
|
101
127
|
readonly 'config doctor': {
|
|
102
128
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
103
129
|
readonly description: "Run config doctor checks";
|
|
104
130
|
readonly subcommandOf: "config";
|
|
105
131
|
readonly category: "diagnostics";
|
|
132
|
+
readonly toolPolicy: "agent";
|
|
133
|
+
readonly toolNoArgs: true;
|
|
106
134
|
};
|
|
107
135
|
readonly 'config-doctor': {
|
|
108
136
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -116,6 +144,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
116
144
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
117
145
|
readonly description: "Run tool registration coherence check";
|
|
118
146
|
readonly category: "diagnostics";
|
|
147
|
+
readonly toolPolicy: "agent";
|
|
148
|
+
readonly toolNoArgs: true;
|
|
119
149
|
};
|
|
120
150
|
readonly 'doctor-tools': {
|
|
121
151
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -128,6 +158,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
128
158
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
129
159
|
readonly description: "Run health check on swarm state";
|
|
130
160
|
readonly category: "diagnostics";
|
|
161
|
+
readonly toolPolicy: "agent";
|
|
162
|
+
readonly toolNoArgs: true;
|
|
131
163
|
};
|
|
132
164
|
readonly diagnosis: {
|
|
133
165
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -140,18 +172,23 @@ export declare const COMMAND_REGISTRY: {
|
|
|
140
172
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
141
173
|
readonly description: "Run preflight automation checks";
|
|
142
174
|
readonly category: "diagnostics";
|
|
175
|
+
readonly toolPolicy: "agent";
|
|
176
|
+
readonly toolNoArgs: true;
|
|
143
177
|
};
|
|
144
178
|
readonly 'sync-plan': {
|
|
145
179
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
146
180
|
readonly description: "Ensure plan.json and plan.md are synced";
|
|
147
181
|
readonly args: "";
|
|
148
182
|
readonly category: "config";
|
|
183
|
+
readonly toolPolicy: "agent";
|
|
184
|
+
readonly toolNoArgs: true;
|
|
149
185
|
};
|
|
150
186
|
readonly benchmark: {
|
|
151
187
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
152
188
|
readonly description: "Show performance metrics [--cumulative] [--ci-gate]";
|
|
153
189
|
readonly args: "--cumulative, --ci-gate";
|
|
154
190
|
readonly category: "diagnostics";
|
|
191
|
+
readonly toolPolicy: "agent";
|
|
155
192
|
};
|
|
156
193
|
readonly learning: {
|
|
157
194
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -159,6 +196,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
159
196
|
readonly args: "--json, --phase <N>";
|
|
160
197
|
readonly details: "Computes aggregate learning metrics from knowledge events: violation-rate trends, directive application rates, escalation frequency, per-entry ROI, and never-applied entries. Surfaces a learning summary for the curator digest.";
|
|
161
198
|
readonly category: "diagnostics";
|
|
199
|
+
readonly toolPolicy: "agent";
|
|
162
200
|
};
|
|
163
201
|
readonly export: {
|
|
164
202
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -167,6 +205,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
167
205
|
readonly details: "Exports the current plan and context as JSON to stdout. Useful for piping to external tools or debugging swarm state.";
|
|
168
206
|
readonly category: "utility";
|
|
169
207
|
readonly clashesWithNativeCcCommand: "/export";
|
|
208
|
+
readonly toolPolicy: "agent";
|
|
209
|
+
readonly toolNoArgs: true;
|
|
170
210
|
};
|
|
171
211
|
readonly evidence: {
|
|
172
212
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -174,6 +214,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
174
214
|
readonly args: "<taskId>";
|
|
175
215
|
readonly details: "Displays review results, test verdicts, and other evidence bundles for the given task ID (e.g., \"2.1\").";
|
|
176
216
|
readonly category: "utility";
|
|
217
|
+
readonly toolPolicy: "agent";
|
|
177
218
|
};
|
|
178
219
|
readonly 'evidence summary': {
|
|
179
220
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -182,6 +223,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
182
223
|
readonly args: "";
|
|
183
224
|
readonly details: "Generates a summary showing completion ratio across all tasks, lists blockers, and identifies missing evidence.";
|
|
184
225
|
readonly category: "utility";
|
|
226
|
+
readonly toolPolicy: "agent";
|
|
227
|
+
readonly toolNoArgs: true;
|
|
185
228
|
};
|
|
186
229
|
readonly 'evidence-summary': {
|
|
187
230
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -242,12 +285,14 @@ export declare const COMMAND_REGISTRY: {
|
|
|
242
285
|
readonly details: "Archives evidence bundles older than max_age_days (config, default 90) or beyond max_bundles cap (config, default 1000). --dry-run previews which bundles would be archived without deleting them. Applies two-tier retention: age-based first, then count-based on oldest remaining.";
|
|
243
286
|
readonly args: "--dry-run";
|
|
244
287
|
readonly category: "utility";
|
|
288
|
+
readonly toolPolicy: "none";
|
|
245
289
|
};
|
|
246
290
|
readonly curate: {
|
|
247
291
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
248
292
|
readonly description: "Run knowledge curation and hive promotion review";
|
|
249
293
|
readonly args: "";
|
|
250
294
|
readonly category: "utility";
|
|
295
|
+
readonly toolPolicy: "none";
|
|
251
296
|
};
|
|
252
297
|
readonly consolidate: {
|
|
253
298
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -255,12 +300,14 @@ export declare const COMMAND_REGISTRY: {
|
|
|
255
300
|
readonly details: "Runs the same consolidation pass used by scheduled skill_improver trigger points: queue hardening, skill-improver proposal writing, and optional draft-skill generation. It never auto-activates skills. Use --respect-interval to obey the configured cadence instead of forcing a run.";
|
|
256
301
|
readonly args: "--force, --respect-interval, --evaluate";
|
|
257
302
|
readonly category: "utility";
|
|
303
|
+
readonly toolPolicy: "restricted";
|
|
258
304
|
};
|
|
259
305
|
readonly 'dark-matter': {
|
|
260
306
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
261
307
|
readonly description: "Detect hidden file couplings via co-change NPMI analysis";
|
|
262
308
|
readonly args: "--threshold <number>, --min-commits <number>";
|
|
263
309
|
readonly category: "diagnostics";
|
|
310
|
+
readonly toolPolicy: "none";
|
|
264
311
|
};
|
|
265
312
|
readonly finalize: {
|
|
266
313
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -268,6 +315,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
268
315
|
readonly details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs safe git ff-only to main. Resets agent sessions and delegation chains. Reads .swarm/close-lessons.md for explicit lessons and runs curation. Use --skill-review to run the quota-bounded skill_improver in proposal mode.";
|
|
269
316
|
readonly args: "--prune-branches, --skill-review";
|
|
270
317
|
readonly category: "core";
|
|
318
|
+
readonly toolPolicy: "none";
|
|
271
319
|
};
|
|
272
320
|
readonly close: {
|
|
273
321
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -284,6 +332,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
284
332
|
readonly details: "Reads .swarm/ evidence (knowledge entries, events, curator digests, proposals, retrospectives, drift reports) and produces a post-mortem report at .swarm/post-mortem-{planId}.md. Idempotent: re-runs skip if report exists unless --force is passed.";
|
|
285
333
|
readonly args: "--force";
|
|
286
334
|
readonly category: "core";
|
|
335
|
+
readonly toolPolicy: "agent";
|
|
287
336
|
};
|
|
288
337
|
readonly concurrency: {
|
|
289
338
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -291,12 +340,14 @@ export declare const COMMAND_REGISTRY: {
|
|
|
291
340
|
readonly args: "set <N|preset>, status, reset";
|
|
292
341
|
readonly details: string;
|
|
293
342
|
readonly category: "utility";
|
|
343
|
+
readonly toolPolicy: "none";
|
|
294
344
|
};
|
|
295
345
|
readonly simulate: {
|
|
296
346
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
297
347
|
readonly description: "Dry-run hidden coupling analysis with configurable thresholds";
|
|
298
348
|
readonly args: "--threshold <number>, --min-commits <number>";
|
|
299
349
|
readonly category: "diagnostics";
|
|
350
|
+
readonly toolPolicy: "none";
|
|
300
351
|
};
|
|
301
352
|
readonly sdd: {
|
|
302
353
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -304,6 +355,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
304
355
|
readonly args: "status|validate|project [--json] [--change <id>] [--dry-run]";
|
|
305
356
|
readonly details: "Parent command for spec-driven development artifacts. Use sdd status to inspect .swarm/spec.md plus openspec/ artifacts, sdd validate to validate OpenSpec-compatible deltas, and sdd project to materialize the effective spec into .swarm/spec.md for planning.";
|
|
306
357
|
readonly category: "utility";
|
|
358
|
+
readonly toolPolicy: "agent";
|
|
307
359
|
};
|
|
308
360
|
readonly 'sdd status': {
|
|
309
361
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -311,6 +363,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
311
363
|
readonly subcommandOf: "sdd";
|
|
312
364
|
readonly args: "[--json]";
|
|
313
365
|
readonly category: "utility";
|
|
366
|
+
readonly toolPolicy: "agent";
|
|
314
367
|
};
|
|
315
368
|
readonly 'sdd validate': {
|
|
316
369
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -318,6 +371,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
318
371
|
readonly subcommandOf: "sdd";
|
|
319
372
|
readonly args: "[--json] [--change <id>]";
|
|
320
373
|
readonly category: "utility";
|
|
374
|
+
readonly toolPolicy: "agent";
|
|
321
375
|
};
|
|
322
376
|
readonly 'sdd project': {
|
|
323
377
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -325,24 +379,28 @@ export declare const COMMAND_REGISTRY: {
|
|
|
325
379
|
readonly subcommandOf: "sdd";
|
|
326
380
|
readonly args: "[--dry-run] [--json] [--change <id>]";
|
|
327
381
|
readonly category: "utility";
|
|
382
|
+
readonly toolPolicy: "human-only";
|
|
328
383
|
};
|
|
329
384
|
readonly analyze: {
|
|
330
385
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
331
386
|
readonly description: "Analyze spec.md vs plan.md for requirement coverage gaps";
|
|
332
387
|
readonly args: "";
|
|
333
388
|
readonly category: "agent";
|
|
389
|
+
readonly toolPolicy: "none";
|
|
334
390
|
};
|
|
335
391
|
readonly clarify: {
|
|
336
392
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
337
393
|
readonly description: "Clarify and refine an existing feature specification";
|
|
338
394
|
readonly args: "[description-text]";
|
|
339
395
|
readonly category: "agent";
|
|
396
|
+
readonly toolPolicy: "none";
|
|
340
397
|
};
|
|
341
398
|
readonly specify: {
|
|
342
399
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
343
400
|
readonly description: "Generate or import a feature specification [description]";
|
|
344
401
|
readonly args: "[description-text]";
|
|
345
402
|
readonly category: "agent";
|
|
403
|
+
readonly toolPolicy: "none";
|
|
346
404
|
};
|
|
347
405
|
readonly brainstorm: {
|
|
348
406
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -350,6 +408,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
350
408
|
readonly args: "[topic-text]";
|
|
351
409
|
readonly details: "Triggers the architect to run the brainstorm workflow: CONTEXT SCAN, single-question DIALOGUE, APPROACHES, DESIGN SECTIONS, SPEC WRITE + SELF-REVIEW, QA GATE SELECTION, TRANSITION. Use for new plans where requirements need to be drawn out before writing spec.md / plan.md.";
|
|
352
410
|
readonly category: "agent";
|
|
411
|
+
readonly toolPolicy: "none";
|
|
353
412
|
};
|
|
354
413
|
readonly council: {
|
|
355
414
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -357,6 +416,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
357
416
|
readonly args: "<question> [--preset <name>] [--spec-review]";
|
|
358
417
|
readonly details: string;
|
|
359
418
|
readonly category: "agent";
|
|
419
|
+
readonly toolPolicy: "none";
|
|
360
420
|
};
|
|
361
421
|
readonly 'pr-review': {
|
|
362
422
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -364,6 +424,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
364
424
|
readonly args: "<pr-url|owner/repo#N|N> [--council]";
|
|
365
425
|
readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, runs 6 parallel explorer lanes through the deterministic dispatch_lanes join barrier (correctness, security, dependencies, docs-intent-vs-actual, tests, performance-architecture), validates findings through independent reviewer confirmation, applies critic challenge to HIGH/CRITICAL findings, synthesizes structured report. --council variant fires adversarial multi-model review. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolves against origin remote).";
|
|
366
426
|
readonly category: "agent";
|
|
427
|
+
readonly toolPolicy: "none";
|
|
367
428
|
};
|
|
368
429
|
readonly 'pr-feedback': {
|
|
369
430
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -371,6 +432,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
371
432
|
readonly args: "[url|owner/repo#N|N] [instructions...]";
|
|
372
433
|
readonly details: "Triggers MODE: PR_FEEDBACK — ingests existing pull-request feedback (review threads, requested changes, CI/check failures, merge conflicts, stale branch state, pasted notes), verifies every claim against source, clusters related problems, fixes confirmed items, validates the branch, and reports closure status for every ledger item. Distinct from /swarm pr-review, which discovers new findings. The PR reference is optional: with none, the architect builds the ledger from the current PR/branch; text after the reference is forwarded as extra instructions. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolved against origin).";
|
|
373
434
|
readonly category: "agent";
|
|
435
|
+
readonly toolPolicy: "none";
|
|
374
436
|
};
|
|
375
437
|
readonly 'pr subscribe': {
|
|
376
438
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -378,6 +440,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
378
440
|
readonly args: "<pr-url|owner/repo#N|N>";
|
|
379
441
|
readonly details: "Subscribes the current session to receive advisory notifications for the specified PR. When pr_monitor.enabled is true, the background polling worker will detect CI failures, new comments, merge conflicts, review state changes, and merge/close events. Notifications are delivered as session-scoped advisories with dedup tokens. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolved against origin). Requires pr_monitor.enabled: true in config.";
|
|
380
442
|
readonly category: "agent";
|
|
443
|
+
readonly toolPolicy: "human-only";
|
|
381
444
|
};
|
|
382
445
|
readonly 'pr unsubscribe': {
|
|
383
446
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -385,6 +448,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
385
448
|
readonly args: "<pr-url|owner/repo#N|N>";
|
|
386
449
|
readonly details: "Unsubscribes the current session from receiving advisory notifications for the specified PR. Removes the active subscription record. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolved against origin).";
|
|
387
450
|
readonly category: "agent";
|
|
451
|
+
readonly toolPolicy: "human-only";
|
|
388
452
|
};
|
|
389
453
|
readonly 'pr status': {
|
|
390
454
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -392,6 +456,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
392
456
|
readonly args: "";
|
|
393
457
|
readonly details: "Displays all active PR subscriptions for the current session. Shows PR URL, last checked time, watching status, and error count per subscription. Also shows total active subscriptions across all sessions.";
|
|
394
458
|
readonly category: "agent";
|
|
459
|
+
readonly toolPolicy: "agent";
|
|
460
|
+
readonly toolNoArgs: true;
|
|
395
461
|
};
|
|
396
462
|
readonly 'deep-dive': {
|
|
397
463
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -399,6 +465,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
399
465
|
readonly args: "<scope> [--profile standard|security|ux|architecture|full] [--max-explorers 1..8] [--json] [--skip-update] [--allow-dirty]";
|
|
400
466
|
readonly details: "Runs a read-only deep audit of the specified scope using parallel explorer waves (8-file cap per mission, ~3500 line guardrail), always 2 parallel reviewers for verification, and sequential critic challenge on HIGH/CRITICAL findings. Profiles select explorer lanes: standard (5 lanes), security, ux, architecture, full (all 8 lanes). Emits a structured findings report without mutating source code.";
|
|
401
467
|
readonly category: "agent";
|
|
468
|
+
readonly toolPolicy: "none";
|
|
402
469
|
};
|
|
403
470
|
readonly 'deep dive': {
|
|
404
471
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -413,6 +480,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
413
480
|
readonly args: "<question> [--depth standard|exhaustive] [--max-researchers 1..6] [--rounds 1..4] [--brief]";
|
|
414
481
|
readonly details: "Runs the orchestrator-worker deep-research protocol: the architect decomposes the question into subtopics, gathers evidence with web_search and web_fetch across up to N iterative rounds, dispatches parallel sme synthesis workers, verifies every claim against cited sources with dual reviewers, challenges high-stakes claims with the critic, and presents a cited report in chat. Read-only — does not mutate source code, delegate to coder, or call declare_scope. Requires council.general.enabled and a search API key.";
|
|
415
482
|
readonly category: "agent";
|
|
483
|
+
readonly toolPolicy: "none";
|
|
416
484
|
};
|
|
417
485
|
readonly 'deep research': {
|
|
418
486
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -427,6 +495,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
427
495
|
readonly args: "[scope] [--mode phase0|complete|defect|security|correctness|testing|ui|performance|ai-slop|enhancements|custom] [--tracks <list>] [--continue <run-id>] [--json] [--skip-update] [--allow-dirty]";
|
|
428
496
|
readonly details: "Runs the codebase-review-swarm workflow: Phase 0 inventory, selected-track depth planning, non-diluting review passes, coverage closure, reviewer validation, critic challenge, and .swarm/review-v8 artifacts. Materializes the bundled skill package if missing, then emits a MODE signal; the architect workflow must not mutate source files.";
|
|
429
497
|
readonly category: "agent";
|
|
498
|
+
readonly toolPolicy: "none";
|
|
430
499
|
};
|
|
431
500
|
readonly 'codebase review': {
|
|
432
501
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -441,6 +510,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
441
510
|
readonly args: "<description> [--out <dir>] [--lang <name>] [--update]";
|
|
442
511
|
readonly details: "Triggers the architect to enter MODE: DESIGN_DOCS — delegates to the docs_design agent to author/sync docs/domain.md, docs/technical-spec.md, docs/behavior-spec.md, and docs/reference/* (plus reference/traceability.json and design-changelog.md). Normative docs are 100% language-agnostic; all framework-specific material is quarantined under reference/. --update syncs existing docs to current code/spec instead of generating fresh. Requires design_docs.enabled: true.";
|
|
443
512
|
readonly category: "agent";
|
|
513
|
+
readonly toolPolicy: "none";
|
|
444
514
|
};
|
|
445
515
|
readonly 'design docs': {
|
|
446
516
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
@@ -455,6 +525,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
455
525
|
readonly args: "<issue-url|owner/repo#N|N> [--plan] [--trace] [--no-repro]";
|
|
456
526
|
readonly details: "Triggers the architect to enter MODE: ISSUE_INGEST — ingests a GitHub issue, restructures it into a normalized intake note, localizes root cause through hypothesis-driven tracing, and outputs a resolution spec. --plan transitions to plan creation after spec generation. --trace runs the full fix-and-PR workflow (implies --plan). --no-repro skips the reproduction step. Supports full GitHub URL, owner/repo#N shorthand, or bare issue number (resolves against origin remote).";
|
|
457
527
|
readonly category: "agent";
|
|
528
|
+
readonly toolPolicy: "none";
|
|
458
529
|
};
|
|
459
530
|
readonly 'qa-gates': {
|
|
460
531
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -462,6 +533,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
462
533
|
readonly args: "[show|enable|override] <gate>...";
|
|
463
534
|
readonly details: "show: display spec-level, session-override, and effective QA gates for the current plan. enable: persist gate(s) into the locked-once profile (architect; rejected after critic approval lock). override: session-only ratchet-tighter enable. Valid gates: reviewer, test_engineer, council_mode, sme_enabled, critic_pre_plan, hallucination_guard, sast_enabled, mutation_test, phase_council, drift_check, final_council.";
|
|
464
535
|
readonly category: "config";
|
|
536
|
+
readonly toolPolicy: "none";
|
|
465
537
|
};
|
|
466
538
|
readonly promote: {
|
|
467
539
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -469,6 +541,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
469
541
|
readonly details: "Promotes a lesson directly to hive knowledge (--category flag sets category) or references an existing swarm lesson by ID (--from-swarm). Validates lesson text before promotion. Either direct text or --from-swarm ID is required.";
|
|
470
542
|
readonly args: "--category <category>, --from-swarm <lesson-id>, <lesson-text>";
|
|
471
543
|
readonly category: "utility";
|
|
544
|
+
readonly toolPolicy: "none";
|
|
472
545
|
};
|
|
473
546
|
readonly reset: {
|
|
474
547
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -477,6 +550,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
477
550
|
readonly args: "--confirm (required)";
|
|
478
551
|
readonly category: "utility";
|
|
479
552
|
readonly clashesWithNativeCcCommand: "/reset";
|
|
553
|
+
readonly toolPolicy: "restricted";
|
|
480
554
|
};
|
|
481
555
|
readonly 'reset-session': {
|
|
482
556
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -484,6 +558,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
484
558
|
readonly details: "Deletes only .swarm/session/state.json and any other session files. Clears in-memory agent sessions and delegation chains. Preserves plan, evidence, and knowledge for cross-session continuity.";
|
|
485
559
|
readonly args: "";
|
|
486
560
|
readonly category: "utility";
|
|
561
|
+
readonly toolPolicy: "restricted";
|
|
487
562
|
};
|
|
488
563
|
readonly rollback: {
|
|
489
564
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -491,6 +566,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
491
566
|
readonly details: "Restores .swarm/ state by directly overwriting files from a checkpoint directory (checkpoints/phase-<N>). Writes rollback event to events.jsonl. Without phase argument, lists available checkpoints. Partial failures are reported but processing continues.";
|
|
492
567
|
readonly args: "<phase-number>";
|
|
493
568
|
readonly category: "utility";
|
|
569
|
+
readonly toolPolicy: "restricted";
|
|
494
570
|
};
|
|
495
571
|
readonly retrieve: {
|
|
496
572
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -498,6 +574,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
498
574
|
readonly args: "<summary-id>";
|
|
499
575
|
readonly details: "Loads the full tool output that was previously summarized (referenced by IDs like S1, S2). Use when you need the complete output instead of the truncated summary.";
|
|
500
576
|
readonly category: "utility";
|
|
577
|
+
readonly toolPolicy: "agent";
|
|
501
578
|
};
|
|
502
579
|
readonly handoff: {
|
|
503
580
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -505,6 +582,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
505
582
|
readonly args: "";
|
|
506
583
|
readonly details: "Generates handoff.md with full session state snapshot, including plan progress, recent decisions, and agent delegation history. Prepended to the next session prompt for seamless model switches.";
|
|
507
584
|
readonly category: "core";
|
|
585
|
+
readonly toolPolicy: "none";
|
|
508
586
|
};
|
|
509
587
|
readonly turbo: {
|
|
510
588
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -512,6 +590,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
512
590
|
readonly args: "on, off, lean, standard, status";
|
|
513
591
|
readonly details: string;
|
|
514
592
|
readonly category: "utility";
|
|
593
|
+
readonly toolPolicy: "none";
|
|
515
594
|
};
|
|
516
595
|
readonly 'full-auto': {
|
|
517
596
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -519,6 +598,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
519
598
|
readonly args: "on [assisted|supervised|strict], off, status";
|
|
520
599
|
readonly details: string;
|
|
521
600
|
readonly category: "utility";
|
|
601
|
+
readonly toolPolicy: "none";
|
|
522
602
|
};
|
|
523
603
|
readonly 'auto-proceed': {
|
|
524
604
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -526,6 +606,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
526
606
|
readonly args: "[on|off]";
|
|
527
607
|
readonly category: "config";
|
|
528
608
|
readonly details: "Without argument, toggles auto-proceed mode. With \"on\" or \"off\", sets the state explicitly.";
|
|
609
|
+
readonly toolPolicy: "agent";
|
|
529
610
|
};
|
|
530
611
|
readonly 'write-retro': {
|
|
531
612
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -533,6 +614,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
533
614
|
readonly details: "Writes retrospective evidence bundle to .swarm/evidence/retro-{phase}/evidence.json. Required JSON: phase, summary, task_count, task_complexity, total_tool_calls, coder_revisions, reviewer_rejections, test_failures, security_findings, integration_issues. Optional: lessons_learned (max 5), top_rejection_reasons, task_id, metadata.";
|
|
534
615
|
readonly args: "<json: {phase, summary, task_count, task_complexity, ...}>";
|
|
535
616
|
readonly category: "utility";
|
|
617
|
+
readonly toolPolicy: "none";
|
|
536
618
|
};
|
|
537
619
|
readonly 'knowledge migrate': {
|
|
538
620
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -577,11 +659,14 @@ export declare const COMMAND_REGISTRY: {
|
|
|
577
659
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
578
660
|
readonly description: "List knowledge entries";
|
|
579
661
|
readonly category: "utility";
|
|
662
|
+
readonly toolPolicy: "agent";
|
|
580
663
|
};
|
|
581
664
|
readonly memory: {
|
|
582
665
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
583
666
|
readonly description: "Show Swarm memory commands";
|
|
584
667
|
readonly category: "utility";
|
|
668
|
+
readonly toolPolicy: "agent";
|
|
669
|
+
readonly toolNoArgs: true;
|
|
585
670
|
};
|
|
586
671
|
readonly 'memory status': {
|
|
587
672
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -589,6 +674,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
589
674
|
readonly subcommandOf: "memory";
|
|
590
675
|
readonly args: "";
|
|
591
676
|
readonly category: "diagnostics";
|
|
677
|
+
readonly toolPolicy: "agent";
|
|
678
|
+
readonly toolNoArgs: true;
|
|
592
679
|
};
|
|
593
680
|
readonly 'memory pending': {
|
|
594
681
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -596,6 +683,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
596
683
|
readonly subcommandOf: "memory";
|
|
597
684
|
readonly args: "--limit <n>";
|
|
598
685
|
readonly category: "diagnostics";
|
|
686
|
+
readonly toolPolicy: "agent";
|
|
599
687
|
};
|
|
600
688
|
readonly 'memory recall-log': {
|
|
601
689
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -603,6 +691,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
603
691
|
readonly subcommandOf: "memory";
|
|
604
692
|
readonly args: "--limit <n>";
|
|
605
693
|
readonly category: "diagnostics";
|
|
694
|
+
readonly toolPolicy: "agent";
|
|
606
695
|
};
|
|
607
696
|
readonly 'memory compact': {
|
|
608
697
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -610,6 +699,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
610
699
|
readonly subcommandOf: "memory";
|
|
611
700
|
readonly args: "--confirm";
|
|
612
701
|
readonly category: "utility";
|
|
702
|
+
readonly toolPolicy: "human-only";
|
|
613
703
|
};
|
|
614
704
|
readonly 'memory stale': {
|
|
615
705
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -617,6 +707,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
617
707
|
readonly subcommandOf: "memory";
|
|
618
708
|
readonly args: "--limit <n>";
|
|
619
709
|
readonly category: "diagnostics";
|
|
710
|
+
readonly toolPolicy: "agent";
|
|
620
711
|
};
|
|
621
712
|
readonly 'memory export': {
|
|
622
713
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -624,6 +715,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
624
715
|
readonly subcommandOf: "memory";
|
|
625
716
|
readonly args: "";
|
|
626
717
|
readonly category: "utility";
|
|
718
|
+
readonly toolPolicy: "agent";
|
|
719
|
+
readonly toolNoArgs: true;
|
|
627
720
|
};
|
|
628
721
|
readonly 'memory evaluate': {
|
|
629
722
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -631,6 +724,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
631
724
|
readonly subcommandOf: "memory";
|
|
632
725
|
readonly args: "--json, --fixtures <directory>";
|
|
633
726
|
readonly category: "diagnostics";
|
|
727
|
+
readonly toolPolicy: "agent";
|
|
634
728
|
};
|
|
635
729
|
readonly 'memory import': {
|
|
636
730
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -638,6 +732,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
638
732
|
readonly subcommandOf: "memory";
|
|
639
733
|
readonly args: "";
|
|
640
734
|
readonly category: "utility";
|
|
735
|
+
readonly toolPolicy: "human-only";
|
|
641
736
|
};
|
|
642
737
|
readonly 'memory migrate': {
|
|
643
738
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -645,6 +740,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
645
740
|
readonly subcommandOf: "memory";
|
|
646
741
|
readonly args: "";
|
|
647
742
|
readonly category: "utility";
|
|
743
|
+
readonly toolPolicy: "human-only";
|
|
648
744
|
};
|
|
649
745
|
readonly checkpoint: {
|
|
650
746
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
@@ -653,6 +749,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
653
749
|
readonly args: "<save|restore|delete|list> <label>";
|
|
654
750
|
readonly category: "utility";
|
|
655
751
|
readonly clashesWithNativeCcCommand: "/checkpoint";
|
|
752
|
+
readonly toolPolicy: "restricted";
|
|
656
753
|
};
|
|
657
754
|
};
|
|
658
755
|
export type RegisteredCommand = keyof typeof COMMAND_REGISTRY;
|
|
@@ -669,6 +766,17 @@ export declare function validateAliases(): {
|
|
|
669
766
|
errors: string[];
|
|
670
767
|
warnings: string[];
|
|
671
768
|
};
|
|
769
|
+
/**
|
|
770
|
+
* Validates that every standalone command (no aliasOf, no subcommandOf) has
|
|
771
|
+
* a toolPolicy field. Warns for any that are missing — the module still loads
|
|
772
|
+
* successfully (fail-open per AGENTS.md invariant #1).
|
|
773
|
+
*
|
|
774
|
+
* Subcommands inherit their parent's tool policy and are not checked here.
|
|
775
|
+
*/
|
|
776
|
+
export declare function validateToolPolicy(): {
|
|
777
|
+
valid: boolean;
|
|
778
|
+
warnings: string[];
|
|
779
|
+
};
|
|
672
780
|
/**
|
|
673
781
|
* DI seam for testability. Contains all test-mocked exports.
|
|
674
782
|
* Internal calls should use _internals.fn() instead of fn() directly.
|
|
@@ -676,6 +784,7 @@ export declare function validateAliases(): {
|
|
|
676
784
|
export declare const _internals: {
|
|
677
785
|
handleHelpCommand: typeof handleHelpCommand;
|
|
678
786
|
validateAliases: typeof validateAliases;
|
|
787
|
+
validateToolPolicy: typeof validateToolPolicy;
|
|
679
788
|
resolveCommand: typeof resolveCommand;
|
|
680
789
|
levenshteinDistance: typeof levenshteinDistance;
|
|
681
790
|
findSimilarCommands: typeof findSimilarCommands;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ResolvedSwarmCommand, SwarmCommandPolicyResult } from './command-dispatch.js';
|
|
2
|
-
export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly [
|
|
3
|
-
export type SwarmCommandToolInputCommand =
|
|
2
|
+
export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly string[];
|
|
3
|
+
export type SwarmCommandToolInputCommand = string;
|
|
4
4
|
export declare const SWARM_COMMAND_TOOL_ALLOWLIST: Set<string>;
|
|
5
5
|
/**
|
|
6
6
|
* Issue #890: subcommands that must be invoked by a human user, not by the
|