opencode-swarm 7.13.1 → 7.14.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.
Files changed (216) hide show
  1. package/dist/cli/index.js +144 -15
  2. package/dist/commands/deep-dive.d.ts +5 -0
  3. package/dist/commands/index.d.ts +1 -0
  4. package/dist/commands/registry.d.ts +14 -0
  5. package/dist/config/evidence-schema.d.ts +13 -13
  6. package/dist/config/schema.d.ts +4 -4
  7. package/dist/index.js +422 -123
  8. package/dist/tools/convene-council.d.ts +3 -3
  9. package/dist/tools/submit-phase-council-verdicts.d.ts +3 -3
  10. package/package.json +1 -1
  11. package/dist/__tests__/acknowledge-spec-drift.test.d.ts +0 -1
  12. package/dist/__tests__/cli-version.adversarial.test.d.ts +0 -1
  13. package/dist/__tests__/cli-version.test.d.ts +0 -1
  14. package/dist/__tests__/conflict-resolution.test.d.ts +0 -1
  15. package/dist/__tests__/convene-general-council.test.d.ts +0 -12
  16. package/dist/__tests__/critic_drift_verifier-whitelist.test.d.ts +0 -1
  17. package/dist/__tests__/critic_hallucination_verifier-whitelist.test.d.ts +0 -1
  18. package/dist/__tests__/disagreement-detector.test.d.ts +0 -7
  19. package/dist/__tests__/evidence-lock.adversarial.test.d.ts +0 -8
  20. package/dist/__tests__/evidence-lock.test.d.ts +0 -6
  21. package/dist/__tests__/gate-evidence.adversarial.test.d.ts +0 -7
  22. package/dist/__tests__/general-council-service.test.d.ts +0 -7
  23. package/dist/__tests__/lint-spec.test.d.ts +0 -1
  24. package/dist/__tests__/preflight-phase.test.d.ts +0 -1
  25. package/dist/__tests__/qa-gate-hardening.test.d.ts +0 -12
  26. package/dist/__tests__/req-coverage.test.d.ts +0 -1
  27. package/dist/__tests__/security-adversarial.test.d.ts +0 -1
  28. package/dist/__tests__/sounding-board-parser.test.d.ts +0 -1
  29. package/dist/__tests__/spec-hash.test.d.ts +0 -1
  30. package/dist/__tests__/spec-schema.test.d.ts +0 -1
  31. package/dist/__tests__/web-search-provider.test.d.ts +0 -6
  32. package/dist/__tests__/write-drift-evidence-requirement-coverage.test.d.ts +0 -4
  33. package/dist/adversarial-tests.test.d.ts +0 -1
  34. package/dist/agents/architect-permission.adversarial.test.d.ts +0 -5
  35. package/dist/agents/architect.commands-list.adversarial.test.d.ts +0 -1
  36. package/dist/agents/architect.commands-list.test.d.ts +0 -1
  37. package/dist/agents/architect.dark-matter.test.d.ts +0 -1
  38. package/dist/agents/architect.designer-gate.test.d.ts +0 -1
  39. package/dist/agents/architect.skip-aliases.test.d.ts +0 -1
  40. package/dist/agents/coder.test.d.ts +0 -1
  41. package/dist/agents/council-prompts.test.d.ts +0 -9
  42. package/dist/agents/council-registration.test.d.ts +0 -23
  43. package/dist/agents/explorer-consumer-contract.test.d.ts +0 -1
  44. package/dist/agents/explorer-role-boundary.test.d.ts +0 -1
  45. package/dist/agents/prompt-namespace.test.d.ts +0 -1
  46. package/dist/agents/reviewer.test.d.ts +0 -1
  47. package/dist/agents/test-engineer.adversarial.test.d.ts +0 -5
  48. package/dist/agents/test-engineer.security.test.d.ts +0 -1
  49. package/dist/background/trigger.vulnerability.test.d.ts +0 -1
  50. package/dist/commands/archive.error-handling.test.d.ts +0 -9
  51. package/dist/commands/benchmark.error-handling.test.d.ts +0 -7
  52. package/dist/commands/brainstorm.test.d.ts +0 -1
  53. package/dist/commands/clashes-with-native-cc.test.d.ts +0 -10
  54. package/dist/commands/command-adapters.security.test.d.ts +0 -14
  55. package/dist/commands/command-names.test.d.ts +0 -1
  56. package/dist/commands/commands.test.d.ts +0 -1
  57. package/dist/commands/conflict-registry.structural.test.d.ts +0 -1
  58. package/dist/commands/conflict-registry.test.d.ts +0 -5
  59. package/dist/commands/council.test.d.ts +0 -4
  60. package/dist/commands/curate.test.d.ts +0 -1
  61. package/dist/commands/dark-matter.error-handling.test.d.ts +0 -1
  62. package/dist/commands/first-run.test.d.ts +0 -11
  63. package/dist/commands/full-auto-config-guard.test.d.ts +0 -7
  64. package/dist/commands/full-auto-discoverability.test.d.ts +0 -8
  65. package/dist/commands/full-auto-registration.test.d.ts +0 -5
  66. package/dist/commands/full-auto-sessionid.test.d.ts +0 -5
  67. package/dist/commands/full-auto.regression.test.d.ts +0 -10
  68. package/dist/commands/full-auto.test.d.ts +0 -6
  69. package/dist/commands/handoff.error-handling.adversarial.test.d.ts +0 -1
  70. package/dist/commands/handoff.error-handling.test.d.ts +0 -1
  71. package/dist/commands/index.help-text.test.d.ts +0 -1
  72. package/dist/commands/index.not-found.adversarial.test.d.ts +0 -12
  73. package/dist/commands/index.not-found.test.d.ts +0 -11
  74. package/dist/commands/qa-gates.test.d.ts +0 -1
  75. package/dist/commands/registration-parity.test.d.ts +0 -1
  76. package/dist/commands/registry-documentation.test.d.ts +0 -1
  77. package/dist/commands/registry-type.test.d.ts +0 -1
  78. package/dist/commands/registry.find-similar.adversarial.test.d.ts +0 -1
  79. package/dist/commands/registry.find-similar.test.d.ts +0 -1
  80. package/dist/commands/registry.test.d.ts +0 -1
  81. package/dist/commands/shortcut-routing.test.d.ts +0 -11
  82. package/dist/commands/simulate.report-write.adversarial.test.d.ts +0 -1
  83. package/dist/commands/simulate.report-write.test.d.ts +0 -1
  84. package/dist/commands/turbo-registration.test.d.ts +0 -5
  85. package/dist/commands/turbo-sessionid.test.d.ts +0 -5
  86. package/dist/commands/turbo.regression.test.d.ts +0 -11
  87. package/dist/commands/turbo.test.d.ts +0 -5
  88. package/dist/config/constants.architect-whitelist.test.d.ts +0 -1
  89. package/dist/config/constants.security.test.d.ts +0 -1
  90. package/dist/council/__tests__/council-evidence-writer.adversarial.test.d.ts +0 -6
  91. package/dist/db/global-db.test.d.ts +0 -7
  92. package/dist/db/project-db.test.d.ts +0 -4
  93. package/dist/db/qa-gate-profile.test.d.ts +0 -4
  94. package/dist/diff/__tests__/semantic-classifier.test.d.ts +0 -1
  95. package/dist/diff/__tests__/summary-generator.test.d.ts +0 -1
  96. package/dist/gate-evidence.test.d.ts +0 -1
  97. package/dist/hooks/__tests__/repo-graph-builder.test.d.ts +0 -12
  98. package/dist/hooks/__tests__/semantic-diff-injection.test.d.ts +0 -1
  99. package/dist/hooks/agent-activity.test.d.ts +0 -1
  100. package/dist/hooks/cc-command-intercept.test.d.ts +0 -1
  101. package/dist/hooks/curator-drift-advisory.test.d.ts +0 -1
  102. package/dist/hooks/delegation-gate.evidence.test.d.ts +0 -4
  103. package/dist/hooks/delegation-gate.getEvidenceTaskId.test.d.ts +0 -20
  104. package/dist/hooks/delegation-gate.plan-fallback-security.test.d.ts +0 -13
  105. package/dist/hooks/delegation-gate.plan-fallback.test.d.ts +0 -5
  106. package/dist/hooks/delegation-gate.seed-state.test.d.ts +0 -1
  107. package/dist/hooks/delegation-gate.turbo-evidence.test.d.ts +0 -8
  108. package/dist/hooks/delegation-gate.verify.test.d.ts +0 -11
  109. package/dist/hooks/delegation-ledger.test.d.ts +0 -11
  110. package/dist/hooks/diff-scope.test.d.ts +0 -1
  111. package/dist/hooks/incremental-verify.test.d.ts +0 -1
  112. package/dist/hooks/loop-detector.test.d.ts +0 -1
  113. package/dist/hooks/scope-guard-throw-behavior.test.d.ts +0 -15
  114. package/dist/hooks/scope-guard.adversarial.test.d.ts +0 -1
  115. package/dist/hooks/scope-guard.test.d.ts +0 -14
  116. package/dist/hooks/self-review.test.d.ts +0 -14
  117. package/dist/hooks/slop-detector.adversarial.test.d.ts +0 -1
  118. package/dist/hooks/slop-detector.test.d.ts +0 -1
  119. package/dist/hooks/spawn-helper.test.d.ts +0 -1
  120. package/dist/hooks/watchdog.integration.test.d.ts +0 -9
  121. package/dist/index.adversarial-bootstrap.test.d.ts +0 -1
  122. package/dist/index.bootstrap-adversarial.test.d.ts +0 -1
  123. package/dist/index.bootstrap-directory.test.d.ts +0 -1
  124. package/dist/model-fallback.adversarial.test.d.ts +0 -22
  125. package/dist/model-fallback.test.d.ts +0 -12
  126. package/dist/mutation/__tests__/engine.adversarial.test.d.ts +0 -1
  127. package/dist/mutation/__tests__/engine.test.d.ts +0 -1
  128. package/dist/mutation/__tests__/equivalence.adversarial.test.d.ts +0 -1
  129. package/dist/mutation/__tests__/equivalence.test.d.ts +0 -1
  130. package/dist/mutation/__tests__/gate.adversarial.test.d.ts +0 -1
  131. package/dist/mutation/__tests__/gate.test.d.ts +0 -1
  132. package/dist/mutation/__tests__/generator.test.d.ts +0 -1
  133. package/dist/parallel/dispatcher/noop-dispatcher.test.d.ts +0 -10
  134. package/dist/plan/checkpoint.test.d.ts +0 -1
  135. package/dist/plan/ledger-integrity.test.d.ts +0 -5
  136. package/dist/plan/ledger-snapshot-adversarial.test.d.ts +0 -1
  137. package/dist/plan/ledger.test.d.ts +0 -1
  138. package/dist/plan/manager.cas-backoff.test.d.ts +0 -10
  139. package/dist/plan/manager.ledger-aware.test.d.ts +0 -1
  140. package/dist/plan/manager.loadplan-validation-guard.test.d.ts +0 -13
  141. package/dist/plan/manager.update-task-status.test.d.ts +0 -1
  142. package/dist/plan/migration-revert.regression.test.d.ts +0 -8
  143. package/dist/prm/__tests__/course-correction.test.d.ts +0 -1
  144. package/dist/prm/__tests__/escalation-queue-drain.test.d.ts +0 -1
  145. package/dist/prm/__tests__/escalation.test.d.ts +0 -1
  146. package/dist/prm/__tests__/index.test.d.ts +0 -1
  147. package/dist/prm/__tests__/integration.test.d.ts +0 -1
  148. package/dist/prm/__tests__/pattern-detector.test.d.ts +0 -5
  149. package/dist/prm/__tests__/replay.test.d.ts +0 -1
  150. package/dist/prm/__tests__/trajectory-store.test.d.ts +0 -7
  151. package/dist/sast/semgrep.test.d.ts +0 -1
  152. package/dist/scope/scope-persistence.test.d.ts +0 -13
  153. package/dist/services/compaction-service.test.d.ts +0 -1
  154. package/dist/services/config-doctor.security.test.d.ts +0 -1
  155. package/dist/services/config-doctor.test.d.ts +0 -1
  156. package/dist/services/status-service.turbo-indicator.test.d.ts +0 -5
  157. package/dist/services/tool-doctor.test.d.ts +0 -1
  158. package/dist/state.agent-run-context.test.d.ts +0 -10
  159. package/dist/state.rehydrate.test.d.ts +0 -1
  160. package/dist/state.rehydration-adversarial.test.d.ts +0 -1
  161. package/dist/state.rehydration-integration.test.d.ts +0 -1
  162. package/dist/state.session-restart.test.d.ts +0 -7
  163. package/dist/state.telemetry.test.d.ts +0 -1
  164. package/dist/telemetry.test.d.ts +0 -1
  165. package/dist/test-impact/__tests__/analyzer-import-fix.adversarial.test.d.ts +0 -1
  166. package/dist/test-impact/__tests__/analyzer-import-fix.test.d.ts +0 -1
  167. package/dist/test-impact/__tests__/analyzer.adversarial.test.d.ts +0 -1
  168. package/dist/test-impact/__tests__/analyzer.test.d.ts +0 -1
  169. package/dist/test-impact/__tests__/council-fixes.test.d.ts +0 -1
  170. package/dist/test-impact/__tests__/failure-classifier.adversarial.test.d.ts +0 -1
  171. package/dist/test-impact/__tests__/failure-classifier.test.d.ts +0 -1
  172. package/dist/test-impact/__tests__/flaky-detector.adversarial.test.d.ts +0 -1
  173. package/dist/test-impact/__tests__/flaky-detector.test.d.ts +0 -1
  174. package/dist/test-impact/__tests__/history-store.adversarial.test.d.ts +0 -1
  175. package/dist/test-impact/__tests__/history-store.test.d.ts +0 -1
  176. package/dist/test-impact/__tests__/test-impact.adversarial.test.d.ts +0 -1
  177. package/dist/test-impact/__tests__/test-impact.test.d.ts +0 -1
  178. package/dist/tools/__tests__/barrel-exports.test.d.ts +0 -1
  179. package/dist/tools/__tests__/diff-ast-fallback.test.d.ts +0 -1
  180. package/dist/tools/__tests__/diff-markdown-summary.test.d.ts +0 -1
  181. package/dist/tools/__tests__/diff-semantic.test.d.ts +0 -1
  182. package/dist/tools/__tests__/diff-summary.adversarial.test.d.ts +0 -1
  183. package/dist/tools/__tests__/diff-summary.test.d.ts +0 -1
  184. package/dist/tools/__tests__/mutation-test.adversarial.test.d.ts +0 -1
  185. package/dist/tools/__tests__/mutation-test.sourcefiles.test.d.ts +0 -1
  186. package/dist/tools/__tests__/mutation-test.test.d.ts +0 -1
  187. package/dist/tools/__tests__/repo-graph-walk.test.d.ts +0 -16
  188. package/dist/tools/__tests__/test-runner-history.test.d.ts +0 -1
  189. package/dist/tools/__tests__/test-runner-impact.adversarial.test.d.ts +0 -1
  190. package/dist/tools/__tests__/test-runner-impact.test.d.ts +0 -1
  191. package/dist/tools/__tests__/test-runner-source-files.test.d.ts +0 -1
  192. package/dist/tools/barrel-export-check-gate-status.test.d.ts +0 -6
  193. package/dist/tools/batch-symbols.test.d.ts +0 -1
  194. package/dist/tools/check-gate-status.adversarial.test.d.ts +0 -1
  195. package/dist/tools/check-gate-status.gates.test.d.ts +0 -1
  196. package/dist/tools/check-gate-status.plugin-registration.test.d.ts +0 -1
  197. package/dist/tools/curator-analyze.test.d.ts +0 -1
  198. package/dist/tools/knowledge-tools.integration.test.d.ts +0 -1
  199. package/dist/tools/mutation-test.security.test.d.ts +0 -1
  200. package/dist/tools/plugin-registration-adversarial.test.d.ts +0 -1
  201. package/dist/tools/resolve-working-directory.test.d.ts +0 -1
  202. package/dist/tools/save-plan.subdirectory-rejection.test.d.ts +0 -1
  203. package/dist/tools/search.adversarial.test.d.ts +0 -1
  204. package/dist/tools/search.test.d.ts +0 -1
  205. package/dist/tools/suggest-patch.adversarial.test.d.ts +0 -1
  206. package/dist/tools/suggest-patch.test.d.ts +0 -1
  207. package/dist/tools/test-runner.security-adversarial.test.d.ts +0 -5
  208. package/dist/tools/update-task-status.adversarial.test.d.ts +0 -13
  209. package/dist/tools/update-task-status.gates.test.d.ts +0 -1
  210. package/dist/tools/update-task-status.test.d.ts +0 -1
  211. package/dist/tools/update-task-status.turbo-bypass.test.d.ts +0 -1
  212. package/dist/tools/verify-six-tools-registration.test.d.ts +0 -9
  213. package/dist/tools/write-mutation-evidence.test.d.ts +0 -1
  214. package/dist/transient-retry.test.d.ts +0 -10
  215. package/dist/utils/__tests__/bun-compat.test.d.ts +0 -11
  216. package/dist/utils/__tests__/timeout.test.d.ts +0 -12
