agentic-qe 3.3.3 → 3.3.4
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/.claude/agents/v3/README.md +100 -0
- package/.claude/agents/v3/qe-accessibility-auditor.md +112 -11
- package/.claude/agents/v3/qe-bdd-generator.md +40 -0
- package/.claude/agents/v3/qe-coverage-specialist.md +39 -0
- package/.claude/agents/v3/qe-defect-predictor.md +36 -0
- package/.claude/agents/v3/qe-gap-detector.md +39 -0
- package/.claude/agents/v3/qe-pattern-learner.md +31 -0
- package/.claude/agents/v3/qe-product-factors-assessor.md +34 -0
- package/.claude/agents/v3/qe-quality-criteria-recommender.md +32 -0
- package/.claude/agents/v3/qe-quality-gate.md +39 -0
- package/.claude/agents/v3/qe-requirements-validator.md +37 -0
- package/.claude/agents/v3/qe-risk-assessor.md +33 -0
- package/.claude/agents/v3/qe-tdd-specialist.md +33 -0
- package/.claude/agents/v3/qe-test-architect.md +36 -0
- package/.claude/skills/README.md +30 -104
- package/.claude/skills/a11y-ally/SKILL.md +1658 -0
- package/.claude/skills/qcsd-ideation-swarm/SKILL.md +1750 -0
- package/.claude/skills/skills-manifest.json +78 -8
- package/README.md +18 -4
- package/package.json +1 -1
- package/scripts/demo-warmup.sh +45 -0
- package/scripts/fetch-content.js +460 -0
- package/v3/CHANGELOG.md +101 -0
- package/v3/README.md +11 -6
- package/v3/assets/agents/v3/README.md +100 -0
- package/v3/assets/agents/v3/qe-accessibility-auditor.md +112 -11
- package/v3/assets/agents/v3/qe-bdd-generator.md +40 -0
- package/v3/assets/agents/v3/qe-coverage-specialist.md +39 -0
- package/v3/assets/agents/v3/qe-defect-predictor.md +36 -0
- package/v3/assets/agents/v3/qe-gap-detector.md +39 -0
- package/v3/assets/agents/v3/qe-pattern-learner.md +31 -0
- package/v3/assets/agents/v3/qe-product-factors-assessor.md +34 -0
- package/v3/assets/agents/v3/qe-quality-criteria-recommender.md +32 -0
- package/v3/assets/agents/v3/qe-quality-gate.md +39 -0
- package/v3/assets/agents/v3/qe-requirements-validator.md +37 -0
- package/v3/assets/agents/v3/qe-risk-assessor.md +33 -0
- package/v3/assets/agents/v3/qe-tdd-specialist.md +33 -0
- package/v3/assets/agents/v3/qe-test-architect.md +36 -0
- package/v3/assets/hooks/cross-phase-memory.yaml +253 -0
- package/v3/assets/skills/a11y-ally/SKILL.md +1658 -0
- package/v3/assets/skills/qcsd-ideation-swarm/SKILL.md +1750 -0
- package/v3/assets/skills/skills-manifest.json +753 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/model-router-bridge.js +6 -4
- package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -1
- package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js +13 -8
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -1
- package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js +9 -6
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -1
- package/v3/dist/benchmarks/performance-benchmarks.d.ts.map +1 -1
- package/v3/dist/benchmarks/performance-benchmarks.js +5 -3
- package/v3/dist/benchmarks/performance-benchmarks.js.map +1 -1
- package/v3/dist/cli/bundle.js +27611 -23175
- package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
- package/v3/dist/cli/commands/hooks.js +288 -0
- package/v3/dist/cli/commands/hooks.js.map +1 -1
- package/v3/dist/cli/commands/sync.d.ts.map +1 -1
- package/v3/dist/cli/commands/sync.js +0 -6
- package/v3/dist/cli/commands/sync.js.map +1 -1
- package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -1
- package/v3/dist/cli/handlers/init-handler.js +11 -0
- package/v3/dist/cli/handlers/init-handler.js.map +1 -1
- package/v3/dist/cli/index.js +14 -2
- package/v3/dist/cli/index.js.map +1 -1
- package/v3/dist/cli/scheduler/persistent-scheduler.d.ts.map +1 -1
- package/v3/dist/cli/scheduler/persistent-scheduler.js +3 -2
- package/v3/dist/cli/scheduler/persistent-scheduler.js.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.js +6 -4
- package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/native-learning-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/native-learning-provider.js +10 -8
- package/v3/dist/coordination/consensus/providers/native-learning-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/ollama-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/ollama-provider.js +5 -4
- package/v3/dist/coordination/consensus/providers/ollama-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/openai-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/openai-provider.js +5 -4
- package/v3/dist/coordination/consensus/providers/openai-provider.js.map +1 -1
- package/v3/dist/coordination/constants.d.ts +198 -0
- package/v3/dist/coordination/constants.d.ts.map +1 -0
- package/v3/dist/coordination/constants.js +210 -0
- package/v3/dist/coordination/constants.js.map +1 -0
- package/v3/dist/coordination/mincut/dream-integration.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/dream-integration.js +5 -1
- package/v3/dist/coordination/mincut/dream-integration.js.map +1 -1
- package/v3/dist/coordination/queen-coordinator.d.ts +9 -1
- package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
- package/v3/dist/coordination/queen-coordinator.js +49 -9
- package/v3/dist/coordination/queen-coordinator.js.map +1 -1
- package/v3/dist/coordination/task-executor.d.ts.map +1 -1
- package/v3/dist/coordination/task-executor.js +7 -8
- package/v3/dist/coordination/task-executor.js.map +1 -1
- package/v3/dist/coordination/workflow-orchestrator.d.ts.map +1 -1
- package/v3/dist/coordination/workflow-orchestrator.js +261 -0
- package/v3/dist/coordination/workflow-orchestrator.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.d.ts +14 -3
- package/v3/dist/domains/chaos-resilience/plugin.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.js +96 -0
- package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.js +12 -8
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.js.map +1 -1
- package/v3/dist/domains/code-intelligence/plugin.d.ts +13 -3
- package/v3/dist/domains/code-intelligence/plugin.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/plugin.js +85 -0
- package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js +3 -2
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js.map +1 -1
- package/v3/dist/domains/constants.d.ts +481 -0
- package/v3/dist/domains/constants.d.ts.map +1 -0
- package/v3/dist/domains/constants.js +503 -0
- package/v3/dist/domains/constants.js.map +1 -0
- package/v3/dist/domains/contract-testing/plugin.d.ts +6 -1
- package/v3/dist/domains/contract-testing/plugin.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/plugin.js +80 -1
- package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
- package/v3/dist/domains/contract-testing/services/contract-validator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/services/contract-validator.js +5 -4
- package/v3/dist/domains/contract-testing/services/contract-validator.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/hnsw-index.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/hnsw-index.js +1 -0
- package/v3/dist/domains/coverage-analysis/services/hnsw-index.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/coordinator.d.ts +2 -2
- package/v3/dist/domains/defect-intelligence/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/coordinator.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/plugin.d.ts +6 -1
- package/v3/dist/domains/defect-intelligence/plugin.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/plugin.js +101 -0
- package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.js +3 -2
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.js.map +1 -1
- package/v3/dist/domains/domain-interface.d.ts.map +1 -1
- package/v3/dist/domains/domain-interface.js +24 -9
- package/v3/dist/domains/domain-interface.js.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.d.ts +2 -1
- package/v3/dist/domains/learning-optimization/plugin.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.js +49 -0
- package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator.d.ts +90 -1
- package/v3/dist/domains/quality-assessment/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator.js +310 -0
- package/v3/dist/domains/quality-assessment/coordinator.js.map +1 -1
- package/v3/dist/domains/requirements-validation/index.d.ts +1 -0
- package/v3/dist/domains/requirements-validation/index.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/index.js +2 -0
- package/v3/dist/domains/requirements-validation/index.js.map +1 -1
- package/v3/dist/domains/requirements-validation/plugin.d.ts +13 -1
- package/v3/dist/domains/requirements-validation/plugin.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/plugin.js +94 -0
- package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.d.ts +245 -0
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.d.ts.map +1 -0
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js +1143 -0
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js.map +1 -0
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js +3 -2
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js.map +1 -1
- package/v3/dist/domains/security-compliance/plugin.d.ts +3 -2
- package/v3/dist/domains/security-compliance/plugin.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/plugin.js +64 -0
- package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts +25 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.js +160 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts +48 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js +385 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts +20 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.js +99 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +62 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js +329 -0
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts +46 -0
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js +180 -0
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/index.d.ts +14 -0
- package/v3/dist/domains/security-compliance/services/scanners/index.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/index.js +16 -0
- package/v3/dist/domains/security-compliance/services/scanners/index.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts +92 -0
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js +440 -0
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts +78 -0
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js +179 -0
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +91 -0
- package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/scanner-types.js +15 -0
- package/v3/dist/domains/security-compliance/services/scanners/scanner-types.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/security-patterns.d.ts +16 -0
- package/v3/dist/domains/security-compliance/services/scanners/security-patterns.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/scanners/security-patterns.js +507 -0
- package/v3/dist/domains/security-compliance/services/scanners/security-patterns.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-auditor.js +2 -1
- package/v3/dist/domains/security-compliance/services/security-auditor.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-scanner.d.ts +20 -213
- package/v3/dist/domains/security-compliance/services/security-scanner.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-scanner.js +37 -2013
- package/v3/dist/domains/security-compliance/services/security-scanner.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/semgrep-integration.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/semgrep-integration.js +7 -6
- package/v3/dist/domains/security-compliance/services/semgrep-integration.js.map +1 -1
- package/v3/dist/domains/test-execution/services/auth-state-manager.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/auth-state-manager.js +6 -4
- package/v3/dist/domains/test-execution/services/auth-state-manager.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts +55 -0
- package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.js +407 -0
- package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts +122 -0
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js +325 -0
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts +97 -0
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js +297 -0
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/index.d.ts +22 -0
- package/v3/dist/domains/test-execution/services/e2e/index.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/index.js +52 -0
- package/v3/dist/domains/test-execution/services/e2e/index.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts +51 -0
- package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/result-collector.js +133 -0
- package/v3/dist/domains/test-execution/services/e2e/result-collector.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/step-executors.d.ts +48 -0
- package/v3/dist/domains/test-execution/services/e2e/step-executors.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/step-executors.js +422 -0
- package/v3/dist/domains/test-execution/services/e2e/step-executors.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.d.ts +49 -0
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js +146 -0
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/types.d.ts +138 -0
- package/v3/dist/domains/test-execution/services/e2e/types.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/types.js +65 -0
- package/v3/dist/domains/test-execution/services/e2e/types.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts +33 -0
- package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.js +114 -0
- package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.js.map +1 -0
- package/v3/dist/domains/test-execution/services/e2e-runner.d.ts +18 -392
- package/v3/dist/domains/test-execution/services/e2e-runner.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e-runner.js +25 -1757
- package/v3/dist/domains/test-execution/services/e2e-runner.js.map +1 -1
- package/v3/dist/domains/test-execution/services/flaky-detector.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/flaky-detector.js +12 -9
- package/v3/dist/domains/test-execution/services/flaky-detector.js.map +1 -1
- package/v3/dist/domains/test-execution/services/retry-handler.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/retry-handler.js +7 -5
- package/v3/dist/domains/test-execution/services/retry-handler.js.map +1 -1
- package/v3/dist/domains/test-execution/services/test-executor.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/test-executor.js +4 -3
- package/v3/dist/domains/test-execution/services/test-executor.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/coordinator.d.ts +70 -0
- package/v3/dist/domains/visual-accessibility/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/coordinator.js +172 -0
- package/v3/dist/domains/visual-accessibility/coordinator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.d.ts +2 -1
- package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.js +63 -0
- package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +3 -2
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js +22 -12
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.js +3 -2
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-regression.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-regression.js +3 -2
- package/v3/dist/domains/visual-accessibility/services/visual-regression.js.map +1 -1
- package/v3/dist/hooks/cross-phase-hooks.d.ts +42 -0
- package/v3/dist/hooks/cross-phase-hooks.d.ts.map +1 -0
- package/v3/dist/hooks/cross-phase-hooks.js +338 -0
- package/v3/dist/hooks/cross-phase-hooks.js.map +1 -0
- package/v3/dist/hooks/index.d.ts +9 -0
- package/v3/dist/hooks/index.d.ts.map +1 -0
- package/v3/dist/hooks/index.js +9 -0
- package/v3/dist/hooks/index.js.map +1 -0
- package/v3/dist/init/agents-installer.d.ts.map +1 -1
- package/v3/dist/init/agents-installer.js +6 -4
- package/v3/dist/init/agents-installer.js.map +1 -1
- package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -1
- package/v3/dist/init/enhancements/claude-flow-adapter.js +15 -9
- package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -1
- package/v3/dist/init/enhancements/detector.js +6 -4
- package/v3/dist/init/enhancements/detector.js.map +1 -1
- package/v3/dist/init/init-wizard.d.ts +5 -0
- package/v3/dist/init/init-wizard.d.ts.map +1 -1
- package/v3/dist/init/init-wizard.js +74 -11
- package/v3/dist/init/init-wizard.js.map +1 -1
- package/v3/dist/init/migration/data-migrator.d.ts.map +1 -1
- package/v3/dist/init/migration/data-migrator.js +6 -4
- package/v3/dist/init/migration/data-migrator.js.map +1 -1
- package/v3/dist/init/phases/02-analysis.js +2 -2
- package/v3/dist/init/phases/02-analysis.js.map +1 -1
- package/v3/dist/init/phases/04-database.d.ts.map +1 -1
- package/v3/dist/init/phases/04-database.js +0 -1
- package/v3/dist/init/phases/04-database.js.map +1 -1
- package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -1
- package/v3/dist/init/phases/11-claude-md.js +25 -0
- package/v3/dist/init/phases/11-claude-md.js.map +1 -1
- package/v3/dist/init/phases/12-verification.d.ts.map +1 -1
- package/v3/dist/init/phases/12-verification.js +2 -1
- package/v3/dist/init/phases/12-verification.js.map +1 -1
- package/v3/dist/init/project-analyzer.d.ts.map +1 -1
- package/v3/dist/init/project-analyzer.js +12 -8
- package/v3/dist/init/project-analyzer.js.map +1 -1
- package/v3/dist/init/skills-installer.d.ts.map +1 -1
- package/v3/dist/init/skills-installer.js +6 -4
- package/v3/dist/init/skills-installer.js.map +1 -1
- package/v3/dist/init/token-bootstrap.d.ts.map +1 -1
- package/v3/dist/init/token-bootstrap.js +2 -1
- package/v3/dist/init/token-bootstrap.js.map +1 -1
- package/v3/dist/integrations/agent-booster-wasm/index.d.ts.map +1 -1
- package/v3/dist/integrations/agent-booster-wasm/index.js +8 -4
- package/v3/dist/integrations/agent-booster-wasm/index.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js +3 -2
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/client.d.ts.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/client.js +9 -6
- package/v3/dist/integrations/browser/agent-browser/client.js.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/command-executor.d.ts.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/command-executor.js +3 -2
- package/v3/dist/integrations/browser/agent-browser/command-executor.js.map +1 -1
- package/v3/dist/integrations/browser/index.d.ts +1 -0
- package/v3/dist/integrations/browser/index.d.ts.map +1 -1
- package/v3/dist/integrations/browser/index.js +6 -0
- package/v3/dist/integrations/browser/index.js.map +1 -1
- package/v3/dist/integrations/browser/web-content-fetcher.d.ts +154 -0
- package/v3/dist/integrations/browser/web-content-fetcher.d.ts.map +1 -0
- package/v3/dist/integrations/browser/web-content-fetcher.js +529 -0
- package/v3/dist/integrations/browser/web-content-fetcher.js.map +1 -0
- package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/threshold-tuner.js +3 -2
- package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -1
- package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/wasm-loader.js +3 -2
- package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -1
- package/v3/dist/integrations/n8n/agent-factory.d.ts.map +1 -1
- package/v3/dist/integrations/n8n/agent-factory.js +6 -4
- package/v3/dist/integrations/n8n/agent-factory.js.map +1 -1
- package/v3/dist/integrations/rl-suite/persistence/q-value-store.d.ts.map +1 -1
- package/v3/dist/integrations/rl-suite/persistence/q-value-store.js.map +1 -1
- package/v3/dist/integrations/ruvector/sona-persistence.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/sona-persistence.js +6 -4
- package/v3/dist/integrations/ruvector/sona-persistence.js.map +1 -1
- package/v3/dist/integrations/vibium/client.d.ts.map +1 -1
- package/v3/dist/integrations/vibium/client.js +3 -2
- package/v3/dist/integrations/vibium/client.js.map +1 -1
- package/v3/dist/kernel/agent-coordinator.d.ts +1 -1
- package/v3/dist/kernel/agent-coordinator.d.ts.map +1 -1
- package/v3/dist/kernel/agent-coordinator.js +4 -4
- package/v3/dist/kernel/agent-coordinator.js.map +1 -1
- package/v3/dist/kernel/constants.d.ts +155 -0
- package/v3/dist/kernel/constants.d.ts.map +1 -0
- package/v3/dist/kernel/constants.js +169 -0
- package/v3/dist/kernel/constants.js.map +1 -0
- package/v3/dist/kernel/event-bus.d.ts +8 -0
- package/v3/dist/kernel/event-bus.d.ts.map +1 -1
- package/v3/dist/kernel/event-bus.js +79 -17
- package/v3/dist/kernel/event-bus.js.map +1 -1
- package/v3/dist/kernel/hybrid-backend.d.ts.map +1 -1
- package/v3/dist/kernel/hybrid-backend.js +4 -3
- package/v3/dist/kernel/hybrid-backend.js.map +1 -1
- package/v3/dist/kernel/kernel.d.ts.map +1 -1
- package/v3/dist/kernel/kernel.js +3 -2
- package/v3/dist/kernel/kernel.js.map +1 -1
- package/v3/dist/kernel/memory-backend.d.ts.map +1 -1
- package/v3/dist/kernel/memory-backend.js +4 -3
- package/v3/dist/kernel/memory-backend.js.map +1 -1
- package/v3/dist/kernel/unified-memory.d.ts.map +1 -1
- package/v3/dist/kernel/unified-memory.js +14 -11
- package/v3/dist/kernel/unified-memory.js.map +1 -1
- package/v3/dist/kernel/unified-persistence.js +3 -2
- package/v3/dist/kernel/unified-persistence.js.map +1 -1
- package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -1
- package/v3/dist/learning/aqe-learning-engine.js +12 -8
- package/v3/dist/learning/aqe-learning-engine.js.map +1 -1
- package/v3/dist/learning/dream/index.d.ts +1 -1
- package/v3/dist/learning/dream/index.d.ts.map +1 -1
- package/v3/dist/learning/dream/index.js +3 -1
- package/v3/dist/learning/dream/index.js.map +1 -1
- package/v3/dist/learning/dream/spreading-activation.d.ts +41 -0
- package/v3/dist/learning/dream/spreading-activation.d.ts.map +1 -1
- package/v3/dist/learning/dream/spreading-activation.js +79 -0
- package/v3/dist/learning/dream/spreading-activation.js.map +1 -1
- package/v3/dist/learning/pattern-store.d.ts.map +1 -1
- package/v3/dist/learning/pattern-store.js +16 -6
- package/v3/dist/learning/pattern-store.js.map +1 -1
- package/v3/dist/learning/real-embeddings.d.ts.map +1 -1
- package/v3/dist/learning/real-embeddings.js +7 -1
- package/v3/dist/learning/real-embeddings.js.map +1 -1
- package/v3/dist/learning/sqlite-persistence.d.ts +1 -1
- package/v3/dist/learning/sqlite-persistence.d.ts.map +1 -1
- package/v3/dist/learning/sqlite-persistence.js.map +1 -1
- package/v3/dist/logging/console-logger.d.ts +96 -0
- package/v3/dist/logging/console-logger.d.ts.map +1 -0
- package/v3/dist/logging/console-logger.js +247 -0
- package/v3/dist/logging/console-logger.js.map +1 -0
- package/v3/dist/logging/index.d.ts +42 -0
- package/v3/dist/logging/index.d.ts.map +1 -0
- package/v3/dist/logging/index.js +39 -0
- package/v3/dist/logging/index.js.map +1 -0
- package/v3/dist/logging/logger-factory.d.ts +145 -0
- package/v3/dist/logging/logger-factory.d.ts.map +1 -0
- package/v3/dist/logging/logger-factory.js +218 -0
- package/v3/dist/logging/logger-factory.js.map +1 -0
- package/v3/dist/logging/logger.d.ts +89 -0
- package/v3/dist/logging/logger.d.ts.map +1 -0
- package/v3/dist/logging/logger.js +74 -0
- package/v3/dist/logging/logger.js.map +1 -0
- package/v3/dist/mcp/bundle.js +11334 -7497
- package/v3/dist/mcp/handlers/agent-handlers.js +2 -2
- package/v3/dist/mcp/handlers/agent-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/core-handlers.d.ts +2 -0
- package/v3/dist/mcp/handlers/core-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/core-handlers.js +33 -0
- package/v3/dist/mcp/handlers/core-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/cross-phase-handlers.d.ts +110 -0
- package/v3/dist/mcp/handlers/cross-phase-handlers.d.ts.map +1 -0
- package/v3/dist/mcp/handlers/cross-phase-handlers.js +216 -0
- package/v3/dist/mcp/handlers/cross-phase-handlers.js.map +1 -0
- package/v3/dist/mcp/handlers/domain-handler-configs.d.ts +151 -0
- package/v3/dist/mcp/handlers/domain-handler-configs.d.ts.map +1 -0
- package/v3/dist/mcp/handlers/domain-handler-configs.js +486 -0
- package/v3/dist/mcp/handlers/domain-handler-configs.js.map +1 -0
- package/v3/dist/mcp/handlers/domain-handlers.d.ts +174 -120
- package/v3/dist/mcp/handlers/domain-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/domain-handlers.js +178 -1049
- package/v3/dist/mcp/handlers/domain-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/handler-factory.d.ts +182 -0
- package/v3/dist/mcp/handlers/handler-factory.d.ts.map +1 -0
- package/v3/dist/mcp/handlers/handler-factory.js +327 -0
- package/v3/dist/mcp/handlers/handler-factory.js.map +1 -0
- package/v3/dist/mcp/handlers/index.d.ts +1 -0
- package/v3/dist/mcp/handlers/index.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/index.js +2 -0
- package/v3/dist/mcp/handlers/index.js.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.d.ts +1 -0
- package/v3/dist/mcp/handlers/task-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.js +91 -7
- package/v3/dist/mcp/handlers/task-handlers.js.map +1 -1
- package/v3/dist/mcp/server.d.ts.map +1 -1
- package/v3/dist/mcp/server.js +107 -1
- package/v3/dist/mcp/server.js.map +1 -1
- package/v3/dist/mcp/types.d.ts +5 -3
- package/v3/dist/mcp/types.d.ts.map +1 -1
- package/v3/dist/memory/cross-phase-memory.d.ts +55 -0
- package/v3/dist/memory/cross-phase-memory.d.ts.map +1 -0
- package/v3/dist/memory/cross-phase-memory.js +265 -0
- package/v3/dist/memory/cross-phase-memory.js.map +1 -0
- package/v3/dist/memory/index.d.ts +9 -0
- package/v3/dist/memory/index.d.ts.map +1 -0
- package/v3/dist/memory/index.js +9 -0
- package/v3/dist/memory/index.js.map +1 -0
- package/v3/dist/shared/io/file-reader.d.ts.map +1 -1
- package/v3/dist/shared/io/file-reader.js +3 -2
- package/v3/dist/shared/io/file-reader.js.map +1 -1
- package/v3/dist/shared/utils/binary-insert.d.ts +85 -0
- package/v3/dist/shared/utils/binary-insert.d.ts.map +1 -0
- package/v3/dist/shared/utils/binary-insert.js +122 -0
- package/v3/dist/shared/utils/binary-insert.js.map +1 -0
- package/v3/dist/shared/utils/index.d.ts +1 -0
- package/v3/dist/shared/utils/index.d.ts.map +1 -1
- package/v3/dist/shared/utils/index.js +1 -0
- package/v3/dist/shared/utils/index.js.map +1 -1
- package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -1
- package/v3/dist/strange-loop/belief-reconciler.js +3 -2
- package/v3/dist/strange-loop/belief-reconciler.js.map +1 -1
- package/v3/dist/sync/claude-flow-bridge.d.ts.map +1 -1
- package/v3/dist/sync/claude-flow-bridge.js +6 -4
- package/v3/dist/sync/claude-flow-bridge.js.map +1 -1
- package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -1
- package/v3/dist/sync/cloud/postgres-writer.js +0 -1
- package/v3/dist/sync/cloud/postgres-writer.js.map +1 -1
- package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -1
- package/v3/dist/sync/readers/sqlite-reader.js +3 -2
- package/v3/dist/sync/readers/sqlite-reader.js.map +1 -1
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.d.ts.map +1 -1
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js +3 -2
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js.map +1 -1
- package/v3/dist/test-scheduling/git-aware/test-selector.d.ts.map +1 -1
- package/v3/dist/test-scheduling/git-aware/test-selector.js +3 -2
- package/v3/dist/test-scheduling/git-aware/test-selector.js.map +1 -1
- package/v3/dist/types/cross-phase-signals.d.ts +119 -0
- package/v3/dist/types/cross-phase-signals.d.ts.map +1 -0
- package/v3/dist/types/cross-phase-signals.js +33 -0
- package/v3/dist/types/cross-phase-signals.js.map +1 -0
- package/v3/dist/types/index.d.ts +9 -0
- package/v3/dist/types/index.d.ts.map +1 -0
- package/v3/dist/types/index.js +9 -0
- package/v3/dist/types/index.js.map +1 -0
- package/v3/dist/workers/worker-manager.d.ts.map +1 -1
- package/v3/dist/workers/worker-manager.js +3 -2
- package/v3/dist/workers/worker-manager.js.map +1 -1
- package/v3/dist/workflows/browser/workflow-loader.d.ts +3 -3
- package/v3/dist/workflows/browser/workflow-loader.d.ts.map +1 -1
- package/v3/dist/workflows/browser/workflow-loader.js.map +1 -1
- package/v3/package.json +4 -1
|
@@ -8,1066 +8,195 @@
|
|
|
8
8
|
* - Learning feedback confirming pattern updates
|
|
9
9
|
* - Worker efficiency and load balance stats
|
|
10
10
|
* - Complexity analysis
|
|
11
|
+
*
|
|
12
|
+
* Refactored in Milestone 1.3 to use the handler factory pattern,
|
|
13
|
+
* reducing code from ~1,578 lines to ~400 lines.
|
|
14
|
+
*
|
|
15
|
+
* @module mcp/handlers/domain-handlers
|
|
11
16
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { createTaskExecutor } from '../../coordination/task-executor';
|
|
15
|
-
import { MetricsCollector } from '../metrics';
|
|
16
|
-
import { getTaskRouter } from '../services/task-router';
|
|
17
|
-
// ============================================================================
|
|
18
|
-
// V2-Compatible Response Helpers
|
|
19
|
-
// ============================================================================
|
|
20
|
-
function generateTestId() {
|
|
21
|
-
// Use crypto.randomUUID() for cryptographically secure unique IDs
|
|
22
|
-
return `test-${randomUUID()}`;
|
|
23
|
-
}
|
|
24
|
-
function generateAgentId(type) {
|
|
25
|
-
// Use crypto.randomUUID() for cryptographically secure unique IDs
|
|
26
|
-
return `${type}-${randomUUID()}`;
|
|
27
|
-
}
|
|
17
|
+
import { createDomainHandler, resetTaskExecutor as resetExecutor } from './handler-factory';
|
|
18
|
+
import { testGenerateConfig, testExecuteConfig, coverageAnalyzeConfig, qualityAssessConfig, securityScanConfig, contractValidateConfig, accessibilityTestConfig, chaosTestConfig, defectPredictConfig, requirementsValidateConfig, codeIndexConfig, } from './domain-handler-configs';
|
|
28
19
|
// ============================================================================
|
|
29
|
-
//
|
|
20
|
+
// Task Executor Management
|
|
30
21
|
// ============================================================================
|
|
31
22
|
/**
|
|
32
|
-
*
|
|
33
|
-
* Returns routing decision with model tier recommendation
|
|
23
|
+
* Reset executor when fleet is reinitialized
|
|
34
24
|
*/
|
|
35
|
-
async function routeDomainTask(taskDescription, domain, codeContext) {
|
|
36
|
-
try {
|
|
37
|
-
const router = await getTaskRouter();
|
|
38
|
-
const result = await router.routeTask({
|
|
39
|
-
task: taskDescription,
|
|
40
|
-
domain,
|
|
41
|
-
codeContext,
|
|
42
|
-
agentType: `qe-${domain}`,
|
|
43
|
-
});
|
|
44
|
-
return result;
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
// Log but don't fail - routing is advisory
|
|
48
|
-
console.error(`[DomainHandlers] Routing failed for ${domain}: ${error}`);
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
// ============================================================================
|
|
53
|
-
// V2-Compatible Response Helpers
|
|
54
|
-
// ============================================================================
|
|
55
|
-
function analyzeComplexity(sourceCode) {
|
|
56
|
-
const lines = sourceCode.split('\n').length;
|
|
57
|
-
const branches = (sourceCode.match(/if|switch|for|while|catch/g) || []).length;
|
|
58
|
-
const score = lines + branches * 2;
|
|
59
|
-
return {
|
|
60
|
-
score,
|
|
61
|
-
level: branches > 5 ? 'high' : branches > 2 ? 'medium' : 'low'
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function generateV2Tests(sourceCode, testType, language, count) {
|
|
65
|
-
const tests = [];
|
|
66
|
-
const funcRegex = /(?:function\s+(\w+)|const\s+(\w+)\s*=|def\s+(\w+)|func\s+(\w+))/g;
|
|
67
|
-
const functions = [];
|
|
68
|
-
let match;
|
|
69
|
-
while ((match = funcRegex.exec(sourceCode)) !== null) {
|
|
70
|
-
const funcName = match[1] || match[2] || match[3] || match[4];
|
|
71
|
-
if (funcName)
|
|
72
|
-
functions.push(funcName);
|
|
73
|
-
}
|
|
74
|
-
// Generate tests for each function
|
|
75
|
-
for (let i = 0; i < Math.min(functions.length, count); i++) {
|
|
76
|
-
const funcName = functions[i] || `exampleFunction`;
|
|
77
|
-
tests.push({
|
|
78
|
-
id: generateTestId(),
|
|
79
|
-
name: `test_${funcName}_${i}`,
|
|
80
|
-
type: testType,
|
|
81
|
-
parameters: [],
|
|
82
|
-
assertions: [`${funcName}() === null`],
|
|
83
|
-
expectedResult: null,
|
|
84
|
-
estimatedDuration: testType === 'integration' ? 2000 : 1000,
|
|
85
|
-
aiGenerated: true,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
// Add integration test if needed
|
|
89
|
-
if (testType === 'integration' || count > functions.length) {
|
|
90
|
-
tests.push({
|
|
91
|
-
id: generateTestId(),
|
|
92
|
-
name: `integration_ComponentA_${tests.length}`,
|
|
93
|
-
type: 'integration',
|
|
94
|
-
parameters: [],
|
|
95
|
-
assertions: ['ComponentA integration test passes'],
|
|
96
|
-
expectedResult: null,
|
|
97
|
-
estimatedDuration: 2000,
|
|
98
|
-
aiGenerated: true,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
// Add edge case tests
|
|
102
|
-
const edgeCases = ['high-complexity', 'deep-nesting', 'null-handling', 'empty-input'];
|
|
103
|
-
for (let i = tests.length; i < count && i - tests.length < edgeCases.length; i++) {
|
|
104
|
-
tests.push({
|
|
105
|
-
id: generateTestId(),
|
|
106
|
-
name: `edge_case_${edgeCases[i - tests.length]}_${i}`,
|
|
107
|
-
type: 'unit',
|
|
108
|
-
parameters: [],
|
|
109
|
-
assertions: [`${edgeCases[i - tests.length]} edge case handled`],
|
|
110
|
-
expectedResult: null,
|
|
111
|
-
estimatedDuration: 1500,
|
|
112
|
-
aiGenerated: true,
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
return tests;
|
|
116
|
-
}
|
|
117
|
-
function generateV2AIInsights(complexity, testType) {
|
|
118
|
-
const recommendations = [];
|
|
119
|
-
if (complexity.level === 'high') {
|
|
120
|
-
recommendations.push('Consider refactoring complex functions');
|
|
121
|
-
recommendations.push('Add unit tests for each branch');
|
|
122
|
-
}
|
|
123
|
-
recommendations.push('Consider adding edge case tests');
|
|
124
|
-
recommendations.push('Add error handling tests');
|
|
125
|
-
if (testType === 'integration') {
|
|
126
|
-
recommendations.push('Add mock external dependencies');
|
|
127
|
-
recommendations.push('Test API contract boundaries');
|
|
128
|
-
}
|
|
129
|
-
return {
|
|
130
|
-
recommendations,
|
|
131
|
-
estimatedTime: `${Math.round(complexity.score * 0.5)} minutes`,
|
|
132
|
-
confidence: 0.85
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function generateV2LearningFeedback(agentType) {
|
|
136
|
-
return {
|
|
137
|
-
enabled: true,
|
|
138
|
-
agentId: generateAgentId(agentType),
|
|
139
|
-
message: 'Agent learned from this execution - patterns and Q-values updated'
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
function detectAntiPatterns(sourceCode, language) {
|
|
143
|
-
const antiPatterns = [];
|
|
144
|
-
const lines = sourceCode.split('\n');
|
|
145
|
-
if (sourceCode.includes('eval(')) {
|
|
146
|
-
antiPatterns.push({
|
|
147
|
-
type: 'dangerous-eval',
|
|
148
|
-
line: lines.findIndex(l => l.includes('eval(')) + 1,
|
|
149
|
-
severity: 'critical',
|
|
150
|
-
suggestion: 'Replace eval() with safer alternatives'
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
if (sourceCode.includes('var ') && (language === 'javascript' || language === 'typescript')) {
|
|
154
|
-
antiPatterns.push({
|
|
155
|
-
type: 'var-usage',
|
|
156
|
-
line: lines.findIndex(l => l.includes('var ')) + 1,
|
|
157
|
-
severity: 'low',
|
|
158
|
-
suggestion: 'Use const or let instead of var'
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
if (sourceCode.includes('any') && language === 'typescript') {
|
|
162
|
-
antiPatterns.push({
|
|
163
|
-
type: 'any-type',
|
|
164
|
-
line: lines.findIndex(l => l.includes('any')) + 1,
|
|
165
|
-
severity: 'medium',
|
|
166
|
-
suggestion: 'Replace any with specific types'
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
return antiPatterns;
|
|
170
|
-
}
|
|
171
|
-
// Cached task executor
|
|
172
|
-
let taskExecutor = null;
|
|
173
|
-
function getTaskExecutor() {
|
|
174
|
-
if (!taskExecutor) {
|
|
175
|
-
const { kernel } = getFleetState();
|
|
176
|
-
if (!kernel) {
|
|
177
|
-
throw new Error('Kernel not initialized');
|
|
178
|
-
}
|
|
179
|
-
taskExecutor = createTaskExecutor(kernel);
|
|
180
|
-
}
|
|
181
|
-
return taskExecutor;
|
|
182
|
-
}
|
|
183
|
-
// Reset executor when fleet is reinitialized
|
|
184
25
|
export function resetTaskExecutor() {
|
|
185
|
-
|
|
26
|
+
resetExecutor();
|
|
186
27
|
}
|
|
187
28
|
// ============================================================================
|
|
188
|
-
//
|
|
29
|
+
// Domain Handlers - Created via Factory Pattern
|
|
189
30
|
// ============================================================================
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
331
|
-
const executor = getTaskExecutor();
|
|
332
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
333
|
-
if (!task) {
|
|
334
|
-
return {
|
|
335
|
-
success: false,
|
|
336
|
-
error: 'Task not found after submission',
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
const result = await executor.execute(task.task);
|
|
340
|
-
if (!result.success) {
|
|
341
|
-
return {
|
|
342
|
-
success: false,
|
|
343
|
-
error: result.error || 'Task execution failed',
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
const data = result.data;
|
|
347
|
-
// Generate V2-compatible worker stats and retry stats using real metrics
|
|
348
|
-
const parallelism = params.parallelism || 4;
|
|
349
|
-
const realRetryStats = MetricsCollector.getRetryStats();
|
|
350
|
-
const workersUsed = MetricsCollector.getWorkersUsed();
|
|
351
|
-
const workerStats = {
|
|
352
|
-
workersUsed: workersUsed > 0 ? workersUsed : Math.min(parallelism, data.total || 1),
|
|
353
|
-
efficiency: MetricsCollector.getWorkerEfficiency(),
|
|
354
|
-
loadBalance: MetricsCollector.getLoadBalanceScore(),
|
|
355
|
-
avgExecutionTime: data.duration / Math.max(data.total, 1),
|
|
356
|
-
};
|
|
357
|
-
const retryStats = {
|
|
358
|
-
totalRetries: realRetryStats.totalRetries,
|
|
359
|
-
successfulRetries: realRetryStats.successfulRetries,
|
|
360
|
-
maxRetriesReached: realRetryStats.maxRetriesReached,
|
|
361
|
-
};
|
|
362
|
-
const learning = generateV2LearningFeedback('test-executor');
|
|
363
|
-
return {
|
|
364
|
-
success: true,
|
|
365
|
-
data: {
|
|
366
|
-
// V2-compatible fields
|
|
367
|
-
workerStats,
|
|
368
|
-
retryStats,
|
|
369
|
-
results: (() => {
|
|
370
|
-
const testDurations = MetricsCollector.getTestDurations(data.total || 0);
|
|
371
|
-
return Array.from({ length: data.total || 0 }, (_, i) => ({
|
|
372
|
-
id: generateTestId(),
|
|
373
|
-
name: `test_case_${i}`,
|
|
374
|
-
status: i < (data.passed || 0) ? 'passed' : 'failed',
|
|
375
|
-
duration: testDurations[i] || 200,
|
|
376
|
-
retries: 0,
|
|
377
|
-
}));
|
|
378
|
-
})(),
|
|
379
|
-
summary: {
|
|
380
|
-
totalTests: data.total,
|
|
381
|
-
passRate: data.total > 0 ? (data.passed / data.total) * 100 : 0,
|
|
382
|
-
avgDuration: data.duration / Math.max(data.total, 1),
|
|
383
|
-
parallelEfficiency: workerStats.efficiency,
|
|
384
|
-
},
|
|
385
|
-
learning,
|
|
386
|
-
// V3 fields
|
|
387
|
-
taskId: submitResult.value,
|
|
388
|
-
status: 'completed',
|
|
389
|
-
total: data.total,
|
|
390
|
-
passed: data.passed,
|
|
391
|
-
failed: data.failed,
|
|
392
|
-
duration: data.duration,
|
|
393
|
-
coverage: data.coverage,
|
|
394
|
-
},
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
catch (error) {
|
|
398
|
-
return {
|
|
399
|
-
success: false,
|
|
400
|
-
error: `Failed to execute tests: ${error instanceof Error ? error.message : String(error)}`,
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
}
|
|
31
|
+
/**
|
|
32
|
+
* Handle test generation tasks
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const result = await handleTestGenerate({
|
|
37
|
+
* sourceCode: 'function add(a, b) { return a + b; }',
|
|
38
|
+
* language: 'typescript',
|
|
39
|
+
* testType: 'unit',
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export const handleTestGenerate = createDomainHandler(testGenerateConfig);
|
|
44
|
+
/**
|
|
45
|
+
* Handle test execution tasks
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const result = await handleTestExecute({
|
|
50
|
+
* testFiles: ['tests/unit/*.test.ts'],
|
|
51
|
+
* parallel: true,
|
|
52
|
+
* parallelism: 4,
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export const handleTestExecute = createDomainHandler(testExecuteConfig);
|
|
57
|
+
/**
|
|
58
|
+
* Handle coverage analysis tasks
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const result = await handleCoverageAnalyze({
|
|
63
|
+
* target: 'src/',
|
|
64
|
+
* detectGaps: true,
|
|
65
|
+
* mlPowered: true,
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export const handleCoverageAnalyze = createDomainHandler(coverageAnalyzeConfig);
|
|
70
|
+
/**
|
|
71
|
+
* Handle quality assessment tasks
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const result = await handleQualityAssess({
|
|
76
|
+
* runGate: true,
|
|
77
|
+
* threshold: 80,
|
|
78
|
+
* metrics: ['coverage', 'complexity'],
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export const handleQualityAssess = createDomainHandler(qualityAssessConfig);
|
|
83
|
+
/**
|
|
84
|
+
* Handle security scan tasks
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const result = await handleSecurityScan({
|
|
89
|
+
* sast: true,
|
|
90
|
+
* dast: false,
|
|
91
|
+
* target: 'src/',
|
|
92
|
+
* });
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export const handleSecurityScan = createDomainHandler(securityScanConfig);
|
|
96
|
+
/**
|
|
97
|
+
* Handle contract validation tasks
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```typescript
|
|
101
|
+
* const result = await handleContractValidate({
|
|
102
|
+
* contractPath: 'contracts/api.yaml',
|
|
103
|
+
* checkBreakingChanges: true,
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
export const handleContractValidate = createDomainHandler(contractValidateConfig);
|
|
108
|
+
/**
|
|
109
|
+
* Handle accessibility test tasks
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const result = await handleAccessibilityTest({
|
|
114
|
+
* url: 'https://example.com',
|
|
115
|
+
* standard: 'wcag21-aa',
|
|
116
|
+
* });
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export const handleAccessibilityTest = createDomainHandler(accessibilityTestConfig);
|
|
120
|
+
/**
|
|
121
|
+
* Handle chaos test tasks
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* const result = await handleChaosTest({
|
|
126
|
+
* faultType: 'latency',
|
|
127
|
+
* target: 'api-service',
|
|
128
|
+
* duration: 30000,
|
|
129
|
+
* dryRun: true,
|
|
130
|
+
* });
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
export const handleChaosTest = createDomainHandler(chaosTestConfig);
|
|
134
|
+
/**
|
|
135
|
+
* Handle defect prediction tasks
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* const result = await handleDefectPredict({
|
|
140
|
+
* target: 'src/',
|
|
141
|
+
* lookback: 30,
|
|
142
|
+
* minConfidence: 0.7,
|
|
143
|
+
* });
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
export const handleDefectPredict = createDomainHandler(defectPredictConfig);
|
|
147
|
+
/**
|
|
148
|
+
* Handle requirements validation tasks
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* const result = await handleRequirementsValidate({
|
|
153
|
+
* requirementsPath: 'docs/requirements.md',
|
|
154
|
+
* generateBDD: true,
|
|
155
|
+
* });
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
export const handleRequirementsValidate = createDomainHandler(requirementsValidateConfig);
|
|
159
|
+
/**
|
|
160
|
+
* Handle code indexing tasks
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```typescript
|
|
164
|
+
* const result = await handleCodeIndex({
|
|
165
|
+
* target: 'src/',
|
|
166
|
+
* incremental: true,
|
|
167
|
+
* });
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
export const handleCodeIndex = createDomainHandler(codeIndexConfig);
|
|
404
171
|
// ============================================================================
|
|
405
|
-
//
|
|
172
|
+
// Handler Registry (for dynamic dispatch)
|
|
406
173
|
// ============================================================================
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
// ADR-051: Include routing decision
|
|
429
|
-
routingTier: routingResult?.decision.tier,
|
|
430
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
431
|
-
},
|
|
432
|
-
timeout: 180000,
|
|
433
|
-
});
|
|
434
|
-
if (!submitResult.success) {
|
|
435
|
-
return {
|
|
436
|
-
success: false,
|
|
437
|
-
error: submitResult.error.message,
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
const executor = getTaskExecutor();
|
|
441
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
442
|
-
if (!task) {
|
|
443
|
-
return {
|
|
444
|
-
success: false,
|
|
445
|
-
error: 'Task not found after submission',
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
const result = await executor.execute(task.task);
|
|
449
|
-
if (!result.success) {
|
|
450
|
-
return {
|
|
451
|
-
success: false,
|
|
452
|
-
error: result.error || 'Task execution failed',
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
const data = result.data;
|
|
456
|
-
// Generate V2-compatible detailed coverage response
|
|
457
|
-
const learning = generateV2LearningFeedback('coverage-analyzer');
|
|
458
|
-
// Generate detailed gap analysis
|
|
459
|
-
const detailedGaps = (data.gaps || []).map((gap, i) => ({
|
|
460
|
-
id: `gap-${Date.now()}-${i}`,
|
|
461
|
-
file: gap?.file || `src/module${i}.ts`,
|
|
462
|
-
line: gap?.lines?.[0] || (10 + i * 5),
|
|
463
|
-
uncoveredLines: gap?.lines || [10 + i * 5, 20 + i * 5],
|
|
464
|
-
type: (gap?.type || 'uncovered-line'),
|
|
465
|
-
severity: (gap?.severity || (i < 2 ? 'high' : 'medium')),
|
|
466
|
-
reason: gap?.reason || 'Missing test case',
|
|
467
|
-
priority: gap?.priority || (i < 2 ? 'high' : 'medium'),
|
|
468
|
-
suggestion: gap?.suggestedTest || `Add test for line ${10 + i * 5}`,
|
|
469
|
-
suggestedTest: gap?.suggestedTest || `Add test for line ${10 + i * 5}`,
|
|
470
|
-
riskScore: gap?.riskScore || (0.8 - i * 0.1),
|
|
471
|
-
confidence: gap?.confidence || 0.85,
|
|
472
|
-
}));
|
|
473
|
-
return {
|
|
474
|
-
success: true,
|
|
475
|
-
data: {
|
|
476
|
-
// V2-compatible fields
|
|
477
|
-
// Use deterministic variations based on file index instead of random
|
|
478
|
-
coverageByFile: Array.from({ length: data.totalFiles || 5 }, (_, i) => {
|
|
479
|
-
// Create predictable variation: alternating +/- based on index
|
|
480
|
-
const variation = ((i % 3) - 1) * 5; // -5, 0, +5 pattern
|
|
481
|
-
return {
|
|
482
|
-
file: `src/module${i}.ts`,
|
|
483
|
-
lineCoverage: Math.max(0, Math.min(100, data.lineCoverage + variation)),
|
|
484
|
-
branchCoverage: Math.max(0, Math.min(100, data.branchCoverage + variation - 2)),
|
|
485
|
-
functionCoverage: Math.max(0, Math.min(100, data.functionCoverage + variation + 2)),
|
|
486
|
-
};
|
|
487
|
-
}),
|
|
488
|
-
gapAnalysis: {
|
|
489
|
-
totalGaps: detailedGaps.length,
|
|
490
|
-
highPriority: detailedGaps.filter((g) => g.priority === 'high').length,
|
|
491
|
-
gaps: detailedGaps,
|
|
492
|
-
},
|
|
493
|
-
trends: {
|
|
494
|
-
lineCoverageTrend: 'stable',
|
|
495
|
-
branchCoverageTrend: 'improving',
|
|
496
|
-
weeklyChange: 2.5,
|
|
497
|
-
},
|
|
498
|
-
aiInsights: {
|
|
499
|
-
recommendations: [
|
|
500
|
-
'Focus on uncovered branches in authentication module',
|
|
501
|
-
'Add edge case tests for error handling paths',
|
|
502
|
-
'Consider property-based testing for utility functions',
|
|
503
|
-
],
|
|
504
|
-
riskAssessment: data.lineCoverage < 70 ? 'high' : data.lineCoverage < 85 ? 'medium' : 'low',
|
|
505
|
-
confidence: 0.88,
|
|
506
|
-
},
|
|
507
|
-
learning,
|
|
508
|
-
// V3 fields
|
|
509
|
-
taskId: submitResult.value,
|
|
510
|
-
lineCoverage: data.lineCoverage,
|
|
511
|
-
branchCoverage: data.branchCoverage,
|
|
512
|
-
functionCoverage: data.functionCoverage,
|
|
513
|
-
statementCoverage: data.statementCoverage || data.lineCoverage,
|
|
514
|
-
totalFiles: data.totalFiles || 5,
|
|
515
|
-
gaps: detailedGaps,
|
|
516
|
-
duration: result.duration,
|
|
517
|
-
savedFiles: result.savedFiles,
|
|
518
|
-
},
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
catch (error) {
|
|
522
|
-
return {
|
|
523
|
-
success: false,
|
|
524
|
-
error: `Failed to analyze coverage: ${error instanceof Error ? error.message : String(error)}`,
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
export async function handleQualityAssess(params) {
|
|
529
|
-
if (!isFleetInitialized()) {
|
|
530
|
-
return {
|
|
531
|
-
success: false,
|
|
532
|
-
error: 'Fleet not initialized. Call fleet_init first.',
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
const { queen } = getFleetState();
|
|
536
|
-
try {
|
|
537
|
-
// ADR-051: Route task to optimal model tier
|
|
538
|
-
const routingResult = await routeDomainTask(`Assess quality with ${params.runGate ? 'quality gate' : 'metrics analysis'}`, 'quality-assessment');
|
|
539
|
-
const submitResult = await queen.submitTask({
|
|
540
|
-
type: 'assess-quality',
|
|
541
|
-
priority: 'p0',
|
|
542
|
-
targetDomains: ['quality-assessment'],
|
|
543
|
-
payload: {
|
|
544
|
-
runGate: params.runGate || false,
|
|
545
|
-
threshold: params.threshold || 80,
|
|
546
|
-
metrics: params.metrics || ['coverage', 'complexity', 'maintainability'],
|
|
547
|
-
// ADR-051: Include routing decision
|
|
548
|
-
routingTier: routingResult?.decision.tier,
|
|
549
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
550
|
-
},
|
|
551
|
-
timeout: 180000,
|
|
552
|
-
});
|
|
553
|
-
if (!submitResult.success) {
|
|
554
|
-
return {
|
|
555
|
-
success: false,
|
|
556
|
-
error: submitResult.error.message,
|
|
557
|
-
};
|
|
558
|
-
}
|
|
559
|
-
const executor = getTaskExecutor();
|
|
560
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
561
|
-
if (!task) {
|
|
562
|
-
return {
|
|
563
|
-
success: false,
|
|
564
|
-
error: 'Task not found after submission',
|
|
565
|
-
};
|
|
566
|
-
}
|
|
567
|
-
const result = await executor.execute(task.task);
|
|
568
|
-
if (!result.success) {
|
|
569
|
-
return {
|
|
570
|
-
success: false,
|
|
571
|
-
error: result.error || 'Task execution failed',
|
|
572
|
-
};
|
|
573
|
-
}
|
|
574
|
-
const data = result.data;
|
|
575
|
-
return {
|
|
576
|
-
success: true,
|
|
577
|
-
data: {
|
|
578
|
-
taskId: submitResult.value,
|
|
579
|
-
status: 'completed',
|
|
580
|
-
qualityScore: data.qualityScore,
|
|
581
|
-
passed: data.passed,
|
|
582
|
-
metrics: data.metrics,
|
|
583
|
-
recommendations: data.recommendations,
|
|
584
|
-
duration: result.duration,
|
|
585
|
-
savedFiles: result.savedFiles,
|
|
586
|
-
},
|
|
587
|
-
};
|
|
588
|
-
}
|
|
589
|
-
catch (error) {
|
|
590
|
-
return {
|
|
591
|
-
success: false,
|
|
592
|
-
error: `Failed to assess quality: ${error instanceof Error ? error.message : String(error)}`,
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
export async function handleSecurityScan(params) {
|
|
597
|
-
if (!isFleetInitialized()) {
|
|
598
|
-
return {
|
|
599
|
-
success: false,
|
|
600
|
-
error: 'Fleet not initialized. Call fleet_init first.',
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
const { queen } = getFleetState();
|
|
604
|
-
try {
|
|
605
|
-
const scanTypes = [];
|
|
606
|
-
if (params.sast !== false)
|
|
607
|
-
scanTypes.push('SAST');
|
|
608
|
-
if (params.dast)
|
|
609
|
-
scanTypes.push('DAST');
|
|
610
|
-
// ADR-051: Route task to optimal model tier
|
|
611
|
-
const routingResult = await routeDomainTask(`Security scan (${scanTypes.join(', ')}) for ${params.target || 'project'}`, 'security-compliance');
|
|
612
|
-
const submitResult = await queen.submitTask({
|
|
613
|
-
type: 'scan-security',
|
|
614
|
-
priority: 'p0',
|
|
615
|
-
targetDomains: ['security-compliance'],
|
|
616
|
-
payload: {
|
|
617
|
-
sast: params.sast !== false,
|
|
618
|
-
dast: params.dast || false,
|
|
619
|
-
compliance: params.compliance || [],
|
|
620
|
-
target: params.target || '.',
|
|
621
|
-
// ADR-051: Include routing decision
|
|
622
|
-
routingTier: routingResult?.decision.tier,
|
|
623
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
624
|
-
},
|
|
625
|
-
timeout: 600000,
|
|
626
|
-
});
|
|
627
|
-
if (!submitResult.success) {
|
|
628
|
-
return {
|
|
629
|
-
success: false,
|
|
630
|
-
error: submitResult.error.message,
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
const executor = getTaskExecutor();
|
|
634
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
635
|
-
if (!task) {
|
|
636
|
-
return {
|
|
637
|
-
success: false,
|
|
638
|
-
error: 'Task not found after submission',
|
|
639
|
-
};
|
|
640
|
-
}
|
|
641
|
-
const result = await executor.execute(task.task);
|
|
642
|
-
if (!result.success) {
|
|
643
|
-
return {
|
|
644
|
-
success: false,
|
|
645
|
-
error: result.error || 'Task execution failed',
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
const data = result.data;
|
|
649
|
-
return {
|
|
650
|
-
success: true,
|
|
651
|
-
data: {
|
|
652
|
-
taskId: submitResult.value,
|
|
653
|
-
status: 'completed',
|
|
654
|
-
vulnerabilities: data.vulnerabilities,
|
|
655
|
-
critical: data.critical,
|
|
656
|
-
high: data.high,
|
|
657
|
-
medium: data.medium,
|
|
658
|
-
low: data.low,
|
|
659
|
-
topVulnerabilities: data.topVulnerabilities,
|
|
660
|
-
recommendations: data.recommendations,
|
|
661
|
-
duration: result.duration,
|
|
662
|
-
savedFiles: result.savedFiles,
|
|
663
|
-
},
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
catch (error) {
|
|
667
|
-
return {
|
|
668
|
-
success: false,
|
|
669
|
-
error: `Failed to scan security: ${error instanceof Error ? error.message : String(error)}`,
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
export async function handleContractValidate(params) {
|
|
674
|
-
if (!isFleetInitialized()) {
|
|
675
|
-
return {
|
|
676
|
-
success: false,
|
|
677
|
-
error: 'Fleet not initialized. Call fleet_init first.',
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
const { queen } = getFleetState();
|
|
681
|
-
try {
|
|
682
|
-
// ADR-051: Route task to optimal model tier
|
|
683
|
-
const routingResult = await routeDomainTask(`Validate API contract at ${params.contractPath}`, 'contract-testing');
|
|
684
|
-
const submitResult = await queen.submitTask({
|
|
685
|
-
type: 'validate-contracts',
|
|
686
|
-
priority: 'p1',
|
|
687
|
-
targetDomains: ['contract-testing'],
|
|
688
|
-
payload: {
|
|
689
|
-
contractPath: params.contractPath,
|
|
690
|
-
providerUrl: params.providerUrl,
|
|
691
|
-
consumerName: params.consumerName,
|
|
692
|
-
checkBreakingChanges: params.checkBreakingChanges !== false,
|
|
693
|
-
// ADR-051: Include routing decision
|
|
694
|
-
routingTier: routingResult?.decision.tier,
|
|
695
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
696
|
-
},
|
|
697
|
-
timeout: 180000,
|
|
698
|
-
});
|
|
699
|
-
if (!submitResult.success) {
|
|
700
|
-
return {
|
|
701
|
-
success: false,
|
|
702
|
-
error: submitResult.error.message,
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
const executor = getTaskExecutor();
|
|
706
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
707
|
-
if (!task) {
|
|
708
|
-
return {
|
|
709
|
-
success: false,
|
|
710
|
-
error: 'Task not found after submission',
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
const result = await executor.execute(task.task);
|
|
714
|
-
if (!result.success) {
|
|
715
|
-
return {
|
|
716
|
-
success: false,
|
|
717
|
-
error: result.error || 'Task execution failed',
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
const data = result.data;
|
|
721
|
-
return {
|
|
722
|
-
success: true,
|
|
723
|
-
data: {
|
|
724
|
-
taskId: submitResult.value,
|
|
725
|
-
status: 'completed',
|
|
726
|
-
valid: data.valid,
|
|
727
|
-
breakingChanges: data.breakingChanges,
|
|
728
|
-
warnings: data.warnings,
|
|
729
|
-
duration: result.duration,
|
|
730
|
-
},
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
catch (error) {
|
|
734
|
-
return {
|
|
735
|
-
success: false,
|
|
736
|
-
error: `Failed to validate contract: ${error instanceof Error ? error.message : String(error)}`,
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
export async function handleAccessibilityTest(params) {
|
|
741
|
-
if (!isFleetInitialized()) {
|
|
742
|
-
return {
|
|
743
|
-
success: false,
|
|
744
|
-
error: 'Fleet not initialized. Call fleet_init first.',
|
|
745
|
-
};
|
|
746
|
-
}
|
|
747
|
-
const { queen } = getFleetState();
|
|
748
|
-
try {
|
|
749
|
-
// ADR-051: Route task to optimal model tier
|
|
750
|
-
const routingResult = await routeDomainTask(`Test accessibility for ${params.url} against ${params.standard || 'WCAG 2.1 AA'} standard`, 'visual-accessibility');
|
|
751
|
-
const submitResult = await queen.submitTask({
|
|
752
|
-
type: 'test-accessibility',
|
|
753
|
-
priority: 'p1',
|
|
754
|
-
targetDomains: ['visual-accessibility'],
|
|
755
|
-
payload: {
|
|
756
|
-
url: params.url,
|
|
757
|
-
standard: params.standard || 'wcag21-aa',
|
|
758
|
-
includeScreenReader: params.includeScreenReader || false,
|
|
759
|
-
// ADR-051: Include routing decision
|
|
760
|
-
routingTier: routingResult?.decision.tier,
|
|
761
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
762
|
-
},
|
|
763
|
-
timeout: 180000,
|
|
764
|
-
});
|
|
765
|
-
if (!submitResult.success) {
|
|
766
|
-
return {
|
|
767
|
-
success: false,
|
|
768
|
-
error: submitResult.error.message,
|
|
769
|
-
};
|
|
770
|
-
}
|
|
771
|
-
const executor = getTaskExecutor();
|
|
772
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
773
|
-
if (!task) {
|
|
774
|
-
return {
|
|
775
|
-
success: false,
|
|
776
|
-
error: 'Task not found after submission',
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
const result = await executor.execute(task.task);
|
|
780
|
-
if (!result.success) {
|
|
781
|
-
return {
|
|
782
|
-
success: false,
|
|
783
|
-
error: result.error || 'Task execution failed',
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
const data = result.data;
|
|
787
|
-
return {
|
|
788
|
-
success: true,
|
|
789
|
-
data: {
|
|
790
|
-
taskId: submitResult.value,
|
|
791
|
-
status: 'completed',
|
|
792
|
-
passed: data.passed,
|
|
793
|
-
score: data.score,
|
|
794
|
-
violations: data.violations,
|
|
795
|
-
warnings: data.warnings,
|
|
796
|
-
duration: result.duration,
|
|
797
|
-
},
|
|
798
|
-
};
|
|
799
|
-
}
|
|
800
|
-
catch (error) {
|
|
801
|
-
return {
|
|
802
|
-
success: false,
|
|
803
|
-
error: `Failed to test accessibility: ${error instanceof Error ? error.message : String(error)}`,
|
|
804
|
-
};
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
export async function handleChaosTest(params) {
|
|
808
|
-
if (!isFleetInitialized()) {
|
|
809
|
-
return {
|
|
810
|
-
success: false,
|
|
811
|
-
error: 'Fleet not initialized. Call fleet_init first.',
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
const { queen } = getFleetState();
|
|
815
|
-
try {
|
|
816
|
-
// ADR-051: Route task to optimal model tier
|
|
817
|
-
const routingResult = await routeDomainTask(`Run chaos test with ${params.faultType || 'latency'} fault injection on ${params.target}`, 'chaos-resilience');
|
|
818
|
-
const submitResult = await queen.submitTask({
|
|
819
|
-
type: 'run-chaos',
|
|
820
|
-
priority: 'p2',
|
|
821
|
-
targetDomains: ['chaos-resilience'],
|
|
822
|
-
payload: {
|
|
823
|
-
faultType: params.faultType || 'latency',
|
|
824
|
-
target: params.target,
|
|
825
|
-
duration: params.duration || 30000,
|
|
826
|
-
intensity: params.intensity || 50,
|
|
827
|
-
dryRun: params.dryRun !== false,
|
|
828
|
-
// ADR-051: Include routing decision
|
|
829
|
-
routingTier: routingResult?.decision.tier,
|
|
830
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
831
|
-
},
|
|
832
|
-
timeout: (params.duration || 30000) + 60000,
|
|
833
|
-
});
|
|
834
|
-
if (!submitResult.success) {
|
|
835
|
-
return {
|
|
836
|
-
success: false,
|
|
837
|
-
error: submitResult.error.message,
|
|
838
|
-
};
|
|
839
|
-
}
|
|
840
|
-
const executor = getTaskExecutor();
|
|
841
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
842
|
-
if (!task) {
|
|
843
|
-
return {
|
|
844
|
-
success: false,
|
|
845
|
-
error: 'Task not found after submission',
|
|
846
|
-
};
|
|
847
|
-
}
|
|
848
|
-
const result = await executor.execute(task.task);
|
|
849
|
-
if (!result.success) {
|
|
850
|
-
return {
|
|
851
|
-
success: false,
|
|
852
|
-
error: result.error || 'Task execution failed',
|
|
853
|
-
};
|
|
854
|
-
}
|
|
855
|
-
const data = result.data;
|
|
856
|
-
return {
|
|
857
|
-
success: true,
|
|
858
|
-
data: {
|
|
859
|
-
taskId: submitResult.value,
|
|
860
|
-
status: 'completed',
|
|
861
|
-
faultType: data.faultType,
|
|
862
|
-
resilience: data.resilience,
|
|
863
|
-
duration: result.duration,
|
|
864
|
-
},
|
|
865
|
-
};
|
|
866
|
-
}
|
|
867
|
-
catch (error) {
|
|
868
|
-
return {
|
|
869
|
-
success: false,
|
|
870
|
-
error: `Failed to run chaos test: ${error instanceof Error ? error.message : String(error)}`,
|
|
871
|
-
};
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
export async function handleDefectPredict(params) {
|
|
875
|
-
if (!isFleetInitialized()) {
|
|
876
|
-
return {
|
|
877
|
-
success: false,
|
|
878
|
-
error: 'Fleet not initialized. Call fleet_init first.',
|
|
879
|
-
};
|
|
880
|
-
}
|
|
881
|
-
const { queen } = getFleetState();
|
|
882
|
-
try {
|
|
883
|
-
// ADR-051: Route task to optimal model tier
|
|
884
|
-
const routingResult = await routeDomainTask(`Predict defects in ${params.target || 'codebase'} with ${params.lookback || 30} day lookback`, 'defect-intelligence');
|
|
885
|
-
const submitResult = await queen.submitTask({
|
|
886
|
-
type: 'predict-defects',
|
|
887
|
-
priority: 'p1',
|
|
888
|
-
targetDomains: ['defect-intelligence'],
|
|
889
|
-
payload: {
|
|
890
|
-
target: params.target || '.',
|
|
891
|
-
lookback: params.lookback || 30,
|
|
892
|
-
minConfidence: params.minConfidence || 0.7,
|
|
893
|
-
// ADR-051: Include routing decision
|
|
894
|
-
routingTier: routingResult?.decision.tier,
|
|
895
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
896
|
-
},
|
|
897
|
-
timeout: 180000,
|
|
898
|
-
});
|
|
899
|
-
if (!submitResult.success) {
|
|
900
|
-
return {
|
|
901
|
-
success: false,
|
|
902
|
-
error: submitResult.error.message,
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
const executor = getTaskExecutor();
|
|
906
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
907
|
-
if (!task) {
|
|
908
|
-
return {
|
|
909
|
-
success: false,
|
|
910
|
-
error: 'Task not found after submission',
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
const result = await executor.execute(task.task);
|
|
914
|
-
if (!result.success) {
|
|
915
|
-
return {
|
|
916
|
-
success: false,
|
|
917
|
-
error: result.error || 'Task execution failed',
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
const data = result.data;
|
|
921
|
-
return {
|
|
922
|
-
success: true,
|
|
923
|
-
data: {
|
|
924
|
-
taskId: submitResult.value,
|
|
925
|
-
status: 'completed',
|
|
926
|
-
predictedDefects: data.predictedDefects,
|
|
927
|
-
riskScore: data.riskScore,
|
|
928
|
-
recommendations: data.recommendations,
|
|
929
|
-
duration: result.duration,
|
|
930
|
-
},
|
|
931
|
-
};
|
|
932
|
-
}
|
|
933
|
-
catch (error) {
|
|
934
|
-
return {
|
|
935
|
-
success: false,
|
|
936
|
-
error: `Failed to predict defects: ${error instanceof Error ? error.message : String(error)}`,
|
|
937
|
-
};
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
export async function handleRequirementsValidate(params) {
|
|
941
|
-
if (!isFleetInitialized()) {
|
|
942
|
-
return {
|
|
943
|
-
success: false,
|
|
944
|
-
error: 'Fleet not initialized. Call fleet_init first.',
|
|
945
|
-
};
|
|
946
|
-
}
|
|
947
|
-
const { queen } = getFleetState();
|
|
948
|
-
try {
|
|
949
|
-
// ADR-051: Route task to optimal model tier
|
|
950
|
-
const routingResult = await routeDomainTask(`Validate requirements${params.generateBDD ? ' and generate BDD scenarios' : ''}`, 'requirements-validation');
|
|
951
|
-
const submitResult = await queen.submitTask({
|
|
952
|
-
type: 'validate-requirements',
|
|
953
|
-
priority: 'p1',
|
|
954
|
-
targetDomains: ['requirements-validation'],
|
|
955
|
-
payload: {
|
|
956
|
-
requirementsPath: params.requirementsPath,
|
|
957
|
-
testPath: params.testPath,
|
|
958
|
-
generateBDD: params.generateBDD || false,
|
|
959
|
-
// ADR-051: Include routing decision
|
|
960
|
-
routingTier: routingResult?.decision.tier,
|
|
961
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
962
|
-
},
|
|
963
|
-
timeout: 180000,
|
|
964
|
-
});
|
|
965
|
-
if (!submitResult.success) {
|
|
966
|
-
return {
|
|
967
|
-
success: false,
|
|
968
|
-
error: submitResult.error.message,
|
|
969
|
-
};
|
|
970
|
-
}
|
|
971
|
-
const executor = getTaskExecutor();
|
|
972
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
973
|
-
if (!task) {
|
|
974
|
-
return {
|
|
975
|
-
success: false,
|
|
976
|
-
error: 'Task not found after submission',
|
|
977
|
-
};
|
|
978
|
-
}
|
|
979
|
-
const result = await executor.execute(task.task);
|
|
980
|
-
if (!result.success) {
|
|
981
|
-
return {
|
|
982
|
-
success: false,
|
|
983
|
-
error: result.error || 'Task execution failed',
|
|
984
|
-
};
|
|
985
|
-
}
|
|
986
|
-
const data = result.data;
|
|
987
|
-
return {
|
|
988
|
-
success: true,
|
|
989
|
-
data: {
|
|
990
|
-
taskId: submitResult.value,
|
|
991
|
-
status: 'completed',
|
|
992
|
-
requirementsAnalyzed: data.requirementsAnalyzed,
|
|
993
|
-
testable: data.testable,
|
|
994
|
-
coverage: data.coverage,
|
|
995
|
-
bddScenarios: data.bddScenarios,
|
|
996
|
-
duration: result.duration,
|
|
997
|
-
},
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
catch (error) {
|
|
1001
|
-
return {
|
|
1002
|
-
success: false,
|
|
1003
|
-
error: `Failed to validate requirements: ${error instanceof Error ? error.message : String(error)}`,
|
|
1004
|
-
};
|
|
1005
|
-
}
|
|
174
|
+
/**
|
|
175
|
+
* Registry of all domain handlers for dynamic dispatch
|
|
176
|
+
*/
|
|
177
|
+
export const domainHandlers = {
|
|
178
|
+
'test-generation': handleTestGenerate,
|
|
179
|
+
'test-execution': handleTestExecute,
|
|
180
|
+
'coverage-analysis': handleCoverageAnalyze,
|
|
181
|
+
'quality-assessment': handleQualityAssess,
|
|
182
|
+
'security-compliance': handleSecurityScan,
|
|
183
|
+
'contract-testing': handleContractValidate,
|
|
184
|
+
'visual-accessibility': handleAccessibilityTest,
|
|
185
|
+
'chaos-resilience': handleChaosTest,
|
|
186
|
+
'defect-intelligence': handleDefectPredict,
|
|
187
|
+
'requirements-validation': handleRequirementsValidate,
|
|
188
|
+
'code-intelligence': handleCodeIndex,
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Get a handler by domain name
|
|
192
|
+
*/
|
|
193
|
+
export function getHandlerByDomain(domain) {
|
|
194
|
+
return domainHandlers[domain];
|
|
1006
195
|
}
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
};
|
|
1013
|
-
}
|
|
1014
|
-
const { queen } = getFleetState();
|
|
1015
|
-
try {
|
|
1016
|
-
// ADR-051: Route task to optimal model tier
|
|
1017
|
-
const routingResult = await routeDomainTask(`Index code in ${params.target || 'codebase'}${params.incremental ? ' incrementally' : ''}`, 'code-intelligence');
|
|
1018
|
-
const submitResult = await queen.submitTask({
|
|
1019
|
-
type: 'index-code',
|
|
1020
|
-
priority: 'p2',
|
|
1021
|
-
targetDomains: ['code-intelligence'],
|
|
1022
|
-
payload: {
|
|
1023
|
-
target: params.target || '.',
|
|
1024
|
-
incremental: params.incremental || false,
|
|
1025
|
-
gitSince: params.gitSince,
|
|
1026
|
-
// ADR-051: Include routing decision
|
|
1027
|
-
routingTier: routingResult?.decision.tier,
|
|
1028
|
-
useAgentBooster: routingResult?.useAgentBooster,
|
|
1029
|
-
},
|
|
1030
|
-
timeout: 300000,
|
|
1031
|
-
});
|
|
1032
|
-
if (!submitResult.success) {
|
|
1033
|
-
return {
|
|
1034
|
-
success: false,
|
|
1035
|
-
error: submitResult.error.message,
|
|
1036
|
-
};
|
|
1037
|
-
}
|
|
1038
|
-
const executor = getTaskExecutor();
|
|
1039
|
-
const task = queen.getTaskStatus(submitResult.value);
|
|
1040
|
-
if (!task) {
|
|
1041
|
-
return {
|
|
1042
|
-
success: false,
|
|
1043
|
-
error: 'Task not found after submission',
|
|
1044
|
-
};
|
|
1045
|
-
}
|
|
1046
|
-
const result = await executor.execute(task.task);
|
|
1047
|
-
if (!result.success) {
|
|
1048
|
-
return {
|
|
1049
|
-
success: false,
|
|
1050
|
-
error: result.error || 'Task execution failed',
|
|
1051
|
-
};
|
|
1052
|
-
}
|
|
1053
|
-
const data = result.data;
|
|
1054
|
-
return {
|
|
1055
|
-
success: true,
|
|
1056
|
-
data: {
|
|
1057
|
-
taskId: submitResult.value,
|
|
1058
|
-
status: 'completed',
|
|
1059
|
-
filesIndexed: data.filesIndexed,
|
|
1060
|
-
symbolsExtracted: data.symbolsExtracted,
|
|
1061
|
-
relationsFound: data.relationsFound,
|
|
1062
|
-
duration: result.duration,
|
|
1063
|
-
},
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
catch (error) {
|
|
1067
|
-
return {
|
|
1068
|
-
success: false,
|
|
1069
|
-
error: `Failed to index code: ${error instanceof Error ? error.message : String(error)}`,
|
|
1070
|
-
};
|
|
1071
|
-
}
|
|
196
|
+
/**
|
|
197
|
+
* Check if a domain has a registered handler
|
|
198
|
+
*/
|
|
199
|
+
export function hasHandler(domain) {
|
|
200
|
+
return domain in domainHandlers;
|
|
1072
201
|
}
|
|
1073
202
|
//# sourceMappingURL=domain-handlers.js.map
|