opencode-swarm 7.0.0-beta.1 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (541) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1265 -40
  3. package/dist/__tests__/acknowledge-spec-drift.test.d.ts +1 -0
  4. package/dist/__tests__/cli-version.adversarial.test.d.ts +1 -0
  5. package/dist/__tests__/cli-version.test.d.ts +1 -0
  6. package/dist/__tests__/conflict-resolution.test.d.ts +1 -0
  7. package/dist/__tests__/convene-general-council.test.d.ts +10 -0
  8. package/dist/__tests__/critic_drift_verifier-whitelist.test.d.ts +1 -0
  9. package/dist/__tests__/critic_hallucination_verifier-whitelist.test.d.ts +1 -0
  10. package/dist/__tests__/disagreement-detector.test.d.ts +7 -0
  11. package/dist/__tests__/evidence-lock.adversarial.test.d.ts +8 -0
  12. package/dist/__tests__/evidence-lock.test.d.ts +6 -0
  13. package/dist/__tests__/gate-evidence.adversarial.test.d.ts +7 -0
  14. package/dist/__tests__/general-council-service.test.d.ts +7 -0
  15. package/dist/__tests__/lint-spec.test.d.ts +1 -0
  16. package/dist/__tests__/preflight-phase.test.d.ts +1 -0
  17. package/dist/__tests__/qa-gate-hardening.test.d.ts +12 -0
  18. package/dist/__tests__/req-coverage.test.d.ts +1 -0
  19. package/dist/__tests__/security-adversarial.test.d.ts +1 -0
  20. package/dist/__tests__/sounding-board-parser.test.d.ts +1 -0
  21. package/dist/__tests__/spec-hash.test.d.ts +1 -0
  22. package/dist/__tests__/spec-schema.test.d.ts +1 -0
  23. package/dist/__tests__/web-search-provider.test.d.ts +6 -0
  24. package/dist/__tests__/write-drift-evidence-requirement-coverage.test.d.ts +4 -0
  25. package/dist/adversarial-tests.test.d.ts +1 -0
  26. package/dist/agents/architect-permission.adversarial.test.d.ts +5 -0
  27. package/dist/agents/architect.commands-list.adversarial.test.d.ts +1 -0
  28. package/dist/agents/architect.commands-list.test.d.ts +1 -0
  29. package/dist/agents/architect.d.ts +57 -0
  30. package/dist/agents/architect.dark-matter.test.d.ts +1 -0
  31. package/dist/agents/architect.designer-gate.test.d.ts +1 -0
  32. package/dist/agents/coder.d.ts +2 -0
  33. package/dist/agents/council-member.d.ts +30 -0
  34. package/dist/agents/council-member.test.d.ts +8 -0
  35. package/dist/agents/council-moderator.d.ts +20 -0
  36. package/dist/agents/critic.d.ts +34 -0
  37. package/dist/agents/curator-agent.d.ts +14 -0
  38. package/dist/agents/designer.d.ts +2 -0
  39. package/dist/agents/docs.d.ts +2 -0
  40. package/dist/agents/explorer-consumer-contract.test.d.ts +1 -0
  41. package/dist/agents/explorer-role-boundary.test.d.ts +1 -0
  42. package/dist/agents/explorer.d.ts +5 -0
  43. package/dist/agents/index.d.ts +52 -0
  44. package/dist/agents/reviewer.d.ts +5 -0
  45. package/dist/agents/sme.d.ts +2 -0
  46. package/dist/agents/test-engineer.adversarial.test.d.ts +5 -0
  47. package/dist/agents/test-engineer.d.ts +2 -0
  48. package/dist/agents/test-engineer.security.test.d.ts +1 -0
  49. package/dist/background/circuit-breaker.d.ts +149 -0
  50. package/dist/background/event-bus.d.ts +60 -0
  51. package/dist/background/evidence-summary-integration.d.ts +73 -0
  52. package/dist/background/index.d.ts +22 -0
  53. package/dist/background/manager.d.ts +122 -0
  54. package/dist/background/plan-sync-worker.d.ts +122 -0
  55. package/dist/background/queue.d.ts +117 -0
  56. package/dist/background/status-artifact.d.ts +115 -0
  57. package/dist/background/trigger.d.ts +179 -0
  58. package/dist/background/trigger.vulnerability.test.d.ts +1 -0
  59. package/dist/background/worker.d.ts +92 -0
  60. package/dist/cli/index.d.ts +37 -0
  61. package/dist/cli/index.js +31346 -11426
  62. package/dist/commands/acknowledge-spec-drift.d.ts +5 -0
  63. package/dist/commands/brainstorm.d.ts +13 -0
  64. package/dist/commands/brainstorm.test.d.ts +1 -0
  65. package/dist/commands/checkpoint.d.ts +5 -0
  66. package/dist/commands/close.d.ts +11 -0
  67. package/dist/commands/command-adapters.security.test.d.ts +14 -0
  68. package/dist/commands/commands.test.d.ts +1 -0
  69. package/dist/commands/config.d.ts +5 -0
  70. package/dist/commands/council.d.ts +17 -0
  71. package/dist/commands/council.test.d.ts +4 -0
  72. package/dist/commands/curate.test.d.ts +1 -0
  73. package/dist/commands/doctor.d.ts +17 -0
  74. package/dist/commands/full-auto-config-guard.test.d.ts +7 -0
  75. package/dist/commands/full-auto-discoverability.test.d.ts +8 -0
  76. package/dist/commands/full-auto-registration.test.d.ts +5 -0
  77. package/dist/commands/full-auto-sessionid.test.d.ts +5 -0
  78. package/dist/commands/full-auto.d.ts +10 -0
  79. package/dist/commands/full-auto.regression.test.d.ts +10 -0
  80. package/dist/commands/full-auto.test.d.ts +6 -0
  81. package/dist/commands/index.d.ts +50 -0
  82. package/dist/commands/index.help-text.test.d.ts +1 -0
  83. package/dist/commands/issue.d.ts +13 -0
  84. package/dist/{knowledge.d.ts → commands/knowledge.d.ts} +2 -0
  85. package/dist/commands/pr-review.d.ts +11 -0
  86. package/dist/commands/qa-gates.d.ts +15 -0
  87. package/dist/commands/qa-gates.test.d.ts +1 -0
  88. package/dist/commands/registry-documentation.test.d.ts +1 -0
  89. package/dist/commands/registry-type.test.d.ts +1 -0
  90. package/dist/commands/registry.d.ts +282 -0
  91. package/dist/commands/reset-session.d.ts +7 -0
  92. package/dist/{reset.d.ts → commands/reset.d.ts} +1 -1
  93. package/dist/commands/shortcut-routing.test.d.ts +11 -0
  94. package/dist/{sync-plan.d.ts → commands/sync-plan.d.ts} +3 -1
  95. package/dist/commands/turbo-registration.test.d.ts +5 -0
  96. package/dist/commands/turbo-sessionid.test.d.ts +5 -0
  97. package/dist/commands/turbo.regression.test.d.ts +11 -0
  98. package/dist/commands/turbo.test.d.ts +5 -0
  99. package/dist/config/agent-categories.d.ts +12 -0
  100. package/dist/config/cache-paths.d.ts +17 -0
  101. package/dist/config/constants.architect-whitelist.test.d.ts +1 -0
  102. package/dist/config/constants.d.ts +72 -0
  103. package/dist/config/evidence-schema.d.ts +1352 -0
  104. package/dist/config/index.d.ts +11 -0
  105. package/dist/{config.d.ts → config/loader.d.ts} +11 -6
  106. package/dist/config/plan-schema.d.ts +191 -0
  107. package/dist/config/schema.d.ts +1078 -0
  108. package/dist/config/spec-schema.d.ts +113 -0
  109. package/dist/context/role-filter.d.ts +27 -0
  110. package/dist/context/zone-classifier.d.ts +17 -0
  111. package/dist/council/__tests__/council-evidence-writer.adversarial.test.d.ts +6 -0
  112. package/dist/council/council-advisory.d.ts +46 -0
  113. package/dist/council/council-evidence-writer.d.ts +18 -0
  114. package/dist/council/council-service.d.ts +21 -0
  115. package/dist/council/criteria-store.d.ts +9 -0
  116. package/dist/council/disagreement-detector.d.ts +24 -0
  117. package/dist/council/general-council-advisory.d.ts +29 -0
  118. package/dist/council/general-council-service.d.ts +22 -0
  119. package/dist/council/general-council-types.d.ts +98 -0
  120. package/dist/council/types.d.ts +126 -0
  121. package/dist/council/web-search-provider.d.ts +35 -0
  122. package/dist/db/global-db.d.ts +22 -0
  123. package/dist/db/global-db.test.d.ts +7 -0
  124. package/dist/db/index.d.ts +13 -0
  125. package/dist/db/project-db.d.ts +40 -0
  126. package/dist/db/project-db.test.d.ts +4 -0
  127. package/dist/db/qa-gate-profile.d.ts +107 -0
  128. package/dist/db/qa-gate-profile.test.d.ts +4 -0
  129. package/dist/diff/__tests__/semantic-classifier.test.d.ts +1 -0
  130. package/dist/diff/__tests__/summary-generator.test.d.ts +1 -0
  131. package/dist/diff/ast-diff.d.ts +21 -0
  132. package/dist/diff/semantic-classifier.d.ts +59 -0
  133. package/dist/diff/summary-generator.d.ts +33 -0
  134. package/dist/environment/index.d.ts +3 -0
  135. package/dist/environment/profile.d.ts +50 -0
  136. package/dist/environment/prompt-renderer.d.ts +6 -0
  137. package/dist/evidence/index.d.ts +2 -0
  138. package/dist/evidence/lock.d.ts +36 -0
  139. package/dist/evidence/manager.d.ts +78 -0
  140. package/dist/gate-evidence.d.ts +69 -0
  141. package/dist/gate-evidence.test.d.ts +1 -0
  142. package/dist/git/branch.d.ts +70 -0
  143. package/dist/git/index.d.ts +22 -0
  144. package/dist/git/pr.d.ts +28 -0
  145. package/dist/graph/graph-builder.d.ts +39 -0
  146. package/dist/graph/graph-query.d.ts +42 -0
  147. package/dist/graph/graph-store.d.ts +27 -0
  148. package/dist/graph/import-extractor.d.ts +44 -0
  149. package/dist/graph/index.d.ts +16 -0
  150. package/dist/graph/symbol-extractor.d.ts +17 -0
  151. package/dist/graph/types.d.ts +84 -0
  152. package/dist/hooks/__tests__/semantic-diff-injection.test.d.ts +1 -0
  153. package/dist/hooks/adversarial-detector.d.ts +50 -0
  154. package/dist/hooks/agent-activity.d.ts +38 -0
  155. package/dist/hooks/co-change-suggester.d.ts +51 -0
  156. package/dist/hooks/compaction-customizer.d.ts +11 -0
  157. package/dist/hooks/conflict-resolution.d.ts +12 -0
  158. package/dist/hooks/context-budget.d.ts +34 -0
  159. package/dist/hooks/context-scoring.d.ts +70 -0
  160. package/dist/hooks/curator-drift-advisory.test.d.ts +1 -0
  161. package/dist/hooks/curator-drift.d.ts +30 -0
  162. package/dist/hooks/curator-llm-factory.d.ts +20 -0
  163. package/dist/hooks/curator-types.d.ts +103 -0
  164. package/dist/hooks/curator.d.ts +108 -0
  165. package/dist/hooks/dark-matter-detector.d.ts +38 -0
  166. package/dist/hooks/delegation-gate.d.ts +78 -0
  167. package/dist/hooks/delegation-gate.evidence.test.d.ts +4 -0
  168. package/dist/hooks/delegation-gate.getEvidenceTaskId.test.d.ts +20 -0
  169. package/dist/hooks/delegation-gate.plan-fallback-security.test.d.ts +13 -0
  170. package/dist/hooks/delegation-gate.plan-fallback.test.d.ts +5 -0
  171. package/dist/hooks/delegation-gate.seed-state.test.d.ts +1 -0
  172. package/dist/hooks/delegation-gate.turbo-evidence.test.d.ts +8 -0
  173. package/dist/hooks/delegation-gate.verify.test.d.ts +11 -0
  174. package/dist/hooks/delegation-ledger.d.ts +37 -0
  175. package/dist/hooks/delegation-ledger.test.d.ts +11 -0
  176. package/dist/hooks/delegation-sanitizer.d.ts +24 -0
  177. package/dist/hooks/delegation-tracker.d.ts +15 -0
  178. package/dist/hooks/diff-scope.d.ts +12 -0
  179. package/dist/hooks/diff-scope.test.d.ts +1 -0
  180. package/dist/hooks/extractors.d.ts +53 -0
  181. package/dist/hooks/full-auto-intercept.d.ts +77 -0
  182. package/dist/hooks/guardrails.d.ts +174 -0
  183. package/dist/hooks/hive-promoter.d.ts +40 -0
  184. package/dist/hooks/incremental-verify.d.ts +34 -0
  185. package/dist/hooks/incremental-verify.test.d.ts +1 -0
  186. package/dist/hooks/index.d.ts +20 -0
  187. package/dist/hooks/knowledge-curator.d.ts +27 -0
  188. package/dist/hooks/knowledge-injector.d.ts +20 -0
  189. package/dist/hooks/knowledge-migrator.d.ts +11 -0
  190. package/dist/hooks/knowledge-reader.d.ts +22 -0
  191. package/dist/hooks/knowledge-store.d.ts +30 -0
  192. package/dist/hooks/knowledge-types.d.ts +131 -0
  193. package/dist/hooks/knowledge-validator.d.ts +29 -0
  194. package/dist/hooks/loop-detector.d.ts +17 -0
  195. package/dist/hooks/loop-detector.test.d.ts +1 -0
  196. package/dist/hooks/message-priority.d.ts +105 -0
  197. package/dist/hooks/messages-transform.d.ts +13 -0
  198. package/dist/hooks/model-limits.d.ts +96 -0
  199. package/dist/hooks/normalize-tool-name.d.ts +25 -0
  200. package/dist/hooks/phase-monitor.d.ts +29 -0
  201. package/dist/hooks/pipeline-tracker.d.ts +41 -0
  202. package/dist/hooks/repo-graph-builder.d.ts +32 -0
  203. package/dist/hooks/repo-graph-injection.d.ts +45 -0
  204. package/dist/hooks/review-receipt.d.ts +189 -0
  205. package/dist/hooks/scope-guard-throw-behavior.test.d.ts +15 -0
  206. package/dist/hooks/scope-guard.adversarial.test.d.ts +1 -0
  207. package/dist/hooks/scope-guard.d.ts +43 -0
  208. package/dist/hooks/scope-guard.test.d.ts +14 -0
  209. package/dist/hooks/self-review.d.ts +14 -0
  210. package/dist/hooks/self-review.test.d.ts +14 -0
  211. package/dist/hooks/semantic-diff-injection.d.ts +24 -0
  212. package/dist/hooks/slop-detector.adversarial.test.d.ts +1 -0
  213. package/dist/hooks/slop-detector.d.ts +17 -0
  214. package/dist/hooks/slop-detector.test.d.ts +1 -0
  215. package/dist/hooks/spawn-helper.d.ts +5 -0
  216. package/dist/hooks/spawn-helper.test.d.ts +1 -0
  217. package/dist/hooks/steering-consumed.d.ts +30 -0
  218. package/dist/hooks/system-enhancer.d.ts +30 -0
  219. package/dist/hooks/tool-summarizer.d.ts +28 -0
  220. package/dist/hooks/trajectory-logger.d.ts +69 -0
  221. package/dist/hooks/utils.d.ts +20 -0
  222. package/dist/hooks/watchdog.integration.test.d.ts +9 -0
  223. package/dist/index.adversarial-bootstrap.test.d.ts +1 -0
  224. package/dist/index.bootstrap-adversarial.test.d.ts +1 -0
  225. package/dist/index.bootstrap-directory.test.d.ts +1 -0
  226. package/dist/index.d.ts +8 -1
  227. package/dist/index.js +74690 -47646
  228. package/dist/knowledge/identity.d.ts +25 -0
  229. package/dist/knowledge/index.d.ts +2 -0
  230. package/dist/lang/detector.d.ts +20 -0
  231. package/dist/lang/framework-detector.d.ts +98 -0
  232. package/dist/lang/grammars/tree-sitter-dart.wasm +0 -0
  233. package/dist/lang/grammars/tree-sitter-kotlin.wasm +0 -0
  234. package/dist/lang/grammars/tree-sitter-swift.wasm +0 -0
  235. package/dist/lang/grammars/tree-sitter.wasm +0 -0
  236. package/dist/lang/index.d.ts +4 -0
  237. package/dist/lang/profiles.d.ts +72 -0
  238. package/dist/lang/registry.d.ts +24 -0
  239. package/dist/lang/runtime.d.ts +35 -0
  240. package/dist/model-fallback.adversarial.test.d.ts +22 -0
  241. package/dist/model-fallback.test.d.ts +12 -0
  242. package/dist/mutation/__tests__/engine.adversarial.test.d.ts +1 -0
  243. package/dist/mutation/__tests__/engine.test.d.ts +1 -0
  244. package/dist/mutation/__tests__/equivalence.adversarial.test.d.ts +1 -0
  245. package/dist/mutation/__tests__/equivalence.test.d.ts +1 -0
  246. package/dist/mutation/__tests__/gate.adversarial.test.d.ts +1 -0
  247. package/dist/mutation/__tests__/gate.test.d.ts +1 -0
  248. package/dist/mutation/__tests__/generator.test.d.ts +1 -0
  249. package/dist/mutation/engine.d.ts +47 -0
  250. package/dist/mutation/equivalence.d.ts +35 -0
  251. package/dist/mutation/gate.d.ts +28 -0
  252. package/dist/mutation/generator.d.ts +16 -0
  253. package/dist/output/agent-writer.d.ts +27 -0
  254. package/dist/output/index.d.ts +1 -0
  255. package/dist/parallel/dependency-graph.d.ts +34 -0
  256. package/dist/parallel/dispatcher/index.d.ts +12 -0
  257. package/dist/parallel/dispatcher/noop-dispatcher.d.ts +18 -0
  258. package/dist/parallel/dispatcher/noop-dispatcher.test.d.ts +10 -0
  259. package/dist/parallel/dispatcher/parallel-dispatcher.d.ts +18 -0
  260. package/dist/parallel/dispatcher/types.d.ts +33 -0
  261. package/dist/parallel/file-locks.d.ts +40 -0
  262. package/dist/parallel/index.d.ts +5 -0
  263. package/dist/parallel/meta-indexer.d.ts +32 -0
  264. package/dist/parallel/review-router.d.ts +29 -0
  265. package/dist/plan/checkpoint.d.ts +25 -0
  266. package/dist/plan/checkpoint.test.d.ts +1 -0
  267. package/dist/plan/index.d.ts +1 -0
  268. package/dist/plan/ledger-integrity.test.d.ts +5 -0
  269. package/dist/plan/ledger-snapshot-adversarial.test.d.ts +1 -0
  270. package/dist/plan/ledger.d.ts +286 -0
  271. package/dist/plan/ledger.test.d.ts +1 -0
  272. package/dist/plan/manager.cas-backoff.test.d.ts +10 -0
  273. package/dist/plan/manager.d.ts +90 -0
  274. package/dist/plan/manager.ledger-aware.test.d.ts +1 -0
  275. package/dist/plan/manager.loadplan-validation-guard.test.d.ts +13 -0
  276. package/dist/plan/manager.update-task-status.test.d.ts +1 -0
  277. package/dist/plan/migration-revert.regression.test.d.ts +8 -0
  278. package/dist/prm/__tests__/course-correction.test.d.ts +1 -0
  279. package/dist/prm/__tests__/escalation-queue-drain.test.d.ts +1 -0
  280. package/dist/prm/__tests__/escalation.test.d.ts +1 -0
  281. package/dist/prm/__tests__/index.test.d.ts +1 -0
  282. package/dist/prm/__tests__/integration.test.d.ts +1 -0
  283. package/dist/prm/__tests__/pattern-detector.test.d.ts +5 -0
  284. package/dist/prm/__tests__/replay.test.d.ts +1 -0
  285. package/dist/prm/__tests__/trajectory-store.test.d.ts +7 -0
  286. package/dist/prm/course-correction.d.ts +20 -0
  287. package/dist/prm/escalation.d.ts +73 -0
  288. package/dist/prm/index.d.ts +58 -0
  289. package/dist/prm/pattern-detector.d.ts +71 -0
  290. package/dist/prm/replay.d.ts +44 -0
  291. package/dist/prm/trajectory-store.d.ts +66 -0
  292. package/dist/prm/types.d.ts +120 -0
  293. package/dist/quality/index.d.ts +1 -0
  294. package/dist/quality/metrics.d.ts +25 -0
  295. package/dist/sast/rules/c.d.ts +9 -0
  296. package/dist/sast/rules/csharp.d.ts +9 -0
  297. package/dist/sast/rules/go.d.ts +9 -0
  298. package/dist/sast/rules/index.d.ts +72 -0
  299. package/dist/sast/rules/java.d.ts +9 -0
  300. package/dist/sast/rules/javascript.d.ts +9 -0
  301. package/dist/sast/rules/php.d.ts +9 -0
  302. package/dist/sast/rules/python.d.ts +9 -0
  303. package/dist/sast/semgrep.d.ts +68 -0
  304. package/dist/sast/semgrep.test.d.ts +1 -0
  305. package/dist/sbom/cyclonedx.d.ts +101 -0
  306. package/dist/sbom/detectors/dart.d.ts +7 -0
  307. package/dist/sbom/detectors/dotnet.d.ts +7 -0
  308. package/dist/sbom/detectors/go.d.ts +7 -0
  309. package/dist/sbom/detectors/index.d.ts +53 -0
  310. package/dist/sbom/detectors/java.d.ts +7 -0
  311. package/dist/sbom/detectors/nodejs.d.ts +7 -0
  312. package/dist/sbom/detectors/python.d.ts +7 -0
  313. package/dist/sbom/detectors/rust.d.ts +7 -0
  314. package/dist/sbom/detectors/swift.d.ts +7 -0
  315. package/dist/scope/scope-persistence.d.ts +109 -0
  316. package/dist/scope/scope-persistence.test.d.ts +13 -0
  317. package/dist/services/compaction-service.d.ts +28 -0
  318. package/dist/services/compaction-service.test.d.ts +1 -0
  319. package/dist/services/config-doctor.d.ts +125 -0
  320. package/dist/services/config-doctor.security.test.d.ts +1 -0
  321. package/dist/services/config-doctor.test.d.ts +1 -0
  322. package/dist/services/context-budget-service.d.ts +101 -0
  323. package/dist/services/decision-drift-analyzer.d.ts +96 -0
  324. package/dist/services/diagnose-service.d.ts +41 -0
  325. package/dist/services/evidence-service.d.ts +65 -0
  326. package/dist/services/evidence-summary-service.d.ts +75 -0
  327. package/dist/services/export-service.d.ts +30 -0
  328. package/dist/services/handoff-service.d.ts +74 -0
  329. package/dist/services/history-service.d.ts +35 -0
  330. package/dist/services/index.d.ts +13 -0
  331. package/dist/services/plan-service.d.ts +25 -0
  332. package/dist/services/preflight-integration.d.ts +38 -0
  333. package/dist/services/preflight-service.d.ts +62 -0
  334. package/dist/services/run-memory.d.ts +66 -0
  335. package/dist/services/status-service.d.ts +35 -0
  336. package/dist/services/status-service.turbo-indicator.test.d.ts +5 -0
  337. package/dist/services/tool-doctor.d.ts +26 -0
  338. package/dist/services/tool-doctor.test.d.ts +1 -0
  339. package/dist/services/version-check.d.ts +28 -0
  340. package/dist/services/warning-buffer.d.ts +9 -0
  341. package/dist/session/snapshot-reader.d.ts +37 -0
  342. package/dist/session/snapshot-writer.d.ts +115 -0
  343. package/dist/skills/index.d.ts +30 -0
  344. package/dist/state/agent-run-context.d.ts +24 -0
  345. package/dist/state.agent-run-context.test.d.ts +10 -0
  346. package/dist/state.d.ts +501 -1
  347. package/dist/state.rehydrate.test.d.ts +1 -0
  348. package/dist/state.rehydration-adversarial.test.d.ts +1 -0
  349. package/dist/state.rehydration-integration.test.d.ts +1 -0
  350. package/dist/state.session-restart.test.d.ts +7 -0
  351. package/dist/summaries/index.d.ts +2 -0
  352. package/dist/summaries/manager.d.ts +29 -0
  353. package/dist/summaries/summarizer.d.ts +38 -0
  354. package/dist/telemetry.d.ts +59 -0
  355. package/dist/telemetry.test.d.ts +1 -0
  356. package/dist/test-impact/__tests__/analyzer-import-fix.adversarial.test.d.ts +1 -0
  357. package/dist/test-impact/__tests__/analyzer-import-fix.test.d.ts +1 -0
  358. package/dist/test-impact/__tests__/analyzer.adversarial.test.d.ts +1 -0
  359. package/dist/test-impact/__tests__/analyzer.test.d.ts +1 -0
  360. package/dist/test-impact/__tests__/council-fixes.test.d.ts +1 -0
  361. package/dist/test-impact/__tests__/failure-classifier.adversarial.test.d.ts +1 -0
  362. package/dist/test-impact/__tests__/failure-classifier.test.d.ts +1 -0
  363. package/dist/test-impact/__tests__/flaky-detector.adversarial.test.d.ts +1 -0
  364. package/dist/test-impact/__tests__/flaky-detector.test.d.ts +1 -0
  365. package/dist/test-impact/__tests__/history-store.adversarial.test.d.ts +1 -0
  366. package/dist/test-impact/__tests__/history-store.test.d.ts +1 -0
  367. package/dist/test-impact/__tests__/test-impact.adversarial.test.d.ts +1 -0
  368. package/dist/test-impact/__tests__/test-impact.test.d.ts +1 -0
  369. package/dist/test-impact/analyzer.d.ts +9 -0
  370. package/dist/test-impact/failure-classifier.d.ts +26 -0
  371. package/dist/test-impact/flaky-detector.d.ts +14 -0
  372. package/dist/test-impact/history-store.d.ts +15 -0
  373. package/dist/tools/__tests__/barrel-exports.test.d.ts +1 -0
  374. package/dist/tools/__tests__/diff-ast-fallback.test.d.ts +1 -0
  375. package/dist/tools/__tests__/diff-markdown-summary.test.d.ts +1 -0
  376. package/dist/tools/__tests__/diff-semantic.test.d.ts +1 -0
  377. package/dist/tools/__tests__/diff-summary.adversarial.test.d.ts +1 -0
  378. package/dist/tools/__tests__/diff-summary.test.d.ts +1 -0
  379. package/dist/tools/__tests__/mutation-test.adversarial.test.d.ts +1 -0
  380. package/dist/tools/__tests__/mutation-test.sourcefiles.test.d.ts +1 -0
  381. package/dist/tools/__tests__/mutation-test.test.d.ts +1 -0
  382. package/dist/tools/__tests__/test-runner-history.test.d.ts +1 -0
  383. package/dist/tools/__tests__/test-runner-impact.adversarial.test.d.ts +1 -0
  384. package/dist/tools/__tests__/test-runner-impact.test.d.ts +1 -0
  385. package/dist/tools/__tests__/test-runner-source-files.test.d.ts +1 -0
  386. package/dist/tools/barrel-export-check-gate-status.test.d.ts +6 -0
  387. package/dist/tools/batch-symbols.d.ts +24 -0
  388. package/dist/tools/batch-symbols.test.d.ts +1 -0
  389. package/dist/tools/build-check.d.ts +50 -0
  390. package/dist/tools/check-gate-status.adversarial.test.d.ts +1 -0
  391. package/dist/tools/check-gate-status.d.ts +7 -0
  392. package/dist/tools/check-gate-status.gates.test.d.ts +1 -0
  393. package/dist/tools/check-gate-status.plugin-registration.test.d.ts +1 -0
  394. package/dist/tools/checkpoint.d.ts +12 -0
  395. package/dist/tools/co-change-analyzer.d.ts +45 -0
  396. package/dist/tools/completion-verify.d.ts +25 -0
  397. package/dist/tools/complexity-hotspots.d.ts +2 -0
  398. package/dist/tools/convene-council.d.ts +53 -0
  399. package/dist/tools/convene-general-council.d.ts +25 -0
  400. package/dist/{create-tool.d.ts → tools/create-tool.d.ts} +13 -1
  401. package/dist/tools/curator-analyze.d.ts +7 -0
  402. package/dist/tools/curator-analyze.test.d.ts +1 -0
  403. package/dist/tools/declare-council-criteria.d.ts +14 -0
  404. package/dist/tools/declare-scope.d.ts +50 -0
  405. package/dist/tools/diff-summary.d.ts +12 -0
  406. package/dist/tools/diff.d.ts +24 -0
  407. package/dist/tools/doc-scan.d.ts +38 -0
  408. package/dist/tools/domain-detector.d.ts +6 -0
  409. package/dist/tools/evidence-check.d.ts +8 -0
  410. package/dist/tools/file-extractor.d.ts +9 -0
  411. package/dist/tools/generate-mutants.d.ts +15 -0
  412. package/dist/tools/get-approved-plan.d.ts +55 -0
  413. package/dist/tools/get-qa-gate-profile.d.ts +27 -0
  414. package/dist/tools/gitingest.d.ts +18 -0
  415. package/dist/tools/imports.d.ts +5 -0
  416. package/dist/tools/index.d.ts +66 -0
  417. package/dist/tools/knowledge-add.d.ts +2 -0
  418. package/dist/tools/knowledge-query.d.ts +5 -0
  419. package/dist/tools/knowledge-recall.d.ts +2 -0
  420. package/dist/tools/knowledge-remove.d.ts +2 -0
  421. package/dist/tools/knowledge-tools.integration.test.d.ts +1 -0
  422. package/dist/tools/lint-spec.d.ts +2 -0
  423. package/dist/tools/lint.d.ts +63 -0
  424. package/dist/tools/mutation-test.d.ts +2 -0
  425. package/dist/tools/mutation-test.security.test.d.ts +1 -0
  426. package/dist/tools/phase-complete.d.ts +25 -0
  427. package/dist/tools/pkg-audit.d.ts +2 -0
  428. package/dist/tools/placeholder-scan.d.ts +28 -0
  429. package/dist/tools/plugin-registration-adversarial.test.d.ts +1 -0
  430. package/dist/tools/pre-check-batch.d.ts +89 -0
  431. package/dist/tools/quality-budget.d.ts +26 -0
  432. package/dist/tools/repo-graph.d.ts +226 -0
  433. package/dist/tools/repo-map.d.ts +2 -0
  434. package/dist/tools/req-coverage.d.ts +47 -0
  435. package/dist/tools/resolve-working-directory.d.ts +35 -0
  436. package/dist/tools/resolve-working-directory.test.d.ts +1 -0
  437. package/dist/tools/retrieve-summary.d.ts +2 -0
  438. package/dist/tools/sast-baseline.d.ts +126 -0
  439. package/dist/tools/sast-scan.d.ts +87 -0
  440. package/dist/tools/save-plan.d.ts +95 -0
  441. package/dist/tools/save-plan.subdirectory-rejection.test.d.ts +1 -0
  442. package/dist/tools/sbom-generate.d.ts +26 -0
  443. package/dist/tools/schema-drift.d.ts +2 -0
  444. package/dist/tools/search.adversarial.test.d.ts +1 -0
  445. package/dist/tools/search.d.ts +29 -0
  446. package/dist/tools/search.test.d.ts +1 -0
  447. package/dist/tools/secretscan.d.ts +35 -0
  448. package/dist/tools/set-qa-gates.d.ts +40 -0
  449. package/dist/tools/suggest-patch.adversarial.test.d.ts +1 -0
  450. package/dist/tools/suggest-patch.d.ts +37 -0
  451. package/dist/tools/suggest-patch.test.d.ts +1 -0
  452. package/dist/tools/symbols.d.ts +21 -0
  453. package/dist/tools/syntax-check.d.ts +37 -0
  454. package/dist/tools/test-impact.d.ts +2 -0
  455. package/dist/tools/test-runner.d.ts +86 -0
  456. package/dist/tools/test-runner.security-adversarial.test.d.ts +5 -0
  457. package/dist/tools/todo-extract.d.ts +2 -0
  458. package/dist/tools/tool-names.d.ts +10 -0
  459. package/dist/tools/update-task-status.adversarial.test.d.ts +13 -0
  460. package/dist/tools/update-task-status.d.ts +114 -0
  461. package/dist/tools/update-task-status.gates.test.d.ts +1 -0
  462. package/dist/tools/update-task-status.test.d.ts +1 -0
  463. package/dist/tools/update-task-status.turbo-bypass.test.d.ts +1 -0
  464. package/dist/tools/verify-six-tools-registration.test.d.ts +9 -0
  465. package/dist/tools/web-search.d.ts +13 -0
  466. package/dist/tools/write-drift-evidence.d.ts +31 -0
  467. package/dist/tools/write-hallucination-evidence.d.ts +30 -0
  468. package/dist/tools/write-mutation-evidence.d.ts +34 -0
  469. package/dist/tools/write-mutation-evidence.test.d.ts +1 -0
  470. package/dist/tools/write-retro.d.ts +55 -0
  471. package/dist/transient-retry.test.d.ts +10 -0
  472. package/dist/types/delegation.d.ts +24 -0
  473. package/dist/types/events.d.ts +125 -0
  474. package/dist/utils/errors.d.ts +33 -0
  475. package/dist/utils/gitignore-warning.d.ts +17 -0
  476. package/dist/utils/index.d.ts +4 -0
  477. package/dist/utils/logger.d.ts +3 -0
  478. package/dist/utils/merge.d.ts +5 -0
  479. package/dist/utils/path-security.d.ts +36 -0
  480. package/dist/utils/regex.d.ts +30 -0
  481. package/dist/utils/spec-hash.d.ts +15 -0
  482. package/dist/utils/tool-output.d.ts +12 -0
  483. package/dist/validation/task-id.d.ts +43 -0
  484. package/package.json +21 -14
  485. package/dist/architect.d.ts +0 -7
  486. package/dist/checkpoint.d.ts +0 -7
  487. package/dist/co-change-analyzer.d.ts +0 -1
  488. package/dist/compat.d.ts +0 -12
  489. package/dist/config-doctor.d.ts +0 -1
  490. package/dist/detector.d.ts +0 -7
  491. package/dist/diagnose-service.d.ts +0 -1
  492. package/dist/doctor.d.ts +0 -5
  493. package/dist/evidence-schema.d.ts +0 -2
  494. package/dist/evidence-service.d.ts +0 -1
  495. package/dist/export-service.d.ts +0 -1
  496. package/dist/handoff-service.d.ts +0 -1
  497. package/dist/history-service.d.ts +0 -1
  498. package/dist/hive-promoter.d.ts +0 -2
  499. package/dist/knowledge-migrator.d.ts +0 -2
  500. package/dist/knowledge-store.d.ts +0 -1
  501. package/dist/knowledge-types.d.ts +0 -1
  502. package/dist/knowledge-validator.d.ts +0 -2
  503. package/dist/loader.d.ts +0 -1
  504. package/dist/manager.d.ts +0 -1
  505. package/dist/models.d.ts +0 -1
  506. package/dist/plan-service.d.ts +0 -1
  507. package/dist/preflight-service.d.ts +0 -1
  508. package/dist/profiles.d.ts +0 -7
  509. package/dist/register.d.ts +0 -36
  510. package/dist/schema.d.ts +0 -2
  511. package/dist/snapshot-writer.d.ts +0 -1
  512. package/dist/status-service.d.ts +0 -15
  513. package/dist/telemetry/src/events.d.ts +0 -308
  514. package/dist/telemetry/src/guards.d.ts +0 -14
  515. package/dist/telemetry/src/index.d.ts +0 -4
  516. package/dist/telemetry/src/version.d.ts +0 -1
  517. package/dist/utils.d.ts +0 -1
  518. package/dist/write-retro.d.ts +0 -1
  519. /package/dist/{discovery.d.ts → build/discovery.d.ts} +0 -0
  520. /package/dist/{agents.d.ts → commands/agents.d.ts} +0 -0
  521. /package/dist/{analyze.d.ts → commands/analyze.d.ts} +0 -0
  522. /package/dist/{archive.d.ts → commands/archive.d.ts} +0 -0
  523. /package/dist/{benchmark.d.ts → commands/benchmark.d.ts} +0 -0
  524. /package/dist/{clarify.d.ts → commands/clarify.d.ts} +0 -0
  525. /package/dist/{curate.d.ts → commands/curate.d.ts} +0 -0
  526. /package/dist/{dark-matter.d.ts → commands/dark-matter.d.ts} +0 -0
  527. /package/dist/{diagnose.d.ts → commands/diagnose.d.ts} +0 -0
  528. /package/dist/{evidence.d.ts → commands/evidence.d.ts} +0 -0
  529. /package/dist/{export.d.ts → commands/export.d.ts} +0 -0
  530. /package/dist/{handoff.d.ts → commands/handoff.d.ts} +0 -0
  531. /package/dist/{history.d.ts → commands/history.d.ts} +0 -0
  532. /package/dist/{plan.d.ts → commands/plan.d.ts} +0 -0
  533. /package/dist/{preflight.d.ts → commands/preflight.d.ts} +0 -0
  534. /package/dist/{promote.d.ts → commands/promote.d.ts} +0 -0
  535. /package/dist/{retrieve.d.ts → commands/retrieve.d.ts} +0 -0
  536. /package/dist/{rollback.d.ts → commands/rollback.d.ts} +0 -0
  537. /package/dist/{simulate.d.ts → commands/simulate.d.ts} +0 -0
  538. /package/dist/{specify.d.ts → commands/specify.d.ts} +0 -0
  539. /package/dist/{status.d.ts → commands/status.d.ts} +0 -0
  540. /package/dist/{turbo.d.ts → commands/turbo.d.ts} +0 -0
  541. /package/dist/{write_retro.d.ts → commands/write-retro.d.ts} +0 -0