package/dist/cli/index.js CHANGED
@@ -34,7 +34,7 @@ var package_default;
34
34
  var init_package = __esm(() => {
35
35
  package_default = {
36
36
  name: "opencode-swarm",
37
- version: "7.13.1",
37
+ version: "7.14.0",
38
38
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
39
39
  main: "dist/index.js",
40
40
  types: "dist/index.d.ts",
@@ -37531,6 +37531,118 @@ var init_dark_matter = __esm(() => {
37531
37531
  init_co_change_analyzer();
37532
37532
  });
37533
37533
 
37534
+ // src/commands/deep-dive.ts
37535
+ function sanitizeScope(raw) {
37536
+ const collapsed = raw.replace(/\s+/g, " ").trim();
37537
+ const stripped = collapsed.replace(/\[\s*MODE\s*:[^\]]*\]/gi, "");
37538
+ const normalized = stripped.replace(/\s+/g, " ").trim();
37539
+ if (normalized.length <= MAX_SCOPE_LEN)
37540
+ return normalized;
37541
+ return `${normalized.slice(0, MAX_SCOPE_LEN)}\u2026`;
37542
+ }
37543
+ function isValidPositiveInteger(raw) {
37544
+ if (!raw || !/^\d+$/.test(raw))
37545
+ return false;
37546
+ const n = Number(raw);
37547
+ if (!Number.isFinite(n) || !Number.isInteger(n) || n < 0)
37548
+ return false;
37549
+ return true;
37550
+ }
37551
+ function parseArgs2(args) {
37552
+ const result = {
37553
+ profile: DEFAULT_PROFILE,
37554
+ maxExplorers: DEFAULT_MAX_EXPLORERS,
37555
+ output: "markdown",
37556
+ updateMain: true,
37557
+ allowDirty: false,
37558
+ rest: []
37559
+ };
37560
+ let i = 0;
37561
+ while (i < args.length) {
37562
+ const token = args[i];
37563
+ if (token === "--profile") {
37564
+ if (i + 1 >= args.length) {
37565
+ return { ...result, error: `Flag "${token}" requires a value` };
37566
+ }
37567
+ const value = args[++i];
37568
+ if (!PROFILES.has(value)) {
37569
+ return {
37570
+ ...result,
37571
+ error: `Invalid profile "${value}". Must be one of: standard, security, ux, architecture, full.`
37572
+ };
37573
+ }
37574
+ result.profile = value;
37575
+ } else if (token === "--max-explorers") {
37576
+ if (i + 1 >= args.length) {
37577
+ return { ...result, error: `Flag "${token}" requires a value` };
37578
+ }
37579
+ const value = args[++i];
37580
+ if (!isValidPositiveInteger(value) || value.includes(".") || value.startsWith("0x") || value.startsWith("0X") || Number(value) < 1 || Number(value) > 8) {
37581
+ return {
37582
+ ...result,
37583
+ error: `Invalid --max-explorers value "${value}". Must be an integer between 1 and 8.`
37584
+ };
37585
+ }
37586
+ result.maxExplorers = Number(value);
37587
+ result.maxExplorersExplicit = true;
37588
+ } else if (token === "--json") {
37589
+ result.output = "json";
37590
+ } else if (token === "--skip-update") {
37591
+ result.updateMain = false;
37592
+ } else if (token === "--allow-dirty") {
37593
+ result.allowDirty = true;
37594
+ } else if (token.startsWith("--")) {
37595
+ return { ...result, error: `Unknown flag "${token}"` };
37596
+ } else {
37597
+ result.rest.push(token);
37598
+ }
37599
+ i++;
37600
+ }
37601
+ return result;
37602
+ }
37603
+ async function handleDeepDiveCommand(_directory, args) {
37604
+ const parsed = parseArgs2(args);
37605
+ if (parsed.error) {
37606
+ return `Error: ${parsed.error}
37607
+
37608
+ ${USAGE2}`;
37609
+ }
37610
+ const scope = sanitizeScope(parsed.rest.join(" "));
37611
+ if (!scope) {
37612
+ return USAGE2;
37613
+ }
37614
+ if (parsed.profile === "full" && !parsed.maxExplorersExplicit) {
37615
+ parsed.maxExplorers = FULL_PROFILE_DEFAULT_MAX_EXPLORERS;
37616
+ }
37617
+ const header = `[MODE: DEEP_DIVE profile=${parsed.profile} max_explorers=${parsed.maxExplorers} output=${parsed.output} update_main=${parsed.updateMain} allow_dirty=${parsed.allowDirty}] ${scope}`;
37618
+ return header;
37619
+ }
37620
+ var MAX_SCOPE_LEN = 2000, PROFILES, DEFAULT_PROFILE = "standard", DEFAULT_MAX_EXPLORERS = 6, FULL_PROFILE_DEFAULT_MAX_EXPLORERS = 8, USAGE2 = `Usage: /swarm deep-dive <scope> [--profile standard|security|ux|architecture|full] [--max-explorers N] [--json] [--skip-update] [--allow-dirty]
37621
+
37622
+ Run a bounded, evidence-backed deep dive on an application section.
37623
+
37624
+ Examples:
37625
+ /swarm deep-dive auth
37626
+ /swarm deep dive src/commands --profile architecture
37627
+ /swarm deep-dive "settings page" --profile ux
37628
+ /swarm deep-dive src/security --profile security --max-explorers 5
37629
+
37630
+ Flags:
37631
+ --profile <name> standard, security, ux, architecture, or full
37632
+ --max-explorers <N> explorer runs per wave, 1..8
37633
+ --json include machine-readable JSON in the final report
37634
+ --skip-update skip the repo update-to-main preflight
37635
+ --allow-dirty allow audit to proceed with dirty worktree`;
37636
+ var init_deep_dive = __esm(() => {
37637
+ PROFILES = new Set([
37638
+ "standard",
37639
+ "security",
37640
+ "ux",
37641
+ "architecture",
37642
+ "full"
37643
+ ]);
37644
+ });
37645
+
37534
37646
  // src/config/cache-paths.ts
37535
37647
  import * as os5 from "os";
37536
37648
  import * as path18 from "path";
@@ -42308,7 +42420,7 @@ function validateAndSanitizeUrl(rawUrl) {
42308
42420
  return { error: "Invalid URL format" };
42309
42421
  }
42310
42422
  }
42311
- function parseArgs2(args) {
42423
+ function parseArgs3(args) {
42312
42424
  const out = {
42313
42425
  plan: false,
42314
42426
  trace: false,
@@ -42399,24 +42511,24 @@ function parseGitRemoteUrl(remoteUrl) {
42399
42511
  return null;
42400
42512
  }
42401
42513
  function handleIssueCommand(_directory, args) {
42402
- const parsed = parseArgs2(args);
42514
+ const parsed = parseArgs3(args);
42403
42515
  const rawInput = parsed.rest.join(" ").trim();
42404
42516
  if (!rawInput) {
42405
- return USAGE2;
42517
+ return USAGE3;
42406
42518
  }
42407
42519
  const isFullUrl = /^https?:\/\//i.test(rawInput);
42408
42520
  const issueInfo = parseIssueRef(isFullUrl ? sanitizeUrl(rawInput) : rawInput);
42409
42521
  if (!issueInfo) {
42410
42522
  return `Error: Could not parse issue reference from "${rawInput}"
42411
42523
 
42412
- ${USAGE2}`;
42524
+ ${USAGE3}`;
42413
42525
  }
42414
42526
  const issueUrl = `https://github.com/${issueInfo.owner}/${issueInfo.repo}/issues/${issueInfo.number}`;
42415
42527
  const result = validateAndSanitizeUrl(issueUrl);
42416
42528
  if ("error" in result) {
42417
42529
  return `Error: ${result.error}
42418
42530
 
42419
- ${USAGE2}`;
42531
+ ${USAGE3}`;
42420
42532
  }
42421
42533
  const flags = [];
42422
42534
  if (parsed.plan)
@@ -42428,9 +42540,9 @@ ${USAGE2}`;
42428
42540
  const flagsStr = flags.length > 0 ? ` ${flags.join(" ")}` : "";
42429
42541
  return `[MODE: ISSUE_INGEST issue="${result.sanitized}"${flagsStr}]`;
42430
42542
  }
42431
- var MAX_URL_LEN = 2048, USAGE2;
42543
+ var MAX_URL_LEN = 2048, USAGE3;
42432
42544
  var init_issue = __esm(() => {
42433
- USAGE2 = [
42545
+ USAGE3 = [
42434
42546
  "Usage: /swarm issue <url|owner/repo#N|N> [--plan] [--trace] [--no-repro]",
42435
42547
  "",
42436
42548
  "Ingest a GitHub issue into the swarm workflow.",
@@ -43047,7 +43159,7 @@ function validateAndSanitizeUrl2(rawUrl) {
43047
43159
  return { error: "Invalid URL format" };
43048
43160
  }
43049
43161
  }
43050
- function parseArgs3(args) {
43162
+ function parseArgs4(args) {
43051
43163
  const out = { council: false, rest: [] };
43052
43164
  for (const token of args) {
43053
43165
  if (token === "--council") {
@@ -43131,31 +43243,31 @@ function parseGitRemoteUrl2(remoteUrl) {
43131
43243
  return null;
43132
43244
  }
43133
43245
  function handlePrReviewCommand(_directory, args) {
43134
- const parsed = parseArgs3(args);
43246
+ const parsed = parseArgs4(args);
43135
43247
  const rawInput = parsed.rest.join(" ").trim();
43136
43248
  if (!rawInput) {
43137
- return USAGE3;
43249
+ return USAGE4;
43138
43250
  }
43139
43251
  const isFullUrl = /^https?:\/\//i.test(rawInput);
43140
43252
  const prInfo = parsePrRef(isFullUrl ? sanitizeUrl2(rawInput) : rawInput);
43141
43253
  if (!prInfo) {
43142
43254
  return `Error: Could not parse PR reference from "${rawInput}"
43143
43255
 
43144
- ${USAGE3}`;
43256
+ ${USAGE4}`;
43145
43257
  }
43146
43258
  const prUrl = `https://github.com/${prInfo.owner}/${prInfo.repo}/pull/${prInfo.number}`;
43147
43259
  const result = validateAndSanitizeUrl2(prUrl);
43148
43260
  if ("error" in result) {
43149
43261
  return `Error: ${result.error}
43150
43262
 
43151
- ${USAGE3}`;
43263
+ ${USAGE4}`;
43152
43264
  }
43153
43265
  const councilFlag = parsed.council ? "council=true" : "council=false";
43154
43266
  return `[MODE: PR_REVIEW pr="${result.sanitized}" ${councilFlag}]`;
43155
43267
  }
43156
- var MAX_URL_LEN2 = 2048, USAGE3;
43268
+ var MAX_URL_LEN2 = 2048, USAGE4;
43157
43269
  var init_pr_review = __esm(() => {
43158
- USAGE3 = [
43270
+ USAGE4 = [
43159
43271
  "Usage: /swarm pr-review <url|owner/repo#N|N> [--council]",
43160
43272
  "",
43161
43273
  "Run a full swarm PR review on a GitHub pull request.",
@@ -48560,6 +48672,7 @@ __export(exports_commands, {
48560
48672
  handleEvidenceCommand: () => handleEvidenceCommand,
48561
48673
  handleDoctorCommand: () => handleDoctorCommand,
48562
48674
  handleDiagnoseCommand: () => handleDiagnoseCommand,
48675
+ handleDeepDiveCommand: () => handleDeepDiveCommand,
48563
48676
  handleDarkMatterCommand: () => handleDarkMatterCommand,
48564
48677
  handleCurateCommand: () => handleCurateCommand,
48565
48678
  handleCouncilCommand: () => handleCouncilCommand,
@@ -48763,6 +48876,7 @@ var init_commands = __esm(() => {
48763
48876
  init_council();
48764
48877
  init_curate();
48765
48878
  init_dark_matter();
48879
+ init_deep_dive();
48766
48880
  init_diagnose();
48767
48881
  init_doctor();
48768
48882
  init_evidence();
@@ -48980,6 +49094,7 @@ var init_registry = __esm(() => {
48980
49094
  init_council();
48981
49095
  init_curate();
48982
49096
  init_dark_matter();
49097
+ init_deep_dive();
48983
49098
  init_diagnose();
48984
49099
  init_doctor();
48985
49100
  init_evidence();
@@ -49259,6 +49374,20 @@ var init_registry = __esm(() => {
49259
49374
  details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, runs 6 parallel explorer lanes (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).",
49260
49375
  category: "agent"
49261
49376
  },
49377
+ "deep-dive": {
49378
+ handler: async (ctx) => handleDeepDiveCommand(ctx.directory, ctx.args),
49379
+ description: "Launch deep codebase audit with parallel explorer waves, dual reviewers, and critic challenge [scope]",
49380
+ args: "<scope> [--profile standard|security|ux|architecture|full] [--max-explorers 1..8] [--json] [--skip-update] [--allow-dirty]",
49381
+ 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.",
49382
+ category: "agent"
49383
+ },
49384
+ "deep dive": {
49385
+ handler: async (ctx) => handleDeepDiveCommand(ctx.directory, ctx.args),
49386
+ description: "Alias for /swarm deep-dive \u2014 launch deep codebase audit",
49387
+ args: "<scope> [--profile standard|security|ux|architecture|full] [--max-explorers 1..8] [--json] [--skip-update] [--allow-dirty]",
49388
+ category: "agent",
49389
+ aliasOf: "deep-dive"
49390
+ },
49262
49391
  issue: {
49263
49392
  handler: async (ctx) => handleIssueCommand(ctx.directory, ctx.args),
49264
49393
  description: "Ingest a GitHub issue into the swarm workflow [url] [--plan] [--trace] [--no-repro]",
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Handle /swarm deep-dive command.
3
+ * Sanitizes scope input, parses flags, and emits a DEEP_DIVE mode signal.
4
+ */
5
+ export declare function handleDeepDiveCommand(_directory: string, args: string[]): Promise<string>;
@@ -14,6 +14,7 @@ export { handleConfigCommand } from './config';
14
14
  export { handleCouncilCommand } from './council';
15
15
  export { handleCurateCommand } from './curate';
16
16
  export { handleDarkMatterCommand } from './dark-matter';
17
+ export { handleDeepDiveCommand } from './deep-dive';
17
18
  export { handleDiagnoseCommand } from './diagnose';
18
19
  export { handleDoctorCommand } from './doctor';
19
20
  export { handleEvidenceCommand, handleEvidenceSummaryCommand, } from './evidence';
@@ -293,6 +293,20 @@ export declare const COMMAND_REGISTRY: {
293
293
  readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, runs 6 parallel explorer lanes (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).";
294
294
  readonly category: "agent";
295
295
  };
296
+ readonly 'deep-dive': {
297
+ readonly handler: (ctx: CommandContext) => Promise<string>;
298
+ readonly description: "Launch deep codebase audit with parallel explorer waves, dual reviewers, and critic challenge [scope]";
299
+ readonly args: "<scope> [--profile standard|security|ux|architecture|full] [--max-explorers 1..8] [--json] [--skip-update] [--allow-dirty]";
300
+ 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.";
301
+ readonly category: "agent";
302
+ };
303
+ readonly 'deep dive': {
304
+ readonly handler: (ctx: CommandContext) => Promise<string>;
305
+ readonly description: "Alias for /swarm deep-dive — launch deep codebase audit";
306
+ readonly args: "<scope> [--profile standard|security|ux|architecture|full] [--max-explorers 1..8] [--json] [--skip-update] [--allow-dirty]";
307
+ readonly category: "agent";
308
+ readonly aliasOf: "deep-dive";
309
+ };
296
310
  readonly issue: {
297
311
  readonly handler: (ctx: CommandContext) => Promise<string>;
298
312
  readonly description: "Ingest a GitHub issue into the swarm workflow [url] [--plan] [--trace] [--no-repro]";
@@ -71,8 +71,8 @@ export declare const ReviewEvidenceSchema: z.ZodObject<{
71
71
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
72
72
  type: z.ZodLiteral<"review">;
73
73
  risk: z.ZodEnum<{
74
- medium: "medium";
75
74
  low: "low";
75
+ medium: "medium";
76
76
  high: "high";
77
77
  critical: "critical";
78
78
  }>;
@@ -292,8 +292,8 @@ export type PlaceholderEvidence = z.infer<typeof PlaceholderEvidenceSchema>;
292
292
  export declare const SastFindingSchema: z.ZodObject<{
293
293
  rule_id: z.ZodString;
294
294
  severity: z.ZodEnum<{
295
- medium: "medium";
296
295
  low: "low";
296
+ medium: "medium";
297
297
  high: "high";
298
298
  critical: "critical";
299
299
  }>;
@@ -322,8 +322,8 @@ export declare const SastEvidenceSchema: z.ZodObject<{
322
322
  findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
323
323
  rule_id: z.ZodString;
324
324
  severity: z.ZodEnum<{
325
- medium: "medium";
326
325
  low: "low";
326
+ medium: "medium";
327
327
  high: "high";
328
328
  critical: "critical";
329
329
  }>;
@@ -350,8 +350,8 @@ export declare const SastEvidenceSchema: z.ZodObject<{
350
350
  new_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
351
351
  rule_id: z.ZodString;
352
352
  severity: z.ZodEnum<{
353
- medium: "medium";
354
353
  low: "low";
354
+ medium: "medium";
355
355
  high: "high";
356
356
  critical: "critical";
357
357
  }>;
@@ -366,8 +366,8 @@ export declare const SastEvidenceSchema: z.ZodObject<{
366
366
  pre_existing_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
367
367
  rule_id: z.ZodString;
368
368
  severity: z.ZodEnum<{
369
- medium: "medium";
370
369
  low: "low";
370
+ medium: "medium";
371
371
  high: "high";
372
372
  critical: "critical";
373
373
  }>;
@@ -527,8 +527,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
527
527
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
528
528
  type: z.ZodLiteral<"review">;
529
529
  risk: z.ZodEnum<{
530
- medium: "medium";
531
530
  low: "low";
531
+ medium: "medium";
532
532
  high: "high";
533
533
  critical: "critical";
534
534
  }>;
@@ -746,8 +746,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
746
746
  findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
747
747
  rule_id: z.ZodString;
748
748
  severity: z.ZodEnum<{
749
- medium: "medium";
750
749
  low: "low";
750
+ medium: "medium";
751
751
  high: "high";
752
752
  critical: "critical";
753
753
  }>;
@@ -774,8 +774,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
774
774
  new_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
775
775
  rule_id: z.ZodString;
776
776
  severity: z.ZodEnum<{
777
- medium: "medium";
778
777
  low: "low";
778
+ medium: "medium";
779
779
  high: "high";
780
780
  critical: "critical";
781
781
  }>;
@@ -790,8 +790,8 @@ export declare const EvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
790
790
  pre_existing_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
791
791
  rule_id: z.ZodString;
792
792
  severity: z.ZodEnum<{
793
- medium: "medium";
794
793
  low: "low";
794
+ medium: "medium";
795
795
  high: "high";
796
796
  critical: "critical";
797
797
  }>;
@@ -946,8 +946,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
946
946
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
947
947
  type: z.ZodLiteral<"review">;
948
948
  risk: z.ZodEnum<{
949
- medium: "medium";
950
949
  low: "low";
950
+ medium: "medium";
951
951
  high: "high";
952
952
  critical: "critical";
953
953
  }>;
@@ -1165,8 +1165,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1165
1165
  findings: z.ZodDefault<z.ZodArray<z.ZodObject<{
1166
1166
  rule_id: z.ZodString;
1167
1167
  severity: z.ZodEnum<{
1168
- medium: "medium";
1169
1168
  low: "low";
1169
+ medium: "medium";
1170
1170
  high: "high";
1171
1171
  critical: "critical";
1172
1172
  }>;
@@ -1193,8 +1193,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1193
1193
  new_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1194
1194
  rule_id: z.ZodString;
1195
1195
  severity: z.ZodEnum<{
1196
- medium: "medium";
1197
1196
  low: "low";
1197
+ medium: "medium";
1198
1198
  high: "high";
1199
1199
  critical: "critical";
1200
1200
  }>;
@@ -1209,8 +1209,8 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
1209
1209
  pre_existing_findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1210
1210
  rule_id: z.ZodString;
1211
1211
  severity: z.ZodEnum<{
1212
- medium: "medium";
1213
1212
  low: "low";
1213
+ medium: "medium";
1214
1214
  high: "high";
1215
1215
  critical: "critical";
1216
1216
  }>;
@@ -257,8 +257,8 @@ export declare const PhaseCompleteConfigSchema: z.ZodObject<{
257
257
  enabled: z.ZodDefault<z.ZodBoolean>;
258
258
  required_agents: z.ZodDefault<z.ZodArray<z.ZodEnum<{
259
259
  reviewer: "reviewer";
260
- coder: "coder";
261
260
  test_engineer: "test_engineer";
261
+ coder: "coder";
262
262
  }>>>;
263
263
  require_docs: z.ZodDefault<z.ZodBoolean>;
264
264
  policy: z.ZodDefault<z.ZodEnum<{
@@ -287,9 +287,9 @@ export type ReviewPassesConfig = z.infer<typeof ReviewPassesConfigSchema>;
287
287
  export declare const AdversarialDetectionConfigSchema: z.ZodObject<{
288
288
  enabled: z.ZodDefault<z.ZodBoolean>;
289
289
  policy: z.ZodDefault<z.ZodEnum<{
290
- warn: "warn";
291
290
  gate: "gate";
292
291
  ignore: "ignore";
292
+ warn: "warn";
293
293
  }>>;
294
294
  pairs: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>>;
295
295
  }, z.core.$strip>;
@@ -762,8 +762,8 @@ export declare const PluginConfigSchema: z.ZodObject<{
762
762
  enabled: z.ZodDefault<z.ZodBoolean>;
763
763
  required_agents: z.ZodDefault<z.ZodArray<z.ZodEnum<{
764
764
  reviewer: "reviewer";
765
- coder: "coder";
766
765
  test_engineer: "test_engineer";
766
+ coder: "coder";
767
767
  }>>>;
768
768
  require_docs: z.ZodDefault<z.ZodBoolean>;
769
769
  policy: z.ZodDefault<z.ZodEnum<{
@@ -949,9 +949,9 @@ export declare const PluginConfigSchema: z.ZodObject<{
949
949
  adversarial_detection: z.ZodOptional<z.ZodObject<{
950
950
  enabled: z.ZodDefault<z.ZodBoolean>;
951
951
  policy: z.ZodDefault<z.ZodEnum<{
952
- warn: "warn";
953
952
  gate: "gate";
954
953
  ignore: "ignore";
954
+ warn: "warn";
955
955
  }>>;
956
956
  pairs: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>>;
957
957
  }, z.core.$strip>>;