agentic-qe 3.14.3 → 3.14.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/qe-coverage-specialist.md +1 -1
- package/.claude/agents/v3/qe-fleet-commander.md +1 -1
- package/.claude/agents/v3/qe-pentest-validator.md +1 -1
- package/.claude/agents/v3/qe-queen-coordinator.md +1 -1
- package/.claude/agents/v3/qe-risk-assessor.md +1 -1
- package/.claude/agents/v3/qe-root-cause-analyzer.md +1 -1
- package/.claude/agents/v3/qe-security-auditor.md +1 -1
- package/.claude/agents/v3/qe-test-architect.md +1 -1
- package/.claude/commands/aqe-costs.md +10 -10
- package/.claude/helpers/advisor-call.cjs +3 -3
- package/.claude/helpers/v3/advisor-call.cjs +3 -3
- package/.claude/skills/.validation/examples/chaos-engineering-output.example.json +1 -1
- package/.claude/skills/.validation/examples/performance-testing-output.example.json +1 -1
- package/.claude/skills/.validation/examples/security-testing-output.example.json +1 -1
- package/.claude/skills/.validation/examples/testability-scoring-output.example.json +1 -1
- package/.claude/skills/.validation/schemas/skill-eval.schema.json +4 -1
- package/.claude/skills/.validation/schemas/skill-frontmatter.schema.json +1 -1
- package/.claude/skills/.validation/schemas/skill-output.template.json +1 -1
- package/.claude/skills/.validation/templates/eval.template.yaml +1 -1
- package/.claude/skills/.validation/templates/security-testing-eval.template.yaml +1 -1
- package/.claude/skills/.validation/templates/skill-frontmatter.example.yaml +1 -1
- package/.claude/skills/.validation/test-data/sample-output.json +1 -1
- package/.claude/skills/a11y-ally/SKILL.md +1 -1
- package/.claude/skills/a11y-ally/evals/a11y-ally.yaml +1 -1
- package/.claude/skills/accessibility-testing/evals/accessibility-testing.yaml +1 -1
- package/.claude/skills/api-testing-patterns/evals/api-testing-patterns.yaml +1 -1
- package/.claude/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +1 -1
- package/.claude/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +1 -1
- package/.claude/skills/compatibility-testing/evals/compatibility-testing.yaml +1 -1
- package/.claude/skills/compliance-testing/evals/compliance-testing.yaml +1 -1
- package/.claude/skills/contract-testing/evals/contract-testing.yaml +1 -1
- package/.claude/skills/database-testing/evals/database-testing.yaml +1 -1
- package/.claude/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +1 -1
- package/.claude/skills/localization-testing/evals/localization-testing.yaml +1 -1
- package/.claude/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +1 -1
- package/.claude/skills/mobile-testing/evals/mobile-testing.yaml +1 -1
- package/.claude/skills/mutation-testing/evals/mutation-testing.yaml +1 -1
- package/.claude/skills/mutation-testing/test-data/sample-output.json +1 -1
- package/.claude/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +1 -1
- package/.claude/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +1 -1
- package/.claude/skills/n8n-security-testing/evals/n8n-security-testing.yaml +1 -1
- package/.claude/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +1 -1
- package/.claude/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +1 -1
- package/.claude/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +1 -1
- package/.claude/skills/pentest-validation/evals/pentest-validation.yaml +1 -1
- package/.claude/skills/performance-testing/evals/performance-testing.yaml +1 -1
- package/.claude/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +1 -1
- package/.claude/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +1 -1
- package/.claude/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +1 -1
- package/.claude/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +1 -1
- package/.claude/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +1 -1
- package/.claude/skills/qe-browser/evals/qe-browser.yaml +1 -1
- package/.claude/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +1 -1
- package/.claude/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +1 -1
- package/.claude/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +1 -1
- package/.claude/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +1 -1
- package/.claude/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +2 -2
- package/.claude/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +1 -1
- package/.claude/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +1 -1
- package/.claude/skills/qe-test-execution/evals/qe-test-execution.yaml +1 -1
- package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +1 -1
- package/.claude/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +1 -1
- package/.claude/skills/quality-metrics/evals/quality-metrics.yaml +1 -1
- package/.claude/skills/regression-testing/evals/regression-testing.yaml +1 -1
- package/.claude/skills/risk-based-testing/evals/risk-based-testing.yaml +1 -1
- package/.claude/skills/security-testing/evals/security-testing.yaml +1 -1
- package/.claude/skills/security-visual-testing/evals/security-visual-testing.yaml +1 -1
- package/.claude/skills/shift-left-testing/evals/shift-left-testing.yaml +1 -1
- package/.claude/skills/shift-right-testing/evals/shift-right-testing.yaml +1 -1
- package/.claude/skills/skills-manifest.json +1 -1
- package/.claude/skills/test-automation-strategy/evals/test-automation-strategy.yaml +1 -1
- package/.claude/skills/test-data-management/evals/test-data-management.yaml +1 -1
- package/.claude/skills/test-design-techniques/evals/test-design-techniques.yaml +1 -1
- package/.claude/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +1 -1
- package/.claude/skills/testability-scoring/evals/testability-scoring.yaml +1 -1
- package/.claude/skills/validation-pipeline/evals/validation-pipeline.yaml +1 -1
- package/.claude/skills/verification-quality/evals/verification-quality.yaml +1 -1
- package/.claude/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +1 -1
- package/.claude/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +1 -1
- package/.opencode/agents/collective-intelligence-coordinator.yaml +1 -1
- package/.opencode/agents/ddd-domain-expert.yaml +1 -1
- package/.opencode/agents/memory-specialist.yaml +1 -1
- package/.opencode/agents/performance-engineer.yaml +1 -1
- package/.opencode/agents/qe-accessibility-auditor.yaml +1 -1
- package/.opencode/agents/qe-api-contract-validator.yaml +1 -1
- package/.opencode/agents/qe-bdd-generator.yaml +1 -1
- package/.opencode/agents/qe-chaos-engineer.yaml +1 -1
- package/.opencode/agents/qe-code-complexity.yaml +1 -1
- package/.opencode/agents/qe-code-intelligence.yaml +1 -1
- package/.opencode/agents/qe-coverage-analyzer.yaml +1 -1
- package/.opencode/agents/qe-defect-predictor.yaml +1 -1
- package/.opencode/agents/qe-dependency-mapper.yaml +1 -1
- package/.opencode/agents/qe-deployment-advisor.yaml +1 -1
- package/.opencode/agents/qe-devils-advocate.yaml +1 -1
- package/.opencode/agents/qe-flaky-hunter.yaml +1 -1
- package/.opencode/agents/qe-fleet-commander.yaml +1 -1
- package/.opencode/agents/qe-gap-detector.yaml +1 -1
- package/.opencode/agents/qe-graphql-tester.yaml +1 -1
- package/.opencode/agents/qe-impact-analyzer.yaml +1 -1
- package/.opencode/agents/qe-integration-architect.yaml +1 -1
- package/.opencode/agents/qe-integration-tester.yaml +1 -1
- package/.opencode/agents/qe-kg-builder.yaml +1 -1
- package/.opencode/agents/qe-learning-coordinator.yaml +1 -1
- package/.opencode/agents/qe-load-tester.yaml +1 -1
- package/.opencode/agents/qe-message-broker-tester.yaml +1 -1
- package/.opencode/agents/qe-metrics-optimizer.yaml +1 -1
- package/.opencode/agents/qe-middleware-validator.yaml +1 -1
- package/.opencode/agents/qe-mutation-tester.yaml +1 -1
- package/.opencode/agents/qe-odata-contract-tester.yaml +1 -1
- package/.opencode/agents/qe-parallel-executor.yaml +1 -1
- package/.opencode/agents/qe-pattern-learner.yaml +1 -1
- package/.opencode/agents/qe-pentest-validator.yaml +1 -1
- package/.opencode/agents/qe-performance-tester.yaml +1 -1
- package/.opencode/agents/qe-product-factors-assessor.yaml +1 -1
- package/.opencode/agents/qe-property-tester.yaml +1 -1
- package/.opencode/agents/qe-quality-criteria-recommender.yaml +1 -1
- package/.opencode/agents/qe-quality-gate.yaml +1 -1
- package/.opencode/agents/qe-queen-coordinator.yaml +1 -1
- package/.opencode/agents/qe-qx-partner.yaml +1 -1
- package/.opencode/agents/qe-regression-analyzer.yaml +1 -1
- package/.opencode/agents/qe-requirements-validator.yaml +1 -1
- package/.opencode/agents/qe-responsive-tester.yaml +1 -1
- package/.opencode/agents/qe-retry-handler.yaml +1 -1
- package/.opencode/agents/qe-risk-assessor.yaml +1 -1
- package/.opencode/agents/qe-root-cause-analyzer.yaml +1 -1
- package/.opencode/agents/qe-sap-idoc-tester.yaml +1 -1
- package/.opencode/agents/qe-sap-rfc-tester.yaml +1 -1
- package/.opencode/agents/qe-security-auditor.yaml +1 -1
- package/.opencode/agents/qe-security-scanner.yaml +1 -1
- package/.opencode/agents/qe-soap-tester.yaml +1 -1
- package/.opencode/agents/qe-sod-analyzer.yaml +1 -1
- package/.opencode/agents/qe-tdd-specialist.yaml +1 -1
- package/.opencode/agents/qe-test-generator.yaml +1 -1
- package/.opencode/agents/qe-test-idea-rewriter.yaml +1 -1
- package/.opencode/agents/qe-transfer-specialist.yaml +1 -1
- package/.opencode/agents/qe-visual-tester.yaml +1 -1
- package/.opencode/agents/security-architect.yaml +1 -1
- package/.opencode/agents/security-auditor.yaml +1 -1
- package/CHANGELOG.md +111 -0
- package/README.md +7 -2
- package/assets/agents/v3/helpers/advisor-call.cjs +3 -3
- package/assets/agents/v3/qe-coverage-specialist.md +1 -1
- package/assets/agents/v3/qe-fleet-commander.md +1 -1
- package/assets/agents/v3/qe-pentest-validator.md +1 -1
- package/assets/agents/v3/qe-queen-coordinator.md +1 -1
- package/assets/agents/v3/qe-risk-assessor.md +1 -1
- package/assets/agents/v3/qe-root-cause-analyzer.md +1 -1
- package/assets/agents/v3/qe-security-auditor.md +1 -1
- package/assets/agents/v3/qe-test-architect.md +1 -1
- package/assets/skills/.validation/examples/chaos-engineering-output.example.json +1 -1
- package/assets/skills/.validation/examples/performance-testing-output.example.json +1 -1
- package/assets/skills/.validation/examples/security-testing-output.example.json +1 -1
- package/assets/skills/.validation/examples/testability-scoring-output.example.json +1 -1
- package/assets/skills/.validation/schemas/skill-eval.schema.json +4 -1
- package/assets/skills/.validation/schemas/skill-frontmatter.schema.json +1 -1
- package/assets/skills/.validation/schemas/skill-output.template.json +1 -1
- package/assets/skills/.validation/templates/eval.template.yaml +1 -1
- package/assets/skills/.validation/templates/security-testing-eval.template.yaml +1 -1
- package/assets/skills/.validation/templates/skill-frontmatter.example.yaml +1 -1
- package/assets/skills/.validation/test-data/sample-output.json +1 -1
- package/assets/skills/a11y-ally/SKILL.md +1 -1
- package/assets/skills/a11y-ally/evals/a11y-ally.yaml +1 -1
- package/assets/skills/accessibility-testing/evals/accessibility-testing.yaml +1 -1
- package/assets/skills/api-testing-patterns/evals/api-testing-patterns.yaml +1 -1
- package/assets/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +1 -1
- package/assets/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +1 -1
- package/assets/skills/compatibility-testing/evals/compatibility-testing.yaml +1 -1
- package/assets/skills/compliance-testing/evals/compliance-testing.yaml +1 -1
- package/assets/skills/contract-testing/evals/contract-testing.yaml +1 -1
- package/assets/skills/database-testing/evals/database-testing.yaml +1 -1
- package/assets/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +1 -1
- package/assets/skills/localization-testing/evals/localization-testing.yaml +1 -1
- package/assets/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +1 -1
- package/assets/skills/mobile-testing/evals/mobile-testing.yaml +1 -1
- package/assets/skills/mutation-testing/evals/mutation-testing.yaml +1 -1
- package/assets/skills/mutation-testing/test-data/sample-output.json +1 -1
- package/assets/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +1 -1
- package/assets/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +1 -1
- package/assets/skills/n8n-security-testing/evals/n8n-security-testing.yaml +1 -1
- package/assets/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +1 -1
- package/assets/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +1 -1
- package/assets/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +1 -1
- package/assets/skills/pentest-validation/evals/pentest-validation.yaml +1 -1
- package/assets/skills/performance-testing/evals/performance-testing.yaml +1 -1
- package/assets/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +1 -1
- package/assets/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +1 -1
- package/assets/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +1 -1
- package/assets/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +1 -1
- package/assets/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +1 -1
- package/assets/skills/qe-browser/evals/qe-browser.yaml +1 -1
- package/assets/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +1 -1
- package/assets/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +1 -1
- package/assets/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +1 -1
- package/assets/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +1 -1
- package/assets/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +2 -2
- package/assets/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +1 -1
- package/assets/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +1 -1
- package/assets/skills/qe-test-execution/evals/qe-test-execution.yaml +1 -1
- package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +1 -1
- package/assets/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +1 -1
- package/assets/skills/quality-metrics/evals/quality-metrics.yaml +1 -1
- package/assets/skills/regression-testing/evals/regression-testing.yaml +1 -1
- package/assets/skills/risk-based-testing/evals/risk-based-testing.yaml +1 -1
- package/assets/skills/security-testing/evals/security-testing.yaml +1 -1
- package/assets/skills/security-visual-testing/evals/security-visual-testing.yaml +1 -1
- package/assets/skills/shift-left-testing/evals/shift-left-testing.yaml +1 -1
- package/assets/skills/shift-right-testing/evals/shift-right-testing.yaml +1 -1
- package/assets/skills/skills-manifest.json +1 -1
- package/assets/skills/test-automation-strategy/evals/test-automation-strategy.yaml +1 -1
- package/assets/skills/test-data-management/evals/test-data-management.yaml +1 -1
- package/assets/skills/test-design-techniques/evals/test-design-techniques.yaml +1 -1
- package/assets/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +1 -1
- package/assets/skills/testability-scoring/evals/testability-scoring.yaml +1 -1
- package/assets/skills/validation-pipeline/evals/validation-pipeline.yaml +1 -1
- package/assets/skills/verification-quality/evals/verification-quality.yaml +1 -1
- package/assets/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +1 -1
- package/assets/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +1 -1
- package/dist/cli/bundle.js +7 -7
- package/dist/cli/chunks/adapter-TNNNJRDG.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-TQOMLWWX.js → agent-booster-wasm-5PC7D2FW.js} +2 -2
- package/dist/cli/chunks/{agent-handler-Q3SEMMI2.js → agent-handler-RDNTK4CA.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-SJXAQSZI.js → agent-memory-branch-NAAMBWIR.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-5ZRMYJLB.js +2 -0
- package/dist/cli/chunks/{arena-7RC7TBGW.js → arena-HXTWJ5YY.js} +4 -4
- package/dist/cli/chunks/{arena-UPB7TKUY.js → arena-KXFHRWX4.js} +2 -2
- package/dist/cli/chunks/{audit-IXN5R4WB.js → audit-YSGA7UWT.js} +3 -3
- package/dist/cli/chunks/base-KWZHOPSH.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-RP4DEGK3.js → better-sqlite3-UICJZIDG.js} +2 -2
- package/dist/cli/chunks/brain-handler-ET6YAP4B.js +90 -0
- package/dist/cli/chunks/{branch-enumerator-VPRWDGFJ.js → branch-enumerator-SS7UNVIA.js} +2 -2
- package/dist/cli/chunks/{browser-B6E7JPPJ.js → browser-77GI6KBE.js} +2 -2
- package/dist/cli/chunks/browser-workflow-2FZTKDUL.js +2 -0
- package/dist/cli/chunks/{chunk-ZHXWGNYM.js → chunk-2JW3BCGG.js} +1 -1
- package/dist/cli/chunks/{chunk-TGLAWI62.js → chunk-33YYYWBQ.js} +1 -1
- package/dist/cli/chunks/{chunk-BN7DKW5D.js → chunk-34WO57CW.js} +1 -1
- package/dist/cli/chunks/{chunk-TTMHIOQ3.js → chunk-3QHGWY7T.js} +2 -2
- package/dist/cli/chunks/chunk-3TW5W5LX.js +2 -0
- package/dist/cli/chunks/{chunk-E3FBW6G2.js → chunk-3UPAMMCB.js} +1 -1
- package/dist/cli/chunks/{chunk-MDZ6RRLX.js → chunk-3VOQRIQM.js} +2 -2
- package/dist/cli/chunks/{chunk-G5C2XVZC.js → chunk-3X3DJZJJ.js} +1 -1
- package/dist/cli/chunks/{chunk-4C6UJIHB.js → chunk-4MHXCAG2.js} +1 -1
- package/dist/cli/chunks/{chunk-7BUERZYL.js → chunk-4OYFXLBK.js} +2 -2
- package/dist/cli/chunks/{chunk-TFHQE6NK.js → chunk-55RWDRJD.js} +3 -3
- package/dist/cli/chunks/chunk-5R3QL7WN.js +14 -0
- package/dist/cli/chunks/{chunk-ZUG5MOUB.js → chunk-5SJHQ2CO.js} +2 -2
- package/dist/cli/chunks/{chunk-VIDBBB6F.js → chunk-5YPYDPBJ.js} +2 -2
- package/dist/cli/chunks/chunk-5Z6XZV7K.js +65 -0
- package/dist/cli/chunks/{chunk-JV4FZUE7.js → chunk-64PFWE2F.js} +2 -2
- package/dist/cli/chunks/{chunk-TISSZFHO.js → chunk-6CQN24ZK.js} +1 -1
- package/dist/cli/chunks/{chunk-G6DCESPU.js → chunk-6J62K3SW.js} +2 -2
- package/dist/cli/chunks/{chunk-7SLAZAVU.js → chunk-6KJABXAR.js} +2 -2
- package/dist/cli/chunks/{chunk-KF63AYXD.js → chunk-6QYNWR7U.js} +2 -2
- package/dist/cli/chunks/{chunk-74PK3NEW.js → chunk-6TPKK7LD.js} +2 -2
- package/dist/cli/chunks/{chunk-JRYZKBY2.js → chunk-6UWGMOND.js} +2 -2
- package/dist/cli/chunks/{chunk-ZN3J6TZD.js → chunk-6VRA2QGL.js} +1 -1
- package/dist/cli/chunks/{chunk-YCBDE2N7.js → chunk-7D777LTF.js} +2 -2
- package/dist/cli/chunks/chunk-7ZIOFPL3.js +2 -0
- package/dist/cli/chunks/chunk-A4FYONNU.js +2 -0
- package/dist/cli/chunks/{chunk-5Y5TC6BY.js → chunk-AIHDEEJO.js} +2 -2
- package/dist/cli/chunks/{chunk-N4H2QOT5.js → chunk-AUXFKCQL.js} +2 -2
- package/dist/cli/chunks/{chunk-7G6UX2QN.js → chunk-AWWNB2T7.js} +2 -2
- package/dist/cli/chunks/{chunk-33VPWGCM.js → chunk-BDESSCVR.js} +3 -3
- package/dist/cli/chunks/{chunk-OVDKWCD7.js → chunk-BFP7KO7P.js} +2 -2
- package/dist/cli/chunks/{chunk-MXMFGSWR.js → chunk-BGE6FOLM.js} +2 -2
- package/dist/cli/chunks/{chunk-2GNRW3OD.js → chunk-BOARZKU3.js} +2 -2
- package/dist/cli/chunks/{chunk-4JBFJTHJ.js → chunk-BOZZYWCR.js} +1 -1
- package/dist/cli/chunks/{chunk-D4Z2N74A.js → chunk-C2WU3533.js} +1 -1
- package/dist/cli/chunks/{chunk-B7SWW5A6.js → chunk-CDHQFHRP.js} +2 -2
- package/dist/cli/chunks/chunk-CDKG6EI7.js +16 -0
- package/dist/cli/chunks/{chunk-IU4EBTA2.js → chunk-CIKSHTEQ.js} +3 -3
- package/dist/cli/chunks/{chunk-RTJ2M6V6.js → chunk-CIZ5JPDC.js} +2 -2
- package/dist/cli/chunks/{chunk-CR3QGHVN.js → chunk-CLTMDCSE.js} +2 -2
- package/dist/cli/chunks/{chunk-T35GZXTU.js → chunk-CNG6GQEZ.js} +2 -2
- package/dist/cli/chunks/{chunk-IQEJGZV6.js → chunk-CSU5NYOX.js} +3 -3
- package/dist/cli/chunks/chunk-CU46J64M.js +4 -0
- package/dist/cli/chunks/{chunk-LLVGTEHU.js → chunk-CXQPR5MY.js} +1 -1
- package/dist/cli/chunks/{chunk-5BLFXQEB.js → chunk-DA5K5754.js} +1 -1
- package/dist/cli/chunks/{chunk-5FOZO7KM.js → chunk-DAEFDCJ4.js} +45 -45
- package/dist/cli/chunks/{chunk-SJPZSCZP.js → chunk-DEYLEDJN.js} +2 -2
- package/dist/cli/chunks/{chunk-LHGNNZ76.js → chunk-DFZCKIGY.js} +3 -3
- package/dist/cli/chunks/{chunk-YAKS3CAB.js → chunk-DHJPWQBR.js} +2 -2
- package/dist/cli/chunks/{chunk-37BASGWC.js → chunk-DOTK76IJ.js} +2 -2
- package/dist/cli/chunks/{chunk-STRDSVH3.js → chunk-DPFRKBOG.js} +2 -2
- package/dist/cli/chunks/{chunk-H5ZRV5K5.js → chunk-EDJ3O7RH.js} +2 -2
- package/dist/cli/chunks/{chunk-DBA3N742.js → chunk-EKQ673SA.js} +1 -1
- package/dist/cli/chunks/chunk-F3SBRQC6.js +2 -0
- package/dist/cli/chunks/{chunk-HOQQCY2K.js → chunk-FGYMFUE2.js} +2 -2
- package/dist/cli/chunks/{chunk-FKG5OQFT.js → chunk-FLYOJOKN.js} +1 -1
- package/dist/cli/chunks/{chunk-MWWAMDHI.js → chunk-FRH6VAUS.js} +1 -1
- package/dist/cli/chunks/{chunk-UYJHYMEQ.js → chunk-FWGOHAAB.js} +2 -2
- package/dist/cli/chunks/{chunk-HRUU7E3D.js → chunk-G6T45OIC.js} +2 -2
- package/dist/cli/chunks/{chunk-4Q35TI6Z.js → chunk-GPLQ6DOK.js} +2 -2
- package/dist/cli/chunks/{chunk-PI74GOE4.js → chunk-HDSAM2RE.js} +2 -2
- package/dist/cli/chunks/chunk-HIVA55CJ.js +2 -0
- package/dist/cli/chunks/{chunk-B5XFDFBT.js → chunk-HIYXCDEP.js} +1 -1
- package/dist/cli/chunks/{chunk-ZK5JKHP4.js → chunk-HUWNIPZ5.js} +1 -1
- package/dist/cli/chunks/{chunk-H6XBM2LY.js → chunk-HV2J7KKQ.js} +2 -2
- package/dist/cli/chunks/{chunk-IFFZR6GY.js → chunk-IFCLB7FJ.js} +1 -1
- package/dist/cli/chunks/{chunk-3ABRGG3C.js → chunk-IPR4QP3H.js} +2 -2
- package/dist/cli/chunks/{chunk-7FYMDKQH.js → chunk-ISDMD6EU.js} +165 -167
- package/dist/cli/chunks/{chunk-B2ZONZPZ.js → chunk-J6GNQS62.js} +2 -2
- package/dist/cli/chunks/{chunk-G6ZHTF42.js → chunk-JBNEE5UH.js} +2 -2
- package/dist/cli/chunks/chunk-JZ3ORVZ3.js +54 -0
- package/dist/cli/chunks/{chunk-5IAB5NRZ.js → chunk-KCZR45PA.js} +2 -2
- package/dist/cli/chunks/chunk-KGT36Z42.js +14 -0
- package/dist/cli/chunks/{chunk-IP7NSFQQ.js → chunk-KHFNNVJA.js} +2 -2
- package/dist/cli/chunks/{chunk-2WT7AKKK.js → chunk-KPA7MZ6C.js} +2 -2
- package/dist/cli/chunks/{chunk-7JQHPANT.js → chunk-KSKEF7LZ.js} +3 -3
- package/dist/cli/chunks/{chunk-F67AV5P2.js → chunk-M2JBBZQB.js} +2 -2
- package/dist/cli/chunks/{chunk-SGXSB7YO.js → chunk-M4WJKGVK.js} +1 -1
- package/dist/cli/chunks/{chunk-4UDZLD42.js → chunk-M5QUBZY6.js} +2 -2
- package/dist/cli/chunks/{chunk-PZTVH2AS.js → chunk-MCUJEZT6.js} +2 -2
- package/dist/cli/chunks/{chunk-KPMGTVB4.js → chunk-MDWCE7YW.js} +1 -1
- package/dist/cli/chunks/{chunk-LS3EUMBP.js → chunk-MEGDYJPV.js} +5 -5
- package/dist/cli/chunks/chunk-MIQTXNBG.js +4 -0
- package/dist/cli/chunks/{chunk-VWNHKYK7.js → chunk-MNW6QGNJ.js} +2 -2
- package/dist/cli/chunks/{chunk-NN76NTOX.js → chunk-MOBNBMFW.js} +1 -1
- package/dist/cli/chunks/{chunk-SG47AXJG.js → chunk-MTZH7AHC.js} +1 -1
- package/dist/cli/chunks/chunk-MVNP7GIR.js +2 -0
- package/dist/cli/chunks/chunk-MVPCNSPY.js +2 -0
- package/dist/cli/chunks/chunk-NA7B2QYB.js +2 -0
- package/dist/cli/chunks/{chunk-26GM5CWD.js → chunk-NDPFGIMJ.js} +3 -3
- package/dist/cli/chunks/{chunk-ELU4IC3I.js → chunk-NJBGXDQ7.js} +1 -1
- package/dist/cli/chunks/chunk-OBAP2TXZ.js +2 -0
- package/dist/cli/chunks/{chunk-NTSXHZTC.js → chunk-OCWWP5PL.js} +4 -4
- package/dist/cli/chunks/{chunk-XA7CG3LH.js → chunk-ODKLFVYC.js} +2 -2
- package/dist/cli/chunks/{chunk-IKIITGU5.js → chunk-ONII3572.js} +4 -4
- package/dist/cli/chunks/{chunk-JBB7E26R.js → chunk-OSLYSG3B.js} +2 -2
- package/dist/cli/chunks/{chunk-CB5JPRIZ.js → chunk-OULHKEVH.js} +2 -2
- package/dist/cli/chunks/{chunk-YGB6R5DW.js → chunk-PAWXJ73E.js} +1 -1
- package/dist/cli/chunks/chunk-PEPFCPES.js +2 -0
- package/dist/cli/chunks/{chunk-FUE6LL72.js → chunk-PFR4G3DJ.js} +2 -2
- package/dist/cli/chunks/chunk-PO3IXGMQ.js +2 -0
- package/dist/cli/chunks/{chunk-OY7MLMEX.js → chunk-PZJOPURC.js} +5 -5
- package/dist/cli/chunks/{chunk-UHQY3GK7.js → chunk-Q5DO24IJ.js} +2 -2
- package/dist/cli/chunks/chunk-QGIU2WRL.js +2 -0
- package/dist/cli/chunks/{chunk-4RP5VUBI.js → chunk-R4VL6E65.js} +2 -2
- package/dist/cli/chunks/{chunk-RKJZWWB7.js → chunk-R5NE6B2M.js} +2 -2
- package/dist/cli/chunks/{chunk-5F6DWHQG.js → chunk-RJCYCLZV.js} +2 -2
- package/dist/cli/chunks/{chunk-GNTVFN7D.js → chunk-SGYJ4NFZ.js} +1 -1
- package/dist/cli/chunks/{chunk-OYMLHX2B.js → chunk-SRKETSFF.js} +1 -1
- package/dist/cli/chunks/{chunk-XX7HUSX2.js → chunk-STJCATGN.js} +2 -2
- package/dist/cli/chunks/{chunk-C46DMCWF.js → chunk-STM3UDNO.js} +1 -1
- package/dist/cli/chunks/{chunk-EY4OQHU3.js → chunk-T6BVLVI5.js} +1 -1
- package/dist/cli/chunks/{chunk-LKN7JQTW.js → chunk-TDZ53WO2.js} +2 -2
- package/dist/cli/chunks/{chunk-OV5EZO3U.js → chunk-TPGED2IF.js} +2 -2
- package/dist/cli/chunks/{chunk-DX3C5HPN.js → chunk-TSRSV3LD.js} +1 -1
- package/dist/cli/chunks/{chunk-Y2DVFVGI.js → chunk-TT23RRB7.js} +1 -1
- package/dist/cli/chunks/{chunk-XXCYQXK3.js → chunk-TWAWHOP7.js} +2 -2
- package/dist/cli/chunks/{chunk-2IGT5WNQ.js → chunk-U5K45TFH.js} +1 -1
- package/dist/cli/chunks/{chunk-SQ3PPISY.js → chunk-UDHKLT4C.js} +1 -1
- package/dist/cli/chunks/{chunk-YDNSLLBS.js → chunk-UEM7ZF5K.js} +2 -2
- package/dist/cli/chunks/{chunk-4XPPMADQ.js → chunk-UGVHCMUN.js} +6 -6
- package/dist/cli/chunks/{chunk-YL7T3VV7.js → chunk-V3QLFNA2.js} +2 -2
- package/dist/cli/chunks/{chunk-YEXPFHV6.js → chunk-VD6QRULW.js} +2 -2
- package/dist/cli/chunks/{chunk-OVPJQWHW.js → chunk-VIHTL3U2.js} +2 -2
- package/dist/cli/chunks/chunk-W7BWUTVV.js +2 -0
- package/dist/cli/chunks/{chunk-3P6NCFI2.js → chunk-WLG5AJ4N.js} +2 -2
- package/dist/cli/chunks/{chunk-V4AOVDCJ.js → chunk-XC7DYDSY.js} +8 -8
- package/dist/cli/chunks/{chunk-LTBCAFTZ.js → chunk-XJ7QNVI5.js} +3 -3
- package/dist/cli/chunks/chunk-XRT2WRMS.js +2 -0
- package/dist/cli/chunks/{chunk-UMENRGHK.js → chunk-XRYF6JV7.js} +2 -2
- package/dist/cli/chunks/{chunk-SHGKY3QB.js → chunk-XWMZ6D6N.js} +2 -2
- package/dist/cli/chunks/{chunk-72UJXEKQ.js → chunk-Y3MW3YBC.js} +2 -2
- package/dist/cli/chunks/chunk-YNXS6CGV.js +2 -0
- package/dist/cli/chunks/{chunk-LVLBIKJD.js → chunk-Z3RHREWF.js} +1 -1
- package/dist/cli/chunks/{chunk-HXE5NBJG.js → chunk-ZBAKA4YB.js} +1 -1
- package/dist/cli/chunks/chunk-ZBJ4XOOV.js +180 -0
- package/dist/cli/chunks/chunk-ZBQY5GLF.js +11 -0
- package/dist/cli/chunks/{chunk-NBWQBQO5.js → chunk-ZJ26AQA5.js} +1 -1
- package/dist/cli/chunks/{chunk-TJEIOE7F.js → chunk-ZNEMGX5O.js} +1 -1
- package/dist/cli/chunks/{chunk-AB4U6ZNI.js → chunk-ZNPKDCZR.js} +2 -2
- package/dist/cli/chunks/{chunk-WYMGK5DX.js → chunk-ZZDIMOOV.js} +2 -2
- package/dist/cli/chunks/ci-464KPQNP.js +81 -0
- package/dist/cli/chunks/{ci-output-LK3MBXLZ.js → ci-output-I7FX2RSO.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-7AIXACR7.js → circuit-breaker-3FW237WW.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-UA7EO6VN.js → claude-flow-setup-6JKMBPGU.js} +2 -2
- package/dist/cli/chunks/client-7E4LM2WW.js +2 -0
- package/dist/cli/chunks/{cline-installer-YDDCKKEV.js → cline-installer-UWFHT6VY.js} +2 -2
- package/dist/cli/chunks/{code-URB7UAKW.js → code-KQSUT3FS.js} +29 -29
- package/dist/cli/chunks/{code-index-extractor-BL6HWH4Q.js → code-index-extractor-PABBNUSC.js} +2 -2
- package/dist/cli/chunks/{codex-installer-2AVEO4EA.js → codex-installer-CQ24DTP5.js} +2 -2
- package/dist/cli/chunks/{completions-RCKBSSSS.js → completions-7RWHAUAR.js} +2 -2
- package/dist/cli/chunks/complexity-analyzer-XPOAF33E.js +2 -0
- package/dist/cli/chunks/{continuedev-installer-VOTCEBFH.js → continuedev-installer-V4F2FIZP.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-NVTGLZX3.js → copilot-installer-JMICURQB.js} +2 -2
- package/dist/cli/chunks/core-handlers-IFG3757P.js +2 -0
- package/dist/cli/chunks/cost-tracker-5OFHEYFJ.js +2 -0
- package/dist/cli/chunks/{coverage-ZTPJWXWE.js → coverage-QKN57JDS.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-EK7W4PGP.js +2 -0
- package/dist/cli/chunks/{cursor-installer-CMGJQMHX.js → cursor-installer-GBJ7YXSM.js} +2 -2
- package/dist/cli/chunks/{daemon-V456IWR3.js → daemon-GKP7CMEK.js} +3 -3
- package/dist/cli/chunks/{daemon-Y2I3YVIU.js → daemon-IAVSO6HK.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-ZCBBOD3D.js → dag-attention-scheduler-S225TCI7.js} +2 -2
- package/dist/cli/chunks/{detect-2GHEA4A3.js → detect-IUYH422U.js} +2 -2
- package/dist/cli/chunks/{dist-node-44AGYJCH.js → dist-node-2YRE6A7C.js} +2 -2
- package/dist/cli/chunks/{domain-handler-IDLIEP6X.js → domain-handler-PL2TZC6H.js} +2 -2
- package/dist/cli/chunks/domain-plugins-HCGLXKIT.js +2 -0
- package/dist/cli/chunks/{domain-transfer-KLEXGIRF.js → domain-transfer-KQJRUPXA.js} +2 -2
- package/dist/cli/chunks/dream-NFSCSLY7.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-DUW6K35A.js → embed-and-insert-pattern-ZPAG7235.js} +2 -2
- package/dist/cli/chunks/eval-WCK7KNFN.js +17 -0
- package/dist/cli/chunks/{experience-capture-middleware-CJJJN7CF.js → experience-capture-middleware-2MSQWSAR.js} +3 -3
- package/dist/cli/chunks/{fast-paths-LGLLKX6P.js → fast-paths-VYOSIBKF.js} +2 -2
- package/dist/cli/chunks/{feature-flags-33D3I4DD.js → feature-flags-UJRHFBRX.js} +2 -2
- package/dist/cli/chunks/{feature-flags-QL4NCEGW.js → feature-flags-WCFUKHNQ.js} +2 -2
- package/dist/cli/chunks/{file-discovery-GKCYJPFZ.js → file-discovery-JDGL4ZWS.js} +2 -2
- package/dist/cli/chunks/fleet-ROXVMZ2F.js +43 -0
- package/dist/cli/chunks/{gnn-wrapper-ELSGT67Z.js → gnn-wrapper-NIO4ZCO3.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-ZUI3DOOP.js → heartbeat-handler-PI42WD3C.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-ZATCDJDK.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-WXQABRCA.js +2 -0
- package/dist/cli/chunks/hnsw-index-TPSWLEA5.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-EZMM5JWL.js → hnsw-legacy-bridge-YLC7SPK2.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-G4CE3EOS.js → hnswlib-node-LG6OS3B7.js} +2 -2
- package/dist/cli/chunks/{hooks-LCVXXA55.js → hooks-WVALP5GX.js} +10 -10
- package/dist/cli/chunks/{hypergraph-engine-6Z7RQ3HI.js → hypergraph-engine-GJEMW3EG.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-PLI2GYPK.js → hypergraph-handler-BLF6LXEV.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-HNIU45P5.js +2 -0
- package/dist/cli/chunks/{init-handler-7VH3QJ5Y.js → init-handler-K25RWRYY.js} +6 -6
- package/dist/cli/chunks/init-wizard-JUIPBMHG.js +2 -0
- package/dist/cli/chunks/kernel-5BOZQ754.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-U3MW62DE.js → kilocode-installer-BXN6WZ7G.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-PPEAC44T.js → kiro-installer-PM362DLN.js} +12 -12
- package/dist/cli/chunks/knowledge-graph-EWDAENWM.js +2 -0
- package/dist/cli/chunks/learning-CPERDDRG.js +122 -0
- package/dist/cli/chunks/llm-router-GOAV5FPI.js +37 -0
- package/dist/cli/chunks/llm-router-service-3YT7JGBS.js +2 -0
- package/dist/cli/chunks/{load-VO7ABNHV.js → load-2BG6SHAK.js} +2 -2
- package/dist/cli/chunks/load-test-BP2CPLIV.js +2 -0
- package/dist/cli/chunks/{mcp-THXEINCL.js → mcp-5TTB37DC.js} +2 -2
- package/dist/cli/chunks/{memory-FZTT7ADM.js → memory-4NHBYT6S.js} +5 -5
- package/dist/cli/chunks/memory-backend-4PYQBPRM.js +2 -0
- package/dist/cli/chunks/memory-handlers-2B27NITS.js +2 -0
- package/dist/cli/chunks/multi-model-executor-KCWSGCDT.js +14 -0
- package/dist/cli/chunks/{opencode-installer-GQ7J5SBG.js → opencode-installer-ATZLLK74.js} +2 -2
- package/dist/cli/chunks/{orchestrator-66JK2OS5.js → orchestrator-RKB7XJRG.js} +19 -19
- package/dist/cli/chunks/pattern-null-store-OYOQOV2O.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-O6XHM2G5.js → pattern-usage-recorder-7VE4XDAI.js} +2 -2
- package/dist/cli/chunks/pipeline-LQZSNDD2.js +19 -0
- package/dist/cli/chunks/{platform-Q7UH7FZQ.js → platform-OD5H5U6G.js} +2 -2
- package/dist/cli/chunks/{plugin-7OFLNGOS.js → plugin-EJ6K2MGU.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-OSRDK2FW.js → prime-radiant-advanced-wasm-OIHTKJMN.js} +2 -2
- package/dist/cli/chunks/protocol-executor-3ATJTXWG.js +2 -0
- package/dist/cli/chunks/{protocol-handler-WLYTX6FS.js → protocol-handler-NRBROAU7.js} +2 -2
- package/dist/cli/chunks/{prove-QVNE4V3J.js → prove-EJOGEGD3.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-LLMYZT4X.js +2 -0
- package/dist/cli/chunks/{quality-DNE2RKE5.js → quality-E55UC73D.js} +2 -2
- package/dist/cli/chunks/{quality-gate-2K35GCSI.js → quality-gate-OIQATNT3.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-RN7L6KG5.js +2 -0
- package/dist/cli/chunks/{real-embeddings-SF42ML7G.js → real-embeddings-FPFFNOSZ.js} +2 -2
- package/dist/cli/chunks/ref-validation-OPO6J7OL.js +2 -0
- package/dist/cli/chunks/{roocode-installer-NCEZPF5L.js → roocode-installer-ODY5KRWU.js} +2 -2
- package/dist/cli/chunks/router-MDHITQ2V.js +2 -0
- package/dist/cli/chunks/routing-feedback-5XLNJ3Y3.js +2 -0
- package/dist/cli/chunks/{routing-handler-4MXXZRYP.js → routing-handler-KQM6VWLC.js} +4 -4
- package/dist/cli/chunks/{ruvector-commands-WDFMMCMK.js → ruvector-commands-U2GVV6PF.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-JBW4O3II.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-BPPQL4XJ.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-JT7ZCJY7.js → rvf-migration-coordinator-V2GHCJKN.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-S4562CG5.js +2 -0
- package/dist/cli/chunks/rvf-store-integrity-KMIHD3LP.js +2 -0
- package/dist/cli/chunks/safe-db-FIRHSXVF.js +2 -0
- package/dist/cli/chunks/schedule-RVXFB4HK.js +2 -0
- package/dist/cli/chunks/scheduler-IKKAMAOO.js +2 -0
- package/dist/cli/chunks/{security-CJJ3WJSB.js → security-P5NM353C.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-6RGCTLHD.js → shared-rvf-adapter-LVIUOO4S.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-KIA6Q6MT.js → shared-rvf-dual-writer-2CSG7C4W.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-SQ3HCUQ7.js +2 -0
- package/dist/cli/chunks/{status-handler-BADQV2KA.js → status-handler-6TU6O37R.js} +2 -2
- package/dist/cli/chunks/{structural-health-VMYEYRZG.js → structural-health-KBIJSTXJ.js} +2 -2
- package/dist/cli/chunks/{sync-PXLROLHB.js → sync-LNHI5SB7.js} +2 -2
- package/dist/cli/chunks/{sync-ULY7T5II.js → sync-UHOX6RJW.js} +2 -2
- package/dist/cli/chunks/task-handler-AVDHMLGI.js +49 -0
- package/dist/cli/chunks/task-handlers-KYK4VTRA.js +9 -0
- package/dist/cli/chunks/{test-WCLURQUT.js → test-DHAAI3DU.js} +4 -4
- package/dist/cli/chunks/test-scheduling-XDBZ3QC2.js +15 -0
- package/dist/cli/chunks/{token-bootstrap-GTI24JAL.js → token-bootstrap-GUTTLPZX.js} +2 -2
- package/dist/cli/chunks/{token-usage-DRVG6PKO.js → token-usage-Q2YG5YQN.js} +2 -2
- package/dist/cli/chunks/{transformers-IMDDAMYQ.js → transformers-F5UQTQCY.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-WBZIHVFA.js → tree-sitter-wasm-parser-DEGOHS6F.js} +2 -2
- package/dist/cli/chunks/types-JQ7EQO5Q.js +2 -0
- package/dist/cli/chunks/unified-memory-CXHLHB5I.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-I7WAE54M.js +2 -0
- package/dist/cli/chunks/unified-persistence-6CPF65WI.js +2 -0
- package/dist/cli/chunks/{upgrade-6ALSDWDD.js → upgrade-TJRVGHGD.js} +2 -2
- package/dist/cli/chunks/{validate-XF4ZG3LC.js → validate-BWPCVHBN.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-P5TAFRDA.js → validate-swarm-QVVKCQLP.js} +2 -2
- package/dist/cli/chunks/{vibium-2XDXKNKZ.js → vibium-ZFATIWHO.js} +2 -2
- package/dist/cli/chunks/visual-security-GNPHME5H.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-4JVRQPX5.js → web-tree-sitter-KPLY7ONR.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-WYJXVDO5.js → windsurf-installer-H7XM7ISA.js} +2 -2
- package/dist/cli/chunks/{witness-chain-RPZ2SE2V.js → witness-chain-RRN6NDCH.js} +2 -2
- package/dist/cli/chunks/witness-chain-VT4UHHBR.js +2 -0
- package/dist/cli/chunks/{witness-key-manager-LXG2VBQQ.js → witness-key-manager-DFRL42GE.js} +2 -2
- package/dist/cli/chunks/workflow-2ZQO6WYI.js +51 -0
- package/dist/cli/chunks/workflow-orchestrator-DB3HIECD.js +2 -0
- package/dist/cli/chunks/{wrappers-DIJNNFU6.js → wrappers-SUS6XEJD.js} +2 -2
- package/dist/cli/commands/ci.js +54 -28
- package/dist/cli/commands/code.js +6 -0
- package/dist/cli/commands/eval.js +3 -2
- package/dist/cli/commands/fleet.js +35 -16
- package/dist/cli/commands/learning-snapshot.d.ts +38 -0
- package/dist/cli/commands/learning-snapshot.js +171 -0
- package/dist/cli/commands/learning.js +16 -64
- package/dist/cli/commands/llm-router.js +13 -12
- package/dist/cli/commands/pipeline.js +9 -0
- package/dist/cli/commands/workflow.js +9 -1
- package/dist/cli/handlers/task-handler.js +19 -9
- package/dist/cli/helpers/domain-plugins.d.ts +5 -0
- package/dist/cli/helpers/domain-plugins.js +11 -0
- package/dist/cli/index.js +17 -8
- package/dist/cli/utils/ci-config.d.ts +3 -0
- package/dist/context/sources/git-source.d.ts +2 -0
- package/dist/context/sources/git-source.js +9 -2
- package/dist/coordination/cancelled-task-settlement.d.ts +11 -0
- package/dist/coordination/cancelled-task-settlement.js +15 -0
- package/dist/coordination/consensus/providers/claude-provider.d.ts +2 -2
- package/dist/coordination/consensus/providers/claude-provider.js +18 -25
- package/dist/coordination/consensus/providers/gemini-provider.d.ts +14 -4
- package/dist/coordination/consensus/providers/gemini-provider.js +39 -36
- package/dist/coordination/consensus/providers/ollama-provider.d.ts +8 -7
- package/dist/coordination/consensus/providers/ollama-provider.js +16 -18
- package/dist/coordination/consensus/providers/openai-provider.d.ts +14 -4
- package/dist/coordination/consensus/providers/openai-provider.js +36 -34
- package/dist/coordination/consensus/providers/openrouter-provider.d.ts +5 -5
- package/dist/coordination/consensus/providers/openrouter-provider.js +64 -37
- package/dist/coordination/handlers/test-execution-handlers.js +5 -3
- package/dist/coordination/interfaces.d.ts +2 -2
- package/dist/coordination/protocol-executor.js +68 -9
- package/dist/coordination/queen-coordinator.js +10 -4
- package/dist/coordination/queen-event-handlers.js +17 -0
- package/dist/coordination/queen-task-management.js +25 -0
- package/dist/coordination/queen-types.d.ts +2 -0
- package/dist/coordination/task-executor.js +4 -8
- package/dist/coordination/workflow-composition.d.ts +19 -0
- package/dist/coordination/workflow-composition.js +114 -0
- package/dist/coordination/workflow-orchestrator.d.ts +3 -2
- package/dist/coordination/workflow-orchestrator.js +219 -85
- package/dist/coordination/workflow-types.d.ts +30 -1
- package/dist/coordination/yaml-pipeline-loader.js +9 -5
- package/dist/domains/chaos-resilience/services/chaos-engineer.js +2 -7
- package/dist/domains/code-intelligence/services/knowledge-graph.js +2 -7
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +9 -40
- package/dist/domains/constants.d.ts +1 -6
- package/dist/domains/constants.js +2 -6
- package/dist/domains/contract-testing/services/contract-validator.js +2 -7
- package/dist/domains/coverage-analysis/services/coverage-analyzer.js +2 -12
- package/dist/domains/coverage-analysis/services/gap-detector.js +2 -7
- package/dist/domains/defect-intelligence/services/defect-predictor.js +2 -12
- package/dist/domains/defect-intelligence/services/root-cause-analyzer.js +2 -7
- package/dist/domains/learning-optimization/services/learning-coordinator.js +2 -7
- package/dist/domains/quality-assessment/services/deployment-advisor.js +2 -7
- package/dist/domains/quality-assessment/services/quality-analyzer.js +2 -7
- package/dist/domains/requirements-validation/services/requirements-validator.js +2 -7
- package/dist/domains/security-compliance/services/scanners/sast-scanner.js +3 -7
- package/dist/domains/test-execution/services/flaky-detector.js +33 -3
- package/dist/domains/test-execution/services/retry-handler.js +22 -14
- package/dist/domains/test-execution/services/test-executor.js +42 -21
- package/dist/domains/test-generation/services/test-generator.js +2 -7
- package/dist/domains/visual-accessibility/services/visual-tester.js +2 -7
- package/dist/init/init-wizard-steps.js +1 -1
- package/dist/init/kiro-installer.js +9 -8
- package/dist/init/opencode-installer.js +1 -1
- package/dist/init/phases/07-hooks.js +4 -2
- package/dist/init/phases/12-verification.js +1 -1
- package/dist/init/settings-merge.d.ts +10 -3
- package/dist/init/settings-merge.js +40 -9
- package/dist/integrations/agentic-flow/model-router/types.js +6 -8
- package/dist/integrations/ruvector/brain-exporter.js +9 -15
- package/dist/integrations/ruvector/brain-rvf-exporter.js +17 -30
- package/dist/integrations/ruvector/brain-shared.d.ts +5 -1
- package/dist/integrations/ruvector/brain-shared.js +70 -4
- package/dist/integrations/ruvector/rvf-dual-writer.js +36 -15
- package/dist/integrations/ruvector/rvf-store-integrity.d.ts +14 -9
- package/dist/integrations/ruvector/rvf-store-integrity.js +39 -9
- package/dist/integrations/ruvector/shared-rvf-adapter.js +20 -23
- package/dist/kernel/memory-factory.js +14 -4
- package/dist/kernel/project-root.js +10 -8
- package/dist/kernel/unified-memory.js +1 -1
- package/dist/learning/local-judge-client.d.ts +6 -5
- package/dist/learning/local-judge-client.js +7 -6
- package/dist/learning/pattern-store.js +29 -11
- package/dist/mcp/bundle.js +488 -488
- package/dist/mcp/handlers/index.d.ts +1 -1
- package/dist/mcp/handlers/index.js +1 -1
- package/dist/mcp/handlers/pipeline-handlers.d.ts +31 -1
- package/dist/mcp/handlers/pipeline-handlers.js +63 -0
- package/dist/mcp/handlers/task-handlers.d.ts +1 -0
- package/dist/mcp/handlers/task-handlers.js +12 -4
- package/dist/mcp/protocol-server.d.ts +2 -0
- package/dist/mcp/protocol-server.js +104 -49
- package/dist/mcp/security/sampling-server.js +2 -1
- package/dist/mcp/tool-annotations.js +1 -1
- package/dist/mcp/tools/test-execution/schedule.js +7 -0
- package/dist/mcp/types.d.ts +5 -1
- package/dist/optimization/session-cache.d.ts +5 -0
- package/dist/optimization/session-cache.js +23 -0
- package/dist/routing/advisor/multi-model-executor.d.ts +4 -1
- package/dist/routing/advisor/multi-model-executor.js +8 -1
- package/dist/routing/free-tier/ladder.d.ts +2 -1
- package/dist/routing/free-tier/ladder.js +3 -2
- package/dist/routing/security/cyber-pin.d.ts +35 -11
- package/dist/routing/security/cyber-pin.js +76 -14
- package/dist/routing/value-score.js +1 -1
- package/dist/shared/git/index.d.ts +1 -0
- package/dist/shared/git/index.js +1 -0
- package/dist/shared/git/ref-validation.d.ts +20 -0
- package/dist/shared/git/ref-validation.js +43 -0
- package/dist/shared/llm/anthropic-params.d.ts +40 -0
- package/dist/shared/llm/anthropic-params.js +51 -0
- package/dist/shared/llm/cost-tracker.d.ts +15 -2
- package/dist/shared/llm/cost-tracker.js +62 -10
- package/dist/shared/llm/index.d.ts +2 -2
- package/dist/shared/llm/index.js +2 -2
- package/dist/shared/llm/interfaces.d.ts +1 -1
- package/dist/shared/llm/metrics/cost-metrics.js +5 -4
- package/dist/shared/llm/model-mapping.js +131 -0
- package/dist/shared/llm/model-registry.d.ts +37 -11
- package/dist/shared/llm/model-registry.js +393 -18
- package/dist/shared/llm/openai-params.d.ts +35 -0
- package/dist/shared/llm/openai-params.js +54 -0
- package/dist/shared/llm/provider-manager.js +4 -3
- package/dist/shared/llm/providers/azure-openai.d.ts +11 -0
- package/dist/shared/llm/providers/azure-openai.js +26 -15
- package/dist/shared/llm/providers/bedrock.js +11 -19
- package/dist/shared/llm/providers/claude.js +6 -29
- package/dist/shared/llm/providers/codex.js +4 -3
- package/dist/shared/llm/providers/gemini.d.ts +3 -2
- package/dist/shared/llm/providers/gemini.js +19 -10
- package/dist/shared/llm/providers/ollama.d.ts +2 -0
- package/dist/shared/llm/providers/ollama.js +30 -20
- package/dist/shared/llm/providers/openai.js +10 -17
- package/dist/shared/llm/providers/openrouter.d.ts +1 -1
- package/dist/shared/llm/providers/openrouter.js +57 -21
- package/dist/shared/llm/router/agent-router-config.js +33 -32
- package/dist/shared/llm/router/hybrid-router.js +21 -9
- package/dist/shared/llm/router/routing-rules.js +9 -8
- package/dist/shared/llm/router/types.js +81 -13
- package/dist/shared/llm/translation/message-formatter.js +4 -23
- package/dist/shared/vitest-json-report.d.ts +7 -7
- package/dist/shared/vitest-json-report.js +23 -14
- package/dist/test-scheduling/executors/vitest-executor.d.ts +7 -2
- package/dist/test-scheduling/executors/vitest-executor.js +157 -47
- package/dist/test-scheduling/git-aware/test-selector.js +3 -0
- package/dist/test-scheduling/phase-scheduler.d.ts +1 -0
- package/dist/test-scheduling/phase-scheduler.js +23 -1
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-AKQYU6UH.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-MICRPL3N.js +0 -2
- package/dist/cli/chunks/base-DZK36ITB.js +0 -2
- package/dist/cli/chunks/brain-handler-H5OVZ22L.js +0 -90
- package/dist/cli/chunks/browser-workflow-ADK54DOE.js +0 -2
- package/dist/cli/chunks/chunk-42VSQ2MX.js +0 -4
- package/dist/cli/chunks/chunk-44WISFTU.js +0 -2
- package/dist/cli/chunks/chunk-4OUPCTBS.js +0 -16
- package/dist/cli/chunks/chunk-4TXAP3YH.js +0 -2
- package/dist/cli/chunks/chunk-4W7QVUNO.js +0 -2
- package/dist/cli/chunks/chunk-527HQAY7.js +0 -14
- package/dist/cli/chunks/chunk-5DFHE4H5.js +0 -180
- package/dist/cli/chunks/chunk-5P3G6ZW4.js +0 -2
- package/dist/cli/chunks/chunk-6F2RM6X2.js +0 -2
- package/dist/cli/chunks/chunk-7Y2CEXRS.js +0 -65
- package/dist/cli/chunks/chunk-AWNYEAGB.js +0 -2
- package/dist/cli/chunks/chunk-CBOPBYPU.js +0 -2
- package/dist/cli/chunks/chunk-FD2JFEQC.js +0 -2
- package/dist/cli/chunks/chunk-I4NDQGKP.js +0 -2
- package/dist/cli/chunks/chunk-L2GKMBDP.js +0 -2
- package/dist/cli/chunks/chunk-QLWNXBRU.js +0 -2
- package/dist/cli/chunks/chunk-R2AFVFRF.js +0 -2
- package/dist/cli/chunks/chunk-ROX7NLS4.js +0 -14
- package/dist/cli/chunks/chunk-T62DH4GG.js +0 -11
- package/dist/cli/chunks/chunk-UMNYF5EZ.js +0 -2
- package/dist/cli/chunks/chunk-UTVRQEZM.js +0 -54
- package/dist/cli/chunks/chunk-Y5SQBI2F.js +0 -2
- package/dist/cli/chunks/ci-YVKDQWIX.js +0 -81
- package/dist/cli/chunks/client-M72GXFVQ.js +0 -2
- package/dist/cli/chunks/complexity-analyzer-LEDG62YK.js +0 -2
- package/dist/cli/chunks/core-handlers-C32RAMVI.js +0 -2
- package/dist/cli/chunks/cost-tracker-GJIFB2BM.js +0 -2
- package/dist/cli/chunks/cross-domain-router-UGFUCPKC.js +0 -2
- package/dist/cli/chunks/dream-UFBBXY5W.js +0 -2
- package/dist/cli/chunks/eval-PR6YWDFM.js +0 -17
- package/dist/cli/chunks/fleet-QNT6X2YI.js +0 -43
- package/dist/cli/chunks/heartbeat-scheduler-VQWHSGTY.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-BS3NXWGU.js +0 -2
- package/dist/cli/chunks/hnsw-index-JP26B4HW.js +0 -2
- package/dist/cli/chunks/impact-analyzer-WRE4CWPJ.js +0 -2
- package/dist/cli/chunks/init-wizard-OFOEYB75.js +0 -2
- package/dist/cli/chunks/kernel-MXNFWNUD.js +0 -2
- package/dist/cli/chunks/knowledge-graph-7JE2TVKJ.js +0 -2
- package/dist/cli/chunks/learning-7B5NITDV.js +0 -122
- package/dist/cli/chunks/llm-router-BNEPT5OB.js +0 -37
- package/dist/cli/chunks/llm-router-service-GTDVDKSU.js +0 -2
- package/dist/cli/chunks/load-test-JZ4CLSBF.js +0 -2
- package/dist/cli/chunks/memory-backend-Q54CC5A5.js +0 -2
- package/dist/cli/chunks/memory-handlers-IIBJXKHZ.js +0 -2
- package/dist/cli/chunks/multi-model-executor-HEDVOZ6X.js +0 -14
- package/dist/cli/chunks/pattern-null-store-W33O7FYO.js +0 -2
- package/dist/cli/chunks/pipeline-UOG6UO6D.js +0 -19
- package/dist/cli/chunks/protocol-executor-VGN4M7XY.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-7VB5LJGS.js +0 -2
- package/dist/cli/chunks/queen-coordinator-HIDMJMMG.js +0 -2
- package/dist/cli/chunks/router-CTIJS4D7.js +0 -2
- package/dist/cli/chunks/routing-feedback-LFYYZS5J.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-MNPMIWVM.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-DXOKSSNW.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-PZKUKA7R.js +0 -2
- package/dist/cli/chunks/rvf-store-integrity-Q3FGYKFT.js +0 -2
- package/dist/cli/chunks/safe-db-73BLFV2C.js +0 -2
- package/dist/cli/chunks/schedule-YVTGTTI4.js +0 -2
- package/dist/cli/chunks/scheduler-5DSAFIRQ.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-LRG4IPCU.js +0 -2
- package/dist/cli/chunks/task-handler-L7E2I267.js +0 -49
- package/dist/cli/chunks/task-handlers-6DPKE4AK.js +0 -9
- package/dist/cli/chunks/test-scheduling-4CNJA6TW.js +0 -15
- package/dist/cli/chunks/types-TXMY5M2K.js +0 -2
- package/dist/cli/chunks/unified-memory-VBQ572X4.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-J3L74ZRY.js +0 -2
- package/dist/cli/chunks/unified-persistence-EM2VYRTQ.js +0 -2
- package/dist/cli/chunks/visual-security-GX4S7K6O.js +0 -2
- package/dist/cli/chunks/witness-chain-QGKMHCNW.js +0 -2
- package/dist/cli/chunks/workflow-2OYNO7UU.js +0 -51
- package/dist/cli/chunks/workflow-orchestrator-KWHIJMFV.js +0 -2
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* A REAL test executor that actually runs tests using Vitest.
|
|
5
5
|
* No simulation. No fake data. Real test execution.
|
|
6
6
|
*/
|
|
7
|
-
import { spawn } from 'child_process';
|
|
7
|
+
import { execFile, spawn } from 'child_process';
|
|
8
8
|
import { safeJsonParse } from '../../shared/safe-json.js';
|
|
9
|
+
import { getTestRunnerExecutionError } from '../../shared/test-runner-verdict.js';
|
|
9
10
|
import { createVitestJsonReport } from '../../shared/vitest-json-report.js';
|
|
10
11
|
// ============================================================================
|
|
11
12
|
// Vitest Executor Implementation
|
|
12
13
|
// ============================================================================
|
|
13
14
|
export class VitestPhaseExecutor {
|
|
14
15
|
config;
|
|
15
|
-
|
|
16
|
-
isAborted = false;
|
|
16
|
+
currentCommand = null;
|
|
17
17
|
constructor(config = {}) {
|
|
18
18
|
this.config = config;
|
|
19
19
|
}
|
|
@@ -21,7 +21,6 @@ export class VitestPhaseExecutor {
|
|
|
21
21
|
// PhaseExecutor Interface
|
|
22
22
|
// --------------------------------------------------------------------------
|
|
23
23
|
async execute(phase, testFiles) {
|
|
24
|
-
this.isAborted = false;
|
|
25
24
|
const startTime = Date.now();
|
|
26
25
|
try {
|
|
27
26
|
const args = this.buildArgs(phase, testFiles);
|
|
@@ -48,11 +47,7 @@ export class VitestPhaseExecutor {
|
|
|
48
47
|
return 'vitest-executor';
|
|
49
48
|
}
|
|
50
49
|
async abort() {
|
|
51
|
-
this.
|
|
52
|
-
if (this.currentProcess) {
|
|
53
|
-
this.currentProcess.kill('SIGTERM');
|
|
54
|
-
this.currentProcess = null;
|
|
55
|
-
}
|
|
50
|
+
await this.currentCommand?.terminate(new Error('Test execution aborted'));
|
|
56
51
|
}
|
|
57
52
|
// --------------------------------------------------------------------------
|
|
58
53
|
// Private Methods
|
|
@@ -101,15 +96,22 @@ export class VitestPhaseExecutor {
|
|
|
101
96
|
const report = createVitestJsonReport();
|
|
102
97
|
let document;
|
|
103
98
|
let exitCode;
|
|
99
|
+
let stderr;
|
|
104
100
|
try {
|
|
105
101
|
const run = await this.runCommand(this.config.vitestPath || 'npx', [...args, ...report.args], timeoutMs);
|
|
106
102
|
exitCode = run.exitCode;
|
|
107
|
-
|
|
103
|
+
stderr = run.stderr;
|
|
104
|
+
const currentReport = report.read(run.stdout);
|
|
105
|
+
if (currentReport === undefined) {
|
|
106
|
+
throw new Error('The current Vitest JSON report is missing for this phase.');
|
|
107
|
+
}
|
|
108
|
+
document = currentReport;
|
|
108
109
|
}
|
|
109
110
|
finally {
|
|
110
111
|
report.cleanup();
|
|
111
112
|
}
|
|
112
113
|
// Parse JSON report from Vitest
|
|
114
|
+
let result;
|
|
113
115
|
try {
|
|
114
116
|
const jsonStart = document.indexOf('{');
|
|
115
117
|
const jsonEnd = document.lastIndexOf('}');
|
|
@@ -117,9 +119,9 @@ export class VitestPhaseExecutor {
|
|
|
117
119
|
throw new Error('No JSON output from Vitest');
|
|
118
120
|
}
|
|
119
121
|
const jsonStr = document.slice(jsonStart, jsonEnd + 1);
|
|
120
|
-
|
|
122
|
+
result = safeJsonParse(jsonStr);
|
|
121
123
|
}
|
|
122
|
-
catch
|
|
124
|
+
catch {
|
|
123
125
|
// If JSON parsing fails, create a basic result from exit code
|
|
124
126
|
return {
|
|
125
127
|
numTotalTestSuites: 0,
|
|
@@ -134,46 +136,154 @@ export class VitestPhaseExecutor {
|
|
|
134
136
|
testResults: [],
|
|
135
137
|
};
|
|
136
138
|
}
|
|
139
|
+
const executionError = getTestRunnerExecutionError('vitest', 'phase', exitCode, {
|
|
140
|
+
passed: result.numPassedTests,
|
|
141
|
+
failed: result.numFailedTests,
|
|
142
|
+
skipped: result.numPendingTests,
|
|
143
|
+
}, stderr, result);
|
|
144
|
+
if (executionError)
|
|
145
|
+
throw executionError;
|
|
146
|
+
return result;
|
|
137
147
|
}
|
|
138
148
|
runCommand(command, args, timeoutMs) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
});
|
|
159
|
-
this.currentProcess.stderr?.on('data', (data) => {
|
|
160
|
-
stderr += data.toString();
|
|
161
|
-
});
|
|
162
|
-
this.currentProcess.on('close', (code) => {
|
|
163
|
-
clearTimeout(timeout);
|
|
164
|
-
this.currentProcess = null;
|
|
165
|
-
if (this.isAborted) {
|
|
166
|
-
reject(new Error('Test execution aborted'));
|
|
167
|
-
}
|
|
168
|
-
else {
|
|
169
|
-
resolve({ stdout, stderr, exitCode: code ?? 1 });
|
|
149
|
+
if (this.currentCommand) {
|
|
150
|
+
return Promise.reject(new Error('Test executor already has an active process'));
|
|
151
|
+
}
|
|
152
|
+
// shell: false prevents argument injection. A fresh POSIX process group
|
|
153
|
+
// lets cancellation reach npx, Vitest, and the workers it started.
|
|
154
|
+
const executable = process.platform === 'win32' && command === 'npx' ? 'npx.cmd' : command;
|
|
155
|
+
const child = spawn(executable, args, {
|
|
156
|
+
cwd: this.config.cwd || process.cwd(),
|
|
157
|
+
env: { ...process.env, ...this.config.env },
|
|
158
|
+
shell: false,
|
|
159
|
+
detached: process.platform !== 'win32',
|
|
160
|
+
});
|
|
161
|
+
// Detached workers do not receive the terminal's SIGINT. The CLI may
|
|
162
|
+
// exit synchronously from its signal handler, so kill this owned group
|
|
163
|
+
// synchronously while the command is active.
|
|
164
|
+
const stopOnExit = () => {
|
|
165
|
+
if (child.pid) {
|
|
166
|
+
try {
|
|
167
|
+
process.kill(-child.pid, 'SIGKILL');
|
|
170
168
|
}
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
catch { /* already exited */ }
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
if (process.platform !== 'win32')
|
|
173
|
+
process.once('exit', stopOnExit);
|
|
174
|
+
let stdout = '';
|
|
175
|
+
let stderr = '';
|
|
176
|
+
let exitCode = 1;
|
|
177
|
+
let terminalError;
|
|
178
|
+
let terminationError;
|
|
179
|
+
let termination;
|
|
180
|
+
let rejectTermination;
|
|
181
|
+
const terminationFailed = new Promise((_, reject) => { rejectTermination = reject; });
|
|
182
|
+
child.stdout?.on('data', data => { stdout += data.toString(); });
|
|
183
|
+
child.stderr?.on('data', data => { stderr += data.toString(); });
|
|
184
|
+
const closed = new Promise((resolve, reject) => {
|
|
185
|
+
child.once('close', code => { exitCode = code ?? 1; resolve(); });
|
|
186
|
+
child.once('error', reject);
|
|
187
|
+
});
|
|
188
|
+
const active = {
|
|
189
|
+
terminate: (reason) => {
|
|
190
|
+
terminalError ??= reason;
|
|
191
|
+
termination ??= this.terminateProcessTree(child, closed).catch(error => {
|
|
192
|
+
terminationError = error;
|
|
193
|
+
rejectTermination(error);
|
|
194
|
+
throw error;
|
|
195
|
+
});
|
|
196
|
+
return termination;
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
this.currentCommand = active;
|
|
200
|
+
const timeout = setTimeout(() => {
|
|
201
|
+
void active.terminate(new Error(`Test execution timed out after ${timeoutMs}ms`)).catch(() => { });
|
|
202
|
+
}, timeoutMs);
|
|
203
|
+
return (async () => {
|
|
204
|
+
try {
|
|
205
|
+
// A failed kill must settle the phase even if the child never closes.
|
|
206
|
+
await Promise.race([closed, terminationFailed]);
|
|
207
|
+
if (termination)
|
|
208
|
+
await termination;
|
|
209
|
+
if (terminalError)
|
|
210
|
+
throw terminalError;
|
|
211
|
+
return { stdout, stderr, exitCode };
|
|
212
|
+
}
|
|
213
|
+
finally {
|
|
173
214
|
clearTimeout(timeout);
|
|
174
|
-
|
|
175
|
-
|
|
215
|
+
if (process.platform !== 'win32')
|
|
216
|
+
process.removeListener('exit', stopOnExit);
|
|
217
|
+
// A failed kill leaves an unknown survivor. Keep this executor closed
|
|
218
|
+
// to new work rather than replacing the only handle to that tree.
|
|
219
|
+
if (this.currentCommand === active && !terminationError)
|
|
220
|
+
this.currentCommand = null;
|
|
221
|
+
}
|
|
222
|
+
})();
|
|
223
|
+
}
|
|
224
|
+
async terminateProcessTree(child, closed) {
|
|
225
|
+
const pid = child.pid;
|
|
226
|
+
if (!pid) {
|
|
227
|
+
await closed;
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (process.platform === 'win32') {
|
|
231
|
+
// taskkill /T follows the descendant tree; killing only npx.cmd leaves
|
|
232
|
+
// its Vitest child running. There is no POSIX-style process group here.
|
|
233
|
+
await new Promise((resolve, reject) => {
|
|
234
|
+
execFile('taskkill', ['/PID', String(pid), '/T', '/F'], { timeout: 2000 }, error => {
|
|
235
|
+
if (error)
|
|
236
|
+
reject(error);
|
|
237
|
+
else
|
|
238
|
+
resolve();
|
|
239
|
+
});
|
|
176
240
|
});
|
|
241
|
+
await this.waitForClose(closed, 2000);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
this.signalGroup(pid, 'SIGTERM');
|
|
245
|
+
const requestedGrace = this.config.terminationGraceMs;
|
|
246
|
+
const graceMs = requestedGrace !== undefined && Number.isFinite(requestedGrace)
|
|
247
|
+
? Math.max(0, Math.min(requestedGrace, 30_000))
|
|
248
|
+
: 1000;
|
|
249
|
+
if (!await this.waitForGroupExit(pid, graceMs)) {
|
|
250
|
+
this.signalGroup(pid, 'SIGKILL');
|
|
251
|
+
if (!await this.waitForGroupExit(pid, 2000)) {
|
|
252
|
+
throw new Error(`Test process group ${pid} survived SIGKILL`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
await this.waitForClose(closed, 2000);
|
|
256
|
+
}
|
|
257
|
+
signalGroup(pid, signal) {
|
|
258
|
+
try {
|
|
259
|
+
if (!process.kill(-pid, signal))
|
|
260
|
+
throw new Error(`Failed to send ${signal} to test process group ${pid}`);
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
if (error.code !== 'ESRCH')
|
|
264
|
+
throw error;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async waitForGroupExit(pid, timeoutMs) {
|
|
268
|
+
const deadline = Date.now() + timeoutMs;
|
|
269
|
+
for (;;) {
|
|
270
|
+
try {
|
|
271
|
+
process.kill(-pid, 0);
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
if (error.code === 'ESRCH')
|
|
275
|
+
return true;
|
|
276
|
+
throw error;
|
|
277
|
+
}
|
|
278
|
+
if (Date.now() >= deadline)
|
|
279
|
+
return false;
|
|
280
|
+
await new Promise(resolve => setTimeout(resolve, 25));
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
async waitForClose(closed, timeoutMs) {
|
|
284
|
+
await new Promise((resolve, reject) => {
|
|
285
|
+
const timer = setTimeout(() => reject(new Error('Test process did not close after termination')), timeoutMs);
|
|
286
|
+
closed.then(() => { clearTimeout(timer); resolve(); }, error => { clearTimeout(timer); reject(error); });
|
|
177
287
|
});
|
|
178
288
|
}
|
|
179
289
|
async parseResult(phase, vitestResult, durationMs) {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { spawn } from 'child_process';
|
|
14
14
|
import { resolve, dirname, basename } from 'path';
|
|
15
|
+
import { assertSafeGitRef } from '../../shared/git/ref-validation.js';
|
|
15
16
|
// ============================================================================
|
|
16
17
|
// Default Mapping Rules
|
|
17
18
|
// ============================================================================
|
|
@@ -72,6 +73,7 @@ export class GitAwareTestSelector {
|
|
|
72
73
|
}
|
|
73
74
|
this.cwd = config.cwd || process.cwd();
|
|
74
75
|
this.baseRef = config.baseRef || 'HEAD~1';
|
|
76
|
+
assertSafeGitRef(this.baseRef, 'base ref');
|
|
75
77
|
this.mappingRules = config.mappingRules || DEFAULT_MAPPING_RULES;
|
|
76
78
|
this.impactAnalyzer = config.impactAnalyzer;
|
|
77
79
|
}
|
|
@@ -175,6 +177,7 @@ export class GitAwareTestSelector {
|
|
|
175
177
|
* Get the merge base between current branch and main
|
|
176
178
|
*/
|
|
177
179
|
async getMergeBase(targetBranch = 'main') {
|
|
180
|
+
assertSafeGitRef(targetBranch, 'target branch');
|
|
178
181
|
try {
|
|
179
182
|
const output = await this.git(['merge-base', 'HEAD', targetBranch]);
|
|
180
183
|
return output.trim();
|
|
@@ -21,6 +21,7 @@ export class PhaseScheduler {
|
|
|
21
21
|
startTime;
|
|
22
22
|
endTime;
|
|
23
23
|
abortController;
|
|
24
|
+
abortRequested = false;
|
|
24
25
|
constructor(executor, config = {
|
|
25
26
|
phases: DEFAULT_TEST_PHASES,
|
|
26
27
|
failFast: true,
|
|
@@ -45,6 +46,7 @@ export class PhaseScheduler {
|
|
|
45
46
|
this.results = [];
|
|
46
47
|
this.startTime = new Date();
|
|
47
48
|
this.abortController = new AbortController();
|
|
49
|
+
this.abortRequested = false;
|
|
48
50
|
try {
|
|
49
51
|
for (const phase of this.config.phases) {
|
|
50
52
|
// Check if paused (pause() can be called externally during execution)
|
|
@@ -56,6 +58,9 @@ export class PhaseScheduler {
|
|
|
56
58
|
break;
|
|
57
59
|
}
|
|
58
60
|
const result = await this.executePhaseWithRetry(phase);
|
|
61
|
+
if (this.abortRequested) {
|
|
62
|
+
throw new Error('Phase aborted');
|
|
63
|
+
}
|
|
59
64
|
this.results.push(result);
|
|
60
65
|
this.currentPhaseIndex++;
|
|
61
66
|
this.config.onPhaseComplete?.(result);
|
|
@@ -64,13 +69,19 @@ export class PhaseScheduler {
|
|
|
64
69
|
break;
|
|
65
70
|
}
|
|
66
71
|
}
|
|
72
|
+
if (this.abortRequested) {
|
|
73
|
+
throw new Error('Phase aborted');
|
|
74
|
+
}
|
|
67
75
|
this.endTime = new Date();
|
|
68
76
|
this.state = this.results.every((r) => r.success) ? 'completed' : 'failed';
|
|
69
77
|
this.config.onAllComplete?.(this.results);
|
|
70
78
|
return this.results;
|
|
71
79
|
}
|
|
72
80
|
catch (error) {
|
|
73
|
-
|
|
81
|
+
// abort() owns the final state after its executor has actually stopped.
|
|
82
|
+
// Until then, do not report a successful or quiesced scheduler run.
|
|
83
|
+
if (!this.abortRequested)
|
|
84
|
+
this.state = 'failed';
|
|
74
85
|
this.endTime = new Date();
|
|
75
86
|
throw error;
|
|
76
87
|
}
|
|
@@ -83,6 +94,7 @@ export class PhaseScheduler {
|
|
|
83
94
|
if (!phase) {
|
|
84
95
|
throw new Error(`Phase not found: ${phaseId}`);
|
|
85
96
|
}
|
|
97
|
+
this.abortRequested = false;
|
|
86
98
|
return this.executePhaseWithRetry(phase);
|
|
87
99
|
}
|
|
88
100
|
/**
|
|
@@ -105,6 +117,7 @@ export class PhaseScheduler {
|
|
|
105
117
|
* Abort execution immediately
|
|
106
118
|
*/
|
|
107
119
|
async abort() {
|
|
120
|
+
this.abortRequested = true;
|
|
108
121
|
this.abortController?.abort();
|
|
109
122
|
await this.executor.abort();
|
|
110
123
|
this.state = 'idle';
|
|
@@ -143,13 +156,22 @@ export class PhaseScheduler {
|
|
|
143
156
|
let lastResult;
|
|
144
157
|
const maxAttempts = this.config.retryFailedPhases ? this.config.maxRetries : 1;
|
|
145
158
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
159
|
+
if (this.abortRequested) {
|
|
160
|
+
throw new Error('Phase aborted');
|
|
161
|
+
}
|
|
146
162
|
try {
|
|
147
163
|
lastResult = await this.executor.execute(phase);
|
|
164
|
+
if (this.abortRequested) {
|
|
165
|
+
throw new Error('Phase aborted');
|
|
166
|
+
}
|
|
148
167
|
if (lastResult.success || !this.config.retryFailedPhases) {
|
|
149
168
|
return lastResult;
|
|
150
169
|
}
|
|
151
170
|
}
|
|
152
171
|
catch (error) {
|
|
172
|
+
if (this.abortRequested) {
|
|
173
|
+
throw new Error('Phase aborted');
|
|
174
|
+
}
|
|
153
175
|
this.config.onError?.(error, phase);
|
|
154
176
|
if (attempt === maxAttempts) {
|
|
155
177
|
return this.createErrorResult(phase, error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-qe",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.4",
|
|
4
4
|
"description": "Agentic Quality Engineering V3 - Domain-Driven Design Architecture with 13 Bounded Contexts, O(log n) coverage analysis, ReasoningBank learning, 60 specialized QE agents, mathematical Coherence verification, deep Claude Flow integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.3");process.exit(0)}
|
|
2
|
-
import{a,b,c}from"./chunk-LTBCAFTZ.js";import"./chunk-CR3QGHVN.js";import"./chunk-SGXSB7YO.js";import"./chunk-YAKS3CAB.js";import"./chunk-HRUU7E3D.js";import"./chunk-Y2DVFVGI.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.3");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-IQEJGZV6.js";import"./chunk-B2ZONZPZ.js";import"./chunk-IU4EBTA2.js";import"./chunk-IFFZR6GY.js";import"./chunk-7Y2CEXRS.js";import"./chunk-7BUERZYL.js";import"./chunk-HXE5NBJG.js";import"./chunk-EY4OQHU3.js";import"./chunk-NBWQBQO5.js";import"./chunk-I4NDQGKP.js";import"./chunk-3ABRGG3C.js";import"./chunk-SJPZSCZP.js";import"./chunk-OV5EZO3U.js";import"./chunk-VWNHKYK7.js";import"./chunk-PZTVH2AS.js";import"./chunk-26GM5CWD.js";import"./chunk-TFHQE6NK.js";import"./chunk-4RP5VUBI.js";import"./chunk-5F6DWHQG.js";import"./chunk-L2GKMBDP.js";import"./chunk-72UJXEKQ.js";import"./chunk-Y5SQBI2F.js";import"./chunk-YAKS3CAB.js";import"./chunk-4JBFJTHJ.js";import"./chunk-LKN7JQTW.js";import"./chunk-6F2RM6X2.js";import"./chunk-C46DMCWF.js";import"./chunk-HRUU7E3D.js";import"./chunk-OYMLHX2B.js";import"./chunk-MXMFGSWR.js";import"./chunk-VIDBBB6F.js";import"./chunk-PI74GOE4.js";import"./chunk-5IAB5NRZ.js";import"./chunk-OVDKWCD7.js";import"./chunk-XA7CG3LH.js";import"./chunk-YEXPFHV6.js";import"./chunk-IP7NSFQQ.js";import"./chunk-T35GZXTU.js";import"./chunk-Y2DVFVGI.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.3");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-44WISFTU.js";import"./chunk-74PK3NEW.js";import"./chunk-TFHQE6NK.js";import"./chunk-4RP5VUBI.js";import"./chunk-5F6DWHQG.js";import"./chunk-L2GKMBDP.js";import"./chunk-72UJXEKQ.js";import"./chunk-Y5SQBI2F.js";import"./chunk-YAKS3CAB.js";import"./chunk-HRUU7E3D.js";import"./chunk-OYMLHX2B.js";import"./chunk-5Y5TC6BY.js";import"./chunk-MXMFGSWR.js";import"./chunk-VIDBBB6F.js";import"./chunk-PI74GOE4.js";import"./chunk-5IAB5NRZ.js";import"./chunk-OVDKWCD7.js";import"./chunk-XA7CG3LH.js";import"./chunk-YEXPFHV6.js";import"./chunk-IP7NSFQQ.js";import"./chunk-T35GZXTU.js";import"./chunk-Y2DVFVGI.js";export{l as MCPToolBase,k as defaultToolLogger,j as getKernel,i as getLLMRouter,e as getMemoryBackend,g as getSharedLLMRouter,c as getSharedMemoryBackend,a as isMemoryOnlyMode,b as registerRvfResetFn,h as resetSharedLLMRouter,d as resetSharedMemoryBackend,f as setSharedLLMRouter};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.3");process.exit(0)}
|
|
2
|
-
import{a as q,b as W,c as H,d as x,e as re,f as j,g as K,h as I,i as ve,j as oe,k as z,l as Re,m as V,n as ae,o as Se,p as k,q as G,r as Q,s as X}from"./chunk-4XPPMADQ.js";import{h as we}from"./chunk-SJPZSCZP.js";import{b as he}from"./chunk-OV5EZO3U.js";import"./chunk-TFHQE6NK.js";import"./chunk-4RP5VUBI.js";import"./chunk-5F6DWHQG.js";import"./chunk-L2GKMBDP.js";import"./chunk-72UJXEKQ.js";import"./chunk-Y5SQBI2F.js";import{b as B,d as ne}from"./chunk-YAKS3CAB.js";import{a as ye,b as be,c as te,d as P,f as Xe}from"./chunk-LKN7JQTW.js";import"./chunk-HRUU7E3D.js";import{a as M,b as Qe}from"./chunk-MXMFGSWR.js";import"./chunk-VIDBBB6F.js";import"./chunk-PI74GOE4.js";import"./chunk-5IAB5NRZ.js";import"./chunk-OVDKWCD7.js";import"./chunk-XA7CG3LH.js";import"./chunk-YEXPFHV6.js";import"./chunk-IP7NSFQQ.js";import"./chunk-T35GZXTU.js";import"./chunk-Y2DVFVGI.js";import A from"path";import o from"chalk";Qe();ne();import{existsSync as Y,mkdirSync as Ye,writeFileSync as Ze,readFileSync as ie}from"fs";import{join as O,resolve as se}from"path";var en={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function nn(e,n){let r=en[e.tableName];return!(r&&n[r]===!1)}var tn=1e4;function rn(e,n,r,t){if(!nn(n,r))return ae(O(t,n.fileName),[]),{count:0,rows:[]};let[a,i]=n.domainColumn?V(r.domains,n.domainColumn):[void 0,[]];if(r.domains&&r.domains.length>0&&!n.domainColumn){let l=r.domains.map(()=>"?").join(","),f=`manifest_id IN (SELECT id FROM learning_evidence_manifests WHERE task_family IN (${l}))`;["learning_evidence_segments","learning_segment_edges","learning_evidence_admissions"].includes(n.tableName)?(a=f,i=[...r.domains]):["pattern_manifest_lineage","pattern_segment_lineage"].includes(n.tableName)&&(a=`${f} AND pattern_id IN (SELECT id FROM qe_patterns WHERE qe_domain IN (${l}))`,i=[...r.domains,...r.domains])}if(oe(e,n.tableName,a,i)>=tn){let l=n.blobColumns,f=l&&l.length>0?y=>j(y,l):void 0;return{count:Se(O(t,n.fileName),Re(e,n.tableName,a,i),f)}}let s=z(e,n.tableName,a,i);return n.blobColumns&&n.blobColumns.length>0&&(s=s.map(l=>j(l,n.blobColumns))),ae(O(t,n.fileName),s),{count:s.length,rows:s}}function xe(e){let n=[];for(let r of x){let t=O(e,r.fileName);Y(t)?n.push(I(ie(t,"utf-8"))):n.push(I(""))}return I(n.join(":"))}function Ce(e,n,r="memory.db"){let t=se(n.outputPath);Y(t)||Ye(t,{recursive:!0});let a=0,i={},c=new Set;for(let u of x){let y=rn(e,u,n,t);if(i[u.tableName]=y.count,a+=y.count,u.tableName==="qe_patterns"){if(y.rows)for(let m of y.rows)m.qe_domain&&c.add(m.qe_domain);else if(y.count>0){let[m,R]=u.domainColumn?V(n.domains,u.domainColumn):[void 0,[]],p=`SELECT DISTINCT qe_domain FROM qe_patterns ${m?`WHERE ${m} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let g=e.prepare(p).all(...R||[]);for(let S of g)c.add(S.qe_domain)}catch{}}}}let s=n.includeVectors!==!1?oe(e,"vectors"):0,l=xe(t),f={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:r,stats:{patternCount:i.qe_patterns||0,vectorCount:s,qValueCount:i.rl_q_values||0,dreamInsightCount:i.dream_insights||0,witnessChainLength:i.witness_chain||0,totalRecords:a},domains:[...c].sort(),checksum:l,tableRecordCounts:i};return Ze(O(t,"manifest.json"),JSON.stringify(f,null,2),"utf-8"),f}var on=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function an(e){return e==="1.0"?x.filter(n=>on.has(n.tableName)):e==="3.0"?x:(console.warn(`[brain-import] Unknown manifest version '${e}'. Attempting full import \u2014 some files may be missing.`),x)}function _e(e,n,r){let t=se(n),a=O(t,"manifest.json");if(!Y(a))throw new Error(`Manifest not found at ${a}`);let i=B(ie(a,"utf-8")),c=xe(t);if(c!==i.checksum)throw new Error(`Checksum mismatch: expected ${i.checksum}, got ${c}. The export may have been tampered with or corrupted.`);let s=an(i.version);if(r.dryRun){let m=0;for(let R of s){let d=k(O(t,R.fileName),B);m+=d.length}return{imported:m,skipped:0,conflicts:0}}X(e);let l=0,f=0,u=0;return e.transaction(()=>{for(let m of s){let R=O(t,m.fileName),d=k(R,B);m.blobColumns&&m.blobColumns.length>0&&(d=d.map(p=>K(p,m.blobColumns)));for(let p of d){let g;if(m.dedupColumns&&m.dedupColumns.length>0)g=Q(e,m.tableName,p,m.dedupColumns,m.preserveId);else{let S=q[m.tableName]||"id",h=H[m.tableName],$=W[m.tableName];g=G(e,m.tableName,p,S,r.mergeStrategy,h,$)}l+=g.imported,f+=g.skipped,u+=g.conflicts}}})(),{imported:l,skipped:f,conflicts:u}}function Ee(e){let n=se(e),r=O(n,"manifest.json");if(!Y(r))throw new Error(`Manifest not found at ${r}`);return B(ie(r,"utf-8"))}Xe();import{existsSync as F,readdirSync as sn,renameSync as ln,statSync as cn,unlinkSync as le,writeFileSync as dn}from"fs";import{basename as fn,dirname as mn,join as un,resolve as Z}from"path";var Ie=["",".idmap.json",".manifest.json"],pn=[...Ie,".lock"];function Be(e){for(let n of pn)try{let r=`${e}${n}`;F(r)&&le(r)}catch{}}function gn(e){let n=mn(e),r=`${fn(e)}.tmp.`,t;try{t=sn(n)}catch{return}for(let a of t){if(!a.startsWith(r))continue;let i=Number.parseInt(a.slice(r.length).split(".")[0],10);if(!(!Number.isInteger(i)||i<=0)&&!(i!==process.pid&&yn(i)))try{le(un(n,a))}catch{}}}function yn(e){try{return process.kill(e,0),!0}catch(n){return n.code==="EPERM"}}function Oe(e,n,r="memory.db"){if(!P())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let t=Z(n.outputPath),a=n.dimension??384,i=`${t}.tmp.${process.pid}`;gn(t),Be(i);let c=ye(i,a),s=!1;try{let l={},f=new Set,u=0;for(let b of x){let[C,v]=b.domainColumn?V(n.domains,b.domainColumn):[void 0,[]],_=z(e,b.tableName,C,v);if(n.domains&&n.domains.length>0){let w=new Set((l.learning_evidence_manifests??[]).map(E=>E.id)),T=new Set((l.qe_patterns??[]).map(E=>E.id));["learning_evidence_segments","learning_segment_edges","learning_evidence_admissions"].includes(b.tableName)?_=_.filter(E=>w.has(E.manifest_id)):b.tableName==="pattern_manifest_lineage"?_=_.filter(E=>{let N=E;return w.has(N.manifest_id)&&T.has(N.pattern_id)}):b.tableName==="pattern_segment_lineage"&&(_=_.filter(E=>{let N=E;return w.has(N.manifest_id)&&T.has(N.pattern_id)}))}if(b.tableName==="qe_patterns")for(let w of _)w.qe_domain&&f.add(w.qe_domain);let D=re[b.tableName];D&&D.length>0&&(_=_.map(w=>j(w,D))),l[b.tableName]=_,u+=_.length}let y=0,m=[];if(ve(e,"qe_pattern_embeddings")){let b=e.prepare("PRAGMA table_info('qe_pattern_embeddings')").all().some(v=>v.name==="space_id"),C=e.prepare(`SELECT pattern_id, embedding, dimension, ${b?"space_id":"NULL"} AS space_id
|
|
3
|
-
FROM qe_pattern_embeddings`).all();for(let v of C)v.embedding&&v.dimension===a&&v.space_id&&m.push({id:`pe:${v.pattern_id}`,vector:new Float32Array(v.embedding.buffer,v.embedding.byteOffset,a),metadata:{tableName:"qe_pattern_embeddings",spaceId:v.space_id}})}m.length>0&&(y=c.ingest(m).accepted);let R={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:r,domains:[...f].sort(),tables:l},d=JSON.stringify(R),p=I(d),g=Buffer.from(d);c.embedKernel(g);let S=n.sign?c.sign(g)??void 0:void 0,h=S?n.signerKeyId??"default":void 0,$=c.fileId(),U=$?{fileId:$,parentId:c.parentId(),lineageDepth:c.lineageDepth()}:void 0,L=c.status(),ee={version:"3.0",format:"rvf",exportedAt:R.exportedAt,sourceDb:r,stats:{patternCount:(l.qe_patterns||[]).length,embeddingCount:y,qValueCount:(l.rl_q_values||[]).length,dreamInsightCount:(l.dream_insights||[]).length,witnessChainLength:(l.witness_chain||[]).length,totalRecords:u,tableCounts:Object.fromEntries(x.map(({tableName:b})=>[b,l[b]?.length??0]))},domains:R.domains,checksum:p,rvfStatus:{totalVectors:L.totalVectors,totalSegments:L.totalSegments,fileSizeBytes:L.fileSizeBytes},...S?{signature:S,signerKeyId:h}:{},...U?{lineage:U}:{}};if(S)try{c.freeze()}catch{}if(dn(`${i}.manifest.json`,JSON.stringify(ee,null,2),"utf-8"),c.close(),s=!0,F(t)&&!n.allowOverwriteRicher){let b;try{b=J(t)}catch(C){if(bn(t)||!hn(C)){let v=C instanceof Error?C.message:String(C);throw new Error(`RVF_MIRROR_INSPECTION_AMBIGUOUS: the existing mirror is readable but its richness could not be established (${v}). Preserve/import it before retrying, or repeat with --force-overwrite-richer after preserving a backup.`)}}if(b){let C=b.stats.tableCounts,v=ee.stats.tableCounts,_=x.map(({tableName:w})=>w).filter(w=>!C||!Number.isSafeInteger(C[w]));if(_.length>0)throw new Error(`RVF_MIRROR_INSPECTION_AMBIGUOUS: existing mirror lacks trustworthy counts for ${_.join(", ")}. Preserve/import it before retrying, or repeat with --force-overwrite-richer after preserving a backup.`);let D=x.map(({tableName:w})=>({tableName:w,existing:C[w],candidate:v[w]})).filter(({existing:w,candidate:T})=>w>T);if(D.length>0){let w=D.map(({tableName:T,existing:E,candidate:N})=>`${T} ${E} -> ${N}`).join(", ");throw new Error(`RVF_MIRROR_RICHER: refusing to replace richer mirrored tables: ${w}. Restore/import the mirror first, or repeat with --force-overwrite-richer after preserving a backup.`)}}}for(let b of[...Ie].reverse()){let C=`${i}${b}`,v=`${t}${b}`;F(C)?ln(C,v):F(v)&&le(v)}return ee}catch(l){if(!s)try{c.close()}catch{}throw Be(i),l}}function bn(e){let n;try{return n=te(Z(e)),!!n.extractKernel()?.image}catch{return!1}finally{try{n?.close()}catch{}}}function hn(e){let n=e instanceof Error?e.message:String(e);return/ManifestNotFound|InvalidMagic|ChecksumMismatch|CorruptStore/i.test(n)}var wn={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function Ae(e,n,r){if(!P())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let t=Z(n);if(!F(t))throw new Error(`RVF file not found: ${t}`);let a=be(t);try{let i=a.verifyWitness();if(!i.valid&&(i.totalEntries>0||i.errors.length>0)){let d=i.errors.length>0?i.errors.join("; "):"unknown integrity error";throw new Error(`RVF witness verification failed: ${d}`)}let c=a.extractKernel();if(!c||!c.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let s;try{s=JSON.parse(c.image.toString("utf-8"))}catch(d){throw new Error(`Failed to parse brain kernel data as JSON: ${d instanceof Error?d.message:d}`)}if(r.dryRun){let d=0;if(s.tables)for(let p of Object.values(s.tables))d+=p?.length??0;else d=(s.patterns?.length??0)+(s.qValues?.length??0)+(s.dreamInsights?.length??0)+(s.witnessChain?.length??0);return{imported:d,skipped:0,conflicts:0,embeddingsRestored:0}}X(e);let l=0,f=0,u=0,y=0,m={};if(s.tables)Object.assign(m,s.tables);else for(let[d,p]of Object.entries(wn)){let g=s[d];Array.isArray(g)&&(m[p]=g)}if(e.transaction(()=>{for(let d of x){let p=m[d.tableName];if(!p||!Array.isArray(p))continue;let g=re[d.tableName];if(g&&g.length>0){p=p.map(S=>K(S,g));for(let S of p)for(let h of g)S[h]instanceof Buffer&&y++}for(let S of p){let h;if(d.dedupColumns&&d.dedupColumns.length>0)h=Q(e,d.tableName,S,d.dedupColumns,d.preserveId);else{let $=q[d.tableName]||"id",U=H[d.tableName],L=W[d.tableName];h=G(e,d.tableName,S,$,r.mergeStrategy,U,L)}l+=h.imported,f+=h.skipped,u+=h.conflicts}}})(),u>0)try{a.compact()}catch{}return{imported:l,skipped:f,conflicts:u,embeddingsRestored:y}}finally{a.close()}}function J(e){if(!P())throw new Error("@ruvector/rvf-node is not available.");let n=Z(e);if(!F(n))throw new Error(`RVF file not found: ${n}`);let r=te(n);try{let t=r.extractKernel();if(!t||!t.image)throw new Error("No brain data found in RVF file");let a=t.image.toString("utf-8"),i;try{i=JSON.parse(a)}catch(d){throw new Error(`Failed to parse brain kernel data as JSON: ${d instanceof Error?d.message:d}`)}let c=r.status(),s=cn(n).size,l=i.tables,f=l?l.qe_patterns?.length??0:i.patterns?.length??0,u=l?l.rl_q_values?.length??0:i.qValues?.length??0,y=l?l.dream_insights?.length??0:i.dreamInsights?.length??0,m=l?l.witness_chain?.length??0:i.witnessChain?.length??0,R=l&&typeof l=="object"&&!Array.isArray(l)?Object.fromEntries(Object.entries(l).filter(d=>Array.isArray(d[1])).map(([d,p])=>[d,p.length])):void 0;return{version:"3.0",format:"rvf",exportedAt:i.exportedAt??"unknown",sourceDb:i.sourceDb??"unknown",stats:{patternCount:f,embeddingCount:c.totalVectors,qValueCount:u,dreamInsightCount:y,witnessChainLength:m,...R?{tableCounts:R}:{}},domains:i.domains??[],checksum:I(a),rvfStatus:{totalVectors:c.totalVectors,totalSegments:c.totalSegments,fileSizeBytes:s}}}finally{r.close()}}function ce(){return P()}ne();import{existsSync as fe,readFileSync as vn,statSync as Rn}from"fs";import{join as de,resolve as Ne}from"path";function Te(e,n,r={}){let t=Ne(e),a=Ne(n),i=ke(t),c=ke(a),s=$e(t,i),l=$e(a,c),f=i==="jsonl"&&c==="jsonl",u=Cn({pathA:t,pathB:a,manifestA:s,manifestB:l,recordLevel:f,tableFilter:r.tableFilter,maxIdsPerBucket:r.maxIdsPerBucket??500}),y=new Set(s.domains),m=new Set(l.domains),R=s.domains.filter(h=>!m.has(h)),d=l.domains.filter(h=>!y.has(h)),p=s.checksum===l.checksum,g=s.version===l.version,S=p&&g&&u.every(h=>h.delta===0&&(h.added?.length??0)===0&&(h.removed?.length??0)===0&&(h.changed?.length??0)===0);return{pathA:t,pathB:a,formatA:i,formatB:c,manifestA:s,manifestB:l,checksumMatch:p,versionMatch:g,identical:S,recordLevel:f,tableDiffs:u,domainsOnlyInA:R,domainsOnlyInB:d}}function ke(e){if(!fe(e))throw new Error(`Path not found: ${e}`);if(e.endsWith(".rvf"))return"rvf";if(Rn(e).isFile())throw new Error(`Unsupported brain export: ${e} (expected a .rvf file or a JSONL directory)`);return"jsonl"}function $e(e,n){return n==="rvf"?xn(e):Sn(e)}function Sn(e){let n=de(e,"manifest.json");if(!fe(n))throw new Error(`Manifest not found at ${n}`);let r=B(vn(n,"utf-8"));return Me(r,"jsonl")}function xn(e){let n=J(e);return Me(n,"rvf")}function Me(e,n){return{format:n,version:e.version??"unknown",exportedAt:e.exportedAt??"unknown",sourceDb:e.sourceDb??"unknown",checksum:e.checksum??"",totalRecords:e.stats?.totalRecords??0,domains:e.domains??[],tableRecordCounts:e.tableRecordCounts??{}}}function Cn(e){let n=e.tableFilter?x.filter(t=>t.tableName===e.tableFilter):x;if(e.tableFilter&&n.length===0)throw new Error(`Unknown table: ${e.tableFilter}`);let r=[];for(let t of n){let a=e.manifestA.tableRecordCounts[t.tableName]??0,i=e.manifestB.tableRecordCounts[t.tableName]??0,c=i-a,s,l,f;if(e.recordLevel&&_n(t)){let u=En(de(e.pathA,t.fileName),de(e.pathB,t.fileName),t,e.maxIdsPerBucket);s=u.added,l=u.removed,f=u.changed}r.push({tableName:t.tableName,countA:a,countB:i,delta:c,...s!==void 0?{added:s}:{},...l!==void 0?{removed:l}:{},...f!==void 0?{changed:f}:{}})}return r}function _n(e){return!0}function En(e,n,r,t){let a=De(e,r),i=De(n,r),c=[],s=[],l=[];for(let[f,u]of a){let y=i.get(f);if(y===void 0)s.length<t&&s.push(f);else if(y!==u){if(r.dedupColumns&&r.dedupColumns.length>0)continue;l.length<t&&l.push(f)}}for(let f of i.keys())a.has(f)||c.length<t&&c.push(f);return c.sort(),s.sort(),l.sort(),{added:c,removed:s,changed:l}}function De(e,n){let r=new Map;if(!fe(e))return r;let t=k(e,B);for(let a of t){let i=Bn(a,n);if(i===void 0)continue;let c=In(a);r.set(i,On(c))}return r}function Bn(e,n){if(n.dedupColumns&&n.dedupColumns.length>0){let a=[];for(let i of n.dedupColumns){let c=e[i];if(c==null)return;a.push(String(c))}return a.join("")}let r=q[n.tableName]??"id",t=e[r];if(t!=null)return String(t)}function In(e){let n=Object.keys(e).sort(),r={};for(let t of n)r[t]=e[t];return JSON.stringify(r)}function On(e){return I(e)}ne();import{existsSync as me,statSync as An}from"fs";import{join as qe,resolve as Nn}from"path";var kn=20,$n="qe_patterns";function Fe(e,n={}){let r=Nn(e);Mn(r);let t=n.table??$n,a=x.find(g=>g.tableName===t);if(!a)throw new Error(`Unknown table: ${t}`);let i=qe(r,a.fileName);if(!me(i))throw new Error(`Table file not found: ${a.fileName} (expected in ${r}). Was this export generated with --format jsonl?`);let c=k(i,B),s=a.domainColumn,l=Math.max(1,n.limit??kn),f=n.query?n.query.toLowerCase():void 0,u=n.domains&&n.domains.length>0?new Set(n.domains):void 0,y=n.since,m=n.until,R=n.patternType,d=0,p=[];for(let g of c)Dn(g,{domainColumn:s,domains:u,patternType:R,since:y,until:m,queryLower:f})&&(d++,p.length<l&&p.push(Tn(g,a.tableName,s)));return{table:t,inputPath:r,totalScanned:c.length,totalMatched:d,limit:l,hits:p,truncated:d>l}}function Dn(e,n){if(n.domains){if(!n.domainColumn)return!1;let r=e[n.domainColumn];if(typeof r!="string"||!n.domains.has(r))return!1}if(n.patternType!==void 0&&e.pattern_type!==n.patternType)return!1;if(n.since!==void 0||n.until!==void 0){let r=Le(e);if(r===void 0||n.since!==void 0&&r<n.since||n.until!==void 0&&r>n.until)return!1}if(n.queryLower!==void 0){let r=typeof e.name=="string"?e.name.toLowerCase():"",t=typeof e.description=="string"?e.description.toLowerCase():"";if(!r.includes(n.queryLower)&&!t.includes(n.queryLower))return!1}return!0}function Le(e){for(let n of["updated_at","created_at","timestamp"]){let r=e[n];if(typeof r=="string"&&r.length>0)return r}}function Tn(e,n,r){let t=(typeof e.id=="string"||typeof e.id=="number"?String(e.id):void 0)??`${n}:?`,a={name:typeof e.name=="string"?e.name:void 0,description:typeof e.description=="string"?e.description:void 0,domain:r&&typeof e[r]=="string"?e[r]:void 0,patternType:typeof e.pattern_type=="string"?e.pattern_type:void 0,confidence:typeof e.confidence=="number"?e.confidence:void 0,updatedAt:Le(e)};return{id:t,display:a,row:e}}function Mn(e){if(!me(e))throw new Error(`Path not found: ${e}`);if(An(e).isFile())throw e.endsWith(".rvf")?new Error("Brain search does not support RVF exports. Re-export with --format jsonl, or use `aqe brain info` for RVF summaries."):new Error(`Unsupported brain export: ${e} (expected a JSONL directory)`);let r=qe(e,"manifest.json");if(!me(r))throw new Error(`Manifest not found at ${r}. Is this a brain export directory?`)}function Pe(e,n){if(!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};e.exec(`
|
|
4
|
-
CREATE TEMP TABLE IF NOT EXISTS _covered_patterns (
|
|
5
|
-
pattern_id TEXT PRIMARY KEY
|
|
6
|
-
)
|
|
7
|
-
`),e.exec("DELETE FROM _covered_patterns"),e.exec(`
|
|
8
|
-
INSERT INTO _covered_patterns (pattern_id)
|
|
9
|
-
SELECT DISTINCT json_extract(action_data, '$.patternId')
|
|
10
|
-
FROM witness_chain
|
|
11
|
-
WHERE action_type = 'PATTERN_CREATE'
|
|
12
|
-
AND json_extract(action_data, '$.patternId') IS NOT NULL
|
|
13
|
-
`),e.exec(`
|
|
14
|
-
INSERT OR IGNORE INTO _covered_patterns (pattern_id)
|
|
15
|
-
SELECT DISTINCT json_extract(action_data, '$.pattern_id')
|
|
16
|
-
FROM witness_chain
|
|
17
|
-
WHERE action_type = 'PATTERN_CREATE'
|
|
18
|
-
AND json_extract(action_data, '$.pattern_id') IS NOT NULL
|
|
19
|
-
`);let t=e.prepare(`SELECT p.id, p.pattern_type, p.qe_domain, p.name, p.created_at
|
|
20
|
-
FROM qe_patterns p
|
|
21
|
-
LEFT JOIN _covered_patterns c ON p.id = c.pattern_id
|
|
22
|
-
WHERE c.pattern_id IS NULL
|
|
23
|
-
ORDER BY p.created_at ASC`).all(),i=e.prepare("SELECT COUNT(*) as count FROM qe_patterns").get().count-t.length,c=0;for(let s of t)n.append("PATTERN_CREATE",{patternId:s.id,patternType:s.pattern_type,qeDomain:s.qe_domain,name:s.name,originalCreatedAt:s.created_at,backfilled:!0},"system:backfill"),c++;return e.exec("DROP TABLE IF EXISTS _covered_patterns"),{created:c,skipped:i}}async function je(e,n){if(qn(n.format)==="rvf"){let a=M(e,{readonly:!0});try{return Oe(a,{outputPath:n.outputPath,domains:n.domains,allowOverwriteRicher:n.allowOverwriteRicher},e)}finally{a.close()}}let t=M(e,{readonly:!0});try{return Ce(t,n,e)}finally{t.close()}}async function Ve(e,n,r){if(Ke(n,r.format)==="rvf"){let i=M(e);try{return Ae(i,n,{mergeStrategy:r.mergeStrategy,dryRun:r.dryRun})}finally{i.close()}}let a=M(e);try{return _e(a,n,r)}finally{a.close()}}async function Je(e,n){return Ke(e,n)==="rvf"?J(e):Ee(e)}async function Ue(e,n,r={}){return Te(e,n,r)}async function We(e,n={}){return Fe(e,n)}async function He(e){let n=M(e);try{let r=we(n,he());return await r.initialize(),Pe(n,r)}finally{n.close()}}function qn(e){if(e==="jsonl")return"jsonl";if(e==="rvf"){if(!ce())throw new Error("RVF format requested but @ruvector/rvf-node is not available on this platform. Use --format jsonl instead.");return"rvf"}return ce()?"rvf":"jsonl"}function Ke(e,n){return n==="rvf"?"rvf":n==="jsonl"?"jsonl":e.endsWith(".rvf")?"rvf":"jsonl"}var ge=class{name="brain";description="Export, import, and inspect QE brain state";cleanupAndExit;ensureInitialized;constructor(n,r){this.cleanupAndExit=n,this.ensureInitialized=r}register(n,r){let t=n.command("brain").description(this.description);t.command("export").description("Export brain state to a portable directory").requiredOption("-o, --output <path>","Output directory path").option("--format <format>","Export format: rvf (default) or jsonl","rvf").option("--db <path>","Source database path").option("--force-overwrite-richer","Allow replacing an existing RVF with fewer patterns",!1).action(async a=>{await this.executeExport(a)}),t.command("import").description("Import brain state from an export directory").requiredOption("-i, --input <path>","Path to brain export directory").option("--strategy <strategy>","Merge strategy","skip-conflicts").option("--dry-run","Preview import without writing",!1).option("--db <path>","Target database path").action(async a=>{await this.executeImport(a)}),t.command("info").description("Show manifest info for a brain export").requiredOption("-i, --input <path>","Path to brain export directory").action(async a=>{await this.executeInfo(a)}),t.command("witness-backfill").description("Create witness chain entries for patterns that predate the witness chain").option("--db <path>","Database path").action(async a=>{await this.executeWitnessBackfill(a)}),t.command("diff").description("Compare two brain exports (JSONL directory or .rvf file)").argument("<a>","Path to first brain export").argument("<b>","Path to second brain export").option("--table <name>","Restrict comparison to a single table").option("--verbose","Show the IDs of added/removed/changed records",!1).option("--json","Emit the diff as JSON to stdout",!1).action(async(a,i,c)=>{await this.executeDiff(a,i,c)}),t.command("search").description("Search a JSONL brain export with filters").requiredOption("-i, --input <path>","Path to brain export directory (JSONL)").option("--table <name>","Table to search (default: qe_patterns)").option("--domain <name...>","Restrict to one or more domains").option("--pattern-type <type>","Restrict to a specific pattern_type (qe_patterns only)").option("--since <iso>","Include rows with timestamp \u2265 <iso>").option("--until <iso>","Include rows with timestamp \u2264 <iso>").option("-q, --query <text>","Substring match across name + description (case-insensitive)").option("-l, --limit <n>","Maximum results to return","20").option("--json","Emit results as JSON to stdout",!1).action(async a=>{await this.executeSearch(a)})}async executeExport(n){try{console.log(o.blue(`
|
|
24
|
-
Exporting brain state (format: ${n.format})...
|
|
25
|
-
`));let r=await ue(n.db),t=await je(r,{outputPath:A.resolve(n.output),format:n.format,allowOverwriteRicher:n.forceOverwriteRicher});if(console.log(o.green(" Export complete.")),console.log(` Format: ${o.cyan("format"in t?t.format??"jsonl":"jsonl")}`),console.log(` Patterns: ${o.cyan(t.stats.patternCount)}`),"embeddingCount"in t.stats?console.log(` Vectors: ${o.cyan(t.stats.embeddingCount)}`):"vectorCount"in t.stats&&console.log(` Vectors: ${o.cyan(t.stats.vectorCount)}`),"rvfStatus"in t){let a=t.rvfStatus;console.log(` RVF Size: ${o.cyan(ze(a.fileSizeBytes))}`),console.log(` Segments: ${o.cyan(a.totalSegments)}`)}console.log(` Checksum: ${o.gray(t.checksum)}`),console.log(` Output: ${o.cyan(A.resolve(n.output))}`),console.log(""),await this.cleanupAndExit(0)}catch(r){console.error(o.red(`
|
|
26
|
-
Brain export failed:`),r),await this.cleanupAndExit(1)}}async executeImport(n){try{n.dryRun?console.log(o.yellow(`
|
|
27
|
-
Dry-run mode \u2014 no data will be written.
|
|
28
|
-
`)):console.log(o.blue(`
|
|
29
|
-
Importing brain state...
|
|
30
|
-
`));let r=await ue(n.db),t=await Ve(r,A.resolve(n.input),{mergeStrategy:n.strategy,dryRun:n.dryRun});console.log(o.green(" Import complete.")),console.log(` Imported: ${o.cyan(t.imported)}`),console.log(` Skipped: ${o.yellow(t.skipped)}`),console.log(` Conflicts: ${o.red(t.conflicts)}`),"embeddingsRestored"in t&&console.log(` Embeddings: ${o.cyan(t.embeddingsRestored)}`),console.log(""),await this.cleanupAndExit(0)}catch(r){console.error(o.red(`
|
|
31
|
-
Brain import failed:`),r),await this.cleanupAndExit(1)}}async executeInfo(n){try{console.log(o.blue(`
|
|
32
|
-
Brain Export Info
|
|
33
|
-
`));let r=A.resolve(n.input),t=await Je(r),a="format"in t?t.format??"jsonl":"jsonl";if(console.log(` Version: ${o.cyan(t.version)}`),console.log(` Format: ${o.cyan(a)}`),console.log(` Exported: ${o.cyan(t.exportedAt)}`),console.log(` Source DB: ${o.cyan(t.sourceDb)}`),console.log(o.blue(`
|
|
34
|
-
Learning Data:`)),console.log(` Patterns: ${o.cyan(t.stats.patternCount)}`),"qValueCount"in t.stats&&console.log(` Q-Values: ${o.cyan(t.stats.qValueCount)}`),"dreamInsightCount"in t.stats){let s=t.stats.dreamInsightCount,f=("tableRecordCounts"in t?t.tableRecordCounts:void 0)?.dream_cycles,u=f!==void 0?` (${f} cycles)`:"";console.log(` Dream Insights: ${o.cyan(s)}${o.gray(u)}`)}"witnessChainLength"in t.stats&&console.log(` Witness Chain: ${o.cyan(t.stats.witnessChainLength)} entries`),"embeddingCount"in t.stats?console.log(` Embeddings: ${o.cyan(t.stats.embeddingCount)}`):"vectorCount"in t.stats&&console.log(` Vectors: ${o.cyan(t.stats.vectorCount)}`);let i="tableRecordCounts"in t?t.tableRecordCounts:void 0;if(i){let s=Object.entries(i).filter(([l,f])=>f>0&&!["qe_patterns","rl_q_values","dream_insights","dream_cycles","witness_chain","vectors","qe_pattern_embeddings"].includes(l));if(s.length>0)for(let[l,f]of s){let y=`${l.replace(/_/g," ").replace(/\b\w/g,m=>m.toUpperCase())}:`.padEnd(15);console.log(` ${y}${o.cyan(f)}`)}}let c="totalRecords"in t.stats?t.stats.totalRecords:void 0;if(c!==void 0&&(console.log(o.blue(`
|
|
35
|
-
Summary:`)),console.log(` Total Records: ${o.cyan(c)}`)),"domains"in t&&Array.isArray(t.domains)&&t.domains.length>0&&(c||console.log(o.blue(`
|
|
36
|
-
Summary:`)),console.log(` Domains: ${o.cyan(t.domains.join(", "))}`)),"rvfStatus"in t){let s=t.rvfStatus;console.log(o.blue(`
|
|
37
|
-
RVF Details:`)),console.log(` File Size: ${o.cyan(ze(s.fileSizeBytes))}`),console.log(` Vectors: ${o.cyan(s.totalVectors)}`),console.log(` Segments: ${o.cyan(s.totalSegments)}`)}if("lineage"in t){let s=t.lineage;s&&(console.log(o.blue(`
|
|
38
|
-
Lineage:`)),console.log(` File ID: ${o.cyan(s.fileId)}`),console.log(` Parent ID: ${o.cyan(s.parentId??"none (root)")}`),console.log(` Depth: ${o.cyan(s.lineageDepth)}`))}if("signature"in t){let s=t.signature,l=t.signerKeyId;console.log(o.blue(`
|
|
39
|
-
Signature:`)),s?(console.log(` Status: ${o.green("Signed")}`),console.log(` Key ID: ${o.cyan(l??"unknown")}`),console.log(` Signature: ${o.gray(s.slice(0,32)+"...")}`)):console.log(` Status: ${o.yellow("Unsigned")}`)}console.log(`
|
|
40
|
-
Checksum: ${o.gray(t.checksum)}`),console.log(""),await this.cleanupAndExit(0)}catch(r){console.error(o.red(`
|
|
41
|
-
Failed to read brain info:`),r),await this.cleanupAndExit(1)}}async executeDiff(n,r,t){try{let a=await Ue(A.resolve(n),A.resolve(r),{tableFilter:t.table});if(t.json){process.stdout.write(JSON.stringify(a,null,2)+`
|
|
42
|
-
`),await this.cleanupAndExit(a.identical?0:1);return}Pn(a,t.verbose),await this.cleanupAndExit(a.identical?0:1)}catch(a){console.error(o.red(`
|
|
43
|
-
Brain diff failed:`),a),await this.cleanupAndExit(2)}}async executeSearch(n){try{let r=Fn(n.limit),t=Ln(n.domain),a=await We(A.resolve(n.input),{table:n.table,domains:t,patternType:n.patternType,since:n.since,until:n.until,query:n.query,limit:r});if(n.json){process.stdout.write(JSON.stringify(a,null,2)+`
|
|
44
|
-
`),await this.cleanupAndExit(a.totalMatched>0?0:3);return}Jn(a),await this.cleanupAndExit(a.totalMatched>0?0:3)}catch(r){console.error(o.red(`
|
|
45
|
-
Brain search failed:`),r),await this.cleanupAndExit(2)}}async executeWitnessBackfill(n){try{console.log(o.blue(`
|
|
46
|
-
Running witness chain backfill...
|
|
47
|
-
`));let r=await ue(n.db),t=await He(r);console.log(o.green(" Backfill complete.")),console.log(` Created: ${o.cyan(t.created)} new witness entries`),console.log(` Skipped: ${o.cyan(t.skipped)} (already witnessed)`),console.log(""),await this.cleanupAndExit(0)}catch(r){console.error(o.red(`
|
|
48
|
-
Witness backfill failed:`),r),await this.cleanupAndExit(1)}}getHelp(){return`
|
|
49
|
-
Export, import, and inspect QE brain state.
|
|
50
|
-
|
|
51
|
-
Formats:
|
|
52
|
-
rvf \u2014 Single portable .rvf file (default, requires @ruvector/rvf-node)
|
|
53
|
-
jsonl \u2014 JSONL directory format (fallback when native not available)
|
|
54
|
-
|
|
55
|
-
Usage:
|
|
56
|
-
aqe brain export -o brain.rvf [--format rvf] [--db <path>]
|
|
57
|
-
aqe brain export -o ./brain-dir --format jsonl [--db <path>]
|
|
58
|
-
aqe brain import -i brain.rvf [--strategy skip-conflicts] [--dry-run] [--db <path>]
|
|
59
|
-
aqe brain info -i brain.rvf
|
|
60
|
-
|
|
61
|
-
Subcommands:
|
|
62
|
-
export Export brain state to a portable .rvf file or JSONL directory
|
|
63
|
-
import Import a brain export into the local database
|
|
64
|
-
info Show manifest metadata for an existing brain export
|
|
65
|
-
diff Compare two brain exports (manifest always; record-level for JSONL)
|
|
66
|
-
search Filtered search over a JSONL brain export
|
|
67
|
-
|
|
68
|
-
Examples:
|
|
69
|
-
aqe brain export -o .agentic-qe/brain.rvf
|
|
70
|
-
aqe brain export -o .agentic-qe/brain.rvf --format rvf
|
|
71
|
-
aqe brain export -o ./brain-export --format jsonl
|
|
72
|
-
aqe brain import -i .agentic-qe/brain.rvf --strategy latest-wins
|
|
73
|
-
aqe brain import -i .agentic-qe/brain.rvf --dry-run
|
|
74
|
-
aqe brain info -i .agentic-qe/brain.rvf
|
|
75
|
-
aqe brain diff ./brain-a ./brain-b --verbose
|
|
76
|
-
aqe brain search -i ./brain-export --query oauth --domain test-generation
|
|
77
|
-
aqe brain search -i ./brain-export --since 2026-03-01 --limit 50 --json
|
|
78
|
-
`}};async function ue(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-VBQ572X4.js");return A.join(n(),".agentic-qe","memory.db")}function ze(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Fn(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function Ln(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let i=a.trim();i&&r.push(i)}return r.length>0?r:void 0}function Pn(e,n){console.log(o.blue(`
|
|
79
|
-
Brain Diff
|
|
80
|
-
`)),console.log(` A: ${o.cyan(e.pathA)} (${e.formatA})`),console.log(` B: ${o.cyan(e.pathB)} (${e.formatB})`),console.log(` Versions: ${o.cyan(e.manifestA.version)} \u2192 ${o.cyan(e.manifestB.version)}`+(e.versionMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Checksums: ${o.gray(e.manifestA.checksum.slice(0,12))}\u2026 \u2192 ${o.gray(e.manifestB.checksum.slice(0,12))}\u2026`+(e.checksumMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Exported: ${o.gray(e.manifestA.exportedAt)} \u2192 ${o.gray(e.manifestB.exportedAt)}`),console.log(` Records: ${o.cyan(e.manifestA.totalRecords)} \u2192 ${o.cyan(e.manifestB.totalRecords)} `+Ge(e.manifestB.totalRecords-e.manifestA.totalRecords)),(e.domainsOnlyInA.length>0||e.domainsOnlyInB.length>0)&&(console.log(o.blue(`
|
|
81
|
-
Domains:`)),e.domainsOnlyInA.length>0&&console.log(` Only in A: ${o.yellow(e.domainsOnlyInA.join(", "))}`),e.domainsOnlyInB.length>0&&console.log(` Only in B: ${o.yellow(e.domainsOnlyInB.join(", "))}`)),e.recordLevel||console.log(o.gray(`
|
|
82
|
-
Note: record-level diff is only available when both sides are JSONL exports.
|
|
83
|
-
Per-table counts shown below; re-export with --format jsonl for added/removed/changed IDs.`)),console.log(o.blue(`
|
|
84
|
-
Tables:`));let r=e.tableDiffs.filter(jn);if(r.length===0)console.log(o.gray(" (no differences)"));else for(let t of r)console.log(` ${t.tableName.padEnd(28)} ${o.cyan(String(t.countA).padStart(7))} \u2192 ${o.cyan(String(t.countB).padStart(7))} ${Ge(t.delta)}`+Vn(t,n)),n&&(t.added&&t.added.length>0&&pe("added",t.added),t.removed&&t.removed.length>0&&pe("removed",t.removed),t.changed&&t.changed.length>0&&pe("changed",t.changed));console.log(""),e.identical?console.log(o.green(` Result: identical
|
|
85
|
-
`)):console.log(o.yellow(` Result: differences found
|
|
86
|
-
`))}function jn(e){return!!(e.delta!==0||e.added&&e.added.length>0||e.removed&&e.removed.length>0||e.changed&&e.changed.length>0)}function Ge(e){return e===0?o.gray("(\xB10)"):e>0?o.green(`(+${e})`):o.red(`(${e})`)}function Vn(e,n){let r=[];return e.added&&e.added.length>0&&r.push(o.green(`+${e.added.length}`)),e.removed&&e.removed.length>0&&r.push(o.red(`-${e.removed.length}`)),e.changed&&e.changed.length>0&&r.push(o.yellow(`~${e.changed.length}`)),r.length===0?"":n?" "+r.join(" "):" "+o.gray("[")+r.join(" ")+o.gray("]")}function pe(e,n){let r=n.slice(0,10).join(", "),t=n.length>10?o.gray(` \u2026(+${n.length-10} more)`):"";console.log(` ${o.gray(e+":")} ${r}${t}`)}function Jn(e){if(console.log(o.blue(`
|
|
87
|
-
Brain Search
|
|
88
|
-
`)),console.log(` Input: ${o.cyan(e.inputPath)}`),console.log(` Table: ${o.cyan(e.table)}`),console.log(` Scanned: ${o.cyan(e.totalScanned)} Matched: ${o.cyan(e.totalMatched)} Shown: ${o.cyan(e.hits.length)}`+(e.truncated?o.yellow(` (truncated to limit ${e.limit})`):"")),e.hits.length===0){console.log(o.yellow(`
|
|
89
|
-
No matching rows.
|
|
90
|
-
`));return}console.log("");for(let n of e.hits){let r=o.cyan(n.id)+(n.display.patternType?o.gray(` ${n.display.patternType}`):"")+(n.display.domain?o.gray(` [${n.display.domain}]`):"")+(n.display.confidence!==void 0?o.gray(` conf=${n.display.confidence.toFixed(2)}`):"");if(console.log(` ${r}`),n.display.name&&console.log(` ${o.bold(n.display.name)}`),n.display.description){let t=n.display.description.length>200?n.display.description.slice(0,200)+"\u2026":n.display.description;console.log(` ${o.gray(t)}`)}n.display.updatedAt&&console.log(` ${o.gray(n.display.updatedAt)}`),console.log("")}}function Ct(e,n){return new ge(e,n)}export{ge as BrainHandler,Ct as createBrainHandler};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.3");process.exit(0)}
|
|
2
|
-
import{a}from"./chunk-H6XBM2LY.js";import"./chunk-44WISFTU.js";import"./chunk-74PK3NEW.js";import"./chunk-TFHQE6NK.js";import"./chunk-4RP5VUBI.js";import"./chunk-5F6DWHQG.js";import"./chunk-L2GKMBDP.js";import"./chunk-72UJXEKQ.js";import"./chunk-Y5SQBI2F.js";import"./chunk-YAKS3CAB.js";import"./chunk-HRUU7E3D.js";import"./chunk-OYMLHX2B.js";import"./chunk-5Y5TC6BY.js";import"./chunk-MXMFGSWR.js";import"./chunk-VIDBBB6F.js";import"./chunk-PI74GOE4.js";import"./chunk-5IAB5NRZ.js";import"./chunk-OVDKWCD7.js";import"./chunk-XA7CG3LH.js";import"./chunk-YEXPFHV6.js";import"./chunk-IP7NSFQQ.js";import"./chunk-T35GZXTU.js";import"./chunk-Y2DVFVGI.js";export{a as BrowserWorkflowTool};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.3");process.exit(0)}
|
|
2
|
-
import{a as p}from"./chunk-TISSZFHO.js";import{f as m}from"./chunk-R2AFVFRF.js";import{o as T}from"./chunk-TFHQE6NK.js";import{b as V}from"./chunk-Y5SQBI2F.js";import k from"node:path";async function y(e){if(e.checklist.requirements.length===0)throw new Error("RequirementChecklist must have a non-empty, constant denominator (ADR-117).");if(!(e.oracle!=null&&e.oracle.baselinePassed&&e.oracle.passed)){let s=e.oracle==null?"oracle did not run":e.oracle.baselinePassed?"mutation score below threshold":"tests did not execute against the reference implementation";return{verdict:"fail",mechanical:"fail",specCoverage:null,unmet:[],attempts:0,reason:`mechanical gate failed: ${s}`}}if(!await e.judge.preflight())return{verdict:"inconclusive",mechanical:"pass",specCoverage:null,unmet:[],attempts:0,reason:"judge preflight failed: judge tooling did not run \u2014 refusing to report success"};let r=[],n=null,a=[],o=0;for(let s=0;s<2;s++){o++;let u=await e.judge.grade(e.artifact,e.checklist);if(u.ran&&(r.push(u),(n==null||u.coverage>n)&&(n=u.coverage,a=u.unmet),u.coverage>=1))return{verdict:"pass",mechanical:"pass",specCoverage:u.coverage,unmet:[],attempts:o,reason:`spec gate passed at coverage ${u.coverage.toFixed(3)} on attempt ${o}`}}return r.length>=2?{verdict:"fail",mechanical:"pass",specCoverage:n,unmet:a,attempts:o,reason:`spec gate failed: ${r.length} real opinions, best coverage ${(n??0).toFixed(3)} < 1 (${a.length} unmet)`}:{verdict:"inconclusive",mechanical:"pass",specCoverage:n,unmet:a,attempts:o,reason:`spec gate inconclusive: only ${r.length} real opinion(s) obtainable (need 2 to fail) \u2014 retry later, record neither pass nor fail`}}T();import{createHash as R}from"node:crypto";function E(e){let{manifestHash:t,...i}=e;return`sha256:${R("sha256").update(h(i)).digest("hex")}`}function b(e){return`sha256:${R("sha256").update(e).digest("hex")}`}function x(e,t={}){j(e);let i=E(e);if(e.manifestHash!==i)throw new Error(`Verification reach manifestHash mismatch: expected ${i}`);let r=t.now??new Date,n=r.toISOString(),a=e.expiresAt!=null&&r.getTime()>l(e.expiresAt,"expiresAt"),o=e.risks.map(s=>I(s,e,a,r.getTime()));return{manifestId:e.id,manifestHash:e.manifestHash,systemUnderTest:e.systemUnderTest,artifact:structuredClone(e.artifact),coverageVerdict:$(o.map(s=>s.verdict)),risks:o,evaluatedAt:n}}function I(e,t,i,r){let n=new Set,a=new Set,o=new Set,s=new Set,u=new Set;for(let c of e.checks){for(let v of c.limitations)u.add(v);if(O(c,t,i,r)){if(c.reach==="partial"){a.add(c.checkId);continue}if(c.reach==="direct"&&e.requiredObservations.includes(c.channel)&&c.oracleRef===e.requiredOracle){if(c.executionStatus==="failed"){o.add(c.checkId);continue}c.executionStatus==="passed"&&(n.add(c.checkId),s.add(c.channel))}}}let d=e.requiredObservations.filter(c=>!s.has(c)),f=o.size>0?"fail":d.length===0?"pass":e.dispositionWhenUncovered;return{riskId:e.riskId,failureMode:e.failureMode,severity:e.severity,verdict:f,directCheckIds:[...n],partialCheckIds:[...a],failedCheckIds:[...o],uncoveredObservations:d,limitations:[...u],reason:P(f,o,d,i)}}function O(e,t,i,r){if(i||!S(e.target,t.artifact)||e.evidenceClass!=="EXECUTED"||e.executionStatus==="not-run"||e.executionStatus==="unavailable"||!e.observedAt)return!1;let n=l(e.observedAt,`check ${e.checkId} observedAt`),a=l(t.generatedAt,"generatedAt");return!(n<a||n>r||t.expiresAt&&n>l(t.expiresAt,"expiresAt"))}function S(e,t){return e.revision===t.revision&&e.digest===t.digest&&e.environment===t.environment}function $(e){return e.some(t=>t==="fail")?"fail":e.some(t=>t==="human-review")?"human-review":e.some(t=>t==="inconclusive")?"inconclusive":"pass"}function P(e,t,i,r){return r?`verification manifest expired; uncovered: ${i.join(", ")}`:t.size>0?`direct check failed: ${[...t].join(", ")}`:e==="pass"?"all required observation channels have direct executed reach":`required reach is uncovered (${i.join(", ")}); disposition: ${e}`}function j(e){if(!e.id||!e.systemUnderTest)throw new Error("Verification reach manifest requires id and systemUnderTest");if(!e.artifact.revision||!e.artifact.digest||!e.artifact.environment)throw new Error("Verification reach manifest artifact requires revision, digest, and environment");if(l(e.generatedAt,"generatedAt"),e.expiresAt&&l(e.expiresAt,"expiresAt"),e.risks.length===0)throw new Error("Verification reach manifest requires at least one failure mode");let t=new Set;for(let i of e.risks){if(t.has(i.riskId))throw new Error(`Duplicate riskId: ${i.riskId}`);if(t.add(i.riskId),!i.riskId||!i.failureMode||!i.requiredOracle)throw new Error("Each failure mode requires riskId, failureMode, and requiredOracle");if(i.requiredObservations.length===0)throw new Error(`Failure mode ${i.riskId} requires at least one observation channel`)}}function l(e,t){let i=Date.parse(e);if(!Number.isFinite(i))throw new Error(`Invalid ${t} timestamp: ${e}`);return i}function h(e){return Array.isArray(e)?`[${e.map(h).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).filter(([,i])=>i!==void 0).sort(([i],[r])=>i<r?-1:i>r?1:0).map(([i,r])=>`${JSON.stringify(i)}:${h(r)}`).join(",")}}`:JSON.stringify(e)}var q="verification/anchors/qe-anchor-v1.json";async function ee(e){let t=F(e.checklistId,e.anchorPath);if(e.verificationManifest&&e.verificationManifest.artifact.digest!==b(e.artifact))throw new Error("Verification reach manifest artifact digest does not match the judged artifact");let i=e.verificationManifest?{kind:"verified",...x(e.verificationManifest)}:{kind:"legacy-unknown",coverageVerdict:"inconclusive",reason:"legacy quality-gate request has no verification reach manifest"},r=i.coverageVerdict,n=await y({oracle:e.oracleResult,artifact:e.artifact,checklist:t,judge:e.judge});return{...n,qualityVerdict:n.verdict,coverageVerdict:r,verdict:U(n.verdict,r),verification:i}}function U(e,t){return e==="fail"||t==="fail"?"fail":e==="pass"&&t==="pass"?"pass":"inconclusive"}function F(e,t){let i=C(t),r=p(i),n=r.items.find(a=>a.id===e);if(!n){let a=r.items.map(o=>o.id).join(", ");throw new Error(`Unknown checklist id "${e}" in anchor ${i}. Available: ${a}`)}return{id:n.id,requirements:n.requirements}}function te(e){return p(C(e)).items.map(i=>i.id)}function C(e){if(e&&k.isAbsolute(e))return e;let t=V();return k.resolve(t,e??q)}var J=6e4,D=15e3;function Q(e){let t=e.timeoutMs??J,i=e.logger??(()=>{}),r=e.model??"frontier",n=e.ping??(async()=>{let a=await w(e.complete("Reply with exactly: OK"),Math.min(D,t),"judge preflight ping");return typeof a=="string"&&a.trim().length>0});return{async preflight(){try{let a=await n();return a||i(`frontier-judge preflight: provider (${r}) returned empty \u2014 not ready`),a}catch(a){return i(`frontier-judge preflight failed (${r}): ${M(a)}`),!1}},async grade(a,o){let s=o.requirements.length;try{let u=_(a,o),d=await w(e.complete(u),t,"judge grade"),f=H(d,s);if(f==null)return i(`frontier-judge grade: could not parse response for ${o.id}`),{ran:!1,coverage:0,unmet:[]};let c=[...f].sort((g,A)=>g-A).map(g=>o.requirements[g]);return{ran:!0,coverage:(s-c.length)/s,unmet:c}}catch(u){return i(`frontier-judge grade failed for ${o.id} (${r}): ${M(u)}`),{ran:!1,coverage:0,unmet:[]}}}}}function N(e,t={}){let i=t.model??m;return async r=>(await e.chat({messages:[{role:"user",content:r}],model:i,strictModel:!0,preferredProvider:t.preferredProvider,temperature:t.temperature??0,maxTokens:t.maxTokens??1024,timeoutMs:t.timeoutMs,skipCache:!0})).content??""}function ne(e,t={}){let i=t.model??m;return Q({complete:N(e,{...t,model:i}),model:i,timeoutMs:t.timeoutMs,logger:t.logger})}function ae(e){return{preflight:()=>!1,grade:()=>({ran:!1,coverage:0,unmet:[]})}}function _(e,t){let i=t.requirements.map((r,n)=>`${n+1}. ${r}`).join(`
|
|
3
|
-
`);return["You are a rigorous, frontier-tier quality oracle grading a software artifact","against a FIXED requirement checklist. Judge only what the artifact actually","verifies \u2014 do not give credit for requirements it merely mentions or leaves",'implicit. A requirement is "met" only if the artifact demonstrably covers it.',"",`Checklist id: ${t.id}`,"Requirements (the denominator is fixed \u2014 grade ALL of them):",i,"","--- ARTIFACT UNDER JUDGEMENT ---",e,"--- END ARTIFACT ---","","Return ONLY a single JSON object, no prose, no markdown fences, of the form:",'{"unmet": [<numbers of requirements NOT met>]}','Use the requirement numbers above. If every requirement is met, return {"unmet": []}.'].join(`
|
|
4
|
-
`)}function H(e,t){let i=G(e);if(i==null||!Array.isArray(i.unmet))return null;let r=i.unmet,n=new Set;for(let a of r){let o=typeof a=="number"?a:typeof a=="string"?Number(a.trim()):NaN;if(!Number.isInteger(o))continue;let s=o-1;s>=0&&s<t&&n.add(s)}return r.length>0&&n.size===0?null:n}function G(e){if(typeof e!="string")return null;let t=e.indexOf("{");if(t===-1)return null;let i=0,r=!1,n=!1;for(let a=t;a<e.length;a++){let o=e[a];if(r){n?n=!1:o==="\\"?n=!0:o==='"'&&(r=!1);continue}if(o==='"')r=!0;else if(o==="{")i++;else if(o==="}"&&(i--,i===0))try{return JSON.parse(e.slice(t,a+1))}catch{return null}}return null}function w(e,t,i){return new Promise((r,n)=>{let a=setTimeout(()=>n(new Error(`${i} timed out after ${t}ms`)),t);e.then(o=>{clearTimeout(a),r(o)},o=>{clearTimeout(a),n(o)})})}function M(e){return e instanceof Error?e.message:String(e)}export{ee as a,te as b,ne as c,ae as d};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.3");process.exit(0)}
|
|
2
|
-
import{a as M}from"./chunk-74PK3NEW.js";import{o as x}from"./chunk-TFHQE6NK.js";import{b as T}from"./chunk-Y5SQBI2F.js";import{a as h,c as v}from"./chunk-HRUU7E3D.js";import{i as _}from"./chunk-OYMLHX2B.js";import{a as b}from"./chunk-5Y5TC6BY.js";var R=Object.freeze({readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}),q=["accessibility_test","advisor_consult","agent_complete","agent_list","agent_metrics","agent_spawn","agent_status","aqe_health","chaos_test","code_index","contract_validate","coverage_analyze_sublinear","cross_phase_cleanup","cross_phase_query","cross_phase_stats","cross_phase_store","defect_predict","fleet_health","fleet_init","fleet_status","format_signals","infra_healing_feed_output","infra_healing_recover","infra_healing_status","memory_delete","memory_query","memory_retrieve","memory_share","memory_store","memory_usage","migration_check","migration_promote","migration_status","model_route","phase_end","phase_start","pipeline_list","pipeline_load","pipeline_run","pipeline_validate","quality_assess","requirements_validate","routing_economics","routing_metrics","security_scan_comprehensive","session_cache_stats","task_cancel","task_list","task_orchestrate","task_status","task_submit","team_broadcast","team_health","team_list","team_message","team_rebalance","team_scale","test_execute_parallel","test_generate_enhanced","validation_pipeline"],P=["qe/analysis/token_usage","qe/code/c4","qe/coherence/audit","qe/coherence/check","qe/coherence/collapse","qe/coherence/consensus","qe/coverage/gaps","qe/embeddings/compare","qe/embeddings/generate","qe/embeddings/search","qe/embeddings/stats","qe/embeddings/store","qe/learning/dream","qe/learning/optimize","qe/mincut/health","qe/mincut/analyze","qe/mincut/strengthen","qe/planning/goap_execute","qe/planning/goap_plan","qe/planning/goap_status","qe/quality/gate","qe/qx/analyze","qe/requirements/quality-criteria","qe/security/url-validate","qe/tests/load","qe/tests/schedule","qe/visual/compare","qe/workflows/browser-load"],C=Object.freeze([...q,...P].sort());function L(){return{annotations:R,reason:"No narrow side-effect-free guarantee is recorded for this built-in; retain conservative policy defaults."}}var w=Object.freeze(Object.fromEntries(C.map(r=>[r,L()])));function S(r,e){let t=w[r];return Object.freeze({...t?.annotations??R,...t?e:void 0})}x();v();import*as g from"path";import*as d from"fs";function A(){return process.env.AQE_MEMORY_BACKEND==="memory"}var s=null,c=null,p=null;function Q(r){p=r}async function O(){return s||c||(c=(async()=>{if(A()){let o=new b;return await o.initialize(),s=o,o}let r=T(),e=g.join(r,".agentic-qe");d.existsSync(e)||d.mkdirSync(e,{recursive:!0});let t=new M({sqlite:{path:g.join(e,"memory.db"),walMode:!0,poolSize:3,busyTimeout:5e3},enableFallback:!0,defaultNamespace:"mcp-tools"});return await t.initialize(),s=t,t})(),c)}function F(){if(p)try{p()}catch{}s&&(s.dispose().catch(()=>{}),s=null),c=null}async function V(r){return r?.memory?r.memory:O()}var u=null,m=null;function D(){let r=(process.env.AQE_LLM_ROUTER_DISABLED??"").trim().toLowerCase();return r?r!=="false"&&r!=="0"&&r!=="no"&&r!=="off":!1}function U(r){u=r,m=null}async function j(){return D()?null:u||m||(m=(async()=>{let{createLLMRouterService:r}=await import("./llm-router-service-GTDVDKSU.js"),e=await r();return e?(u=e.router,u):null})(),m)}function Y(){u=null,m=null}async function W(r){return r?.llmRouter?r.llmRouter:await j()??void 0}async function G(r){if(r?.kernel)return r.kernel;try{let{getFleetState:e}=await import("./core-handlers-C32RAMVI.js");return e().kernel??void 0}catch{return}}var I={info:(r,e)=>console.log(`[MCP-TOOL] ${r}`,e||""),warn:(r,e)=>console.warn(`[MCP-TOOL] \u26A0\uFE0F ${r}`,e||""),error:(r,e)=>console.error(`[MCP-TOOL] \u274C ${r}`,e||"")},k=class{logger=I;currentDataSource="real";setLogger(e){this.logger=e}markAsDemoData(e,t){this.currentDataSource=e.demoMode?"demo":"fallback",this.logger.warn(`${this.config.name} returning ${this.currentDataSource} data`,{reason:t,requestId:e.requestId,demoMode:e.demoMode})}markAsRealData(){this.currentDataSource="real"}isDemoMode(e){return e.demoMode===!0}validate(e){let t=[];if(typeof e!="object"||e===null)return{valid:!1,errors:["Parameters must be an object"]};let o=e,{properties:i,required:n}=this.config.schema;if(n)for(let a of n)a in o||t.push(`Missing required field: ${a}`);for(let[a,l]of Object.entries(o)){let f=i[a];if(!f)continue;let y=this.validateType(a,l,f);y&&t.push(y)}return{valid:t.length===0,errors:t}}validateType(e,t,o){if(t==null)return null;let i=Array.isArray(t)?"array":typeof t;if(o.type==="array"&&!Array.isArray(t))return`${e} must be an array`;if(o.type!=="array"&&i!==o.type)return`${e} must be of type ${o.type}, got ${i}`;if(o.enum&&!o.enum.includes(t))return`${e} must be one of: ${o.enum.join(", ")}`;if(o.type==="number"){let n=t;if(o.minimum!==void 0&&n<o.minimum)return`${e} must be >= ${o.minimum}`;if(o.maximum!==void 0&&n>o.maximum)return`${e} must be <= ${o.maximum}`}if(o.type==="string"){let n=t;if(o.minLength!==void 0&&n.length<o.minLength)return`${e} must be at least ${o.minLength} characters`;if(o.maxLength!==void 0&&n.length>o.maxLength)return`${e} must be at most ${o.maxLength} characters`}return null}async invoke(e,t={}){let o=Date.now(),i=_();this.currentDataSource="real";let n=this.validate(e);if(!n.valid)return{success:!1,error:`Validation failed: ${n.errors.join("; ")}`,metadata:this.createMetadata(o,i)};let a={requestId:i,startTime:o,streaming:t.streaming,onStream:t.onStream,abortSignal:t.abortSignal,demoMode:t.demoMode,memory:t.memory,llmRouter:t.llmRouter,kernel:t.kernel};try{let l=await this.execute(e,a);return{...l,metadata:{...l.metadata,...this.createMetadata(o,i)}}}catch(l){return{success:!1,error:h(l),metadata:this.createMetadata(o,i)}}}createMetadata(e,t){return{executionTime:Date.now()-e,timestamp:new Date().toISOString(),requestId:t,domain:this.config.domain,toolName:this.config.name,dataSource:this.currentDataSource}}emitStream(e,t){e.streaming&&e.onStream&&e.onStream(t)}isAborted(e){return e.abortSignal?.aborted??!1}get name(){return this.config.name}get description(){return this.config.description}get annotations(){return S(this.name,this.config.annotations)}get domain(){return this.config.domain}getSchema(){return this.config.schema}get timeout(){return this.config.timeout??6e4}get supportsStreaming(){return this.config.streaming??!1}resetInstanceCache(){}};export{A as a,Q as b,O as c,F as d,V as e,U as f,j as g,Y as h,W as i,G as j,I as k,k as l};
|