@@ -0,0 +1,29 @@
1
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ export interface SearchMatch {
3
+ file: string;
4
+ lineNumber: number;
5
+ lineText: string;
6
+ context?: string[];
7
+ }
8
+ export interface SearchResult {
9
+ matches: SearchMatch[];
10
+ truncated: boolean;
11
+ total: number;
12
+ query: string;
13
+ mode: 'literal' | 'regex';
14
+ maxResults: number;
15
+ }
16
+ export interface SearchError {
17
+ error: true;
18
+ type: 'rg-not-found' | 'regex-timeout' | 'path-escape' | 'invalid-query' | 'unknown';
19
+ message: string;
20
+ }
21
+ export interface SearchArgs {
22
+ query: string;
23
+ mode?: 'literal' | 'regex';
24
+ include?: string;
25
+ exclude?: string;
26
+ max_results?: number;
27
+ max_lines?: number;
28
+ }
29
+ export declare const search: ToolDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ import { createSwarmTool } from './create-tool';
2
+ type SecretType = 'api_key' | 'aws_access_key' | 'aws_secret_key' | 'private_key' | 'password' | 'secret_token' | 'bearer_token' | 'basic_auth' | 'database_url' | 'jwt' | 'github_token' | 'slack_token' | 'stripe_key' | 'sendgrid_key' | 'twilio_key' | 'generic_token' | 'high_entropy';
3
+ type Confidence = 'high' | 'medium' | 'low';
4
+ type Severity = 'critical' | 'high' | 'medium' | 'low';
5
+ export interface SecretFinding {
6
+ path: string;
7
+ line: number;
8
+ type: SecretType;
9
+ confidence: Confidence;
10
+ severity: Severity;
11
+ redacted: string;
12
+ context: string;
13
+ }
14
+ export interface SecretscanResult {
15
+ scan_dir: string;
16
+ findings: SecretFinding[];
17
+ count: number;
18
+ files_scanned: number;
19
+ skipped_files: number;
20
+ message?: string;
21
+ }
22
+ export interface SecretscanErrorResult {
23
+ error: string;
24
+ scan_dir: string;
25
+ findings: [];
26
+ count: 0;
27
+ files_scanned: 0;
28
+ skipped_files: 0;
29
+ }
30
+ export declare const secretscan: ReturnType<typeof createSwarmTool>;
31
+ /**
32
+ * Run secretscan programmatically
33
+ */
34
+ export declare function runSecretscan(directory: string): Promise<SecretscanResult | SecretscanErrorResult>;
35
+ export {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Tool to configure the QA gate profile for the current plan.
3
+ *
4
+ * Architect-only: invoked during the QA GATE SELECTION phase of brainstorm
5
+ * mode (or equivalent). Ratchet-tighter only — cannot disable gates that are
6
+ * already enabled. Rejects all writes once the profile is locked.
7
+ *
8
+ * Creates the profile with defaults if missing, then applies the requested
9
+ * partial update.
10
+ */
11
+ import type { tool } from '@opencode-ai/plugin';
12
+ export interface SetQaGatesArgs {
13
+ reviewer?: boolean;
14
+ test_engineer?: boolean;
15
+ council_mode?: boolean;
16
+ sme_enabled?: boolean;
17
+ critic_pre_plan?: boolean;
18
+ hallucination_guard?: boolean;
19
+ sast_enabled?: boolean;
20
+ mutation_test?: boolean;
21
+ council_general_review?: boolean;
22
+ drift_check?: boolean;
23
+ project_type?: string;
24
+ }
25
+ interface SetQaGatesResult {
26
+ success: boolean;
27
+ reason?: string;
28
+ message?: string;
29
+ plan_id?: string;
30
+ profile?: {
31
+ plan_id: string;
32
+ gates: Record<string, boolean>;
33
+ locked_at: string | null;
34
+ locked_by_snapshot_seq: number | null;
35
+ profile_hash: string;
36
+ };
37
+ }
38
+ export declare function executeSetQaGates(args: SetQaGatesArgs, directory: string): Promise<SetQaGatesResult>;
39
+ export declare const set_qa_gates: ReturnType<typeof tool>;
40
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,37 @@
1
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ export interface PatchHunk {
3
+ file: string;
4
+ originalContext: string[];
5
+ newContent: string;
6
+ hunkIndex: number;
7
+ }
8
+ export interface PatchSuggestion {
9
+ success: true;
10
+ patches: PatchHunk[];
11
+ filesModified: string[];
12
+ errors?: PatchError[];
13
+ }
14
+ export interface PatchError {
15
+ success: false;
16
+ error: true;
17
+ type: 'context-mismatch' | 'file-not-found' | 'parse-error' | 'unknown';
18
+ message: string;
19
+ details?: {
20
+ expected?: string;
21
+ actual?: string;
22
+ location?: string;
23
+ };
24
+ errors?: PatchError[];
25
+ }
26
+ export interface ChangeDescription {
27
+ file: string;
28
+ contextBefore?: string[];
29
+ contextAfter?: string[];
30
+ oldContent?: string;
31
+ newContent: string;
32
+ }
33
+ export interface SuggestPatchArgs {
34
+ targetFiles: string[];
35
+ changes: ChangeDescription[];
36
+ }
37
+ export declare const suggestPatch: ToolDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
2
+ interface SymbolInfo {
3
+ name: string;
4
+ kind: 'function' | 'class' | 'interface' | 'type' | 'enum' | 'const' | 'variable' | 'method' | 'property';
5
+ exported: boolean;
6
+ signature: string;
7
+ line: number;
8
+ jsdoc?: string;
9
+ }
10
+ /**
11
+ * Extract symbols from a TypeScript/JavaScript file using regex-based parsing.
12
+ * Handles: export function, export const, export class, export interface,
13
+ * export type, export enum, export default, and class members.
14
+ */
15
+ export declare function extractTSSymbols(filePath: string, cwd: string): SymbolInfo[];
16
+ /**
17
+ * Extract symbols from a Python file.
18
+ */
19
+ export declare function extractPythonSymbols(filePath: string, cwd: string): SymbolInfo[];
20
+ export declare const symbols: ToolDefinition;
21
+ export {};
@@ -0,0 +1,37 @@
1
+ import type { tool } from '@opencode-ai/plugin';
2
+ import type { PluginConfig } from '../config';
3
+ import type { EvidenceVerdict } from '../config/evidence-schema';
4
+ export interface SyntaxCheckInput {
5
+ /** Files to check (from diff gate) */
6
+ changed_files: Array<{
7
+ path: string;
8
+ additions: number;
9
+ }>;
10
+ /** Check mode: 'changed' = only changed files, 'all' = all files in repo */
11
+ mode?: 'changed' | 'all';
12
+ /** Optional: restrict to specific languages */
13
+ languages?: string[];
14
+ }
15
+ export interface SyntaxCheckFileResult {
16
+ path: string;
17
+ language: string;
18
+ ok: boolean;
19
+ errors: Array<{
20
+ line: number;
21
+ column: number;
22
+ message: string;
23
+ }>;
24
+ skipped_reason?: string;
25
+ }
26
+ export interface SyntaxCheckResult {
27
+ verdict: EvidenceVerdict;
28
+ files: SyntaxCheckFileResult[];
29
+ summary: string;
30
+ }
31
+ /**
32
+ * Run syntax check on changed files
33
+ *
34
+ * Respects config.gates.syntax_check.enabled - returns skipped if disabled
35
+ */
36
+ export declare function syntaxCheck(input: SyntaxCheckInput, directory: string, config?: PluginConfig): Promise<SyntaxCheckResult>;
37
+ export declare const syntax_check: ReturnType<typeof tool>;
@@ -0,0 +1,2 @@
1
+ import { createSwarmTool } from './create-tool';
2
+ export declare const test_impact: ReturnType<typeof createSwarmTool>;
@@ -0,0 +1,86 @@
1
+ import type { tool } from '@opencode-ai/plugin';
2
+ export declare const MAX_OUTPUT_BYTES = 512000;
3
+ export declare const MAX_COMMAND_LENGTH = 500;
4
+ export declare const DEFAULT_TIMEOUT_MS = 60000;
5
+ export declare const MAX_TIMEOUT_MS = 300000;
6
+ export declare const MAX_SAFE_TEST_FILES = 50;
7
+ export declare const SUPPORTED_FRAMEWORKS: readonly ["bun", "vitest", "jest", "mocha", "pytest", "cargo", "pester", "go-test", "maven", "gradle", "dotnet-test", "ctest", "swift-test", "dart-test", "rspec", "minitest"];
8
+ export type TestFramework = (typeof SUPPORTED_FRAMEWORKS)[number] | 'none';
9
+ export interface TestRunnerArgs {
10
+ scope?: 'all' | 'convention' | 'graph' | 'impact';
11
+ files?: string[];
12
+ coverage?: boolean;
13
+ timeout_ms?: number;
14
+ allow_full_suite?: boolean;
15
+ }
16
+ export type RegressionOutcome = 'pass' | 'skip' | 'regression' | 'scope_exceeded' | 'error';
17
+ export interface TestTotals {
18
+ passed: number;
19
+ failed: number;
20
+ skipped: number;
21
+ total: number;
22
+ }
23
+ export interface TestSuccessResult {
24
+ success: true;
25
+ framework: TestFramework;
26
+ scope: 'all' | 'convention' | 'graph' | 'impact';
27
+ command: string[];
28
+ timeout_ms: number;
29
+ duration_ms: number;
30
+ totals: TestTotals;
31
+ coveragePercent?: number;
32
+ rawOutput?: string;
33
+ message?: string;
34
+ outcome?: RegressionOutcome;
35
+ }
36
+ export interface TestErrorResult {
37
+ success: false;
38
+ framework: TestFramework;
39
+ scope: 'all' | 'convention' | 'graph' | 'impact';
40
+ command?: string[];
41
+ timeout_ms?: number;
42
+ duration_ms?: number;
43
+ totals?: TestTotals;
44
+ coveragePercent?: number;
45
+ error: string;
46
+ rawOutput?: string;
47
+ message?: string;
48
+ outcome?: RegressionOutcome;
49
+ attempted_scope?: 'graph';
50
+ }
51
+ export type TestResult = TestSuccessResult | TestErrorResult;
52
+ export declare function detectTestFramework(cwd: string): Promise<TestFramework>;
53
+ /**
54
+ * Returns true when `basename` matches a language-specific test file naming
55
+ * convention that is NOT captured by the compound-extension or dot-separated
56
+ * `.test.`/`.spec.` checks above.
57
+ *
58
+ * Covered patterns (all lower-cased for comparison):
59
+ * Go : <name>_test.go (per `go test` convention)
60
+ * Python: test_<name>.py (pytest discovery default)
61
+ * <name>_test.py (pytest alternative)
62
+ * Ruby : <name>_spec.rb (RSpec convention)
63
+ * Java : Test<Name>.java (JUnit 4/5 prefix)
64
+ * <Name>Test.java (JUnit 4/5 suffix)
65
+ * <Name>Tests.java (JUnit 4/5 plural suffix)
66
+ * <Name>IT.java (Maven Failsafe integration-test suffix)
67
+ * C# : <Name>Test.cs (xUnit/NUnit/MSTest suffix)
68
+ * <Name>Tests.cs (xUnit/NUnit/MSTest plural suffix)
69
+ * Rust : test files are recognized by test-directory placement
70
+ * (for example, tests/<anything>.rs via /tests/ path detection)
71
+ * Kotlin: <Name>Test.kt / <Name>Tests.kt / Test<Name>.kt
72
+ *
73
+ * Exported for unit tests; production code uses it only through
74
+ * getTestFilesFromConvention.
75
+ */
76
+ export declare function isLanguageSpecificTestFile(basename: string): boolean;
77
+ /**
78
+ * Map source files (or already-test files) to the test files that should be
79
+ * run for them. Handles any language whose test files follow a naming convention
80
+ * — TS/JS, Go, Python, Ruby, Java, C#, Kotlin, PowerShell.
81
+ *
82
+ * Exported for unit tests.
83
+ */
84
+ export declare function getTestFilesFromConvention(sourceFiles: string[], workingDir?: string): string[];
85
+ export declare function runTests(framework: TestFramework, scope: 'all' | 'convention' | 'graph' | 'impact', files: string[], coverage: boolean, timeout_ms: number, cwd: string): Promise<TestResult>;
86
+ export declare const test_runner: ReturnType<typeof tool>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * ADVERSARIAL SECURITY TESTS FOR test-runner.ts
3
+ * Testing ONLY attack vectors - identifies which inputs are REJECTED vs ACCEPTED
4
+ */
5
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { tool } from '@opencode-ai/plugin';
2
+ export declare const todo_extract: ReturnType<typeof tool>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Central registry of all tool names used by the swarm.
3
+ * Used for constants and agent setup references.
4
+ */
5
+ /** Union type of all valid tool names */
6
+ export type ToolName = 'diff' | 'diff_summary' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | 'submit_council_verdicts' | 'declare_council_criteria' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'test_impact' | 'mutation_test' | 'generate_mutants' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'lint_spec' | 'write_retro' | 'write_drift_evidence' | 'write_hallucination_evidence' | 'write_mutation_evidence' | 'declare_scope' | 'knowledge_query' | 'doc_scan' | 'doc_extract' | 'curator_analyze' | 'knowledge_add' | 'knowledge_recall' | 'knowledge_remove' | 'co_change_analyzer' | 'search' | 'batch_symbols' | 'suggest_patch' | 'req_coverage' | 'get_approved_plan' | 'repo_map' | 'get_qa_gate_profile' | 'set_qa_gates' | 'web_search' | 'convene_general_council';
7
+ /** Readonly array of all tool names */
8
+ export declare const TOOL_NAMES: readonly ToolName[];
9
+ /** Set for O(1) tool name validation */
10
+ export declare const TOOL_NAME_SET: ReadonlySet<ToolName>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * ADVERSARIAL SECURITY TESTS for src/tools/update-task-status.ts
3
+ *
4
+ * Tests attack vectors against the fallbackDir parameter which bypasses
5
+ * the working_directory validation guards.
6
+ *
7
+ * Attack vectors tested:
8
+ * 1. Null byte injection in fallbackDir
9
+ * 2. Path traversal sequences (../../etc) in fallbackDir
10
+ * 3. Empty string fallbackDir (falsy check edge case)
11
+ * 4. Command injection via path.join with malicious fallbackDir
12
+ */
13
+ export {};
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Update task status tool for changing the status of individual tasks in a plan.
3
+ * Allows agents to mark tasks as pending, in_progress, completed, or blocked.
4
+ */
5
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
6
+ /**
7
+ * Arguments for the update_task_status tool
8
+ */
9
+ export interface UpdateTaskStatusArgs {
10
+ task_id: string;
11
+ status: string;
12
+ working_directory?: string;
13
+ }
14
+ /**
15
+ * Result from executing update_task_status
16
+ */
17
+ export interface UpdateTaskStatusResult {
18
+ success: boolean;
19
+ message: string;
20
+ task_id?: string;
21
+ new_status?: string;
22
+ current_phase?: number;
23
+ errors?: string[];
24
+ /** Present when the call failed due to lock contention. Instructs the caller to retry. */
25
+ recovery_guidance?: string;
26
+ }
27
+ /**
28
+ * Validate that the status is one of the allowed values.
29
+ * @param status - The status to validate
30
+ * @returns Error message if invalid, undefined if valid
31
+ */
32
+ export declare function validateStatus(status: string): string | undefined;
33
+ /**
34
+ * Validate that task_id matches the required format (N.M or N.M.P).
35
+ * @param taskId - The task ID to validate
36
+ * @returns Error message if invalid, undefined if valid
37
+ */
38
+ export declare function validateTaskId(taskId: string): string | undefined;
39
+ /**
40
+ * Result from checking reviewer gate presence
41
+ */
42
+ export interface ReviewerGateResult {
43
+ blocked: boolean;
44
+ reason: string;
45
+ }
46
+ /**
47
+ * Check if a task has passed required QA gates using the state machine.
48
+ * Requires the task to be in 'tests_run' or 'complete' state, which means
49
+ * both reviewer delegation and test_engineer runs have been recorded.
50
+ * @param taskId - The task ID to check gate state for
51
+ * @param workingDirectory - Optional working directory for plan.json fallback
52
+ * @param stageBParallelEnabled - When true, also accept both-markers-present as passing (PR 2 barrier)
53
+ * @returns ReviewerGateResult indicating whether the gate is blocked
54
+ */
55
+ export declare function checkReviewerGate(taskId: string, workingDirectory?: string, stageBParallelEnabled?: boolean): ReviewerGateResult;
56
+ /**
57
+ * Wrapper around checkReviewerGate that appends a diff-scope advisory warning.
58
+ * Keeps checkReviewerGate synchronous for backward compatibility.
59
+ * Also resolves the PR 2 stageB.parallel.enabled flag from config.
60
+ * @param taskId - The task ID to check gate state for
61
+ * @param workingDirectory - Optional working directory for plan.json fallback
62
+ * @returns ReviewerGateResult with optional scope warning appended to reason
63
+ */
64
+ export declare function checkReviewerGateWithScope(taskId: string, workingDirectory?: string): Promise<ReviewerGateResult>;
65
+ /**
66
+ * Recovery mechanism: reconcile task state with delegation history.
67
+ * When reviewer/test_engineer delegations occurred but the state machine
68
+ * was not advanced (e.g., toolAfter didn't fire, subagent_type missing,
69
+ * cross-session gaps, or pure verification tasks without coder delegation),
70
+ * this function walks all delegation chains and advances the task state
71
+ * so that checkReviewerGate can make an accurate decision.
72
+ *
73
+ * @param taskId - The task ID to recover state for
74
+ */
75
+ export declare function recoverTaskStateFromDelegations(taskId: string): void;
76
+ /**
77
+ * Result of the council-gate check used when transitioning to 'completed'.
78
+ *
79
+ * - When council.enabled is false, {blocked:false} is always returned (no regression).
80
+ * - When council.enabled is true, requires evidence.gates.council to exist and
81
+ * its verdict to be APPROVE or CONCERNS. A missing gate or REJECT verdict blocks.
82
+ */
83
+ export interface CouncilGateResult {
84
+ blocked: boolean;
85
+ reason: string;
86
+ }
87
+ /**
88
+ * Check the council gate for a completion transition. Pure — reads config and
89
+ * evidence only, no state mutation. Exported for focused unit testing.
90
+ *
91
+ * AND semantics (mirrors isCouncilGateActive in state.ts): the gate only
92
+ * activates when BOTH pluginConfig.council.enabled === true AND the QA gate
93
+ * profile for this plan has council_mode === true. When council.enabled is
94
+ * true but council_mode is false (or the profile is absent), the gate is
95
+ * treated as inactive — the operator has disabled it at the profile level.
96
+ *
97
+ * @param workingDirectory - Validated project root (contains .swarm/evidence/)
98
+ * @param taskId - Task ID in N.M or N.M.P format
99
+ */
100
+ export declare function checkCouncilGate(workingDirectory: string, taskId: string): CouncilGateResult;
101
+ /**
102
+ * Execute the update_task_status tool.
103
+ * Validates the task_id and status, then updates the task status in the plan.
104
+ * Uses file locking on plan.json to prevent concurrent writes from corrupting the plan.
105
+ * Only one concurrent call wins the lock; others return success: false with recovery_guidance: "retry".
106
+ * @param args - The update task status arguments
107
+ * @param fallbackDir - Fallback working directory if args.working_directory is not provided
108
+ * @returns UpdateTaskStatusResult with success status and details
109
+ */
110
+ export declare function executeUpdateTaskStatus(args: UpdateTaskStatusArgs, fallbackDir?: string): Promise<UpdateTaskStatusResult>;
111
+ /**
112
+ * Tool definition for update_task_status
113
+ */
114
+ export declare const update_task_status: ToolDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Verification tests for the 6 registered tools
3
+ *
4
+ * Verifies:
5
+ * 1. All 6 tools can be imported from './tools/index.ts'
6
+ * 2. The tool: {} block in src/index.ts includes all 6 tools
7
+ * 3. The plugin can load without errors
8
+ */
9
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * web_search tool — restricted to council_member agents.
3
+ *
4
+ * Thin wrapper around `src/council/web-search-provider.ts`. Returns structured
5
+ * results on success and structured errors on failure (never throws). Config-
6
+ * gated on `council.general.enabled`. The provider itself surfaces missing-key
7
+ * configuration via WebSearchConfigError, which this tool maps to a structured
8
+ * `success: false` response.
9
+ *
10
+ * Hard cap on max_results = 10 (clamped silently). Default sourced from council.general.maxSourcesPerMember.
11
+ */
12
+ import type { tool } from '@opencode-ai/plugin';
13
+ export declare const web_search: ReturnType<typeof tool>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Write drift evidence tool for persisting drift verification results.
3
+ * Accepts phase, verdict, and summary from the Architect and writes
4
+ * a gate-contract formatted evidence file.
5
+ */
6
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
7
+ /**
8
+ * Arguments for the write_drift_evidence tool
9
+ */
10
+ export interface WriteDriftEvidenceArgs {
11
+ /** The phase number for the drift verification */
12
+ phase: number;
13
+ /** Verdict of the drift verification: 'APPROVED' or 'NEEDS_REVISION' */
14
+ verdict: 'APPROVED' | 'NEEDS_REVISION';
15
+ /** Human-readable summary of the drift verification */
16
+ summary: string;
17
+ /** Requirement coverage report from req_coverage tool */
18
+ requirementCoverage?: string;
19
+ }
20
+ /**
21
+ * Execute the write_drift_evidence tool.
22
+ * Validates input, builds a gate-contract entry, and writes to disk.
23
+ * @param args - The write drift evidence arguments
24
+ * @param directory - Working directory
25
+ * @returns JSON string with success status and details
26
+ */
27
+ export declare function executeWriteDriftEvidence(args: WriteDriftEvidenceArgs, directory: string): Promise<string>;
28
+ /**
29
+ * Tool definition for write_drift_evidence
30
+ */
31
+ export declare const write_drift_evidence: ToolDefinition;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Write hallucination evidence tool for persisting hallucination verification results.
3
+ * Accepts phase, verdict, and summary from the Architect and writes
4
+ * a gate-contract formatted evidence file.
5
+ *
6
+ * Unlike write_drift_evidence, this tool does NOT lock the QA gate profile or
7
+ * write a plan snapshot — those side-effects belong to drift verification only.
8
+ */
9
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
10
+ /**
11
+ * Arguments for the write_hallucination_evidence tool
12
+ */
13
+ export interface WriteHallucinationEvidenceArgs {
14
+ /** The phase number for the hallucination verification */
15
+ phase: number;
16
+ /** Verdict of the hallucination verification: 'APPROVED' or 'NEEDS_REVISION' */
17
+ verdict: 'APPROVED' | 'NEEDS_REVISION';
18
+ /** Human-readable summary of the hallucination verification */
19
+ summary: string;
20
+ /** Optional bullet list of FABRICATED/DRIFTED/UNSUPPORTED/BROKEN findings */
21
+ findings?: string;
22
+ }
23
+ /**
24
+ * Execute the write_hallucination_evidence tool.
25
+ */
26
+ export declare function executeWriteHallucinationEvidence(args: WriteHallucinationEvidenceArgs, directory: string): Promise<string>;
27
+ /**
28
+ * Tool definition for write_hallucination_evidence
29
+ */
30
+ export declare const write_hallucination_evidence: ToolDefinition;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Write mutation evidence tool for persisting mutation testing gate results.
3
+ * Accepts phase, verdict, killRate, adjustedKillRate, and summary from the Architect
4
+ * and writes a gate-contract formatted evidence file.
5
+ *
6
+ * Unlike write_drift_evidence, this tool does NOT lock the QA gate profile or
7
+ * write a plan snapshot — those side-effects belong to drift verification only.
8
+ */
9
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
10
+ /**
11
+ * Arguments for the write_mutation_evidence tool
12
+ */
13
+ export interface WriteMutationEvidenceArgs {
14
+ /** The phase number for the mutation gate */
15
+ phase: number;
16
+ /** Verdict of the mutation gate: 'PASS', 'WARN', 'FAIL', or 'SKIP' */
17
+ verdict: 'PASS' | 'WARN' | 'FAIL' | 'SKIP';
18
+ /** The raw kill rate (e.g., 0.85) */
19
+ killRate?: number;
20
+ /** The adjusted kill rate accounting for timeout survived mutants (e.g., 0.87) */
21
+ adjustedKillRate?: number;
22
+ /** Human-readable summary of the mutation gate result */
23
+ summary: string;
24
+ /** Optional JSON-serialized list of survived mutants */
25
+ survivedMutants?: string;
26
+ }
27
+ /**
28
+ * Execute the write_mutation_evidence tool.
29
+ */
30
+ export declare function executeWriteMutationEvidence(args: WriteMutationEvidenceArgs, directory: string): Promise<string>;
31
+ /**
32
+ * Tool definition for write_mutation_evidence
33
+ */
34
+ export declare const write_mutation_evidence: ToolDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Write retro tool for persisting retrospective evidence bundles.
3
+ * Accepts flat retro fields from the Architect and wraps them correctly
4
+ * in a RetrospectiveEvidence entry before calling saveEvidence().
5
+ * This fixes the bug where Architect was writing flat JSON that failed EvidenceBundleSchema.parse().
6
+ */
7
+ import type { ToolDefinition } from '@opencode-ai/plugin/tool';
8
+ /**
9
+ * Arguments for the write_retro tool
10
+ * User-supplied fields (the Architect provides these)
11
+ */
12
+ export interface WriteRetroArgs {
13
+ /** The phase number being completed (maps to phase_number in schema) */
14
+ phase: number;
15
+ /** Human-readable phase summary (maps to summary in BaseEvidenceSchema) */
16
+ summary: string;
17
+ /** Count of tasks completed */
18
+ task_count: number;
19
+ /** Task complexity level */
20
+ task_complexity: 'trivial' | 'simple' | 'moderate' | 'complex';
21
+ /** Total number of tool calls in the phase */
22
+ total_tool_calls: number;
23
+ /** Number of coder revisions made */
24
+ coder_revisions: number;
25
+ /** Number of reviewer rejections received */
26
+ reviewer_rejections: number;
27
+ loop_detections?: number;
28
+ circuit_breaker_trips?: number;
29
+ /** Number of test failures encountered */
30
+ test_failures: number;
31
+ /** Number of security findings */
32
+ security_findings: number;
33
+ /** Number of integration issues */
34
+ integration_issues: number;
35
+ /** Optional lessons learned (max 5) */
36
+ lessons_learned?: string[];
37
+ /** Optional top rejection reasons */
38
+ top_rejection_reasons?: string[];
39
+ /** Optional task ID (defaults to retro-{phase}) */
40
+ task_id?: string;
41
+ /** Optional metadata */
42
+ metadata?: Record<string, unknown>;
43
+ }
44
+ /**
45
+ * Execute the write_retro tool.
46
+ * Validates input, builds a RetrospectiveEvidence entry, and saves to disk.
47
+ * @param args - The write retro arguments
48
+ * @param directory - Working directory
49
+ * @returns JSON string with success status and details
50
+ */
51
+ export declare function executeWriteRetro(args: WriteRetroArgs, directory: string): Promise<string>;
52
+ /**
53
+ * Tool definition for write_retro
54
+ */
55
+ export declare const write_retro: ToolDefinition;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Regression tests for Issue #691 — transient LLM error continuation (v6.34)
3
+ *
4
+ * Covers:
5
+ * 1. TRANSIENT_MODEL_ERROR_PATTERN regex (529 addition and pre-existing terms)
6
+ * 2. GuardrailsConfigSchema and GuardrailsProfileSchema max_transient_retries field
7
+ * 3. InvocationWindow.transientRetryCount initialization via beginInvocation
8
+ * 4. transientRetryCount resets at the start of each new invocation window
9
+ */
10
+ export {};