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.
- package/LICENSE +21 -0
- package/README.md +1265 -40
- package/dist/__tests__/acknowledge-spec-drift.test.d.ts +1 -0
- package/dist/__tests__/cli-version.adversarial.test.d.ts +1 -0
- package/dist/__tests__/cli-version.test.d.ts +1 -0
- package/dist/__tests__/conflict-resolution.test.d.ts +1 -0
- package/dist/__tests__/convene-general-council.test.d.ts +10 -0
- package/dist/__tests__/critic_drift_verifier-whitelist.test.d.ts +1 -0
- package/dist/__tests__/critic_hallucination_verifier-whitelist.test.d.ts +1 -0
- package/dist/__tests__/disagreement-detector.test.d.ts +7 -0
- package/dist/__tests__/evidence-lock.adversarial.test.d.ts +8 -0
- package/dist/__tests__/evidence-lock.test.d.ts +6 -0
- package/dist/__tests__/gate-evidence.adversarial.test.d.ts +7 -0
- package/dist/__tests__/general-council-service.test.d.ts +7 -0
- package/dist/__tests__/lint-spec.test.d.ts +1 -0
- package/dist/__tests__/preflight-phase.test.d.ts +1 -0
- package/dist/__tests__/qa-gate-hardening.test.d.ts +12 -0
- package/dist/__tests__/req-coverage.test.d.ts +1 -0
- package/dist/__tests__/security-adversarial.test.d.ts +1 -0
- package/dist/__tests__/sounding-board-parser.test.d.ts +1 -0
- package/dist/__tests__/spec-hash.test.d.ts +1 -0
- package/dist/__tests__/spec-schema.test.d.ts +1 -0
- package/dist/__tests__/web-search-provider.test.d.ts +6 -0
- package/dist/__tests__/write-drift-evidence-requirement-coverage.test.d.ts +4 -0
- package/dist/adversarial-tests.test.d.ts +1 -0
- package/dist/agents/architect-permission.adversarial.test.d.ts +5 -0
- package/dist/agents/architect.commands-list.adversarial.test.d.ts +1 -0
- package/dist/agents/architect.commands-list.test.d.ts +1 -0
- package/dist/agents/architect.d.ts +57 -0
- package/dist/agents/architect.dark-matter.test.d.ts +1 -0
- package/dist/agents/architect.designer-gate.test.d.ts +1 -0
- package/dist/agents/coder.d.ts +2 -0
- package/dist/agents/council-member.d.ts +30 -0
- package/dist/agents/council-member.test.d.ts +8 -0
- package/dist/agents/council-moderator.d.ts +20 -0
- package/dist/agents/critic.d.ts +34 -0
- package/dist/agents/curator-agent.d.ts +14 -0
- package/dist/agents/designer.d.ts +2 -0
- package/dist/agents/docs.d.ts +2 -0
- package/dist/agents/explorer-consumer-contract.test.d.ts +1 -0
- package/dist/agents/explorer-role-boundary.test.d.ts +1 -0
- package/dist/agents/explorer.d.ts +5 -0
- package/dist/agents/index.d.ts +52 -0
- package/dist/agents/reviewer.d.ts +5 -0
- package/dist/agents/sme.d.ts +2 -0
- package/dist/agents/test-engineer.adversarial.test.d.ts +5 -0
- package/dist/agents/test-engineer.d.ts +2 -0
- package/dist/agents/test-engineer.security.test.d.ts +1 -0
- package/dist/background/circuit-breaker.d.ts +149 -0
- package/dist/background/event-bus.d.ts +60 -0
- package/dist/background/evidence-summary-integration.d.ts +73 -0
- package/dist/background/index.d.ts +22 -0
- package/dist/background/manager.d.ts +122 -0
- package/dist/background/plan-sync-worker.d.ts +122 -0
- package/dist/background/queue.d.ts +117 -0
- package/dist/background/status-artifact.d.ts +115 -0
- package/dist/background/trigger.d.ts +179 -0
- package/dist/background/trigger.vulnerability.test.d.ts +1 -0
- package/dist/background/worker.d.ts +92 -0
- package/dist/cli/index.d.ts +37 -0
- package/dist/cli/index.js +31346 -11426
- package/dist/commands/acknowledge-spec-drift.d.ts +5 -0
- package/dist/commands/brainstorm.d.ts +13 -0
- package/dist/commands/brainstorm.test.d.ts +1 -0
- package/dist/commands/checkpoint.d.ts +5 -0
- package/dist/commands/close.d.ts +11 -0
- package/dist/commands/command-adapters.security.test.d.ts +14 -0
- package/dist/commands/commands.test.d.ts +1 -0
- package/dist/commands/config.d.ts +5 -0
- package/dist/commands/council.d.ts +17 -0
- package/dist/commands/council.test.d.ts +4 -0
- package/dist/commands/curate.test.d.ts +1 -0
- package/dist/commands/doctor.d.ts +17 -0
- package/dist/commands/full-auto-config-guard.test.d.ts +7 -0
- package/dist/commands/full-auto-discoverability.test.d.ts +8 -0
- package/dist/commands/full-auto-registration.test.d.ts +5 -0
- package/dist/commands/full-auto-sessionid.test.d.ts +5 -0
- package/dist/commands/full-auto.d.ts +10 -0
- package/dist/commands/full-auto.regression.test.d.ts +10 -0
- package/dist/commands/full-auto.test.d.ts +6 -0
- package/dist/commands/index.d.ts +50 -0
- package/dist/commands/index.help-text.test.d.ts +1 -0
- package/dist/commands/issue.d.ts +13 -0
- package/dist/{knowledge.d.ts → commands/knowledge.d.ts} +2 -0
- package/dist/commands/pr-review.d.ts +11 -0
- package/dist/commands/qa-gates.d.ts +15 -0
- package/dist/commands/qa-gates.test.d.ts +1 -0
- package/dist/commands/registry-documentation.test.d.ts +1 -0
- package/dist/commands/registry-type.test.d.ts +1 -0
- package/dist/commands/registry.d.ts +282 -0
- package/dist/commands/reset-session.d.ts +7 -0
- package/dist/{reset.d.ts → commands/reset.d.ts} +1 -1
- package/dist/commands/shortcut-routing.test.d.ts +11 -0
- package/dist/{sync-plan.d.ts → commands/sync-plan.d.ts} +3 -1
- package/dist/commands/turbo-registration.test.d.ts +5 -0
- package/dist/commands/turbo-sessionid.test.d.ts +5 -0
- package/dist/commands/turbo.regression.test.d.ts +11 -0
- package/dist/commands/turbo.test.d.ts +5 -0
- package/dist/config/agent-categories.d.ts +12 -0
- package/dist/config/cache-paths.d.ts +17 -0
- package/dist/config/constants.architect-whitelist.test.d.ts +1 -0
- package/dist/config/constants.d.ts +72 -0
- package/dist/config/evidence-schema.d.ts +1352 -0
- package/dist/config/index.d.ts +11 -0
- package/dist/{config.d.ts → config/loader.d.ts} +11 -6
- package/dist/config/plan-schema.d.ts +191 -0
- package/dist/config/schema.d.ts +1078 -0
- package/dist/config/spec-schema.d.ts +113 -0
- package/dist/context/role-filter.d.ts +27 -0
- package/dist/context/zone-classifier.d.ts +17 -0
- package/dist/council/__tests__/council-evidence-writer.adversarial.test.d.ts +6 -0
- package/dist/council/council-advisory.d.ts +46 -0
- package/dist/council/council-evidence-writer.d.ts +18 -0
- package/dist/council/council-service.d.ts +21 -0
- package/dist/council/criteria-store.d.ts +9 -0
- package/dist/council/disagreement-detector.d.ts +24 -0
- package/dist/council/general-council-advisory.d.ts +29 -0
- package/dist/council/general-council-service.d.ts +22 -0
- package/dist/council/general-council-types.d.ts +98 -0
- package/dist/council/types.d.ts +126 -0
- package/dist/council/web-search-provider.d.ts +35 -0
- package/dist/db/global-db.d.ts +22 -0
- package/dist/db/global-db.test.d.ts +7 -0
- package/dist/db/index.d.ts +13 -0
- package/dist/db/project-db.d.ts +40 -0
- package/dist/db/project-db.test.d.ts +4 -0
- package/dist/db/qa-gate-profile.d.ts +107 -0
- package/dist/db/qa-gate-profile.test.d.ts +4 -0
- package/dist/diff/__tests__/semantic-classifier.test.d.ts +1 -0
- package/dist/diff/__tests__/summary-generator.test.d.ts +1 -0
- package/dist/diff/ast-diff.d.ts +21 -0
- package/dist/diff/semantic-classifier.d.ts +59 -0
- package/dist/diff/summary-generator.d.ts +33 -0
- package/dist/environment/index.d.ts +3 -0
- package/dist/environment/profile.d.ts +50 -0
- package/dist/environment/prompt-renderer.d.ts +6 -0
- package/dist/evidence/index.d.ts +2 -0
- package/dist/evidence/lock.d.ts +36 -0
- package/dist/evidence/manager.d.ts +78 -0
- package/dist/gate-evidence.d.ts +69 -0
- package/dist/gate-evidence.test.d.ts +1 -0
- package/dist/git/branch.d.ts +70 -0
- package/dist/git/index.d.ts +22 -0
- package/dist/git/pr.d.ts +28 -0
- package/dist/graph/graph-builder.d.ts +39 -0
- package/dist/graph/graph-query.d.ts +42 -0
- package/dist/graph/graph-store.d.ts +27 -0
- package/dist/graph/import-extractor.d.ts +44 -0
- package/dist/graph/index.d.ts +16 -0
- package/dist/graph/symbol-extractor.d.ts +17 -0
- package/dist/graph/types.d.ts +84 -0
- package/dist/hooks/__tests__/semantic-diff-injection.test.d.ts +1 -0
- package/dist/hooks/adversarial-detector.d.ts +50 -0
- package/dist/hooks/agent-activity.d.ts +38 -0
- package/dist/hooks/co-change-suggester.d.ts +51 -0
- package/dist/hooks/compaction-customizer.d.ts +11 -0
- package/dist/hooks/conflict-resolution.d.ts +12 -0
- package/dist/hooks/context-budget.d.ts +34 -0
- package/dist/hooks/context-scoring.d.ts +70 -0
- package/dist/hooks/curator-drift-advisory.test.d.ts +1 -0
- package/dist/hooks/curator-drift.d.ts +30 -0
- package/dist/hooks/curator-llm-factory.d.ts +20 -0
- package/dist/hooks/curator-types.d.ts +103 -0
- package/dist/hooks/curator.d.ts +108 -0
- package/dist/hooks/dark-matter-detector.d.ts +38 -0
- package/dist/hooks/delegation-gate.d.ts +78 -0
- package/dist/hooks/delegation-gate.evidence.test.d.ts +4 -0
- package/dist/hooks/delegation-gate.getEvidenceTaskId.test.d.ts +20 -0
- package/dist/hooks/delegation-gate.plan-fallback-security.test.d.ts +13 -0
- package/dist/hooks/delegation-gate.plan-fallback.test.d.ts +5 -0
- package/dist/hooks/delegation-gate.seed-state.test.d.ts +1 -0
- package/dist/hooks/delegation-gate.turbo-evidence.test.d.ts +8 -0
- package/dist/hooks/delegation-gate.verify.test.d.ts +11 -0
- package/dist/hooks/delegation-ledger.d.ts +37 -0
- package/dist/hooks/delegation-ledger.test.d.ts +11 -0
- package/dist/hooks/delegation-sanitizer.d.ts +24 -0
- package/dist/hooks/delegation-tracker.d.ts +15 -0
- package/dist/hooks/diff-scope.d.ts +12 -0
- package/dist/hooks/diff-scope.test.d.ts +1 -0
- package/dist/hooks/extractors.d.ts +53 -0
- package/dist/hooks/full-auto-intercept.d.ts +77 -0
- package/dist/hooks/guardrails.d.ts +174 -0
- package/dist/hooks/hive-promoter.d.ts +40 -0
- package/dist/hooks/incremental-verify.d.ts +34 -0
- package/dist/hooks/incremental-verify.test.d.ts +1 -0
- package/dist/hooks/index.d.ts +20 -0
- package/dist/hooks/knowledge-curator.d.ts +27 -0
- package/dist/hooks/knowledge-injector.d.ts +20 -0
- package/dist/hooks/knowledge-migrator.d.ts +11 -0
- package/dist/hooks/knowledge-reader.d.ts +22 -0
- package/dist/hooks/knowledge-store.d.ts +30 -0
- package/dist/hooks/knowledge-types.d.ts +131 -0
- package/dist/hooks/knowledge-validator.d.ts +29 -0
- package/dist/hooks/loop-detector.d.ts +17 -0
- package/dist/hooks/loop-detector.test.d.ts +1 -0
- package/dist/hooks/message-priority.d.ts +105 -0
- package/dist/hooks/messages-transform.d.ts +13 -0
- package/dist/hooks/model-limits.d.ts +96 -0
- package/dist/hooks/normalize-tool-name.d.ts +25 -0
- package/dist/hooks/phase-monitor.d.ts +29 -0
- package/dist/hooks/pipeline-tracker.d.ts +41 -0
- package/dist/hooks/repo-graph-builder.d.ts +32 -0
- package/dist/hooks/repo-graph-injection.d.ts +45 -0
- package/dist/hooks/review-receipt.d.ts +189 -0
- package/dist/hooks/scope-guard-throw-behavior.test.d.ts +15 -0
- package/dist/hooks/scope-guard.adversarial.test.d.ts +1 -0
- package/dist/hooks/scope-guard.d.ts +43 -0
- package/dist/hooks/scope-guard.test.d.ts +14 -0
- package/dist/hooks/self-review.d.ts +14 -0
- package/dist/hooks/self-review.test.d.ts +14 -0
- package/dist/hooks/semantic-diff-injection.d.ts +24 -0
- package/dist/hooks/slop-detector.adversarial.test.d.ts +1 -0
- package/dist/hooks/slop-detector.d.ts +17 -0
- package/dist/hooks/slop-detector.test.d.ts +1 -0
- package/dist/hooks/spawn-helper.d.ts +5 -0
- package/dist/hooks/spawn-helper.test.d.ts +1 -0
- package/dist/hooks/steering-consumed.d.ts +30 -0
- package/dist/hooks/system-enhancer.d.ts +30 -0
- package/dist/hooks/tool-summarizer.d.ts +28 -0
- package/dist/hooks/trajectory-logger.d.ts +69 -0
- package/dist/hooks/utils.d.ts +20 -0
- package/dist/hooks/watchdog.integration.test.d.ts +9 -0
- package/dist/index.adversarial-bootstrap.test.d.ts +1 -0
- package/dist/index.bootstrap-adversarial.test.d.ts +1 -0
- package/dist/index.bootstrap-directory.test.d.ts +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +74690 -47646
- package/dist/knowledge/identity.d.ts +25 -0
- package/dist/knowledge/index.d.ts +2 -0
- package/dist/lang/detector.d.ts +20 -0
- package/dist/lang/framework-detector.d.ts +98 -0
- package/dist/lang/grammars/tree-sitter-dart.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-kotlin.wasm +0 -0
- package/dist/lang/grammars/tree-sitter-swift.wasm +0 -0
- package/dist/lang/grammars/tree-sitter.wasm +0 -0
- package/dist/lang/index.d.ts +4 -0
- package/dist/lang/profiles.d.ts +72 -0
- package/dist/lang/registry.d.ts +24 -0
- package/dist/lang/runtime.d.ts +35 -0
- package/dist/model-fallback.adversarial.test.d.ts +22 -0
- package/dist/model-fallback.test.d.ts +12 -0
- package/dist/mutation/__tests__/engine.adversarial.test.d.ts +1 -0
- package/dist/mutation/__tests__/engine.test.d.ts +1 -0
- package/dist/mutation/__tests__/equivalence.adversarial.test.d.ts +1 -0
- package/dist/mutation/__tests__/equivalence.test.d.ts +1 -0
- package/dist/mutation/__tests__/gate.adversarial.test.d.ts +1 -0
- package/dist/mutation/__tests__/gate.test.d.ts +1 -0
- package/dist/mutation/__tests__/generator.test.d.ts +1 -0
- package/dist/mutation/engine.d.ts +47 -0
- package/dist/mutation/equivalence.d.ts +35 -0
- package/dist/mutation/gate.d.ts +28 -0
- package/dist/mutation/generator.d.ts +16 -0
- package/dist/output/agent-writer.d.ts +27 -0
- package/dist/output/index.d.ts +1 -0
- package/dist/parallel/dependency-graph.d.ts +34 -0
- package/dist/parallel/dispatcher/index.d.ts +12 -0
- package/dist/parallel/dispatcher/noop-dispatcher.d.ts +18 -0
- package/dist/parallel/dispatcher/noop-dispatcher.test.d.ts +10 -0
- package/dist/parallel/dispatcher/parallel-dispatcher.d.ts +18 -0
- package/dist/parallel/dispatcher/types.d.ts +33 -0
- package/dist/parallel/file-locks.d.ts +40 -0
- package/dist/parallel/index.d.ts +5 -0
- package/dist/parallel/meta-indexer.d.ts +32 -0
- package/dist/parallel/review-router.d.ts +29 -0
- package/dist/plan/checkpoint.d.ts +25 -0
- package/dist/plan/checkpoint.test.d.ts +1 -0
- package/dist/plan/index.d.ts +1 -0
- package/dist/plan/ledger-integrity.test.d.ts +5 -0
- package/dist/plan/ledger-snapshot-adversarial.test.d.ts +1 -0
- package/dist/plan/ledger.d.ts +286 -0
- package/dist/plan/ledger.test.d.ts +1 -0
- package/dist/plan/manager.cas-backoff.test.d.ts +10 -0
- package/dist/plan/manager.d.ts +90 -0
- package/dist/plan/manager.ledger-aware.test.d.ts +1 -0
- package/dist/plan/manager.loadplan-validation-guard.test.d.ts +13 -0
- package/dist/plan/manager.update-task-status.test.d.ts +1 -0
- package/dist/plan/migration-revert.regression.test.d.ts +8 -0
- package/dist/prm/__tests__/course-correction.test.d.ts +1 -0
- package/dist/prm/__tests__/escalation-queue-drain.test.d.ts +1 -0
- package/dist/prm/__tests__/escalation.test.d.ts +1 -0
- package/dist/prm/__tests__/index.test.d.ts +1 -0
- package/dist/prm/__tests__/integration.test.d.ts +1 -0
- package/dist/prm/__tests__/pattern-detector.test.d.ts +5 -0
- package/dist/prm/__tests__/replay.test.d.ts +1 -0
- package/dist/prm/__tests__/trajectory-store.test.d.ts +7 -0
- package/dist/prm/course-correction.d.ts +20 -0
- package/dist/prm/escalation.d.ts +73 -0
- package/dist/prm/index.d.ts +58 -0
- package/dist/prm/pattern-detector.d.ts +71 -0
- package/dist/prm/replay.d.ts +44 -0
- package/dist/prm/trajectory-store.d.ts +66 -0
- package/dist/prm/types.d.ts +120 -0
- package/dist/quality/index.d.ts +1 -0
- package/dist/quality/metrics.d.ts +25 -0
- package/dist/sast/rules/c.d.ts +9 -0
- package/dist/sast/rules/csharp.d.ts +9 -0
- package/dist/sast/rules/go.d.ts +9 -0
- package/dist/sast/rules/index.d.ts +72 -0
- package/dist/sast/rules/java.d.ts +9 -0
- package/dist/sast/rules/javascript.d.ts +9 -0
- package/dist/sast/rules/php.d.ts +9 -0
- package/dist/sast/rules/python.d.ts +9 -0
- package/dist/sast/semgrep.d.ts +68 -0
- package/dist/sast/semgrep.test.d.ts +1 -0
- package/dist/sbom/cyclonedx.d.ts +101 -0
- package/dist/sbom/detectors/dart.d.ts +7 -0
- package/dist/sbom/detectors/dotnet.d.ts +7 -0
- package/dist/sbom/detectors/go.d.ts +7 -0
- package/dist/sbom/detectors/index.d.ts +53 -0
- package/dist/sbom/detectors/java.d.ts +7 -0
- package/dist/sbom/detectors/nodejs.d.ts +7 -0
- package/dist/sbom/detectors/python.d.ts +7 -0
- package/dist/sbom/detectors/rust.d.ts +7 -0
- package/dist/sbom/detectors/swift.d.ts +7 -0
- package/dist/scope/scope-persistence.d.ts +109 -0
- package/dist/scope/scope-persistence.test.d.ts +13 -0
- package/dist/services/compaction-service.d.ts +28 -0
- package/dist/services/compaction-service.test.d.ts +1 -0
- package/dist/services/config-doctor.d.ts +125 -0
- package/dist/services/config-doctor.security.test.d.ts +1 -0
- package/dist/services/config-doctor.test.d.ts +1 -0
- package/dist/services/context-budget-service.d.ts +101 -0
- package/dist/services/decision-drift-analyzer.d.ts +96 -0
- package/dist/services/diagnose-service.d.ts +41 -0
- package/dist/services/evidence-service.d.ts +65 -0
- package/dist/services/evidence-summary-service.d.ts +75 -0
- package/dist/services/export-service.d.ts +30 -0
- package/dist/services/handoff-service.d.ts +74 -0
- package/dist/services/history-service.d.ts +35 -0
- package/dist/services/index.d.ts +13 -0
- package/dist/services/plan-service.d.ts +25 -0
- package/dist/services/preflight-integration.d.ts +38 -0
- package/dist/services/preflight-service.d.ts +62 -0
- package/dist/services/run-memory.d.ts +66 -0
- package/dist/services/status-service.d.ts +35 -0
- package/dist/services/status-service.turbo-indicator.test.d.ts +5 -0
- package/dist/services/tool-doctor.d.ts +26 -0
- package/dist/services/tool-doctor.test.d.ts +1 -0
- package/dist/services/version-check.d.ts +28 -0
- package/dist/services/warning-buffer.d.ts +9 -0
- package/dist/session/snapshot-reader.d.ts +37 -0
- package/dist/session/snapshot-writer.d.ts +115 -0
- package/dist/skills/index.d.ts +30 -0
- package/dist/state/agent-run-context.d.ts +24 -0
- package/dist/state.agent-run-context.test.d.ts +10 -0
- package/dist/state.d.ts +501 -1
- package/dist/state.rehydrate.test.d.ts +1 -0
- package/dist/state.rehydration-adversarial.test.d.ts +1 -0
- package/dist/state.rehydration-integration.test.d.ts +1 -0
- package/dist/state.session-restart.test.d.ts +7 -0
- package/dist/summaries/index.d.ts +2 -0
- package/dist/summaries/manager.d.ts +29 -0
- package/dist/summaries/summarizer.d.ts +38 -0
- package/dist/telemetry.d.ts +59 -0
- package/dist/telemetry.test.d.ts +1 -0
- package/dist/test-impact/__tests__/analyzer-import-fix.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/analyzer-import-fix.test.d.ts +1 -0
- package/dist/test-impact/__tests__/analyzer.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/analyzer.test.d.ts +1 -0
- package/dist/test-impact/__tests__/council-fixes.test.d.ts +1 -0
- package/dist/test-impact/__tests__/failure-classifier.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/failure-classifier.test.d.ts +1 -0
- package/dist/test-impact/__tests__/flaky-detector.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/flaky-detector.test.d.ts +1 -0
- package/dist/test-impact/__tests__/history-store.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/history-store.test.d.ts +1 -0
- package/dist/test-impact/__tests__/test-impact.adversarial.test.d.ts +1 -0
- package/dist/test-impact/__tests__/test-impact.test.d.ts +1 -0
- package/dist/test-impact/analyzer.d.ts +9 -0
- package/dist/test-impact/failure-classifier.d.ts +26 -0
- package/dist/test-impact/flaky-detector.d.ts +14 -0
- package/dist/test-impact/history-store.d.ts +15 -0
- package/dist/tools/__tests__/barrel-exports.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-ast-fallback.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-markdown-summary.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-semantic.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-summary.adversarial.test.d.ts +1 -0
- package/dist/tools/__tests__/diff-summary.test.d.ts +1 -0
- package/dist/tools/__tests__/mutation-test.adversarial.test.d.ts +1 -0
- package/dist/tools/__tests__/mutation-test.sourcefiles.test.d.ts +1 -0
- package/dist/tools/__tests__/mutation-test.test.d.ts +1 -0
- package/dist/tools/__tests__/test-runner-history.test.d.ts +1 -0
- package/dist/tools/__tests__/test-runner-impact.adversarial.test.d.ts +1 -0
- package/dist/tools/__tests__/test-runner-impact.test.d.ts +1 -0
- package/dist/tools/__tests__/test-runner-source-files.test.d.ts +1 -0
- package/dist/tools/barrel-export-check-gate-status.test.d.ts +6 -0
- package/dist/tools/batch-symbols.d.ts +24 -0
- package/dist/tools/batch-symbols.test.d.ts +1 -0
- package/dist/tools/build-check.d.ts +50 -0
- package/dist/tools/check-gate-status.adversarial.test.d.ts +1 -0
- package/dist/tools/check-gate-status.d.ts +7 -0
- package/dist/tools/check-gate-status.gates.test.d.ts +1 -0
- package/dist/tools/check-gate-status.plugin-registration.test.d.ts +1 -0
- package/dist/tools/checkpoint.d.ts +12 -0
- package/dist/tools/co-change-analyzer.d.ts +45 -0
- package/dist/tools/completion-verify.d.ts +25 -0
- package/dist/tools/complexity-hotspots.d.ts +2 -0
- package/dist/tools/convene-council.d.ts +53 -0
- package/dist/tools/convene-general-council.d.ts +25 -0
- package/dist/{create-tool.d.ts → tools/create-tool.d.ts} +13 -1
- package/dist/tools/curator-analyze.d.ts +7 -0
- package/dist/tools/curator-analyze.test.d.ts +1 -0
- package/dist/tools/declare-council-criteria.d.ts +14 -0
- package/dist/tools/declare-scope.d.ts +50 -0
- package/dist/tools/diff-summary.d.ts +12 -0
- package/dist/tools/diff.d.ts +24 -0
- package/dist/tools/doc-scan.d.ts +38 -0
- package/dist/tools/domain-detector.d.ts +6 -0
- package/dist/tools/evidence-check.d.ts +8 -0
- package/dist/tools/file-extractor.d.ts +9 -0
- package/dist/tools/generate-mutants.d.ts +15 -0
- package/dist/tools/get-approved-plan.d.ts +55 -0
- package/dist/tools/get-qa-gate-profile.d.ts +27 -0
- package/dist/tools/gitingest.d.ts +18 -0
- package/dist/tools/imports.d.ts +5 -0
- package/dist/tools/index.d.ts +66 -0
- package/dist/tools/knowledge-add.d.ts +2 -0
- package/dist/tools/knowledge-query.d.ts +5 -0
- package/dist/tools/knowledge-recall.d.ts +2 -0
- package/dist/tools/knowledge-remove.d.ts +2 -0
- package/dist/tools/knowledge-tools.integration.test.d.ts +1 -0
- package/dist/tools/lint-spec.d.ts +2 -0
- package/dist/tools/lint.d.ts +63 -0
- package/dist/tools/mutation-test.d.ts +2 -0
- package/dist/tools/mutation-test.security.test.d.ts +1 -0
- package/dist/tools/phase-complete.d.ts +25 -0
- package/dist/tools/pkg-audit.d.ts +2 -0
- package/dist/tools/placeholder-scan.d.ts +28 -0
- package/dist/tools/plugin-registration-adversarial.test.d.ts +1 -0
- package/dist/tools/pre-check-batch.d.ts +89 -0
- package/dist/tools/quality-budget.d.ts +26 -0
- package/dist/tools/repo-graph.d.ts +226 -0
- package/dist/tools/repo-map.d.ts +2 -0
- package/dist/tools/req-coverage.d.ts +47 -0
- package/dist/tools/resolve-working-directory.d.ts +35 -0
- package/dist/tools/resolve-working-directory.test.d.ts +1 -0
- package/dist/tools/retrieve-summary.d.ts +2 -0
- package/dist/tools/sast-baseline.d.ts +126 -0
- package/dist/tools/sast-scan.d.ts +87 -0
- package/dist/tools/save-plan.d.ts +95 -0
- package/dist/tools/save-plan.subdirectory-rejection.test.d.ts +1 -0
- package/dist/tools/sbom-generate.d.ts +26 -0
- package/dist/tools/schema-drift.d.ts +2 -0
- package/dist/tools/search.adversarial.test.d.ts +1 -0
- package/dist/tools/search.d.ts +29 -0
- package/dist/tools/search.test.d.ts +1 -0
- package/dist/tools/secretscan.d.ts +35 -0
- package/dist/tools/set-qa-gates.d.ts +40 -0
- package/dist/tools/suggest-patch.adversarial.test.d.ts +1 -0
- package/dist/tools/suggest-patch.d.ts +37 -0
- package/dist/tools/suggest-patch.test.d.ts +1 -0
- package/dist/tools/symbols.d.ts +21 -0
- package/dist/tools/syntax-check.d.ts +37 -0
- package/dist/tools/test-impact.d.ts +2 -0
- package/dist/tools/test-runner.d.ts +86 -0
- package/dist/tools/test-runner.security-adversarial.test.d.ts +5 -0
- package/dist/tools/todo-extract.d.ts +2 -0
- package/dist/tools/tool-names.d.ts +10 -0
- package/dist/tools/update-task-status.adversarial.test.d.ts +13 -0
- package/dist/tools/update-task-status.d.ts +114 -0
- package/dist/tools/update-task-status.gates.test.d.ts +1 -0
- package/dist/tools/update-task-status.test.d.ts +1 -0
- package/dist/tools/update-task-status.turbo-bypass.test.d.ts +1 -0
- package/dist/tools/verify-six-tools-registration.test.d.ts +9 -0
- package/dist/tools/web-search.d.ts +13 -0
- package/dist/tools/write-drift-evidence.d.ts +31 -0
- package/dist/tools/write-hallucination-evidence.d.ts +30 -0
- package/dist/tools/write-mutation-evidence.d.ts +34 -0
- package/dist/tools/write-mutation-evidence.test.d.ts +1 -0
- package/dist/tools/write-retro.d.ts +55 -0
- package/dist/transient-retry.test.d.ts +10 -0
- package/dist/types/delegation.d.ts +24 -0
- package/dist/types/events.d.ts +125 -0
- package/dist/utils/errors.d.ts +33 -0
- package/dist/utils/gitignore-warning.d.ts +17 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/logger.d.ts +3 -0
- package/dist/utils/merge.d.ts +5 -0
- package/dist/utils/path-security.d.ts +36 -0
- package/dist/utils/regex.d.ts +30 -0
- package/dist/utils/spec-hash.d.ts +15 -0
- package/dist/utils/tool-output.d.ts +12 -0
- package/dist/validation/task-id.d.ts +43 -0
- package/package.json +21 -14
- package/dist/architect.d.ts +0 -7
- package/dist/checkpoint.d.ts +0 -7
- package/dist/co-change-analyzer.d.ts +0 -1
- package/dist/compat.d.ts +0 -12
- package/dist/config-doctor.d.ts +0 -1
- package/dist/detector.d.ts +0 -7
- package/dist/diagnose-service.d.ts +0 -1
- package/dist/doctor.d.ts +0 -5
- package/dist/evidence-schema.d.ts +0 -2
- package/dist/evidence-service.d.ts +0 -1
- package/dist/export-service.d.ts +0 -1
- package/dist/handoff-service.d.ts +0 -1
- package/dist/history-service.d.ts +0 -1
- package/dist/hive-promoter.d.ts +0 -2
- package/dist/knowledge-migrator.d.ts +0 -2
- package/dist/knowledge-store.d.ts +0 -1
- package/dist/knowledge-types.d.ts +0 -1
- package/dist/knowledge-validator.d.ts +0 -2
- package/dist/loader.d.ts +0 -1
- package/dist/manager.d.ts +0 -1
- package/dist/models.d.ts +0 -1
- package/dist/plan-service.d.ts +0 -1
- package/dist/preflight-service.d.ts +0 -1
- package/dist/profiles.d.ts +0 -7
- package/dist/register.d.ts +0 -36
- package/dist/schema.d.ts +0 -2
- package/dist/snapshot-writer.d.ts +0 -1
- package/dist/status-service.d.ts +0 -15
- package/dist/telemetry/src/events.d.ts +0 -308
- package/dist/telemetry/src/guards.d.ts +0 -14
- package/dist/telemetry/src/index.d.ts +0 -4
- package/dist/telemetry/src/version.d.ts +0 -1
- package/dist/utils.d.ts +0 -1
- package/dist/write-retro.d.ts +0 -1
- /package/dist/{discovery.d.ts → build/discovery.d.ts} +0 -0
- /package/dist/{agents.d.ts → commands/agents.d.ts} +0 -0
- /package/dist/{analyze.d.ts → commands/analyze.d.ts} +0 -0
- /package/dist/{archive.d.ts → commands/archive.d.ts} +0 -0
- /package/dist/{benchmark.d.ts → commands/benchmark.d.ts} +0 -0
- /package/dist/{clarify.d.ts → commands/clarify.d.ts} +0 -0
- /package/dist/{curate.d.ts → commands/curate.d.ts} +0 -0
- /package/dist/{dark-matter.d.ts → commands/dark-matter.d.ts} +0 -0
- /package/dist/{diagnose.d.ts → commands/diagnose.d.ts} +0 -0
- /package/dist/{evidence.d.ts → commands/evidence.d.ts} +0 -0
- /package/dist/{export.d.ts → commands/export.d.ts} +0 -0
- /package/dist/{handoff.d.ts → commands/handoff.d.ts} +0 -0
- /package/dist/{history.d.ts → commands/history.d.ts} +0 -0
- /package/dist/{plan.d.ts → commands/plan.d.ts} +0 -0
- /package/dist/{preflight.d.ts → commands/preflight.d.ts} +0 -0
- /package/dist/{promote.d.ts → commands/promote.d.ts} +0 -0
- /package/dist/{retrieve.d.ts → commands/retrieve.d.ts} +0 -0
- /package/dist/{rollback.d.ts → commands/rollback.d.ts} +0 -0
- /package/dist/{simulate.d.ts → commands/simulate.d.ts} +0 -0
- /package/dist/{specify.d.ts → commands/specify.d.ts} +0 -0
- /package/dist/{status.d.ts → commands/status.d.ts} +0 -0
- /package/dist/{turbo.d.ts → commands/turbo.d.ts} +0 -0
- /package/dist/{write_retro.d.ts → commands/write-retro.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface TestImpactResult {
|
|
2
|
+
impactedTests: string[];
|
|
3
|
+
unrelatedTests: string[];
|
|
4
|
+
untestedFiles: string[];
|
|
5
|
+
impactMap: Record<string, string[]>;
|
|
6
|
+
}
|
|
7
|
+
export declare function buildImpactMap(cwd: string): Promise<Record<string, string[]>>;
|
|
8
|
+
export declare function loadImpactMap(cwd: string): Promise<Record<string, string[]>>;
|
|
9
|
+
export declare function analyzeImpact(changedFiles: string[], cwd: string): Promise<TestImpactResult>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TestRunRecord } from './history-store.js';
|
|
2
|
+
export type FailureClassification = 'new_regression' | 'pre_existing' | 'flaky' | 'unknown';
|
|
3
|
+
export interface ClassifiedFailure {
|
|
4
|
+
testFile: string;
|
|
5
|
+
testName: string;
|
|
6
|
+
classification: FailureClassification;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
stackPrefix?: string;
|
|
9
|
+
durationMs: number;
|
|
10
|
+
confidence: number;
|
|
11
|
+
}
|
|
12
|
+
export interface FailureCluster {
|
|
13
|
+
clusterId: string;
|
|
14
|
+
rootCause: string;
|
|
15
|
+
stackPrefix?: string;
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
failures: ClassifiedFailure[];
|
|
18
|
+
classification: FailureClassification;
|
|
19
|
+
affectedTestFiles: string[];
|
|
20
|
+
}
|
|
21
|
+
export declare function classifyFailure(currentResult: TestRunRecord, history: TestRunRecord[]): ClassifiedFailure;
|
|
22
|
+
export declare function clusterFailures(failures: ClassifiedFailure[]): FailureCluster[];
|
|
23
|
+
export declare function classifyAndCluster(testResults: TestRunRecord[], history: TestRunRecord[]): {
|
|
24
|
+
classified: ClassifiedFailure[];
|
|
25
|
+
clusters: FailureCluster[];
|
|
26
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TestRunRecord } from './history-store.js';
|
|
2
|
+
export interface FlakyTestEntry {
|
|
3
|
+
testFile: string;
|
|
4
|
+
testName: string;
|
|
5
|
+
flakyScore: number;
|
|
6
|
+
totalRuns: number;
|
|
7
|
+
alternationCount: number;
|
|
8
|
+
isQuarantined: boolean;
|
|
9
|
+
recentResults: Array<'pass' | 'fail' | 'skip'>;
|
|
10
|
+
recommendation?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function computeFlakyScore(history: TestRunRecord[]): number;
|
|
13
|
+
export declare function detectFlakyTests(allHistory: TestRunRecord[]): FlakyTestEntry[];
|
|
14
|
+
export declare function isTestQuarantined(testFile: string, testName: string, allHistory: TestRunRecord[]): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type TestRunResult = 'pass' | 'fail' | 'skip';
|
|
2
|
+
export interface TestRunRecord {
|
|
3
|
+
timestamp: string;
|
|
4
|
+
taskId: string;
|
|
5
|
+
testFile: string;
|
|
6
|
+
testName: string;
|
|
7
|
+
result: TestRunResult;
|
|
8
|
+
durationMs: number;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
stackPrefix?: string;
|
|
11
|
+
changedFiles: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare function appendTestRun(record: TestRunRecord, workingDir?: string): void;
|
|
14
|
+
export declare function getTestHistory(testFile: string, workingDir?: string): TestRunRecord[];
|
|
15
|
+
export declare function getAllHistory(workingDir?: string): TestRunRecord[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ToolDefinition } from '@opencode-ai/plugin/tool';
|
|
2
|
+
export 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
|
+
export type FileErrorType = 'file-not-found' | 'parse-error' | 'empty-file' | 'unsupported-language' | 'path-traversal' | 'path-outside-workspace' | 'invalid-path';
|
|
11
|
+
export interface FileSymbolResult {
|
|
12
|
+
file: string;
|
|
13
|
+
success: boolean;
|
|
14
|
+
symbols?: SymbolInfo[];
|
|
15
|
+
error?: string;
|
|
16
|
+
errorType?: FileErrorType;
|
|
17
|
+
}
|
|
18
|
+
export interface BatchSymbolsResult {
|
|
19
|
+
results: FileSymbolResult[];
|
|
20
|
+
totalFiles: number;
|
|
21
|
+
successCount: number;
|
|
22
|
+
failureCount: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const batch_symbols: ToolDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build Check Tool
|
|
3
|
+
*
|
|
4
|
+
* Discovers and runs build commands for various ecosystems in a project directory.
|
|
5
|
+
*/
|
|
6
|
+
import type { tool } from '@opencode-ai/plugin';
|
|
7
|
+
import type { EvidenceVerdict } from '../config/evidence-schema';
|
|
8
|
+
export declare const DEFAULT_TIMEOUT_MS = 300000;
|
|
9
|
+
export declare const MAX_OUTPUT_BYTES: number;
|
|
10
|
+
export declare const MAX_OUTPUT_LINES = 100;
|
|
11
|
+
export interface BuildCheckInput {
|
|
12
|
+
/** Scope: 'changed' or 'all' */
|
|
13
|
+
scope: 'changed' | 'all';
|
|
14
|
+
/** List of changed files when scope is 'changed' */
|
|
15
|
+
changed_files?: string[];
|
|
16
|
+
/** Mode: 'build', 'typecheck', or 'both' (default: 'both') */
|
|
17
|
+
mode?: 'build' | 'typecheck' | 'both';
|
|
18
|
+
}
|
|
19
|
+
export interface BuildRun {
|
|
20
|
+
kind: 'build' | 'typecheck' | 'test';
|
|
21
|
+
command: string;
|
|
22
|
+
cwd: string;
|
|
23
|
+
exit_code: number;
|
|
24
|
+
duration_ms: number;
|
|
25
|
+
stdout_tail: string;
|
|
26
|
+
stderr_tail: string;
|
|
27
|
+
}
|
|
28
|
+
export interface BuildCheckResult {
|
|
29
|
+
verdict: EvidenceVerdict;
|
|
30
|
+
runs: BuildRun[];
|
|
31
|
+
summary: {
|
|
32
|
+
files_scanned: number;
|
|
33
|
+
runs_count: number;
|
|
34
|
+
failed_count: number;
|
|
35
|
+
skipped_reason?: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Truncate output to last maxLines lines, but not more than maxBytes
|
|
40
|
+
*/
|
|
41
|
+
export declare function truncateOutput(output: string, maxLines?: number, maxBytes?: number): string;
|
|
42
|
+
/**
|
|
43
|
+
* Parse command to determine its kind
|
|
44
|
+
*/
|
|
45
|
+
export declare function getCommandKind(command: string): 'build' | 'typecheck' | 'test';
|
|
46
|
+
/**
|
|
47
|
+
* Run build check: discover and execute build commands
|
|
48
|
+
*/
|
|
49
|
+
export declare function runBuildCheck(workingDir: string, input: BuildCheckInput): Promise<BuildCheckResult>;
|
|
50
|
+
export declare const build_check: ReturnType<typeof tool>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check gate status tool - read-only tool for querying task gate status.
|
|
3
|
+
* Reads .swarm/evidence/{taskId}.json and returns structured JSON describing
|
|
4
|
+
* which gates have passed, which are missing, and overall task status.
|
|
5
|
+
*/
|
|
6
|
+
import type { tool } from '@opencode-ai/plugin';
|
|
7
|
+
export declare const check_gate_status: ReturnType<typeof tool>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ToolDefinition } from '@opencode-ai/plugin/tool';
|
|
2
|
+
/**
|
|
3
|
+
* Record a checkpoint without staging or committing changes.
|
|
4
|
+
* Writes only to .swarm/checkpoints.json with the current HEAD SHA.
|
|
5
|
+
* Used by spiral detection to avoid silently committing mid-flight user work.
|
|
6
|
+
*/
|
|
7
|
+
export declare function saveCheckpointRecord(label: string, directory: string): {
|
|
8
|
+
success: boolean;
|
|
9
|
+
sha?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const checkpoint: ToolDefinition;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { tool } from '@opencode-ai/plugin';
|
|
2
|
+
import type { SwarmKnowledgeEntry } from '../hooks/knowledge-types.js';
|
|
3
|
+
export interface CoChangeEntry {
|
|
4
|
+
fileA: string;
|
|
5
|
+
fileB: string;
|
|
6
|
+
coChangeCount: number;
|
|
7
|
+
npmi: number;
|
|
8
|
+
lift: number;
|
|
9
|
+
hasStaticEdge: boolean;
|
|
10
|
+
totalCommits: number;
|
|
11
|
+
commitsA: number;
|
|
12
|
+
commitsB: number;
|
|
13
|
+
}
|
|
14
|
+
export interface DarkMatterOptions {
|
|
15
|
+
minCommits?: number;
|
|
16
|
+
minCoChanges?: number;
|
|
17
|
+
npmiThreshold?: number;
|
|
18
|
+
maxCommitsToAnalyze?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parses git log to extract commit -> files mapping.
|
|
22
|
+
* Returns empty Map on timeout or error.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseGitLog(directory: string, maxCommits: number): Promise<Map<string, Set<string>>>;
|
|
25
|
+
/**
|
|
26
|
+
* Builds co-change matrix from commit -> files mapping.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildCoChangeMatrix(commitMap: Map<string, Set<string>>): Map<string, CoChangeEntry>;
|
|
29
|
+
/**
|
|
30
|
+
* Detects static import edges between files.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getStaticEdges(directory: string): Promise<Set<string>>;
|
|
33
|
+
/**
|
|
34
|
+
* Main entry point: detects dark matter (hidden couplings).
|
|
35
|
+
*/
|
|
36
|
+
export declare function detectDarkMatter(directory: string, options?: DarkMatterOptions): Promise<CoChangeEntry[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Converts dark matter findings to knowledge entries.
|
|
39
|
+
*/
|
|
40
|
+
export declare function darkMatterToKnowledgeEntries(pairs: CoChangeEntry[], projectName: string): SwarmKnowledgeEntry[];
|
|
41
|
+
/**
|
|
42
|
+
* Formats dark matter findings as markdown output.
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatDarkMatterOutput(pairs: CoChangeEntry[]): string;
|
|
45
|
+
export declare const co_change_analyzer: ReturnType<typeof tool>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Completion verification tool - deterministic pre-check verifying that plan task
|
|
3
|
+
* identifiers exist in their target source files before phase completion.
|
|
4
|
+
* Blocks if obviously incomplete.
|
|
5
|
+
*/
|
|
6
|
+
import type { ToolDefinition } from '@opencode-ai/plugin';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the completion_verify tool
|
|
9
|
+
*/
|
|
10
|
+
export interface CompletionVerifyArgs {
|
|
11
|
+
/** The phase number to check */
|
|
12
|
+
phase: number;
|
|
13
|
+
/** Session ID (optional, auto-provided by plugin context) */
|
|
14
|
+
sessionID?: string;
|
|
15
|
+
/** Explicit project root directory override */
|
|
16
|
+
working_directory?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Execute the completion verification check
|
|
20
|
+
*/
|
|
21
|
+
export declare function executeCompletionVerify(args: CompletionVerifyArgs, directory: string): Promise<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Tool definition for completion_verify
|
|
24
|
+
*/
|
|
25
|
+
export declare const completion_verify: ToolDefinition;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Submit Council Verdicts — architect-only tool.
|
|
3
|
+
*
|
|
4
|
+
* Accepts pre-collected parallel verdicts from critic, reviewer, sme,
|
|
5
|
+
* test_engineer, and explorer, then synthesizes them into a veto-aware
|
|
6
|
+
* overall verdict with required fixes and a single unified feedback document.
|
|
7
|
+
*
|
|
8
|
+
* PREREQUISITE: The architect must dispatch each council member as a separate
|
|
9
|
+
* Agent task and collect the resulting CouncilMemberVerdict objects BEFORE
|
|
10
|
+
* calling this tool. This tool performs synthesis only — it does NOT dispatch,
|
|
11
|
+
* invoke, or contact council members.
|
|
12
|
+
*
|
|
13
|
+
* Config-gated (council.enabled must be true) and architect-only via
|
|
14
|
+
* AGENT_TOOL_MAP. Follows the check-gate-status.ts pattern.
|
|
15
|
+
*/
|
|
16
|
+
import type { tool } from '@opencode-ai/plugin';
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
export declare const ArgsSchema: z.ZodObject<{
|
|
19
|
+
taskId: z.ZodString;
|
|
20
|
+
swarmId: z.ZodString;
|
|
21
|
+
roundNumber: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
verdicts: z.ZodArray<z.ZodObject<{
|
|
23
|
+
agent: z.ZodEnum<{
|
|
24
|
+
sme: "sme";
|
|
25
|
+
reviewer: "reviewer";
|
|
26
|
+
critic: "critic";
|
|
27
|
+
explorer: "explorer";
|
|
28
|
+
test_engineer: "test_engineer";
|
|
29
|
+
}>;
|
|
30
|
+
verdict: z.ZodEnum<{
|
|
31
|
+
APPROVE: "APPROVE";
|
|
32
|
+
REJECT: "REJECT";
|
|
33
|
+
CONCERNS: "CONCERNS";
|
|
34
|
+
}>;
|
|
35
|
+
confidence: z.ZodNumber;
|
|
36
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
37
|
+
severity: z.ZodEnum<{
|
|
38
|
+
HIGH: "HIGH";
|
|
39
|
+
MEDIUM: "MEDIUM";
|
|
40
|
+
LOW: "LOW";
|
|
41
|
+
}>;
|
|
42
|
+
category: z.ZodString;
|
|
43
|
+
location: z.ZodString;
|
|
44
|
+
detail: z.ZodString;
|
|
45
|
+
evidence: z.ZodString;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
criteriaAssessed: z.ZodArray<z.ZodString>;
|
|
48
|
+
criteriaUnmet: z.ZodArray<z.ZodString>;
|
|
49
|
+
durationMs: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export declare const submit_council_verdicts: ReturnType<typeof tool>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* General Council Mode — architect-only synthesis tool.
|
|
3
|
+
*
|
|
4
|
+
* The architect spawns council_member subagents in parallel for Round 1,
|
|
5
|
+
* collects their JSON responses, and calls this tool to synthesize results.
|
|
6
|
+
* If the tool detects disagreements and Round 2 deliberation is configured,
|
|
7
|
+
* the architect re-delegates to disputing members and calls this tool again
|
|
8
|
+
* with both round1Responses and round2Responses populated.
|
|
9
|
+
*
|
|
10
|
+
* Mirrors the convene-council.ts skeleton but explicitly does NOT inherit
|
|
11
|
+
* the QA-council-only constraints:
|
|
12
|
+
* - agent: enum (replaced with memberId: string — general-council member
|
|
13
|
+
* IDs are user-configured, not a fixed enum)
|
|
14
|
+
* - verdicts.min(1).max(5) (replaced with round1Responses.min(1) — no upper
|
|
15
|
+
* cap; member count is per-config)
|
|
16
|
+
* - taskId regex (dropped — general council has no taskId)
|
|
17
|
+
* - readCriteria(workingDir, taskId) (dropped — general council has no
|
|
18
|
+
* pre-declared criteria store)
|
|
19
|
+
* - requireAllMembers < 5 check (dropped — not applicable)
|
|
20
|
+
*
|
|
21
|
+
* Evidence path is .swarm/council/general/ (subdirectory; never writes to
|
|
22
|
+
* .swarm/council/ root, where the QA council stores its files).
|
|
23
|
+
*/
|
|
24
|
+
import type { tool } from '@opencode-ai/plugin';
|
|
25
|
+
export declare const convene_general_council: ReturnType<typeof tool>;
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { type ToolContext, tool } from '@opencode-ai/plugin';
|
|
2
|
+
/**
|
|
3
|
+
* ToolResult can be string | {output: string; metadata?: any}
|
|
4
|
+
* This type matches what the plugin's tool() function expects as a return value.
|
|
5
|
+
*/
|
|
6
|
+
export type ToolResult = string | {
|
|
7
|
+
output: string;
|
|
8
|
+
metadata?: unknown;
|
|
9
|
+
};
|
|
2
10
|
/**
|
|
3
11
|
* Options for creating a swarm tool.
|
|
4
12
|
* The args type is inferred from what you pass to the tool() call.
|
|
13
|
+
*
|
|
14
|
+
* Note: The session-level EnvironmentProfile is available to any tool that has
|
|
15
|
+
* a sessionID via `getSessionEnvironment(ctx?.sessionID)` from '../state.js'.
|
|
16
|
+
* ToolContext is defined externally in @opencode-ai/plugin and is not modified here.
|
|
5
17
|
*/
|
|
6
18
|
export interface SwarmToolOptions<Args extends Record<string, unknown>> {
|
|
7
19
|
description: string;
|
|
8
20
|
args: Args;
|
|
9
|
-
execute: (args: Args, directory: string, ctx?: ToolContext) => Promise<
|
|
21
|
+
execute: (args: Args, directory: string, ctx?: ToolContext) => Promise<ToolResult>;
|
|
10
22
|
}
|
|
11
23
|
/**
|
|
12
24
|
* Creates a swarm tool with automatic working directory injection.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curator analyze tool — explicit mechanism to trigger curator phase analysis
|
|
3
|
+
* and apply knowledge recommendations. Closes the curator data pipeline by
|
|
4
|
+
* giving the architect an explicit tool to call after reviewing phase data.
|
|
5
|
+
*/
|
|
6
|
+
import { createSwarmTool } from './create-tool';
|
|
7
|
+
export declare const curator_analyze: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work Complete Council — pre-declaration tool.
|
|
3
|
+
*
|
|
4
|
+
* Lets the architect declare acceptance criteria at plan time, before the
|
|
5
|
+
* coder starts work. Criteria are persisted to .swarm/council/{safeId}.json
|
|
6
|
+
* and later read back during council evaluation (submit_council_verdicts) so that
|
|
7
|
+
* reviewers assess a stable, pre-committed contract rather than whatever
|
|
8
|
+
* criteria happen to be invented at review time.
|
|
9
|
+
*
|
|
10
|
+
* Config-gated (council.enabled must be true) and architect-only via
|
|
11
|
+
* AGENT_TOOL_MAP. Follows the convene-council.ts pattern.
|
|
12
|
+
*/
|
|
13
|
+
import type { tool } from '@opencode-ai/plugin';
|
|
14
|
+
export declare const declare_council_criteria: ReturnType<typeof tool>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Declare scope tool for setting the file scope for coder delegations.
|
|
3
|
+
* Implements FR-010: Declare coder scope before delegation.
|
|
4
|
+
* This tool must be called before delegating to coder to enable scope containment checking.
|
|
5
|
+
*/
|
|
6
|
+
import type { ToolDefinition } from '@opencode-ai/plugin/tool';
|
|
7
|
+
/**
|
|
8
|
+
* Arguments for the declare_scope tool
|
|
9
|
+
*/
|
|
10
|
+
export interface DeclareScopeArgs {
|
|
11
|
+
taskId: string;
|
|
12
|
+
files: string[];
|
|
13
|
+
whitelist?: string[];
|
|
14
|
+
working_directory?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Result from executing declare_scope
|
|
18
|
+
*/
|
|
19
|
+
export interface DeclareScopeResult {
|
|
20
|
+
success: boolean;
|
|
21
|
+
message: string;
|
|
22
|
+
taskId?: string;
|
|
23
|
+
fileCount?: number;
|
|
24
|
+
errors?: string[];
|
|
25
|
+
warnings?: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Validate that taskId matches the required format (N.M or N.M.P).
|
|
29
|
+
* @param taskId - The task ID to validate
|
|
30
|
+
* @returns Error message if invalid, undefined if valid
|
|
31
|
+
*/
|
|
32
|
+
export declare function validateTaskIdFormat(taskId: string): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Validate file entries for security concerns.
|
|
35
|
+
* @param files - Array of file paths to validate
|
|
36
|
+
* @returns Array of error messages, empty if all valid
|
|
37
|
+
*/
|
|
38
|
+
export declare function validateFiles(files: string[]): string[];
|
|
39
|
+
/**
|
|
40
|
+
* Execute the declare_scope tool.
|
|
41
|
+
* Validates the taskId and files, then sets the declared scope on all active architect sessions.
|
|
42
|
+
* @param args - The declare scope arguments
|
|
43
|
+
* @param fallbackDir - Fallback directory for plan lookup
|
|
44
|
+
* @returns DeclareScopeResult with success status and details
|
|
45
|
+
*/
|
|
46
|
+
export declare function executeDeclareScope(args: DeclareScopeArgs, fallbackDir?: string): Promise<DeclareScopeResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Tool definition for declare_scope
|
|
49
|
+
*/
|
|
50
|
+
export declare const declare_scope: ToolDefinition;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ChangeCategory, type RiskLevel } from '../diff/semantic-classifier.js';
|
|
2
|
+
import { createSwarmTool } from './create-tool';
|
|
3
|
+
export interface DiffSummaryArgs {
|
|
4
|
+
files: string[];
|
|
5
|
+
classification?: ChangeCategory;
|
|
6
|
+
riskLevel?: RiskLevel;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Standalone tool that wraps the semantic classifier + summary generator
|
|
10
|
+
* to produce a filtered SemanticDiffSummary.
|
|
11
|
+
*/
|
|
12
|
+
export declare const diff_summary: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ASTDiffResult } from '../diff/ast-diff.js';
|
|
2
|
+
import { type SemanticDiffSummary } from '../diff/summary-generator.js';
|
|
3
|
+
import { createSwarmTool } from './create-tool';
|
|
4
|
+
export interface DiffResult {
|
|
5
|
+
files: Array<{
|
|
6
|
+
path: string;
|
|
7
|
+
additions: number;
|
|
8
|
+
deletions: number;
|
|
9
|
+
}>;
|
|
10
|
+
contractChanges: string[];
|
|
11
|
+
hasContractChanges: boolean;
|
|
12
|
+
summary: string;
|
|
13
|
+
astDiffs?: ASTDiffResult[];
|
|
14
|
+
semanticSummary?: SemanticDiffSummary;
|
|
15
|
+
markdownSummary?: string;
|
|
16
|
+
astSkippedCount?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface DiffErrorResult {
|
|
19
|
+
error: string;
|
|
20
|
+
files: [];
|
|
21
|
+
contractChanges: [];
|
|
22
|
+
hasContractChanges: false;
|
|
23
|
+
}
|
|
24
|
+
export declare const diff: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createSwarmTool } from './create-tool.js';
|
|
2
|
+
export interface DocManifestFile {
|
|
3
|
+
path: string;
|
|
4
|
+
title: string;
|
|
5
|
+
summary: string;
|
|
6
|
+
lines: number;
|
|
7
|
+
mtime: number;
|
|
8
|
+
}
|
|
9
|
+
export interface DocManifest {
|
|
10
|
+
schema_version: 1;
|
|
11
|
+
scanned_at: string;
|
|
12
|
+
files: DocManifestFile[];
|
|
13
|
+
}
|
|
14
|
+
export declare function scanDocIndex(directory: string): Promise<{
|
|
15
|
+
manifest: DocManifest;
|
|
16
|
+
cached: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Extract actionable constraints from project documentation relevant to a task.
|
|
20
|
+
*
|
|
21
|
+
* Algorithm:
|
|
22
|
+
* 1. Read .swarm/doc-manifest.json (or generate via scanDocIndex if missing)
|
|
23
|
+
* 2. Score each doc against task files + description using Jaccard bigram similarity
|
|
24
|
+
* 3. For docs with score > RELEVANCE_THRESHOLD, read full content and extract constraints
|
|
25
|
+
* 4. Dedup against existing knowledge entries before appending
|
|
26
|
+
* 5. Return extraction statistics
|
|
27
|
+
*/
|
|
28
|
+
export declare function extractDocConstraints(directory: string, taskFiles: string[], taskDescription: string): Promise<{
|
|
29
|
+
extracted: number;
|
|
30
|
+
skipped: number;
|
|
31
|
+
details: {
|
|
32
|
+
path: string;
|
|
33
|
+
score: number;
|
|
34
|
+
constraints: string[];
|
|
35
|
+
}[];
|
|
36
|
+
}>;
|
|
37
|
+
export declare const doc_scan: ReturnType<typeof createSwarmTool>;
|
|
38
|
+
export declare const doc_extract: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { tool } from '@opencode-ai/plugin';
|
|
2
|
+
interface CompletedTask {
|
|
3
|
+
taskId: string;
|
|
4
|
+
taskName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function parseCompletedTasks(planContent: string): CompletedTask[];
|
|
7
|
+
export declare const evidence_check: ReturnType<typeof tool>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToolDefinition } from '@opencode-ai/plugin/tool';
|
|
2
|
+
/**
|
|
3
|
+
* Extract filename from code content or context
|
|
4
|
+
*/
|
|
5
|
+
export declare function extractFilename(code: string, language: string, index: number): string;
|
|
6
|
+
/**
|
|
7
|
+
* Extract code blocks from content and save to files
|
|
8
|
+
*/
|
|
9
|
+
export declare const extract_code_blocks: ToolDefinition;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate mutation patches tool.
|
|
3
|
+
* Calls generateMutants() from src/mutation/generator.ts with the ToolContext
|
|
4
|
+
* and returns the patch list for piping into the mutation_test tool.
|
|
5
|
+
* On LLM failure, emits a SKIP verdict with a diagnostic message.
|
|
6
|
+
*/
|
|
7
|
+
import type { MutationPatch } from '../mutation/engine.js';
|
|
8
|
+
import { createSwarmTool } from './create-tool';
|
|
9
|
+
export interface GenerateMutantsResult {
|
|
10
|
+
verdict: 'ready' | 'SKIP';
|
|
11
|
+
patches: MutationPatch[];
|
|
12
|
+
count: number;
|
|
13
|
+
message?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const generate_mutants: ReturnType<typeof createSwarmTool>;
|