agentic-qe 3.10.5 → 3.10.7
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-accessibility-auditor.md +8 -0
- package/.claude/agents/v3/qe-bdd-generator.md +8 -0
- package/.claude/agents/v3/qe-chaos-engineer.md +8 -0
- package/.claude/agents/v3/qe-code-complexity.md +8 -0
- package/.claude/agents/v3/qe-code-intelligence.md +8 -0
- package/.claude/agents/v3/qe-contract-validator.md +8 -0
- package/.claude/agents/v3/qe-coverage-specialist.md +8 -0
- package/.claude/agents/v3/qe-defect-predictor.md +8 -0
- package/.claude/agents/v3/qe-dependency-mapper.md +8 -0
- package/.claude/agents/v3/qe-deployment-advisor.md +8 -0
- package/.claude/agents/v3/qe-devils-advocate.md +8 -0
- package/.claude/agents/v3/qe-flaky-hunter.md +8 -0
- package/.claude/agents/v3/qe-fleet-commander.md +8 -0
- package/.claude/agents/v3/qe-gap-detector.md +8 -0
- package/.claude/agents/v3/qe-graphql-tester.md +8 -0
- package/.claude/agents/v3/qe-impact-analyzer.md +8 -0
- package/.claude/agents/v3/qe-integration-tester.md +8 -0
- package/.claude/agents/v3/qe-kg-builder.md +8 -0
- package/.claude/agents/v3/qe-learning-coordinator.md +8 -0
- package/.claude/agents/v3/qe-load-tester.md +8 -0
- package/.claude/agents/v3/qe-message-broker-tester.md +8 -0
- package/.claude/agents/v3/qe-metrics-optimizer.md +8 -0
- package/.claude/agents/v3/qe-middleware-validator.md +8 -0
- package/.claude/agents/v3/qe-mutation-tester.md +8 -0
- package/.claude/agents/v3/qe-odata-contract-tester.md +8 -0
- package/.claude/agents/v3/qe-parallel-executor.md +8 -0
- package/.claude/agents/v3/qe-pattern-learner.md +8 -0
- package/.claude/agents/v3/qe-pentest-validator.md +8 -0
- package/.claude/agents/v3/qe-performance-tester.md +8 -0
- package/.claude/agents/v3/qe-product-factors-assessor.md +8 -0
- package/.claude/agents/v3/qe-property-tester.md +8 -0
- package/.claude/agents/v3/qe-quality-criteria-recommender.md +8 -0
- package/.claude/agents/v3/qe-quality-gate.md +8 -0
- package/.claude/agents/v3/qe-qx-partner.md +8 -0
- package/.claude/agents/v3/qe-regression-analyzer.md +8 -0
- package/.claude/agents/v3/qe-requirements-validator.md +8 -0
- package/.claude/agents/v3/qe-responsive-tester.md +8 -0
- package/.claude/agents/v3/qe-retry-handler.md +8 -0
- package/.claude/agents/v3/qe-risk-assessor.md +8 -0
- package/.claude/agents/v3/qe-root-cause-analyzer.md +8 -0
- package/.claude/agents/v3/qe-sap-idoc-tester.md +8 -0
- package/.claude/agents/v3/qe-sap-rfc-tester.md +8 -0
- package/.claude/agents/v3/qe-security-auditor.md +8 -0
- package/.claude/agents/v3/qe-security-scanner.md +8 -0
- package/.claude/agents/v3/qe-soap-tester.md +8 -0
- package/.claude/agents/v3/qe-sod-analyzer.md +8 -0
- package/.claude/agents/v3/qe-tdd-specialist.md +8 -0
- package/.claude/agents/v3/qe-test-architect.md +8 -0
- package/.claude/agents/v3/qe-test-idea-rewriter.md +8 -0
- package/.claude/agents/v3/qe-transfer-specialist.md +8 -0
- package/.claude/agents/v3/qe-visual-tester.md +8 -0
- package/.claude/hooks/aqe-hook.cjs +38 -2
- 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 +2 -4
- 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 +3 -3
- package/.claude/skills/.validation/templates/security-testing-eval.template.yaml +3 -2
- package/.claude/skills/.validation/templates/skill-frontmatter.example.yaml +2 -2
- package/.claude/skills/a11y-ally/evals/a11y-ally.yaml +2 -2
- package/.claude/skills/accessibility-testing/evals/accessibility-testing.yaml +2 -3
- package/.claude/skills/api-testing-patterns/evals/api-testing-patterns.yaml +2 -3
- package/.claude/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +3 -3
- package/.claude/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +2 -2
- package/.claude/skills/compatibility-testing/evals/compatibility-testing.yaml +2 -2
- package/.claude/skills/compliance-testing/evals/compliance-testing.yaml +2 -3
- package/.claude/skills/contract-testing/evals/contract-testing.yaml +2 -3
- package/.claude/skills/database-testing/evals/database-testing.yaml +2 -3
- package/.claude/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +2 -2
- package/.claude/skills/localization-testing/evals/localization-testing.yaml +2 -2
- package/.claude/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +2 -2
- package/.claude/skills/mobile-testing/evals/mobile-testing.yaml +2 -2
- package/.claude/skills/mutation-testing/evals/mutation-testing.yaml +2 -3
- package/.claude/skills/mutation-testing/test-data/sample-output.json +1 -1
- package/.claude/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +2 -2
- package/.claude/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +2 -2
- package/.claude/skills/n8n-security-testing/evals/n8n-security-testing.yaml +3 -2
- package/.claude/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +2 -2
- package/.claude/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +2 -2
- package/.claude/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +2 -2
- package/.claude/skills/pentest-validation/evals/pentest-validation.yaml +3 -3
- package/.claude/skills/performance-testing/evals/performance-testing.yaml +2 -3
- package/.claude/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +2 -2
- package/.claude/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +2 -2
- package/.claude/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +2 -2
- package/.claude/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +2 -2
- package/.claude/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +2 -2
- package/.claude/skills/qe-browser/evals/qe-browser.yaml +2 -2
- package/.claude/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +3 -2
- package/.claude/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +2 -2
- package/.claude/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +2 -2
- package/.claude/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +3 -2
- package/.claude/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +4 -4
- package/.claude/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +2 -2
- package/.claude/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +2 -2
- package/.claude/skills/qe-test-execution/evals/qe-test-execution.yaml +2 -2
- package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +2 -2
- package/.claude/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +2 -2
- package/.claude/skills/quality-metrics/evals/quality-metrics.yaml +2 -2
- package/.claude/skills/regression-testing/evals/regression-testing.yaml +2 -2
- package/.claude/skills/risk-based-testing/evals/risk-based-testing.yaml +2 -2
- package/.claude/skills/security-testing/evals/security-testing.yaml +3 -3
- package/.claude/skills/security-visual-testing/evals/security-visual-testing.yaml +3 -2
- package/.claude/skills/shift-left-testing/evals/shift-left-testing.yaml +2 -2
- package/.claude/skills/shift-right-testing/evals/shift-right-testing.yaml +2 -2
- package/.claude/skills/skills-manifest.json +1 -1
- package/.claude/skills/test-automation-strategy/evals/test-automation-strategy.yaml +2 -2
- package/.claude/skills/test-data-management/evals/test-data-management.yaml +2 -2
- package/.claude/skills/test-design-techniques/evals/test-design-techniques.yaml +2 -2
- package/.claude/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +2 -2
- package/.claude/skills/testability-scoring/evals/testability-scoring.yaml +2 -3
- package/.claude/skills/validation-pipeline/evals/validation-pipeline.yaml +2 -2
- package/.claude/skills/verification-quality/evals/verification-quality.yaml +2 -2
- package/.claude/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +2 -2
- package/.claude/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +2 -1
- package/CHANGELOG.md +9053 -8934
- package/assets/agents/v3/qe-accessibility-auditor.md +8 -0
- package/assets/agents/v3/qe-bdd-generator.md +8 -0
- package/assets/agents/v3/qe-chaos-engineer.md +8 -0
- package/assets/agents/v3/qe-code-complexity.md +8 -0
- package/assets/agents/v3/qe-code-intelligence.md +8 -0
- package/assets/agents/v3/qe-contract-validator.md +8 -0
- package/assets/agents/v3/qe-coverage-specialist.md +8 -0
- package/assets/agents/v3/qe-defect-predictor.md +8 -0
- package/assets/agents/v3/qe-dependency-mapper.md +8 -0
- package/assets/agents/v3/qe-deployment-advisor.md +8 -0
- package/assets/agents/v3/qe-devils-advocate.md +8 -0
- package/assets/agents/v3/qe-flaky-hunter.md +8 -0
- package/assets/agents/v3/qe-fleet-commander.md +8 -0
- package/assets/agents/v3/qe-gap-detector.md +8 -0
- package/assets/agents/v3/qe-graphql-tester.md +8 -0
- package/assets/agents/v3/qe-impact-analyzer.md +8 -0
- package/assets/agents/v3/qe-integration-tester.md +8 -0
- package/assets/agents/v3/qe-kg-builder.md +8 -0
- package/assets/agents/v3/qe-learning-coordinator.md +8 -0
- package/assets/agents/v3/qe-load-tester.md +8 -0
- package/assets/agents/v3/qe-message-broker-tester.md +8 -0
- package/assets/agents/v3/qe-metrics-optimizer.md +8 -0
- package/assets/agents/v3/qe-middleware-validator.md +8 -0
- package/assets/agents/v3/qe-mutation-tester.md +8 -0
- package/assets/agents/v3/qe-odata-contract-tester.md +8 -0
- package/assets/agents/v3/qe-parallel-executor.md +8 -0
- package/assets/agents/v3/qe-pattern-learner.md +8 -0
- package/assets/agents/v3/qe-pentest-validator.md +8 -0
- package/assets/agents/v3/qe-performance-tester.md +8 -0
- package/assets/agents/v3/qe-product-factors-assessor.md +8 -0
- package/assets/agents/v3/qe-property-tester.md +8 -0
- package/assets/agents/v3/qe-quality-criteria-recommender.md +8 -0
- package/assets/agents/v3/qe-quality-gate.md +8 -0
- package/assets/agents/v3/qe-qx-partner.md +8 -0
- package/assets/agents/v3/qe-regression-analyzer.md +8 -0
- package/assets/agents/v3/qe-requirements-validator.md +8 -0
- package/assets/agents/v3/qe-responsive-tester.md +8 -0
- package/assets/agents/v3/qe-retry-handler.md +8 -0
- package/assets/agents/v3/qe-risk-assessor.md +8 -0
- package/assets/agents/v3/qe-root-cause-analyzer.md +8 -0
- package/assets/agents/v3/qe-sap-idoc-tester.md +8 -0
- package/assets/agents/v3/qe-sap-rfc-tester.md +8 -0
- package/assets/agents/v3/qe-security-auditor.md +8 -0
- package/assets/agents/v3/qe-security-scanner.md +8 -0
- package/assets/agents/v3/qe-soap-tester.md +8 -0
- package/assets/agents/v3/qe-sod-analyzer.md +8 -0
- package/assets/agents/v3/qe-tdd-specialist.md +8 -0
- package/assets/agents/v3/qe-test-architect.md +8 -0
- package/assets/agents/v3/qe-test-idea-rewriter.md +8 -0
- package/assets/agents/v3/qe-transfer-specialist.md +8 -0
- package/assets/agents/v3/qe-visual-tester.md +8 -0
- 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 +2 -4
- 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 +3 -3
- package/assets/skills/.validation/templates/security-testing-eval.template.yaml +3 -2
- package/assets/skills/.validation/templates/skill-frontmatter.example.yaml +2 -2
- package/assets/skills/a11y-ally/evals/a11y-ally.yaml +2 -2
- package/assets/skills/accessibility-testing/evals/accessibility-testing.yaml +2 -3
- package/assets/skills/api-testing-patterns/evals/api-testing-patterns.yaml +2 -3
- package/assets/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +3 -3
- package/assets/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +2 -2
- package/assets/skills/compatibility-testing/evals/compatibility-testing.yaml +2 -2
- package/assets/skills/compliance-testing/evals/compliance-testing.yaml +2 -3
- package/assets/skills/contract-testing/evals/contract-testing.yaml +2 -3
- package/assets/skills/database-testing/evals/database-testing.yaml +2 -3
- package/assets/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +2 -2
- package/assets/skills/localization-testing/evals/localization-testing.yaml +2 -2
- package/assets/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +2 -2
- package/assets/skills/mobile-testing/evals/mobile-testing.yaml +2 -2
- package/assets/skills/mutation-testing/evals/mutation-testing.yaml +2 -3
- package/assets/skills/mutation-testing/test-data/sample-output.json +1 -1
- package/assets/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +2 -2
- package/assets/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +2 -2
- package/assets/skills/n8n-security-testing/evals/n8n-security-testing.yaml +3 -2
- package/assets/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +2 -2
- package/assets/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +2 -2
- package/assets/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +2 -2
- package/assets/skills/pentest-validation/evals/pentest-validation.yaml +3 -3
- package/assets/skills/performance-testing/evals/performance-testing.yaml +2 -3
- package/assets/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +2 -2
- package/assets/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +2 -2
- package/assets/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +2 -2
- package/assets/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +2 -2
- package/assets/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +2 -2
- package/assets/skills/qe-browser/evals/qe-browser.yaml +2 -2
- package/assets/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +3 -2
- package/assets/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +2 -2
- package/assets/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +2 -2
- package/assets/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +3 -2
- package/assets/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +4 -4
- package/assets/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +2 -2
- package/assets/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +2 -2
- package/assets/skills/qe-test-execution/evals/qe-test-execution.yaml +2 -2
- package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +2 -2
- package/assets/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +2 -2
- package/assets/skills/quality-metrics/evals/quality-metrics.yaml +2 -2
- package/assets/skills/regression-testing/evals/regression-testing.yaml +2 -2
- package/assets/skills/risk-based-testing/evals/risk-based-testing.yaml +2 -2
- package/assets/skills/security-testing/evals/security-testing.yaml +3 -3
- package/assets/skills/security-visual-testing/evals/security-visual-testing.yaml +3 -2
- package/assets/skills/shift-left-testing/evals/shift-left-testing.yaml +2 -2
- package/assets/skills/shift-right-testing/evals/shift-right-testing.yaml +2 -2
- package/assets/skills/test-automation-strategy/evals/test-automation-strategy.yaml +2 -2
- package/assets/skills/test-data-management/evals/test-data-management.yaml +2 -2
- package/assets/skills/test-design-techniques/evals/test-design-techniques.yaml +2 -2
- package/assets/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +2 -2
- package/assets/skills/testability-scoring/evals/testability-scoring.yaml +2 -3
- package/assets/skills/validation-pipeline/evals/validation-pipeline.yaml +2 -2
- package/assets/skills/verification-quality/evals/verification-quality.yaml +2 -2
- package/assets/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +2 -2
- package/assets/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +2 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-TTIBYXH2.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-3BC5LIEB.js → agent-booster-wasm-6I3JMU2M.js} +2 -2
- package/dist/cli/chunks/{agent-handler-QLXWVZZF.js → agent-handler-XWI7YM6R.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-3U5PDYW7.js → agent-memory-branch-QFZKQN2L.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-CTV5OLSN.js +2 -0
- package/dist/cli/chunks/{arena-BMJQK4RD.js → arena-5HNPVTBZ.js} +4 -4
- package/dist/cli/chunks/{arena-XENAGV4I.js → arena-P4IUBKZP.js} +2 -2
- package/dist/cli/chunks/audit-PBSH25VZ.js +3 -0
- package/dist/cli/chunks/base-ISNCJZ7A.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-P6HSEFLW.js → better-sqlite3-F262IAGH.js} +2 -2
- package/dist/cli/chunks/{brain-handler-PHSWG5PR.js → brain-handler-EVYRCKXI.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-LNSYT34I.js → branch-enumerator-SUDGYJQJ.js} +2 -2
- package/dist/cli/chunks/{browser-M5BVQMBI.js → browser-4UKMW2RE.js} +2 -2
- package/dist/cli/chunks/browser-workflow-OD32QTTI.js +2 -0
- package/dist/cli/chunks/{chunk-VC256KH2.js → chunk-222ZQTL5.js} +2 -2
- package/dist/cli/chunks/{chunk-SK6YRNXI.js → chunk-262F3EMN.js} +2 -2
- package/dist/cli/chunks/{chunk-Q6BKJZTG.js → chunk-2J4ZUUU5.js} +2 -2
- package/dist/cli/chunks/{chunk-VKWDMOR4.js → chunk-2JWFS2K2.js} +2 -2
- package/dist/cli/chunks/{chunk-IRS4HKAR.js → chunk-2MLISLRR.js} +1 -1
- package/dist/cli/chunks/{chunk-J533CJUN.js → chunk-32E2OPIE.js} +3 -3
- package/dist/cli/chunks/{chunk-RFNEEDPQ.js → chunk-34NT5NBZ.js} +2 -2
- package/dist/cli/chunks/{chunk-X4B3R3ZZ.js → chunk-3IJS52OS.js} +2 -2
- package/dist/cli/chunks/{chunk-TMTLWSSA.js → chunk-3O4Q4GAX.js} +1 -1
- package/dist/cli/chunks/{chunk-RLU7764Y.js → chunk-3W6QASVB.js} +2 -2
- package/dist/cli/chunks/{chunk-4K7T6AKM.js → chunk-3XEL7XCA.js} +1 -1
- package/dist/cli/chunks/chunk-4I6FK67T.js +12 -0
- package/dist/cli/chunks/{chunk-YEO2Z3UX.js → chunk-4MJQJQLY.js} +2 -2
- package/dist/cli/chunks/{chunk-2UQWVF4P.js → chunk-4RGV6Z2H.js} +2 -2
- package/dist/cli/chunks/{chunk-PGNQR2VM.js → chunk-4W5QWFU4.js} +1 -1
- package/dist/cli/chunks/{chunk-2RLRPKCG.js → chunk-5QMIVHFT.js} +2 -2
- package/dist/cli/chunks/{chunk-SXQIH2QA.js → chunk-64BSODHA.js} +2 -2
- package/dist/cli/chunks/{chunk-S7FGTHFE.js → chunk-6A2HRMTD.js} +2 -2
- package/dist/cli/chunks/{chunk-RZ7D5SHS.js → chunk-6F5KPT6U.js} +1 -1
- package/dist/cli/chunks/{chunk-7DU35D4M.js → chunk-6OLPKIYU.js} +1 -1
- package/dist/cli/chunks/{chunk-HKJ3LG3N.js → chunk-6QBD64W3.js} +2 -2
- package/dist/cli/chunks/{chunk-MGCW5FWH.js → chunk-6RG7ZJ2H.js} +2 -2
- package/dist/cli/chunks/{chunk-O5OOUMBB.js → chunk-76JYG426.js} +2 -2
- package/dist/cli/chunks/{chunk-75MP7JMV.js → chunk-76SUEI7S.js} +1 -1
- package/dist/cli/chunks/{chunk-ZTC64OJE.js → chunk-7NK2H7H5.js} +2 -2
- package/dist/cli/chunks/{chunk-OATHXZYW.js → chunk-AKL5A3IZ.js} +1 -1
- package/dist/cli/chunks/{chunk-IOE6LDPF.js → chunk-AKSCYNFH.js} +2 -2
- package/dist/cli/chunks/{chunk-FNJZBIR3.js → chunk-AW3LGLC3.js} +2 -2
- package/dist/cli/chunks/{chunk-3WOQY6UL.js → chunk-AY4IEMRI.js} +2 -2
- package/dist/cli/chunks/{chunk-ZT7JSFGT.js → chunk-B5ZJV7GZ.js} +2 -2
- package/dist/cli/chunks/{chunk-IIFCTJOF.js → chunk-BLFZFKT6.js} +2 -2
- package/dist/cli/chunks/{chunk-G6FP3S3G.js → chunk-BPC6X6VR.js} +2 -2
- package/dist/cli/chunks/{chunk-24A7KD3D.js → chunk-BRYYQQUV.js} +1 -1
- package/dist/cli/chunks/{chunk-CUAM34RQ.js → chunk-BU2I77YW.js} +3 -3
- package/dist/cli/chunks/{chunk-UOIT5JZ6.js → chunk-C5CY5NSW.js} +2 -2
- package/dist/cli/chunks/{chunk-WFZUKXV5.js → chunk-CGBEI7UH.js} +2 -2
- package/dist/cli/chunks/{chunk-2Z7HIT5I.js → chunk-CJTDQJ7E.js} +1 -1
- package/dist/cli/chunks/{chunk-4FTO3TPH.js → chunk-CW7JQVXV.js} +2 -2
- package/dist/cli/chunks/chunk-DF7V6X3N.js +2 -0
- package/dist/cli/chunks/{chunk-JY7T2AQQ.js → chunk-DPT37UHR.js} +4 -4
- package/dist/cli/chunks/{chunk-D3Q4443B.js → chunk-DU7Y54JI.js} +1 -1
- package/dist/cli/chunks/{chunk-MJRYHHOG.js → chunk-DYNO72WD.js} +2 -2
- package/dist/cli/chunks/{chunk-TISBFSDJ.js → chunk-DYSRMAZP.js} +1 -1
- package/dist/cli/chunks/{chunk-ZS4BGJJV.js → chunk-EWNJK2BU.js} +1 -1
- package/dist/cli/chunks/chunk-F5RZSNHI.js +20 -0
- package/dist/cli/chunks/{chunk-HRORJ352.js → chunk-FK4JHBG4.js} +2 -2
- package/dist/cli/chunks/{chunk-VWN66V7U.js → chunk-FQBNPSV2.js} +2 -2
- package/dist/cli/chunks/{chunk-YZFNPTGN.js → chunk-FWLXK6AH.js} +2 -2
- package/dist/cli/chunks/{chunk-IVKSZNMI.js → chunk-G7ISGLKP.js} +1 -1
- package/dist/cli/chunks/{chunk-MWPFUBXS.js → chunk-GUDOOOO6.js} +1 -1
- package/dist/cli/chunks/{chunk-GDUGW6FZ.js → chunk-HARYQMWN.js} +2 -2
- package/dist/cli/chunks/{chunk-R573V37S.js → chunk-HBWAMCVB.js} +17 -17
- package/dist/cli/chunks/{chunk-GKG6IQP6.js → chunk-HDLF6LGO.js} +3 -3
- package/dist/cli/chunks/{chunk-XI6ZZMX7.js → chunk-HELQ7CXL.js} +1 -1
- package/dist/cli/chunks/{chunk-ZCYKWEAM.js → chunk-HI4DA7Z3.js} +2 -2
- package/dist/cli/chunks/{chunk-FPWA73N6.js → chunk-I64BLAFS.js} +2 -2
- package/dist/cli/chunks/chunk-I7M574IO.js +14 -0
- package/dist/cli/chunks/{chunk-BSRCL6RU.js → chunk-INI3AGF5.js} +2 -2
- package/dist/cli/chunks/{chunk-FW3C4LWU.js → chunk-ISLI6D4K.js} +2 -2
- package/dist/cli/chunks/{chunk-HPKYIK7R.js → chunk-IXAABYGS.js} +2 -2
- package/dist/cli/chunks/{chunk-5D7GLMT3.js → chunk-IYZWEYWJ.js} +1 -1
- package/dist/cli/chunks/{chunk-CTG3GJIM.js → chunk-J5ETX2DG.js} +2 -2
- package/dist/cli/chunks/chunk-JJELOEIY.js +65 -0
- package/dist/cli/chunks/{chunk-UTORITJT.js → chunk-JNQVPTOM.js} +2 -2
- package/dist/cli/chunks/{chunk-G5UIGH4C.js → chunk-JNXPRDNV.js} +3 -3
- package/dist/cli/chunks/{chunk-DIJ74M7V.js → chunk-K6A3AWUI.js} +1 -1
- package/dist/cli/chunks/{chunk-RUQV3BTV.js → chunk-K6IU2MV4.js} +1 -1
- package/dist/cli/chunks/{chunk-NKW7VOZV.js → chunk-KXENXRZE.js} +1 -1
- package/dist/cli/chunks/{chunk-CS3UB2OL.js → chunk-L2ZSYIDA.js} +1 -1
- package/dist/cli/chunks/{chunk-NGSA53GC.js → chunk-L3EQQMFI.js} +2 -2
- package/dist/cli/chunks/{chunk-ZG3DSWUA.js → chunk-L5UUUSSB.js} +1 -1
- package/dist/cli/chunks/{chunk-A7HGS7FW.js → chunk-L6NB4UHR.js} +2 -2
- package/dist/cli/chunks/{chunk-VESYE5YO.js → chunk-LEZ2MGHM.js} +3 -3
- package/dist/cli/chunks/{chunk-66LOFIBP.js → chunk-LFSQSLNP.js} +2 -2
- package/dist/cli/chunks/{chunk-WFZ4DRIC.js → chunk-LHZYTNOQ.js} +2 -2
- package/dist/cli/chunks/{chunk-IT7CEHAJ.js → chunk-LJHCPN4E.js} +2 -2
- package/dist/cli/chunks/{chunk-S7HQOGVD.js → chunk-LRRQEAP5.js} +1 -1
- package/dist/cli/chunks/{chunk-OJNG6ZXG.js → chunk-LSHUPEQQ.js} +2 -2
- package/dist/cli/chunks/{chunk-DBR4TQPK.js → chunk-LUZH2IZY.js} +2 -2
- package/dist/cli/chunks/{chunk-PYBVFG6T.js → chunk-M7SO5KNJ.js} +2 -2
- package/dist/cli/chunks/{chunk-A3BDPU5F.js → chunk-MDVJVY4C.js} +4 -4
- package/dist/cli/chunks/{chunk-JPOEI7CJ.js → chunk-MK73CCKO.js} +2 -2
- package/dist/cli/chunks/{chunk-FE3FGMNB.js → chunk-MMR23KAO.js} +2 -2
- package/dist/cli/chunks/{chunk-CUY2EUSQ.js → chunk-MOI74MMX.js} +2 -2
- package/dist/cli/chunks/{chunk-RONMVGCT.js → chunk-MRLGQX7Y.js} +2 -2
- package/dist/cli/chunks/{chunk-RFVZMNYX.js → chunk-MWRKNBSY.js} +2 -2
- package/dist/cli/chunks/{chunk-TMD6IC6D.js → chunk-NKYMHEHY.js} +2 -2
- package/dist/cli/chunks/{chunk-YZD4VIE5.js → chunk-O4B6FFC5.js} +1 -1
- package/dist/cli/chunks/{chunk-IUKERFLT.js → chunk-OAXDI4XM.js} +1 -1
- package/dist/cli/chunks/{chunk-3BGGNHHZ.js → chunk-OMDV6GFP.js} +1 -1
- package/dist/cli/chunks/{chunk-B4F5EPNR.js → chunk-OPLLH67G.js} +1 -1
- package/dist/cli/chunks/{chunk-HHEHGERJ.js → chunk-OSETFZVE.js} +2 -2
- package/dist/cli/chunks/{chunk-MRXKIXVV.js → chunk-OW4LJ5HE.js} +2 -2
- package/dist/cli/chunks/{chunk-3KGUP2SD.js → chunk-PY3HWJRJ.js} +2 -2
- package/dist/cli/chunks/{chunk-56RA6YPN.js → chunk-QBVFONWU.js} +2 -2
- package/dist/cli/chunks/{chunk-DJQYZ4RZ.js → chunk-QBVS4CXM.js} +1 -1
- package/dist/cli/chunks/{chunk-IWRORKD7.js → chunk-QDBFB4XD.js} +2 -2
- package/dist/cli/chunks/{chunk-AZCKTAUI.js → chunk-QLVZEEPR.js} +2 -2
- package/dist/cli/chunks/{chunk-FLYFNNSN.js → chunk-QMGNYRR5.js} +3 -3
- package/dist/cli/chunks/{chunk-AVQD7KEN.js → chunk-R2B6EQQF.js} +2 -2
- package/dist/cli/chunks/{chunk-7JZCEQFR.js → chunk-R7KIC6TL.js} +1 -1
- package/dist/cli/chunks/{chunk-ZUBJBAUD.js → chunk-RJBCIN2G.js} +2 -2
- package/dist/cli/chunks/{chunk-BB7MEGXD.js → chunk-RLXCFURS.js} +2 -2
- package/dist/cli/chunks/{chunk-4Z7XH4JE.js → chunk-S423UHYM.js} +2 -2
- package/dist/cli/chunks/{chunk-VB7DZVCI.js → chunk-S4NNQE4L.js} +1 -1
- package/dist/cli/chunks/{chunk-DWLGFYXV.js → chunk-S7FNTWFM.js} +3 -3
- package/dist/cli/chunks/{chunk-QAW6RVAR.js → chunk-SFW6IDMR.js} +10 -10
- package/dist/cli/chunks/{chunk-W7KGHW4T.js → chunk-SG6O3PXZ.js} +2 -2
- package/dist/cli/chunks/{chunk-HNYSBE5J.js → chunk-SLASYVNX.js} +2 -2
- package/dist/cli/chunks/{chunk-RCAIOTIF.js → chunk-TIUC5LRA.js} +2 -2
- package/dist/cli/chunks/{chunk-GTVXVYKE.js → chunk-TTLAWPEN.js} +2 -2
- package/dist/cli/chunks/{chunk-6SAU7GXO.js → chunk-TXXRBNOB.js} +1 -1
- package/dist/cli/chunks/{chunk-G4GX6YKX.js → chunk-TY7XPI6R.js} +2 -2
- package/dist/cli/chunks/{chunk-D7NKRCIL.js → chunk-U7EGKKN3.js} +2 -2
- package/dist/cli/chunks/{chunk-3JWV4GE6.js → chunk-UPDPD43T.js} +2 -2
- package/dist/cli/chunks/{chunk-253TDTPH.js → chunk-UURGDFGU.js} +1 -1
- package/dist/cli/chunks/{chunk-PPM5D7LH.js → chunk-UVUVWA4B.js} +1 -1
- package/dist/cli/chunks/{chunk-DN65ILSI.js → chunk-V3KNHI5B.js} +2 -2
- package/dist/cli/chunks/{chunk-K5KKZWED.js → chunk-V7WBNB2S.js} +2 -2
- package/dist/cli/chunks/{chunk-N2TJXGHG.js → chunk-VPBXVZWE.js} +1 -1
- package/dist/cli/chunks/{chunk-54IPDQIZ.js → chunk-WCXQA24H.js} +8 -8
- package/dist/cli/chunks/{chunk-MEN3UW7W.js → chunk-X3HRJV65.js} +1 -1
- package/dist/cli/chunks/{chunk-D4WDJ4ZF.js → chunk-X6OJFP7G.js} +2 -2
- package/dist/cli/chunks/{chunk-MFQIJ3HV.js → chunk-XCYPVJ34.js} +2 -2
- package/dist/cli/chunks/{chunk-GMU7P5O3.js → chunk-XK7P7OXO.js} +2 -2
- package/dist/cli/chunks/{chunk-S73KENCH.js → chunk-XWPUCPYW.js} +2 -2
- package/dist/cli/chunks/{chunk-RR55MLD4.js → chunk-YB4GXJJG.js} +1 -1
- package/dist/cli/chunks/{chunk-QTDZS4U6.js → chunk-YBM4LUSF.js} +2 -2
- package/dist/cli/chunks/{chunk-MIMJVKJJ.js → chunk-YLXUF5KW.js} +3 -3
- package/dist/cli/chunks/{chunk-AMBIOEMO.js → chunk-YMBPKBKG.js} +1 -1
- package/dist/cli/chunks/{chunk-KIMJPTHD.js → chunk-Z44VJC5U.js} +2 -2
- package/dist/cli/chunks/{ci-M2BSQBLL.js → ci-OO42YBET.js} +2 -2
- package/dist/cli/chunks/{ci-output-Z4TMK6GZ.js → ci-output-YXMTEX7Q.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-E3G4GGWB.js → circuit-breaker-EHA4N643.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-MASRQU54.js → claude-flow-setup-E6G6SLYI.js} +2 -2
- package/dist/cli/chunks/client-N4FQ6SMD.js +2 -0
- package/dist/cli/chunks/{cline-installer-P3BWAKQA.js → cline-installer-6JPWD64G.js} +2 -2
- package/dist/cli/chunks/{code-7HY5HQAV.js → code-Q3U6XDOO.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-MBVKLOEU.js → code-index-extractor-BK2DC4MO.js} +2 -2
- package/dist/cli/chunks/{codex-installer-WZ6QO2PH.js → codex-installer-DA3GBMLN.js} +2 -2
- package/dist/cli/chunks/{completions-TOJC2UFP.js → completions-TZ5F33TA.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-QYVDIAAW.js → complexity-analyzer-N7U4V7ID.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-J72CV7P4.js → continuedev-installer-DDDJGW26.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-ACDA3GEA.js → copilot-installer-JVFCE6GT.js} +2 -2
- package/dist/cli/chunks/core-handlers-SFD5HCA3.js +2 -0
- package/dist/cli/chunks/{cost-tracker-BAYQJELE.js → cost-tracker-ZTIDLUFW.js} +2 -2
- package/dist/cli/chunks/{coverage-QD3XJV6W.js → coverage-6G7T7TRQ.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-7HGRUNLT.js +2 -0
- package/dist/cli/chunks/{cursor-installer-SPGZ4TQM.js → cursor-installer-JFNYGSDD.js} +2 -2
- package/dist/cli/chunks/{daemon-3EVOL2UH.js → daemon-5A4GD6XA.js} +3 -3
- package/dist/cli/chunks/{daemon-N4JKD5SO.js → daemon-KTXGJJRI.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-3BVLL3L5.js → dag-attention-scheduler-4CUEQZD6.js} +2 -2
- package/dist/cli/chunks/{detect-SWACKB45.js → detect-I32JUSUE.js} +2 -2
- package/dist/cli/chunks/{dist-node-LU4E7PI6.js → dist-node-7ITNV6QS.js} +2 -2
- package/dist/cli/chunks/{domain-handler-5AKKAC43.js → domain-handler-LIFCXSZ4.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-LB6H7RPX.js → domain-transfer-67UWLHSK.js} +2 -2
- package/dist/cli/chunks/dream-HPGD5TLD.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-7RBA5NDK.js → embed-and-insert-pattern-4WC5RUD6.js} +2 -2
- package/dist/cli/chunks/{eval-ZZFPRENX.js → eval-DLS2UAQ2.js} +3 -3
- package/dist/cli/chunks/{experience-capture-middleware-HRO3EGIW.js → experience-capture-middleware-VG5E6OJA.js} +3 -3
- package/dist/cli/chunks/{fast-paths-IRRNQBTY.js → fast-paths-262IVHDN.js} +2 -2
- package/dist/cli/chunks/{feature-flags-W54ABAUA.js → feature-flags-JJ3FHZGD.js} +2 -2
- package/dist/cli/chunks/{feature-flags-R5N5IWI2.js → feature-flags-L3K7DBN3.js} +2 -2
- package/dist/cli/chunks/{file-discovery-6CIDLVID.js → file-discovery-Q3PBKVUW.js} +2 -2
- package/dist/cli/chunks/{fleet-YTFN64WE.js → fleet-LQ5S2YHG.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-RXMPLMV2.js → gnn-wrapper-I33Z537H.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-HQQWEEQQ.js → heartbeat-handler-RYIRAGZ7.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-O6TI5E4P.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-TOVTN23J.js +2 -0
- package/dist/cli/chunks/hnsw-index-KCZ75V7K.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-GPZIKYFD.js → hnsw-legacy-bridge-SSENBBPR.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-6AGIBSVE.js → hnswlib-node-ILDTCGLZ.js} +2 -2
- package/dist/cli/chunks/{hooks-AYLAGFOK.js → hooks-LR5KQMN5.js} +10 -10
- package/dist/cli/chunks/hybrid-router-4JEPC4JZ.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-56FMXI3T.js → hypergraph-engine-NDZA2DKP.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-APEVT5IE.js → hypergraph-handler-ADMWVHBT.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-3MHIU3SE.js +2 -0
- package/dist/cli/chunks/{init-handler-5DWF4REQ.js → init-handler-MGCYDX62.js} +6 -6
- package/dist/cli/chunks/init-wizard-ERBO5JNA.js +2 -0
- package/dist/cli/chunks/kernel-XJPIIWET.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-XKAUA5VA.js → kilocode-installer-DQVWZUKP.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-NI2KIYJE.js → kiro-installer-TINLYZ22.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-NTJEG6ZE.js +2 -0
- package/dist/cli/chunks/{learning-ZIUMUNXZ.js → learning-KBT3S5WW.js} +3 -3
- package/dist/cli/chunks/{llm-router-IL52EF2V.js → llm-router-2MX5LUAB.js} +4 -4
- package/dist/cli/chunks/llm-router-service-4T66BGB5.js +2 -0
- package/dist/cli/chunks/{load-B5LFYD6O.js → load-IQWTGMLZ.js} +2 -2
- package/dist/cli/chunks/load-test-PM674TSK.js +2 -0
- package/dist/cli/chunks/{mcp-K6GZLWBC.js → mcp-GCTTJUBZ.js} +2 -2
- package/dist/cli/chunks/{memory-NCQRVSN6.js → memory-XQVPI4UT.js} +5 -5
- package/dist/cli/chunks/memory-backend-53NQ5CG7.js +2 -0
- package/dist/cli/chunks/memory-handlers-XD7MSFUN.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-R4LBSJWK.js → multi-model-executor-JC63UCWG.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-I6CBR3PV.js → opencode-installer-6VJGEBIU.js} +2 -2
- package/dist/cli/chunks/{orchestrator-5FXUCES6.js → orchestrator-B75QWJUF.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-IF2RG2ON.js +2 -0
- package/dist/cli/chunks/{pipeline-GDKCTXJH.js → pipeline-TCBQ2UTZ.js} +2 -2
- package/dist/cli/chunks/{platform-ZFY3F4T3.js → platform-T43AYI3Z.js} +2 -2
- package/dist/cli/chunks/{plugin-HQMEN3OS.js → plugin-MSI3ZU3Z.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-LSJGF4CV.js → prime-radiant-advanced-wasm-V62CWI6M.js} +2 -2
- package/dist/cli/chunks/protocol-executor-7AS75ZWT.js +2 -0
- package/dist/cli/chunks/{protocol-handler-BMDNIGPP.js → protocol-handler-OH2INET2.js} +2 -2
- package/dist/cli/chunks/{prove-ABVGAG4Z.js → prove-6PTMXMUL.js} +2 -2
- package/dist/cli/chunks/provider-manager-AU2C4AET.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-WATQRCFO.js +2 -0
- package/dist/cli/chunks/{quality-ENJXPNP5.js → quality-PLNQN5GU.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-IOCC4VQH.js +2 -0
- package/dist/cli/chunks/{real-embeddings-W3GNAEJO.js → real-embeddings-OW4OKR77.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-4FJNQ7PU.js → roocode-installer-C32LCYAJ.js} +2 -2
- package/dist/cli/chunks/router-SCJMX6WA.js +2 -0
- package/dist/cli/chunks/routing-feedback-RWC7F553.js +2 -0
- package/dist/cli/chunks/{routing-handler-GFS5FA4F.js → routing-handler-CKFXXPMI.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-GBMYNJKN.js → ruvector-commands-GERRPTJL.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-STUAQT6U.js → rvf-dual-writer-5FAB2QPA.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-LO6DBNJH.js → rvf-migration-adapter-46COKWYB.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-I5AD4VJ2.js → rvf-migration-coordinator-AJVRWSNC.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-W2RT6PTO.js +2 -0
- package/dist/cli/chunks/safe-db-HO2LCAO3.js +2 -0
- package/dist/cli/chunks/schedule-XENCR4MR.js +2 -0
- package/dist/cli/chunks/scheduler-WKZ3O2SS.js +2 -0
- package/dist/cli/chunks/{security-X3WCA5K5.js → security-Q622IVRB.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-Z4FSPWNP.js → shared-rvf-adapter-EST24R3R.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-QOPOIRIC.js → shared-rvf-dual-writer-CP6EXKBT.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-IN6BOSCX.js +2 -0
- package/dist/cli/chunks/{status-handler-B2B5QBVK.js → status-handler-LLRQB4E2.js} +2 -2
- package/dist/cli/chunks/{structural-health-KT47LBVH.js → structural-health-BUFWTNN2.js} +2 -2
- package/dist/cli/chunks/{sync-VWD6OOUR.js → sync-JDG4SNT5.js} +2 -2
- package/dist/cli/chunks/sync-RDL2RUOV.js +2 -0
- package/dist/cli/chunks/{task-handler-X5JT5YBF.js → task-handler-KPP6ZXA6.js} +2 -2
- package/dist/cli/chunks/{task-handlers-IW4GQDW4.js → task-handlers-MRK2BQWI.js} +3 -3
- package/dist/cli/chunks/{test-MBZSUASD.js → test-7NYFTHRY.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-E5KHKRZS.js → test-scheduling-LGPKDMWD.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-H5JHB7TD.js +2 -0
- package/dist/cli/chunks/{token-usage-ECJSPOQB.js → token-usage-TWPDS5U3.js} +2 -2
- package/dist/cli/chunks/{transformers-UZJAQ7OZ.js → transformers-GRNPPUHM.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-H6BU2E5R.js → tree-sitter-wasm-parser-DOH5F6TO.js} +2 -2
- package/dist/cli/chunks/{types-PM7NT3MH.js → types-NYV3YKE3.js} +2 -2
- package/dist/cli/chunks/unified-memory-6MXOYRXZ.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-HY3JJD5Z.js +2 -0
- package/dist/cli/chunks/unified-persistence-LKQNQYRY.js +2 -0
- package/dist/cli/chunks/{upgrade-FS2XYC2P.js → upgrade-GDJMRYAT.js} +2 -2
- package/dist/cli/chunks/{validate-4Y2BNN3A.js → validate-SIRFOPPM.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-Z7QXZSUE.js → validate-swarm-XGMJYR6X.js} +2 -2
- package/dist/cli/chunks/{vibium-VZ6L3O2G.js → vibium-NP6ENRKV.js} +2 -2
- package/dist/cli/chunks/visual-security-7TBWICHP.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-H7P37W5U.js → web-tree-sitter-YDBWPYZD.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-IB2VHSZS.js → windsurf-installer-MFI6EAPH.js} +2 -2
- package/dist/cli/chunks/witness-chain-24SVOWQL.js +2 -0
- package/dist/cli/chunks/{witness-chain-C4DISYJN.js → witness-chain-YHLBWQQ3.js} +2 -2
- package/dist/cli/chunks/{workflow-IGM7KVIO.js → workflow-TA6RY7R5.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-XBDXCTLY.js +2 -0
- package/dist/cli/chunks/wrappers-DS77IK4H.js +2 -0
- package/dist/cli/commands/eval.js +2 -2
- package/dist/kernel/unified-memory-schemas.d.ts +3 -2
- package/dist/kernel/unified-memory-schemas.js +3 -2
- package/dist/kernel/unified-memory.js +3 -1
- package/dist/learning/aqe-learning-engine.js +32 -0
- package/dist/learning/experience-capture.d.ts +8 -0
- package/dist/learning/experience-capture.js +30 -0
- package/dist/learning/pattern-null-store.d.ts +32 -0
- package/dist/learning/pattern-null-store.js +77 -0
- package/dist/learning/pattern-store.d.ts +10 -0
- package/dist/learning/pattern-store.js +23 -0
- package/dist/mcp/bundle.js +377 -347
- package/dist/mcp/handlers/validation-pipeline-handler.d.ts +19 -0
- package/dist/mcp/handlers/validation-pipeline-handler.js +10 -0
- package/dist/migrations/20260611_add_pattern_nulls_table.d.ts +26 -0
- package/dist/migrations/20260611_add_pattern_nulls_table.js +63 -0
- package/dist/validation/pipeline.d.ts +25 -0
- package/dist/validation/pipeline.js +28 -5
- package/dist/validation/steps/requirements.js +5 -0
- package/package.json +3 -2
- package/dist/cli/chunks/adapter-XZVL3DHO.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-YIL25K6W.js +0 -2
- package/dist/cli/chunks/audit-WPIRUJNZ.js +0 -3
- package/dist/cli/chunks/base-YCYV23Q3.js +0 -2
- package/dist/cli/chunks/browser-workflow-ALCOCRA2.js +0 -2
- package/dist/cli/chunks/chunk-EIL7FQC4.js +0 -65
- package/dist/cli/chunks/chunk-RLZDXQNM.js +0 -2
- package/dist/cli/chunks/chunk-W5C7R2LS.js +0 -12
- package/dist/cli/chunks/client-RPB6RYVY.js +0 -2
- package/dist/cli/chunks/core-handlers-QFJT5NX6.js +0 -2
- package/dist/cli/chunks/cross-domain-router-5GJ7WZKX.js +0 -2
- package/dist/cli/chunks/dream-C6VNLTON.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-4SBO27BG.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-W7G6VNXW.js +0 -2
- package/dist/cli/chunks/hnsw-index-LENA5QML.js +0 -2
- package/dist/cli/chunks/hybrid-router-IXHIC45P.js +0 -2
- package/dist/cli/chunks/impact-analyzer-DKGVMYU6.js +0 -2
- package/dist/cli/chunks/init-wizard-BBY3LY3F.js +0 -2
- package/dist/cli/chunks/kernel-7CUW7G62.js +0 -2
- package/dist/cli/chunks/knowledge-graph-Q5CP47IP.js +0 -2
- package/dist/cli/chunks/llm-router-service-MTXCX7TO.js +0 -2
- package/dist/cli/chunks/load-test-YBWXASBO.js +0 -2
- package/dist/cli/chunks/memory-backend-52LANEA3.js +0 -2
- package/dist/cli/chunks/memory-handlers-KFW3HYAP.js +0 -2
- package/dist/cli/chunks/protocol-executor-TRYUS77M.js +0 -2
- package/dist/cli/chunks/provider-manager-6XQQN7FX.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-3IUPE4DJ.js +0 -2
- package/dist/cli/chunks/queen-coordinator-VWPH4XPX.js +0 -2
- package/dist/cli/chunks/router-OIB6ODHA.js +0 -2
- package/dist/cli/chunks/routing-feedback-EKYPCZYG.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-7RXP2Q4Q.js +0 -2
- package/dist/cli/chunks/safe-db-MNKFEPBX.js +0 -2
- package/dist/cli/chunks/schedule-AJXABVXX.js +0 -2
- package/dist/cli/chunks/scheduler-LDWYHIAW.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-A6GKDMOJ.js +0 -2
- package/dist/cli/chunks/sync-CKID22IW.js +0 -2
- package/dist/cli/chunks/token-bootstrap-TIDPJ5IG.js +0 -2
- package/dist/cli/chunks/unified-memory-27QJHABO.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-76VUXR4H.js +0 -2
- package/dist/cli/chunks/unified-persistence-QRCGDEXH.js +0 -2
- package/dist/cli/chunks/visual-security-KB27O7BE.js +0 -2
- package/dist/cli/chunks/witness-chain-EYPXHRDV.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-6AQZ3USU.js +0 -2
- package/dist/cli/chunks/wrappers-PQXC263L.js +0 -2
|
@@ -42,6 +42,25 @@ export interface ValidationPipelineResult {
|
|
|
42
42
|
id: string;
|
|
43
43
|
stepId: string;
|
|
44
44
|
severity: string;
|
|
45
|
+
/** ADR-105: what kind of evidence backs this finding */
|
|
46
|
+
evidenceClass: string;
|
|
47
|
+
evidenceArtifact?: {
|
|
48
|
+
command?: string;
|
|
49
|
+
output?: string;
|
|
50
|
+
dataSource?: string;
|
|
51
|
+
};
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* INFERRED findings from failed blocking steps (ADR-105) — queued for
|
|
57
|
+
* adversarial verification, not allowed to gate. Same projection as findings.
|
|
58
|
+
*/
|
|
59
|
+
needsVerification: Array<{
|
|
60
|
+
id: string;
|
|
61
|
+
stepId: string;
|
|
62
|
+
severity: string;
|
|
63
|
+
evidenceClass: string;
|
|
45
64
|
title: string;
|
|
46
65
|
description: string;
|
|
47
66
|
}>;
|
|
@@ -102,9 +102,19 @@ export async function handleValidationPipeline(params) {
|
|
|
102
102
|
id: f.id,
|
|
103
103
|
stepId: f.stepId,
|
|
104
104
|
severity: f.severity,
|
|
105
|
+
evidenceClass: f.evidenceClass,
|
|
106
|
+
evidenceArtifact: f.evidenceArtifact,
|
|
105
107
|
title: f.title,
|
|
106
108
|
description: f.description,
|
|
107
109
|
}))),
|
|
110
|
+
needsVerification: result.needsVerification.map(f => ({
|
|
111
|
+
id: f.id,
|
|
112
|
+
stepId: f.stepId,
|
|
113
|
+
severity: f.severity,
|
|
114
|
+
evidenceClass: f.evidenceClass,
|
|
115
|
+
title: f.title,
|
|
116
|
+
description: f.description,
|
|
117
|
+
})),
|
|
108
118
|
},
|
|
109
119
|
};
|
|
110
120
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Pattern Nulls Migration (ADR-110, issue #522)
|
|
3
|
+
*
|
|
4
|
+
* Kept nulls: first-class negative pattern records. When an applied pattern
|
|
5
|
+
* fails in a context, the failure is stored and consolidated per
|
|
6
|
+
* (pattern, context_fingerprint) so retrieval can surface "succeeded 12x,
|
|
7
|
+
* failed 3x — failures clustered in <context>" and ranking can discount by
|
|
8
|
+
* context-matched null density. Nulls are information, not tombstones —
|
|
9
|
+
* never deleted on pattern success elsewhere.
|
|
10
|
+
*
|
|
11
|
+
* Additive-only: no existing table or row is touched.
|
|
12
|
+
*/
|
|
13
|
+
import type { Database as DatabaseType } from 'better-sqlite3';
|
|
14
|
+
export declare const MIGRATION_VERSION = "20260611_add_pattern_nulls_table";
|
|
15
|
+
export declare const PATTERN_NULLS_SCHEMA = "\n -- Negative pattern records (ADR-110 kept nulls)\n CREATE TABLE IF NOT EXISTS qe_pattern_nulls (\n id TEXT PRIMARY KEY,\n pattern_id TEXT NOT NULL REFERENCES qe_patterns(id),\n context_fingerprint TEXT NOT NULL,\n failure_mode TEXT NOT NULL,\n trajectory_ref TEXT,\n evidence_class TEXT NOT NULL DEFAULT 'EXECUTED'\n CHECK (evidence_class IN ('EXECUTED','STATIC','INFERRED','CONJECTURE')),\n consolidated_count INTEGER NOT NULL DEFAULT 1,\n created_at TEXT DEFAULT (datetime('now')),\n updated_at TEXT DEFAULT (datetime('now')),\n UNIQUE (pattern_id, context_fingerprint)\n );\n\n CREATE INDEX IF NOT EXISTS idx_pattern_nulls_pattern ON qe_pattern_nulls(pattern_id);\n CREATE INDEX IF NOT EXISTS idx_pattern_nulls_context ON qe_pattern_nulls(context_fingerprint);\n";
|
|
16
|
+
export declare function applyMigration(db: DatabaseType): void;
|
|
17
|
+
export declare function isMigrationApplied(db: DatabaseType): boolean;
|
|
18
|
+
export declare function rollbackMigration(db: DatabaseType): void;
|
|
19
|
+
declare const _default: {
|
|
20
|
+
version: string;
|
|
21
|
+
apply: typeof applyMigration;
|
|
22
|
+
isApplied: typeof isMigrationApplied;
|
|
23
|
+
rollback: typeof rollbackMigration;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=20260611_add_pattern_nulls_table.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Pattern Nulls Migration (ADR-110, issue #522)
|
|
3
|
+
*
|
|
4
|
+
* Kept nulls: first-class negative pattern records. When an applied pattern
|
|
5
|
+
* fails in a context, the failure is stored and consolidated per
|
|
6
|
+
* (pattern, context_fingerprint) so retrieval can surface "succeeded 12x,
|
|
7
|
+
* failed 3x — failures clustered in <context>" and ranking can discount by
|
|
8
|
+
* context-matched null density. Nulls are information, not tombstones —
|
|
9
|
+
* never deleted on pattern success elsewhere.
|
|
10
|
+
*
|
|
11
|
+
* Additive-only: no existing table or row is touched.
|
|
12
|
+
*/
|
|
13
|
+
export const MIGRATION_VERSION = '20260611_add_pattern_nulls_table';
|
|
14
|
+
export const PATTERN_NULLS_SCHEMA = `
|
|
15
|
+
-- Negative pattern records (ADR-110 kept nulls)
|
|
16
|
+
CREATE TABLE IF NOT EXISTS qe_pattern_nulls (
|
|
17
|
+
id TEXT PRIMARY KEY,
|
|
18
|
+
pattern_id TEXT NOT NULL REFERENCES qe_patterns(id),
|
|
19
|
+
context_fingerprint TEXT NOT NULL,
|
|
20
|
+
failure_mode TEXT NOT NULL,
|
|
21
|
+
trajectory_ref TEXT,
|
|
22
|
+
evidence_class TEXT NOT NULL DEFAULT 'EXECUTED'
|
|
23
|
+
CHECK (evidence_class IN ('EXECUTED','STATIC','INFERRED','CONJECTURE')),
|
|
24
|
+
consolidated_count INTEGER NOT NULL DEFAULT 1,
|
|
25
|
+
created_at TEXT DEFAULT (datetime('now')),
|
|
26
|
+
updated_at TEXT DEFAULT (datetime('now')),
|
|
27
|
+
UNIQUE (pattern_id, context_fingerprint)
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
CREATE INDEX IF NOT EXISTS idx_pattern_nulls_pattern ON qe_pattern_nulls(pattern_id);
|
|
31
|
+
CREATE INDEX IF NOT EXISTS idx_pattern_nulls_context ON qe_pattern_nulls(context_fingerprint);
|
|
32
|
+
`;
|
|
33
|
+
export function applyMigration(db) {
|
|
34
|
+
db.exec(PATTERN_NULLS_SCHEMA);
|
|
35
|
+
}
|
|
36
|
+
export function isMigrationApplied(db) {
|
|
37
|
+
try {
|
|
38
|
+
const result = db.prepare(`
|
|
39
|
+
SELECT COUNT(*) as count FROM sqlite_master
|
|
40
|
+
WHERE type='table' AND name = 'qe_pattern_nulls'
|
|
41
|
+
`).get();
|
|
42
|
+
return result.count === 1;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function rollbackMigration(db) {
|
|
49
|
+
// Safety check: refuse to drop a table that contains data (kept nulls are data)
|
|
50
|
+
const count = db.prepare('SELECT COUNT(*) as cnt FROM qe_pattern_nulls').get()?.cnt ?? 0;
|
|
51
|
+
if (count > 0) {
|
|
52
|
+
throw new Error(`REFUSING rollback: qe_pattern_nulls contains ${count} kept nulls. ` +
|
|
53
|
+
'Backup and manually drop if you really need to rollback.');
|
|
54
|
+
}
|
|
55
|
+
db.exec('DROP TABLE IF EXISTS qe_pattern_nulls;');
|
|
56
|
+
}
|
|
57
|
+
export default {
|
|
58
|
+
version: MIGRATION_VERSION,
|
|
59
|
+
apply: applyMigration,
|
|
60
|
+
isApplied: isMigrationApplied,
|
|
61
|
+
rollback: rollbackMigration,
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=20260611_add_pattern_nulls_table.js.map
|
|
@@ -7,10 +7,28 @@
|
|
|
7
7
|
export type StepCategory = 'format' | 'content' | 'quality' | 'traceability' | 'compliance';
|
|
8
8
|
export type StepSeverity = 'blocking' | 'warning' | 'info';
|
|
9
9
|
export type StepStatus = 'pass' | 'fail' | 'warn' | 'skip';
|
|
10
|
+
/**
|
|
11
|
+
* Evidence class of a finding (ADR-105). Quality gates may pass/block only on
|
|
12
|
+
* EXECUTED or STATIC findings; INFERRED routes to adversarial verification
|
|
13
|
+
* (ADR-102) before it can gate; CONJECTURE never gates.
|
|
14
|
+
*/
|
|
15
|
+
export type EvidenceClass = 'EXECUTED' | 'STATIC' | 'INFERRED' | 'CONJECTURE';
|
|
16
|
+
/** Provenance attached to a finding — required for EXECUTED claims. */
|
|
17
|
+
export interface EvidenceArtifact {
|
|
18
|
+
/** Command that was actually run */
|
|
19
|
+
command?: string;
|
|
20
|
+
/** Captured output backing the claim */
|
|
21
|
+
output?: string;
|
|
22
|
+
/** Data source for STATIC findings (coverage file, AST, lockfile, …) */
|
|
23
|
+
dataSource?: string;
|
|
24
|
+
}
|
|
10
25
|
export interface Finding {
|
|
11
26
|
id: string;
|
|
12
27
|
stepId: string;
|
|
13
28
|
severity: 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
29
|
+
/** ADR-105: what kind of evidence backs this finding */
|
|
30
|
+
evidenceClass: EvidenceClass;
|
|
31
|
+
evidenceArtifact?: EvidenceArtifact;
|
|
14
32
|
title: string;
|
|
15
33
|
description: string;
|
|
16
34
|
location?: string;
|
|
@@ -63,7 +81,14 @@ export interface PipelineResult {
|
|
|
63
81
|
overall: 'pass' | 'fail' | 'warn';
|
|
64
82
|
score: number;
|
|
65
83
|
steps: StepResult[];
|
|
84
|
+
/** Findings from failed blocking steps that may gate (EXECUTED/STATIC only, ADR-105) */
|
|
66
85
|
blockers: Finding[];
|
|
86
|
+
/**
|
|
87
|
+
* INFERRED findings from failed blocking steps (ADR-105): not allowed to
|
|
88
|
+
* gate; queued for adversarial verification (ADR-102) to be promoted to
|
|
89
|
+
* blockers or demoted. Their presence downgrades overall to 'warn'.
|
|
90
|
+
*/
|
|
91
|
+
needsVerification: Finding[];
|
|
67
92
|
halted: boolean;
|
|
68
93
|
haltedAt?: string;
|
|
69
94
|
totalDuration: number;
|
|
@@ -25,6 +25,7 @@ export async function runPipeline(config, content, filePath, metadata) {
|
|
|
25
25
|
};
|
|
26
26
|
const stepResults = [];
|
|
27
27
|
const blockers = [];
|
|
28
|
+
const needsVerification = [];
|
|
28
29
|
let halted = false;
|
|
29
30
|
let haltedAt;
|
|
30
31
|
// Filter steps if specified
|
|
@@ -47,6 +48,8 @@ export async function runPipeline(config, content, filePath, metadata) {
|
|
|
47
48
|
id: `${step.id}-error`,
|
|
48
49
|
stepId: step.id,
|
|
49
50
|
severity: 'critical',
|
|
51
|
+
evidenceClass: 'EXECUTED',
|
|
52
|
+
evidenceArtifact: { output: err.message },
|
|
50
53
|
title: `Step execution failed: ${step.name}`,
|
|
51
54
|
description: err.message,
|
|
52
55
|
}],
|
|
@@ -60,10 +63,15 @@ export async function runPipeline(config, content, filePath, metadata) {
|
|
|
60
63
|
}
|
|
61
64
|
stepResults.push(result);
|
|
62
65
|
context.previousResults.push(result);
|
|
63
|
-
// Check for blocking failure
|
|
66
|
+
// Check for blocking failure (ADR-105: only EXECUTED/STATIC may gate)
|
|
64
67
|
if (step.severity === 'blocking' && result.status === 'fail') {
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
const gating = result.findings.filter(f => f.evidenceClass === 'EXECUTED' || f.evidenceClass === 'STATIC');
|
|
69
|
+
needsVerification.push(...result.findings.filter(f => f.evidenceClass === 'INFERRED'));
|
|
70
|
+
// CONJECTURE findings stay visible on the step but never gate.
|
|
71
|
+
blockers.push(...gating);
|
|
72
|
+
// Halt only when verified evidence blocks; a step that failed purely on
|
|
73
|
+
// unverified inference must not stop the pipeline.
|
|
74
|
+
if (gating.length > 0 && !config.continueOnFailure) {
|
|
67
75
|
halted = true;
|
|
68
76
|
haltedAt = step.id;
|
|
69
77
|
break;
|
|
@@ -91,11 +99,16 @@ export async function runPipeline(config, content, filePath, metadata) {
|
|
|
91
99
|
totalWeight += weight;
|
|
92
100
|
}
|
|
93
101
|
const finalScore = totalWeight > 0 ? Math.round(weightedScore / totalWeight) : 0;
|
|
94
|
-
// Determine overall status
|
|
102
|
+
// Determine overall status (ADR-105: unverified inference warns, never fails)
|
|
95
103
|
let overall;
|
|
96
104
|
if (blockers.length > 0) {
|
|
97
105
|
overall = 'fail';
|
|
98
106
|
}
|
|
107
|
+
else if (needsVerification.length > 0 || stepResults.some(r => r.status === 'fail')) {
|
|
108
|
+
// A failed step without gating evidence (INFERRED queued, or CONJECTURE
|
|
109
|
+
// suppressed) must never silently read as a clean pass.
|
|
110
|
+
overall = 'warn';
|
|
111
|
+
}
|
|
99
112
|
else if (stepResults.some(r => r.status === 'warn')) {
|
|
100
113
|
overall = 'warn';
|
|
101
114
|
}
|
|
@@ -112,6 +125,7 @@ export async function runPipeline(config, content, filePath, metadata) {
|
|
|
112
125
|
score: finalScore,
|
|
113
126
|
steps: stepResults,
|
|
114
127
|
blockers,
|
|
128
|
+
needsVerification,
|
|
115
129
|
halted,
|
|
116
130
|
haltedAt,
|
|
117
131
|
totalDuration: Date.now() - startTime,
|
|
@@ -146,13 +160,22 @@ export function formatPipelineReport(result) {
|
|
|
146
160
|
lines.push('## Blockers');
|
|
147
161
|
lines.push('');
|
|
148
162
|
for (const blocker of result.blockers) {
|
|
149
|
-
lines.push(`- **${blocker.title}** (${blocker.severity}): ${blocker.description}`);
|
|
163
|
+
lines.push(`- **${blocker.title}** (${blocker.severity}, ${blocker.evidenceClass}): ${blocker.description}`);
|
|
150
164
|
if (blocker.suggestion) {
|
|
151
165
|
lines.push(` - Suggestion: ${blocker.suggestion}`);
|
|
152
166
|
}
|
|
153
167
|
}
|
|
154
168
|
lines.push('');
|
|
155
169
|
}
|
|
170
|
+
// Unverified inference awaiting adversarial verification (ADR-105/ADR-102)
|
|
171
|
+
if (result.needsVerification.length > 0) {
|
|
172
|
+
lines.push('## Needs Verification (INFERRED — did not gate)');
|
|
173
|
+
lines.push('');
|
|
174
|
+
for (const f of result.needsVerification) {
|
|
175
|
+
lines.push(`- **${f.title}** (${f.severity}): ${f.description}`);
|
|
176
|
+
}
|
|
177
|
+
lines.push('');
|
|
178
|
+
}
|
|
156
179
|
// Detailed findings
|
|
157
180
|
const allFindings = result.steps.flatMap(s => s.findings);
|
|
158
181
|
if (allFindings.length > 0) {
|
|
@@ -9,6 +9,11 @@ function createFinding(stepId, severity, title, description, opts) {
|
|
|
9
9
|
id: `${stepId}-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
|
|
10
10
|
stepId,
|
|
11
11
|
severity,
|
|
12
|
+
// Every step in this file is deterministic structure/content analysis of
|
|
13
|
+
// the document itself — STATIC per ADR-105. LLM-derived steps must pass
|
|
14
|
+
// evidenceClass explicitly.
|
|
15
|
+
evidenceClass: opts?.evidenceClass ?? 'STATIC',
|
|
16
|
+
evidenceArtifact: opts?.evidenceArtifact,
|
|
12
17
|
title,
|
|
13
18
|
description,
|
|
14
19
|
location: opts?.location,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-qe",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.7",
|
|
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",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"mcp:parity": "node scripts/audit-mcp-tool-parity.mjs",
|
|
73
73
|
"mcp:report": "echo 'MCP Report: uses vitest for test reporting' && exit 0",
|
|
74
74
|
"test:code-intelligence": "npm test -- --run tests/unit/domains/code-intelligence/ tests/unit/coordination/mincut/",
|
|
75
|
+
"verify:invariants": "tsx scripts/verify-shipped-invariants.ts",
|
|
75
76
|
"verify:counts": "node -e \"const fs=require('fs'),g=require('glob'),p=require('path');const src=g.globSync('src/**/*.ts',{ignore:'src/**/*.test.ts'});const tests=g.globSync('tests/**/*.test.ts');const agents=g.globSync('.claude/agents/v3/qe-*.md');const skills=g.globSync('.claude/skills/**/*.md');const ok=src.length>500&&tests.length>300;const r={status:ok?'pass':'fail',srcFiles:src.length,testFiles:tests.length,agents:agents.length,skills:skills.length};fs.mkdirSync('reports',{recursive:true});fs.writeFileSync(p.join('reports','verification-counts.json'),JSON.stringify(r,null,2));console.log('Counts:',JSON.stringify(r));if(!ok)process.exit(1)\"",
|
|
76
77
|
"verify:agent-skills": "node -e \"const fs=require('fs'),g=require('glob'),p=require('path');const agents=g.globSync('.claude/agents/v3/qe-*.md');const skills=g.globSync('.claude/skills/**/*.md');const missing=[];for(const a of agents){const name=p.basename(a,'.md');const hasSkill=skills.some(s=>s.includes(name.replace('qe-','')));if(!hasSkill)missing.push(name)}const ok=missing.length<agents.length/2;const r={status:ok?'pass':'fail',agents:agents.length,skills:skills.length,unmatchedAgents:missing.length,missing:missing.slice(0,10)};fs.mkdirSync('reports',{recursive:true});fs.writeFileSync(p.join('reports','verification-agent-skills.json'),JSON.stringify(r,null,2));console.log('Agent-Skills:',JSON.stringify(r));if(!ok)process.exit(1)\"",
|
|
77
78
|
"verify:features": "node -e \"const fs=require('fs'),p=require('path');const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));const hasBin=!!pkg.bin&&Object.keys(pkg.bin).length>=2;const hasExports=!!pkg.exports&&Object.keys(pkg.exports).length>=3;const cliBundleExists=fs.existsSync('dist/cli/bundle.js');const mcpBundleExists=fs.existsSync('dist/mcp/bundle.js');const ok=hasBin&&hasExports&&cliBundleExists&&mcpBundleExists;const r={status:ok?'pass':'fail',binCount:Object.keys(pkg.bin||{}).length,exportsCount:Object.keys(pkg.exports||{}).length,cliBundleExists,mcpBundleExists};fs.mkdirSync('reports',{recursive:true});fs.writeFileSync(p.join('reports','verification-features.json'),JSON.stringify(r,null,2));console.log('Features:',JSON.stringify(r));if(!ok)process.exit(1)\"",
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
"@ruvector/learning-wasm": "^0.1.29",
|
|
146
147
|
"@ruvector/router": "^0.1.28",
|
|
147
148
|
"@ruvector/rvf-node": "^0.1.7",
|
|
148
|
-
"@ruvector/sona": "0.1.
|
|
149
|
+
"@ruvector/sona": "^0.1.7",
|
|
149
150
|
"axe-core": "^4.11.1",
|
|
150
151
|
"better-sqlite3": "^12.5.0",
|
|
151
152
|
"chalk": "^5.6.2",
|
|
@@ -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.10.5");process.exit(0)}
|
|
2
|
-
import{a,b,c}from"./chunk-GKG6IQP6.js";import"./chunk-BB7MEGXD.js";import"./chunk-DIJ74M7V.js";import"./chunk-56RA6YPN.js";import"./chunk-S73KENCH.js";import"./chunk-S7HQOGVD.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.10.5");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-W5C7R2LS.js";import"./chunk-TMD6IC6D.js";import"./chunk-CUAM34RQ.js";import"./chunk-EIL7FQC4.js";import"./chunk-IUKERFLT.js";import"./chunk-VWN66V7U.js";import"./chunk-RUQV3BTV.js";import"./chunk-RZ7D5SHS.js";import"./chunk-2Z7HIT5I.js";import"./chunk-QTDZS4U6.js";import"./chunk-G4GX6YKX.js";import"./chunk-3KGUP2SD.js";import"./chunk-RFNEEDPQ.js";import"./chunk-J533CJUN.js";import"./chunk-R573V37S.js";import"./chunk-YEO2Z3UX.js";import"./chunk-D7NKRCIL.js";import"./chunk-56RA6YPN.js";import"./chunk-MFQIJ3HV.js";import"./chunk-RLZDXQNM.js";import"./chunk-VC256KH2.js";import"./chunk-IRS4HKAR.js";import"./chunk-S73KENCH.js";import"./chunk-7DU35D4M.js";import"./chunk-KIMJPTHD.js";import"./chunk-2UQWVF4P.js";import"./chunk-HPKYIK7R.js";import"./chunk-MJRYHHOG.js";import"./chunk-RONMVGCT.js";import"./chunk-IWRORKD7.js";import"./chunk-GTVXVYKE.js";import"./chunk-ZTC64OJE.js";import"./chunk-O5OOUMBB.js";import"./chunk-S7HQOGVD.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,3 +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.10.5");process.exit(0)}
|
|
2
|
-
import{d as c,e as u,f as h,g as m}from"./chunk-UOIT5JZ6.js";import{m as p}from"./chunk-R573V37S.js";import"./chunk-YEO2Z3UX.js";import{b as s}from"./chunk-D7NKRCIL.js";import"./chunk-56RA6YPN.js";import"./chunk-RLZDXQNM.js";import"./chunk-VC256KH2.js";import"./chunk-S73KENCH.js";import"./chunk-KIMJPTHD.js";import{p as l,q as d}from"./chunk-2UQWVF4P.js";import"./chunk-HPKYIK7R.js";import"./chunk-MJRYHHOG.js";import"./chunk-RONMVGCT.js";import"./chunk-IWRORKD7.js";import"./chunk-GTVXVYKE.js";import"./chunk-ZTC64OJE.js";import"./chunk-O5OOUMBB.js";import{g as f}from"./chunk-S7HQOGVD.js";import{Command as g}from"commander";import a from"chalk";p();import{existsSync as y}from"node:fs";import b from"node:path";function C(n,i){let t=[];t.push(a.bold("Witness Chain Audit Verification")),t.push("");let e=i?a.green("ENABLED"):a.yellow("DISABLED");t.push(` Feature Flag: ${e}`),t.push(` Chain Length: ${n.length} receipts`);let r=n.valid?a.green("VALID"):a.red("BROKEN");return t.push(` Integrity: ${r}`),n.length>0&&t.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(t.push(""),t.push(a.red(` Break detected at index ${n.brokenAt}`)),t.push(a.red(` ${n.message}`))),t.push(""),t.join(`
|
|
3
|
-
`)}function x(){try{let n=s(),i=b.join(n,".agentic-qe","memory.db");if(!y(i))return null;let t=(d(),f(l)),e=new t(i),r=c(e),o=h(r);return e.close(),o}catch{return null}}async function A(n){let i=m(),e=(x()??u()).verifyChain(),r={featureEnabled:i,chainLength:e.length,integrity:e.valid,brokenAt:e.brokenAt,lastHash:e.lastHash,message:e.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(e,i)),r}function v(n,i,t){let e=new g("audit").description("Witness chain audit trail management");return e.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").action(async r=>{try{await A({format:r.format}),await i(0)}catch(o){console.error("Failed to verify witness chain:",o),await i(1)}}),e}export{v as createAuditCommand,C as formatVerificationText,A as handleAuditVerify};
|
|
@@ -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.10.5");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j}from"./chunk-GMU7P5O3.js";import"./chunk-K5KKZWED.js";import"./chunk-R573V37S.js";import"./chunk-YEO2Z3UX.js";import"./chunk-D7NKRCIL.js";import"./chunk-56RA6YPN.js";import"./chunk-RLZDXQNM.js";import"./chunk-VC256KH2.js";import"./chunk-S73KENCH.js";import"./chunk-7DU35D4M.js";import"./chunk-KIMJPTHD.js";import"./chunk-2UQWVF4P.js";import"./chunk-HPKYIK7R.js";import"./chunk-MJRYHHOG.js";import"./chunk-RONMVGCT.js";import"./chunk-IWRORKD7.js";import"./chunk-GTVXVYKE.js";import"./chunk-ZTC64OJE.js";import"./chunk-O5OOUMBB.js";import"./chunk-S7HQOGVD.js";export{j as MCPToolBase,i as defaultToolLogger,h as getLLMRouter,d as getMemoryBackend,f as getSharedLLMRouter,b as getSharedMemoryBackend,a as registerRvfResetFn,g as resetSharedLLMRouter,c as resetSharedMemoryBackend,e as setSharedLLMRouter};
|
|
@@ -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.10.5");process.exit(0)}
|
|
2
|
-
import{a}from"./chunk-G6FP3S3G.js";import"./chunk-GMU7P5O3.js";import"./chunk-K5KKZWED.js";import"./chunk-R573V37S.js";import"./chunk-YEO2Z3UX.js";import"./chunk-D7NKRCIL.js";import"./chunk-56RA6YPN.js";import"./chunk-RLZDXQNM.js";import"./chunk-VC256KH2.js";import"./chunk-S73KENCH.js";import"./chunk-7DU35D4M.js";import"./chunk-KIMJPTHD.js";import"./chunk-2UQWVF4P.js";import"./chunk-HPKYIK7R.js";import"./chunk-MJRYHHOG.js";import"./chunk-RONMVGCT.js";import"./chunk-IWRORKD7.js";import"./chunk-GTVXVYKE.js";import"./chunk-ZTC64OJE.js";import"./chunk-O5OOUMBB.js";import"./chunk-S7HQOGVD.js";export{a as BrowserWorkflowTool};
|
|
@@ -1,65 +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.10.5");process.exit(0)}
|
|
2
|
-
import{d as B,e as j,f as re,g as W}from"./chunk-RZ7D5SHS.js";import{a as ne}from"./chunk-2Z7HIT5I.js";import{g as rt,h as nt}from"./chunk-QTDZS4U6.js";import{b as xe,c as et}from"./chunk-D7NKRCIL.js";import{a as Ce,d as De,e as tt,f as Fe}from"./chunk-MFQIJ3HV.js";import{b as v,c as w}from"./chunk-IRS4HKAR.js";import{a as y,b as Ae,c as Te}from"./chunk-S73KENCH.js";import{i as C}from"./chunk-7DU35D4M.js";import{B as q,D as H,G as te,P as M,S as F,b as D}from"./chunk-O5OOUMBB.js";import{a as Ee,d as J,f as Ze,g as Re}from"./chunk-S7HQOGVD.js";var V=J(S=>{var dt=S&&S.__extends||(function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s])},n(e,t)};return function(e,t){n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})();Object.defineProperty(S,"__esModule",{value:!0});var ft=Object.prototype.hasOwnProperty;function le(n,e){return ft.call(n,e)}S.hasOwnProperty=le;function Ue(n){if(Array.isArray(n)){for(var e=new Array(n.length),t=0;t<e.length;t++)e[t]=""+t;return e}if(Object.keys)return Object.keys(n);var r=[];for(var i in n)le(n,i)&&r.push(i);return r}S._objectKeys=Ue;function pt(n){switch(typeof n){case"object":return JSON.parse(JSON.stringify(n));case"undefined":return null;default:return n}}S._deepClone=pt;function mt(n){for(var e=0,t=n.length,r;e<t;){if(r=n.charCodeAt(e),r>=48&&r<=57){e++;continue}return!1}return!0}S.isInteger=mt;function oe(n){return n.indexOf("/")===-1&&n.indexOf("~")===-1?n:n.replace(/~/g,"~0").replace(/\//g,"~1")}S.escapePathComponent=oe;function gt(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")}S.unescapePathComponent=gt;function ue(n,e){var t;for(var r in n)if(le(n,r)){if(n[r]===e)return oe(r)+"/";if(typeof n[r]=="object"&&(t=ue(n[r],e),t!=""))return oe(r)+"/"+t}return""}S._getPathRecursive=ue;function yt(n,e){if(n===e)return"/";var t=ue(n,e);if(t==="")throw new Error("Object not found in root");return"/"+t}S.getPath=yt;function ce(n){if(n===void 0)return!0;if(n){if(Array.isArray(n)){for(var e=0,t=n.length;e<t;e++)if(ce(n[e]))return!0}else if(typeof n=="object"){for(var r=Ue(n),i=r.length,s=0;s<i;s++)if(ce(n[r[s]]))return!0}}return!1}S.hasUndefined=ce;function ke(n,e){var t=[n];for(var r in e){var i=typeof e[r]=="object"?JSON.stringify(e[r],null,2):e[r];typeof i<"u"&&t.push(r+": "+i)}return t.join(`
|
|
3
|
-
`)}var vt=(function(n){dt(e,n);function e(t,r,i,s,a){var c=this.constructor,u=n.call(this,ke(t,{name:r,index:i,operation:s,tree:a}))||this;return u.name=r,u.index=i,u.operation=s,u.tree=a,Object.setPrototypeOf(u,c.prototype),u.message=ke(t,{name:r,index:i,operation:s,tree:a}),u}return e})(Error);S.PatchError=vt});var he=J(g=>{Object.defineProperty(g,"__esModule",{value:!0});var b=V();g.JsonPatchError=b.PatchError;g.deepClone=b._deepClone;var L={add:function(n,e,t){return n[e]=this.value,{newDocument:t}},remove:function(n,e,t){var r=n[e];return delete n[e],{newDocument:t,removed:r}},replace:function(n,e,t){var r=n[e];return n[e]=this.value,{newDocument:t,removed:r}},move:function(n,e,t){var r=Y(t,this.path);r&&(r=b._deepClone(r));var i=O(t,{op:"remove",path:this.from}).removed;return O(t,{op:"add",path:this.path,value:i}),{newDocument:t,removed:r}},copy:function(n,e,t){var r=Y(t,this.from);return O(t,{op:"add",path:this.path,value:b._deepClone(r)}),{newDocument:t}},test:function(n,e,t){return{newDocument:t,test:z(n[e],this.value)}},_get:function(n,e,t){return this.value=n[e],{newDocument:t}}},wt={add:function(n,e,t){return b.isInteger(e)?n.splice(e,0,this.value):n[e]=this.value,{newDocument:t,index:e}},remove:function(n,e,t){var r=n.splice(e,1);return{newDocument:t,removed:r[0]}},replace:function(n,e,t){var r=n[e];return n[e]=this.value,{newDocument:t,removed:r}},move:L.move,copy:L.copy,test:L.test,_get:L._get};function Y(n,e){if(e=="")return n;var t={op:"_get",path:e};return O(n,t),t.value}g.getValueByPointer=Y;function O(n,e,t,r,i,s){if(t===void 0&&(t=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),s===void 0&&(s=0),t&&(typeof t=="function"?t(e,0,n,e.path):K(e,0)),e.path===""){var a={newDocument:n};if(e.op==="add")return a.newDocument=e.value,a;if(e.op==="replace")return a.newDocument=e.value,a.removed=n,a;if(e.op==="move"||e.op==="copy")return a.newDocument=Y(n,e.from),e.op==="move"&&(a.removed=n),a;if(e.op==="test"){if(a.test=z(n,e.value),a.test===!1)throw new g.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",s,e,n);return a.newDocument=n,a}else{if(e.op==="remove")return a.removed=n,a.newDocument=null,a;if(e.op==="_get")return e.value=n,a;if(t)throw new g.JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,e,n);return a}}else{r||(n=b._deepClone(n));var c=e.path||"",u=c.split("/"),o=n,l=1,h=u.length,d=void 0,f=void 0,p=void 0;for(typeof t=="function"?p=t:p=K;;){if(f=u[l],f&&f.indexOf("~")!=-1&&(f=b.unescapePathComponent(f)),i&&(f=="__proto__"||f=="prototype"&&l>0&&u[l-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(t&&d===void 0&&(o[f]===void 0?d=u.slice(0,l).join("/"):l==h-1&&(d=e.path),d!==void 0&&p(e,0,n,d)),l++,Array.isArray(o)){if(f==="-")f=o.length;else{if(t&&!b.isInteger(f))throw new g.JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,e,n);b.isInteger(f)&&(f=~~f)}if(l>=h){if(t&&e.op==="add"&&f>o.length)throw new g.JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,e,n);var a=wt[e.op].call(e,o,f,n);if(a.test===!1)throw new g.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",s,e,n);return a}}else if(l>=h){var a=L[e.op].call(e,o,f,n);if(a.test===!1)throw new g.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",s,e,n);return a}if(o=o[f],t&&l<h&&(!o||typeof o!="object"))throw new g.JsonPatchError("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,e,n)}}}g.applyOperation=O;function qe(n,e,t,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),t&&!Array.isArray(e))throw new g.JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(n=b._deepClone(n));for(var s=new Array(e.length),a=0,c=e.length;a<c;a++)s[a]=O(n,e[a],t,!0,i,a),n=s[a].newDocument;return s.newDocument=n,s}g.applyPatch=qe;function Pt(n,e,t){var r=O(n,e);if(r.test===!1)throw new g.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",t,e,n);return r.newDocument}g.applyReducer=Pt;function K(n,e,t,r){if(typeof n!="object"||n===null||Array.isArray(n))throw new g.JsonPatchError("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,n,t);if(L[n.op]){if(typeof n.path!="string")throw new g.JsonPatchError("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,n,t);if(n.path.indexOf("/")!==0&&n.path.length>0)throw new g.JsonPatchError('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,n,t);if((n.op==="move"||n.op==="copy")&&typeof n.from!="string")throw new g.JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,n,t);if((n.op==="add"||n.op==="replace"||n.op==="test")&&n.value===void 0)throw new g.JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,n,t);if((n.op==="add"||n.op==="replace"||n.op==="test")&&b.hasUndefined(n.value))throw new g.JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,n,t);if(t){if(n.op=="add"){var i=n.path.split("/").length,s=r.split("/").length;if(i!==s+1&&i!==s)throw new g.JsonPatchError("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,n,t)}else if(n.op==="replace"||n.op==="remove"||n.op==="_get"){if(n.path!==r)throw new g.JsonPatchError("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,n,t)}else if(n.op==="move"||n.op==="copy"){var a={op:"_get",path:n.from,value:void 0},c=Qe([a],t);if(c&&c.name==="OPERATION_PATH_UNRESOLVABLE")throw new g.JsonPatchError("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,n,t)}}}else throw new g.JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,n,t)}g.validator=K;function Qe(n,e,t){try{if(!Array.isArray(n))throw new g.JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)qe(b._deepClone(e),b._deepClone(n),t||!0);else{t=t||K;for(var r=0;r<n.length;r++)t(n[r],r,e,void 0)}}catch(i){if(i instanceof g.JsonPatchError)return i;throw i}}g.validate=Qe;function z(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){var t=Array.isArray(n),r=Array.isArray(e),i,s,a;if(t&&r){if(s=n.length,s!=e.length)return!1;for(i=s;i--!==0;)if(!z(n[i],e[i]))return!1;return!0}if(t!=r)return!1;var c=Object.keys(n);if(s=c.length,s!==Object.keys(e).length)return!1;for(i=s;i--!==0;)if(!e.hasOwnProperty(c[i]))return!1;for(i=s;i--!==0;)if(a=c[i],!z(n[a],e[a]))return!1;return!0}return n!==n&&e!==e}g._areEquals=z});var ze=J(k=>{Object.defineProperty(k,"__esModule",{value:!0});var P=V(),St=he(),fe=new WeakMap,bt=(function(){function n(e){this.observers=new Map,this.obj=e}return n})(),Et=(function(){function n(e,t){this.callback=e,this.observer=t}return n})();function Rt(n){return fe.get(n)}function At(n,e){return n.observers.get(e)}function Tt(n,e){n.observers.delete(e.callback)}function xt(n,e){e.unobserve()}k.unobserve=xt;function Ct(n,e){var t=[],r,i=Rt(n);if(!i)i=new bt(n),fe.set(n,i);else{var s=At(i,e);r=s&&s.observer}if(r)return r;if(r={},i.value=P._deepClone(n),e){r.callback=e,r.next=null;var a=function(){de(r)},c=function(){clearTimeout(r.next),r.next=setTimeout(a)};typeof window<"u"&&(window.addEventListener("mouseup",c),window.addEventListener("keyup",c),window.addEventListener("mousedown",c),window.addEventListener("keydown",c),window.addEventListener("change",c))}return r.patches=t,r.object=n,r.unobserve=function(){de(r),clearTimeout(r.next),Tt(i,r),typeof window<"u"&&(window.removeEventListener("mouseup",c),window.removeEventListener("keyup",c),window.removeEventListener("mousedown",c),window.removeEventListener("keydown",c),window.removeEventListener("change",c))},i.observers.set(e,new Et(e,r)),r}k.observe=Ct;function de(n,e){e===void 0&&(e=!1);var t=fe.get(n.object);pe(t.value,n.object,n.patches,"",e),n.patches.length&&St.applyPatch(t.value,n.patches);var r=n.patches;return r.length>0&&(n.patches=[],n.callback&&n.callback(r)),r}k.generate=de;function pe(n,e,t,r,i){if(e!==n){typeof e.toJSON=="function"&&(e=e.toJSON());for(var s=P._objectKeys(e),a=P._objectKeys(n),c=!1,u=!1,o=a.length-1;o>=0;o--){var l=a[o],h=n[l];if(P.hasOwnProperty(e,l)&&!(e[l]===void 0&&h!==void 0&&Array.isArray(e)===!1)){var d=e[l];typeof h=="object"&&h!=null&&typeof d=="object"&&d!=null&&Array.isArray(h)===Array.isArray(d)?pe(h,d,t,r+"/"+P.escapePathComponent(l),i):h!==d&&(c=!0,i&&t.push({op:"test",path:r+"/"+P.escapePathComponent(l),value:P._deepClone(h)}),t.push({op:"replace",path:r+"/"+P.escapePathComponent(l),value:P._deepClone(d)}))}else Array.isArray(n)===Array.isArray(e)?(i&&t.push({op:"test",path:r+"/"+P.escapePathComponent(l),value:P._deepClone(h)}),t.push({op:"remove",path:r+"/"+P.escapePathComponent(l)}),u=!0):(i&&t.push({op:"test",path:r,value:n}),t.push({op:"replace",path:r,value:e}),c=!0)}if(!(!u&&s.length==a.length))for(var o=0;o<s.length;o++){var l=s[o];!P.hasOwnProperty(n,l)&&e[l]!==void 0&&t.push({op:"add",path:r+"/"+P.escapePathComponent(l),value:P._deepClone(e[l])})}}}function Dt(n,e,t){t===void 0&&(t=!1);var r=[];return pe(n,e,r,"",t),r}k.compare=Dt});var $e=J(I=>{var Ft=he();Object.assign(I,Ft);var Ot=ze();Object.assign(I,Ot);var Z=V();I.JsonPatchError=Z.PatchError;I.deepClone=Z._deepClone;I.escapePathComponent=Z.escapePathComponent;I.unescapePathComponent=Z.unescapePathComponent});et();Te();var Q=class{constructor(e,t){this.createAdapter=e;this.config=t?.base??X,this.rvfPath=t?.rvfPath??".agentic-qe/patterns.rvf",this.skipCloseOnDispose=t?.skipCloseOnDispose??!1}createAdapter;config;rvfPath;skipCloseOnDispose;adapter=null;sqliteStore=null;initialized=!1;rvfInitError=null;searchOps=0;totalSearchMs=0;setSqliteStore(e){this.sqliteStore=e}getAdapter(){return this.adapter}async initialize(){if(!this.initialized){try{this.adapter=this.createAdapter(this.rvfPath,this.config.embeddingDimension),this.initialized=!0,console.log(`[RvfPatternStore] Initialized: ${this.rvfPath} (dim=${this.config.embeddingDimension})`)}catch(e){this.rvfInitError=y(e),console.error(`[RvfPatternStore] ERROR: RVF native init failed \u2014 vector search is DISABLED. Cause: ${this.rvfInitError}. Fix: install @ruvector/rvf-node native bindings, or set useRVFPatternStore=false to use SQLite HNSW.`),this.adapter=null,this.initialized=!0}if(!this.sqliteStore)try{let{createSQLitePatternStore:e}=await import("./sqlite-persistence-A6GKDMOJ.js"),t=e();await t.initialize(),this.sqliteStore=t}catch{}await this.purgeOrphanedVectors()}}async purgeOrphanedVectors(){if(!(!this.adapter||!this.sqliteStore))try{let e=this.adapter.status()?.totalVectors??0,t=this.sqliteStore.getStats()?.totalPatterns??0;if(e<=t)return;let{readFileSync:r,existsSync:i}=await import("node:fs"),s=`${this.rvfPath}.idmap.json`;if(!i(s))return;let a=JSON.parse(r(s,"utf-8")),c=new Set((a.entries??[]).map(l=>Array.isArray(l)?l[0]:void 0).filter(l=>typeof l=="string")),u=new Set(this.sqliteStore.getPatterns({limit:1e4}).map(l=>l.id)),o=[...c].filter(l=>!u.has(l));if(o.length===0)return;this.adapter.delete(o),console.log(`[RvfPatternStore] Removed ${o.length} ghost vectors (index ${e} > DB ${t})`)}catch(e){console.warn(`[RvfPatternStore] orphan purge skipped: ${y(e)}`)}}async dispose(){if(this.adapter&&!this.skipCloseOnDispose)try{this.adapter.close()}catch{}this.adapter=null,this.initialized=!1}async store(e){await this.ensureInitialized();let t=W(e);if(!t.valid)return w(new Error(`Invalid pattern: ${t.errors.join(", ")}`));if(e.confidence<this.config.minConfidence)return w(new Error(`Pattern confidence ${e.confidence} below threshold ${this.config.minConfidence}`));if(this.sqliteStore)try{let r=this.sqliteStore.storePattern(e,e.embedding);r&&r!==e.id&&(e.id=r)}catch(r){console.warn(`[RvfPatternStore] SQLite persist failed for ${e.id}:`,y(r))}if(e.embedding&&this.adapter)try{let r=e.embedding instanceof Float32Array?e.embedding:new Float32Array(e.embedding);this.adapter.ingest([{id:e.id,vector:r}])}catch(r){console.warn(`[RvfPatternStore] RVF ingest failed for ${e.id}:`,y(r))}return v(e.id)}async create(e){let t=e.confidence??.5,r=e.qeDomain??"test-generation",i={id:C(),patternType:e.patternType,qeDomain:r,domain:r,name:e.name,description:e.description,confidence:t,usageCount:0,successRate:0,qualityScore:B({confidence:t,usageCount:0,successRate:0}),context:{tags:[],...e.context},template:{example:"",...e.template},embedding:e.embedding,tier:"short-term",createdAt:new Date,lastUsedAt:new Date,successfulUses:0,reusable:!1,reuseCount:0,averageTokenSavings:0},s=await this.store(i);return s.success?v(i):w(s.error)}async get(e){if(this.sqliteStore)try{return this.sqliteStore.getPattern(e)??null}catch{return null}return null}async search(e,t={}){await this.ensureInitialized();let r=performance.now(),i=t.limit??10,s=[];if(Array.isArray(e)&&this.adapter)try{let c=e instanceof Float32Array?e:new Float32Array(e),u=this.adapter.search(c,i*2);for(let o of u){let l=await this.get(o.id);if(l&&this.matchesFilters(l,t)){let h=this.calculateReuseInfo(l,o.score);s.push({pattern:l,score:o.score,matchType:"vector",similarity:o.score,canReuse:h.canReuse,estimatedTokenSavings:h.estimatedTokenSavings,reuseConfidence:h.reuseConfidence})}}}catch(c){console.warn("[RvfPatternStore] RVF search failed:",y(c))}if(Array.isArray(e)&&!this.adapter&&this.sqliteStore&&s.length===0)try{let c=this.sqliteStore.getPatterns({limit:i*4}),u=e,o=Math.sqrt(u.reduce((l,h)=>l+h*h,0));if(o>0)for(let l of c){if(!this.matchesFilters(l,t))continue;let h=this.sqliteStore.getPattern(l.id),d=h?.embedding;if(!d||d.length!==u.length)continue;let f=0,p=0;for(let R=0;R<u.length;R++)f+=u[R]*d[R],p+=d[R]*d[R];if(p=Math.sqrt(p),p===0)continue;let m=f/(o*p),E=this.calculateReuseInfo(h,m);s.push({pattern:h,score:m,matchType:"vector",similarity:m,canReuse:E.canReuse,estimatedTokenSavings:E.estimatedTokenSavings,reuseConfidence:E.reuseConfidence})}}catch{}if(typeof e=="string"&&!e.trim()&&this.sqliteStore)try{let c=this.sqliteStore.getPatterns({limit:i*2}),u=new Set(s.map(o=>o.pattern.id));for(let o of c){if(u.has(o.id)||!this.matchesFilters(o,t))continue;let l=this.calculateReuseInfo(o,o.confidence);s.push({pattern:o,score:o.confidence,matchType:"exact",similarity:o.confidence,canReuse:l.canReuse,estimatedTokenSavings:l.estimatedTokenSavings,reuseConfidence:l.reuseConfidence})}}catch{}if(typeof e=="string"&&e.trim()&&this.sqliteStore)try{let c=this.sqliteStore.searchFTS(e,i*2),u=new Set(s.map(o=>o.pattern.id));for(let o of c){if(u.has(o.id))continue;let l=await this.get(o.id);if(l&&this.matchesFilters(l,t)){let h=this.calculateReuseInfo(l,o.ftsScore);s.push({pattern:l,score:.5*o.ftsScore,matchType:"exact",similarity:o.ftsScore,canReuse:h.canReuse,estimatedTokenSavings:h.estimatedTokenSavings,reuseConfidence:h.reuseConfidence})}}}catch{}s.sort((c,u)=>u.score-c.score);let a=performance.now()-r;return this.searchOps++,this.totalSearchMs+=a,v(s.slice(0,i))}async recordUsage(e,t){if(!this.sqliteStore)return w(new Error("No SQLite store attached"));try{return this.sqliteStore.recordUsage(e,t),v(void 0)}catch(r){return w(new Error(`recordUsage failed: ${y(r)}`))}}async promote(e){if(!this.sqliteStore)return w(new Error("No SQLite store attached"));try{return this.sqliteStore.promotePattern(e),v(void 0)}catch(t){return w(new Error(`promote failed: ${y(t)}`))}}async delete(e){if(this.adapter)try{this.adapter.delete([e])}catch(t){console.warn(`[RvfPatternStore] RVF delete failed for ${e}:`,y(t))}if(this.sqliteStore)try{this.sqliteStore.deletePattern(e)}catch(t){return w(new Error(`SQLite delete failed: ${y(t)}`))}return v(void 0)}async getStats(){let e=this.adapter?.status(),t=e?.totalVectors??0;if(t===0&&this.sqliteStore)try{t=this.sqliteStore.getStats().totalPatterns}catch{}return{totalPatterns:t,byTier:{shortTerm:0,longTerm:0},byDomain:{},byType:{},avgConfidence:0,avgQualityScore:0,avgSuccessRate:0,searchOperations:this.searchOps,avgSearchLatencyMs:this.searchOps>0?this.totalSearchMs/this.searchOps:0,hnswStats:{nativeAvailable:this.adapter!==null,vectorCount:e?.totalVectors??0,indexSizeBytes:e?.fileSizeBytes??0,...this.rvfInitError?{rvfInitError:this.rvfInitError}:{}}}}async cleanup(){if(!this.sqliteStore)return{removed:0,promoted:0};let e=0,t=0;try{let r=this.sqliteStore.getPatterns({limit:1e4});for(let i of r)i.confidence<this.config.minConfidence&&i.usageCount>3?(await this.delete(i.id),e++):i.tier==="short-term"&&i.successfulUses>=j&&(await this.promote(i.id),t++)}catch(r){console.warn("[RvfPatternStore] Cleanup error:",y(r))}return{removed:e,promoted:t}}async ensureInitialized(){this.initialized||await this.initialize()}matchesFilters(e,t){return!(t.patternType&&e.patternType!==t.patternType||t.domain&&e.qeDomain!==t.domain||t.tier&&e.tier!==t.tier||t.minConfidence&&e.confidence<t.minConfidence||t.minQualityScore&&e.qualityScore<t.minQualityScore)}calculateReuseInfo(e,t){let r=this.config.reuseOptimization,i=r.enabled&&t>=r.minSimilarityForReuse&&e.successRate>=r.minSuccessRateForReuse;return{canReuse:i,estimatedTokenSavings:i?500:0,reuseConfidence:i?t*e.successRate:0}}};Fe();Te();F();function st(n,e){let r=[n.pattern,n];for(let i of r){let s=e.split("."),a=i;for(let c of s){if(a==null)break;if(typeof a=="object")a=a[c];else{a=void 0;break}}if(a!==void 0)return a}}function at(n,e,t){switch(e){case"eq":return n===t;case"gt":return typeof n=="number"&&typeof t=="number"&&n>t;case"lt":return typeof n=="number"&&typeof t=="number"&&n<t;case"gte":return typeof n=="number"&&typeof t=="number"&&n>=t;case"lte":return typeof n=="number"&&typeof t=="number"&&n<=t;case"in":return Array.isArray(t)?t.includes(n):!1;case"contains":return Array.isArray(n)||typeof n=="string"&&typeof t=="string"?n.includes(t):!1;case"between":{if(typeof n!="number"||!Array.isArray(t)||t.length!==2){if(n instanceof Date&&Array.isArray(t)&&t.length===2){let s=n.getTime(),a=t[0]instanceof Date?t[0].getTime():Number(t[0]),c=t[1]instanceof Date?t[1].getTime():Number(t[1]);return s>=a&&s<=c}return!1}let[r,i]=t;return n>=r&&n<=i}default:return!1}}function G(n,e){switch(e.type){case"AND":return(e.children??[]).every(r=>G(n,r));case"OR":{let t=e.children??[];return t.length===0?!0:t.some(r=>G(n,r))}case"NOT":return e.child?!G(n,e.child):!0;case"FIELD":{if(!e.field||!e.operator)return!0;let t=st(n,e.field);return at(t,e.operator,e.value)}default:return!0}}function Oe(n,e){return e?n.filter(t=>G(t,e)):n}F();F();var _e=1e4,Ne=2166136261;function He(n){let e=2166136261;for(let t=0;t<n.length;t++)e^=n.charCodeAt(t),e=Math.imul(e,16777619);return e>>>0}var ae=new Uint8Array(256);for(let n=0;n<256;n++){let e=0,t=n;for(;t;)e++,t&=t-1;ae[n]=e}var Ie="0123456789abcdef";function ot(n){let e=Math.min(n.length,16),t="";for(let r=0;r<e;r++){let i=n[r];t+=Ie[i>>4]+Ie[i&15]}return t}function ct(n,e){if(n.length!==e.length)throw new Error(`Cannot bind vectors of different lengths: ${n.length} vs ${e.length}`);let t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=n[r]^e[r];return t}function lt(n){if(n.length===0)throw new Error("Cannot bundle zero vectors");let e=n[0].length;for(let i=1;i<n.length;i++)if(n[i].length!==e)throw new Error(`Vector length mismatch at index ${i}: expected ${e}, got ${n[i].length}`);let t=new Uint8Array(e),r=n.length/2;for(let i=0;i<e;i++){let s=0;for(let a=0;a<8;a++){let c=0,u=1<<a;for(let o=0;o<n.length;o++)n[o][i]&u&&c++;c>=r&&(s|=u)}t[i]=s}return t}function ut(n,e,t){if(n.length!==e.length)throw new Error(`Cannot compute Hamming distance for vectors of different lengths: ${n.length} vs ${e.length}`);let r=0;for(let s=0;s<n.length;s++)r+=ae[n[s]^e[s]];let i=t??n.length*8;return i>0?r/i:0}function ht(n,e,t){return 1-ut(n,e,t)}var ie=class{dimensions;baseSeed;byteLen;tokenCache=new Map;constructor(e){if(this.dimensions=e?.dimensions??_e,this.baseSeed=e?.seed??Ne,this.byteLen=Math.ceil(this.dimensions/8),this.dimensions<=0)throw new Error(`HDC dimensions must be positive, got ${this.dimensions}`)}tokenToHypervector(e){let t=this.tokenCache.get(e);if(t)return new Uint8Array(t);let r=He(e)^this.baseSeed,i=this.generateSeededVector(r);return this.tokenCache.set(e,i),new Uint8Array(i)}fingerprintPattern(e){if(e.length===0)return new Uint8Array(this.byteLen);let t=this.tokenToHypervector(e[0]);for(let r=1;r<e.length;r++)t=ct(t,this.tokenToHypervector(e[r]));return t}fingerprintWithContext(e,t){let r=this.fingerprintPattern(e);if(t.length===0)return r;let i=this.fingerprintPattern(t);return lt([r,i])}similarity(e,t){return ht(e,t,this.dimensions)}generateSeededVector(e){let t=new Uint8Array(this.byteLen),r=new ne(e),i=0;for(;i<this.byteLen;){let a=r.next(),c=Math.min(4,this.byteLen-i);for(let u=0;u<c;u++)t[i++]=a>>>u*8&255}let s=this.dimensions%8;return s>0&&(t[this.byteLen-1]&=(1<<s)-1),t}},se=class{dimensions;baseSeed;constructor(e){if(this.dimensions=e?.dimensions??_e,this.baseSeed=e?.seed??Ne,this.dimensions<=0)throw new Error(`HDC dimensions must be positive, got ${this.dimensions}`)}fingerprint(e){let t=`${e.id}|${e.domain}|${e.type}|${e.content??""}`,r=He(t)^this.baseSeed,i=this.generateVector(r);return{vector:i,dimensions:this.dimensions,hash:ot(i)}}compositionalBind(e,t){if(e.length!==t.length)throw new Error(`Cannot bind vectors of different lengths: ${e.length} vs ${t.length}`);let r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e[i]^t[i];return r}hammingDistance(e,t){if(e.length!==t.length)throw new Error(`Cannot compute Hamming distance for vectors of different lengths: ${e.length} vs ${t.length}`);let r=0;for(let i=0;i<e.length;i++)r+=ae[e[i]^t[i]];return r}similarity(e,t){return 1-this.hammingDistance(e,t)/this.dimensions}batchFingerprint(e){return e.map(t=>this.fingerprint(t))}generateVector(e){let t=Math.ceil(this.dimensions/8),r=new Uint8Array(t),i=new ne(e),s=0;for(;s<t;){let c=i.next(),u=t-s,o=u<4?u:4;for(let l=0;l<o;l++)r[s++]=c>>>l*8&255}let a=this.dimensions%8;return a>0&&(r[t-1]&=(1<<a)-1),r}};function Me(n){return new se(n)}function Le(n){return q()?new ie(n):null}var $=Ze($e(),1),It=`
|
|
4
|
-
CREATE TABLE IF NOT EXISTS pattern_deltas (
|
|
5
|
-
id TEXT PRIMARY KEY,
|
|
6
|
-
pattern_id TEXT NOT NULL,
|
|
7
|
-
version INTEGER NOT NULL,
|
|
8
|
-
timestamp INTEGER NOT NULL,
|
|
9
|
-
type TEXT NOT NULL CHECK (type IN ('genesis', 'update', 'rollback')),
|
|
10
|
-
patch TEXT NOT NULL DEFAULT '[]',
|
|
11
|
-
reverse_patch TEXT NOT NULL DEFAULT '[]',
|
|
12
|
-
metadata TEXT
|
|
13
|
-
);
|
|
14
|
-
CREATE INDEX IF NOT EXISTS idx_pattern_deltas_pid_version
|
|
15
|
-
ON pattern_deltas (pattern_id, version);
|
|
16
|
-
CREATE INDEX IF NOT EXISTS idx_pattern_deltas_timestamp
|
|
17
|
-
ON pattern_deltas (timestamp);
|
|
18
|
-
`;function Je(n,e){let t=$.compare(n,e),r=$.compare(e,n);return{forward:t,reverse:r}}function _t(n,e){let t=JSON.parse(JSON.stringify(n));return $.applyPatch(t,e).newDocument}function Be(n){return{id:n.id,patternId:n.pattern_id,version:n.version,timestamp:n.timestamp,type:n.type,patch:JSON.parse(n.patch),reversePatch:JSON.parse(n.reverse_patch),metadata:n.metadata?JSON.parse(n.metadata):void 0}}var ee=class{db;config;prepared=new Map;initialized=!1;constructor(e,t){this.db=e,this.config={maxVersionsPerPattern:t?.maxVersionsPerPattern??100,compressDeltas:t?.compressDeltas??!1}}initialize(){this.initialized||(this.db.exec(It),this.prepareStatements(),this.initialized=!0)}prepareStatements(){this.prepared.set("insert",this.db.prepare(`
|
|
19
|
-
INSERT INTO pattern_deltas (id, pattern_id, version, timestamp, type, patch, reverse_patch, metadata)
|
|
20
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
21
|
-
`)),this.prepared.set("getHistory",this.db.prepare(`
|
|
22
|
-
SELECT * FROM pattern_deltas
|
|
23
|
-
WHERE pattern_id = ?
|
|
24
|
-
ORDER BY version ASC
|
|
25
|
-
`)),this.prepared.set("currentVersion",this.db.prepare(`
|
|
26
|
-
SELECT MAX(version) as max_version FROM pattern_deltas
|
|
27
|
-
WHERE pattern_id = ?
|
|
28
|
-
`)),this.prepared.set("incrementalSync",this.db.prepare(`
|
|
29
|
-
SELECT * FROM pattern_deltas
|
|
30
|
-
WHERE timestamp > ?
|
|
31
|
-
ORDER BY timestamp ASC
|
|
32
|
-
`)),this.prepared.set("countForPattern",this.db.prepare(`
|
|
33
|
-
SELECT COUNT(*) as cnt FROM pattern_deltas
|
|
34
|
-
WHERE pattern_id = ?
|
|
35
|
-
`)),this.prepared.set("deleteOldest",this.db.prepare(`
|
|
36
|
-
DELETE FROM pattern_deltas
|
|
37
|
-
WHERE pattern_id = ? AND version IN (
|
|
38
|
-
SELECT version FROM pattern_deltas
|
|
39
|
-
WHERE pattern_id = ?
|
|
40
|
-
ORDER BY version ASC
|
|
41
|
-
LIMIT ?
|
|
42
|
-
)
|
|
43
|
-
`))}ensureInitialized(){if(!this.initialized)throw new Error("DeltaTracker not initialized. Call initialize() first.")}createGenesis(e,t,r){this.ensureInitialized();let i=this.getCurrentVersion(e);if(i>=0)throw new Error(`Genesis already exists for pattern ${e} (current version: ${i})`);let s={id:C(),patternId:e,version:0,timestamp:Date.now(),type:"genesis",patch:[],reversePatch:[],metadata:{...r,snapshot:t}};return this.insertEvent(s),s}recordDelta(e,t,r,i){this.ensureInitialized();let s=this.getCurrentVersion(e);if(s<0)throw new Error(`No genesis found for pattern ${e}. Call createGenesis() first.`);let{forward:a,reverse:c}=Je(t,r),u={id:C(),patternId:e,version:s+1,timestamp:Date.now(),type:"update",patch:a,reversePatch:c,metadata:i};return this.insertEvent(u),this.enforceRetention(e),u}rollback(e,t){this.ensureInitialized();let r=this.getHistory(e);if(r.length===0)throw new Error(`No history found for pattern ${e}`);let i=r[r.length-1].version;if(t<0||t>i)throw new Error(`Invalid rollback version ${t}. Valid range: 0-${i}`);if(t===i)return this.reconstructState(r,i);let s=this.reconstructState(r,t),a=this.reconstructState(r,i),{forward:c,reverse:u}=Je(a,s),o={id:C(),patternId:e,version:i+1,timestamp:Date.now(),type:"rollback",patch:c,reversePatch:u,metadata:{rolledBackTo:t}};return this.insertEvent(o),this.enforceRetention(e),s}getHistory(e){return this.ensureInitialized(),this.prepared.get("getHistory").all(e).map(Be)}incrementalSync(e){return this.ensureInitialized(),this.prepared.get("incrementalSync").all(e).map(Be)}getCurrentVersion(e){return this.ensureInitialized(),this.prepared.get("currentVersion").get(e).max_version??-1}insertEvent(e){this.prepared.get("insert").run(e.id,e.patternId,e.version,e.timestamp,e.type,JSON.stringify(e.patch),JSON.stringify(e.reversePatch),e.metadata?JSON.stringify(e.metadata):null)}reconstructState(e,t){let r=e.find(s=>s.type==="genesis");if(!r||!r.metadata?.snapshot)throw new Error("Cannot reconstruct state: no genesis snapshot found");let i=JSON.parse(JSON.stringify(r.metadata.snapshot));for(let s of e)if(s.version!==0){if(s.version>t)break;i=_t(i,s.patch)}return i}enforceRetention(e){let{maxVersionsPerPattern:t}=this.config,i=this.prepared.get("countForPattern").get(e).cnt;if(i>t){let s=i-t;this.db.prepare(`DELETE FROM pattern_deltas
|
|
44
|
-
WHERE pattern_id = ? AND version != 0 AND id IN (
|
|
45
|
-
SELECT id FROM pattern_deltas
|
|
46
|
-
WHERE pattern_id = ? AND version != 0
|
|
47
|
-
ORDER BY version ASC
|
|
48
|
-
LIMIT ?
|
|
49
|
-
)`).run(e,e,s)}}};F();var Nt={maxHistoryPerPattern:50,snapshotInterval:10,batchSize:20,epsilon:1e-7},me=class{config;history=new Map;snapshots=new Map;versions=new Map;buffer=[];constructor(e){this.config={...Nt,...e}}recordGenesis(e,t,r){if(this.versions.has(e))throw new Error(`Genesis already exists for pattern ${e} (version ${this.versions.get(e)})`);let i=this.computeSparseChanges(new Array(t.length).fill(0),t),s={patternId:e,version:0,timestamp:Date.now(),deltaType:"genesis",sparseChanges:i,metadata:r,compressedSize:i.length},a={patternId:e,version:0,fullVector:[...t],timestamp:s.timestamp};return this.versions.set(e,0),this.getOrCreate(this.history,e).push(s),this.getOrCreate(this.snapshots,e).push(a),this.buffer.push(s),s}recordDelta(e,t,r,i){let s=this.versions.get(e);if(s===void 0)throw new Error(`No genesis found for pattern ${e}. Call recordGenesis() first.`);let a=s+1,c=this.computeSparseChanges(t,r),u={patternId:e,version:a,timestamp:Date.now(),deltaType:"update",sparseChanges:c,metadata:i,compressedSize:c.length};return this.versions.set(e,a),this.getOrCreate(this.history,e).push(u),this.buffer.push(u),a%this.config.snapshotInterval===0&&this.getOrCreate(this.snapshots,e).push({patternId:e,version:a,fullVector:[...r],timestamp:u.timestamp}),this.enforceRetention(e),u}getHistory(e,t){let r=this.history.get(e);if(!r||r.length===0)return[];let i=[...r].reverse();return t!==void 0&&t>0?i.slice(0,t):i}rollback(e,t){let r=this.reconstructAtVersion(e,t);return r===null?null:{patternId:e,version:t,fullVector:r,timestamp:Date.now()}}getVersion(e){return this.versions.get(e)??-1}reconstructAtVersion(e,t){let r=this.history.get(e);if(!r||r.length===0)return null;let i=this.versions.get(e);if(t<0||t>i)return null;let s=this.snapshots.get(e)||[],a=null;for(let o=s.length-1;o>=0;o--)if(s[o].version<=t){a=s[o];break}if(!a)return null;let c=[...a.fullVector],u=a.version+1;for(let o of r)if(!(o.version<u)){if(o.version>t)break;this.applySparseForward(c,o.sparseChanges)}return c}pruneHistory(e,t){let r=t??this.config.maxHistoryPerPattern,i=this.history.get(e);if(!i||i.length<=r)return 0;let s=i.length-r,a=i.slice(0,s),c=i.slice(s),u=a.findIndex(h=>h.deltaType==="genesis");u>=0&&(c.unshift(a[u]),a.splice(u,1)),this.history.set(e,c);let o=c[0]?.version??0,l=this.snapshots.get(e);return l&&this.snapshots.set(e,l.filter(h=>h.version===0||h.version>=o)),a.length}getStats(){let e=0;for(let r of this.history.values())e+=r.length;let t=this.history.size;return{totalPatterns:t,totalDeltas:e,avgDeltasPerPattern:t>0?e/t:0}}flush(){let e=[...this.buffer];return this.buffer.length=0,e}getBufferSize(){return this.buffer.length}clear(){this.history.clear(),this.snapshots.clear(),this.versions.clear(),this.buffer.length=0}computeSparseChanges(e,t){let r=[],i=Math.max(e.length,t.length);for(let s=0;s<i;s++){let a=s<e.length?e[s]:0,c=s<t.length?t[s]:0;Math.abs(a-c)>this.config.epsilon&&r.push({index:s,oldValue:a,newValue:c})}return r}applySparseForward(e,t){for(let r of t){for(;e.length<=r.index;)e.push(0);e[r.index]=r.newValue}}enforceRetention(e){this.pruneHistory(e,this.config.maxHistoryPerPattern)}getOrCreate(e,t){let r=e.get(t);return r||(r=[],e.set(t,r)),r}};function je(n){return H()?new me(n):null}F();var Ht=128,Mt=8,Lt=1e4,ge=class{dimension;beta;maxPatterns;patterns;constructor(e){if(this.dimension=e?.dimension??Ht,this.beta=e?.beta??Mt,this.maxPatterns=e?.maxPatterns??Lt,this.patterns=[],this.dimension<=0)throw new Error(`Hopfield dimension must be positive, got ${this.dimension}`);if(this.beta<=0)throw new Error(`Hopfield beta must be positive, got ${this.beta}`);if(this.maxPatterns<=0)throw new Error(`Hopfield maxPatterns must be positive, got ${this.maxPatterns}`)}store(e,t){if(this.assertEnabled(),e.length!==this.dimension)throw new Error(`Pattern dimension mismatch: expected ${this.dimension}, got ${e.length}`);if(this.dotProduct(e,e)===0)throw new Error("Cannot store zero-magnitude pattern in Hopfield memory");let i=this.normalize(e);this.patterns.length>=this.maxPatterns&&this.patterns.shift(),this.patterns.push({pattern:i,metadata:t??{},storedAt:Date.now()})}recall(e){if(this.assertEnabled(),e.length!==this.dimension)throw new Error(`Query dimension mismatch: expected ${this.dimension}, got ${e.length}`);if(this.patterns.length===0)return null;let t=this.normalize(e),r=new Float32Array(this.patterns.length);for(let l=0;l<this.patterns.length;l++)r[l]=this.beta*this.dotProduct(this.patterns[l].pattern,t);let i=this.softmax(r),s=0,a=i[0];for(let l=1;l<i.length;l++)i[l]>a&&(a=i[l],s=l);let c=this.patterns[s],u=this.getEnergy(t),o=this.cosineSimilarity(t,c.pattern);return{pattern:new Float32Array(c.pattern),metadata:{...c.metadata},energy:u,similarity:o}}batchRecall(e){return this.assertEnabled(),e.map(t=>this.recall(t))}getPatternCount(){return this.patterns.length}clear(){this.patterns.length=0}getEnergy(e){if(e.length!==this.dimension)throw new Error(`State dimension mismatch: expected ${this.dimension}, got ${e.length}`);let t=this.normalize(e);if(this.patterns.length===0)return .5*this.dotProduct(t,t);let r=new Float32Array(this.patterns.length);for(let o=0;o<this.patterns.length;o++)r[o]=this.dotProduct(this.patterns[o].pattern,t);let i=new Float32Array(this.patterns.length),s=-1/0;for(let o=0;o<this.patterns.length;o++)i[o]=this.beta*r[o],i[o]>s&&(s=i[o]);let a=0;for(let o=0;o<this.patterns.length;o++)a+=Math.exp(i[o]-s);let c=1/this.beta*(s+Math.log(a)),u=this.dotProduct(t,t);return-c+.5*u}softmax(e){let t=new Float32Array(e.length),r=-1/0;for(let s=0;s<e.length;s++)e[s]>r&&(r=e[s]);let i=0;for(let s=0;s<e.length;s++)t[s]=Math.exp(e[s]-r),i+=t[s];if(i>0)for(let s=0;s<t.length;s++)t[s]/=i;return t}dotProduct(e,t){let r=0;for(let i=0;i<e.length;i++)r+=e[i]*t[i];return r}cosineSimilarity(e,t){let r=this.dotProduct(e,t),i=Math.sqrt(this.dotProduct(e,e)),s=Math.sqrt(this.dotProduct(t,t));return i===0||s===0?0:r/(i*s)}normalize(e){let t=Math.sqrt(this.dotProduct(e,e)),r=new Float32Array(e.length);if(t>0)for(let i=0;i<e.length;i++)r[i]=e[i]/t;return r}assertEnabled(){if(!D().useHopfieldMemory)throw new Error("Hopfield memory is disabled (useHopfieldMemory feature flag is false)")}};function We(n){return new ge(n)}F();var kt={dimensions:32,curvature:-1,maxElements:1e4,efConstruction:200,M:16},_=1e-5,Xe=1-_;function Ut(n,e){let t=0;for(let r=0;r<n.length;r++)t+=n[r]*e[r];return t}function A(n){let e=0;for(let t=0;t<n.length;t++)e+=n[t]*n[t];return e}function qt(n,e){let t=new Float32Array(n.length);for(let r=0;r<n.length;r++)t[r]=n[r]-e[r];return t}var T=class n{static poincareDistance(e,t){let r=A(qt(e,t)),i=Math.max(_,1-A(e)),s=Math.max(_,1-A(t));return Math.acosh(Math.max(1,1+2*r/(i*s)))}static mobiusAdd(e,t){let r=Ut(e,t),i=A(e),s=A(t),a=Math.max(_,1+2*r+i*s),c=1+2*r+s,u=1-i,o=new Float32Array(e.length);for(let l=0;l<e.length;l++)o[l]=(c*e[l]+u*t[l])/a;return n.project(o)}static expMap(e,t){let r=2/Math.max(_,1-A(e)),i=Math.sqrt(A(t));if(i<_)return new Float32Array(e);let s=Math.tanh(r*i/2),a=new Float32Array(t.length);for(let c=0;c<t.length;c++)a[c]=s/i*t[c];return n.mobiusAdd(e,a)}static project(e){let t=Math.sqrt(A(e));if(t<=Xe)return new Float32Array(e);let r=Xe/t,i=new Float32Array(e.length);for(let s=0;s<e.length;s++)i[s]=e[s]*r;return i}static euclideanToHyperbolic(e){let t=Math.sqrt(A(e));if(t<_)return new Float32Array(e.length);let r=Math.tanh(t)/t,i=new Float32Array(e.length);for(let s=0;s<e.length;s++)i[s]=e[s]*r;return n.project(i)}},ye=class{config;points=new Map;constructor(e){if(this.config={...kt,...e},this.config.dimensions<=0)throw new Error(`dimensions must be positive, got ${this.config.dimensions}`);if(this.config.curvature>=0)throw new Error(`curvature must be negative for hyperbolic space, got ${this.config.curvature}`);if(this.config.maxElements<=0)throw new Error(`maxElements must be positive, got ${this.config.maxElements}`)}insert(e,t,r){if(t.length!==this.config.dimensions)throw new Error(`Dimension mismatch: expected ${this.config.dimensions}, got ${t.length}`);if(this.points.size>=this.config.maxElements)throw new Error(`Maximum elements (${this.config.maxElements}) reached`);this.points.set(e,{id:e,coordinates:T.project(t),metadata:r?{...r}:void 0})}search(e,t){if(e.length!==this.config.dimensions)throw new Error(`Query dimension mismatch: expected ${this.config.dimensions}, got ${e.length}`);let r=T.project(e),i=[];for(let s of this.points.values())i.push({id:s.id,distance:T.poincareDistance(r,s.coordinates),point:s});return i.sort((s,a)=>s.distance-a.distance),i.slice(0,Math.max(0,t))}embedHierarchy(e){let t=new Map;if(e.length===0)return t;let r=this.config.dimensions,i=new Map,s=new Map,a=[];for(let u of e)if(s.set(u.id,u),!u.parentId)a.push(u.id);else{let o=i.get(u.parentId);o||(o=[],i.set(u.parentId,o)),o.push(u.id)}let c=a.map((u,o)=>({id:u,depth:0,angOff:2*Math.PI*o/Math.max(1,a.length),angSpan:2*Math.PI/Math.max(1,a.length)}));for(;c.length>0;){let{id:u,depth:o,angOff:l,angSpan:h}=c.shift(),d=Math.tanh(.3*(o+.1)),f=l+h/2,p=new Float32Array(r);p[0]=d*Math.cos(f),p[1]=d*Math.sin(f);let m=s.get(u);if(m&&m.features.length>0){let N=d*.1;for(let x=2;x<r&&x-2<m.features.length;x++)p[x]=m.features[x-2]*N}let E=T.project(p);t.set(u,E),this.points.set(u,{id:u,coordinates:E,metadata:{depth:o,parentId:m?.parentId}});let R=i.get(u)??[];for(let N=0;N<R.length;N++){let x=h/Math.max(1,R.length);c.push({id:R[N],depth:o+1,angOff:l+N*x,angSpan:x})}}return t}getStats(){return{elementCount:this.points.size,dimensions:this.config.dimensions,curvature:this.config.curvature}}};function Ge(n){return Qt()?new ye(n):null}function Qt(){return D().useHyperbolicHnsw}F();var ve=class{index=null;initialized=!1;config;constructor(e){this.config=e??{}}ensureInitialized(){if(this.initialized)return this.index!==null;if(this.initialized=!0,!M())return!1;try{return this.index=Ge(this.config),this.index!==null}catch(e){return console.warn("[HyperbolicPatternIndex] Failed to create HyperbolicHNSW:",e instanceof Error?e.message:e),this.index=null,!1}}get isAvailable(){return this.index!==null}indexPattern(e,t,r){if(!(!this.ensureInitialized()||!this.index))try{let i=t instanceof Float32Array?t:new Float32Array(t),s=T.euclideanToHyperbolic(i);this.index.insert(e,s,r)}catch(i){console.debug(`[HyperbolicPatternIndex] Failed to index pattern ${e}:`,i instanceof Error?i.message:i)}}search(e,t){if(!this.ensureInitialized()||!this.index)return[];try{let r=e instanceof Float32Array?e:new Float32Array(e),i=T.euclideanToHyperbolic(r);return this.index.search(i,t).map(a=>({patternId:a.id,distance:a.distance,metadata:a.point.metadata}))}catch(r){return console.warn("[HyperbolicPatternIndex] Search failed:",r instanceof Error?r.message:r),[]}}getStats(){return this.index?this.index.getStats():null}reset(){this.index=null,this.initialized=!1}};function Ve(n){return new ve(n)}var we=null;function Ye(){return we||(we=Me({dimensions:1e4})),we}var Pe;function zt(){return Pe===void 0&&(Pe=Le()),Pe}var U=null,Se=0;function Ke(n){return(!U||Se!==n)&&(U=We({dimension:n,maxPatterns:1e4}),Se=n),U}var X={namespace:"qe-patterns",embeddingDimension:384,hnsw:{M:16,efConstruction:200,efSearch:100,maxElements:5e4},promotionThreshold:j,minConfidence:.3,maxPatternsPerDomain:5e3,autoCleanup:!0,cleanupIntervalMs:36e5,tokenTracking:{enabled:!0,trackInputOutput:!0,estimateCosts:!0,costPerInputToken:3e-6,costPerOutputToken:15e-6},reuseOptimization:{enabled:!0,minSimilarityForReuse:.85,minSuccessRateForReuse:.9,maxAgeForReuse:7}},be=class{constructor(e,t={}){this.memory=e;this.config={...X,...t}}memory;config;initialized=!1;cleanupTimer;sqliteStore=null;loadingPromise=null;patternCache=new Map;domainIndex=new Map;typeIndex=new Map;tierIndex=new Map;hnswIndex=null;hnswAvailable=!1;hnswInitPromise=null;hdcCache=new Map;hdcTokenCache=new Map;deltaTracker=null;vectorDeltaTracker=void 0;hyperbolicIndex=null;stats={searchOperations:0,searchLatencies:[]};setSqliteStore(e){if(this.sqliteStore=e,H()&&!this.deltaTracker)try{let t=e.getDb();this.deltaTracker=new ee(t),this.deltaTracker.initialize(),console.log("[PatternStore] Delta event sourcing initialized")}catch(t){console.warn("[PatternStore] Delta tracker init failed:",t instanceof Error?t.message:t)}this.initialized&&(this.loadingPromise=this.loadPatterns().catch(t=>console.warn("[PatternStore] Failed to load patterns after setSqliteStore:",t)).finally(()=>{this.loadingPromise=null}))}async initialize(){this.initialized||(this.tierIndex.set("short-term",new Set),this.tierIndex.set("long-term",new Set),await this.loadPatterns(),this.config.autoCleanup&&(this.cleanupTimer=setInterval(()=>this.cleanup(),this.config.cleanupIntervalMs)),this.initialized=!0)}async ensureHNSW(){return this.hnswIndex!==null?this.hnswIndex:this.hnswAvailable===!1&&this.hnswInitPromise===null&&!(this.hnswIndex===null&&this.hnswAvailable===!1)?null:this.hnswInitPromise?(await this.hnswInitPromise,this.hnswIndex):(this.hnswInitPromise=this.initializeHNSWInternal(),await this.hnswInitPromise,this.hnswInitPromise=null,this.hnswIndex)}async initializeHNSWInternal(){try{if(D().useUnifiedHnsw)try{let{HnswLegacyBridge:a}=await import("./hnsw-legacy-bridge-GPZIKYFD.js"),{HnswAdapter:c}=await import("./hnsw-adapter-W7G6VNXW.js"),u=new c("patterns",{dimensions:this.config.embeddingDimension,M:this.config.hnsw.M,efConstruction:this.config.hnsw.efConstruction,efSearch:this.config.hnsw.efSearch,metric:"cosine"});this.hnswIndex=new a(u),this.hnswAvailable=!0,console.log("[PatternStore] Using unified HNSW via HnswLegacyBridge (ADR-071)"),await this.loadEmbeddingsIntoHNSW();return}catch(a){console.warn("[PatternStore] Unified HNSW bridge failed, falling back:",a)}let{HNSWIndex:t}=await import("./hnsw-index-LENA5QML.js");this.hnswIndex=new t(this.memory,{dimensions:this.config.embeddingDimension,M:this.config.hnsw.M,efConstruction:this.config.hnsw.efConstruction,efSearch:this.config.hnsw.efSearch,maxElements:this.config.hnsw.maxElements,namespace:`${this.config.namespace}:hnsw`,metric:"cosine"});let r=5e3,i=this.hnswIndex.initialize(),s=new Promise((a,c)=>setTimeout(()=>c(new Error("HNSW init timeout")),r));await Promise.race([i,s]),this.hnswAvailable=this.hnswIndex.isNativeAvailable(),await this.loadEmbeddingsIntoHNSW(),console.log(`[PatternStore] HNSW lazy-initialized (native: ${this.hnswAvailable})`)}catch(e){console.warn("[PatternStore] HNSW not available, using memory backend search:",y(e)),this.hnswIndex=null,this.hnswAvailable=!1}}async loadEmbeddingsIntoHNSW(){if(!(!this.hnswIndex||!this.sqliteStore))try{let e=this.sqliteStore.getAllEmbeddings(),t=this.config.hnsw.maxElements,r=0,i=0;for(let{patternId:s,embedding:a}of e){if(r>=t)break;if(!a||a.length!==this.config.embeddingDimension){i++;continue}let c=this.patternCache.get(s);if(!c){i++;continue}try{await this.hnswIndex.insert(s,a,{filePath:c.patternType,lineCoverage:c.confidence*100,branchCoverage:c.qualityScore*100,functionCoverage:0,statementCoverage:0,uncoveredLineCount:0,uncoveredBranchCount:0,riskScore:1-c.confidence,lastUpdated:Date.now(),totalLines:0}),r++}catch{i++}}r>0&&console.log(`[PatternStore] Loaded ${r} embeddings into HNSW (skipped ${i})`)}catch(e){console.warn("[PatternStore] Failed to load SQLite embeddings into HNSW:",y(e))}}getVectorDeltaTracker(){return this.vectorDeltaTracker===void 0&&(this.vectorDeltaTracker=je()),this.vectorDeltaTracker}async loadPatterns(){if(this.sqliteStore)try{let e=this.sqliteStore.getPatterns({limit:5e4});for(let t of e)this.indexPattern(t);e.length>0&&console.log(`[PatternStore] Loaded ${e.length} patterns from SQLite into memory cache`)}catch(e){console.warn("[PatternStore] Failed to load patterns from SQLite:",y(e))}}indexPattern(e){this.patternCache.set(e.id,e),this.domainIndex.has(e.qeDomain)||this.domainIndex.set(e.qeDomain,new Set),this.domainIndex.get(e.qeDomain).add(e.id),this.typeIndex.has(e.patternType)||this.typeIndex.set(e.patternType,new Set),this.typeIndex.get(e.patternType).add(e.id);let t=e.tier==="long-term"?"long-term":"short-term";e.tier!==t&&(e.tier=t),this.tierIndex.get(t).add(e.id)}unindexPattern(e){this.patternCache.delete(e.id),this.domainIndex.get(e.qeDomain)?.delete(e.id),this.typeIndex.get(e.patternType)?.delete(e.id),this.tierIndex.get(e.tier)?.delete(e.id),this.hdcCache.delete(e.id),this.hdcTokenCache.delete(e.id)}async store(e){this.initialized||await this.initialize(),this.loadingPromise&&await this.loadingPromise;let t=W(e);if(!t.valid)return w(new Error(`Invalid pattern: ${t.errors.join(", ")}`));if(e.confidence<this.config.minConfidence)return w(new Error(`Pattern confidence ${e.confidence} below threshold ${this.config.minConfidence}`));(this.domainIndex.get(e.qeDomain)?.size||0)>=this.config.maxPatternsPerDomain&&await this.cleanupDomain(e.qeDomain);let i=this.patternCache.get(e.id)??null;if(this.indexPattern(e),this.sqliteStore)try{this.sqliteStore.storePattern(e,e.embedding)}catch(s){console.warn(`[PatternStore] SQLite persist failed for ${e.id}:`,y(s))}if(e.embedding){let s=await this.ensureHNSW();if(s)try{await s.insert(e.id,e.embedding,{filePath:e.patternType,lineCoverage:e.confidence*100,branchCoverage:e.qualityScore*100,functionCoverage:0,statementCoverage:0,uncoveredLineCount:0,uncoveredBranchCount:0,riskScore:1-e.confidence,lastUpdated:Date.now(),totalLines:0})}catch(a){console.warn(`[PatternStore] Failed to index embedding for ${e.id}:`,a)}}if(q())try{let a=Ye().fingerprint({id:e.id,domain:e.qeDomain,type:e.patternType,content:e.description});this.hdcCache.set(e.id,a.vector)}catch(s){console.debug(`[PatternStore] HDC fingerprint failed for ${e.id}:`,y(s))}try{let s=zt();if(s){let a=[e.patternType,e.qeDomain];e.context?.tags&&a.push(...e.context.tags),e.name&&a.push(e.name);let c=s.fingerprintPattern(a);this.hdcTokenCache.set(e.id,c)}}catch(s){console.debug(`[PatternStore] HDC token fingerprint failed for ${e.id}:`,y(s))}if(te()&&e.embedding)try{Ke(e.embedding.length).store(new Float32Array(e.embedding),{id:e.id,name:e.name,domain:e.qeDomain})}catch(s){console.debug(`[PatternStore] Hopfield store failed for ${e.id}:`,y(s))}if(H()&&this.deltaTracker)try{let s={id:e.id,name:e.name,confidence:e.confidence,qualityScore:e.qualityScore,usageCount:e.usageCount,successRate:e.successRate,tier:e.tier};this.deltaTracker.createGenesis(e.id,s)}catch(s){console.debug(`[PatternStore] Delta genesis for ${e.id}:`,y(s))}if(e.embedding)try{let s=this.getVectorDeltaTracker();s&&(i?.embedding?s.recordDelta(e.id,i.embedding,e.embedding):s.getVersion(e.id)<0&&s.recordGenesis(e.id,e.embedding))}catch(s){console.debug(`[PatternStore] VectorDeltaTracker for ${e.id}:`,y(s))}try{M()&&e.embedding&&this.indexHyperbolic(e.id,e.embedding,{domain:e.qeDomain,type:e.patternType,name:e.name})}catch{}return v(e.id)}async create(e){let t=new Date,r=e.qeDomain||this.detectDomainFromType(e.patternType),i={id:C(),patternType:e.patternType,qeDomain:r,domain:r,name:e.name,description:e.description,confidence:e.confidence??.5,usageCount:0,successRate:0,qualityScore:.25,context:{...e.context,tags:e.context?.tags||[]},template:{...e.template,example:void 0},embedding:e.embedding,tier:"short-term",createdAt:t,lastUsedAt:t,successfulUses:0,reusable:!1,reuseCount:0,averageTokenSavings:0},s=await this.store(i);return s.success?v(i):w(s.error)}detectDomainFromType(e){return{"test-template":"test-generation","assertion-pattern":"test-generation","mock-pattern":"test-generation","coverage-strategy":"coverage-analysis","mutation-strategy":"test-generation","api-contract":"contract-testing","visual-baseline":"visual-accessibility","a11y-check":"visual-accessibility","perf-benchmark":"chaos-resilience","flaky-fix":"test-execution","refactor-safe":"code-intelligence","error-handling":"test-generation","meta-optimization":"learning-optimization"}[e]||"test-generation"}async get(e){return this.initialized||await this.initialize(),this.loadingPromise&&await this.loadingPromise,this.patternCache.get(e)??null}async search(e,t={}){this.initialized||await this.initialize(),this.loadingPromise&&await this.loadingPromise;let r=performance.now(),i=t.limit||10,s=[];try{if(Array.isArray(e)&&te())try{let h=Ke(e.length);if(h.getPatternCount()>0){let d=h.recall(new Float32Array(e));if(d&&d.similarity>.98){let f=d.metadata.id,p=await this.get(f);if(p&&this.matchesFilters(p,t)){let m=this.calculateReuseInfo(p,d.similarity);s.push({pattern:p,score:d.similarity,matchType:"vector",similarity:d.similarity,canReuse:m.canReuse,estimatedTokenSavings:m.estimatedTokenSavings,reuseConfidence:m.reuseConfidence})}}}}catch(h){console.debug("[PatternStore] Hopfield recall failed:",y(h))}if(Array.isArray(e)&&t.useVectorSearch!==!1){let h=await this.ensureHNSW();if(h){let d=await h.search(e,i*2);for(let f of d){let p=await this.get(f.key);if(p&&this.matchesFilters(p,t)){let m=this.calculateReuseInfo(p,f.score);s.push({pattern:p,score:f.score,matchType:"vector",similarity:f.score,canReuse:m.canReuse,estimatedTokenSavings:m.estimatedTokenSavings,reuseConfidence:m.reuseConfidence})}}}}if(typeof e=="string"&&e.trim()&&this.sqliteStore)try{let h=this.sqliteStore.searchFTS(e,i*2);if(h.length>0){let d=new Map(h.map(p=>[p.id,p.ftsScore])),f=new Set(s.map(p=>p.pattern.id));for(let p of s){let m=d.get(p.pattern.id);m!==void 0&&(p.score=.75*p.score+.25*m)}for(let p of h){if(f.has(p.id))continue;let m=await this.get(p.id);if(m&&this.matchesFilters(m,t)){let E=this.calculateReuseInfo(m,p.ftsScore);s.push({pattern:m,score:.5*p.ftsScore,matchType:"exact",similarity:p.ftsScore,canReuse:E.canReuse,estimatedTokenSavings:E.estimatedTokenSavings,reuseConfidence:E.reuseConfidence})}}}}catch{}if(typeof e=="string"||s.length<i){let h=await this.searchByText(typeof e=="string"?e:"",t,i-s.length),d=new Set(s.map(f=>f.pattern.id));for(let f of h)d.has(f.pattern.id)||s.push(f)}let a=720*60*60*1e3,c=Date.now();for(let h of s){let d=h.pattern.lastUsedAt?.getTime()??h.pattern.createdAt.getTime(),f=c-d,p=Math.pow(.5,f/a),m=h.pattern.usageCount>0?p:.5;h.score=h.score*(.7+.3*m)}s.sort((h,d)=>d.score-h.score);let u=s;t.filter&&(u=Oe(s,t.filter));let o=u.slice(0,i),l=performance.now()-r;return this.recordSearchLatency(l),v(o)}catch(a){return w(Ae(a))}}async searchByText(e,t,r){let i=[],s=e.toLowerCase(),a;t.domain?a=this.domainIndex.get(t.domain)||new Set:t.patternType?a=this.typeIndex.get(t.patternType)||new Set:t.tier?a=this.tierIndex.get(t.tier)||new Set:a=new Set(this.patternCache.keys());let c=[...a];if(q()&&s&&this.hdcCache.size>0)try{let u=Ye(),o=u.fingerprint({id:"query",domain:t.domain??"unknown",type:t.patternType??"unknown",content:e}),l=c.filter(f=>this.hdcCache.has(f)).map(f=>({id:f,similarity:u.similarity(o.vector,this.hdcCache.get(f))}));l.sort((f,p)=>p.similarity-f.similarity);let h=l.map(f=>f.id),d=c.filter(f=>!this.hdcCache.has(f));c=[...h,...d]}catch{}for(let u of c){if(i.length>=r)break;let o=this.patternCache.get(u);if(!o||!this.matchesFilters(o,t))continue;let l=0;if(s){let h=o.name.toLowerCase(),d=o.description.toLowerCase();h.includes(s)&&(l+=.5),d.includes(s)&&(s.length/d.length>.3?l+=.5:l+=.3);for(let f of o.context.tags)if(f.toLowerCase().includes(s)){l+=.2;break}l=Math.min(l,1)}else l=o.qualityScore;if(l>0||!s){let h=this.calculateReuseInfo(o,l);i.push({pattern:o,score:l||o.qualityScore,matchType:s?"exact":"context",similarity:l||o.qualityScore,canReuse:h.canReuse,estimatedTokenSavings:h.estimatedTokenSavings,reuseConfidence:h.reuseConfidence})}}return i}calculateReuseInfo(e,t){let{reuseOptimization:r}=this.config,i=t>=r.minSimilarityForReuse,s=e.successRate>=r.minSuccessRateForReuse,a=e.lastUsedAt instanceof Date?e.lastUsedAt.getTime():new Date(e.lastUsedAt).getTime(),u=(Date.now()-a)/(1e3*60*60*24)<=r.maxAgeForReuse,o=r.enabled&&e.reusable&&i&&s&&u,l=o?e.averageTokenSavings>0?e.averageTokenSavings:e.tokensUsed||0:0,h=t,d=e.successRate,f=Math.min(e.reuseCount/10,1),p=o?h*.4+d*.4+f*.2:0;return{canReuse:o,estimatedTokenSavings:l,reuseConfidence:p}}matchesFilters(e,t){if(t.patternType&&e.patternType!==t.patternType||t.domain&&e.qeDomain!==t.domain||t.tier&&e.tier!==t.tier||t.minConfidence!==void 0&&e.confidence<t.minConfidence||t.minQualityScore!==void 0&&e.qualityScore<t.minQualityScore)return!1;if(t.context){let r=t.context;if(r.language&&e.context.language!==r.language||r.framework&&e.context.framework!==r.framework||r.testType&&e.context.testType!==r.testType)return!1}return!0}async recordUsage(e,t){let r=await this.get(e);if(!r)return w(new Error(`Pattern not found: ${e}`));let i=new Date,s=r.usageCount+1,a=r.successfulUses+(t?1:0),c=a/s,u=t?.02:-.01,o=Math.max(.1,Math.min(1,r.confidence+u)),l=B({confidence:o,usageCount:s,successRate:c}),h={...r,usageCount:s,successfulUses:a,successRate:c,confidence:o,qualityScore:l,lastUsedAt:i};if(this.sqliteStore)try{this.sqliteStore.recordUsage(e,t)}catch(p){console.warn(`[PatternStore] SQLite recordUsage failed for ${e}:`,y(p))}if(H()&&this.deltaTracker)try{let p={id:r.id,name:r.name,confidence:r.confidence,qualityScore:r.qualityScore,usageCount:r.usageCount,successRate:r.successRate,tier:r.tier},m={id:h.id,name:h.name,confidence:h.confidence,qualityScore:h.qualityScore,usageCount:h.usageCount,successRate:h.successRate,tier:h.tier};this.deltaTracker.recordDelta(e,p,m,{success:t})}catch(p){console.debug(`[PatternStore] Delta recordDelta for ${e}:`,y(p))}let d=re(h);return d.meetsUsageCriteria&&d.meetsQualityCriteria&&d.meetsCoherenceCriteria&&h.tier==="short-term"?await this.promote(e):this.patternCache.set(e,h),v(void 0)}async promote(e){let t=await this.get(e);if(!t)return w(new Error(`Pattern not found: ${e}`));if(t.tier==="long-term")return v(void 0);let r={...t,tier:"long-term",confidence:Math.min(1,t.confidence+.1)};if(this.tierIndex.get("short-term")?.delete(e),this.tierIndex.get("long-term")?.add(e),this.patternCache.set(e,r),this.sqliteStore)try{this.sqliteStore.promotePattern(e)}catch(i){console.debug("[PatternStore] SQLite promotion error:",i instanceof Error?i.message:i)}return console.log(`[PatternStore] Promoted pattern ${e} (${t.name}) to long-term storage`),v(void 0)}async delete(e){let t=this.patternCache.get(e);if(!t)return w(new Error(`Pattern not found: ${e}`));if(this.unindexPattern(t),this.sqliteStore)try{this.sqliteStore.deletePattern(e)}catch(r){console.debug("[PatternStore] SQLite deletion error:",r instanceof Error?r.message:r)}if(this.hnswIndex!==null)try{await this.hnswIndex.delete(e)}catch(r){console.debug("[PatternStore] HNSW deletion error:",r instanceof Error?r.message:r)}return v(void 0)}async getStats(){let e={},t={};for(let[o,l]of this.domainIndex)e[o]=l.size;for(let[o,l]of this.typeIndex)t[o]=l.size;let r=0,i=0,s=0,a=0;for(let o of this.patternCache.values())r+=o.confidence,i+=o.qualityScore,s+=o.successRate,a++;let c=await this.ensureHNSW(),u=c!==null?await c.getStats():{nativeHNSW:!1,vectorCount:0,indexSizeBytes:0,lazyLoaded:!0};return{totalPatterns:this.patternCache.size,byTier:{shortTerm:this.tierIndex.get("short-term")?.size||0,longTerm:this.tierIndex.get("long-term")?.size||0},byDomain:e,byType:t,avgConfidence:a>0?r/a:0,avgQualityScore:a>0?i/a:0,avgSuccessRate:a>0?s/a:0,searchOperations:this.stats.searchOperations,avgSearchLatencyMs:this.calculateAvgLatency(),hnswStats:{nativeAvailable:u.nativeHNSW,vectorCount:u.vectorCount,indexSizeBytes:u.indexSizeBytes}}}async cleanup(){let e=0,t=0,r=[],i=[];for(let s of this.patternCache.values()){let a=re(s);if(a.meetsUsageCriteria&&a.meetsQualityCriteria&&a.meetsCoherenceCriteria){i.push(s.id);continue}if(s.tier==="short-term"){let u=s.createdAt instanceof Date?s.createdAt.getTime():new Date(s.createdAt).getTime(),o=Date.now()-u,l=o>10080*60*1e3,h=s.qualityScore<.2,d=s.usageCount===0&&o>1440*60*1e3;(l&&h||d)&&r.push(s.id)}}for(let s of i)(await this.promote(s)).success&&t++;for(let s of r)(await this.delete(s)).success&&e++;return console.log(`[PatternStore] Cleanup: removed ${e}, promoted ${t}`),{removed:e,promoted:t}}async cleanupDomain(e){let t=this.domainIndex.get(e);if(!t||t.size<this.config.maxPatternsPerDomain)return;let r=[];for(let a of t){let c=this.patternCache.get(a);c&&r.push(c)}r.sort((a,c)=>a.qualityScore-c.qualityScore);let i=Math.ceil(r.length*.1),s=0;for(let a of r){if(s>=i)break;a.tier==="short-term"&&(await this.delete(a.id),s++)}}recordSearchLatency(e){this.stats.searchOperations++,this.stats.searchLatencies.push(e),this.stats.searchLatencies.length>1e3&&(this.stats.searchLatencies=this.stats.searchLatencies.slice(-1e3))}calculateAvgLatency(){return this.stats.searchLatencies.length===0?0:this.stats.searchLatencies.reduce((t,r)=>t+r,0)/this.stats.searchLatencies.length}async dispose(){this.cleanupTimer&&(clearInterval(this.cleanupTimer),this.cleanupTimer=void 0),this.patternCache.clear(),this.domainIndex.clear(),this.typeIndex.clear(),this.tierIndex.clear(),this.hdcCache.clear(),this.deltaTracker=null,this.hyperbolicIndex&&(this.hyperbolicIndex.reset(),this.hyperbolicIndex=null),U&&(U.clear(),U=null,Se=0),this.initialized=!1}indexHyperbolic(e,t,r){if(M())try{this.hyperbolicIndex||(this.hyperbolicIndex=Ve({dimensions:this.config.embeddingDimension,maxElements:this.config.hnsw.maxElements})),this.hyperbolicIndex.indexPattern(e,t,r)}catch(i){console.debug(`[PatternStore] Hyperbolic indexing failed for ${e}:`,i instanceof Error?i.message:i)}}async searchHyperbolic(e,t=10){if(!M()||!this.hyperbolicIndex)return v([]);try{let r=this.hyperbolicIndex.search(e,t),i=[];for(let s of r){let a=await this.get(s.patternId);if(!a)continue;let c=Math.exp(-s.distance),u=this.calculateReuseInfo(a,c);i.push({pattern:a,score:c,matchType:"vector",similarity:c,canReuse:u.canReuse,estimatedTokenSavings:u.estimatedTokenSavings,reuseConfidence:u.reuseConfidence})}return v(i)}catch(r){return console.warn("[PatternStore] Hyperbolic search failed, returning empty results:",r instanceof Error?r.message:r),v([])}}};function qr(n,e){try{if(D().useRVFPatternStore&&De()){let{existsSync:r}=Ee("fs"),{join:i}=Ee("path"),s=process.env.AQE_PROJECT_ROOT??xe(),a=i(s,".agentic-qe"),c=i(a,"patterns.rvf");if(r(a)){let u={...X,...e},o=!1;try{let{getSharedRvfAdapter:l}=(nt(),Re(rt)),h=l(a,u.embeddingDimension);if(h){o=!0;let d=new Q(()=>h,{rvfPath:c,base:u,skipCloseOnDispose:!0});return console.log("[PatternStore] Using RVF-backed store (ADR-066)"),d}}catch{}if(!o){let l=new Q((h,d)=>{let{openRvfStore:f}=(Fe(),Re(tt)),p=()=>{try{return f(h)}catch{return null}},m=p();if(m){if(m.dimension()!==d){try{m.close()}catch{}throw new Error(`RVF dimension mismatch (file=${m.dimension()}, requested=${d})`)}return m}try{return Ce(h,d)}catch(E){if(m=p(),m&&m.dimension()===d)return m;throw E}},{rvfPath:c,base:u});return console.log("[PatternStore] Using RVF-backed store (ADR-066)"),l}}}}catch(t){console.warn("[PatternStore] RVF store unavailable, using in-memory HNSW:",t instanceof Error?t.message:t)}return new be(n,e)}export{qr as a};
|
|
50
|
-
/*! Bundled license information:
|
|
51
|
-
|
|
52
|
-
fast-json-patch/commonjs/helpers.js:
|
|
53
|
-
(*!
|
|
54
|
-
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
55
|
-
* (c) 2017-2022 Joachim Wester
|
|
56
|
-
* MIT licensed
|
|
57
|
-
*)
|
|
58
|
-
|
|
59
|
-
fast-json-patch/commonjs/duplex.js:
|
|
60
|
-
(*!
|
|
61
|
-
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
62
|
-
* (c) 2017-2021 Joachim Wester
|
|
63
|
-
* MIT license
|
|
64
|
-
*)
|
|
65
|
-
*/
|
|
@@ -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.10.5");process.exit(0)}
|
|
2
|
-
import{a as e,b as g,e as r}from"./chunk-VC256KH2.js";import{c as o}from"./chunk-S7HQOGVD.js";var L=o(()=>{"use strict";e();g();r()});export{L as a};
|