agentic-qe 3.2.3 → 3.3.1
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 +90 -0
- package/README.md +49 -7
- package/package.json +8 -2
- package/scripts/cloud-db-config.json +37 -0
- package/scripts/cloud-db-connect.sh +37 -0
- package/scripts/cloud-db-tunnel.sh +23 -0
- package/v3/CHANGELOG.md +253 -0
- package/v3/README.md +59 -1
- package/v3/assets/agents/v3/qe-accessibility-auditor.md +90 -0
- package/v3/dist/adapters/claude-flow/index.d.ts +54 -0
- package/v3/dist/adapters/claude-flow/index.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/index.js +79 -0
- package/v3/dist/adapters/claude-flow/index.js.map +1 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts +70 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.js +203 -0
- package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -0
- package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts +73 -0
- package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js +276 -0
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -0
- package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts +70 -0
- package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js +205 -0
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -0
- package/v3/dist/adapters/claude-flow/types.d.ts +99 -0
- package/v3/dist/adapters/claude-flow/types.d.ts.map +1 -0
- package/v3/dist/adapters/claude-flow/types.js +6 -0
- package/v3/dist/adapters/claude-flow/types.js.map +1 -0
- package/v3/dist/causal-discovery/causal-graph.d.ts +80 -1
- package/v3/dist/causal-discovery/causal-graph.d.ts.map +1 -1
- package/v3/dist/causal-discovery/causal-graph.js +111 -1
- package/v3/dist/causal-discovery/causal-graph.js.map +1 -1
- package/v3/dist/cli/bundle.js +25321 -15378
- package/v3/dist/cli/command-registry.d.ts +55 -0
- package/v3/dist/cli/command-registry.d.ts.map +1 -0
- package/v3/dist/cli/command-registry.js +103 -0
- package/v3/dist/cli/command-registry.js.map +1 -0
- package/v3/dist/cli/commands/claude-flow-setup.d.ts +82 -0
- package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -0
- package/v3/dist/cli/commands/claude-flow-setup.js +334 -0
- package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -0
- package/v3/dist/cli/commands/code.d.ts +9 -0
- package/v3/dist/cli/commands/code.d.ts.map +1 -0
- package/v3/dist/cli/commands/code.js +254 -0
- package/v3/dist/cli/commands/code.js.map +1 -0
- package/v3/dist/cli/commands/completions.d.ts +8 -0
- package/v3/dist/cli/commands/completions.d.ts.map +1 -0
- package/v3/dist/cli/commands/completions.js +99 -0
- package/v3/dist/cli/commands/completions.js.map +1 -0
- package/v3/dist/cli/commands/coverage.d.ts +9 -0
- package/v3/dist/cli/commands/coverage.d.ts.map +1 -0
- package/v3/dist/cli/commands/coverage.js +208 -0
- package/v3/dist/cli/commands/coverage.js.map +1 -0
- package/v3/dist/cli/commands/fleet.d.ts +11 -0
- package/v3/dist/cli/commands/fleet.d.ts.map +1 -0
- package/v3/dist/cli/commands/fleet.js +338 -0
- package/v3/dist/cli/commands/fleet.js.map +1 -0
- package/v3/dist/cli/commands/hooks.d.ts +2 -0
- package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
- package/v3/dist/cli/commands/hooks.js +13 -2
- package/v3/dist/cli/commands/hooks.js.map +1 -1
- package/v3/dist/cli/commands/init.d.ts +19 -0
- package/v3/dist/cli/commands/init.d.ts.map +1 -0
- package/v3/dist/cli/commands/init.js +345 -0
- package/v3/dist/cli/commands/init.js.map +1 -0
- package/v3/dist/cli/commands/migrate.d.ts +9 -0
- package/v3/dist/cli/commands/migrate.d.ts.map +1 -0
- package/v3/dist/cli/commands/migrate.js +566 -0
- package/v3/dist/cli/commands/migrate.js.map +1 -0
- package/v3/dist/cli/commands/quality.d.ts +9 -0
- package/v3/dist/cli/commands/quality.d.ts.map +1 -0
- package/v3/dist/cli/commands/quality.js +40 -0
- package/v3/dist/cli/commands/quality.js.map +1 -0
- package/v3/dist/cli/commands/security.d.ts +9 -0
- package/v3/dist/cli/commands/security.d.ts.map +1 -0
- package/v3/dist/cli/commands/security.js +124 -0
- package/v3/dist/cli/commands/security.js.map +1 -0
- package/v3/dist/cli/commands/sync.d.ts +19 -0
- package/v3/dist/cli/commands/sync.d.ts.map +1 -0
- package/v3/dist/cli/commands/sync.js +283 -0
- package/v3/dist/cli/commands/sync.js.map +1 -0
- package/v3/dist/cli/commands/test.d.ts +9 -0
- package/v3/dist/cli/commands/test.d.ts.map +1 -0
- package/v3/dist/cli/commands/test.js +166 -0
- package/v3/dist/cli/commands/test.js.map +1 -0
- package/v3/dist/cli/handlers/agent-handler.d.ts +20 -0
- package/v3/dist/cli/handlers/agent-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/agent-handler.js +158 -0
- package/v3/dist/cli/handlers/agent-handler.js.map +1 -0
- package/v3/dist/cli/handlers/domain-handler.d.ts +20 -0
- package/v3/dist/cli/handlers/domain-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/domain-handler.js +115 -0
- package/v3/dist/cli/handlers/domain-handler.js.map +1 -0
- package/v3/dist/cli/handlers/index.d.ts +13 -0
- package/v3/dist/cli/handlers/index.d.ts.map +1 -0
- package/v3/dist/cli/handlers/index.js +15 -0
- package/v3/dist/cli/handlers/index.js.map +1 -0
- package/v3/dist/cli/handlers/init-handler.d.ts +38 -0
- package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/init-handler.js +288 -0
- package/v3/dist/cli/handlers/init-handler.js.map +1 -0
- package/v3/dist/cli/handlers/interfaces.d.ts +104 -0
- package/v3/dist/cli/handlers/interfaces.d.ts.map +1 -0
- package/v3/dist/cli/handlers/interfaces.js +109 -0
- package/v3/dist/cli/handlers/interfaces.js.map +1 -0
- package/v3/dist/cli/handlers/protocol-handler.d.ts +19 -0
- package/v3/dist/cli/handlers/protocol-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/protocol-handler.js +79 -0
- package/v3/dist/cli/handlers/protocol-handler.js.map +1 -0
- package/v3/dist/cli/handlers/status-handler.d.ts +30 -0
- package/v3/dist/cli/handlers/status-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/status-handler.js +218 -0
- package/v3/dist/cli/handlers/status-handler.js.map +1 -0
- package/v3/dist/cli/handlers/task-handler.d.ts +22 -0
- package/v3/dist/cli/handlers/task-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/task-handler.js +271 -0
- package/v3/dist/cli/handlers/task-handler.js.map +1 -0
- package/v3/dist/cli/index.d.ts +4 -0
- package/v3/dist/cli/index.d.ts.map +1 -1
- package/v3/dist/cli/index.js +62 -2583
- package/v3/dist/cli/index.js.map +1 -1
- package/v3/dist/cli/wizards/core/index.d.ts +11 -0
- package/v3/dist/cli/wizards/core/index.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/index.js +15 -0
- package/v3/dist/cli/wizards/core/index.js.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-base.d.ts +87 -0
- package/v3/dist/cli/wizards/core/wizard-base.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-base.js +120 -0
- package/v3/dist/cli/wizards/core/wizard-base.js.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-command.d.ts +182 -0
- package/v3/dist/cli/wizards/core/wizard-command.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-command.js +45 -0
- package/v3/dist/cli/wizards/core/wizard-command.js.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-step.d.ts +109 -0
- package/v3/dist/cli/wizards/core/wizard-step.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-step.js +384 -0
- package/v3/dist/cli/wizards/core/wizard-step.js.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-utils.d.ts +117 -0
- package/v3/dist/cli/wizards/core/wizard-utils.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-utils.js +291 -0
- package/v3/dist/cli/wizards/core/wizard-utils.js.map +1 -0
- package/v3/dist/cli/wizards/coverage-wizard.d.ts +13 -68
- package/v3/dist/cli/wizards/coverage-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/coverage-wizard.js +127 -391
- package/v3/dist/cli/wizards/coverage-wizard.js.map +1 -1
- package/v3/dist/cli/wizards/fleet-wizard.d.ts +13 -64
- package/v3/dist/cli/wizards/fleet-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/fleet-wizard.js +150 -363
- package/v3/dist/cli/wizards/fleet-wizard.js.map +1 -1
- package/v3/dist/cli/wizards/index.d.ts +2 -0
- package/v3/dist/cli/wizards/index.d.ts.map +1 -1
- package/v3/dist/cli/wizards/index.js +3 -0
- package/v3/dist/cli/wizards/index.js.map +1 -1
- package/v3/dist/cli/wizards/security-wizard.d.ts +13 -64
- package/v3/dist/cli/wizards/security-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/security-wizard.js +152 -395
- package/v3/dist/cli/wizards/security-wizard.js.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.d.ts +13 -77
- package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.js +196 -328
- package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
- package/v3/dist/coordination/mincut/interfaces.d.ts +8 -2
- package/v3/dist/coordination/mincut/interfaces.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/interfaces.js.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +8 -0
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.js +26 -4
- package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.d.ts +7 -0
- package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.js +19 -1
- package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
- package/v3/dist/coordination/queen-coordinator.d.ts +5 -0
- package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
- package/v3/dist/coordination/queen-coordinator.js +45 -7
- package/v3/dist/coordination/queen-coordinator.js.map +1 -1
- package/v3/dist/coordination/task-executor.js +2 -2
- package/v3/dist/coordination/task-executor.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.js +2 -2
- package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
- package/v3/dist/domains/code-intelligence/plugin.js +2 -2
- package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/contract-testing/plugin.js +2 -2
- package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/plugin.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/plugin.js +2 -1
- package/v3/dist/domains/coverage-analysis/plugin.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/plugin.js +2 -2
- package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/domain-interface.d.ts.map +1 -1
- package/v3/dist/domains/domain-interface.js +3 -1
- package/v3/dist/domains/domain-interface.js.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.d.ts +5 -0
- package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.js +79 -0
- package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.js +2 -2
- package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.js +2 -2
- package/v3/dist/domains/quality-assessment/plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/plugin.js +2 -2
- package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
- package/v3/dist/domains/security-compliance/plugin.js +2 -2
- package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
- package/v3/dist/domains/test-execution/index.d.ts +2 -1
- package/v3/dist/domains/test-execution/index.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/index.js +0 -2
- package/v3/dist/domains/test-execution/index.js.map +1 -1
- package/v3/dist/domains/test-execution/interfaces.d.ts +222 -25
- package/v3/dist/domains/test-execution/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/interfaces.js +130 -3
- package/v3/dist/domains/test-execution/interfaces.js.map +1 -1
- package/v3/dist/domains/test-execution/plugin.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/plugin.js +2 -1
- package/v3/dist/domains/test-execution/plugin.js.map +1 -1
- package/v3/dist/domains/test-execution/test-prioritization-types.d.ts +5 -172
- package/v3/dist/domains/test-execution/test-prioritization-types.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/test-prioritization-types.js +6 -129
- package/v3/dist/domains/test-execution/test-prioritization-types.js.map +1 -1
- package/v3/dist/domains/test-execution/types/index.d.ts +7 -3
- package/v3/dist/domains/test-execution/types/index.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/types/index.js +7 -17
- package/v3/dist/domains/test-execution/types/index.js.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.d.ts +32 -1
- package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.js +72 -3
- package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
- package/v3/dist/domains/test-generation/factories/index.d.ts +8 -0
- package/v3/dist/domains/test-generation/factories/index.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/factories/index.js +8 -0
- package/v3/dist/domains/test-generation/factories/index.js.map +1 -0
- package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts +108 -0
- package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/factories/test-generator-factory.js +158 -0
- package/v3/dist/domains/test-generation/factories/test-generator-factory.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts +79 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.js +252 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/index.d.ts +11 -0
- package/v3/dist/domains/test-generation/generators/index.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/index.js +13 -0
- package/v3/dist/domains/test-generation/generators/index.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts +77 -0
- package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js +365 -0
- package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts +56 -0
- package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/mocha-generator.js +197 -0
- package/v3/dist/domains/test-generation/generators/mocha-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts +66 -0
- package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/pytest-generator.js +240 -0
- package/v3/dist/domains/test-generation/generators/pytest-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/index.d.ts +2 -1
- package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/index.js +5 -1
- package/v3/dist/domains/test-generation/index.js.map +1 -1
- package/v3/dist/domains/test-generation/interfaces/index.d.ts +9 -0
- package/v3/dist/domains/test-generation/interfaces/index.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/interfaces/index.js +9 -0
- package/v3/dist/domains/test-generation/interfaces/index.js.map +1 -0
- package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts +166 -0
- package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js +8 -0
- package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js.map +1 -0
- package/v3/dist/domains/test-generation/interfaces.d.ts +163 -24
- package/v3/dist/domains/test-generation/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/interfaces.js +2 -2
- package/v3/dist/domains/test-generation/plugin.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/plugin.js +6 -5
- package/v3/dist/domains/test-generation/plugin.js.map +1 -1
- package/v3/dist/domains/test-generation/services/coherence-gate-service.d.ts +245 -0
- package/v3/dist/domains/test-generation/services/coherence-gate-service.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/services/coherence-gate-service.js +454 -0
- package/v3/dist/domains/test-generation/services/coherence-gate-service.js.map +1 -0
- package/v3/dist/domains/test-generation/services/index.d.ts +8 -1
- package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/index.js +10 -1
- package/v3/dist/domains/test-generation/services/index.js.map +1 -1
- package/v3/dist/domains/test-generation/services/property-test-generator.d.ts +34 -0
- package/v3/dist/domains/test-generation/services/property-test-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/services/property-test-generator.js +306 -0
- package/v3/dist/domains/test-generation/services/property-test-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/services/tdd-generator.d.ts +33 -0
- package/v3/dist/domains/test-generation/services/tdd-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/services/tdd-generator.js +342 -0
- package/v3/dist/domains/test-generation/services/tdd-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/services/test-data-generator.d.ts +34 -0
- package/v3/dist/domains/test-generation/services/test-data-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/services/test-data-generator.js +245 -0
- package/v3/dist/domains/test-generation/services/test-data-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/services/test-generator.d.ts +51 -160
- package/v3/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/test-generator.js +101 -1858
- package/v3/dist/domains/test-generation/services/test-generator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/index.d.ts +2 -1
- package/v3/dist/domains/visual-accessibility/index.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/index.js +1 -0
- package/v3/dist/domains/visual-accessibility/index.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/interfaces.d.ts +131 -0
- package/v3/dist/domains/visual-accessibility/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.d.ts +26 -0
- package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.js +153 -2
- package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +42 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +69 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts +138 -0
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +830 -0
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/index.d.ts +1 -0
- package/v3/dist/domains/visual-accessibility/services/index.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/index.js +1 -0
- package/v3/dist/domains/visual-accessibility/services/index.js.map +1 -1
- package/v3/dist/init/enhancements/claude-flow-adapter.d.ts +84 -0
- package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -0
- package/v3/dist/init/enhancements/claude-flow-adapter.js +250 -0
- package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -0
- package/v3/dist/init/enhancements/detector.d.ts +10 -0
- package/v3/dist/init/enhancements/detector.d.ts.map +1 -0
- package/v3/dist/init/enhancements/detector.js +87 -0
- package/v3/dist/init/enhancements/detector.js.map +1 -0
- package/v3/dist/init/enhancements/index.d.ts +13 -0
- package/v3/dist/init/enhancements/index.d.ts.map +1 -0
- package/v3/dist/init/enhancements/index.js +25 -0
- package/v3/dist/init/enhancements/index.js.map +1 -0
- package/v3/dist/init/enhancements/types.d.ts +93 -0
- package/v3/dist/init/enhancements/types.d.ts.map +1 -0
- package/v3/dist/init/enhancements/types.js +6 -0
- package/v3/dist/init/enhancements/types.js.map +1 -0
- package/v3/dist/init/index.d.ts +8 -0
- package/v3/dist/init/index.d.ts.map +1 -1
- package/v3/dist/init/index.js +4 -0
- package/v3/dist/init/index.js.map +1 -1
- package/v3/dist/init/migration/config-migrator.d.ts +31 -0
- package/v3/dist/init/migration/config-migrator.d.ts.map +1 -0
- package/v3/dist/init/migration/config-migrator.js +133 -0
- package/v3/dist/init/migration/config-migrator.js.map +1 -0
- package/v3/dist/init/migration/data-migrator.d.ts +72 -0
- package/v3/dist/init/migration/data-migrator.d.ts.map +1 -0
- package/v3/dist/init/migration/data-migrator.js +233 -0
- package/v3/dist/init/migration/data-migrator.js.map +1 -0
- package/v3/dist/init/migration/detector.d.ts +44 -0
- package/v3/dist/init/migration/detector.d.ts.map +1 -0
- package/v3/dist/init/migration/detector.js +106 -0
- package/v3/dist/init/migration/detector.js.map +1 -0
- package/v3/dist/init/migration/index.d.ts +8 -0
- package/v3/dist/init/migration/index.d.ts.map +1 -0
- package/v3/dist/init/migration/index.js +8 -0
- package/v3/dist/init/migration/index.js.map +1 -0
- package/v3/dist/init/orchestrator.d.ts +68 -0
- package/v3/dist/init/orchestrator.d.ts.map +1 -0
- package/v3/dist/init/orchestrator.js +239 -0
- package/v3/dist/init/orchestrator.js.map +1 -0
- package/v3/dist/init/phases/01-detection.d.ts +30 -0
- package/v3/dist/init/phases/01-detection.d.ts.map +1 -0
- package/v3/dist/init/phases/01-detection.js +143 -0
- package/v3/dist/init/phases/01-detection.js.map +1 -0
- package/v3/dist/init/phases/02-analysis.d.ts +18 -0
- package/v3/dist/init/phases/02-analysis.d.ts.map +1 -0
- package/v3/dist/init/phases/02-analysis.js +28 -0
- package/v3/dist/init/phases/02-analysis.js.map +1 -0
- package/v3/dist/init/phases/03-configuration.d.ts +26 -0
- package/v3/dist/init/phases/03-configuration.d.ts.map +1 -0
- package/v3/dist/init/phases/03-configuration.js +98 -0
- package/v3/dist/init/phases/03-configuration.js.map +1 -0
- package/v3/dist/init/phases/04-database.d.ts +22 -0
- package/v3/dist/init/phases/04-database.d.ts.map +1 -0
- package/v3/dist/init/phases/04-database.js +88 -0
- package/v3/dist/init/phases/04-database.js.map +1 -0
- package/v3/dist/init/phases/05-learning.d.ts +28 -0
- package/v3/dist/init/phases/05-learning.d.ts.map +1 -0
- package/v3/dist/init/phases/05-learning.js +98 -0
- package/v3/dist/init/phases/05-learning.js.map +1 -0
- package/v3/dist/init/phases/06-code-intelligence.d.ts +33 -0
- package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -0
- package/v3/dist/init/phases/06-code-intelligence.js +115 -0
- package/v3/dist/init/phases/06-code-intelligence.js.map +1 -0
- package/v3/dist/init/phases/07-hooks.d.ts +27 -0
- package/v3/dist/init/phases/07-hooks.d.ts.map +1 -0
- package/v3/dist/init/phases/07-hooks.js +209 -0
- package/v3/dist/init/phases/07-hooks.js.map +1 -0
- package/v3/dist/init/phases/08-mcp.d.ts +22 -0
- package/v3/dist/init/phases/08-mcp.d.ts.map +1 -0
- package/v3/dist/init/phases/08-mcp.js +62 -0
- package/v3/dist/init/phases/08-mcp.js.map +1 -0
- package/v3/dist/init/phases/09-assets.d.ts +23 -0
- package/v3/dist/init/phases/09-assets.d.ts.map +1 -0
- package/v3/dist/init/phases/09-assets.js +82 -0
- package/v3/dist/init/phases/09-assets.js.map +1 -0
- package/v3/dist/init/phases/10-workers.d.ts +23 -0
- package/v3/dist/init/phases/10-workers.d.ts.map +1 -0
- package/v3/dist/init/phases/10-workers.js +111 -0
- package/v3/dist/init/phases/10-workers.js.map +1 -0
- package/v3/dist/init/phases/11-claude-md.d.ts +26 -0
- package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -0
- package/v3/dist/init/phases/11-claude-md.js +121 -0
- package/v3/dist/init/phases/11-claude-md.js.map +1 -0
- package/v3/dist/init/phases/12-verification.d.ts +61 -0
- package/v3/dist/init/phases/12-verification.d.ts.map +1 -0
- package/v3/dist/init/phases/12-verification.js +370 -0
- package/v3/dist/init/phases/12-verification.js.map +1 -0
- package/v3/dist/init/phases/index.d.ts +46 -0
- package/v3/dist/init/phases/index.d.ts.map +1 -0
- package/v3/dist/init/phases/index.js +64 -0
- package/v3/dist/init/phases/index.js.map +1 -0
- package/v3/dist/init/phases/phase-interface.d.ts +193 -0
- package/v3/dist/init/phases/phase-interface.d.ts.map +1 -0
- package/v3/dist/init/phases/phase-interface.js +119 -0
- package/v3/dist/init/phases/phase-interface.js.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts +24 -62
- package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js +45 -497
- package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/router.js +2 -2
- package/v3/dist/integrations/agentic-flow/model-router/router.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts +98 -0
- package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js +197 -0
- package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts +102 -0
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js +372 -0
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts +64 -0
- package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js +120 -0
- package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js.map +1 -0
- package/v3/dist/integrations/coherence/coherence-service.d.ts +323 -0
- package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/coherence-service.js +856 -0
- package/v3/dist/integrations/coherence/coherence-service.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/category-adapter.d.ts +170 -0
- package/v3/dist/integrations/coherence/engines/category-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/category-adapter.js +403 -0
- package/v3/dist/integrations/coherence/engines/category-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts +159 -0
- package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/causal-adapter.js +348 -0
- package/v3/dist/integrations/coherence/engines/causal-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts +174 -0
- package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/cohomology-adapter.js +401 -0
- package/v3/dist/integrations/coherence/engines/cohomology-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts +201 -0
- package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/homotopy-adapter.js +324 -0
- package/v3/dist/integrations/coherence/engines/homotopy-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/index.d.ts +20 -0
- package/v3/dist/integrations/coherence/engines/index.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/index.js +26 -0
- package/v3/dist/integrations/coherence/engines/index.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts +193 -0
- package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js +565 -0
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts +175 -0
- package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/engines/witness-adapter.js +377 -0
- package/v3/dist/integrations/coherence/engines/witness-adapter.js.map +1 -0
- package/v3/dist/integrations/coherence/index.d.ts +84 -0
- package/v3/dist/integrations/coherence/index.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/index.js +114 -0
- package/v3/dist/integrations/coherence/index.js.map +1 -0
- package/v3/dist/integrations/coherence/threshold-tuner.d.ts +396 -0
- package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/threshold-tuner.js +538 -0
- package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -0
- package/v3/dist/integrations/coherence/types.d.ts +879 -0
- package/v3/dist/integrations/coherence/types.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/types.js +134 -0
- package/v3/dist/integrations/coherence/types.js.map +1 -0
- package/v3/dist/integrations/coherence/wasm-loader.d.ts +351 -0
- package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -0
- package/v3/dist/integrations/coherence/wasm-loader.js +842 -0
- package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -0
- package/v3/dist/integrations/embeddings/index/HNSWIndex.d.ts.map +1 -1
- package/v3/dist/integrations/embeddings/index/HNSWIndex.js +4 -1
- package/v3/dist/integrations/embeddings/index/HNSWIndex.js.map +1 -1
- package/v3/dist/kernel/interfaces.d.ts +8 -1
- package/v3/dist/kernel/interfaces.d.ts.map +1 -1
- package/v3/dist/learning/aqe-learning-engine.d.ts +272 -0
- package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -0
- package/v3/dist/learning/aqe-learning-engine.js +708 -0
- package/v3/dist/learning/aqe-learning-engine.js.map +1 -0
- package/v3/dist/learning/causal-verifier.d.ts +244 -0
- package/v3/dist/learning/causal-verifier.d.ts.map +1 -0
- package/v3/dist/learning/causal-verifier.js +300 -0
- package/v3/dist/learning/causal-verifier.js.map +1 -0
- package/v3/dist/learning/experience-capture.d.ts +266 -0
- package/v3/dist/learning/experience-capture.d.ts.map +1 -0
- package/v3/dist/learning/experience-capture.js +647 -0
- package/v3/dist/learning/experience-capture.js.map +1 -0
- package/v3/dist/learning/index.d.ts +8 -0
- package/v3/dist/learning/index.d.ts.map +1 -1
- package/v3/dist/learning/index.js +16 -0
- package/v3/dist/learning/index.js.map +1 -1
- package/v3/dist/learning/memory-auditor.d.ts +235 -0
- package/v3/dist/learning/memory-auditor.d.ts.map +1 -0
- package/v3/dist/learning/memory-auditor.js +480 -0
- package/v3/dist/learning/memory-auditor.js.map +1 -0
- package/v3/dist/learning/pattern-store.d.ts.map +1 -1
- package/v3/dist/learning/pattern-store.js +27 -6
- package/v3/dist/learning/pattern-store.js.map +1 -1
- package/v3/dist/learning/qe-patterns.d.ts +15 -1
- package/v3/dist/learning/qe-patterns.d.ts.map +1 -1
- package/v3/dist/learning/qe-patterns.js +26 -5
- package/v3/dist/learning/qe-patterns.js.map +1 -1
- package/v3/dist/learning/qe-reasoning-bank.d.ts +38 -2
- package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
- package/v3/dist/learning/qe-reasoning-bank.js +86 -4
- package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
- package/v3/dist/learning/real-qe-reasoning-bank.d.ts +32 -2
- package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
- package/v3/dist/learning/real-qe-reasoning-bank.js +61 -6
- package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
- package/v3/dist/mcp/bundle.js +8786 -1737
- package/v3/dist/mcp/security/cve-prevention.d.ts +31 -134
- package/v3/dist/mcp/security/cve-prevention.d.ts.map +1 -1
- package/v3/dist/mcp/security/cve-prevention.js +37 -562
- package/v3/dist/mcp/security/cve-prevention.js.map +1 -1
- package/v3/dist/mcp/security/index.d.ts +5 -1
- package/v3/dist/mcp/security/index.d.ts.map +1 -1
- package/v3/dist/mcp/security/validators/command-validator.d.ts +41 -0
- package/v3/dist/mcp/security/validators/command-validator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/command-validator.js +123 -0
- package/v3/dist/mcp/security/validators/command-validator.js.map +1 -0
- package/v3/dist/mcp/security/validators/crypto-validator.d.ts +40 -0
- package/v3/dist/mcp/security/validators/crypto-validator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/crypto-validator.js +72 -0
- package/v3/dist/mcp/security/validators/crypto-validator.js.map +1 -0
- package/v3/dist/mcp/security/validators/index.d.ts +12 -0
- package/v3/dist/mcp/security/validators/index.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/index.js +22 -0
- package/v3/dist/mcp/security/validators/index.js.map +1 -0
- package/v3/dist/mcp/security/validators/input-sanitizer.d.ts +56 -0
- package/v3/dist/mcp/security/validators/input-sanitizer.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/input-sanitizer.js +157 -0
- package/v3/dist/mcp/security/validators/input-sanitizer.js.map +1 -0
- package/v3/dist/mcp/security/validators/interfaces.d.ts +164 -0
- package/v3/dist/mcp/security/validators/interfaces.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/interfaces.js +6 -0
- package/v3/dist/mcp/security/validators/interfaces.js.map +1 -0
- package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts +50 -0
- package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/path-traversal-validator.js +242 -0
- package/v3/dist/mcp/security/validators/path-traversal-validator.js.map +1 -0
- package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts +50 -0
- package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/regex-safety-validator.js +183 -0
- package/v3/dist/mcp/security/validators/regex-safety-validator.js.map +1 -0
- package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts +66 -0
- package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/validation-orchestrator.js +146 -0
- package/v3/dist/mcp/security/validators/validation-orchestrator.js.map +1 -0
- package/v3/dist/mcp/server.d.ts.map +1 -1
- package/v3/dist/mcp/server.js +1 -0
- package/v3/dist/mcp/server.js.map +1 -1
- package/v3/dist/mcp/tool-registry.d.ts +3 -1
- package/v3/dist/mcp/tool-registry.d.ts.map +1 -1
- package/v3/dist/mcp/tool-registry.js +155 -2
- package/v3/dist/mcp/tool-registry.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/audit.d.ts +107 -0
- package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/audit.js +236 -0
- package/v3/dist/mcp/tools/coherence/audit.js.map +1 -0
- package/v3/dist/mcp/tools/coherence/check.d.ts +106 -0
- package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/check.js +205 -0
- package/v3/dist/mcp/tools/coherence/check.js.map +1 -0
- package/v3/dist/mcp/tools/coherence/collapse.d.ts +123 -0
- package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/collapse.js +279 -0
- package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -0
- package/v3/dist/mcp/tools/coherence/consensus.d.ts +100 -0
- package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/consensus.js +201 -0
- package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -0
- package/v3/dist/mcp/tools/coherence/index.d.ts +31 -0
- package/v3/dist/mcp/tools/coherence/index.d.ts.map +1 -0
- package/v3/dist/mcp/tools/coherence/index.js +42 -0
- package/v3/dist/mcp/tools/coherence/index.js.map +1 -0
- package/v3/dist/mcp/tools/index.d.ts +6 -1
- package/v3/dist/mcp/tools/index.d.ts.map +1 -1
- package/v3/dist/mcp/tools/index.js +9 -1
- package/v3/dist/mcp/tools/index.js.map +1 -1
- package/v3/dist/mcp/tools/mincut/index.d.ts +1 -1
- package/v3/dist/mcp/tools/mincut/index.d.ts.map +1 -1
- package/v3/dist/mcp/tools/mincut/index.js.map +1 -1
- package/v3/dist/mcp/tools/registry.d.ts +4 -0
- package/v3/dist/mcp/tools/registry.d.ts.map +1 -1
- package/v3/dist/mcp/tools/registry.js +5 -0
- package/v3/dist/mcp/tools/registry.js.map +1 -1
- package/v3/dist/mcp/tools/test-generation/generate.d.ts +1 -0
- package/v3/dist/mcp/tools/test-generation/generate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/test-generation/generate.js +3 -2
- package/v3/dist/mcp/tools/test-generation/generate.js.map +1 -1
- package/v3/dist/mcp/types.d.ts +1 -1
- package/v3/dist/mcp/types.d.ts.map +1 -1
- package/v3/dist/strange-loop/belief-reconciler.d.ts +357 -0
- package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -0
- package/v3/dist/strange-loop/belief-reconciler.js +696 -0
- package/v3/dist/strange-loop/belief-reconciler.js.map +1 -0
- package/v3/dist/strange-loop/index.d.ts +1 -0
- package/v3/dist/strange-loop/index.d.ts.map +1 -1
- package/v3/dist/strange-loop/index.js +2 -0
- package/v3/dist/strange-loop/index.js.map +1 -1
- package/v3/dist/strange-loop/strange-loop.d.ts +177 -5
- package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
- package/v3/dist/strange-loop/strange-loop.js +452 -9
- package/v3/dist/strange-loop/strange-loop.js.map +1 -1
- package/v3/dist/strange-loop/types.d.ts +205 -1
- package/v3/dist/strange-loop/types.d.ts.map +1 -1
- package/v3/dist/strange-loop/types.js +5 -0
- package/v3/dist/strange-loop/types.js.map +1 -1
- package/v3/dist/sync/cloud/index.d.ts +8 -0
- package/v3/dist/sync/cloud/index.d.ts.map +1 -0
- package/v3/dist/sync/cloud/index.js +8 -0
- package/v3/dist/sync/cloud/index.js.map +1 -0
- package/v3/dist/sync/cloud/postgres-writer.d.ts +88 -0
- package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -0
- package/v3/dist/sync/cloud/postgres-writer.js +319 -0
- package/v3/dist/sync/cloud/postgres-writer.js.map +1 -0
- package/v3/dist/sync/cloud/tunnel-manager.d.ts +75 -0
- package/v3/dist/sync/cloud/tunnel-manager.d.ts.map +1 -0
- package/v3/dist/sync/cloud/tunnel-manager.js +221 -0
- package/v3/dist/sync/cloud/tunnel-manager.js.map +1 -0
- package/v3/dist/sync/index.d.ts +35 -0
- package/v3/dist/sync/index.d.ts.map +1 -0
- package/v3/dist/sync/index.js +35 -0
- package/v3/dist/sync/index.js.map +1 -0
- package/v3/dist/sync/interfaces.d.ts +245 -0
- package/v3/dist/sync/interfaces.d.ts.map +1 -0
- package/v3/dist/sync/interfaces.js +160 -0
- package/v3/dist/sync/interfaces.js.map +1 -0
- package/v3/dist/sync/readers/index.d.ts +8 -0
- package/v3/dist/sync/readers/index.d.ts.map +1 -0
- package/v3/dist/sync/readers/index.js +8 -0
- package/v3/dist/sync/readers/index.js.map +1 -0
- package/v3/dist/sync/readers/json-reader.d.ts +95 -0
- package/v3/dist/sync/readers/json-reader.d.ts.map +1 -0
- package/v3/dist/sync/readers/json-reader.js +306 -0
- package/v3/dist/sync/readers/json-reader.js.map +1 -0
- package/v3/dist/sync/readers/sqlite-reader.d.ts +88 -0
- package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -0
- package/v3/dist/sync/readers/sqlite-reader.js +255 -0
- package/v3/dist/sync/readers/sqlite-reader.js.map +1 -0
- package/v3/dist/sync/sync-agent.d.ts +116 -0
- package/v3/dist/sync/sync-agent.d.ts.map +1 -0
- package/v3/dist/sync/sync-agent.js +416 -0
- package/v3/dist/sync/sync-agent.js.map +1 -0
- package/v3/package.json +17 -2
|
@@ -1,9 +1,140 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agentic QE v3 - MCP Tool Registry
|
|
3
3
|
* Manages tool registration, lazy loading, and dispatch
|
|
4
|
+
*
|
|
5
|
+
* Security: Implements SEC-001 fix with input validation and sanitization
|
|
4
6
|
*/
|
|
5
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
6
8
|
import { ALL_DOMAINS } from '../shared/types';
|
|
9
|
+
import { sanitizeInput } from './security/cve-prevention';
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// Security: Input Validation (SEC-001 Fix)
|
|
12
|
+
// ============================================================================
|
|
13
|
+
/**
|
|
14
|
+
* Valid tool name pattern: alphanumeric, underscores, hyphens, colons (for namespacing)
|
|
15
|
+
* Examples: "fleet_init", "agent-spawn", "mcp:test_generate"
|
|
16
|
+
*/
|
|
17
|
+
const VALID_TOOL_NAME_PATTERN = /^[a-zA-Z][a-zA-Z0-9_:-]{0,127}$/;
|
|
18
|
+
/**
|
|
19
|
+
* Maximum parameter value length to prevent memory exhaustion
|
|
20
|
+
*/
|
|
21
|
+
const MAX_PARAM_STRING_LENGTH = 1_000_000; // 1MB
|
|
22
|
+
/**
|
|
23
|
+
* Validate tool name format
|
|
24
|
+
*/
|
|
25
|
+
function validateToolName(name) {
|
|
26
|
+
if (typeof name !== 'string') {
|
|
27
|
+
return { valid: false, error: 'Tool name must be a string' };
|
|
28
|
+
}
|
|
29
|
+
if (name.length === 0) {
|
|
30
|
+
return { valid: false, error: 'Tool name cannot be empty' };
|
|
31
|
+
}
|
|
32
|
+
if (name.length > 128) {
|
|
33
|
+
return { valid: false, error: 'Tool name exceeds maximum length (128)' };
|
|
34
|
+
}
|
|
35
|
+
if (!VALID_TOOL_NAME_PATTERN.test(name)) {
|
|
36
|
+
return {
|
|
37
|
+
valid: false,
|
|
38
|
+
error: 'Tool name contains invalid characters. Use only alphanumeric, underscore, hyphen, or colon',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return { valid: true };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Validate a parameter value against its schema definition
|
|
45
|
+
*/
|
|
46
|
+
function validateParamValue(value, param) {
|
|
47
|
+
// Check required
|
|
48
|
+
if (value === undefined || value === null) {
|
|
49
|
+
if (param.required) {
|
|
50
|
+
return { valid: false, error: `Required parameter '${param.name}' is missing` };
|
|
51
|
+
}
|
|
52
|
+
return { valid: true };
|
|
53
|
+
}
|
|
54
|
+
// Type validation
|
|
55
|
+
switch (param.type) {
|
|
56
|
+
case 'string':
|
|
57
|
+
if (typeof value !== 'string') {
|
|
58
|
+
return { valid: false, error: `Parameter '${param.name}' must be a string` };
|
|
59
|
+
}
|
|
60
|
+
if (value.length > MAX_PARAM_STRING_LENGTH) {
|
|
61
|
+
return { valid: false, error: `Parameter '${param.name}' exceeds maximum length` };
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
case 'number':
|
|
65
|
+
if (typeof value !== 'number' || isNaN(value)) {
|
|
66
|
+
return { valid: false, error: `Parameter '${param.name}' must be a number` };
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case 'boolean':
|
|
70
|
+
if (typeof value !== 'boolean') {
|
|
71
|
+
return { valid: false, error: `Parameter '${param.name}' must be a boolean` };
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case 'object':
|
|
75
|
+
if (typeof value !== 'object' || Array.isArray(value)) {
|
|
76
|
+
return { valid: false, error: `Parameter '${param.name}' must be an object` };
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
case 'array':
|
|
80
|
+
if (!Array.isArray(value)) {
|
|
81
|
+
return { valid: false, error: `Parameter '${param.name}' must be an array` };
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
// Enum validation
|
|
86
|
+
if (param.enum && param.enum.length > 0) {
|
|
87
|
+
if (!param.enum.includes(value)) {
|
|
88
|
+
return {
|
|
89
|
+
valid: false,
|
|
90
|
+
error: `Parameter '${param.name}' must be one of: ${param.enum.join(', ')}`,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return { valid: true };
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Validate all parameters against tool definition
|
|
98
|
+
*/
|
|
99
|
+
function validateParams(params, definition) {
|
|
100
|
+
const errors = [];
|
|
101
|
+
// Check for unknown parameters (defense against injection)
|
|
102
|
+
const knownParams = new Set(definition.parameters.map((p) => p.name));
|
|
103
|
+
for (const key of Object.keys(params)) {
|
|
104
|
+
if (!knownParams.has(key)) {
|
|
105
|
+
errors.push(`Unknown parameter: '${key}'`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Validate each defined parameter
|
|
109
|
+
for (const param of definition.parameters) {
|
|
110
|
+
const result = validateParamValue(params[param.name], param);
|
|
111
|
+
if (!result.valid && result.error) {
|
|
112
|
+
errors.push(result.error);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return { valid: errors.length === 0, errors };
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Sanitize string parameters to prevent injection attacks
|
|
119
|
+
*/
|
|
120
|
+
function sanitizeParams(params) {
|
|
121
|
+
const sanitized = { ...params };
|
|
122
|
+
for (const [key, value] of Object.entries(sanitized)) {
|
|
123
|
+
if (typeof value === 'string') {
|
|
124
|
+
// Apply sanitization from security module
|
|
125
|
+
sanitized[key] = sanitizeInput(value);
|
|
126
|
+
}
|
|
127
|
+
else if (Array.isArray(value)) {
|
|
128
|
+
// Sanitize string elements in arrays
|
|
129
|
+
sanitized[key] = value.map((item) => typeof item === 'string' ? sanitizeInput(item) : item);
|
|
130
|
+
}
|
|
131
|
+
else if (typeof value === 'object' && value !== null) {
|
|
132
|
+
// Recursively sanitize nested objects
|
|
133
|
+
sanitized[key] = sanitizeParams(value);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return sanitized;
|
|
137
|
+
}
|
|
7
138
|
// ============================================================================
|
|
8
139
|
// Domain Keywords for Lazy Loading Detection
|
|
9
140
|
// ============================================================================
|
|
@@ -181,11 +312,21 @@ export class ToolRegistry {
|
|
|
181
312
|
.filter((d) => d !== undefined);
|
|
182
313
|
}
|
|
183
314
|
/**
|
|
184
|
-
* Invoke a tool
|
|
315
|
+
* Invoke a tool with input validation and sanitization (SEC-001 fix)
|
|
185
316
|
*/
|
|
186
317
|
async invoke(name, params) {
|
|
187
318
|
const startTime = Date.now();
|
|
188
319
|
const requestId = uuidv4();
|
|
320
|
+
// SEC-001 FIX: Validate tool name format
|
|
321
|
+
const nameValidation = validateToolName(name);
|
|
322
|
+
if (!nameValidation.valid) {
|
|
323
|
+
this.stats.errors++;
|
|
324
|
+
return {
|
|
325
|
+
success: false,
|
|
326
|
+
error: `Invalid tool name: ${nameValidation.error}`,
|
|
327
|
+
metadata: this.createMetadata(startTime, requestId),
|
|
328
|
+
};
|
|
329
|
+
}
|
|
189
330
|
const tool = this.tools.get(name);
|
|
190
331
|
if (!tool) {
|
|
191
332
|
this.stats.errors++;
|
|
@@ -195,6 +336,18 @@ export class ToolRegistry {
|
|
|
195
336
|
metadata: this.createMetadata(startTime, requestId),
|
|
196
337
|
};
|
|
197
338
|
}
|
|
339
|
+
// SEC-001 FIX: Validate parameters against tool schema
|
|
340
|
+
const paramValidation = validateParams(params, tool.definition);
|
|
341
|
+
if (!paramValidation.valid) {
|
|
342
|
+
this.stats.errors++;
|
|
343
|
+
return {
|
|
344
|
+
success: false,
|
|
345
|
+
error: `Parameter validation failed: ${paramValidation.errors.join('; ')}`,
|
|
346
|
+
metadata: this.createMetadata(startTime, requestId, tool.definition.domain),
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
// SEC-001 FIX: Sanitize string parameters
|
|
350
|
+
const sanitizedParams = sanitizeParams(params);
|
|
198
351
|
// Mark as loaded on first use
|
|
199
352
|
if (!tool.loaded) {
|
|
200
353
|
tool.loaded = true;
|
|
@@ -204,7 +357,7 @@ export class ToolRegistry {
|
|
|
204
357
|
tool.lastUsed = new Date();
|
|
205
358
|
this.stats.invocations++;
|
|
206
359
|
try {
|
|
207
|
-
const result = await tool.handler(
|
|
360
|
+
const result = await tool.handler(sanitizedParams);
|
|
208
361
|
return {
|
|
209
362
|
...result,
|
|
210
363
|
metadata: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/mcp/tool-registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAc,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA8B1D,+EAA+E;AAC/E,6CAA6C;AAC7C,+EAA+E;AAE/E,MAAM,eAAe,GAAiC;IACpD,iBAAiB,EAAE;QACjB,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW;QACxE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ;QACzE,QAAQ,EAAE,OAAO,EAAE,OAAO;KAC3B;IACD,gBAAgB,EAAE;QAChB,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO;QACnE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,wBAAwB;KAC/D;IACD,mBAAmB,EAAE;QACnB,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,mBAAmB;QACnE,WAAW,EAAE,KAAK,EAAE,UA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E,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC;YAC9C,GAAG,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;QACD,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;YAC5C,GAAG,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;QACD,IAAI,CAAC,KAAK,GAAG;YACX,UAAU,EAAE,CAAC;YACb,WAAW,EAAE,CAAC;YACd,UAAU,EAAE,EAAkC;YAC9C,QAAQ,EAAE,EAAE;YACZ,WAAW,EAAE,CAAC;YACd,MAAM,EAAE,CAAC;SACV,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,cAAc,CACpB,SAAiB,EACjB,SAAiB,EACjB,MAAmB;QAEnB,OAAO;YACL,aAAa,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;YACrC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,SAAS;YACT,MAAM;SACP,CAAC;IACJ,CAAC;CACF;AAED,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,YAAY,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Coherence Audit Memory MCP Tool
|
|
3
|
+
* ADR-052: Phase 4 Action A4.1
|
|
4
|
+
*
|
|
5
|
+
* qe/coherence/audit - Audit QE memory for contradictions
|
|
6
|
+
*
|
|
7
|
+
* Uses the MemoryCoherenceAuditor to scan QE patterns for coherence issues,
|
|
8
|
+
* detecting contradictions and generating remediation recommendations.
|
|
9
|
+
*/
|
|
10
|
+
import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base.js';
|
|
11
|
+
import { ToolResult } from '../../types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Parameters for memory audit
|
|
14
|
+
*/
|
|
15
|
+
export interface CoherenceAuditParams {
|
|
16
|
+
/** Namespace to audit (default: 'qe-patterns') */
|
|
17
|
+
namespace?: string;
|
|
18
|
+
/** Maximum patterns to scan (default: 1000) */
|
|
19
|
+
maxPatterns?: number;
|
|
20
|
+
/** Energy threshold for flagging issues (default: 0.4) */
|
|
21
|
+
energyThreshold?: number;
|
|
22
|
+
/** Include detailed pattern information in results */
|
|
23
|
+
includeDetails?: boolean;
|
|
24
|
+
/** Index signature for Record<string, unknown> compatibility */
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Result of memory audit
|
|
29
|
+
*/
|
|
30
|
+
export interface CoherenceAuditResult {
|
|
31
|
+
/** Total number of patterns in the database */
|
|
32
|
+
totalPatterns: number;
|
|
33
|
+
/** Number of patterns scanned in this audit */
|
|
34
|
+
scannedPatterns: number;
|
|
35
|
+
/** Number of contradictions found */
|
|
36
|
+
contradictionCount: number;
|
|
37
|
+
/** Overall coherence energy (lower = more coherent) */
|
|
38
|
+
globalEnergy: number;
|
|
39
|
+
/** High-energy domains requiring attention */
|
|
40
|
+
hotspots: Array<{
|
|
41
|
+
domain: string;
|
|
42
|
+
patternIds: string[];
|
|
43
|
+
energy: number;
|
|
44
|
+
description: string;
|
|
45
|
+
}>;
|
|
46
|
+
/** Actionable recommendations */
|
|
47
|
+
recommendations: Array<{
|
|
48
|
+
type: 'merge' | 'remove' | 'review' | 'split';
|
|
49
|
+
patternIds: string[];
|
|
50
|
+
reason: string;
|
|
51
|
+
priority: 'low' | 'medium' | 'high';
|
|
52
|
+
}>;
|
|
53
|
+
/** Audit duration in milliseconds */
|
|
54
|
+
durationMs: number;
|
|
55
|
+
/** Audit timestamp */
|
|
56
|
+
timestamp: string;
|
|
57
|
+
/** Memory health score (0-100, higher = healthier) */
|
|
58
|
+
healthScore: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Coherence Audit Memory Tool
|
|
62
|
+
*
|
|
63
|
+
* Scans QE patterns for coherence issues using Prime Radiant:
|
|
64
|
+
* - Detects contradictory patterns
|
|
65
|
+
* - Identifies duplicate/overlapping patterns
|
|
66
|
+
* - Flags outdated patterns with low usage
|
|
67
|
+
* - Generates remediation recommendations
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const result = await tool.invoke({
|
|
72
|
+
* namespace: 'qe-patterns',
|
|
73
|
+
* maxPatterns: 500,
|
|
74
|
+
* energyThreshold: 0.5,
|
|
75
|
+
* });
|
|
76
|
+
*
|
|
77
|
+
* console.log(`Health Score: ${result.data.healthScore}/100`);
|
|
78
|
+
* console.log('Hotspots:', result.data.hotspots);
|
|
79
|
+
* console.log('Recommendations:', result.data.recommendations);
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare class CoherenceAuditTool extends MCPToolBase<CoherenceAuditParams, CoherenceAuditResult> {
|
|
83
|
+
readonly config: MCPToolConfig;
|
|
84
|
+
private coherenceService;
|
|
85
|
+
private auditor;
|
|
86
|
+
/**
|
|
87
|
+
* Get or create the CoherenceService instance
|
|
88
|
+
*/
|
|
89
|
+
private getService;
|
|
90
|
+
/**
|
|
91
|
+
* Reset instance cache (called when fleet is disposed)
|
|
92
|
+
*/
|
|
93
|
+
resetInstanceCache(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Execute the memory audit
|
|
96
|
+
*/
|
|
97
|
+
execute(params: CoherenceAuditParams, context: MCPToolContext): Promise<ToolResult<CoherenceAuditResult>>;
|
|
98
|
+
/**
|
|
99
|
+
* Calculate memory health score (0-100)
|
|
100
|
+
*/
|
|
101
|
+
private calculateHealthScore;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Create a CoherenceAuditTool instance
|
|
105
|
+
*/
|
|
106
|
+
export declare function createCoherenceAuditTool(): CoherenceAuditTool;
|
|
107
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/coherence/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EAGf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAsB5C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gEAAgE;IAChE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,EAAE,KAAK,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IACH,iCAAiC;IACjC,eAAe,EAAE,KAAK,CAAC;QACrB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;QAC9C,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;KACrC,CAAC,CAAC;IACH,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;CACrB;AAyCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,kBAAmB,SAAQ,WAAW,CACjD,oBAAoB,EACpB,oBAAoB,CACrB;IACC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAS5B;IAEF,OAAO,CAAC,gBAAgB,CAAiC;IACzD,OAAO,CAAC,OAAO,CAAuC;IAEtD;;OAEG;YACW,UAAU;IAOxB;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAQ1B;;OAEG;IACG,OAAO,CACX,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IA+H5C;;OAEG;IACH,OAAO,CAAC,oBAAoB;CAoB7B;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,kBAAkB,CAE7D"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Coherence Audit Memory MCP Tool
|
|
3
|
+
* ADR-052: Phase 4 Action A4.1
|
|
4
|
+
*
|
|
5
|
+
* qe/coherence/audit - Audit QE memory for contradictions
|
|
6
|
+
*
|
|
7
|
+
* Uses the MemoryCoherenceAuditor to scan QE patterns for coherence issues,
|
|
8
|
+
* detecting contradictions and generating remediation recommendations.
|
|
9
|
+
*/
|
|
10
|
+
import { MCPToolBase, getSharedMemoryBackend, } from '../base.js';
|
|
11
|
+
import { createCoherenceService, wasmLoader, } from '../../../integrations/coherence/index.js';
|
|
12
|
+
import { createMemoryAuditor, } from '../../../learning/index.js';
|
|
13
|
+
import { createPatternStore, } from '../../../learning/index.js';
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Schema
|
|
16
|
+
// ============================================================================
|
|
17
|
+
const COHERENCE_AUDIT_SCHEMA = {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
namespace: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Namespace to audit (default: qe-patterns)',
|
|
23
|
+
default: 'qe-patterns',
|
|
24
|
+
},
|
|
25
|
+
maxPatterns: {
|
|
26
|
+
type: 'number',
|
|
27
|
+
description: 'Maximum patterns to scan (default: 1000)',
|
|
28
|
+
default: 1000,
|
|
29
|
+
minimum: 1,
|
|
30
|
+
maximum: 10000,
|
|
31
|
+
},
|
|
32
|
+
energyThreshold: {
|
|
33
|
+
type: 'number',
|
|
34
|
+
description: 'Energy threshold for flagging issues (default: 0.4)',
|
|
35
|
+
default: 0.4,
|
|
36
|
+
minimum: 0,
|
|
37
|
+
maximum: 1,
|
|
38
|
+
},
|
|
39
|
+
includeDetails: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
description: 'Include detailed pattern information in results',
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: [],
|
|
46
|
+
};
|
|
47
|
+
// ============================================================================
|
|
48
|
+
// Tool Implementation
|
|
49
|
+
// ============================================================================
|
|
50
|
+
/**
|
|
51
|
+
* Coherence Audit Memory Tool
|
|
52
|
+
*
|
|
53
|
+
* Scans QE patterns for coherence issues using Prime Radiant:
|
|
54
|
+
* - Detects contradictory patterns
|
|
55
|
+
* - Identifies duplicate/overlapping patterns
|
|
56
|
+
* - Flags outdated patterns with low usage
|
|
57
|
+
* - Generates remediation recommendations
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const result = await tool.invoke({
|
|
62
|
+
* namespace: 'qe-patterns',
|
|
63
|
+
* maxPatterns: 500,
|
|
64
|
+
* energyThreshold: 0.5,
|
|
65
|
+
* });
|
|
66
|
+
*
|
|
67
|
+
* console.log(`Health Score: ${result.data.healthScore}/100`);
|
|
68
|
+
* console.log('Hotspots:', result.data.hotspots);
|
|
69
|
+
* console.log('Recommendations:', result.data.recommendations);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export class CoherenceAuditTool extends MCPToolBase {
|
|
73
|
+
config = {
|
|
74
|
+
name: 'qe/coherence/audit',
|
|
75
|
+
description: 'Audit QE memory for contradictions and coherence issues. ' +
|
|
76
|
+
'Scans patterns, detects hotspots, and generates remediation recommendations.',
|
|
77
|
+
domain: 'learning-optimization',
|
|
78
|
+
schema: COHERENCE_AUDIT_SCHEMA,
|
|
79
|
+
streaming: false,
|
|
80
|
+
timeout: 60000,
|
|
81
|
+
};
|
|
82
|
+
coherenceService = null;
|
|
83
|
+
auditor = null;
|
|
84
|
+
/**
|
|
85
|
+
* Get or create the CoherenceService instance
|
|
86
|
+
*/
|
|
87
|
+
async getService() {
|
|
88
|
+
if (!this.coherenceService) {
|
|
89
|
+
this.coherenceService = await createCoherenceService(wasmLoader);
|
|
90
|
+
}
|
|
91
|
+
return this.coherenceService;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Reset instance cache (called when fleet is disposed)
|
|
95
|
+
*/
|
|
96
|
+
resetInstanceCache() {
|
|
97
|
+
if (this.coherenceService) {
|
|
98
|
+
this.coherenceService.dispose();
|
|
99
|
+
this.coherenceService = null;
|
|
100
|
+
}
|
|
101
|
+
this.auditor = null;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Execute the memory audit
|
|
105
|
+
*/
|
|
106
|
+
async execute(params, context) {
|
|
107
|
+
const { namespace = 'qe-patterns', maxPatterns = 1000, energyThreshold = 0.4, } = params;
|
|
108
|
+
try {
|
|
109
|
+
// Get coherence service
|
|
110
|
+
const service = await this.getService();
|
|
111
|
+
// Create auditor if not exists
|
|
112
|
+
if (!this.auditor) {
|
|
113
|
+
this.auditor = createMemoryAuditor(service, undefined, {
|
|
114
|
+
energyThreshold,
|
|
115
|
+
hotspotThreshold: energyThreshold + 0.2,
|
|
116
|
+
maxRecommendations: 10,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
// Get memory backend and fetch patterns
|
|
120
|
+
const memory = await getSharedMemoryBackend();
|
|
121
|
+
const patternStore = createPatternStore(memory, {
|
|
122
|
+
namespace,
|
|
123
|
+
embeddingDimension: 128,
|
|
124
|
+
});
|
|
125
|
+
await patternStore.initialize();
|
|
126
|
+
// Search for all patterns (empty query returns all)
|
|
127
|
+
const searchResult = await patternStore.search('', {
|
|
128
|
+
limit: maxPatterns,
|
|
129
|
+
useVectorSearch: false,
|
|
130
|
+
});
|
|
131
|
+
const patterns = searchResult.success
|
|
132
|
+
? searchResult.value.map((r) => r.pattern)
|
|
133
|
+
: [];
|
|
134
|
+
// Run audit if we have patterns
|
|
135
|
+
let auditResult;
|
|
136
|
+
if (patterns.length > 0) {
|
|
137
|
+
auditResult = await this.auditor.auditPatterns(patterns);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
// No patterns - return empty audit
|
|
141
|
+
auditResult = {
|
|
142
|
+
totalPatterns: 0,
|
|
143
|
+
scannedPatterns: 0,
|
|
144
|
+
contradictionCount: 0,
|
|
145
|
+
globalEnergy: 0,
|
|
146
|
+
hotspots: [],
|
|
147
|
+
recommendations: [],
|
|
148
|
+
duration: 0,
|
|
149
|
+
timestamp: new Date(),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
// Calculate health score (0-100)
|
|
153
|
+
const healthScore = this.calculateHealthScore(auditResult);
|
|
154
|
+
this.markAsRealData();
|
|
155
|
+
return {
|
|
156
|
+
success: true,
|
|
157
|
+
data: {
|
|
158
|
+
totalPatterns: auditResult.totalPatterns,
|
|
159
|
+
scannedPatterns: auditResult.scannedPatterns,
|
|
160
|
+
contradictionCount: auditResult.contradictionCount,
|
|
161
|
+
globalEnergy: auditResult.globalEnergy,
|
|
162
|
+
hotspots: auditResult.hotspots.map((h) => ({
|
|
163
|
+
domain: h.domain,
|
|
164
|
+
patternIds: h.patternIds,
|
|
165
|
+
energy: h.energy,
|
|
166
|
+
description: h.description,
|
|
167
|
+
})),
|
|
168
|
+
recommendations: auditResult.recommendations.map((r) => ({
|
|
169
|
+
type: r.type,
|
|
170
|
+
patternIds: r.patternIds,
|
|
171
|
+
reason: r.reason,
|
|
172
|
+
priority: r.priority,
|
|
173
|
+
})),
|
|
174
|
+
durationMs: auditResult.duration,
|
|
175
|
+
timestamp: auditResult.timestamp.toISOString(),
|
|
176
|
+
healthScore,
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
// Check if WASM is unavailable - provide graceful fallback
|
|
182
|
+
if (error instanceof Error &&
|
|
183
|
+
error.message.includes('WASM')) {
|
|
184
|
+
this.markAsDemoData(context, 'WASM module unavailable');
|
|
185
|
+
return {
|
|
186
|
+
success: true,
|
|
187
|
+
data: {
|
|
188
|
+
totalPatterns: 0,
|
|
189
|
+
scannedPatterns: 0,
|
|
190
|
+
contradictionCount: 0,
|
|
191
|
+
globalEnergy: 0,
|
|
192
|
+
hotspots: [],
|
|
193
|
+
recommendations: [
|
|
194
|
+
{
|
|
195
|
+
type: 'review',
|
|
196
|
+
patternIds: [],
|
|
197
|
+
reason: 'WASM module unavailable - install prime-radiant-advanced-wasm for full audit',
|
|
198
|
+
priority: 'medium',
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
durationMs: 0,
|
|
202
|
+
timestamp: new Date().toISOString(),
|
|
203
|
+
healthScore: 100,
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
success: false,
|
|
209
|
+
error: error instanceof Error ? error.message : String(error),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Calculate memory health score (0-100)
|
|
215
|
+
*/
|
|
216
|
+
calculateHealthScore(result) {
|
|
217
|
+
let score = 100;
|
|
218
|
+
// Deduct for contradictions
|
|
219
|
+
score -= Math.min(30, result.contradictionCount * 5);
|
|
220
|
+
// Deduct for high energy
|
|
221
|
+
score -= Math.min(30, result.globalEnergy * 50);
|
|
222
|
+
// Deduct for hotspots
|
|
223
|
+
score -= Math.min(20, result.hotspots.length * 5);
|
|
224
|
+
// Deduct for critical recommendations
|
|
225
|
+
const criticalCount = result.recommendations.filter((r) => r.priority === 'high').length;
|
|
226
|
+
score -= Math.min(20, criticalCount * 5);
|
|
227
|
+
return Math.max(0, Math.round(score));
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Create a CoherenceAuditTool instance
|
|
232
|
+
*/
|
|
233
|
+
export function createCoherenceAuditTool() {
|
|
234
|
+
return new CoherenceAuditTool();
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../src/mcp/tools/coherence/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,WAAW,EAIX,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,sBAAsB,EACtB,UAAU,GACX,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,mBAAmB,GAIpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,kBAAkB,GAEnB,MAAM,4BAA4B,CAAC;AAwDpC,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,MAAM,sBAAsB,GAAkB;IAC5C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,2CAA2C;YACxD,OAAO,EAAE,aAAa;SACvB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,CAAC;YACV,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