opencode-swarm 7.0.0-beta.1 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +7 -0
- package/dist/cli/index.js +31227 -11423
- 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/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 +11 -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 +74704 -47714
- 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 +2 -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/{reset.d.ts → commands/reset.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,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delegation Envelope Types
|
|
3
|
+
* Interface for passing delegated tasks between agents
|
|
4
|
+
*/
|
|
5
|
+
export interface DelegationEnvelope {
|
|
6
|
+
taskId: string;
|
|
7
|
+
targetAgent: string;
|
|
8
|
+
action: string;
|
|
9
|
+
commandType: 'task' | 'slash_command';
|
|
10
|
+
files: string[];
|
|
11
|
+
acceptanceCriteria: string[];
|
|
12
|
+
technicalContext: string;
|
|
13
|
+
errorStrategy?: 'FAIL_FAST' | 'BEST_EFFORT';
|
|
14
|
+
platformNotes?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Validation result types
|
|
18
|
+
*/
|
|
19
|
+
export type EnvelopeValidationResult = {
|
|
20
|
+
valid: true;
|
|
21
|
+
} | {
|
|
22
|
+
valid: false;
|
|
23
|
+
reason: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v6.19.0 JSONL Event Types
|
|
3
|
+
* Event interfaces for the prompt-quality and adversarial robustness update
|
|
4
|
+
*/
|
|
5
|
+
export interface SoundingBoardConsultedEvent {
|
|
6
|
+
type: 'sounding_board_consulted';
|
|
7
|
+
timestamp: string;
|
|
8
|
+
architectQuery: string;
|
|
9
|
+
criticVerdict: 'UNNECESSARY' | 'REPHRASE' | 'APPROVED' | 'RESOLVE';
|
|
10
|
+
phase: number;
|
|
11
|
+
taskId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ArchitectLoopDetectedEvent {
|
|
14
|
+
type: 'architect_loop_detected';
|
|
15
|
+
timestamp: string;
|
|
16
|
+
impasseDescription: string;
|
|
17
|
+
occurrenceCount: number;
|
|
18
|
+
phase: number;
|
|
19
|
+
taskId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface PrecedentManipulationDetectedEvent {
|
|
22
|
+
type: 'precedent_manipulation_detected';
|
|
23
|
+
timestamp: string;
|
|
24
|
+
pattern: 'PRECEDENT_MANIPULATION';
|
|
25
|
+
severity: 'HIGHEST';
|
|
26
|
+
detectedIn: string;
|
|
27
|
+
phase: number;
|
|
28
|
+
taskId?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface CoderSelfAuditEvent {
|
|
31
|
+
type: 'coder_self_audit';
|
|
32
|
+
timestamp: string;
|
|
33
|
+
taskId: string;
|
|
34
|
+
filesModified: string[];
|
|
35
|
+
checklistResults: {
|
|
36
|
+
filesMatchSpec: boolean;
|
|
37
|
+
noExtraFunctionality: boolean;
|
|
38
|
+
noSkippedAcceptanceCriteria: boolean;
|
|
39
|
+
didNotRunTests: boolean;
|
|
40
|
+
syntaxCheckPassed: boolean;
|
|
41
|
+
};
|
|
42
|
+
meta: {
|
|
43
|
+
summary: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface CoderRetryCircuitBreakerEvent {
|
|
47
|
+
type: 'coder_retry_circuit_breaker';
|
|
48
|
+
timestamp: string;
|
|
49
|
+
taskId: string;
|
|
50
|
+
rejectionCount: number;
|
|
51
|
+
rejectionHistory: string[];
|
|
52
|
+
phase: number;
|
|
53
|
+
action: 'sounding_board_consultation' | 'simplification' | 'user_escalation';
|
|
54
|
+
}
|
|
55
|
+
export interface AgentConflictDetectedEvent {
|
|
56
|
+
type: 'agent_conflict_detected';
|
|
57
|
+
timestamp: string;
|
|
58
|
+
sessionId: string;
|
|
59
|
+
phase: number;
|
|
60
|
+
taskId?: string;
|
|
61
|
+
sourceAgent: 'architect' | 'coder' | 'reviewer' | 'critic' | 'test_engineer';
|
|
62
|
+
targetAgent: 'architect' | 'coder' | 'reviewer' | 'critic' | 'test_engineer';
|
|
63
|
+
conflictType: 'feedback_rejection' | 'authority_collision' | 'retry_spiral' | 'scope_disagreement' | 'quality_gate_dispute';
|
|
64
|
+
resolutionPath: 'self_resolve' | 'soundingboard' | 'simplification' | 'sme_consult' | 'user_escalation';
|
|
65
|
+
summary: string;
|
|
66
|
+
}
|
|
67
|
+
export interface AuthorityHandoffResolvedEvent {
|
|
68
|
+
type: 'authority_handoff_resolved';
|
|
69
|
+
timestamp: string;
|
|
70
|
+
sessionId: string;
|
|
71
|
+
previousAgent: string;
|
|
72
|
+
newAgent: string;
|
|
73
|
+
reason: 'task_complete' | 'stale_delegation' | 'conflict_escalation' | 'manual_reset';
|
|
74
|
+
}
|
|
75
|
+
export interface SpecStaleDetectedEvent {
|
|
76
|
+
type: 'spec_stale_detected';
|
|
77
|
+
timestamp: string;
|
|
78
|
+
phase: number;
|
|
79
|
+
specHash_plan: string;
|
|
80
|
+
specHash_current: string | null;
|
|
81
|
+
reason: string;
|
|
82
|
+
planTitle: string;
|
|
83
|
+
}
|
|
84
|
+
export interface SpecDriftAcknowledgedEvent {
|
|
85
|
+
type: 'spec_drift_acknowledged';
|
|
86
|
+
timestamp: string;
|
|
87
|
+
phase: number;
|
|
88
|
+
planTitle: string;
|
|
89
|
+
acknowledgedBy: string;
|
|
90
|
+
previousHash: string;
|
|
91
|
+
newHash: string | null;
|
|
92
|
+
}
|
|
93
|
+
export interface PrmPatternDetectedEvent {
|
|
94
|
+
type: 'prm_pattern_detected';
|
|
95
|
+
timestamp: string;
|
|
96
|
+
sessionId: string;
|
|
97
|
+
pattern: string;
|
|
98
|
+
severity: string;
|
|
99
|
+
category: string;
|
|
100
|
+
stepRange: [number, number];
|
|
101
|
+
}
|
|
102
|
+
export interface PrmCourseCorrectionInjectedEvent {
|
|
103
|
+
type: 'prm_course_correction_injected';
|
|
104
|
+
timestamp: string;
|
|
105
|
+
sessionId: string;
|
|
106
|
+
pattern: string;
|
|
107
|
+
level: number;
|
|
108
|
+
}
|
|
109
|
+
export interface PrmEscalationTriggeredEvent {
|
|
110
|
+
type: 'prm_escalation_triggered';
|
|
111
|
+
timestamp: string;
|
|
112
|
+
sessionId: string;
|
|
113
|
+
pattern: string;
|
|
114
|
+
level: number;
|
|
115
|
+
occurrenceCount: number;
|
|
116
|
+
}
|
|
117
|
+
export interface PrmHardStopEvent {
|
|
118
|
+
type: 'prm_hard_stop';
|
|
119
|
+
timestamp: string;
|
|
120
|
+
sessionId: string;
|
|
121
|
+
pattern: string;
|
|
122
|
+
level: number;
|
|
123
|
+
occurrenceCount: number;
|
|
124
|
+
}
|
|
125
|
+
export type V619Event = SoundingBoardConsultedEvent | ArchitectLoopDetectedEvent | PrecedentManipulationDetectedEvent | CoderSelfAuditEvent | CoderRetryCircuitBreakerEvent | AgentConflictDetectedEvent | AuthorityHandoffResolvedEvent | SpecStaleDetectedEvent | SpecDriftAcknowledgedEvent | PrmPatternDetectedEvent | PrmCourseCorrectionInjectedEvent | PrmEscalationTriggeredEvent | PrmHardStopEvent;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base error class for all swarm errors.
|
|
3
|
+
* Includes a machine-readable `code` and a user-facing `guidance` string.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SwarmError extends Error {
|
|
6
|
+
readonly code: string;
|
|
7
|
+
readonly guidance: string;
|
|
8
|
+
constructor(message: string, code: string, guidance: string);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Error thrown when configuration loading or validation fails.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ConfigError extends SwarmError {
|
|
14
|
+
constructor(message: string, guidance: string);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Error thrown when a hook execution fails.
|
|
18
|
+
*/
|
|
19
|
+
export declare class HookError extends SwarmError {
|
|
20
|
+
constructor(message: string, guidance: string);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Error thrown when a tool execution fails.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ToolError extends SwarmError {
|
|
26
|
+
constructor(message: string, guidance: string);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Error thrown when CLI operations fail.
|
|
30
|
+
*/
|
|
31
|
+
export declare class CLIError extends SwarmError {
|
|
32
|
+
constructor(message: string, guidance: string);
|
|
33
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module-level flag so the warning fires at most once per process.
|
|
3
|
+
* Exported for test reset purposes only — do not use in production code.
|
|
4
|
+
*/
|
|
5
|
+
export declare let _gitignoreWarningEmitted: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Reset the deduplication flag. Exposed for test isolation only.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resetGitignoreWarningState(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Checks whether `.swarm/` is covered by `.gitignore` or `.git/info/exclude`
|
|
12
|
+
* in the git repo rooted at or above `directory`. If not covered, emits a
|
|
13
|
+
* single `console.warn` (unless `quiet` is true). Fires at most once per process.
|
|
14
|
+
*
|
|
15
|
+
* Never throws — any file-system error silently skips the check.
|
|
16
|
+
*/
|
|
17
|
+
export declare function warnIfSwarmNotGitignored(directory: string, quiet?: boolean): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical path security utilities.
|
|
3
|
+
* Consolidated from 6+ local implementations across the codebase.
|
|
4
|
+
* Use these instead of defining local copies.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Check if a string contains path traversal patterns.
|
|
8
|
+
* Based on the most comprehensive implementation (test-runner.ts).
|
|
9
|
+
* Checks: basic ../, isolated double dots, URL-encoded traversal,
|
|
10
|
+
* double-encoded traversal, Unicode homoglyphs, and encoded separators.
|
|
11
|
+
*/
|
|
12
|
+
export declare function containsPathTraversal(str: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Check if a string contains control characters that could be used
|
|
15
|
+
* for injection attacks. Matches null byte, tab, carriage return, and newline.
|
|
16
|
+
*/
|
|
17
|
+
export declare function containsControlChars(str: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Validate a directory path for safety.
|
|
20
|
+
* Rejects empty paths, paths with traversal, control characters, and absolute paths.
|
|
21
|
+
* Throws an Error if the directory is invalid.
|
|
22
|
+
*
|
|
23
|
+
* @param directory - The directory string to validate
|
|
24
|
+
* @throws Error if directory is invalid
|
|
25
|
+
*/
|
|
26
|
+
export declare function validateDirectory(directory: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Validate that a resolved path stays within an allowed root directory.
|
|
29
|
+
* Resolves symlinks via realpathSync for both the target path and the root,
|
|
30
|
+
* then verifies the resolved target is within the resolved root.
|
|
31
|
+
*
|
|
32
|
+
* @param targetPath - The path to validate (absolute)
|
|
33
|
+
* @param rootPath - The root directory boundary (absolute)
|
|
34
|
+
* @throws Error if the resolved target escapes the root boundary
|
|
35
|
+
*/
|
|
36
|
+
export declare function validateSymlinkBoundary(targetPath: string, rootPath: string): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized regex safety utilities.
|
|
3
|
+
*
|
|
4
|
+
* Every call-site that builds a RegExp from runtime strings
|
|
5
|
+
* (user config, glob patterns, tool input) MUST go through one of
|
|
6
|
+
* these helpers to prevent ReDoS and broken matching.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Escape all regex metacharacters in a string so it can be
|
|
10
|
+
* safely interpolated into a `new RegExp(...)` call.
|
|
11
|
+
*
|
|
12
|
+
* Covers the full set: . * + ? ^ $ { } ( ) | [ ] \
|
|
13
|
+
*/
|
|
14
|
+
export declare function escapeRegex(s: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Convert a simple glob pattern (supports `*` and `?` wildcards)
|
|
17
|
+
* into an anchored, case-insensitive RegExp.
|
|
18
|
+
*
|
|
19
|
+
* All other regex metacharacters in the pattern are escaped first,
|
|
20
|
+
* so filenames containing `.`, `(`, `[`, etc. match literally.
|
|
21
|
+
*
|
|
22
|
+
* Semantics:
|
|
23
|
+
* `*` → `.*` (zero or more of any character)
|
|
24
|
+
* `?` → `.` (exactly one character)
|
|
25
|
+
*
|
|
26
|
+
* This is intentionally simple — it does NOT handle `**` / globstar.
|
|
27
|
+
* For globstar support see `quality/metrics.ts` which has its own
|
|
28
|
+
* path-aware implementation.
|
|
29
|
+
*/
|
|
30
|
+
export declare function simpleGlobToRegex(pattern: string, flags?: string): RegExp;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Plan } from '../config/plan-schema';
|
|
2
|
+
/**
|
|
3
|
+
* Computes SHA-256 hex hash of `.swarm/spec.md` content in the given directory.
|
|
4
|
+
* Returns null if the file does not exist (does NOT throw).
|
|
5
|
+
*/
|
|
6
|
+
export declare function computeSpecHash(directory: string): Promise<string | null>;
|
|
7
|
+
/**
|
|
8
|
+
* Determines if the spec file has changed since the plan was saved.
|
|
9
|
+
* Plans created before this feature (no specHash) are exempt from staleness checks.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isSpecStale(directory: string, plan: Plan): Promise<{
|
|
12
|
+
stale: boolean;
|
|
13
|
+
reason?: string;
|
|
14
|
+
currentHash?: string | null;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Truncate tool output to a maximum number of lines.
|
|
3
|
+
* Preserves tail context (last N lines) in addition to head.
|
|
4
|
+
* Adds a footer with omitted line count and guidance.
|
|
5
|
+
*
|
|
6
|
+
* @param output - The tool output to truncate
|
|
7
|
+
* @param maxLines - Maximum number of lines to keep
|
|
8
|
+
* @param toolName - Optional tool name for the footer
|
|
9
|
+
* @param tailLines - Number of tail lines to preserve (default: 10)
|
|
10
|
+
* @returns Truncated output with footer, or original if within limit
|
|
11
|
+
*/
|
|
12
|
+
export declare function truncateToolOutput(output: string, maxLines: number, toolName?: string, tailLines?: number): string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized task ID validation (#452 item 2).
|
|
3
|
+
*
|
|
4
|
+
* Two strictness levels exist by design:
|
|
5
|
+
*
|
|
6
|
+
* - **Strict** (`isStrictTaskId`): Only numeric N.M or N.M.P format.
|
|
7
|
+
* Use for gate-evidence operations where task IDs map to plan phases/tasks.
|
|
8
|
+
*
|
|
9
|
+
* - **Broad** (`isValidTaskId` / `sanitizeTaskId`): Accepts numeric, retrospective
|
|
10
|
+
* (retro-N), internal tool IDs (sast_scan, etc.), and general alphanumeric.
|
|
11
|
+
* Use for evidence storage, trajectory logging, and other paths that handle
|
|
12
|
+
* non-plan task IDs.
|
|
13
|
+
*
|
|
14
|
+
* Both levels reject path traversal, null bytes, control characters, and
|
|
15
|
+
* other unsafe patterns.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Strict validation: only numeric N.M or N.M.P format.
|
|
19
|
+
* Use for gate-evidence operations where task IDs correspond to plan phases/tasks.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isStrictTaskId(taskId: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Broad validation: accepts numeric, retrospective, internal tool, and
|
|
24
|
+
* general alphanumeric task IDs.
|
|
25
|
+
* Use for evidence storage, trajectory logging, and non-plan task ID paths.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isValidTaskId(taskId: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Throws if the task ID fails strict validation.
|
|
30
|
+
* Use as a guard at the top of functions that build file paths from task IDs.
|
|
31
|
+
*/
|
|
32
|
+
export declare function assertStrictTaskId(taskId: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Validates and returns the task ID (broad validation).
|
|
35
|
+
* Throws with a descriptive message if the ID is invalid.
|
|
36
|
+
* Replaces evidence/manager.ts sanitizeTaskId for new callers.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sanitizeTaskId(taskId: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Validation for tool input: returns error message string if invalid, undefined if valid.
|
|
41
|
+
* Strict numeric format only (for update-task-status, declare-scope, etc.).
|
|
42
|
+
*/
|
|
43
|
+
export declare function validateTaskIdFormat(taskId: string): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.0.0
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"main": "dist/index.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"source": "./src/index.ts",
|
|
11
|
-
"import": "./dist/index.js",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
7
|
"bin": {
|
|
16
8
|
"opencode-swarm": "./dist/cli/index.js"
|
|
17
9
|
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"engines": {
|
|
12
|
+
"bun": ">=1.0.0"
|
|
13
|
+
},
|
|
18
14
|
"license": "MIT",
|
|
19
15
|
"repository": {
|
|
20
16
|
"type": "git",
|
|
@@ -41,21 +37,32 @@
|
|
|
41
37
|
"LICENSE"
|
|
42
38
|
],
|
|
43
39
|
"scripts": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
40
|
+
"clean": "bun -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
41
|
+
"build": "bun run clean && bun run scripts/copy-grammars.ts && bun build src/index.ts --outdir dist --target node --format esm && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm && bun run scripts/copy-grammars.ts --to-dist && tsc --emitDeclarationOnly",
|
|
47
42
|
"typecheck": "tsc --noEmit",
|
|
48
43
|
"test": "bun test",
|
|
44
|
+
"lint": "biome lint .",
|
|
45
|
+
"format": "biome format . --write",
|
|
46
|
+
"check": "biome check --write .",
|
|
47
|
+
"dev": "bun run build && opencode",
|
|
49
48
|
"prepublishOnly": "bun run build"
|
|
50
49
|
},
|
|
51
50
|
"dependencies": {
|
|
52
|
-
"@opencode-swarm/core": "workspace:*",
|
|
53
51
|
"@opencode-ai/plugin": "^1.1.53",
|
|
54
52
|
"@opencode-ai/sdk": "^1.1.53",
|
|
53
|
+
"@vscode/tree-sitter-wasm": "^0.3.0",
|
|
54
|
+
"p-limit": "^7.3.0",
|
|
55
|
+
"picomatch": "^4.0.4",
|
|
56
|
+
"proper-lockfile": "^4.1.2",
|
|
57
|
+
"quick-lru": "^7.3.0",
|
|
58
|
+
"web-tree-sitter": "^0.25.0",
|
|
55
59
|
"zod": "^4.1.8"
|
|
56
60
|
},
|
|
57
61
|
"devDependencies": {
|
|
58
|
-
"
|
|
62
|
+
"@biomejs/biome": "2.3.14",
|
|
63
|
+
"@types/picomatch": "^4.0.3",
|
|
64
|
+
"bun-types": "1.3.8",
|
|
65
|
+
"js-yaml": "^4.1.1",
|
|
59
66
|
"typescript": "^5.7.3"
|
|
60
67
|
}
|
|
61
68
|
}
|
package/dist/architect.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AgentConfig } from '@opencode-ai/sdk';
|
|
2
|
-
export interface AgentDefinition {
|
|
3
|
-
name: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
config: AgentConfig;
|
|
6
|
-
}
|
|
7
|
-
export declare function createArchitectAgent(model: string, customPrompt?: string, customAppendPrompt?: string, adversarialTesting?: boolean): AgentDefinition;
|
package/dist/checkpoint.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { buildCoChangeMatrix, type CoChangeEntry, type DarkMatterOptions, darkMatterToKnowledgeEntries, detectDarkMatter, formatDarkMatterOutput, getStaticEdges, parseGitLog, } from '@opencode-swarm/core';
|
package/dist/compat.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compatibility Layer
|
|
3
|
-
*
|
|
4
|
-
* Re-exports all @opencode-swarm/core exports for backward compatibility.
|
|
5
|
-
*
|
|
6
|
-
* @deprecated Import directly from @opencode-swarm/core instead:
|
|
7
|
-
* import { ... } from '@opencode-swarm/core';
|
|
8
|
-
*
|
|
9
|
-
* This compat layer exists to support existing deep imports and will be
|
|
10
|
-
* removed in a future version.
|
|
11
|
-
*/
|
|
12
|
-
export * from '@opencode-swarm/core';
|
package/dist/config-doctor.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { applySafeAutoFixes, type ConfigBackup, type ConfigDoctorResult, type ConfigFinding, type ConfigFix, createConfigBackup, type FindingSeverity, getConfigPaths, runConfigDoctor, runConfigDoctorWithFixes, shouldRunOnStartup, writeBackupArtifact, writeDoctorArtifact, } from '@opencode-swarm/core';
|
package/dist/detector.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { formatDiagnoseMarkdown, getDiagnoseData, type HealthCheck, handleDiagnoseCommand, } from '@opencode-swarm/core';
|
package/dist/doctor.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type EvidenceEntryData, type EvidenceListData, formatEvidenceListMarkdown, formatTaskEvidenceMarkdown, getEvidenceListData, getTaskEvidenceData, getVerdictEmoji, handleEvidenceCommand, handleEvidenceSummaryCommand, type TaskEvidenceData, } from '@opencode-swarm/core';
|
package/dist/export-service.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type ExportData, formatExportMarkdown, getExportData, handleExportCommand, } from '@opencode-swarm/core';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type DelegationState, formatHandoffMarkdown, getHandoffData, type HandoffData, type PendingQA, } from '@opencode-swarm/core';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { formatHistoryMarkdown, getHistoryData, type HistoryData, handleHistoryCommand, type PhaseHistoryData, } from '@opencode-swarm/core';
|
package/dist/hive-promoter.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { appendKnowledge, appendRejectedLesson, computeConfidence, findNearDuplicate, getPlatformConfigDir, inferTags, jaccardBigram, normalize, readKnowledge, readRejectedLessons, resolveHiveKnowledgePath, resolveHiveRejectedPath, resolveSwarmKnowledgePath, resolveSwarmRejectedPath, rewriteKnowledge, wordBigrams, } from '@opencode-swarm/core';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { HiveKnowledgeEntry, KnowledgeCategory, KnowledgeConfig, KnowledgeEntryBase, MessageInfo, MessagePart, PhaseConfirmationRecord, ProjectConfirmationRecord, RejectedLesson, RetrievalOutcome, SwarmKnowledgeEntry, } from '@opencode-swarm/core';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export type { EntryHealthResult, QuarantinedEntry, ValidationResult, } from '@opencode-swarm/core';
|
|
2
|
-
export { auditEntryHealth, DANGEROUS_COMMAND_PATTERNS, INJECTION_PATTERNS, quarantineEntry, restoreEntry, SECURITY_DEGRADING_PATTERNS, validateLesson, } from '@opencode-swarm/core';
|
package/dist/loader.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { loadPluginConfig, loadPluginConfigWithMeta, loadRawConfigFromPath, MAX_CONFIG_FILE_BYTES, } from '@opencode-swarm/core';
|
package/dist/manager.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { loadFullOutput } from '@opencode-swarm/core';
|
package/dist/models.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_MODELS: Record<string, string>;
|
package/dist/plan-service.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { formatPlanMarkdown, getPlanData, handlePlanCommand, type PlanData, } from '@opencode-swarm/core';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { formatPreflightMarkdown, handlePreflightCommand, type PreflightCheckResult, type PreflightCheckType, type PreflightConfig, type PreflightReport, runPreflight, } from '@opencode-swarm/core';
|
package/dist/profiles.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Language Profiles Bridge
|
|
3
|
-
*
|
|
4
|
-
* Re-exports language profile registry and types from @opencode-swarm/core.
|
|
5
|
-
* Maintains compatibility for legacy import paths.
|
|
6
|
-
*/
|
|
7
|
-
export { type BuildCommand, LANGUAGE_REGISTRY, type LanguageProfile, LanguageRegistry, type LintTool, type TestFramework, } from '@opencode-swarm/core';
|
package/dist/register.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenCode Plugin Tool Registration
|
|
3
|
-
*
|
|
4
|
-
* Wraps core tool logic functions with createSwarmTool() for OpenCode plugin registration.
|
|
5
|
-
* Each tool:
|
|
6
|
-
* - Has plugin-compatible arg schema
|
|
7
|
-
* - Injects directory from plugin context
|
|
8
|
-
* - Returns serialized JSON/text consistent with current tool behavior
|
|
9
|
-
*/
|
|
10
|
-
import type { tool } from '@opencode-ai/plugin';
|
|
11
|
-
type SwarmTool = ReturnType<typeof tool>;
|
|
12
|
-
export declare const check_gate_status: SwarmTool;
|
|
13
|
-
export declare const checkpoint: SwarmTool;
|
|
14
|
-
export declare const complexity_hotspots: SwarmTool;
|
|
15
|
-
export declare const declare_scope: SwarmTool;
|
|
16
|
-
export declare const detect_domains: SwarmTool;
|
|
17
|
-
export declare const diff: SwarmTool;
|
|
18
|
-
export declare const evidence_check: SwarmTool;
|
|
19
|
-
export declare const extract_code_blocks: SwarmTool;
|
|
20
|
-
export declare const gitingest: SwarmTool;
|
|
21
|
-
export declare const imports: SwarmTool;
|
|
22
|
-
export declare const knowledge_query: SwarmTool;
|
|
23
|
-
export declare const lint: SwarmTool;
|
|
24
|
-
export declare const phase_complete: SwarmTool;
|
|
25
|
-
export declare const pkg_audit: SwarmTool;
|
|
26
|
-
export declare const pre_check_batch: SwarmTool;
|
|
27
|
-
export declare const retrieve_summary: SwarmTool;
|
|
28
|
-
export declare const save_plan: SwarmTool;
|
|
29
|
-
export declare const schema_drift: SwarmTool;
|
|
30
|
-
export declare const secretscan: SwarmTool;
|
|
31
|
-
export declare const symbols: SwarmTool;
|
|
32
|
-
export declare const test_runner: SwarmTool;
|
|
33
|
-
export declare const todo_extract: SwarmTool;
|
|
34
|
-
export declare const update_task_status: SwarmTool;
|
|
35
|
-
export declare const write_retro: SwarmTool;
|
|
36
|
-
export {};
|
package/dist/schema.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { writeSnapshot } from '@opencode-swarm/core';
|
package/dist/status-service.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { formatStatusMarkdown, type StatusData } from '@opencode-swarm/core';
|
|
2
|
-
import type { AgentDefinition as OpenCodeAgentDefinition } from '../agents';
|
|
3
|
-
/**
|
|
4
|
-
* Get status data - adapts local OpenCode agents to core type.
|
|
5
|
-
* The core service only uses Object.keys(agents).length for counting,
|
|
6
|
-
* so a safe cast is acceptable.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getStatusData(directory: string, agents: Record<string, OpenCodeAgentDefinition>): Promise<StatusData>;
|
|
9
|
-
/**
|
|
10
|
-
* Handle status command - adapts local OpenCode agents to core type.
|
|
11
|
-
* The core service only uses Object.keys(agents).length for counting,
|
|
12
|
-
* so a safe cast is acceptable.
|
|
13
|
-
*/
|
|
14
|
-
export declare function handleStatusCommand(directory: string, agents: Record<string, OpenCodeAgentDefinition>): Promise<string>;
|
|
15
|
-
export { formatStatusMarkdown, type StatusData };
|