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,25 @@
|
|
|
1
|
+
/** Project Identity Management for opencode-swarm.
|
|
2
|
+
* Handles creation and retrieval of project identity files.
|
|
3
|
+
*/
|
|
4
|
+
export interface ProjectIdentity {
|
|
5
|
+
projectHash: string;
|
|
6
|
+
projectName: string;
|
|
7
|
+
repoUrl?: string;
|
|
8
|
+
absolutePath: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
swarmVersion: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get identity file path for a project hash.
|
|
14
|
+
* Path: {platform-config-dir}/projects/{projectHash}/identity.json
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveIdentityPath(projectHash: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Read existing identity.json or return null if it doesn't exist.
|
|
19
|
+
*/
|
|
20
|
+
export declare function readProjectIdentity(projectHash: string): Promise<ProjectIdentity | null>;
|
|
21
|
+
/**
|
|
22
|
+
* Create or update identity.json for a project.
|
|
23
|
+
* Uses atomic write pattern (write to temp file, then rename).
|
|
24
|
+
*/
|
|
25
|
+
export declare function writeProjectIdentity(directory: string, projectHash: string, projectName: string): Promise<ProjectIdentity>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Detection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides detectProjectLanguages() for scanning a project directory
|
|
5
|
+
* and getProfileForFile() for resolving a language profile from a file path.
|
|
6
|
+
* No tool logic — pure detection only.
|
|
7
|
+
*/
|
|
8
|
+
import { type LanguageProfile } from './profiles.js';
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a language profile from a file path based on its extension.
|
|
11
|
+
* Returns undefined for files with no extension or unknown extensions.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getProfileForFile(filePath: string): LanguageProfile | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Scan a project directory (and immediate subdirectories) to detect active languages.
|
|
16
|
+
* Detection is based on presence of build indicator files or source files with known extensions.
|
|
17
|
+
* Returns unique profiles in priority order (Tier 1 first, then Tier 2, then Tier 3).
|
|
18
|
+
* Skips unreadable directories silently.
|
|
19
|
+
*/
|
|
20
|
+
export declare function detectProjectLanguages(projectDir: string): Promise<LanguageProfile[]>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework Detection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides deterministic multi-signal framework detection.
|
|
5
|
+
* Laravel detection uses at least 2 of 3 signals to avoid false positives.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Detection signals for Laravel framework identification.
|
|
9
|
+
* Each signal independently indicates a Laravel project.
|
|
10
|
+
*/
|
|
11
|
+
export interface LaravelDetectionSignals {
|
|
12
|
+
/** artisan file present in project root (no extension) */
|
|
13
|
+
hasArtisanFile: boolean;
|
|
14
|
+
/** laravel/framework present in composer.json require dependencies */
|
|
15
|
+
hasLaravelFrameworkDep: boolean;
|
|
16
|
+
/** config/app.php present (Laravel config directory structure) */
|
|
17
|
+
hasConfigApp: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Resolved command overlay for a detected Laravel project.
|
|
21
|
+
* All fields are set to best-available commands for CI-quality use.
|
|
22
|
+
*/
|
|
23
|
+
export interface LaravelCommandOverlay {
|
|
24
|
+
/** Primary test command. Always php artisan test for Laravel. */
|
|
25
|
+
testCommand: string;
|
|
26
|
+
/** Lint/format command. Pint if detected, PHP-CS-Fixer otherwise, null if neither. */
|
|
27
|
+
lintCommand: string | null;
|
|
28
|
+
/** Static analysis command. PHPStan if phpstan config is present, null otherwise. */
|
|
29
|
+
staticAnalysisCommand: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Identified static analysis tool. 'larastan' if phpstan.neon contains a
|
|
32
|
+
* Larastan extension reference, 'phpstan' if a phpstan config is present
|
|
33
|
+
* without Larastan markers, null if no phpstan config is present.
|
|
34
|
+
*/
|
|
35
|
+
staticAnalysisTool: 'larastan' | 'phpstan' | null;
|
|
36
|
+
/** Dependency audit command (always composer audit --locked --format=json for Laravel). */
|
|
37
|
+
auditCommand: string;
|
|
38
|
+
/** Whether --parallel flag is supported (Pest parallel testing via artisan). */
|
|
39
|
+
supportsParallel: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Detect whether a directory is a Laravel project.
|
|
43
|
+
* Uses multi-signal detection: at least 2 of 3 signals must be present
|
|
44
|
+
* to minimize false positives against generic Composer PHP projects.
|
|
45
|
+
*
|
|
46
|
+
* Signals checked:
|
|
47
|
+
* 1. artisan file in project root (strong signal — only Laravel projects have this)
|
|
48
|
+
* 2. laravel/framework in composer.json require section
|
|
49
|
+
* 3. config/app.php file (Laravel directory structure)
|
|
50
|
+
*
|
|
51
|
+
* @param directory - Absolute path to the project root
|
|
52
|
+
* @returns true if project is a Laravel project, false otherwise
|
|
53
|
+
*/
|
|
54
|
+
export declare function detectLaravelProject(directory: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Get individual Laravel detection signals for a directory.
|
|
57
|
+
* Exposed for testing and diagnostic purposes.
|
|
58
|
+
*
|
|
59
|
+
* @param directory - Absolute path to the project root
|
|
60
|
+
* @returns LaravelDetectionSignals with each signal's boolean state
|
|
61
|
+
*/
|
|
62
|
+
export declare function getLaravelSignals(directory: string): LaravelDetectionSignals;
|
|
63
|
+
/**
|
|
64
|
+
* Determine whether a project is configured to use Larastan (the Laravel
|
|
65
|
+
* extension for PHPStan) rather than vanilla PHPStan.
|
|
66
|
+
*
|
|
67
|
+
* Detection is content-based: the first 4096 bytes of `phpstan.neon` are
|
|
68
|
+
* read and scanned for a reference to either of the two known Larastan
|
|
69
|
+
* package names (`nunomaduro/larastan` or `larastan/larastan`).
|
|
70
|
+
*
|
|
71
|
+
* Only `phpstan.neon` is checked — `phpstan.neon.dist` is a distribution
|
|
72
|
+
* baseline that projects override locally, so it is not scanned for the
|
|
73
|
+
* Larastan marker.
|
|
74
|
+
*
|
|
75
|
+
* @param directory - Absolute path to the project root
|
|
76
|
+
* @returns true if phpstan.neon contains a Larastan extension reference
|
|
77
|
+
*/
|
|
78
|
+
export declare function isLarastanConfigured(directory: string): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Get the Laravel command overlay for a project directory.
|
|
81
|
+
* Returns null if the directory is not a Laravel project.
|
|
82
|
+
*
|
|
83
|
+
* Command selection logic:
|
|
84
|
+
* - testCommand: always 'php artisan test' (wraps both PHPUnit and Pest)
|
|
85
|
+
* - lintCommand: 'vendor/bin/pint --test' if pint.json present,
|
|
86
|
+
* 'vendor/bin/php-cs-fixer fix --dry-run --diff' if .php-cs-fixer.php present,
|
|
87
|
+
* null otherwise
|
|
88
|
+
* - staticAnalysisCommand: 'vendor/bin/phpstan analyse' if phpstan.neon or phpstan.neon.dist present,
|
|
89
|
+
* null otherwise
|
|
90
|
+
* - staticAnalysisTool: 'larastan' if phpstan.neon contains a Larastan extension reference,
|
|
91
|
+
* 'phpstan' if a phpstan config is present without Larastan markers, null otherwise
|
|
92
|
+
* - auditCommand: always 'composer audit --locked --format=json'
|
|
93
|
+
* - supportsParallel: true (php artisan test --parallel is supported)
|
|
94
|
+
*
|
|
95
|
+
* @param directory - Absolute path to the project root
|
|
96
|
+
* @returns LaravelCommandOverlay if Laravel detected, null if not a Laravel project
|
|
97
|
+
*/
|
|
98
|
+
export declare function getLaravelCommandOverlay(directory: string): LaravelCommandOverlay | null;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Profile Registry - Pure Data Types
|
|
3
|
+
*
|
|
4
|
+
* This file defines the LanguageProfile interface and LanguageRegistry class.
|
|
5
|
+
* No tool logic, no subprocess calls - pure data definitions only.
|
|
6
|
+
*/
|
|
7
|
+
export interface BuildCommand {
|
|
8
|
+
name: string;
|
|
9
|
+
cmd: string;
|
|
10
|
+
detectFile?: string;
|
|
11
|
+
priority: number;
|
|
12
|
+
}
|
|
13
|
+
export interface TestFramework {
|
|
14
|
+
name: string;
|
|
15
|
+
detect: string;
|
|
16
|
+
cmd: string;
|
|
17
|
+
priority: number;
|
|
18
|
+
}
|
|
19
|
+
export interface LintTool {
|
|
20
|
+
name: string;
|
|
21
|
+
detect: string;
|
|
22
|
+
cmd: string;
|
|
23
|
+
priority: number;
|
|
24
|
+
}
|
|
25
|
+
export interface LanguageProfile {
|
|
26
|
+
id: string;
|
|
27
|
+
displayName: string;
|
|
28
|
+
tier: 1 | 2 | 3;
|
|
29
|
+
extensions: string[];
|
|
30
|
+
treeSitter: {
|
|
31
|
+
grammarId: string;
|
|
32
|
+
wasmFile: string;
|
|
33
|
+
};
|
|
34
|
+
build: {
|
|
35
|
+
detectFiles: string[];
|
|
36
|
+
commands: BuildCommand[];
|
|
37
|
+
};
|
|
38
|
+
test: {
|
|
39
|
+
detectFiles: string[];
|
|
40
|
+
frameworks: TestFramework[];
|
|
41
|
+
};
|
|
42
|
+
lint: {
|
|
43
|
+
detectFiles: string[];
|
|
44
|
+
linters: LintTool[];
|
|
45
|
+
};
|
|
46
|
+
audit: {
|
|
47
|
+
detectFiles: string[];
|
|
48
|
+
command: string | null;
|
|
49
|
+
outputFormat: 'json' | 'text';
|
|
50
|
+
};
|
|
51
|
+
sast: {
|
|
52
|
+
nativeRuleSet: string | null;
|
|
53
|
+
semgrepSupport: 'ga' | 'beta' | 'experimental' | 'none';
|
|
54
|
+
};
|
|
55
|
+
prompts: {
|
|
56
|
+
coderConstraints: string[];
|
|
57
|
+
reviewerChecklist: string[];
|
|
58
|
+
testConstraints?: string[];
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export declare class LanguageRegistry {
|
|
62
|
+
private profiles;
|
|
63
|
+
private extensionIndex;
|
|
64
|
+
constructor();
|
|
65
|
+
register(profile: LanguageProfile): void;
|
|
66
|
+
get(id: string): LanguageProfile | undefined;
|
|
67
|
+
getById(id: string): LanguageProfile | undefined;
|
|
68
|
+
getByExtension(ext: string): LanguageProfile | undefined;
|
|
69
|
+
getAll(): LanguageProfile[];
|
|
70
|
+
getTier(tier: 1 | 2 | 3): LanguageProfile[];
|
|
71
|
+
}
|
|
72
|
+
export declare const LANGUAGE_REGISTRY: LanguageRegistry;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Parser } from './runtime';
|
|
2
|
+
export interface LanguageDefinition {
|
|
3
|
+
id: string;
|
|
4
|
+
extensions: string[];
|
|
5
|
+
commentNodes: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const languageDefinitions: LanguageDefinition[];
|
|
8
|
+
export declare function getLanguageForExtension(extension: string): LanguageDefinition | undefined;
|
|
9
|
+
export declare function listSupportedLanguages(): readonly LanguageDefinition[];
|
|
10
|
+
/**
|
|
11
|
+
* Get a parser for a specific file path
|
|
12
|
+
* Determines language from file extension, loads grammar, returns configured parser
|
|
13
|
+
*
|
|
14
|
+
* @param filePath - Absolute or relative path to the file
|
|
15
|
+
* @returns Parser instance or null if language not supported
|
|
16
|
+
*/
|
|
17
|
+
export declare function getParserForFile(filePath: string): Promise<Parser | null>;
|
|
18
|
+
/**
|
|
19
|
+
* Check if a file path has a supported language extension
|
|
20
|
+
*
|
|
21
|
+
* @param filePath - Path to check
|
|
22
|
+
* @returns true if extension is supported
|
|
23
|
+
*/
|
|
24
|
+
export declare function isSupportedFile(filePath: string): boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Parser as ParserType } from 'web-tree-sitter';
|
|
2
|
+
export type Parser = ParserType;
|
|
3
|
+
/**
|
|
4
|
+
* Parser cache to avoid reloading grammars multiple times per session
|
|
5
|
+
*/
|
|
6
|
+
export declare const parserCache: Map<string, ParserType>;
|
|
7
|
+
/**
|
|
8
|
+
* Initialize a parser for the given language
|
|
9
|
+
* Loads WASM from dist/lang/grammars/ (copied during build)
|
|
10
|
+
*
|
|
11
|
+
* @param languageId - Language identifier (e.g., 'javascript', 'python')
|
|
12
|
+
* @returns Configured Parser instance
|
|
13
|
+
* @throws Error if WASM file not found or failed to load
|
|
14
|
+
*/
|
|
15
|
+
export declare function loadGrammar(languageId: string): Promise<ParserType>;
|
|
16
|
+
/**
|
|
17
|
+
* Check if a language grammar is available (WASM file exists)
|
|
18
|
+
* Does not load the grammar, just checks existence
|
|
19
|
+
*
|
|
20
|
+
* @param languageId - Language identifier
|
|
21
|
+
* @returns true if grammar is available
|
|
22
|
+
*/
|
|
23
|
+
export declare function isGrammarAvailable(languageId: string): Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Clear the parser cache (useful for testing)
|
|
26
|
+
*/
|
|
27
|
+
export declare function clearParserCache(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Get list of initialized languages
|
|
30
|
+
*/
|
|
31
|
+
export declare function getInitializedLanguages(): string[];
|
|
32
|
+
/**
|
|
33
|
+
* Get list of supported language IDs
|
|
34
|
+
*/
|
|
35
|
+
export declare function getSupportedLanguages(): string[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adversarial tests for model fallback schema and state (v6.33)
|
|
3
|
+
*
|
|
4
|
+
* Tests attack vectors against:
|
|
5
|
+
* 1. AgentOverrideConfigSchema fallback_models field
|
|
6
|
+
* 2. AgentSessionState model_fallback_index and modelFallbackExhausted
|
|
7
|
+
*
|
|
8
|
+
* ADVERSARIAL TEST CASES:
|
|
9
|
+
* 1. fallback_models with 1000 entries — should Zod-reject (max 3)
|
|
10
|
+
* 2. fallback_models with non-string values (numbers, objects, null)
|
|
11
|
+
* 3. fallback_models with empty strings ""
|
|
12
|
+
* 4. fallback_models with extremely long model name strings (10K chars)
|
|
13
|
+
* 5. model_fallback_index set to NaN — should it be NaN or coerced?
|
|
14
|
+
* 6. model_fallback_index set to -1 — negative index
|
|
15
|
+
* 7. model_fallback_index set to MAX_SAFE_INTEGER — overflow risk?
|
|
16
|
+
* 8. modelFallbackExhausted set to undefined in deserialization — should default to false
|
|
17
|
+
* 9. Circular reference in fallback_models array elements
|
|
18
|
+
* 10. Prototype pollution via __proto__ in fallback_models
|
|
19
|
+
* 11. AgentOverrideConfigSchema.parse with all fields including fallback_models, verify no field collision
|
|
20
|
+
* 12. Serialization with model_fallback_index as a float (3.14) — should survive round-trip
|
|
21
|
+
*/
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for model fallback schema and state (v6.33)
|
|
3
|
+
*
|
|
4
|
+
* Covers:
|
|
5
|
+
* 1. AgentOverrideConfigSchema fallback_models field parsing
|
|
6
|
+
* 2. State initialization of model_fallback_index and modelFallbackExhausted
|
|
7
|
+
* 3. Serialization round-trip for both fields
|
|
8
|
+
* 4. Deserialization defaults when fields are missing
|
|
9
|
+
* 5. Migration safety via ensureAgentSession
|
|
10
|
+
* 6. Edge cases for schema and state
|
|
11
|
+
*/
|
|
12
|
+
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,47 @@
|
|
|
1
|
+
export type MutationOutcome = 'killed' | 'survived' | 'timeout' | 'error' | 'equivalent' | 'skipped';
|
|
2
|
+
export interface MutationPatch {
|
|
3
|
+
id: string;
|
|
4
|
+
filePath: string;
|
|
5
|
+
functionName: string;
|
|
6
|
+
mutationType: string;
|
|
7
|
+
patch: string;
|
|
8
|
+
lineNumber?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface MutationResult {
|
|
11
|
+
patchId: string;
|
|
12
|
+
filePath: string;
|
|
13
|
+
functionName: string;
|
|
14
|
+
mutationType: string;
|
|
15
|
+
outcome: MutationOutcome;
|
|
16
|
+
testOutput?: string;
|
|
17
|
+
durationMs: number;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface MutationReport {
|
|
21
|
+
totalMutants: number;
|
|
22
|
+
killed: number;
|
|
23
|
+
survived: number;
|
|
24
|
+
timeout: number;
|
|
25
|
+
equivalent: number;
|
|
26
|
+
skipped: number;
|
|
27
|
+
errors: number;
|
|
28
|
+
killRate: number;
|
|
29
|
+
adjustedKillRate: number;
|
|
30
|
+
perFunction: Map<string, {
|
|
31
|
+
killed: number;
|
|
32
|
+
survived: number;
|
|
33
|
+
total: number;
|
|
34
|
+
equivalent: number;
|
|
35
|
+
skipped: number;
|
|
36
|
+
killRate: number;
|
|
37
|
+
}>;
|
|
38
|
+
results: MutationResult[];
|
|
39
|
+
durationMs: number;
|
|
40
|
+
budgetMs: number;
|
|
41
|
+
budgetExceeded: boolean;
|
|
42
|
+
timestamp: string;
|
|
43
|
+
}
|
|
44
|
+
export declare const MAX_MUTATIONS_PER_FUNCTION = 10;
|
|
45
|
+
export declare function executeMutation(patch: MutationPatch, testCommand: string[], _testFiles: string[], workingDir: string): Promise<MutationResult>;
|
|
46
|
+
export declare function computeReport(results: MutationResult[], durationMs: number, budgetMs?: number): MutationReport;
|
|
47
|
+
export declare function executeMutationSuite(patches: MutationPatch[], testCommand: string[], testFiles: string[], workingDir: string, budgetMs?: number, onProgress?: (completed: number, total: number, result: MutationResult) => void, sourceFiles?: Map<string, string>): Promise<MutationReport>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { MutationPatch } from './engine.js';
|
|
2
|
+
/** Result of equivalence check for a single mutant */
|
|
3
|
+
export interface EquivalenceResult {
|
|
4
|
+
patchId: string;
|
|
5
|
+
isEquivalent: boolean;
|
|
6
|
+
method: 'static' | 'llm_judge' | 'skipped';
|
|
7
|
+
confidence: number;
|
|
8
|
+
reason: string;
|
|
9
|
+
}
|
|
10
|
+
/** Callback signature for LLM judge — injected by caller */
|
|
11
|
+
export type LLMJudgeCallback = (original: string, mutated: string, context: string) => Promise<{
|
|
12
|
+
isEquivalent: boolean;
|
|
13
|
+
confidence: number;
|
|
14
|
+
reason: string;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Stage 1: Static equivalence filter.
|
|
18
|
+
* Strips comments (single-line // and multi-line /* *\/), console.log/debugger statements,
|
|
19
|
+
* trailing whitespace, and blank lines. Returns true if the stripped versions are identical.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isStaticallyEquivalent(originalCode: string, mutatedCode: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Check a single mutant for equivalence using two-stage approach.
|
|
24
|
+
* Stage 1: static analysis. Stage 2: LLM judge (if provided and Stage 1 didn't determine equivalence).
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkEquivalence(patch: MutationPatch, originalCode: string, mutatedCode: string, llmJudge?: LLMJudgeCallback): Promise<EquivalenceResult>;
|
|
27
|
+
/**
|
|
28
|
+
* Batch check multiple mutants for equivalence.
|
|
29
|
+
* Returns results for all patches.
|
|
30
|
+
*/
|
|
31
|
+
export declare function batchCheckEquivalence(patches: Array<{
|
|
32
|
+
patch: MutationPatch;
|
|
33
|
+
originalCode: string;
|
|
34
|
+
mutatedCode: string;
|
|
35
|
+
}>, llmJudge?: LLMJudgeCallback): Promise<EquivalenceResult[]>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { MutationReport, MutationResult } from './engine.js';
|
|
2
|
+
export type MutationGateVerdict = 'pass' | 'warn' | 'fail';
|
|
3
|
+
export interface MutationGateResult {
|
|
4
|
+
verdict: MutationGateVerdict;
|
|
5
|
+
killRate: number;
|
|
6
|
+
adjustedKillRate: number;
|
|
7
|
+
totalMutants: number;
|
|
8
|
+
killed: number;
|
|
9
|
+
survived: number;
|
|
10
|
+
threshold: number;
|
|
11
|
+
warnThreshold: number;
|
|
12
|
+
message: string;
|
|
13
|
+
/** Survived mutants that need test improvements */
|
|
14
|
+
survivedMutants: MutationResult[];
|
|
15
|
+
/** Prompt for targeted test improvement (non-empty when verdict is 'warn' or 'fail') */
|
|
16
|
+
testImprovementPrompt: string;
|
|
17
|
+
}
|
|
18
|
+
/** Default thresholds */
|
|
19
|
+
export declare const PASS_THRESHOLD = 0.8;
|
|
20
|
+
export declare const WARN_THRESHOLD = 0.6;
|
|
21
|
+
/**
|
|
22
|
+
* Evaluate a mutation report against quality gate thresholds.
|
|
23
|
+
* @param report - The mutation report to evaluate
|
|
24
|
+
* @param passThreshold - Kill rate at or above this passes (default: 0.80)
|
|
25
|
+
* @param warnThreshold - Kill rate at or above this warns (default: 0.60)
|
|
26
|
+
* @returns MutationGateResult with verdict and details
|
|
27
|
+
*/
|
|
28
|
+
export declare function evaluateMutationGate(report: MutationReport, passThreshold?: number, warnThreshold?: number): MutationGateResult;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM-based mutation patch generator.
|
|
3
|
+
*
|
|
4
|
+
* Uses the opencode SDK to call an LLM session and generate mutation testing patches
|
|
5
|
+
* for specified source files. Produces MutationPatch[] for use by executeMutationSuite.
|
|
6
|
+
*/
|
|
7
|
+
import type { ToolContext } from '@opencode-ai/plugin';
|
|
8
|
+
import type { MutationPatch } from './engine.js';
|
|
9
|
+
/**
|
|
10
|
+
* Generate mutation testing patches for the given source files using an LLM.
|
|
11
|
+
*
|
|
12
|
+
* @param files - Array of file paths to generate mutations for
|
|
13
|
+
* @param ctx - Optional ToolContext providing sessionID and directory
|
|
14
|
+
* @returns Promise<MutationPatch[]> array of mutation patches, never throws
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateMutants(files: string[], ctx?: ToolContext): Promise<MutationPatch[]>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type AgentType = 'architect' | 'coder' | 'reviewer' | 'test_engineer' | 'explorer' | 'sme' | 'critic' | 'docs' | 'designer';
|
|
2
|
+
export type OutputType = 'review' | 'test' | 'research' | 'analysis' | 'summary';
|
|
3
|
+
export interface AgentOutputMetadata {
|
|
4
|
+
agent: AgentType;
|
|
5
|
+
type: OutputType;
|
|
6
|
+
taskId: string;
|
|
7
|
+
phase: number;
|
|
8
|
+
timestamp: string;
|
|
9
|
+
durationMs?: number;
|
|
10
|
+
success?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Write agent output to persistent storage
|
|
14
|
+
* Output: .swarm/outputs/phase-N/task-N.M/{agent}-{type}-{timestamp}.md
|
|
15
|
+
*/
|
|
16
|
+
export declare function writeAgentOutput(directory: string, metadata: AgentOutputMetadata, content: string): Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Read agent output from persistent storage
|
|
19
|
+
*/
|
|
20
|
+
export declare function readAgentOutput(directory: string, phase: number, taskId: string): Promise<{
|
|
21
|
+
metadata: AgentOutputMetadata;
|
|
22
|
+
content: string;
|
|
23
|
+
}[]>;
|
|
24
|
+
/**
|
|
25
|
+
* List all agent outputs for a phase
|
|
26
|
+
*/
|
|
27
|
+
export declare function listAgentOutputs(directory: string, phase?: number): Promise<AgentOutputMetadata[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type AgentOutputMetadata, type AgentType, listAgentOutputs, type OutputType, readAgentOutput, writeAgentOutput, } from './agent-writer';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface TaskNode {
|
|
2
|
+
id: string;
|
|
3
|
+
phase: number;
|
|
4
|
+
description: string;
|
|
5
|
+
depends: string[];
|
|
6
|
+
dependents: string[];
|
|
7
|
+
status: 'pending' | 'in_progress' | 'complete' | 'blocked';
|
|
8
|
+
}
|
|
9
|
+
export interface DependencyGraph {
|
|
10
|
+
tasks: Map<string, TaskNode>;
|
|
11
|
+
phases: Map<number, string[]>;
|
|
12
|
+
roots: string[];
|
|
13
|
+
leaves: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parse plan.json and build dependency graph
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseDependencyGraph(planPath: string): DependencyGraph;
|
|
19
|
+
/**
|
|
20
|
+
* Get tasks that can run in parallel (no unresolved dependencies)
|
|
21
|
+
*/
|
|
22
|
+
export declare function getRunnableTasks(graph: DependencyGraph): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Check if a task is blocked (has incomplete dependencies)
|
|
25
|
+
*/
|
|
26
|
+
export declare function isTaskBlocked(graph: DependencyGraph, taskId: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Get execution order (topological sort)
|
|
29
|
+
*/
|
|
30
|
+
export declare function getExecutionOrder(graph: DependencyGraph): string[];
|
|
31
|
+
/**
|
|
32
|
+
* Find all paths from root to a task
|
|
33
|
+
*/
|
|
34
|
+
export declare function getDependencyChain(graph: DependencyGraph, taskId: string): string[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { createNoopDispatcher, type NoopDispatcher, } from './noop-dispatcher.js';
|
|
2
|
+
export { createParallelDispatcher, type ParallelDispatcher, } from './parallel-dispatcher.js';
|
|
3
|
+
export type { DispatchDecision, DispatcherConfig, RunSlot, TaskExecutionHandle, } from './types.js';
|
|
4
|
+
import { type NoopDispatcher } from './noop-dispatcher.js';
|
|
5
|
+
import { type ParallelDispatcher } from './parallel-dispatcher.js';
|
|
6
|
+
import type { DispatcherConfig } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Factory: returns the appropriate dispatcher based on config.
|
|
9
|
+
* When disabled or maxConcurrentTasks <= 1, returns the no-op dispatcher.
|
|
10
|
+
* When enabled and maxConcurrentTasks > 1, returns the parallel dispatcher.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createDispatcher(config: DispatcherConfig): NoopDispatcher | ParallelDispatcher;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* No-op dispatcher — returned when parallelization is disabled (the default).
|
|
3
|
+
*
|
|
4
|
+
* All dispatch methods return a 'reject' decision with reason
|
|
5
|
+
* 'parallelization_disabled'. No file I/O, no side effects, no imports of
|
|
6
|
+
* production runtime modules.
|
|
7
|
+
*
|
|
8
|
+
* PR 2 will implement the enabled dispatcher path behind the same factory
|
|
9
|
+
* interface.
|
|
10
|
+
*/
|
|
11
|
+
import type { DispatchDecision, DispatcherConfig, TaskExecutionHandle } from './types.js';
|
|
12
|
+
export interface NoopDispatcher {
|
|
13
|
+
readonly config: DispatcherConfig;
|
|
14
|
+
dispatch(taskId: string): DispatchDecision;
|
|
15
|
+
handles(): TaskExecutionHandle[];
|
|
16
|
+
shutdown(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function createNoopDispatcher(config: DispatcherConfig): NoopDispatcher;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for the no-op dispatcher (Phase 5 dark foundation).
|
|
3
|
+
*
|
|
4
|
+
* Proves:
|
|
5
|
+
* - disabled config → reject with 'parallelization_disabled'
|
|
6
|
+
* - no file I/O, no side effects on dispatch
|
|
7
|
+
* - handles() always empty
|
|
8
|
+
* - shutdown() is a no-op
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parallel dispatcher — enabled path for Stage B concurrent task execution.
|
|
3
|
+
*
|
|
4
|
+
* Uses p-limit for bounded concurrency. Returns 'dispatch' when a slot is
|
|
5
|
+
* available, 'defer' when at max capacity, 'reject' when disabled.
|
|
6
|
+
*
|
|
7
|
+
* PR 2: implements the enabled dispatcher alongside the existing NoopDispatcher.
|
|
8
|
+
* No production code imports this directly — it is wired in via createDispatcher().
|
|
9
|
+
*/
|
|
10
|
+
import type { DispatchDecision, DispatcherConfig, TaskExecutionHandle } from './types.js';
|
|
11
|
+
export interface ParallelDispatcher {
|
|
12
|
+
readonly config: DispatcherConfig;
|
|
13
|
+
dispatch(taskId: string): DispatchDecision;
|
|
14
|
+
handles(): TaskExecutionHandle[];
|
|
15
|
+
releaseSlot(slotId: string): void;
|
|
16
|
+
shutdown(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function createParallelDispatcher(config: DispatcherConfig): ParallelDispatcher;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-only surfaces for the parallel task dispatcher (dark — PR 1 foundation).
|
|
3
|
+
*
|
|
4
|
+
* No runtime behavior here. PR 2 will implement the enabled path.
|
|
5
|
+
*/
|
|
6
|
+
export interface DispatcherConfig {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
maxConcurrentTasks: number;
|
|
9
|
+
evidenceLockTimeoutMs: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RunSlot {
|
|
12
|
+
slotId: string;
|
|
13
|
+
taskId: string;
|
|
14
|
+
runId: string;
|
|
15
|
+
startedAt: number;
|
|
16
|
+
}
|
|
17
|
+
export type DispatchDecision = {
|
|
18
|
+
action: 'dispatch';
|
|
19
|
+
reason: string;
|
|
20
|
+
slot: RunSlot;
|
|
21
|
+
} | {
|
|
22
|
+
action: 'defer';
|
|
23
|
+
reason: string;
|
|
24
|
+
} | {
|
|
25
|
+
action: 'reject';
|
|
26
|
+
reason: string;
|
|
27
|
+
};
|
|
28
|
+
export interface TaskExecutionHandle {
|
|
29
|
+
slotId: string;
|
|
30
|
+
taskId: string;
|
|
31
|
+
runId: string;
|
|
32
|
+
cancel(): void;
|
|
33
|
+
}
|