agentic-qe 3.6.7 → 3.6.9
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/skills/README.md +1 -1
- package/.claude/skills/skills-manifest.json +1 -1
- package/package.json +5 -2
- package/scripts/benchmark-aqe-baseline.ts +614 -0
- package/v3/CHANGELOG.md +33 -0
- package/v3/dist/adapters/a2a/agent-cards/generator.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/agent-cards/generator.js +2 -1
- package/v3/dist/adapters/a2a/agent-cards/generator.js.map +1 -1
- package/v3/dist/adapters/a2a/auth/jwt-utils.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/auth/jwt-utils.js +3 -2
- package/v3/dist/adapters/a2a/auth/jwt-utils.js.map +1 -1
- package/v3/dist/adapters/a2a/auth/middleware.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/auth/middleware.js +3 -0
- package/v3/dist/adapters/a2a/auth/middleware.js.map +1 -1
- package/v3/dist/adapters/a2a/discovery/agent-health.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/discovery/agent-health.js +4 -3
- package/v3/dist/adapters/a2a/discovery/agent-health.js.map +1 -1
- package/v3/dist/adapters/a2a/discovery/file-watcher.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/discovery/file-watcher.js +3 -2
- package/v3/dist/adapters/a2a/discovery/file-watcher.js.map +1 -1
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.js +6 -5
- package/v3/dist/adapters/a2a/discovery/hot-reload-service.js.map +1 -1
- package/v3/dist/adapters/a2a/jsonrpc/envelope.d.ts.map +1 -1
- package/v3/dist/adapters/a2a/jsonrpc/envelope.js +5 -4
- package/v3/dist/adapters/a2a/jsonrpc/envelope.js.map +1 -1
- package/v3/dist/adapters/ag-ui/event-adapter.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/event-adapter.js +2 -1
- package/v3/dist/adapters/ag-ui/event-adapter.js.map +1 -1
- package/v3/dist/adapters/ag-ui/event-batcher.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/event-batcher.js +2 -1
- package/v3/dist/adapters/ag-ui/event-batcher.js.map +1 -1
- package/v3/dist/adapters/ag-ui/json-patch-utils.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/json-patch-utils.js +2 -1
- package/v3/dist/adapters/ag-ui/json-patch-utils.js.map +1 -1
- package/v3/dist/adapters/ag-ui/json-patch.d.ts +1 -1
- package/v3/dist/adapters/ag-ui/json-patch.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/json-patch.js +4 -6
- package/v3/dist/adapters/ag-ui/json-patch.js.map +1 -1
- package/v3/dist/adapters/ag-ui/stream-controller.d.ts.map +1 -1
- package/v3/dist/adapters/ag-ui/stream-controller.js +3 -0
- package/v3/dist/adapters/ag-ui/stream-controller.js.map +1 -1
- package/v3/dist/adapters/claude-flow/detect.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/detect.js +4 -3
- package/v3/dist/adapters/claude-flow/detect.js.map +1 -1
- package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js +7 -5
- package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -1
- package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -1
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js +2 -14
- package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -1
- package/v3/dist/adapters/trajectory-adapter.d.ts.map +1 -1
- package/v3/dist/adapters/trajectory-adapter.js +5 -3
- package/v3/dist/adapters/trajectory-adapter.js.map +1 -1
- package/v3/dist/agents/claim-verifier/verifiers/test-verifier.d.ts.map +1 -1
- package/v3/dist/agents/claim-verifier/verifiers/test-verifier.js +2 -1
- package/v3/dist/agents/claim-verifier/verifiers/test-verifier.js.map +1 -1
- package/v3/dist/benchmarks/performance-benchmarks.d.ts.map +1 -1
- package/v3/dist/benchmarks/performance-benchmarks.js +4 -3
- package/v3/dist/benchmarks/performance-benchmarks.js.map +1 -1
- package/v3/dist/benchmarks/run-benchmarks.js +27 -45
- package/v3/dist/benchmarks/run-benchmarks.js.map +1 -1
- package/v3/dist/cli/bundle.js +13395 -14755
- package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -1
- package/v3/dist/cli/commands/claude-flow-setup.js +7 -5
- package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -1
- package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
- package/v3/dist/cli/commands/hooks.js +2 -1
- package/v3/dist/cli/commands/hooks.js.map +1 -1
- package/v3/dist/cli/commands/init.d.ts.map +1 -1
- package/v3/dist/cli/commands/init.js +2 -1
- package/v3/dist/cli/commands/init.js.map +1 -1
- package/v3/dist/cli/commands/learning-helpers.d.ts +101 -0
- package/v3/dist/cli/commands/learning-helpers.d.ts.map +1 -0
- package/v3/dist/cli/commands/learning-helpers.js +294 -0
- package/v3/dist/cli/commands/learning-helpers.js.map +1 -0
- package/v3/dist/cli/commands/learning.d.ts +1 -6
- package/v3/dist/cli/commands/learning.d.ts.map +1 -1
- package/v3/dist/cli/commands/learning.js +230 -839
- package/v3/dist/cli/commands/learning.js.map +1 -1
- package/v3/dist/cli/commands/qe-tools.d.ts.map +1 -1
- package/v3/dist/cli/commands/qe-tools.js +2 -1
- package/v3/dist/cli/commands/qe-tools.js.map +1 -1
- package/v3/dist/cli/commands/sync.d.ts.map +1 -1
- package/v3/dist/cli/commands/sync.js +5 -4
- package/v3/dist/cli/commands/sync.js.map +1 -1
- package/v3/dist/cli/commands/token-usage.d.ts.map +1 -1
- package/v3/dist/cli/commands/token-usage.js +2 -1
- package/v3/dist/cli/commands/token-usage.js.map +1 -1
- package/v3/dist/cli/commands/validate.d.ts.map +1 -1
- package/v3/dist/cli/commands/validate.js +3 -2
- package/v3/dist/cli/commands/validate.js.map +1 -1
- package/v3/dist/cli/config/cli-config.d.ts.map +1 -1
- package/v3/dist/cli/config/cli-config.js +2 -1
- package/v3/dist/cli/config/cli-config.js.map +1 -1
- package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -1
- package/v3/dist/cli/handlers/init-handler.js +3 -2
- package/v3/dist/cli/handlers/init-handler.js.map +1 -1
- package/v3/dist/cli/helpers/safe-json.d.ts +4 -48
- package/v3/dist/cli/helpers/safe-json.d.ts.map +1 -1
- package/v3/dist/cli/helpers/safe-json.js +4 -68
- package/v3/dist/cli/helpers/safe-json.js.map +1 -1
- package/v3/dist/cli/index.js +3 -2
- package/v3/dist/cli/index.js.map +1 -1
- package/v3/dist/cli/scheduler/persistent-scheduler.d.ts.map +1 -1
- package/v3/dist/cli/scheduler/persistent-scheduler.js +4 -2
- package/v3/dist/cli/scheduler/persistent-scheduler.js.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.js +2 -1
- package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
- package/v3/dist/coordination/agent-teams/tracing.d.ts.map +1 -1
- package/v3/dist/coordination/agent-teams/tracing.js +2 -1
- package/v3/dist/coordination/agent-teams/tracing.js.map +1 -1
- package/v3/dist/coordination/circuit-breaker/breaker-registry.d.ts.map +1 -1
- package/v3/dist/coordination/circuit-breaker/breaker-registry.js +3 -2
- package/v3/dist/coordination/circuit-breaker/breaker-registry.js.map +1 -1
- package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.d.ts.map +1 -1
- package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.js +3 -2
- package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.js.map +1 -1
- package/v3/dist/coordination/consensus/consensus-engine.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/consensus-engine.js +7 -6
- package/v3/dist/coordination/consensus/consensus-engine.js.map +1 -1
- package/v3/dist/coordination/consensus/model-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/model-provider.js +2 -1
- package/v3/dist/coordination/consensus/model-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/claude-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/claude-provider.js +13 -12
- package/v3/dist/coordination/consensus/providers/claude-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/gemini-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/gemini-provider.js +13 -12
- package/v3/dist/coordination/consensus/providers/gemini-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/native-learning-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/native-learning-provider.js +3 -2
- package/v3/dist/coordination/consensus/providers/native-learning-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/ollama-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/ollama-provider.js +3 -2
- package/v3/dist/coordination/consensus/providers/ollama-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/openai-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/openai-provider.js +3 -2
- package/v3/dist/coordination/consensus/providers/openai-provider.js.map +1 -1
- package/v3/dist/coordination/consensus/providers/openrouter-provider.d.ts.map +1 -1
- package/v3/dist/coordination/consensus/providers/openrouter-provider.js +3 -2
- package/v3/dist/coordination/consensus/providers/openrouter-provider.js.map +1 -1
- package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.d.ts.map +1 -1
- package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.js +5 -4
- package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.js.map +1 -1
- package/v3/dist/coordination/mincut/dream-integration.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/dream-integration.js.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +4 -2
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.js +13 -3
- package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
- package/v3/dist/coordination/mincut/mincut-persistence.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/mincut-persistence.js +5 -4
- package/v3/dist/coordination/mincut/mincut-persistence.js.map +1 -1
- package/v3/dist/coordination/mincut/neural-goap.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/neural-goap.js +2 -1
- package/v3/dist/coordination/mincut/neural-goap.js.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.js +7 -2
- package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
- package/v3/dist/coordination/mincut/strange-loop.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/strange-loop.js +10 -2
- package/v3/dist/coordination/mincut/strange-loop.js.map +1 -1
- package/v3/dist/coordination/mincut/time-crystal.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/time-crystal.js +2 -1
- package/v3/dist/coordination/mincut/time-crystal.js.map +1 -1
- package/v3/dist/coordination/mixins/consensus-enabled-domain.d.ts +19 -3
- package/v3/dist/coordination/mixins/consensus-enabled-domain.d.ts.map +1 -1
- package/v3/dist/coordination/mixins/consensus-enabled-domain.js +6 -2
- package/v3/dist/coordination/mixins/consensus-enabled-domain.js.map +1 -1
- package/v3/dist/coordination/plugin.d.ts +1 -1
- package/v3/dist/coordination/plugin.d.ts.map +1 -1
- package/v3/dist/coordination/plugin.js +1 -1
- package/v3/dist/coordination/plugin.js.map +1 -1
- package/v3/dist/coordination/protocol-executor.d.ts.map +1 -1
- package/v3/dist/coordination/protocol-executor.js +4 -3
- package/v3/dist/coordination/protocol-executor.js.map +1 -1
- package/v3/dist/coordination/protocols/code-intelligence-index.d.ts +1 -1
- package/v3/dist/coordination/protocols/code-intelligence-index.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/code-intelligence-index.js +22 -10
- package/v3/dist/coordination/protocols/code-intelligence-index.js.map +1 -1
- package/v3/dist/coordination/protocols/defect-investigation.d.ts +2 -2
- package/v3/dist/coordination/protocols/defect-investigation.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/defect-investigation.js +16 -7
- package/v3/dist/coordination/protocols/defect-investigation.js.map +1 -1
- package/v3/dist/coordination/protocols/learning-consolidation.d.ts +1 -1
- package/v3/dist/coordination/protocols/learning-consolidation.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/learning-consolidation.js +6 -5
- package/v3/dist/coordination/protocols/learning-consolidation.js.map +1 -1
- package/v3/dist/coordination/protocols/morning-sync.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/morning-sync.js +2 -1
- package/v3/dist/coordination/protocols/morning-sync.js.map +1 -1
- package/v3/dist/coordination/protocols/quality-gate.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/quality-gate.js +6 -5
- package/v3/dist/coordination/protocols/quality-gate.js.map +1 -1
- package/v3/dist/coordination/protocols/security-audit.d.ts +1 -1
- package/v3/dist/coordination/protocols/security-audit.d.ts.map +1 -1
- package/v3/dist/coordination/protocols/security-audit.js +35 -13
- package/v3/dist/coordination/protocols/security-audit.js.map +1 -1
- package/v3/dist/coordination/queen-coordinator.d.ts +26 -257
- package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
- package/v3/dist/coordination/queen-coordinator.js +282 -1175
- package/v3/dist/coordination/queen-coordinator.js.map +1 -1
- package/v3/dist/coordination/queen-event-handlers.d.ts +61 -0
- package/v3/dist/coordination/queen-event-handlers.d.ts.map +1 -0
- package/v3/dist/coordination/queen-event-handlers.js +311 -0
- package/v3/dist/coordination/queen-event-handlers.js.map +1 -0
- package/v3/dist/coordination/queen-lifecycle.d.ts +61 -0
- package/v3/dist/coordination/queen-lifecycle.d.ts.map +1 -0
- package/v3/dist/coordination/queen-lifecycle.js +162 -0
- package/v3/dist/coordination/queen-lifecycle.js.map +1 -0
- package/v3/dist/coordination/queen-task-management.d.ts +84 -0
- package/v3/dist/coordination/queen-task-management.d.ts.map +1 -0
- package/v3/dist/coordination/queen-task-management.js +333 -0
- package/v3/dist/coordination/queen-task-management.js.map +1 -0
- package/v3/dist/coordination/queen-types.d.ts +175 -0
- package/v3/dist/coordination/queen-types.d.ts.map +1 -0
- package/v3/dist/coordination/queen-types.js +80 -0
- package/v3/dist/coordination/queen-types.js.map +1 -0
- package/v3/dist/coordination/queen-work-stealing.d.ts +33 -0
- package/v3/dist/coordination/queen-work-stealing.d.ts.map +1 -0
- package/v3/dist/coordination/queen-work-stealing.js +78 -0
- package/v3/dist/coordination/queen-work-stealing.js.map +1 -0
- package/v3/dist/coordination/result-saver.d.ts.map +1 -1
- package/v3/dist/coordination/result-saver.js +2 -1
- package/v3/dist/coordination/result-saver.js.map +1 -1
- package/v3/dist/coordination/task-executor.d.ts +45 -2
- package/v3/dist/coordination/task-executor.d.ts.map +1 -1
- package/v3/dist/coordination/task-executor.js +643 -570
- package/v3/dist/coordination/task-executor.js.map +1 -1
- package/v3/dist/coordination/workflow-builtin.d.ts +17 -0
- package/v3/dist/coordination/workflow-builtin.d.ts.map +1 -0
- package/v3/dist/coordination/workflow-builtin.js +648 -0
- package/v3/dist/coordination/workflow-builtin.js.map +1 -0
- package/v3/dist/coordination/workflow-orchestrator.d.ts +13 -300
- package/v3/dist/coordination/workflow-orchestrator.d.ts.map +1 -1
- package/v3/dist/coordination/workflow-orchestrator.js +142 -1009
- package/v3/dist/coordination/workflow-orchestrator.js.map +1 -1
- package/v3/dist/coordination/workflow-types.d.ts +250 -0
- package/v3/dist/coordination/workflow-types.d.ts.map +1 -0
- package/v3/dist/coordination/workflow-types.js +27 -0
- package/v3/dist/coordination/workflow-types.js.map +1 -0
- package/v3/dist/domains/base-domain-coordinator.d.ts +119 -0
- package/v3/dist/domains/base-domain-coordinator.d.ts.map +1 -0
- package/v3/dist/domains/base-domain-coordinator.js +200 -0
- package/v3/dist/domains/base-domain-coordinator.js.map +1 -0
- package/v3/dist/domains/chaos-resilience/coordinator.d.ts +12 -70
- package/v3/dist/domains/chaos-resilience/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/coordinator.js +25 -181
- package/v3/dist/domains/chaos-resilience/coordinator.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.js +2 -1
- package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.js +15 -13
- package/v3/dist/domains/chaos-resilience/services/chaos-engineer.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/load-tester.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/load-tester.js +8 -7
- package/v3/dist/domains/chaos-resilience/services/load-tester.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.d.ts.map +1 -1
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.js +7 -5
- package/v3/dist/domains/chaos-resilience/services/performance-profiler.js.map +1 -1
- package/v3/dist/domains/code-intelligence/coordinator-consensus.d.ts +33 -0
- package/v3/dist/domains/code-intelligence/coordinator-consensus.d.ts.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-consensus.js +81 -0
- package/v3/dist/domains/code-intelligence/coordinator-consensus.js.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-gnn.d.ts +44 -0
- package/v3/dist/domains/code-intelligence/coordinator-gnn.d.ts.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-gnn.js +183 -0
- package/v3/dist/domains/code-intelligence/coordinator-gnn.js.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-hypergraph.d.ts +40 -0
- package/v3/dist/domains/code-intelligence/coordinator-hypergraph.d.ts.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator-hypergraph.js +191 -0
- package/v3/dist/domains/code-intelligence/coordinator-hypergraph.js.map +1 -0
- package/v3/dist/domains/code-intelligence/coordinator.d.ts +17 -93
- package/v3/dist/domains/code-intelligence/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/coordinator.js +46 -565
- package/v3/dist/domains/code-intelligence/coordinator.js.map +1 -1
- package/v3/dist/domains/code-intelligence/index.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/index.js +10 -0
- package/v3/dist/domains/code-intelligence/index.js.map +1 -1
- package/v3/dist/domains/code-intelligence/plugin.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/plugin.js +2 -1
- package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/c4-model/index.d.ts +3 -3
- package/v3/dist/domains/code-intelligence/services/c4-model/index.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/c4-model/index.js +2 -2
- package/v3/dist/domains/code-intelligence/services/c4-model/index.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/c4-model/types.d.ts +1 -1
- package/v3/dist/domains/code-intelligence/services/c4-model/types.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/impact-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/impact-analyzer.js +3 -2
- package/v3/dist/domains/code-intelligence/services/impact-analyzer.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.js +8 -6
- package/v3/dist/domains/code-intelligence/services/knowledge-graph.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/metric-collector/loc-counter.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/metric-collector/loc-counter.js +3 -2
- package/v3/dist/domains/code-intelligence/services/metric-collector/loc-counter.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/metric-collector/test-counter.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/metric-collector/test-counter.js +3 -2
- package/v3/dist/domains/code-intelligence/services/metric-collector/test-counter.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js +8 -6
- package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js.map +1 -1
- package/v3/dist/domains/code-intelligence/services/semantic-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/code-intelligence/services/semantic-analyzer.js +5 -4
- package/v3/dist/domains/code-intelligence/services/semantic-analyzer.js.map +1 -1
- package/v3/dist/domains/contract-testing/coordinator.d.ts +13 -89
- package/v3/dist/domains/contract-testing/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/coordinator.js +43 -215
- package/v3/dist/domains/contract-testing/coordinator.js.map +1 -1
- package/v3/dist/domains/contract-testing/plugin.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/plugin.js +5 -4
- package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
- package/v3/dist/domains/contract-testing/services/api-compatibility.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/services/api-compatibility.js +7 -5
- package/v3/dist/domains/contract-testing/services/api-compatibility.js.map +1 -1
- package/v3/dist/domains/contract-testing/services/contract-validator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/services/contract-validator.js +10 -8
- package/v3/dist/domains/contract-testing/services/contract-validator.js.map +1 -1
- package/v3/dist/domains/contract-testing/services/schema-validator.d.ts.map +1 -1
- package/v3/dist/domains/contract-testing/services/schema-validator.js +10 -8
- package/v3/dist/domains/contract-testing/services/schema-validator.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/coordinator.d.ts +8 -59
- package/v3/dist/domains/coverage-analysis/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/coordinator.js +30 -138
- package/v3/dist/domains/coverage-analysis/coordinator.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/index.js +7 -0
- package/v3/dist/domains/coverage-analysis/index.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.js +5 -3
- package/v3/dist/domains/coverage-analysis/services/coverage-analyzer.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-parser.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-parser.js +2 -1
- package/v3/dist/domains/coverage-analysis/services/coverage-parser.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/gap-detector.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/gap-detector.js +6 -4
- package/v3/dist/domains/coverage-analysis/services/gap-detector.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/ghost-coverage-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/ghost-coverage-analyzer.js +5 -4
- package/v3/dist/domains/coverage-analysis/services/ghost-coverage-analyzer.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/risk-scorer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/risk-scorer.js +3 -2
- package/v3/dist/domains/coverage-analysis/services/risk-scorer.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/sublinear-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/services/sublinear-analyzer.js +4 -3
- package/v3/dist/domains/coverage-analysis/services/sublinear-analyzer.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/coordinator.d.ts +10 -58
- package/v3/dist/domains/defect-intelligence/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/coordinator.js +50 -171
- package/v3/dist/domains/defect-intelligence/coordinator.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/plugin.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/plugin.js +2 -1
- package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/causal-root-cause-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/causal-root-cause-analyzer.js +4 -3
- package/v3/dist/domains/defect-intelligence/services/causal-root-cause-analyzer.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.js +6 -4
- package/v3/dist/domains/defect-intelligence/services/defect-predictor.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/pattern-learner.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/pattern-learner.js +4 -3
- package/v3/dist/domains/defect-intelligence/services/pattern-learner.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/root-cause-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/defect-intelligence/services/root-cause-analyzer.js +6 -4
- package/v3/dist/domains/defect-intelligence/services/root-cause-analyzer.js.map +1 -1
- package/v3/dist/domains/domain-interface.d.ts +6 -219
- package/v3/dist/domains/domain-interface.d.ts.map +1 -1
- package/v3/dist/domains/domain-interface.js +6 -312
- package/v3/dist/domains/domain-interface.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/coordinator.d.ts +11 -37
- package/v3/dist/domains/enterprise-integration/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/coordinator.js +39 -148
- package/v3/dist/domains/enterprise-integration/coordinator.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/plugin.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/plugin.js +2 -1
- package/v3/dist/domains/enterprise-integration/plugin.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/esb-middleware-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/esb-middleware-service.js +7 -5
- package/v3/dist/domains/enterprise-integration/services/esb-middleware-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/message-broker-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/message-broker-service.js +11 -9
- package/v3/dist/domains/enterprise-integration/services/message-broker-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/odata-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/odata-service.js +4 -3
- package/v3/dist/domains/enterprise-integration/services/odata-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/sap-integration-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/sap-integration-service.js +5 -3
- package/v3/dist/domains/enterprise-integration/services/sap-integration-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.js +4 -3
- package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.js.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/sod-analysis-service.d.ts.map +1 -1
- package/v3/dist/domains/enterprise-integration/services/sod-analysis-service.js +3 -2
- package/v3/dist/domains/enterprise-integration/services/sod-analysis-service.js.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator-consensus.d.ts +37 -0
- package/v3/dist/domains/learning-optimization/coordinator-consensus.d.ts.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-consensus.js +82 -0
- package/v3/dist/domains/learning-optimization/coordinator-consensus.js.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-dream.d.ts +32 -0
- package/v3/dist/domains/learning-optimization/coordinator-dream.d.ts.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-dream.js +43 -0
- package/v3/dist/domains/learning-optimization/coordinator-dream.js.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-helpers.d.ts +56 -0
- package/v3/dist/domains/learning-optimization/coordinator-helpers.d.ts.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-helpers.js +142 -0
- package/v3/dist/domains/learning-optimization/coordinator-helpers.js.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-sona-methods.d.ts +64 -0
- package/v3/dist/domains/learning-optimization/coordinator-sona-methods.d.ts.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator-sona-methods.js +73 -0
- package/v3/dist/domains/learning-optimization/coordinator-sona-methods.js.map +1 -0
- package/v3/dist/domains/learning-optimization/coordinator.d.ts +17 -82
- package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.js +36 -320
- package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.js +2 -1
- package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.js +11 -10
- package/v3/dist/domains/learning-optimization/services/learning-coordinator.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/metrics-optimizer.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/metrics-optimizer.js +8 -7
- package/v3/dist/domains/learning-optimization/services/metrics-optimizer.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/production-intel.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/production-intel.js +11 -10
- package/v3/dist/domains/learning-optimization/services/production-intel.js.map +1 -1
- package/v3/dist/domains/learning-optimization/services/transfer-specialist.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/services/transfer-specialist.js +8 -7
- package/v3/dist/domains/learning-optimization/services/transfer-specialist.js.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator-claim-verifier.d.ts +41 -0
- package/v3/dist/domains/quality-assessment/coordinator-claim-verifier.d.ts.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-claim-verifier.js +157 -0
- package/v3/dist/domains/quality-assessment/coordinator-claim-verifier.js.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-gate-evaluation.d.ts +26 -0
- package/v3/dist/domains/quality-assessment/coordinator-gate-evaluation.d.ts.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-gate-evaluation.js +135 -0
- package/v3/dist/domains/quality-assessment/coordinator-gate-evaluation.js.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-reports.d.ts +90 -0
- package/v3/dist/domains/quality-assessment/coordinator-reports.d.ts.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-reports.js +265 -0
- package/v3/dist/domains/quality-assessment/coordinator-reports.js.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-rl-integration.d.ts +92 -0
- package/v3/dist/domains/quality-assessment/coordinator-rl-integration.d.ts.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator-rl-integration.js +321 -0
- package/v3/dist/domains/quality-assessment/coordinator-rl-integration.js.map +1 -0
- package/v3/dist/domains/quality-assessment/coordinator.d.ts +18 -127
- package/v3/dist/domains/quality-assessment/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator.js +58 -1022
- package/v3/dist/domains/quality-assessment/coordinator.js.map +1 -1
- package/v3/dist/domains/quality-assessment/index.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/index.js +10 -0
- package/v3/dist/domains/quality-assessment/index.js.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.js +2 -1
- package/v3/dist/domains/quality-assessment/plugin.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/coherence-gate.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/coherence-gate.js +2 -1
- package/v3/dist/domains/quality-assessment/services/coherence-gate.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.js +5 -3
- package/v3/dist/domains/quality-assessment/services/deployment-advisor.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.js +6 -4
- package/v3/dist/domains/quality-assessment/services/quality-analyzer.js.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-gate.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/services/quality-gate.js +3 -2
- package/v3/dist/domains/quality-assessment/services/quality-gate.js.map +1 -1
- package/v3/dist/domains/requirements-validation/coordinator.d.ts +17 -61
- package/v3/dist/domains/requirements-validation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/coordinator.js +25 -175
- package/v3/dist/domains/requirements-validation/coordinator.js.map +1 -1
- package/v3/dist/domains/requirements-validation/plugin.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/plugin.js +2 -1
- package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js +12 -11
- package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-refinement-plugin.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/qcsd-refinement-plugin.js +11 -10
- package/v3/dist/domains/requirements-validation/qcsd-refinement-plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/services/bdd-scenario-writer.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/bdd-scenario-writer.js +4 -3
- package/v3/dist/domains/requirements-validation/services/bdd-scenario-writer.js.map +1 -1
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js +3 -2
- package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js.map +1 -1
- package/v3/dist/domains/requirements-validation/services/requirements-validator.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/requirements-validator.js +7 -5
- package/v3/dist/domains/requirements-validation/services/requirements-validator.js.map +1 -1
- package/v3/dist/domains/requirements-validation/services/testability-scorer.d.ts.map +1 -1
- package/v3/dist/domains/requirements-validation/services/testability-scorer.js +4 -3
- package/v3/dist/domains/requirements-validation/services/testability-scorer.js.map +1 -1
- package/v3/dist/domains/security-compliance/coordinator.d.ts +12 -58
- package/v3/dist/domains/security-compliance/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/coordinator.js +22 -164
- package/v3/dist/domains/security-compliance/coordinator.js.map +1 -1
- package/v3/dist/domains/security-compliance/index.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/index.js +14 -0
- package/v3/dist/domains/security-compliance/index.js.map +1 -1
- package/v3/dist/domains/security-compliance/plugin.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/plugin.js +2 -1
- package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/compliance-validator.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/compliance-validator.js +6 -5
- package/v3/dist/domains/security-compliance/services/compliance-validator.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js +2 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js +4 -3
- package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js +7 -5
- package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts +2 -2
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js +6 -4
- package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts +2 -2
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js +3 -2
- package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +2 -2
- package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-auditor-dast.d.ts +11 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-dast.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-dast.js +284 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-dast.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-reports.d.ts +44 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-reports.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-reports.js +193 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-reports.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-sast.d.ts +27 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-sast.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-sast.js +279 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-sast.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-secrets.d.ts +34 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-secrets.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-secrets.js +236 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-secrets.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-types.d.ts +93 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-types.d.ts.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-types.js +50 -0
- package/v3/dist/domains/security-compliance/services/security-auditor-types.js.map +1 -0
- package/v3/dist/domains/security-compliance/services/security-auditor.d.ts +12 -132
- package/v3/dist/domains/security-compliance/services/security-auditor.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/security-auditor.js +71 -1188
- package/v3/dist/domains/security-compliance/services/security-auditor.js.map +1 -1
- package/v3/dist/domains/security-compliance/services/semgrep-integration.d.ts.map +1 -1
- package/v3/dist/domains/security-compliance/services/semgrep-integration.js +4 -2
- package/v3/dist/domains/security-compliance/services/semgrep-integration.js.map +1 -1
- package/v3/dist/domains/test-execution/coordinator.d.ts +8 -60
- package/v3/dist/domains/test-execution/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/coordinator.js +19 -132
- package/v3/dist/domains/test-execution/coordinator.js.map +1 -1
- package/v3/dist/domains/test-execution/services/auth-state-manager.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/auth-state-manager.js +2 -1
- package/v3/dist/domains/test-execution/services/auth-state-manager.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts +2 -2
- package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts +2 -2
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js +2 -1
- package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts +2 -2
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js +3 -2
- package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts +1 -1
- package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/step-executors.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/step-executors.js +2 -1
- package/v3/dist/domains/test-execution/services/e2e/step-executors.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js +3 -2
- package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/types.d.ts +2 -2
- package/v3/dist/domains/test-execution/services/e2e/types.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts +1 -1
- package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/flaky-detector.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/flaky-detector.js +7 -5
- package/v3/dist/domains/test-execution/services/flaky-detector.js.map +1 -1
- package/v3/dist/domains/test-execution/services/retry-handler.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/retry-handler.js +8 -6
- package/v3/dist/domains/test-execution/services/retry-handler.js.map +1 -1
- package/v3/dist/domains/test-execution/services/test-executor.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/test-executor.js +8 -6
- package/v3/dist/domains/test-execution/services/test-executor.js.map +1 -1
- package/v3/dist/domains/test-execution/services/test-prioritizer.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/test-prioritizer.js +2 -1
- package/v3/dist/domains/test-execution/services/test-prioritizer.js.map +1 -1
- package/v3/dist/domains/test-execution/services/user-flow-generator.d.ts +28 -0
- package/v3/dist/domains/test-execution/services/user-flow-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/services/user-flow-generator.js +156 -189
- package/v3/dist/domains/test-execution/services/user-flow-generator.js.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.d.ts +14 -78
- package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.js +58 -202
- package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
- package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts +10 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/generators/base-test-generator.js +37 -30
- package/v3/dist/domains/test-generation/generators/base-test-generator.js.map +1 -1
- package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/index.js +10 -0
- package/v3/dist/domains/test-generation/index.js.map +1 -1
- package/v3/dist/domains/test-generation/plugin.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/plugin.js +2 -1
- package/v3/dist/domains/test-generation/plugin.js.map +1 -1
- package/v3/dist/domains/test-generation/services/code-transform-integration.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/code-transform-integration.js +2 -1
- package/v3/dist/domains/test-generation/services/code-transform-integration.js.map +1 -1
- package/v3/dist/domains/test-generation/services/pattern-matcher.d.ts +10 -0
- package/v3/dist/domains/test-generation/services/pattern-matcher.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/pattern-matcher.js +43 -41
- package/v3/dist/domains/test-generation/services/pattern-matcher.js.map +1 -1
- package/v3/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/test-generator.js +47 -17
- package/v3/dist/domains/test-generation/services/test-generator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/coordinator.d.ts +17 -60
- package/v3/dist/domains/visual-accessibility/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/coordinator.js +32 -183
- package/v3/dist/domains/visual-accessibility/coordinator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.js +4 -3
- package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-browser.d.ts +114 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-browser.d.ts.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-browser.js +578 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-browser.js.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.d.ts +54 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.d.ts.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.js +403 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.js.map +1 -0
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +1 -314
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +79 -1467
- package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-audit.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-audit.js +2 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-audit.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-integration.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/axe-core-integration.js +5 -4
- package/v3/dist/domains/visual-accessibility/services/axe-core-integration.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js +5 -4
- package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-swarm-coordinator.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/browser-swarm-coordinator.js +8 -7
- package/v3/dist/domains/visual-accessibility/services/browser-swarm-coordinator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +2 -1
- package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/responsive-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/responsive-tester.js +5 -4
- package/v3/dist/domains/visual-accessibility/services/responsive-tester.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.js +7 -6
- package/v3/dist/domains/visual-accessibility/services/viewport-capture.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-regression.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-regression.js +11 -10
- package/v3/dist/domains/visual-accessibility/services/visual-regression.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-tester.d.ts.map +1 -1
- package/v3/dist/domains/visual-accessibility/services/visual-tester.js +7 -6
- package/v3/dist/domains/visual-accessibility/services/visual-tester.js.map +1 -1
- package/v3/dist/early-exit/early-exit-controller.d.ts.map +1 -1
- package/v3/dist/early-exit/early-exit-controller.js +4 -3
- package/v3/dist/early-exit/early-exit-controller.js.map +1 -1
- package/v3/dist/feedback/coverage-learner.d.ts.map +1 -1
- package/v3/dist/feedback/coverage-learner.js +7 -5
- package/v3/dist/feedback/coverage-learner.js.map +1 -1
- package/v3/dist/feedback/test-outcome-tracker.d.ts.map +1 -1
- package/v3/dist/feedback/test-outcome-tracker.js +6 -4
- package/v3/dist/feedback/test-outcome-tracker.js.map +1 -1
- package/v3/dist/governance/adversarial-defense-integration.d.ts +0 -18
- package/v3/dist/governance/adversarial-defense-integration.d.ts.map +1 -1
- package/v3/dist/governance/adversarial-defense-integration.js +2 -1
- package/v3/dist/governance/adversarial-defense-integration.js.map +1 -1
- package/v3/dist/governance/compliance-reporter.d.ts +0 -16
- package/v3/dist/governance/compliance-reporter.d.ts.map +1 -1
- package/v3/dist/governance/compliance-reporter.js +6 -8
- package/v3/dist/governance/compliance-reporter.js.map +1 -1
- package/v3/dist/governance/continue-gate-integration.d.ts.map +1 -1
- package/v3/dist/governance/continue-gate-integration.js +3 -2
- package/v3/dist/governance/continue-gate-integration.js.map +1 -1
- package/v3/dist/governance/evolution-pipeline-integration.d.ts.map +1 -1
- package/v3/dist/governance/evolution-pipeline-integration.js +3 -2
- package/v3/dist/governance/evolution-pipeline-integration.js.map +1 -1
- package/v3/dist/governance/proof-envelope-integration.d.ts.map +1 -1
- package/v3/dist/governance/proof-envelope-integration.js +4 -4
- package/v3/dist/governance/proof-envelope-integration.js.map +1 -1
- package/v3/dist/governance/shard-embeddings.d.ts.map +1 -1
- package/v3/dist/governance/shard-embeddings.js +16 -2
- package/v3/dist/governance/shard-embeddings.js.map +1 -1
- package/v3/dist/governance/shard-retriever-integration.d.ts.map +1 -1
- package/v3/dist/governance/shard-retriever-integration.js +4 -3
- package/v3/dist/governance/shard-retriever-integration.js.map +1 -1
- package/v3/dist/governance/wasm-kernel-integration.d.ts.map +1 -1
- package/v3/dist/governance/wasm-kernel-integration.js +4 -2
- package/v3/dist/governance/wasm-kernel-integration.js.map +1 -1
- package/v3/dist/hooks/reasoning-bank-pattern-store.d.ts.map +1 -1
- package/v3/dist/hooks/reasoning-bank-pattern-store.js +3 -2
- package/v3/dist/hooks/reasoning-bank-pattern-store.js.map +1 -1
- package/v3/dist/hooks/task-completed-hook.d.ts.map +1 -1
- package/v3/dist/hooks/task-completed-hook.js +3 -2
- package/v3/dist/hooks/task-completed-hook.js.map +1 -1
- package/v3/dist/init/agents-installer.d.ts.map +1 -1
- package/v3/dist/init/agents-installer.js +2 -1
- package/v3/dist/init/agents-installer.js.map +1 -1
- package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -1
- package/v3/dist/init/enhancements/claude-flow-adapter.js +3 -2
- package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -1
- package/v3/dist/init/fleet-integration.d.ts.map +1 -1
- package/v3/dist/init/fleet-integration.js +2 -1
- package/v3/dist/init/fleet-integration.js.map +1 -1
- package/v3/dist/init/governance-installer.d.ts.map +1 -1
- package/v3/dist/init/governance-installer.js +5 -4
- package/v3/dist/init/governance-installer.js.map +1 -1
- package/v3/dist/init/init-wizard-hooks.d.ts +26 -0
- package/v3/dist/init/init-wizard-hooks.d.ts.map +1 -0
- package/v3/dist/init/init-wizard-hooks.js +555 -0
- package/v3/dist/init/init-wizard-hooks.js.map +1 -0
- package/v3/dist/init/init-wizard-migration.d.ts +52 -0
- package/v3/dist/init/init-wizard-migration.d.ts.map +1 -0
- package/v3/dist/init/init-wizard-migration.js +349 -0
- package/v3/dist/init/init-wizard-migration.js.map +1 -0
- package/v3/dist/init/init-wizard-steps.d.ts +68 -0
- package/v3/dist/init/init-wizard-steps.d.ts.map +1 -0
- package/v3/dist/init/init-wizard-steps.js +457 -0
- package/v3/dist/init/init-wizard-steps.js.map +1 -0
- package/v3/dist/init/init-wizard.d.ts +8 -130
- package/v3/dist/init/init-wizard.d.ts.map +1 -1
- package/v3/dist/init/init-wizard.js +108 -1528
- package/v3/dist/init/init-wizard.js.map +1 -1
- package/v3/dist/init/migration/config-migrator.d.ts.map +1 -1
- package/v3/dist/init/migration/config-migrator.js +2 -1
- package/v3/dist/init/migration/config-migrator.js.map +1 -1
- package/v3/dist/init/migration/data-migrator.d.ts.map +1 -1
- package/v3/dist/init/migration/data-migrator.js +10 -9
- package/v3/dist/init/migration/data-migrator.js.map +1 -1
- package/v3/dist/init/migration/detector.d.ts.map +1 -1
- package/v3/dist/init/migration/detector.js +2 -1
- package/v3/dist/init/migration/detector.js.map +1 -1
- package/v3/dist/init/n8n-installer.d.ts.map +1 -1
- package/v3/dist/init/n8n-installer.js +4 -3
- package/v3/dist/init/n8n-installer.js.map +1 -1
- package/v3/dist/init/orchestrator.d.ts.map +1 -1
- package/v3/dist/init/orchestrator.js +2 -1
- package/v3/dist/init/orchestrator.js.map +1 -1
- package/v3/dist/init/phases/01-detection.d.ts.map +1 -1
- package/v3/dist/init/phases/01-detection.js +2 -1
- package/v3/dist/init/phases/01-detection.js.map +1 -1
- package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -1
- package/v3/dist/init/phases/06-code-intelligence.js +2 -1
- package/v3/dist/init/phases/06-code-intelligence.js.map +1 -1
- package/v3/dist/init/phases/07-hooks.d.ts.map +1 -1
- package/v3/dist/init/phases/07-hooks.js +2 -1
- package/v3/dist/init/phases/07-hooks.js.map +1 -1
- package/v3/dist/init/phases/08-mcp.d.ts.map +1 -1
- package/v3/dist/init/phases/08-mcp.js +3 -2
- package/v3/dist/init/phases/08-mcp.js.map +1 -1
- package/v3/dist/init/phases/phase-interface.d.ts.map +1 -1
- package/v3/dist/init/phases/phase-interface.js +3 -2
- package/v3/dist/init/phases/phase-interface.js.map +1 -1
- package/v3/dist/init/project-analyzer.d.ts.map +1 -1
- package/v3/dist/init/project-analyzer.js +3 -2
- package/v3/dist/init/project-analyzer.js.map +1 -1
- package/v3/dist/init/skills-installer.d.ts.map +1 -1
- package/v3/dist/init/skills-installer.js +2 -1
- package/v3/dist/init/skills-installer.js.map +1 -1
- package/v3/dist/integrations/agent-booster-wasm/index.d.ts.map +1 -1
- package/v3/dist/integrations/agent-booster-wasm/index.js +4 -1
- package/v3/dist/integrations/agent-booster-wasm/index.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/metrics/pattern-updater.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/metrics/pattern-updater.js +6 -4
- package/v3/dist/integrations/agentic-flow/metrics/pattern-updater.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/onnx-embeddings/adapter.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/onnx-embeddings/adapter.js +10 -0
- package/v3/dist/integrations/agentic-flow/onnx-embeddings/adapter.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/pattern-loader.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/pattern-loader.js +4 -2
- package/v3/dist/integrations/agentic-flow/pattern-loader.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts +4 -2
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +70 -43
- package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/index.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/index.js +2 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/index.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.js +6 -5
- package/v3/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js +7 -6
- package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/client.d.ts.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/client.js +33 -31
- package/v3/dist/integrations/browser/agent-browser/client.js.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/command-executor.d.ts.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/command-executor.js +42 -22
- package/v3/dist/integrations/browser/agent-browser/command-executor.js.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/snapshot-parser.d.ts.map +1 -1
- package/v3/dist/integrations/browser/agent-browser/snapshot-parser.js +2 -1
- package/v3/dist/integrations/browser/agent-browser/snapshot-parser.js.map +1 -1
- package/v3/dist/integrations/browser/web-content-fetcher.d.ts.map +1 -1
- package/v3/dist/integrations/browser/web-content-fetcher.js +4 -2
- package/v3/dist/integrations/browser/web-content-fetcher.js.map +1 -1
- package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/coherence-service.js +4 -3
- package/v3/dist/integrations/coherence/coherence-service.js.map +1 -1
- package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js +4 -3
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -1
- package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/wasm-loader.js +4 -3
- package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -1
- package/v3/dist/integrations/embeddings/cache/EmbeddingCache.d.ts +6 -0
- package/v3/dist/integrations/embeddings/cache/EmbeddingCache.d.ts.map +1 -1
- package/v3/dist/integrations/embeddings/cache/EmbeddingCache.js +35 -6
- package/v3/dist/integrations/embeddings/cache/EmbeddingCache.js.map +1 -1
- package/v3/dist/integrations/n8n/agent-factory.d.ts.map +1 -1
- package/v3/dist/integrations/n8n/agent-factory.js +2 -1
- package/v3/dist/integrations/n8n/agent-factory.js.map +1 -1
- package/v3/dist/integrations/rl-suite/base-algorithm.d.ts.map +1 -1
- package/v3/dist/integrations/rl-suite/base-algorithm.js +8 -3
- package/v3/dist/integrations/rl-suite/base-algorithm.js.map +1 -1
- package/v3/dist/integrations/rl-suite/persistence/q-value-store.d.ts.map +1 -1
- package/v3/dist/integrations/rl-suite/persistence/q-value-store.js +2 -1
- package/v3/dist/integrations/rl-suite/persistence/q-value-store.js.map +1 -1
- package/v3/dist/integrations/ruvector/ast-complexity.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/ast-complexity.js +3 -2
- package/v3/dist/integrations/ruvector/ast-complexity.js.map +1 -1
- package/v3/dist/integrations/ruvector/attention-wrapper.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/attention-wrapper.js +2 -1
- package/v3/dist/integrations/ruvector/attention-wrapper.js.map +1 -1
- package/v3/dist/integrations/ruvector/coverage-router.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/coverage-router.js +3 -2
- package/v3/dist/integrations/ruvector/coverage-router.js.map +1 -1
- package/v3/dist/integrations/ruvector/diff-risk-classifier.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/diff-risk-classifier.js +3 -2
- package/v3/dist/integrations/ruvector/diff-risk-classifier.js.map +1 -1
- package/v3/dist/integrations/ruvector/gnn-wrapper.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/gnn-wrapper.js +2 -1
- package/v3/dist/integrations/ruvector/gnn-wrapper.js.map +1 -1
- package/v3/dist/integrations/ruvector/graph-boundaries.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/graph-boundaries.js +3 -2
- package/v3/dist/integrations/ruvector/graph-boundaries.js.map +1 -1
- package/v3/dist/integrations/ruvector/hypergraph-engine.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/hypergraph-engine.js +68 -67
- package/v3/dist/integrations/ruvector/hypergraph-engine.js.map +1 -1
- package/v3/dist/integrations/ruvector/hypergraph-schema.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/hypergraph-schema.js +3 -2
- package/v3/dist/integrations/ruvector/hypergraph-schema.js.map +1 -1
- package/v3/dist/integrations/ruvector/persistent-q-router.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/persistent-q-router.js +35 -11
- package/v3/dist/integrations/ruvector/persistent-q-router.js.map +1 -1
- package/v3/dist/integrations/ruvector/q-learning-router.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/q-learning-router.js +3 -2
- package/v3/dist/integrations/ruvector/q-learning-router.js.map +1 -1
- package/v3/dist/integrations/ruvector/server-client.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/server-client.js +23 -10
- package/v3/dist/integrations/ruvector/server-client.js.map +1 -1
- package/v3/dist/integrations/ruvector/sona-persistence.d.ts.map +1 -1
- package/v3/dist/integrations/ruvector/sona-persistence.js +11 -6
- package/v3/dist/integrations/ruvector/sona-persistence.js.map +1 -1
- package/v3/dist/integrations/vibium/client.d.ts.map +1 -1
- package/v3/dist/integrations/vibium/client.js +11 -10
- package/v3/dist/integrations/vibium/client.js.map +1 -1
- package/v3/dist/kernel/anti-drift-middleware.d.ts.map +1 -1
- package/v3/dist/kernel/anti-drift-middleware.js +8 -3
- package/v3/dist/kernel/anti-drift-middleware.js.map +1 -1
- package/v3/dist/kernel/hybrid-backend.d.ts.map +1 -1
- package/v3/dist/kernel/hybrid-backend.js +4 -0
- package/v3/dist/kernel/hybrid-backend.js.map +1 -1
- package/v3/dist/kernel/index.d.ts +1 -1
- package/v3/dist/kernel/index.d.ts.map +1 -1
- package/v3/dist/kernel/index.js +1 -1
- package/v3/dist/kernel/index.js.map +1 -1
- package/v3/dist/kernel/kernel.d.ts +5 -0
- package/v3/dist/kernel/kernel.d.ts.map +1 -1
- package/v3/dist/kernel/kernel.js +43 -22
- package/v3/dist/kernel/kernel.js.map +1 -1
- package/v3/dist/kernel/memory-factory.d.ts.map +1 -1
- package/v3/dist/kernel/memory-factory.js +12 -4
- package/v3/dist/kernel/memory-factory.js.map +1 -1
- package/v3/dist/kernel/plugin-loader.d.ts.map +1 -1
- package/v3/dist/kernel/plugin-loader.js +4 -1
- package/v3/dist/kernel/plugin-loader.js.map +1 -1
- package/v3/dist/kernel/unified-memory-hnsw.d.ts +101 -0
- package/v3/dist/kernel/unified-memory-hnsw.d.ts.map +1 -0
- package/v3/dist/kernel/unified-memory-hnsw.js +411 -0
- package/v3/dist/kernel/unified-memory-hnsw.js.map +1 -0
- package/v3/dist/kernel/unified-memory-migration.d.ts.map +1 -1
- package/v3/dist/kernel/unified-memory-migration.js +14 -15
- package/v3/dist/kernel/unified-memory-migration.js.map +1 -1
- package/v3/dist/kernel/unified-memory-schemas.d.ts +21 -0
- package/v3/dist/kernel/unified-memory-schemas.d.ts.map +1 -0
- package/v3/dist/kernel/unified-memory-schemas.js +581 -0
- package/v3/dist/kernel/unified-memory-schemas.js.map +1 -0
- package/v3/dist/kernel/unified-memory.d.ts +13 -197
- package/v3/dist/kernel/unified-memory.d.ts.map +1 -1
- package/v3/dist/kernel/unified-memory.js +117 -1379
- package/v3/dist/kernel/unified-memory.js.map +1 -1
- package/v3/dist/kernel/unified-persistence.d.ts.map +1 -1
- package/v3/dist/kernel/unified-persistence.js +6 -4
- package/v3/dist/kernel/unified-persistence.js.map +1 -1
- package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -1
- package/v3/dist/learning/aqe-learning-engine.js +11 -9
- package/v3/dist/learning/aqe-learning-engine.js.map +1 -1
- package/v3/dist/learning/dream/concept-graph.d.ts.map +1 -1
- package/v3/dist/learning/dream/concept-graph.js +6 -4
- package/v3/dist/learning/dream/concept-graph.js.map +1 -1
- package/v3/dist/learning/dream/dream-engine.d.ts +8 -0
- package/v3/dist/learning/dream/dream-engine.d.ts.map +1 -1
- package/v3/dist/learning/dream/dream-engine.js +35 -5
- package/v3/dist/learning/dream/dream-engine.js.map +1 -1
- package/v3/dist/learning/dream/dream-scheduler.d.ts.map +1 -1
- package/v3/dist/learning/dream/dream-scheduler.js +34 -22
- package/v3/dist/learning/dream/dream-scheduler.js.map +1 -1
- package/v3/dist/learning/experience-capture-middleware.d.ts.map +1 -1
- package/v3/dist/learning/experience-capture-middleware.js +2 -1
- package/v3/dist/learning/experience-capture-middleware.js.map +1 -1
- package/v3/dist/learning/experience-capture.d.ts.map +1 -1
- package/v3/dist/learning/experience-capture.js +4 -1
- package/v3/dist/learning/experience-capture.js.map +1 -1
- package/v3/dist/learning/memory-auditor.d.ts.map +1 -1
- package/v3/dist/learning/memory-auditor.js +3 -2
- package/v3/dist/learning/memory-auditor.js.map +1 -1
- package/v3/dist/learning/metrics-tracker.d.ts.map +1 -1
- package/v3/dist/learning/metrics-tracker.js +6 -2
- package/v3/dist/learning/metrics-tracker.js.map +1 -1
- package/v3/dist/learning/pattern-lifecycle.d.ts.map +1 -1
- package/v3/dist/learning/pattern-lifecycle.js +11 -5
- package/v3/dist/learning/pattern-lifecycle.js.map +1 -1
- package/v3/dist/learning/pattern-store.d.ts +7 -0
- package/v3/dist/learning/pattern-store.d.ts.map +1 -1
- package/v3/dist/learning/pattern-store.js +32 -4
- package/v3/dist/learning/pattern-store.js.map +1 -1
- package/v3/dist/learning/qe-hooks.d.ts.map +1 -1
- package/v3/dist/learning/qe-hooks.js +55 -10
- package/v3/dist/learning/qe-hooks.js.map +1 -1
- package/v3/dist/learning/qe-reasoning-bank.d.ts +13 -0
- package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
- package/v3/dist/learning/qe-reasoning-bank.js +64 -24
- package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
- package/v3/dist/learning/qe-unified-memory.d.ts.map +1 -1
- package/v3/dist/learning/qe-unified-memory.js +31 -21
- package/v3/dist/learning/qe-unified-memory.js.map +1 -1
- package/v3/dist/learning/real-embeddings.d.ts.map +1 -1
- package/v3/dist/learning/real-embeddings.js +2 -1
- package/v3/dist/learning/real-embeddings.js.map +1 -1
- package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
- package/v3/dist/learning/real-qe-reasoning-bank.js +47 -34
- package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
- package/v3/dist/learning/skill-validation-learner.d.ts.map +1 -1
- package/v3/dist/learning/skill-validation-learner.js +21 -12
- package/v3/dist/learning/skill-validation-learner.js.map +1 -1
- package/v3/dist/learning/sqlite-persistence.d.ts +9 -0
- package/v3/dist/learning/sqlite-persistence.d.ts.map +1 -1
- package/v3/dist/learning/sqlite-persistence.js +65 -6
- package/v3/dist/learning/sqlite-persistence.js.map +1 -1
- package/v3/dist/learning/token-tracker.d.ts.map +1 -1
- package/v3/dist/learning/token-tracker.js +4 -2
- package/v3/dist/learning/token-tracker.js.map +1 -1
- package/v3/dist/learning/v2-to-v3-migration.d.ts.map +1 -1
- package/v3/dist/learning/v2-to-v3-migration.js +9 -4
- package/v3/dist/learning/v2-to-v3-migration.js.map +1 -1
- package/v3/dist/mcp/bundle.js +15199 -13931
- package/v3/dist/mcp/entry.js +21 -1
- package/v3/dist/mcp/entry.js.map +1 -1
- package/v3/dist/mcp/handlers/agent-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/agent-handlers.js +5 -4
- package/v3/dist/mcp/handlers/agent-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/core-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/core-handlers.js +4 -3
- package/v3/dist/mcp/handlers/core-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/handler-factory.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/handler-factory.js +12 -3
- package/v3/dist/mcp/handlers/handler-factory.js.map +1 -1
- package/v3/dist/mcp/handlers/memory-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/memory-handlers.js +8 -8
- package/v3/dist/mcp/handlers/memory-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.js +11 -10
- package/v3/dist/mcp/handlers/task-handlers.js.map +1 -1
- package/v3/dist/mcp/http-server.js +1 -1
- package/v3/dist/mcp/http-server.js.map +1 -1
- package/v3/dist/mcp/security/index.d.ts +2 -6
- package/v3/dist/mcp/security/index.d.ts.map +1 -1
- package/v3/dist/mcp/security/index.js +2 -2
- package/v3/dist/mcp/security/index.js.map +1 -1
- package/v3/dist/mcp/security/oauth21-provider.d.ts +7 -0
- package/v3/dist/mcp/security/oauth21-provider.d.ts.map +1 -1
- package/v3/dist/mcp/security/oauth21-provider.js +15 -3
- package/v3/dist/mcp/security/oauth21-provider.js.map +1 -1
- package/v3/dist/mcp/server.d.ts.map +1 -1
- package/v3/dist/mcp/server.js +10 -24
- package/v3/dist/mcp/server.js.map +1 -1
- package/v3/dist/mcp/tool-registry.d.ts.map +1 -1
- package/v3/dist/mcp/tool-registry.js +2 -1
- package/v3/dist/mcp/tool-registry.js.map +1 -1
- package/v3/dist/mcp/tools/analysis/token-usage.d.ts.map +1 -1
- package/v3/dist/mcp/tools/analysis/token-usage.js +2 -1
- package/v3/dist/mcp/tools/analysis/token-usage.js.map +1 -1
- package/v3/dist/mcp/tools/base.d.ts.map +1 -1
- package/v3/dist/mcp/tools/base.js +2 -1
- package/v3/dist/mcp/tools/base.js.map +1 -1
- package/v3/dist/mcp/tools/chaos-resilience/inject.d.ts.map +1 -1
- package/v3/dist/mcp/tools/chaos-resilience/inject.js +2 -1
- package/v3/dist/mcp/tools/chaos-resilience/inject.js.map +1 -1
- package/v3/dist/mcp/tools/code-intelligence/analyze.d.ts.map +1 -1
- package/v3/dist/mcp/tools/code-intelligence/analyze.js +2 -1
- package/v3/dist/mcp/tools/code-intelligence/analyze.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coherence/audit.js +2 -1
- package/v3/dist/mcp/tools/coherence/audit.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coherence/check.js +2 -1
- package/v3/dist/mcp/tools/coherence/check.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coherence/collapse.js +2 -1
- package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -1
- package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coherence/consensus.js +2 -1
- package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -1
- package/v3/dist/mcp/tools/contract-testing/validate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/contract-testing/validate.js +4 -3
- package/v3/dist/mcp/tools/contract-testing/validate.js.map +1 -1
- package/v3/dist/mcp/tools/coverage-analysis/index.d.ts.map +1 -1
- package/v3/dist/mcp/tools/coverage-analysis/index.js +7 -6
- package/v3/dist/mcp/tools/coverage-analysis/index.js.map +1 -1
- package/v3/dist/mcp/tools/defect-intelligence/predict.d.ts.map +1 -1
- package/v3/dist/mcp/tools/defect-intelligence/predict.js +2 -1
- package/v3/dist/mcp/tools/defect-intelligence/predict.js.map +1 -1
- package/v3/dist/mcp/tools/embeddings/embedding.d.ts.map +1 -1
- package/v3/dist/mcp/tools/embeddings/embedding.js +6 -5
- package/v3/dist/mcp/tools/embeddings/embedding.js.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/dream.d.ts.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/dream.js +3 -2
- package/v3/dist/mcp/tools/learning-optimization/dream.js.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/optimize.d.ts.map +1 -1
- package/v3/dist/mcp/tools/learning-optimization/optimize.js +2 -1
- package/v3/dist/mcp/tools/learning-optimization/optimize.js.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-execute.d.ts.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-execute.js +2 -1
- package/v3/dist/mcp/tools/planning/goap-execute.js.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-plan.d.ts.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-plan.js +2 -1
- package/v3/dist/mcp/tools/planning/goap-plan.js.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-status.d.ts.map +1 -1
- package/v3/dist/mcp/tools/planning/goap-status.js +2 -1
- package/v3/dist/mcp/tools/planning/goap-status.js.map +1 -1
- package/v3/dist/mcp/tools/quality-assessment/evaluate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/quality-assessment/evaluate.js +2 -1
- package/v3/dist/mcp/tools/quality-assessment/evaluate.js.map +1 -1
- package/v3/dist/mcp/tools/qx-analysis/analyze.d.ts.map +1 -1
- package/v3/dist/mcp/tools/qx-analysis/analyze.js +2 -1
- package/v3/dist/mcp/tools/qx-analysis/analyze.js.map +1 -1
- package/v3/dist/mcp/tools/qx-analysis/impact-analyzer.d.ts +12 -0
- package/v3/dist/mcp/tools/qx-analysis/impact-analyzer.d.ts.map +1 -1
- package/v3/dist/mcp/tools/qx-analysis/impact-analyzer.js +158 -109
- package/v3/dist/mcp/tools/qx-analysis/impact-analyzer.js.map +1 -1
- package/v3/dist/mcp/tools/requirements-validation/quality-criteria.d.ts.map +1 -1
- package/v3/dist/mcp/tools/requirements-validation/quality-criteria.js +2 -1
- package/v3/dist/mcp/tools/requirements-validation/quality-criteria.js.map +1 -1
- package/v3/dist/mcp/tools/requirements-validation/validate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/requirements-validation/validate.js +2 -1
- package/v3/dist/mcp/tools/requirements-validation/validate.js.map +1 -1
- package/v3/dist/mcp/tools/security-compliance/scan.d.ts.map +1 -1
- package/v3/dist/mcp/tools/security-compliance/scan.js +2 -1
- package/v3/dist/mcp/tools/security-compliance/scan.js.map +1 -1
- package/v3/dist/mcp/tools/test-execution/e2e-execute.d.ts.map +1 -1
- package/v3/dist/mcp/tools/test-execution/e2e-execute.js +2 -1
- package/v3/dist/mcp/tools/test-execution/e2e-execute.js.map +1 -1
- package/v3/dist/mcp/tools/test-execution/execute.d.ts.map +1 -1
- package/v3/dist/mcp/tools/test-execution/execute.js +2 -1
- package/v3/dist/mcp/tools/test-execution/execute.js.map +1 -1
- package/v3/dist/mcp/tools/test-generation/generate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/test-generation/generate.js +2 -1
- package/v3/dist/mcp/tools/test-generation/generate.js.map +1 -1
- package/v3/dist/mcp/tools/visual-accessibility/index.d.ts.map +1 -1
- package/v3/dist/mcp/tools/visual-accessibility/index.js +3 -2
- package/v3/dist/mcp/tools/visual-accessibility/index.js.map +1 -1
- package/v3/dist/mcp/transport/sse/sse-transport.js +1 -1
- package/v3/dist/mcp/transport/sse/sse-transport.js.map +1 -1
- package/v3/dist/mcp/transport/stdio.js +1 -1
- package/v3/dist/mcp/transport/stdio.js.map +1 -1
- package/v3/dist/mcp/transport/websocket/websocket-transport.js +1 -1
- package/v3/dist/mcp/transport/websocket/websocket-transport.js.map +1 -1
- package/v3/dist/memory/crdt/or-set.d.ts.map +1 -1
- package/v3/dist/memory/crdt/or-set.js +2 -1
- package/v3/dist/memory/crdt/or-set.js.map +1 -1
- package/v3/dist/optimization/auto-tuner.d.ts.map +1 -1
- package/v3/dist/optimization/auto-tuner.js +2 -1
- package/v3/dist/optimization/auto-tuner.js.map +1 -1
- package/v3/dist/optimization/early-exit-token-optimizer.d.ts.map +1 -1
- package/v3/dist/optimization/early-exit-token-optimizer.js +2 -1
- package/v3/dist/optimization/early-exit-token-optimizer.js.map +1 -1
- package/v3/dist/optimization/qe-workers.d.ts.map +1 -1
- package/v3/dist/optimization/qe-workers.js +2 -1
- package/v3/dist/optimization/qe-workers.js.map +1 -1
- package/v3/dist/performance/benchmarks.d.ts.map +1 -1
- package/v3/dist/performance/benchmarks.js +2 -1
- package/v3/dist/performance/benchmarks.js.map +1 -1
- package/v3/dist/performance/optimizer.d.ts.map +1 -1
- package/v3/dist/performance/optimizer.js +119 -71
- package/v3/dist/performance/optimizer.js.map +1 -1
- package/v3/dist/performance/run-gates.js +2 -1
- package/v3/dist/performance/run-gates.js.map +1 -1
- package/v3/dist/planning/goap-planner.d.ts +4 -1
- package/v3/dist/planning/goap-planner.d.ts.map +1 -1
- package/v3/dist/planning/goap-planner.js +128 -46
- package/v3/dist/planning/goap-planner.js.map +1 -1
- package/v3/dist/planning/index.d.ts +1 -1
- package/v3/dist/planning/index.d.ts.map +1 -1
- package/v3/dist/planning/index.js.map +1 -1
- package/v3/dist/planning/plan-executor.d.ts.map +1 -1
- package/v3/dist/planning/plan-executor.js +7 -5
- package/v3/dist/planning/plan-executor.js.map +1 -1
- package/v3/dist/planning/types.d.ts +0 -16
- package/v3/dist/planning/types.d.ts.map +1 -1
- package/v3/dist/routing/routing-feedback.d.ts.map +1 -1
- package/v3/dist/routing/routing-feedback.js +7 -5
- package/v3/dist/routing/routing-feedback.js.map +1 -1
- package/v3/dist/shared/base-domain-plugin.d.ts +198 -0
- package/v3/dist/shared/base-domain-plugin.d.ts.map +1 -0
- package/v3/dist/shared/base-domain-plugin.js +292 -0
- package/v3/dist/shared/base-domain-plugin.js.map +1 -0
- package/v3/dist/shared/domain-service-registry.d.ts +70 -0
- package/v3/dist/shared/domain-service-registry.d.ts.map +1 -0
- package/v3/dist/shared/domain-service-registry.js +87 -0
- package/v3/dist/shared/domain-service-registry.js.map +1 -0
- package/v3/dist/shared/embeddings/nomic-embedder.d.ts.map +1 -1
- package/v3/dist/shared/embeddings/nomic-embedder.js +2 -1
- package/v3/dist/shared/embeddings/nomic-embedder.js.map +1 -1
- package/v3/dist/shared/embeddings/ollama-client.d.ts.map +1 -1
- package/v3/dist/shared/embeddings/ollama-client.js +2 -1
- package/v3/dist/shared/embeddings/ollama-client.js.map +1 -1
- package/v3/dist/shared/error-utils.d.ts +16 -0
- package/v3/dist/shared/error-utils.d.ts.map +1 -0
- package/v3/dist/shared/error-utils.js +20 -0
- package/v3/dist/shared/error-utils.js.map +1 -0
- package/v3/dist/shared/http/http-client.d.ts.map +1 -1
- package/v3/dist/shared/http/http-client.js +2 -1
- package/v3/dist/shared/http/http-client.js.map +1 -1
- package/v3/dist/shared/index.d.ts +3 -0
- package/v3/dist/shared/index.d.ts.map +1 -1
- package/v3/dist/shared/index.js +3 -0
- package/v3/dist/shared/index.js.map +1 -1
- package/v3/dist/shared/io/file-reader.d.ts.map +1 -1
- package/v3/dist/shared/io/file-reader.js +2 -1
- package/v3/dist/shared/io/file-reader.js.map +1 -1
- package/v3/dist/shared/llm/circuit-breaker.d.ts.map +1 -1
- package/v3/dist/shared/llm/circuit-breaker.js +2 -1
- package/v3/dist/shared/llm/circuit-breaker.js.map +1 -1
- package/v3/dist/shared/llm/metrics/cost-metrics.js.map +1 -1
- package/v3/dist/shared/llm/metrics/router-metrics.d.ts.map +1 -1
- package/v3/dist/shared/llm/metrics/router-metrics.js.map +1 -1
- package/v3/dist/shared/llm/provider-manager.d.ts.map +1 -1
- package/v3/dist/shared/llm/provider-manager.js +2 -1
- package/v3/dist/shared/llm/provider-manager.js.map +1 -1
- package/v3/dist/shared/llm/providers/azure-openai.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/azure-openai.js +2 -1
- package/v3/dist/shared/llm/providers/azure-openai.js.map +1 -1
- package/v3/dist/shared/llm/providers/bedrock.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/bedrock.js +2 -1
- package/v3/dist/shared/llm/providers/bedrock.js.map +1 -1
- package/v3/dist/shared/llm/providers/claude.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/claude.js +2 -1
- package/v3/dist/shared/llm/providers/claude.js.map +1 -1
- package/v3/dist/shared/llm/providers/gemini.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/gemini.js +4 -2
- package/v3/dist/shared/llm/providers/gemini.js.map +1 -1
- package/v3/dist/shared/llm/providers/openai.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/openai.js +2 -1
- package/v3/dist/shared/llm/providers/openai.js.map +1 -1
- package/v3/dist/shared/llm/providers/openrouter.d.ts.map +1 -1
- package/v3/dist/shared/llm/providers/openrouter.js +4 -2
- package/v3/dist/shared/llm/providers/openrouter.js.map +1 -1
- package/v3/dist/shared/llm/router/hybrid-router.d.ts.map +1 -1
- package/v3/dist/shared/llm/router/hybrid-router.js +2 -1
- package/v3/dist/shared/llm/router/hybrid-router.js.map +1 -1
- package/v3/dist/shared/llm/translation/prompt-translator.d.ts.map +1 -1
- package/v3/dist/shared/llm/translation/prompt-translator.js +2 -1
- package/v3/dist/shared/llm/translation/prompt-translator.js.map +1 -1
- package/v3/dist/shared/safe-json.d.ts +57 -0
- package/v3/dist/shared/safe-json.d.ts.map +1 -0
- package/v3/dist/shared/safe-json.js +78 -0
- package/v3/dist/shared/safe-json.js.map +1 -0
- package/v3/dist/shared/sql-safety.d.ts +9 -0
- package/v3/dist/shared/sql-safety.d.ts.map +1 -1
- package/v3/dist/shared/sql-safety.js +20 -1
- package/v3/dist/shared/sql-safety.js.map +1 -1
- package/v3/dist/shared/utils/circular-buffer.js +1 -1
- package/v3/dist/shared/utils/circular-buffer.js.map +1 -1
- package/v3/dist/skills/security-visual-testing/index.d.ts.map +1 -1
- package/v3/dist/skills/security-visual-testing/index.js +6 -5
- package/v3/dist/skills/security-visual-testing/index.js.map +1 -1
- package/v3/dist/strange-loop/strange-loop.d.ts +0 -9
- package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
- package/v3/dist/strange-loop/strange-loop.js +23 -15
- package/v3/dist/strange-loop/strange-loop.js.map +1 -1
- package/v3/dist/sync/claude-flow-bridge.d.ts.map +1 -1
- package/v3/dist/sync/claude-flow-bridge.js +2 -1
- package/v3/dist/sync/claude-flow-bridge.js.map +1 -1
- package/v3/dist/sync/cloud/index.d.ts +1 -1
- package/v3/dist/sync/cloud/index.d.ts.map +1 -1
- package/v3/dist/sync/cloud/index.js +1 -1
- package/v3/dist/sync/cloud/index.js.map +1 -1
- package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -1
- package/v3/dist/sync/cloud/postgres-writer.js +20 -9
- package/v3/dist/sync/cloud/postgres-writer.js.map +1 -1
- package/v3/dist/sync/cloud/tunnel-manager.d.ts +17 -1
- package/v3/dist/sync/cloud/tunnel-manager.d.ts.map +1 -1
- package/v3/dist/sync/cloud/tunnel-manager.js +36 -1
- package/v3/dist/sync/cloud/tunnel-manager.js.map +1 -1
- package/v3/dist/sync/embeddings/sync-embedding-generator.d.ts.map +1 -1
- package/v3/dist/sync/embeddings/sync-embedding-generator.js +11 -5
- package/v3/dist/sync/embeddings/sync-embedding-generator.js.map +1 -1
- package/v3/dist/sync/readers/json-reader.d.ts.map +1 -1
- package/v3/dist/sync/readers/json-reader.js +2 -1
- package/v3/dist/sync/readers/json-reader.js.map +1 -1
- package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -1
- package/v3/dist/sync/readers/sqlite-reader.js +14 -6
- package/v3/dist/sync/readers/sqlite-reader.js.map +1 -1
- package/v3/dist/sync/sync-agent.d.ts.map +1 -1
- package/v3/dist/sync/sync-agent.js +10 -6
- package/v3/dist/sync/sync-agent.js.map +1 -1
- package/v3/dist/test-scheduling/executors/vitest-executor.d.ts.map +1 -1
- package/v3/dist/test-scheduling/executors/vitest-executor.js +3 -2
- package/v3/dist/test-scheduling/executors/vitest-executor.js.map +1 -1
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.d.ts.map +1 -1
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js +2 -1
- package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js.map +1 -1
- package/v3/dist/testing/load/agent-load-tester.d.ts.map +1 -1
- package/v3/dist/testing/load/agent-load-tester.js +2 -1
- package/v3/dist/testing/load/agent-load-tester.js.map +1 -1
- package/v3/dist/validation/parallel-eval-runner.d.ts.map +1 -1
- package/v3/dist/validation/parallel-eval-runner.js +83 -37
- package/v3/dist/validation/parallel-eval-runner.js.map +1 -1
- package/v3/dist/validation/swarm-skill-validator.d.ts.map +1 -1
- package/v3/dist/validation/swarm-skill-validator.js +2 -1
- package/v3/dist/validation/swarm-skill-validator.js.map +1 -1
- package/v3/dist/validation/validation-result-aggregator.d.ts.map +1 -1
- package/v3/dist/validation/validation-result-aggregator.js +2 -1
- package/v3/dist/validation/validation-result-aggregator.js.map +1 -1
- package/v3/dist/workers/base-worker.d.ts.map +1 -1
- package/v3/dist/workers/base-worker.js +2 -1
- package/v3/dist/workers/base-worker.js.map +1 -1
- package/v3/dist/workers/workers/cloud-sync.d.ts.map +1 -1
- package/v3/dist/workers/workers/cloud-sync.js +2 -1
- package/v3/dist/workers/workers/cloud-sync.js.map +1 -1
- package/v3/dist/workers/workers/learning-consolidation.d.ts.map +1 -1
- package/v3/dist/workers/workers/learning-consolidation.js +4 -3
- package/v3/dist/workers/workers/learning-consolidation.js.map +1 -1
- package/v3/dist/workers/workers/test-health.d.ts.map +1 -1
- package/v3/dist/workers/workers/test-health.js +2 -1
- package/v3/dist/workers/workers/test-health.js.map +1 -1
- package/v3/package.json +3 -2
|
@@ -14,238 +14,12 @@ import chalk from 'chalk';
|
|
|
14
14
|
import path from 'node:path';
|
|
15
15
|
import { findProjectRoot } from '../../kernel/unified-memory.js';
|
|
16
16
|
import { existsSync, writeFileSync, readFileSync, mkdirSync, copyFileSync } from 'node:fs';
|
|
17
|
-
import {
|
|
17
|
+
import { safeJsonParse } from '../../shared/safe-json.js';
|
|
18
18
|
import { stat, unlink } from 'node:fs/promises';
|
|
19
|
-
import { createGzip, createGunzip } from 'node:zlib';
|
|
20
|
-
import { pipeline } from 'node:stream/promises';
|
|
21
|
-
import { createQEReasoningBank, } from '../../learning/qe-reasoning-bank.js';
|
|
22
|
-
import { HybridMemoryBackend } from '../../kernel/hybrid-backend.js';
|
|
23
19
|
import { QE_DOMAIN_LIST } from '../../learning/qe-patterns.js';
|
|
24
20
|
import { createLearningMetricsTracker, } from '../../learning/metrics-tracker.js';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
initialized: false,
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Initialize the learning system
|
|
31
|
-
*/
|
|
32
|
-
async function initializeLearningSystem() {
|
|
33
|
-
if (state.initialized && state.reasoningBank) {
|
|
34
|
-
return state.reasoningBank;
|
|
35
|
-
}
|
|
36
|
-
const projectRoot = findProjectRoot();
|
|
37
|
-
const dataDir = path.join(projectRoot, '.agentic-qe');
|
|
38
|
-
// Create hybrid backend
|
|
39
|
-
const backend = new HybridMemoryBackend({
|
|
40
|
-
sqlite: {
|
|
41
|
-
path: path.join(dataDir, 'memory.db'),
|
|
42
|
-
walMode: true,
|
|
43
|
-
poolSize: 3,
|
|
44
|
-
busyTimeout: 5000,
|
|
45
|
-
},
|
|
46
|
-
enableFallback: true,
|
|
47
|
-
defaultNamespace: 'qe-patterns',
|
|
48
|
-
});
|
|
49
|
-
await backend.initialize();
|
|
50
|
-
// Create reasoning bank
|
|
51
|
-
state.reasoningBank = createQEReasoningBank(backend, undefined, {
|
|
52
|
-
enableLearning: true,
|
|
53
|
-
enableGuidance: true,
|
|
54
|
-
enableRouting: true,
|
|
55
|
-
embeddingDimension: 768,
|
|
56
|
-
useONNXEmbeddings: false,
|
|
57
|
-
});
|
|
58
|
-
await state.reasoningBank.initialize();
|
|
59
|
-
state.initialized = true;
|
|
60
|
-
return state.reasoningBank;
|
|
61
|
-
}
|
|
62
|
-
// ============================================================================
|
|
63
|
-
// Helper Functions
|
|
64
|
-
// ============================================================================
|
|
65
|
-
function printJson(data) {
|
|
66
|
-
console.log(JSON.stringify(data, null, 2));
|
|
67
|
-
}
|
|
68
|
-
function printSuccess(message) {
|
|
69
|
-
console.log(chalk.green('✓'), message);
|
|
70
|
-
}
|
|
71
|
-
function printError(message) {
|
|
72
|
-
console.error(chalk.red('✗'), message);
|
|
73
|
-
}
|
|
74
|
-
function printInfo(message) {
|
|
75
|
-
console.log(chalk.blue('ℹ'), message);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Display the learning dashboard
|
|
79
|
-
*/
|
|
80
|
-
function displayDashboard(dashboard) {
|
|
81
|
-
const { current, topDomains } = dashboard;
|
|
82
|
-
// Box drawing characters
|
|
83
|
-
const BOX = {
|
|
84
|
-
tl: '┌', tr: '┐', bl: '└', br: '┘',
|
|
85
|
-
h: '─', v: '│', ml: '├', mr: '┤',
|
|
86
|
-
};
|
|
87
|
-
const WIDTH = 55;
|
|
88
|
-
const HR = BOX.h.repeat(WIDTH - 2);
|
|
89
|
-
console.log('');
|
|
90
|
-
console.log(`${BOX.tl}${HR}${BOX.tr}`);
|
|
91
|
-
console.log(`${BOX.v}${centerText('AQE LEARNING DASHBOARD', WIDTH - 2)}${BOX.v}`);
|
|
92
|
-
console.log(`${BOX.ml}${HR}${BOX.mr}`);
|
|
93
|
-
// Pattern stats
|
|
94
|
-
const patternToday = current.patternsCreatedToday > 0
|
|
95
|
-
? chalk.green(` (+${current.patternsCreatedToday} today)`)
|
|
96
|
-
: '';
|
|
97
|
-
console.log(`${BOX.v} Patterns: ${padRight(String(current.totalPatterns) + patternToday, 32)}${BOX.v}`);
|
|
98
|
-
// Experience stats
|
|
99
|
-
const expToday = current.experiencesToday > 0
|
|
100
|
-
? chalk.green(` (+${current.experiencesToday} today)`)
|
|
101
|
-
: '';
|
|
102
|
-
console.log(`${BOX.v} Experiences: ${padRight(String(current.totalExperiences) + expToday, 32)}${BOX.v}`);
|
|
103
|
-
// Q-Values
|
|
104
|
-
console.log(`${BOX.v} Q-Values: ${padRight(String(current.totalQValues), 32)}${BOX.v}`);
|
|
105
|
-
// Average Reward with trend
|
|
106
|
-
const rewardStr = current.avgReward.toFixed(2);
|
|
107
|
-
const rewardTrend = current.avgRewardDelta >= 0
|
|
108
|
-
? chalk.green(`(↑ ${Math.abs(current.avgRewardDelta).toFixed(2)} from last week)`)
|
|
109
|
-
: chalk.red(`(↓ ${Math.abs(current.avgRewardDelta).toFixed(2)} from last week)`);
|
|
110
|
-
console.log(`${BOX.v} Avg Reward: ${padRight(`${rewardStr} ${rewardTrend}`, 32)}${BOX.v}`);
|
|
111
|
-
// Success rate
|
|
112
|
-
const successPct = (current.successRate * 100).toFixed(1);
|
|
113
|
-
console.log(`${BOX.v} Success Rate: ${padRight(`${successPct}%`, 32)}${BOX.v}`);
|
|
114
|
-
// Pattern tiers
|
|
115
|
-
console.log(`${BOX.v} Short-term: ${padRight(String(current.shortTermPatterns), 32)}${BOX.v}`);
|
|
116
|
-
console.log(`${BOX.v} Long-term: ${padRight(String(current.longTermPatterns), 32)}${BOX.v}`);
|
|
117
|
-
console.log(`${BOX.v}${' '.repeat(WIDTH - 2)}${BOX.v}`);
|
|
118
|
-
// Domain Coverage
|
|
119
|
-
console.log(`${BOX.v} ${chalk.bold('Domain Coverage:')}${' '.repeat(WIDTH - 19)}${BOX.v}`);
|
|
120
|
-
if (topDomains.length === 0) {
|
|
121
|
-
console.log(`${BOX.v} ${chalk.dim('No patterns yet')}${' '.repeat(WIDTH - 19)}${BOX.v}`);
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
const maxCount = Math.max(...topDomains.map(d => d.count), 1);
|
|
125
|
-
const barWidth = 14;
|
|
126
|
-
for (const { domain, count } of topDomains) {
|
|
127
|
-
const filledBars = Math.round((count / maxCount) * barWidth);
|
|
128
|
-
const emptyBars = barWidth - filledBars;
|
|
129
|
-
const bar = chalk.green('█'.repeat(filledBars)) + chalk.dim('░'.repeat(emptyBars));
|
|
130
|
-
const domainName = padRight(domain, 20);
|
|
131
|
-
const countStr = padLeft(String(count), 3);
|
|
132
|
-
console.log(`${BOX.v} ${domainName} ${bar} ${countStr} patterns ${BOX.v}`);
|
|
133
|
-
}
|
|
134
|
-
// Show remaining domains with 0 patterns
|
|
135
|
-
const shownDomains = new Set(topDomains.map(d => d.domain));
|
|
136
|
-
const zeroDomains = QE_DOMAIN_LIST.filter(d => !shownDomains.has(d)).slice(0, 3);
|
|
137
|
-
for (const domain of zeroDomains) {
|
|
138
|
-
const bar = chalk.dim('░'.repeat(barWidth));
|
|
139
|
-
const domainName = padRight(domain, 20);
|
|
140
|
-
console.log(`${BOX.v} ${domainName} ${bar} 0 patterns ${BOX.v}`);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
console.log(`${BOX.bl}${HR}${BOX.br}`);
|
|
144
|
-
console.log('');
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Center text within a given width
|
|
148
|
-
*/
|
|
149
|
-
function centerText(text, width) {
|
|
150
|
-
const stripped = stripAnsi(text);
|
|
151
|
-
const padding = Math.max(0, width - stripped.length);
|
|
152
|
-
const leftPad = Math.floor(padding / 2);
|
|
153
|
-
const rightPad = padding - leftPad;
|
|
154
|
-
return ' '.repeat(leftPad) + text + ' '.repeat(rightPad);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Pad string to the right
|
|
158
|
-
*/
|
|
159
|
-
function padRight(text, width) {
|
|
160
|
-
const stripped = stripAnsi(text);
|
|
161
|
-
const padding = Math.max(0, width - stripped.length);
|
|
162
|
-
return text + ' '.repeat(padding);
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Pad string to the left
|
|
166
|
-
*/
|
|
167
|
-
function padLeft(text, width) {
|
|
168
|
-
const stripped = stripAnsi(text);
|
|
169
|
-
const padding = Math.max(0, width - stripped.length);
|
|
170
|
-
return ' '.repeat(padding) + text;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Strip ANSI escape codes from a string
|
|
174
|
-
*/
|
|
175
|
-
function stripAnsi(text) {
|
|
176
|
-
// eslint-disable-next-line no-control-regex
|
|
177
|
-
return text.replace(/\x1b\[[0-9;]*m/g, '');
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Get the learning database path
|
|
181
|
-
*/
|
|
182
|
-
function getDbPath() {
|
|
183
|
-
const projectRoot = findProjectRoot();
|
|
184
|
-
return path.join(projectRoot, '.agentic-qe', 'memory.db');
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Compress a file using gzip
|
|
188
|
-
*/
|
|
189
|
-
async function compressFile(inputPath, outputPath) {
|
|
190
|
-
const gzPath = outputPath || `${inputPath}.gz`;
|
|
191
|
-
await pipeline(createReadStream(inputPath), createGzip(), createWriteStream(gzPath));
|
|
192
|
-
return gzPath;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Decompress a gzipped file
|
|
196
|
-
*/
|
|
197
|
-
async function decompressFile(gzPath, outputPath) {
|
|
198
|
-
await pipeline(createReadStream(gzPath), createGunzip(), createWriteStream(outputPath));
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Verify database integrity using SQLite's built-in check
|
|
202
|
-
*/
|
|
203
|
-
async function verifyDatabaseIntegrity(dbPath) {
|
|
204
|
-
try {
|
|
205
|
-
const Database = (await import('better-sqlite3')).default;
|
|
206
|
-
const db = new Database(dbPath, { readonly: true });
|
|
207
|
-
// Run SQLite integrity check
|
|
208
|
-
const result = db.prepare('PRAGMA integrity_check').get();
|
|
209
|
-
db.close();
|
|
210
|
-
if (result.integrity_check === 'ok') {
|
|
211
|
-
return { valid: true, message: 'Database integrity verified' };
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
return { valid: false, message: `Integrity check failed: ${result.integrity_check}` };
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
catch (error) {
|
|
218
|
-
return {
|
|
219
|
-
valid: false,
|
|
220
|
-
message: `Failed to verify: ${error instanceof Error ? error.message : 'unknown error'}`
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Get database schema version
|
|
226
|
-
*/
|
|
227
|
-
async function getSchemaVersion(dbPath) {
|
|
228
|
-
try {
|
|
229
|
-
const Database = (await import('better-sqlite3')).default;
|
|
230
|
-
const db = new Database(dbPath, { readonly: true });
|
|
231
|
-
// Check if schema_version table exists
|
|
232
|
-
const tableExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='schema_version'").get();
|
|
233
|
-
if (!tableExists) {
|
|
234
|
-
db.close();
|
|
235
|
-
return 0;
|
|
236
|
-
}
|
|
237
|
-
const result = db.prepare('SELECT version FROM schema_version WHERE id = 1').get();
|
|
238
|
-
db.close();
|
|
239
|
-
return result?.version ?? 0;
|
|
240
|
-
}
|
|
241
|
-
catch {
|
|
242
|
-
return 0;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Export format version for compatibility tracking
|
|
247
|
-
*/
|
|
248
|
-
const EXPORT_FORMAT_VERSION = '3.1.0';
|
|
21
|
+
// Extracted helpers
|
|
22
|
+
import { initializeLearningSystem, printJson, printSuccess, printError, printInfo, displayDashboard, getDbPath, compressFile, decompressFile, verifyDatabaseIntegrity, getSchemaVersion, EXPORT_FORMAT_VERSION, DOMAIN_MAPPING, PATTERN_TYPE_MAPPING, } from './learning-helpers.js';
|
|
249
23
|
// ============================================================================
|
|
250
24
|
// Learning Command
|
|
251
25
|
// ============================================================================
|
|
@@ -272,9 +46,27 @@ Examples:
|
|
|
272
46
|
# Run background learning consolidation
|
|
273
47
|
aqe learning daemon --interval 3600
|
|
274
48
|
`);
|
|
275
|
-
//
|
|
276
|
-
|
|
277
|
-
|
|
49
|
+
// Register all subcommands
|
|
50
|
+
registerStatsCommand(learning);
|
|
51
|
+
registerConsolidateCommand(learning);
|
|
52
|
+
registerExportCommand(learning);
|
|
53
|
+
registerImportCommand(learning);
|
|
54
|
+
registerResetCommand(learning);
|
|
55
|
+
registerExtractCommand(learning);
|
|
56
|
+
registerDashboardCommand(learning);
|
|
57
|
+
registerInfoCommand(learning);
|
|
58
|
+
registerBackupCommand(learning);
|
|
59
|
+
registerRestoreCommand(learning);
|
|
60
|
+
registerVerifyCommand(learning);
|
|
61
|
+
registerExportFullCommand(learning);
|
|
62
|
+
registerImportMergeCommand(learning);
|
|
63
|
+
registerDreamCommand(learning);
|
|
64
|
+
return learning;
|
|
65
|
+
}
|
|
66
|
+
// ============================================================================
|
|
67
|
+
// Subcommand: stats
|
|
68
|
+
// ============================================================================
|
|
69
|
+
function registerStatsCommand(learning) {
|
|
278
70
|
learning
|
|
279
71
|
.command('stats')
|
|
280
72
|
.description('Display learning system statistics')
|
|
@@ -289,14 +81,12 @@ Examples:
|
|
|
289
81
|
}
|
|
290
82
|
else {
|
|
291
83
|
console.log(chalk.bold('\n📊 AQE Learning System Statistics\n'));
|
|
292
|
-
// Overview
|
|
293
84
|
console.log(chalk.bold('Patterns:'));
|
|
294
85
|
console.log(` Total: ${chalk.cyan(stats.totalPatterns)}`);
|
|
295
86
|
console.log(` Short-term: ${stats.patternStoreStats.byTier.shortTerm}`);
|
|
296
87
|
console.log(` Long-term: ${stats.patternStoreStats.byTier.longTerm}`);
|
|
297
88
|
console.log(` Avg Confidence: ${(stats.patternStoreStats.avgConfidence * 100).toFixed(1)}%`);
|
|
298
89
|
console.log(` Avg Quality: ${(stats.patternStoreStats.avgQualityScore * 100).toFixed(1)}%`);
|
|
299
|
-
// By Domain
|
|
300
90
|
console.log(chalk.bold('\nBy Domain:'));
|
|
301
91
|
const domainsWithPatterns = Object.entries(stats.byDomain)
|
|
302
92
|
.filter(([_, count]) => count > 0)
|
|
@@ -309,19 +99,16 @@ Examples:
|
|
|
309
99
|
console.log(` ${domain}: ${count}`);
|
|
310
100
|
}
|
|
311
101
|
}
|
|
312
|
-
// Learning Metrics
|
|
313
102
|
console.log(chalk.bold('\nLearning:'));
|
|
314
103
|
console.log(` Routing Requests: ${stats.routingRequests}`);
|
|
315
104
|
console.log(` Avg Routing Confidence: ${(stats.avgRoutingConfidence * 100).toFixed(1)}%`);
|
|
316
105
|
console.log(` Learning Outcomes: ${stats.learningOutcomes}`);
|
|
317
106
|
console.log(` Pattern Success Rate: ${(stats.patternSuccessRate * 100).toFixed(1)}%`);
|
|
318
|
-
// Search Performance
|
|
319
107
|
console.log(chalk.bold('\nSearch Performance:'));
|
|
320
108
|
console.log(` Operations: ${stats.patternStoreStats.searchOperations}`);
|
|
321
109
|
console.log(` Avg Latency: ${stats.patternStoreStats.avgSearchLatencyMs.toFixed(2)}ms`);
|
|
322
110
|
console.log(` HNSW Native: ${stats.patternStoreStats.hnswStats.nativeAvailable ? chalk.green('✓') : chalk.dim('○')}`);
|
|
323
111
|
console.log(` Vector Count: ${stats.patternStoreStats.hnswStats.vectorCount}`);
|
|
324
|
-
// ADR-061: Asymmetric Learning Metrics
|
|
325
112
|
const asymmetricStats = stats.asymmetricLearning;
|
|
326
113
|
if (asymmetricStats) {
|
|
327
114
|
console.log(chalk.bold('\nAsymmetric Learning (ADR-061):'));
|
|
@@ -333,9 +120,8 @@ Examples:
|
|
|
333
120
|
if (options.detailed) {
|
|
334
121
|
console.log(chalk.bold('\nBy Pattern Type:'));
|
|
335
122
|
for (const [type, count] of Object.entries(stats.patternStoreStats.byType)) {
|
|
336
|
-
if (count > 0)
|
|
123
|
+
if (count > 0)
|
|
337
124
|
console.log(` ${type}: ${count}`);
|
|
338
|
-
}
|
|
339
125
|
}
|
|
340
126
|
}
|
|
341
127
|
console.log('');
|
|
@@ -347,9 +133,11 @@ Examples:
|
|
|
347
133
|
process.exit(1);
|
|
348
134
|
}
|
|
349
135
|
});
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
136
|
+
}
|
|
137
|
+
// ============================================================================
|
|
138
|
+
// Subcommand: consolidate
|
|
139
|
+
// ============================================================================
|
|
140
|
+
function registerConsolidateCommand(learning) {
|
|
353
141
|
learning
|
|
354
142
|
.command('consolidate')
|
|
355
143
|
.description('Consolidate patterns - promote successful patterns to long-term memory')
|
|
@@ -360,49 +148,31 @@ Examples:
|
|
|
360
148
|
.action(async (options) => {
|
|
361
149
|
try {
|
|
362
150
|
const reasoningBank = await initializeLearningSystem();
|
|
363
|
-
const stats = await reasoningBank.getStats();
|
|
364
151
|
const threshold = parseInt(options.threshold, 10);
|
|
365
152
|
const successRateMin = parseFloat(options.successRate);
|
|
366
|
-
// Get patterns eligible for promotion
|
|
367
153
|
const eligiblePatterns = [];
|
|
368
|
-
// Search for patterns that meet promotion criteria
|
|
369
|
-
// This would be enhanced with actual pattern store access
|
|
370
154
|
const searchResult = await reasoningBank.searchPatterns('*', { limit: 1000 });
|
|
371
155
|
if (searchResult.success) {
|
|
372
156
|
for (const match of searchResult.value) {
|
|
373
157
|
const pattern = match.pattern;
|
|
374
|
-
if (pattern.tier === 'short-term' &&
|
|
375
|
-
pattern.successfulUses >= threshold &&
|
|
376
|
-
pattern.successRate >= successRateMin) {
|
|
158
|
+
if (pattern.tier === 'short-term' && pattern.successfulUses >= threshold && pattern.successRate >= successRateMin) {
|
|
377
159
|
eligiblePatterns.push({
|
|
378
|
-
id: pattern.id,
|
|
379
|
-
|
|
380
|
-
domain: pattern.qeDomain,
|
|
381
|
-
successfulUses: pattern.successfulUses,
|
|
382
|
-
successRate: pattern.successRate,
|
|
383
|
-
currentTier: pattern.tier,
|
|
160
|
+
id: pattern.id, name: pattern.name, domain: pattern.qeDomain,
|
|
161
|
+
successfulUses: pattern.successfulUses, successRate: pattern.successRate, currentTier: pattern.tier,
|
|
384
162
|
});
|
|
385
163
|
}
|
|
386
164
|
}
|
|
387
165
|
}
|
|
388
166
|
if (options.json) {
|
|
389
|
-
printJson({
|
|
390
|
-
dryRun: options.dryRun || false,
|
|
391
|
-
eligibleCount: eligiblePatterns.length,
|
|
392
|
-
threshold,
|
|
393
|
-
successRateMin,
|
|
394
|
-
patterns: eligiblePatterns,
|
|
395
|
-
});
|
|
167
|
+
printJson({ dryRun: options.dryRun || false, eligibleCount: eligiblePatterns.length, threshold, successRateMin, patterns: eligiblePatterns });
|
|
396
168
|
}
|
|
397
169
|
else {
|
|
398
170
|
console.log(chalk.bold('\n🔄 Pattern Consolidation\n'));
|
|
399
171
|
console.log(` Promotion threshold: ${threshold} successful uses`);
|
|
400
172
|
console.log(` Minimum success rate: ${(successRateMin * 100).toFixed(0)}%`);
|
|
401
|
-
console.log(` Eligible patterns: ${eligiblePatterns.length}`);
|
|
402
|
-
console.log('');
|
|
173
|
+
console.log(` Eligible patterns: ${eligiblePatterns.length}\n`);
|
|
403
174
|
if (eligiblePatterns.length === 0) {
|
|
404
175
|
console.log(chalk.dim(' No patterns eligible for promotion yet.'));
|
|
405
|
-
console.log(chalk.dim(' Patterns need more successful uses to be promoted.'));
|
|
406
176
|
}
|
|
407
177
|
else {
|
|
408
178
|
console.log(chalk.bold(' Patterns to promote:'));
|
|
@@ -411,7 +181,6 @@ Examples:
|
|
|
411
181
|
console.log(chalk.dim(` Domain: ${p.domain}, Uses: ${p.successfulUses}, Rate: ${(p.successRate * 100).toFixed(0)}%`));
|
|
412
182
|
}
|
|
413
183
|
if (!options.dryRun) {
|
|
414
|
-
// TODO: Implement actual promotion via reasoningBank
|
|
415
184
|
console.log(chalk.yellow('\n Promotion would happen here (not yet implemented)'));
|
|
416
185
|
}
|
|
417
186
|
else {
|
|
@@ -427,9 +196,11 @@ Examples:
|
|
|
427
196
|
process.exit(1);
|
|
428
197
|
}
|
|
429
198
|
});
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
199
|
+
}
|
|
200
|
+
// ============================================================================
|
|
201
|
+
// Subcommand: export
|
|
202
|
+
// ============================================================================
|
|
203
|
+
function registerExportCommand(learning) {
|
|
433
204
|
learning
|
|
434
205
|
.command('export')
|
|
435
206
|
.description('Export learned patterns for sharing')
|
|
@@ -440,35 +211,17 @@ Examples:
|
|
|
440
211
|
.action(async (options) => {
|
|
441
212
|
try {
|
|
442
213
|
const reasoningBank = await initializeLearningSystem();
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
limit: 10000,
|
|
446
|
-
domain: options.domain,
|
|
447
|
-
});
|
|
448
|
-
if (!searchResult.success) {
|
|
214
|
+
const searchResult = await reasoningBank.searchPatterns('*', { limit: 10000, domain: options.domain });
|
|
215
|
+
if (!searchResult.success)
|
|
449
216
|
throw new Error(searchResult.error.message);
|
|
450
|
-
|
|
451
|
-
const patterns = searchResult.value
|
|
452
|
-
.map(m => m.pattern)
|
|
453
|
-
.filter(p => !options.longTermOnly || p.tier === 'long-term');
|
|
217
|
+
const patterns = searchResult.value.map(m => m.pattern).filter(p => !options.longTermOnly || p.tier === 'long-term');
|
|
454
218
|
const exportData = {
|
|
455
|
-
version: '3.0.0',
|
|
456
|
-
exportedAt: new Date().toISOString(),
|
|
457
|
-
source: process.cwd(),
|
|
219
|
+
version: '3.0.0', exportedAt: new Date().toISOString(), source: process.cwd(),
|
|
458
220
|
patternCount: patterns.length,
|
|
459
221
|
patterns: patterns.map(p => ({
|
|
460
|
-
id: p.id,
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
patternType: p.patternType,
|
|
464
|
-
qeDomain: p.qeDomain,
|
|
465
|
-
tier: p.tier,
|
|
466
|
-
confidence: p.confidence,
|
|
467
|
-
successRate: p.successRate,
|
|
468
|
-
successfulUses: p.successfulUses,
|
|
469
|
-
qualityScore: p.qualityScore,
|
|
470
|
-
template: p.template,
|
|
471
|
-
context: p.context,
|
|
222
|
+
id: p.id, name: p.name, description: p.description, patternType: p.patternType,
|
|
223
|
+
qeDomain: p.qeDomain, tier: p.tier, confidence: p.confidence, successRate: p.successRate,
|
|
224
|
+
successfulUses: p.successfulUses, qualityScore: p.qualityScore, template: p.template, context: p.context,
|
|
472
225
|
})),
|
|
473
226
|
};
|
|
474
227
|
if (options.json) {
|
|
@@ -486,9 +239,11 @@ Examples:
|
|
|
486
239
|
process.exit(1);
|
|
487
240
|
}
|
|
488
241
|
});
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
242
|
+
}
|
|
243
|
+
// ============================================================================
|
|
244
|
+
// Subcommand: import
|
|
245
|
+
// ============================================================================
|
|
246
|
+
function registerImportCommand(learning) {
|
|
492
247
|
learning
|
|
493
248
|
.command('import')
|
|
494
249
|
.description('Import patterns from file')
|
|
@@ -498,14 +253,12 @@ Examples:
|
|
|
498
253
|
.action(async (options) => {
|
|
499
254
|
try {
|
|
500
255
|
const inputPath = path.resolve(options.input);
|
|
501
|
-
if (!existsSync(inputPath))
|
|
256
|
+
if (!existsSync(inputPath))
|
|
502
257
|
throw new Error(`File not found: ${inputPath}`);
|
|
503
|
-
}
|
|
504
258
|
const content = readFileSync(inputPath, 'utf-8');
|
|
505
|
-
const importData =
|
|
506
|
-
if (!importData.patterns || !Array.isArray(importData.patterns))
|
|
259
|
+
const importData = safeJsonParse(content);
|
|
260
|
+
if (!importData.patterns || !Array.isArray(importData.patterns))
|
|
507
261
|
throw new Error('Invalid pattern file format');
|
|
508
|
-
}
|
|
509
262
|
const reasoningBank = await initializeLearningSystem();
|
|
510
263
|
let imported = 0;
|
|
511
264
|
let skipped = 0;
|
|
@@ -514,15 +267,11 @@ Examples:
|
|
|
514
267
|
for (const pattern of importData.patterns) {
|
|
515
268
|
try {
|
|
516
269
|
const result = await reasoningBank.storePattern({
|
|
517
|
-
patternType: pattern.patternType,
|
|
518
|
-
|
|
519
|
-
description: pattern.description,
|
|
520
|
-
template: pattern.template,
|
|
521
|
-
context: pattern.context,
|
|
270
|
+
patternType: pattern.patternType, name: pattern.name,
|
|
271
|
+
description: pattern.description, template: pattern.template, context: pattern.context,
|
|
522
272
|
});
|
|
523
|
-
if (result.success)
|
|
273
|
+
if (result.success)
|
|
524
274
|
imported++;
|
|
525
|
-
}
|
|
526
275
|
else {
|
|
527
276
|
skipped++;
|
|
528
277
|
errors.push(`${pattern.name}: ${result.error.message}`);
|
|
@@ -535,13 +284,7 @@ Examples:
|
|
|
535
284
|
}
|
|
536
285
|
}
|
|
537
286
|
if (options.json) {
|
|
538
|
-
printJson({
|
|
539
|
-
dryRun: options.dryRun || false,
|
|
540
|
-
totalPatterns: importData.patterns.length,
|
|
541
|
-
imported,
|
|
542
|
-
skipped,
|
|
543
|
-
errors,
|
|
544
|
-
});
|
|
287
|
+
printJson({ dryRun: options.dryRun || false, totalPatterns: importData.patterns.length, imported, skipped, errors });
|
|
545
288
|
}
|
|
546
289
|
else {
|
|
547
290
|
console.log(chalk.bold('\n📥 Pattern Import\n'));
|
|
@@ -553,9 +296,8 @@ Examples:
|
|
|
553
296
|
}
|
|
554
297
|
else {
|
|
555
298
|
console.log(chalk.green(`\n Imported: ${imported}`));
|
|
556
|
-
if (skipped > 0)
|
|
299
|
+
if (skipped > 0)
|
|
557
300
|
console.log(chalk.yellow(` Skipped: ${skipped}`));
|
|
558
|
-
}
|
|
559
301
|
}
|
|
560
302
|
console.log('');
|
|
561
303
|
}
|
|
@@ -566,9 +308,11 @@ Examples:
|
|
|
566
308
|
process.exit(1);
|
|
567
309
|
}
|
|
568
310
|
});
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
311
|
+
}
|
|
312
|
+
// ============================================================================
|
|
313
|
+
// Subcommand: reset
|
|
314
|
+
// ============================================================================
|
|
315
|
+
function registerResetCommand(learning) {
|
|
572
316
|
learning
|
|
573
317
|
.command('reset')
|
|
574
318
|
.description('Reset learning data (patterns and metrics)')
|
|
@@ -578,29 +322,23 @@ Examples:
|
|
|
578
322
|
try {
|
|
579
323
|
if (!options.confirm) {
|
|
580
324
|
console.log(chalk.yellow('\n⚠️ This will reset your learning data.'));
|
|
581
|
-
console.log(chalk.gray(' Use --confirm to proceed'));
|
|
582
|
-
console.log('');
|
|
325
|
+
console.log(chalk.gray(' Use --confirm to proceed\n'));
|
|
583
326
|
process.exit(0);
|
|
584
327
|
}
|
|
585
328
|
const projectRoot = findProjectRoot();
|
|
586
329
|
const dataDir = path.join(projectRoot, '.agentic-qe');
|
|
587
|
-
// List files that would be affected
|
|
588
330
|
const filesToReset = [
|
|
589
331
|
path.join(dataDir, 'data', 'patterns'),
|
|
590
332
|
path.join(dataDir, 'data', 'hnsw'),
|
|
591
333
|
];
|
|
592
|
-
if (!options.patternsOnly)
|
|
334
|
+
if (!options.patternsOnly)
|
|
593
335
|
filesToReset.push(path.join(dataDir, 'data', 'learning-config.json'));
|
|
594
|
-
}
|
|
595
336
|
console.log(chalk.bold('\n🗑️ Resetting Learning Data\n'));
|
|
596
337
|
for (const file of filesToReset) {
|
|
597
|
-
if (existsSync(file))
|
|
338
|
+
if (existsSync(file))
|
|
598
339
|
console.log(chalk.dim(` Removing: ${path.relative(projectRoot, file)}`));
|
|
599
|
-
// Actual deletion would happen here
|
|
600
|
-
}
|
|
601
340
|
}
|
|
602
|
-
printSuccess('Learning data reset. Run "aqe init --auto" to reinitialize
|
|
603
|
-
console.log('');
|
|
341
|
+
printSuccess('Learning data reset. Run "aqe init --auto" to reinitialize.\n');
|
|
604
342
|
process.exit(0);
|
|
605
343
|
}
|
|
606
344
|
catch (error) {
|
|
@@ -608,9 +346,11 @@ Examples:
|
|
|
608
346
|
process.exit(1);
|
|
609
347
|
}
|
|
610
348
|
});
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
349
|
+
}
|
|
350
|
+
// ============================================================================
|
|
351
|
+
// Subcommand: extract
|
|
352
|
+
// ============================================================================
|
|
353
|
+
function registerExtractCommand(learning) {
|
|
614
354
|
learning
|
|
615
355
|
.command('extract')
|
|
616
356
|
.description('Extract QE patterns from existing learning experiences')
|
|
@@ -622,133 +362,38 @@ Examples:
|
|
|
622
362
|
try {
|
|
623
363
|
const projectRoot = findProjectRoot();
|
|
624
364
|
const dbPath = path.join(projectRoot, '.agentic-qe', 'memory.db');
|
|
625
|
-
if (!existsSync(dbPath))
|
|
365
|
+
if (!existsSync(dbPath))
|
|
626
366
|
throw new Error('No memory database found. Run "aqe init --auto" first.');
|
|
627
|
-
}
|
|
628
367
|
const minReward = parseFloat(options.minReward);
|
|
629
368
|
const minCount = parseInt(options.minCount, 10);
|
|
630
369
|
console.log(chalk.bold('\n🔬 Pattern Extraction from Learning Experiences\n'));
|
|
631
370
|
console.log(` Min reward threshold: ${minReward}`);
|
|
632
|
-
console.log(` Min occurrences: ${minCount}`);
|
|
633
|
-
console.log('');
|
|
634
|
-
// Dynamic import for better-sqlite3
|
|
371
|
+
console.log(` Min occurrences: ${minCount}\n`);
|
|
635
372
|
const Database = (await import('better-sqlite3')).default;
|
|
636
373
|
const db = new Database(dbPath, { readonly: true });
|
|
637
|
-
// Query learning experiences grouped by task_type
|
|
638
374
|
const experiences = db.prepare(`
|
|
639
|
-
SELECT
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
AVG(reward) as avg_reward,
|
|
643
|
-
MAX(reward) as max_reward,
|
|
644
|
-
MIN(reward) as min_reward,
|
|
645
|
-
GROUP_CONCAT(DISTINCT action) as actions
|
|
646
|
-
FROM learning_experiences
|
|
647
|
-
WHERE reward >= ?
|
|
648
|
-
GROUP BY task_type
|
|
649
|
-
HAVING COUNT(*) >= ?
|
|
650
|
-
ORDER BY avg_reward DESC
|
|
375
|
+
SELECT task_type, COUNT(*) as count, AVG(reward) as avg_reward, MAX(reward) as max_reward,
|
|
376
|
+
MIN(reward) as min_reward, GROUP_CONCAT(DISTINCT action) as actions
|
|
377
|
+
FROM learning_experiences WHERE reward >= ? GROUP BY task_type HAVING COUNT(*) >= ? ORDER BY avg_reward DESC
|
|
651
378
|
`).all(minReward, minCount);
|
|
652
|
-
// Query memory entries for additional context
|
|
653
379
|
const memoryPatterns = db.prepare(`
|
|
654
|
-
SELECT
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
FROM memory_entries
|
|
658
|
-
WHERE key LIKE 'phase2/learning/%'
|
|
659
|
-
GROUP BY substr(key, 1, 40)
|
|
660
|
-
HAVING COUNT(*) >= ?
|
|
661
|
-
ORDER BY COUNT(*) DESC
|
|
662
|
-
LIMIT 20
|
|
380
|
+
SELECT substr(key, 1, 40) as key_prefix, COUNT(*) as count
|
|
381
|
+
FROM memory_entries WHERE key LIKE 'phase2/learning/%'
|
|
382
|
+
GROUP BY substr(key, 1, 40) HAVING COUNT(*) >= ? ORDER BY COUNT(*) DESC LIMIT 20
|
|
663
383
|
`).all(minCount);
|
|
664
384
|
db.close();
|
|
665
|
-
// Map task types to QE domains
|
|
666
|
-
const domainMapping = {
|
|
667
|
-
'generate': 'test-generation',
|
|
668
|
-
'test-generation': 'test-generation',
|
|
669
|
-
'analyze': 'coverage-analysis',
|
|
670
|
-
'coverage': 'coverage-analysis',
|
|
671
|
-
'coverage-analysis': 'coverage-analysis',
|
|
672
|
-
'run': 'test-execution',
|
|
673
|
-
'test-execution': 'test-execution',
|
|
674
|
-
'report': 'quality-assessment',
|
|
675
|
-
'quality': 'quality-assessment',
|
|
676
|
-
'quality-analysis': 'quality-assessment',
|
|
677
|
-
'security': 'security-compliance',
|
|
678
|
-
'sast': 'security-compliance',
|
|
679
|
-
'owasp': 'security-compliance',
|
|
680
|
-
'secrets': 'security-compliance',
|
|
681
|
-
'audit': 'security-compliance',
|
|
682
|
-
'recommend': 'defect-intelligence',
|
|
683
|
-
'predict': 'defect-intelligence',
|
|
684
|
-
'complexity-analysis': 'code-intelligence',
|
|
685
|
-
'code-analysis': 'code-intelligence',
|
|
686
|
-
'stabilize': 'chaos-resilience',
|
|
687
|
-
'flaky': 'chaos-resilience',
|
|
688
|
-
'quarantine': 'chaos-resilience',
|
|
689
|
-
'retry': 'chaos-resilience',
|
|
690
|
-
'stress': 'chaos-resilience',
|
|
691
|
-
'load': 'chaos-resilience',
|
|
692
|
-
'endurance': 'chaos-resilience',
|
|
693
|
-
'baseline': 'chaos-resilience',
|
|
694
|
-
};
|
|
695
|
-
// Map task types to valid QE pattern types
|
|
696
|
-
const patternTypeMapping = {
|
|
697
|
-
'generate': 'test-template',
|
|
698
|
-
'test-generation': 'test-template',
|
|
699
|
-
'analyze': 'coverage-strategy',
|
|
700
|
-
'coverage': 'coverage-strategy',
|
|
701
|
-
'coverage-analysis': 'coverage-strategy',
|
|
702
|
-
'run': 'test-template',
|
|
703
|
-
'test-execution': 'test-template',
|
|
704
|
-
'report': 'assertion-pattern',
|
|
705
|
-
'quality': 'assertion-pattern',
|
|
706
|
-
'quality-analysis': 'assertion-pattern',
|
|
707
|
-
'security': 'assertion-pattern',
|
|
708
|
-
'sast': 'assertion-pattern',
|
|
709
|
-
'owasp': 'assertion-pattern',
|
|
710
|
-
'secrets': 'assertion-pattern',
|
|
711
|
-
'audit': 'assertion-pattern',
|
|
712
|
-
'recommend': 'assertion-pattern',
|
|
713
|
-
'predict': 'assertion-pattern',
|
|
714
|
-
'complexity-analysis': 'assertion-pattern',
|
|
715
|
-
'code-analysis': 'assertion-pattern',
|
|
716
|
-
'stabilize': 'flaky-fix',
|
|
717
|
-
'flaky': 'flaky-fix',
|
|
718
|
-
'quarantine': 'flaky-fix',
|
|
719
|
-
'retry': 'flaky-fix',
|
|
720
|
-
'stress': 'perf-benchmark',
|
|
721
|
-
'load': 'perf-benchmark',
|
|
722
|
-
'endurance': 'perf-benchmark',
|
|
723
|
-
'baseline': 'perf-benchmark',
|
|
724
|
-
'mock': 'mock-pattern',
|
|
725
|
-
'dependency': 'mock-pattern',
|
|
726
|
-
};
|
|
727
|
-
// Extract patterns
|
|
728
385
|
const extractedPatterns = [];
|
|
729
386
|
for (const exp of experiences) {
|
|
730
|
-
const domain =
|
|
731
|
-
const patternType =
|
|
387
|
+
const domain = DOMAIN_MAPPING[exp.task_type] || 'code-intelligence';
|
|
388
|
+
const patternType = PATTERN_TYPE_MAPPING[exp.task_type] || 'test-template';
|
|
732
389
|
const actions = exp.actions ? exp.actions.split(',').slice(0, 5) : [];
|
|
733
390
|
extractedPatterns.push({
|
|
734
|
-
name: `${exp.task_type}-success-pattern`,
|
|
735
|
-
|
|
736
|
-
patternType,
|
|
737
|
-
confidence: Math.min(0.95, exp.avg_reward / 2),
|
|
738
|
-
sourceCount: exp.count,
|
|
739
|
-
avgReward: exp.avg_reward,
|
|
740
|
-
actions,
|
|
391
|
+
name: `${exp.task_type}-success-pattern`, domain, patternType,
|
|
392
|
+
confidence: Math.min(0.95, exp.avg_reward / 2), sourceCount: exp.count, avgReward: exp.avg_reward, actions,
|
|
741
393
|
});
|
|
742
394
|
}
|
|
743
395
|
if (options.json) {
|
|
744
|
-
printJson({
|
|
745
|
-
minReward,
|
|
746
|
-
minCount,
|
|
747
|
-
dryRun: options.dryRun || false,
|
|
748
|
-
experienceGroups: experiences.length,
|
|
749
|
-
memoryPatterns: memoryPatterns.length,
|
|
750
|
-
extractedPatterns,
|
|
751
|
-
});
|
|
396
|
+
printJson({ minReward, minCount, dryRun: options.dryRun || false, experienceGroups: experiences.length, memoryPatterns: memoryPatterns.length, extractedPatterns });
|
|
752
397
|
}
|
|
753
398
|
else {
|
|
754
399
|
console.log(chalk.bold('Learning Experience Groups:'));
|
|
@@ -757,16 +402,14 @@ Examples:
|
|
|
757
402
|
}
|
|
758
403
|
else {
|
|
759
404
|
for (const exp of experiences) {
|
|
760
|
-
const rewardColor = exp.avg_reward >= 1.0 ? chalk.green :
|
|
761
|
-
exp.avg_reward >= 0.5 ? chalk.yellow : chalk.red;
|
|
405
|
+
const rewardColor = exp.avg_reward >= 1.0 ? chalk.green : exp.avg_reward >= 0.5 ? chalk.yellow : chalk.red;
|
|
762
406
|
console.log(` ${chalk.cyan(exp.task_type)}`);
|
|
763
407
|
console.log(` Count: ${exp.count}, Avg Reward: ${rewardColor(exp.avg_reward.toFixed(2))}`);
|
|
764
408
|
}
|
|
765
409
|
}
|
|
766
410
|
console.log(chalk.bold('\nMemory Pattern Sources:'));
|
|
767
|
-
for (const mp of memoryPatterns.slice(0, 10))
|
|
411
|
+
for (const mp of memoryPatterns.slice(0, 10))
|
|
768
412
|
console.log(` ${mp.key_prefix}... (${mp.count})`);
|
|
769
|
-
}
|
|
770
413
|
console.log(chalk.bold('\nExtracted Patterns:'));
|
|
771
414
|
if (extractedPatterns.length === 0) {
|
|
772
415
|
console.log(chalk.dim(' No patterns extracted'));
|
|
@@ -779,51 +422,32 @@ Examples:
|
|
|
779
422
|
}
|
|
780
423
|
}
|
|
781
424
|
if (!options.dryRun && extractedPatterns.length > 0) {
|
|
782
|
-
// Store extracted patterns
|
|
783
425
|
const reasoningBank = await initializeLearningSystem();
|
|
784
426
|
let stored = 0;
|
|
785
427
|
const errors = [];
|
|
786
428
|
for (const p of extractedPatterns) {
|
|
787
429
|
try {
|
|
788
|
-
// Build template content from actions
|
|
789
430
|
const templateContent = p.actions.length > 0
|
|
790
431
|
? `// ${p.name}\n// Steps: ${p.actions.join(' -> ')}\n\n{{implementation}}`
|
|
791
432
|
: `// ${p.name}\n// Extracted pattern with ${p.sourceCount} successful uses\n\n{{implementation}}`;
|
|
792
433
|
const result = await reasoningBank.storePattern({
|
|
793
|
-
patternType: p.patternType,
|
|
794
|
-
name: p.name,
|
|
434
|
+
patternType: p.patternType, name: p.name,
|
|
795
435
|
description: `Extracted from ${p.sourceCount} learning experiences with avg reward ${p.avgReward.toFixed(2)}`,
|
|
796
|
-
template: {
|
|
797
|
-
|
|
798
|
-
content: templateContent,
|
|
799
|
-
variables: [
|
|
800
|
-
{
|
|
801
|
-
name: 'implementation',
|
|
802
|
-
type: 'code',
|
|
803
|
-
required: true,
|
|
804
|
-
description: 'Implementation code for this pattern',
|
|
805
|
-
},
|
|
806
|
-
],
|
|
807
|
-
},
|
|
808
|
-
context: {
|
|
809
|
-
tags: [p.domain, p.patternType, `sources:${p.sourceCount}`, `reward:${p.avgReward.toFixed(2)}`],
|
|
810
|
-
},
|
|
436
|
+
template: { type: 'code', content: templateContent, variables: [{ name: 'implementation', type: 'code', required: true, description: 'Implementation code for this pattern' }] },
|
|
437
|
+
context: { tags: [p.domain, p.patternType, `sources:${p.sourceCount}`, `reward:${p.avgReward.toFixed(2)}`] },
|
|
811
438
|
});
|
|
812
|
-
if (result.success)
|
|
439
|
+
if (result.success)
|
|
813
440
|
stored++;
|
|
814
|
-
|
|
815
|
-
else {
|
|
441
|
+
else
|
|
816
442
|
errors.push(`${p.name}: ${result.error.message}`);
|
|
817
|
-
}
|
|
818
443
|
}
|
|
819
444
|
catch (e) {
|
|
820
445
|
errors.push(`${p.name}: ${e instanceof Error ? e.message : 'unknown'}`);
|
|
821
446
|
}
|
|
822
447
|
}
|
|
823
448
|
console.log(chalk.green(`\n✓ Stored ${stored} new patterns`));
|
|
824
|
-
if (errors.length > 0 && errors.length <= 5)
|
|
449
|
+
if (errors.length > 0 && errors.length <= 5)
|
|
825
450
|
console.log(chalk.yellow(` Errors: ${errors.slice(0, 3).join(', ')}${errors.length > 3 ? '...' : ''}`));
|
|
826
|
-
}
|
|
827
451
|
}
|
|
828
452
|
else if (options.dryRun) {
|
|
829
453
|
console.log(chalk.yellow('\n Dry run - no patterns stored'));
|
|
@@ -837,9 +461,11 @@ Examples:
|
|
|
837
461
|
process.exit(1);
|
|
838
462
|
}
|
|
839
463
|
});
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
464
|
+
}
|
|
465
|
+
// ============================================================================
|
|
466
|
+
// Subcommand: dashboard
|
|
467
|
+
// ============================================================================
|
|
468
|
+
function registerDashboardCommand(learning) {
|
|
843
469
|
learning
|
|
844
470
|
.command('dashboard')
|
|
845
471
|
.description('Display learning system dashboard with metrics and trends')
|
|
@@ -856,12 +482,10 @@ Examples:
|
|
|
856
482
|
}
|
|
857
483
|
const dashboard = await tracker.getDashboardData();
|
|
858
484
|
tracker.close();
|
|
859
|
-
if (options.json)
|
|
485
|
+
if (options.json)
|
|
860
486
|
printJson(dashboard);
|
|
861
|
-
|
|
862
|
-
else {
|
|
487
|
+
else
|
|
863
488
|
displayDashboard(dashboard);
|
|
864
|
-
}
|
|
865
489
|
process.exit(0);
|
|
866
490
|
}
|
|
867
491
|
catch (error) {
|
|
@@ -869,9 +493,11 @@ Examples:
|
|
|
869
493
|
process.exit(1);
|
|
870
494
|
}
|
|
871
495
|
});
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
496
|
+
}
|
|
497
|
+
// ============================================================================
|
|
498
|
+
// Subcommand: info
|
|
499
|
+
// ============================================================================
|
|
500
|
+
function registerInfoCommand(learning) {
|
|
875
501
|
learning
|
|
876
502
|
.command('info')
|
|
877
503
|
.description('Show learning system configuration and paths')
|
|
@@ -894,8 +520,7 @@ Examples:
|
|
|
894
520
|
console.log(` ${QE_DOMAIN_LIST.join(', ')}`);
|
|
895
521
|
console.log(chalk.bold('\nHooks:'));
|
|
896
522
|
console.log(' Configure in .claude/settings.json');
|
|
897
|
-
console.log(' Events: pre-edit, post-edit, pre-task, post-task, route');
|
|
898
|
-
console.log('');
|
|
523
|
+
console.log(' Events: pre-edit, post-edit, pre-task, post-task, route\n');
|
|
899
524
|
process.exit(0);
|
|
900
525
|
}
|
|
901
526
|
catch (error) {
|
|
@@ -903,9 +528,11 @@ Examples:
|
|
|
903
528
|
process.exit(1);
|
|
904
529
|
}
|
|
905
530
|
});
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
531
|
+
}
|
|
532
|
+
// ============================================================================
|
|
533
|
+
// Subcommand: backup
|
|
534
|
+
// ============================================================================
|
|
535
|
+
function registerBackupCommand(learning) {
|
|
909
536
|
learning
|
|
910
537
|
.command('backup')
|
|
911
538
|
.description('Backup learning database to a file')
|
|
@@ -916,60 +543,35 @@ Examples:
|
|
|
916
543
|
.action(async (options) => {
|
|
917
544
|
try {
|
|
918
545
|
const dbPath = getDbPath();
|
|
919
|
-
if (!existsSync(dbPath))
|
|
546
|
+
if (!existsSync(dbPath))
|
|
920
547
|
throw new Error(`No learning database found at: ${dbPath}`);
|
|
921
|
-
}
|
|
922
|
-
// Generate default output path with timestamp
|
|
923
548
|
const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
|
924
549
|
const defaultOutput = path.join(process.cwd(), 'backups', `learning-${timestamp}.db`);
|
|
925
550
|
let outputPath = options.output ? path.resolve(options.output) : defaultOutput;
|
|
926
|
-
// Ensure backup directory exists
|
|
927
551
|
const backupDir = path.dirname(outputPath);
|
|
928
|
-
if (!existsSync(backupDir))
|
|
552
|
+
if (!existsSync(backupDir))
|
|
929
553
|
mkdirSync(backupDir, { recursive: true });
|
|
930
|
-
}
|
|
931
|
-
// Get source file size
|
|
932
554
|
const sourceStats = await stat(dbPath);
|
|
933
555
|
const sourceSizeKB = (sourceStats.size / 1024).toFixed(2);
|
|
934
|
-
// Copy the database file
|
|
935
556
|
copyFileSync(dbPath, outputPath);
|
|
936
|
-
// Also copy WAL file if it exists (for consistency)
|
|
937
557
|
const walPath = `${dbPath}-wal`;
|
|
938
|
-
if (existsSync(walPath))
|
|
558
|
+
if (existsSync(walPath))
|
|
939
559
|
copyFileSync(walPath, `${outputPath}-wal`);
|
|
940
|
-
}
|
|
941
|
-
// Compress if requested
|
|
942
560
|
let finalPath = outputPath;
|
|
943
561
|
if (options.compress) {
|
|
944
562
|
finalPath = await compressFile(outputPath);
|
|
945
|
-
// Remove uncompressed version
|
|
946
563
|
await unlink(outputPath);
|
|
947
|
-
if (existsSync(`${outputPath}-wal`))
|
|
564
|
+
if (existsSync(`${outputPath}-wal`))
|
|
948
565
|
await unlink(`${outputPath}-wal`);
|
|
949
|
-
}
|
|
950
566
|
}
|
|
951
|
-
// Get final file size
|
|
952
567
|
const finalStats = await stat(finalPath);
|
|
953
568
|
const finalSizeKB = (finalStats.size / 1024).toFixed(2);
|
|
954
|
-
// Verify if requested
|
|
955
569
|
let verificationResult;
|
|
956
|
-
if (options.verify && !options.compress)
|
|
570
|
+
if (options.verify && !options.compress)
|
|
957
571
|
verificationResult = await verifyDatabaseIntegrity(outputPath);
|
|
958
|
-
}
|
|
959
|
-
// Get schema version
|
|
960
572
|
const schemaVersion = await getSchemaVersion(dbPath);
|
|
961
573
|
if (options.json) {
|
|
962
|
-
printJson({
|
|
963
|
-
success: true,
|
|
964
|
-
sourcePath: dbPath,
|
|
965
|
-
backupPath: finalPath,
|
|
966
|
-
sourceSizeKB: parseFloat(sourceSizeKB),
|
|
967
|
-
backupSizeKB: parseFloat(finalSizeKB),
|
|
968
|
-
compressed: options.compress || false,
|
|
969
|
-
schemaVersion,
|
|
970
|
-
verification: verificationResult,
|
|
971
|
-
timestamp: new Date().toISOString(),
|
|
972
|
-
});
|
|
574
|
+
printJson({ success: true, sourcePath: dbPath, backupPath: finalPath, sourceSizeKB: parseFloat(sourceSizeKB), backupSizeKB: parseFloat(finalSizeKB), compressed: options.compress || false, schemaVersion, verification: verificationResult, timestamp: new Date().toISOString() });
|
|
973
575
|
}
|
|
974
576
|
else {
|
|
975
577
|
console.log(chalk.bold('\n💾 Learning Database Backup\n'));
|
|
@@ -983,15 +585,9 @@ Examples:
|
|
|
983
585
|
console.log(` Compression: ${compressionRatio}% reduction`);
|
|
984
586
|
}
|
|
985
587
|
if (verificationResult) {
|
|
986
|
-
|
|
987
|
-
console.log(chalk.green(` Verification: ${verificationResult.message}`));
|
|
988
|
-
}
|
|
989
|
-
else {
|
|
990
|
-
console.log(chalk.red(` Verification: ${verificationResult.message}`));
|
|
991
|
-
}
|
|
588
|
+
console.log(verificationResult.valid ? chalk.green(` Verification: ${verificationResult.message}`) : chalk.red(` Verification: ${verificationResult.message}`));
|
|
992
589
|
}
|
|
993
|
-
printSuccess(`Backup saved to: ${finalPath}`);
|
|
994
|
-
console.log('');
|
|
590
|
+
printSuccess(`Backup saved to: ${finalPath}\n`);
|
|
995
591
|
}
|
|
996
592
|
process.exit(0);
|
|
997
593
|
}
|
|
@@ -1000,9 +596,11 @@ Examples:
|
|
|
1000
596
|
process.exit(1);
|
|
1001
597
|
}
|
|
1002
598
|
});
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
599
|
+
}
|
|
600
|
+
// ============================================================================
|
|
601
|
+
// Subcommand: restore
|
|
602
|
+
// ============================================================================
|
|
603
|
+
function registerRestoreCommand(learning) {
|
|
1006
604
|
learning
|
|
1007
605
|
.command('restore')
|
|
1008
606
|
.description('Restore learning database from backup')
|
|
@@ -1014,71 +612,46 @@ Examples:
|
|
|
1014
612
|
try {
|
|
1015
613
|
const inputPath = path.resolve(options.input);
|
|
1016
614
|
const dbPath = getDbPath();
|
|
1017
|
-
if (!existsSync(inputPath))
|
|
615
|
+
if (!existsSync(inputPath))
|
|
1018
616
|
throw new Error(`Backup file not found: ${inputPath}`);
|
|
1019
|
-
}
|
|
1020
|
-
// Determine if compressed
|
|
1021
617
|
const isCompressed = inputPath.endsWith('.gz');
|
|
1022
618
|
let restorePath = inputPath;
|
|
1023
|
-
// Decompress if needed
|
|
1024
619
|
if (isCompressed) {
|
|
1025
620
|
const tempPath = inputPath.replace('.gz', '.tmp');
|
|
1026
621
|
await decompressFile(inputPath, tempPath);
|
|
1027
622
|
restorePath = tempPath;
|
|
1028
623
|
}
|
|
1029
|
-
// Verify if requested
|
|
1030
624
|
if (options.verify) {
|
|
1031
625
|
const verificationResult = await verifyDatabaseIntegrity(restorePath);
|
|
1032
626
|
if (!verificationResult.valid) {
|
|
1033
|
-
if (isCompressed && existsSync(restorePath))
|
|
627
|
+
if (isCompressed && existsSync(restorePath))
|
|
1034
628
|
await unlink(restorePath);
|
|
1035
|
-
}
|
|
1036
629
|
throw new Error(`Backup verification failed: ${verificationResult.message}`);
|
|
1037
630
|
}
|
|
1038
631
|
}
|
|
1039
|
-
// Check if target exists
|
|
1040
632
|
if (existsSync(dbPath) && !options.force) {
|
|
1041
633
|
printError(`Database already exists at: ${dbPath}`);
|
|
1042
634
|
console.log(chalk.yellow(' Use --force to overwrite'));
|
|
1043
|
-
if (isCompressed && existsSync(restorePath))
|
|
635
|
+
if (isCompressed && existsSync(restorePath))
|
|
1044
636
|
await unlink(restorePath);
|
|
1045
|
-
}
|
|
1046
637
|
process.exit(1);
|
|
1047
638
|
}
|
|
1048
|
-
// Ensure target directory exists
|
|
1049
639
|
const targetDir = path.dirname(dbPath);
|
|
1050
|
-
if (!existsSync(targetDir))
|
|
640
|
+
if (!existsSync(targetDir))
|
|
1051
641
|
mkdirSync(targetDir, { recursive: true });
|
|
1052
|
-
|
|
1053
|
-
// Remove existing database files
|
|
1054
|
-
if (existsSync(dbPath)) {
|
|
642
|
+
if (existsSync(dbPath))
|
|
1055
643
|
await unlink(dbPath);
|
|
1056
|
-
}
|
|
1057
|
-
if (existsSync(`${dbPath}-wal`)) {
|
|
644
|
+
if (existsSync(`${dbPath}-wal`))
|
|
1058
645
|
await unlink(`${dbPath}-wal`);
|
|
1059
|
-
}
|
|
1060
|
-
if (existsSync(`${dbPath}-shm`)) {
|
|
646
|
+
if (existsSync(`${dbPath}-shm`))
|
|
1061
647
|
await unlink(`${dbPath}-shm`);
|
|
1062
|
-
}
|
|
1063
|
-
// Copy restored file to target
|
|
1064
648
|
copyFileSync(restorePath, dbPath);
|
|
1065
|
-
|
|
1066
|
-
if (isCompressed && existsSync(restorePath)) {
|
|
649
|
+
if (isCompressed && existsSync(restorePath))
|
|
1067
650
|
await unlink(restorePath);
|
|
1068
|
-
}
|
|
1069
|
-
// Get restored database info
|
|
1070
651
|
const restoredStats = await stat(dbPath);
|
|
1071
652
|
const schemaVersion = await getSchemaVersion(dbPath);
|
|
1072
653
|
if (options.json) {
|
|
1073
|
-
printJson({
|
|
1074
|
-
success: true,
|
|
1075
|
-
backupPath: inputPath,
|
|
1076
|
-
restoredPath: dbPath,
|
|
1077
|
-
sizeKB: parseFloat((restoredStats.size / 1024).toFixed(2)),
|
|
1078
|
-
schemaVersion,
|
|
1079
|
-
wasCompressed: isCompressed,
|
|
1080
|
-
timestamp: new Date().toISOString(),
|
|
1081
|
-
});
|
|
654
|
+
printJson({ success: true, backupPath: inputPath, restoredPath: dbPath, sizeKB: parseFloat((restoredStats.size / 1024).toFixed(2)), schemaVersion, wasCompressed: isCompressed, timestamp: new Date().toISOString() });
|
|
1082
655
|
}
|
|
1083
656
|
else {
|
|
1084
657
|
console.log(chalk.bold('\n🔄 Learning Database Restore\n'));
|
|
@@ -1086,8 +659,7 @@ Examples:
|
|
|
1086
659
|
console.log(` Restored to: ${dbPath}`);
|
|
1087
660
|
console.log(` Size: ${(restoredStats.size / 1024).toFixed(2)} KB`);
|
|
1088
661
|
console.log(` Schema version: ${schemaVersion}`);
|
|
1089
|
-
printSuccess('Database restored successfully');
|
|
1090
|
-
console.log('');
|
|
662
|
+
printSuccess('Database restored successfully\n');
|
|
1091
663
|
}
|
|
1092
664
|
process.exit(0);
|
|
1093
665
|
}
|
|
@@ -1096,9 +668,11 @@ Examples:
|
|
|
1096
668
|
process.exit(1);
|
|
1097
669
|
}
|
|
1098
670
|
});
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
671
|
+
}
|
|
672
|
+
// ============================================================================
|
|
673
|
+
// Subcommand: verify
|
|
674
|
+
// ============================================================================
|
|
675
|
+
function registerVerifyCommand(learning) {
|
|
1102
676
|
learning
|
|
1103
677
|
.command('verify')
|
|
1104
678
|
.description('Verify learning database integrity')
|
|
@@ -1107,59 +681,38 @@ Examples:
|
|
|
1107
681
|
.action(async (options) => {
|
|
1108
682
|
try {
|
|
1109
683
|
const dbPath = options.file ? path.resolve(options.file) : getDbPath();
|
|
1110
|
-
if (!existsSync(dbPath))
|
|
684
|
+
if (!existsSync(dbPath))
|
|
1111
685
|
throw new Error(`Database file not found: ${dbPath}`);
|
|
1112
|
-
}
|
|
1113
686
|
const verificationResult = await verifyDatabaseIntegrity(dbPath);
|
|
1114
687
|
const schemaVersion = await getSchemaVersion(dbPath);
|
|
1115
688
|
const fileStats = await stat(dbPath);
|
|
1116
|
-
// Get table counts
|
|
1117
689
|
let tableCounts = {};
|
|
1118
690
|
try {
|
|
1119
691
|
const Database = (await import('better-sqlite3')).default;
|
|
1120
692
|
const db = new Database(dbPath, { readonly: true });
|
|
1121
|
-
const
|
|
1122
|
-
for (const table of tables) {
|
|
693
|
+
for (const table of ['qe_patterns', 'qe_trajectories', 'learning_experiences', 'kv_store', 'vectors']) {
|
|
1123
694
|
try {
|
|
1124
|
-
const
|
|
1125
|
-
tableCounts[table] =
|
|
1126
|
-
}
|
|
1127
|
-
catch {
|
|
1128
|
-
// Table may not exist
|
|
695
|
+
const r = db.prepare(`SELECT COUNT(*) as count FROM ${table}`).get();
|
|
696
|
+
tableCounts[table] = r.count;
|
|
1129
697
|
}
|
|
698
|
+
catch { /* table may not exist */ }
|
|
1130
699
|
}
|
|
1131
700
|
db.close();
|
|
1132
701
|
}
|
|
1133
|
-
catch {
|
|
1134
|
-
// Ignore table count errors
|
|
1135
|
-
}
|
|
702
|
+
catch { /* ignore */ }
|
|
1136
703
|
if (options.json) {
|
|
1137
|
-
printJson({
|
|
1138
|
-
valid: verificationResult.valid,
|
|
1139
|
-
message: verificationResult.message,
|
|
1140
|
-
path: dbPath,
|
|
1141
|
-
sizeKB: parseFloat((fileStats.size / 1024).toFixed(2)),
|
|
1142
|
-
schemaVersion,
|
|
1143
|
-
tableCounts,
|
|
1144
|
-
timestamp: new Date().toISOString(),
|
|
1145
|
-
});
|
|
704
|
+
printJson({ valid: verificationResult.valid, message: verificationResult.message, path: dbPath, sizeKB: parseFloat((fileStats.size / 1024).toFixed(2)), schemaVersion, tableCounts, timestamp: new Date().toISOString() });
|
|
1146
705
|
}
|
|
1147
706
|
else {
|
|
1148
707
|
console.log(chalk.bold('\n🔍 Database Verification\n'));
|
|
1149
708
|
console.log(` Path: ${dbPath}`);
|
|
1150
709
|
console.log(` Size: ${(fileStats.size / 1024).toFixed(2)} KB`);
|
|
1151
710
|
console.log(` Schema version: ${schemaVersion}`);
|
|
1152
|
-
|
|
1153
|
-
console.log(chalk.green(` Status: ${verificationResult.message}`));
|
|
1154
|
-
}
|
|
1155
|
-
else {
|
|
1156
|
-
console.log(chalk.red(` Status: ${verificationResult.message}`));
|
|
1157
|
-
}
|
|
711
|
+
console.log(verificationResult.valid ? chalk.green(` Status: ${verificationResult.message}`) : chalk.red(` Status: ${verificationResult.message}`));
|
|
1158
712
|
if (Object.keys(tableCounts).length > 0) {
|
|
1159
713
|
console.log(chalk.bold('\nTable Counts:'));
|
|
1160
|
-
for (const [table, count] of Object.entries(tableCounts))
|
|
714
|
+
for (const [table, count] of Object.entries(tableCounts))
|
|
1161
715
|
console.log(` ${table}: ${count}`);
|
|
1162
|
-
}
|
|
1163
716
|
}
|
|
1164
717
|
console.log('');
|
|
1165
718
|
}
|
|
@@ -1170,9 +723,11 @@ Examples:
|
|
|
1170
723
|
process.exit(1);
|
|
1171
724
|
}
|
|
1172
725
|
});
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
726
|
+
}
|
|
727
|
+
// ============================================================================
|
|
728
|
+
// Subcommand: export-full
|
|
729
|
+
// ============================================================================
|
|
730
|
+
function registerExportFullCommand(learning) {
|
|
1176
731
|
learning
|
|
1177
732
|
.command('export-full')
|
|
1178
733
|
.description('Export all learning data including patterns, trajectories, and experiences')
|
|
@@ -1184,100 +739,47 @@ Examples:
|
|
|
1184
739
|
.action(async (options) => {
|
|
1185
740
|
try {
|
|
1186
741
|
const dbPath = getDbPath();
|
|
1187
|
-
if (!existsSync(dbPath))
|
|
742
|
+
if (!existsSync(dbPath))
|
|
1188
743
|
throw new Error('No learning database found. Run "aqe init --auto" first.');
|
|
1189
|
-
}
|
|
1190
744
|
const reasoningBank = await initializeLearningSystem();
|
|
1191
745
|
const schemaVersion = await getSchemaVersion(dbPath);
|
|
1192
|
-
// Get all patterns
|
|
1193
746
|
const searchResult = await reasoningBank.searchPatterns('*', { limit: 10000 });
|
|
1194
|
-
if (!searchResult.success)
|
|
747
|
+
if (!searchResult.success)
|
|
1195
748
|
throw new Error(searchResult.error.message);
|
|
1196
|
-
}
|
|
1197
749
|
const patterns = searchResult.value.map(m => ({
|
|
1198
|
-
id: m.pattern.id,
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
successRate: m.pattern.successRate,
|
|
1206
|
-
successfulUses: m.pattern.successfulUses,
|
|
1207
|
-
qualityScore: m.pattern.qualityScore,
|
|
1208
|
-
template: m.pattern.template,
|
|
1209
|
-
context: m.pattern.context,
|
|
1210
|
-
createdAt: m.pattern.createdAt instanceof Date
|
|
1211
|
-
? m.pattern.createdAt.toISOString()
|
|
1212
|
-
: m.pattern.createdAt || undefined,
|
|
1213
|
-
lastUsedAt: m.pattern.lastUsedAt instanceof Date
|
|
1214
|
-
? m.pattern.lastUsedAt.toISOString()
|
|
1215
|
-
: m.pattern.lastUsedAt || undefined,
|
|
750
|
+
id: m.pattern.id, name: m.pattern.name, description: m.pattern.description,
|
|
751
|
+
patternType: m.pattern.patternType, qeDomain: m.pattern.qeDomain, tier: m.pattern.tier,
|
|
752
|
+
confidence: m.pattern.confidence, successRate: m.pattern.successRate,
|
|
753
|
+
successfulUses: m.pattern.successfulUses, qualityScore: m.pattern.qualityScore,
|
|
754
|
+
template: m.pattern.template, context: m.pattern.context,
|
|
755
|
+
createdAt: m.pattern.createdAt instanceof Date ? m.pattern.createdAt.toISOString() : m.pattern.createdAt || undefined,
|
|
756
|
+
lastUsedAt: m.pattern.lastUsedAt instanceof Date ? m.pattern.lastUsedAt.toISOString() : m.pattern.lastUsedAt || undefined,
|
|
1216
757
|
}));
|
|
1217
758
|
const exportData = {
|
|
1218
|
-
version: EXPORT_FORMAT_VERSION,
|
|
1219
|
-
|
|
1220
|
-
source: process.cwd(),
|
|
1221
|
-
schemaVersion,
|
|
1222
|
-
patternCount: patterns.length,
|
|
1223
|
-
patterns,
|
|
759
|
+
version: EXPORT_FORMAT_VERSION, exportedAt: new Date().toISOString(), source: process.cwd(),
|
|
760
|
+
schemaVersion, patternCount: patterns.length, patterns,
|
|
1224
761
|
};
|
|
1225
|
-
// Include trajectories if requested
|
|
1226
762
|
if (options.includeTrajectories) {
|
|
1227
763
|
try {
|
|
1228
764
|
const Database = (await import('better-sqlite3')).default;
|
|
1229
765
|
const db = new Database(dbPath, { readonly: true });
|
|
1230
|
-
const trajectories = db.prepare(`
|
|
1231
|
-
|
|
1232
|
-
FROM qe_trajectories
|
|
1233
|
-
ORDER BY started_at DESC
|
|
1234
|
-
LIMIT 1000
|
|
1235
|
-
`).all();
|
|
1236
|
-
exportData.trajectories = trajectories.map(t => ({
|
|
1237
|
-
id: t.id,
|
|
1238
|
-
task: t.task,
|
|
1239
|
-
agent: t.agent,
|
|
1240
|
-
domain: t.domain,
|
|
1241
|
-
success: t.success,
|
|
1242
|
-
stepsJson: t.steps_json,
|
|
1243
|
-
}));
|
|
766
|
+
const trajectories = db.prepare(`SELECT id, task, agent, domain, success, steps_json FROM qe_trajectories ORDER BY started_at DESC LIMIT 1000`).all();
|
|
767
|
+
exportData.trajectories = trajectories.map(t => ({ id: t.id, task: t.task, agent: t.agent, domain: t.domain, success: t.success, stepsJson: t.steps_json }));
|
|
1244
768
|
db.close();
|
|
1245
769
|
}
|
|
1246
|
-
catch {
|
|
1247
|
-
// Trajectories table may not exist
|
|
1248
|
-
}
|
|
770
|
+
catch { /* table may not exist */ }
|
|
1249
771
|
}
|
|
1250
|
-
// Include experiences if requested
|
|
1251
772
|
if (options.includeExperiences) {
|
|
1252
773
|
try {
|
|
1253
774
|
const Database = (await import('better-sqlite3')).default;
|
|
1254
775
|
const db = new Database(dbPath, { readonly: true });
|
|
1255
|
-
const experiences = db.prepare(`
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
ORDER BY count DESC
|
|
1260
|
-
LIMIT 500
|
|
1261
|
-
`).all();
|
|
1262
|
-
exportData.experiences = experiences.map(e => ({
|
|
1263
|
-
taskType: e.task_type,
|
|
1264
|
-
action: e.action,
|
|
1265
|
-
reward: e.avg_reward,
|
|
1266
|
-
count: e.count,
|
|
1267
|
-
}));
|
|
1268
|
-
// Add metadata
|
|
1269
|
-
const metaRow = db.prepare(`
|
|
1270
|
-
SELECT COUNT(*) as total, AVG(reward) as avg_reward FROM learning_experiences
|
|
1271
|
-
`).get();
|
|
1272
|
-
exportData.metadata = {
|
|
1273
|
-
totalExperiences: metaRow.total,
|
|
1274
|
-
avgReward: metaRow.avg_reward,
|
|
1275
|
-
};
|
|
776
|
+
const experiences = db.prepare(`SELECT task_type, action, AVG(reward) as avg_reward, COUNT(*) as count FROM learning_experiences GROUP BY task_type, action ORDER BY count DESC LIMIT 500`).all();
|
|
777
|
+
exportData.experiences = experiences.map(e => ({ taskType: e.task_type, action: e.action, reward: e.avg_reward, count: e.count }));
|
|
778
|
+
const metaRow = db.prepare(`SELECT COUNT(*) as total, AVG(reward) as avg_reward FROM learning_experiences`).get();
|
|
779
|
+
exportData.metadata = { totalExperiences: metaRow.total, avgReward: metaRow.avg_reward };
|
|
1276
780
|
db.close();
|
|
1277
781
|
}
|
|
1278
|
-
catch {
|
|
1279
|
-
// Learning experiences table may not exist
|
|
1280
|
-
}
|
|
782
|
+
catch { /* table may not exist */ }
|
|
1281
783
|
}
|
|
1282
784
|
if (options.json) {
|
|
1283
785
|
printJson(exportData);
|
|
@@ -1292,16 +794,13 @@ Examples:
|
|
|
1292
794
|
}
|
|
1293
795
|
console.log(chalk.bold('\n📤 Learning Data Export\n'));
|
|
1294
796
|
console.log(` Patterns: ${patterns.length}`);
|
|
1295
|
-
if (exportData.trajectories)
|
|
797
|
+
if (exportData.trajectories)
|
|
1296
798
|
console.log(` Trajectories: ${exportData.trajectories.length}`);
|
|
1297
|
-
|
|
1298
|
-
if (exportData.experiences) {
|
|
799
|
+
if (exportData.experiences)
|
|
1299
800
|
console.log(` Experience groups: ${exportData.experiences.length}`);
|
|
1300
|
-
}
|
|
1301
801
|
console.log(` Schema version: ${schemaVersion}`);
|
|
1302
802
|
console.log(` Export format: ${EXPORT_FORMAT_VERSION}`);
|
|
1303
|
-
printSuccess(`Exported to: ${outputPath}`);
|
|
1304
|
-
console.log('');
|
|
803
|
+
printSuccess(`Exported to: ${outputPath}\n`);
|
|
1305
804
|
}
|
|
1306
805
|
process.exit(0);
|
|
1307
806
|
}
|
|
@@ -1310,9 +809,11 @@ Examples:
|
|
|
1310
809
|
process.exit(1);
|
|
1311
810
|
}
|
|
1312
811
|
});
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
812
|
+
}
|
|
813
|
+
// ============================================================================
|
|
814
|
+
// Subcommand: import-merge
|
|
815
|
+
// ============================================================================
|
|
816
|
+
function registerImportMergeCommand(learning) {
|
|
1316
817
|
learning
|
|
1317
818
|
.command('import-merge')
|
|
1318
819
|
.description('Import and merge patterns from export file (preserves existing data)')
|
|
@@ -1323,10 +824,8 @@ Examples:
|
|
|
1323
824
|
.action(async (options) => {
|
|
1324
825
|
try {
|
|
1325
826
|
let inputPath = path.resolve(options.input);
|
|
1326
|
-
if (!existsSync(inputPath))
|
|
827
|
+
if (!existsSync(inputPath))
|
|
1327
828
|
throw new Error(`File not found: ${inputPath}`);
|
|
1328
|
-
}
|
|
1329
|
-
// Handle compressed files
|
|
1330
829
|
let content;
|
|
1331
830
|
if (inputPath.endsWith('.gz')) {
|
|
1332
831
|
const tempPath = inputPath.replace('.gz', '.tmp.json');
|
|
@@ -1337,23 +836,16 @@ Examples:
|
|
|
1337
836
|
else {
|
|
1338
837
|
content = readFileSync(inputPath, 'utf-8');
|
|
1339
838
|
}
|
|
1340
|
-
const importData =
|
|
1341
|
-
|
|
1342
|
-
if (!importData.patterns || !Array.isArray(importData.patterns)) {
|
|
839
|
+
const importData = safeJsonParse(content);
|
|
840
|
+
if (!importData.patterns || !Array.isArray(importData.patterns))
|
|
1343
841
|
throw new Error('Invalid import file format: missing patterns array');
|
|
1344
|
-
}
|
|
1345
842
|
const reasoningBank = await initializeLearningSystem();
|
|
1346
|
-
// Get existing pattern names for duplicate detection
|
|
1347
843
|
const existingResult = await reasoningBank.searchPatterns('*', { limit: 10000 });
|
|
1348
844
|
const existingNames = new Set();
|
|
1349
|
-
if (existingResult.success)
|
|
1350
|
-
for (const m of existingResult.value)
|
|
845
|
+
if (existingResult.success)
|
|
846
|
+
for (const m of existingResult.value)
|
|
1351
847
|
existingNames.add(m.pattern.name);
|
|
1352
|
-
|
|
1353
|
-
}
|
|
1354
|
-
let imported = 0;
|
|
1355
|
-
let skipped = 0;
|
|
1356
|
-
let updated = 0;
|
|
848
|
+
let imported = 0, skipped = 0, updated = 0;
|
|
1357
849
|
const errors = [];
|
|
1358
850
|
if (!options.dryRun) {
|
|
1359
851
|
for (const pattern of importData.patterns) {
|
|
@@ -1363,20 +855,12 @@ Examples:
|
|
|
1363
855
|
continue;
|
|
1364
856
|
}
|
|
1365
857
|
try {
|
|
1366
|
-
const result = await reasoningBank.storePattern({
|
|
1367
|
-
patternType: pattern.patternType,
|
|
1368
|
-
name: pattern.name,
|
|
1369
|
-
description: pattern.description,
|
|
1370
|
-
template: pattern.template,
|
|
1371
|
-
context: pattern.context,
|
|
1372
|
-
});
|
|
858
|
+
const result = await reasoningBank.storePattern({ patternType: pattern.patternType, name: pattern.name, description: pattern.description, template: pattern.template, context: pattern.context });
|
|
1373
859
|
if (result.success) {
|
|
1374
|
-
if (isDuplicate)
|
|
860
|
+
if (isDuplicate)
|
|
1375
861
|
updated++;
|
|
1376
|
-
|
|
1377
|
-
else {
|
|
862
|
+
else
|
|
1378
863
|
imported++;
|
|
1379
|
-
}
|
|
1380
864
|
}
|
|
1381
865
|
else {
|
|
1382
866
|
skipped++;
|
|
@@ -1389,34 +873,20 @@ Examples:
|
|
|
1389
873
|
}
|
|
1390
874
|
}
|
|
1391
875
|
}
|
|
1392
|
-
|
|
1393
|
-
let wouldImport = 0;
|
|
1394
|
-
let wouldSkip = 0;
|
|
1395
|
-
let wouldUpdate = 0;
|
|
876
|
+
let wouldImport = 0, wouldSkip = 0, wouldUpdate = 0;
|
|
1396
877
|
if (options.dryRun) {
|
|
1397
878
|
for (const pattern of importData.patterns) {
|
|
1398
879
|
const isDuplicate = existingNames.has(pattern.name);
|
|
1399
|
-
if (isDuplicate && options.skipDuplicates)
|
|
880
|
+
if (isDuplicate && options.skipDuplicates)
|
|
1400
881
|
wouldSkip++;
|
|
1401
|
-
|
|
1402
|
-
else if (isDuplicate) {
|
|
882
|
+
else if (isDuplicate)
|
|
1403
883
|
wouldUpdate++;
|
|
1404
|
-
|
|
1405
|
-
else {
|
|
884
|
+
else
|
|
1406
885
|
wouldImport++;
|
|
1407
|
-
}
|
|
1408
886
|
}
|
|
1409
887
|
}
|
|
1410
888
|
if (options.json) {
|
|
1411
|
-
printJson({
|
|
1412
|
-
dryRun: options.dryRun || false,
|
|
1413
|
-
importVersion: importData.version,
|
|
1414
|
-
totalPatterns: importData.patterns.length,
|
|
1415
|
-
imported: options.dryRun ? wouldImport : imported,
|
|
1416
|
-
updated: options.dryRun ? wouldUpdate : updated,
|
|
1417
|
-
skipped: options.dryRun ? wouldSkip : skipped,
|
|
1418
|
-
errors: errors.slice(0, 10),
|
|
1419
|
-
});
|
|
889
|
+
printJson({ dryRun: options.dryRun || false, importVersion: importData.version, totalPatterns: importData.patterns.length, imported: options.dryRun ? wouldImport : imported, updated: options.dryRun ? wouldUpdate : updated, skipped: options.dryRun ? wouldSkip : skipped, errors: errors.slice(0, 10) });
|
|
1420
890
|
}
|
|
1421
891
|
else {
|
|
1422
892
|
console.log(chalk.bold('\n📥 Learning Data Import (Merge)\n'));
|
|
@@ -1426,19 +896,15 @@ Examples:
|
|
|
1426
896
|
console.log(` Existing patterns: ${existingNames.size}`);
|
|
1427
897
|
if (options.dryRun) {
|
|
1428
898
|
console.log(chalk.yellow('\n Dry run - no changes made'));
|
|
1429
|
-
console.log(` Would import: ${wouldImport}`);
|
|
1430
|
-
console.log(` Would update: ${wouldUpdate}`);
|
|
1431
|
-
console.log(` Would skip: ${wouldSkip}`);
|
|
899
|
+
console.log(` Would import: ${wouldImport}\n Would update: ${wouldUpdate}\n Would skip: ${wouldSkip}`);
|
|
1432
900
|
}
|
|
1433
901
|
else {
|
|
1434
902
|
console.log(chalk.green(`\n Imported: ${imported}`));
|
|
1435
903
|
console.log(chalk.blue(` Updated: ${updated}`));
|
|
1436
|
-
if (skipped > 0)
|
|
904
|
+
if (skipped > 0)
|
|
1437
905
|
console.log(chalk.yellow(` Skipped: ${skipped}`));
|
|
1438
|
-
|
|
1439
|
-
if (errors.length > 0) {
|
|
906
|
+
if (errors.length > 0)
|
|
1440
907
|
console.log(chalk.red(` Errors: ${errors.length}`));
|
|
1441
|
-
}
|
|
1442
908
|
}
|
|
1443
909
|
console.log('');
|
|
1444
910
|
}
|
|
@@ -1449,9 +915,11 @@ Examples:
|
|
|
1449
915
|
process.exit(1);
|
|
1450
916
|
}
|
|
1451
917
|
});
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
918
|
+
}
|
|
919
|
+
// ============================================================================
|
|
920
|
+
// Subcommand: dream
|
|
921
|
+
// ============================================================================
|
|
922
|
+
function registerDreamCommand(learning) {
|
|
1455
923
|
learning
|
|
1456
924
|
.command('dream')
|
|
1457
925
|
.description('Run dream cycles for pattern discovery via spreading activation')
|
|
@@ -1467,10 +935,8 @@ Examples:
|
|
|
1467
935
|
.option('--json', 'Output as JSON')
|
|
1468
936
|
.action(async (options) => {
|
|
1469
937
|
try {
|
|
1470
|
-
const { createDreamEngine
|
|
1471
|
-
// Determine which action to run
|
|
938
|
+
const { createDreamEngine } = await import('../../learning/dream/index.js');
|
|
1472
939
|
if (options.status) {
|
|
1473
|
-
// --- Status ---
|
|
1474
940
|
const engine = createDreamEngine();
|
|
1475
941
|
await engine.initialize();
|
|
1476
942
|
const isDreaming = engine.isDreaming();
|
|
@@ -1479,13 +945,7 @@ Examples:
|
|
|
1479
945
|
const totalInsights = history.reduce((sum, c) => sum + c.insightsGenerated, 0);
|
|
1480
946
|
const lastCycle = history[0];
|
|
1481
947
|
if (options.json) {
|
|
1482
|
-
printJson({
|
|
1483
|
-
isDreaming,
|
|
1484
|
-
totalCycles: history.length,
|
|
1485
|
-
totalInsights,
|
|
1486
|
-
pendingInsights: pending.length,
|
|
1487
|
-
lastDreamTime: lastCycle?.startTime.toISOString() || null,
|
|
1488
|
-
});
|
|
948
|
+
printJson({ isDreaming, totalCycles: history.length, totalInsights, pendingInsights: pending.length, lastDreamTime: lastCycle?.startTime.toISOString() || null });
|
|
1489
949
|
}
|
|
1490
950
|
else {
|
|
1491
951
|
console.log(chalk.bold('\n🌙 Dream System Status\n'));
|
|
@@ -1494,7 +954,6 @@ Examples:
|
|
|
1494
954
|
console.log(` Total insights generated: ${totalInsights}`);
|
|
1495
955
|
console.log(` Pending insights: ${pending.length}`);
|
|
1496
956
|
console.log(` Last dream: ${lastCycle ? lastCycle.startTime.toISOString() : chalk.dim('never')}`);
|
|
1497
|
-
// Show last 3 cycles summary
|
|
1498
957
|
if (history.length > 0) {
|
|
1499
958
|
console.log(chalk.bold('\n Recent cycles:'));
|
|
1500
959
|
for (const c of history.slice(0, 3)) {
|
|
@@ -1508,22 +967,12 @@ Examples:
|
|
|
1508
967
|
process.exit(0);
|
|
1509
968
|
}
|
|
1510
969
|
if (options.history) {
|
|
1511
|
-
// --- History ---
|
|
1512
970
|
const limit = parseInt(options.limit, 10);
|
|
1513
971
|
const engine = createDreamEngine();
|
|
1514
972
|
await engine.initialize();
|
|
1515
973
|
const cycles = await engine.getDreamHistory(limit);
|
|
1516
974
|
if (options.json) {
|
|
1517
|
-
printJson(cycles.map(c => ({
|
|
1518
|
-
id: c.id,
|
|
1519
|
-
startTime: c.startTime.toISOString(),
|
|
1520
|
-
endTime: c.endTime?.toISOString(),
|
|
1521
|
-
durationMs: c.durationMs,
|
|
1522
|
-
status: c.status,
|
|
1523
|
-
conceptsProcessed: c.conceptsProcessed,
|
|
1524
|
-
associationsFound: c.associationsFound,
|
|
1525
|
-
insightsGenerated: c.insightsGenerated,
|
|
1526
|
-
})));
|
|
975
|
+
printJson(cycles.map(c => ({ id: c.id, startTime: c.startTime.toISOString(), endTime: c.endTime?.toISOString(), durationMs: c.durationMs, status: c.status, conceptsProcessed: c.conceptsProcessed, associationsFound: c.associationsFound, insightsGenerated: c.insightsGenerated })));
|
|
1527
976
|
}
|
|
1528
977
|
else {
|
|
1529
978
|
console.log(chalk.bold(`\n🌙 Dream Cycle History (${cycles.length} cycles)\n`));
|
|
@@ -1532,9 +981,7 @@ Examples:
|
|
|
1532
981
|
}
|
|
1533
982
|
else {
|
|
1534
983
|
for (const c of cycles) {
|
|
1535
|
-
const status = c.status === 'completed' ? chalk.green('✓')
|
|
1536
|
-
: c.status === 'failed' ? chalk.red('✗')
|
|
1537
|
-
: chalk.yellow('⋯');
|
|
984
|
+
const status = c.status === 'completed' ? chalk.green('✓') : c.status === 'failed' ? chalk.red('✗') : chalk.yellow('⋯');
|
|
1538
985
|
console.log(` ${status} ${c.id.slice(0, 8)} | ${c.startTime.toISOString()}`);
|
|
1539
986
|
console.log(chalk.dim(` Duration: ${c.durationMs || 0}ms | Concepts: ${c.conceptsProcessed} | Associations: ${c.associationsFound} | Insights: ${c.insightsGenerated}`));
|
|
1540
987
|
}
|
|
@@ -1545,23 +992,12 @@ Examples:
|
|
|
1545
992
|
process.exit(0);
|
|
1546
993
|
}
|
|
1547
994
|
if (options.insights) {
|
|
1548
|
-
// --- Pending Insights ---
|
|
1549
995
|
const limit = parseInt(options.limit, 10);
|
|
1550
996
|
const engine = createDreamEngine();
|
|
1551
997
|
await engine.initialize();
|
|
1552
998
|
const pending = await engine.getPendingInsights(limit);
|
|
1553
999
|
if (options.json) {
|
|
1554
|
-
printJson(pending.map(i => ({
|
|
1555
|
-
id: i.id,
|
|
1556
|
-
type: i.type,
|
|
1557
|
-
description: i.description,
|
|
1558
|
-
noveltyScore: i.noveltyScore,
|
|
1559
|
-
confidenceScore: i.confidenceScore,
|
|
1560
|
-
actionable: i.actionable,
|
|
1561
|
-
applied: i.applied || false,
|
|
1562
|
-
suggestedAction: i.suggestedAction,
|
|
1563
|
-
createdAt: i.createdAt?.toISOString(),
|
|
1564
|
-
})));
|
|
1000
|
+
printJson(pending.map(i => ({ id: i.id, type: i.type, description: i.description, noveltyScore: i.noveltyScore, confidenceScore: i.confidenceScore, actionable: i.actionable, applied: i.applied || false, suggestedAction: i.suggestedAction, createdAt: i.createdAt?.toISOString() })));
|
|
1565
1001
|
}
|
|
1566
1002
|
else {
|
|
1567
1003
|
console.log(chalk.bold(`\n💡 Pending Dream Insights (${pending.length})\n`));
|
|
@@ -1570,16 +1006,13 @@ Examples:
|
|
|
1570
1006
|
}
|
|
1571
1007
|
else {
|
|
1572
1008
|
for (const i of pending) {
|
|
1573
|
-
const novelty = i.noveltyScore >= 0.7 ? chalk.green(`${(i.noveltyScore * 100).toFixed(0)}%`)
|
|
1574
|
-
|
|
1575
|
-
const confidence = i.confidenceScore >= 0.7 ? chalk.green(`${(i.confidenceScore * 100).toFixed(0)}%`)
|
|
1576
|
-
: chalk.yellow(`${(i.confidenceScore * 100).toFixed(0)}%`);
|
|
1009
|
+
const novelty = i.noveltyScore >= 0.7 ? chalk.green(`${(i.noveltyScore * 100).toFixed(0)}%`) : chalk.yellow(`${(i.noveltyScore * 100).toFixed(0)}%`);
|
|
1010
|
+
const confidence = i.confidenceScore >= 0.7 ? chalk.green(`${(i.confidenceScore * 100).toFixed(0)}%`) : chalk.yellow(`${(i.confidenceScore * 100).toFixed(0)}%`);
|
|
1577
1011
|
console.log(` ${chalk.cyan(i.id.slice(0, 8))} [${i.type}] ${i.actionable ? '⚡' : ' '}`);
|
|
1578
1012
|
console.log(` ${i.description}`);
|
|
1579
1013
|
console.log(chalk.dim(` Novelty: ${novelty} | Confidence: ${confidence}`));
|
|
1580
|
-
if (i.suggestedAction)
|
|
1014
|
+
if (i.suggestedAction)
|
|
1581
1015
|
console.log(chalk.dim(` Action: ${i.suggestedAction}`));
|
|
1582
|
-
}
|
|
1583
1016
|
}
|
|
1584
1017
|
}
|
|
1585
1018
|
console.log('');
|
|
@@ -1588,7 +1021,6 @@ Examples:
|
|
|
1588
1021
|
process.exit(0);
|
|
1589
1022
|
}
|
|
1590
1023
|
if (options.apply) {
|
|
1591
|
-
// --- Apply Insight ---
|
|
1592
1024
|
const insightId = options.apply;
|
|
1593
1025
|
const engine = createDreamEngine();
|
|
1594
1026
|
await engine.initialize();
|
|
@@ -1604,42 +1036,25 @@ Examples:
|
|
|
1604
1036
|
await engine.close();
|
|
1605
1037
|
process.exit(1);
|
|
1606
1038
|
}
|
|
1607
|
-
// Apply insight in engine
|
|
1608
1039
|
const result = await engine.applyInsight(insight.id);
|
|
1609
|
-
// Also create a real pattern in ReasoningBank
|
|
1610
1040
|
const reasoningBank = await initializeLearningSystem();
|
|
1611
1041
|
const patternResult = await reasoningBank.storePattern({
|
|
1612
|
-
patternType: 'test-template',
|
|
1613
|
-
name: `Dream Insight: ${insight.type}`,
|
|
1042
|
+
patternType: 'test-template', name: `Dream Insight: ${insight.type}`,
|
|
1614
1043
|
description: `${insight.description} (confidence: ${insight.confidenceScore.toFixed(2)})`,
|
|
1615
|
-
template: {
|
|
1616
|
-
|
|
1617
|
-
content: insight.suggestedAction || insight.description,
|
|
1618
|
-
variables: [],
|
|
1619
|
-
},
|
|
1620
|
-
context: {
|
|
1621
|
-
tags: ['dream-generated', insight.type, ...insight.sourceConcepts.slice(0, 3)],
|
|
1622
|
-
complexity: 'medium',
|
|
1623
|
-
},
|
|
1044
|
+
template: { type: 'workflow', content: insight.suggestedAction || insight.description, variables: [] },
|
|
1045
|
+
context: { tags: ['dream-generated', insight.type, ...insight.sourceConcepts.slice(0, 3)], complexity: 'medium' },
|
|
1624
1046
|
});
|
|
1625
1047
|
if (options.json) {
|
|
1626
|
-
printJson({
|
|
1627
|
-
insightId: insight.id,
|
|
1628
|
-
applied: result.success,
|
|
1629
|
-
patternId: patternResult.success ? patternResult.value.id : null,
|
|
1630
|
-
error: result.error || (patternResult.success ? null : patternResult.error?.message),
|
|
1631
|
-
});
|
|
1048
|
+
printJson({ insightId: insight.id, applied: result.success, patternId: patternResult.success ? patternResult.value.id : null, error: result.error || (patternResult.success ? null : patternResult.error?.message) });
|
|
1632
1049
|
}
|
|
1633
1050
|
else {
|
|
1634
1051
|
if (result.success) {
|
|
1635
1052
|
printSuccess(`Applied insight ${insight.id.slice(0, 8)}`);
|
|
1636
|
-
if (patternResult.success)
|
|
1053
|
+
if (patternResult.success)
|
|
1637
1054
|
printSuccess(`Created pattern ${patternResult.value.id} in ReasoningBank`);
|
|
1638
|
-
}
|
|
1639
1055
|
}
|
|
1640
|
-
else
|
|
1056
|
+
else
|
|
1641
1057
|
printError(`Failed to apply insight: ${result.error}`);
|
|
1642
|
-
}
|
|
1643
1058
|
}
|
|
1644
1059
|
await engine.close();
|
|
1645
1060
|
process.exit(result.success ? 0 : 1);
|
|
@@ -1650,29 +1065,20 @@ Examples:
|
|
|
1650
1065
|
durationMs = 5000;
|
|
1651
1066
|
if (options.full)
|
|
1652
1067
|
durationMs = 30000;
|
|
1653
|
-
durationMs = Math.min(durationMs, 60000);
|
|
1068
|
+
durationMs = Math.min(durationMs, 60000);
|
|
1654
1069
|
const minPatterns = parseInt(options.minPatterns, 10);
|
|
1655
1070
|
printInfo(`Starting dream cycle (${durationMs}ms, min ${minPatterns} patterns)...`);
|
|
1656
|
-
const engine = createDreamEngine({
|
|
1657
|
-
maxDurationMs: durationMs,
|
|
1658
|
-
minConceptsRequired: minPatterns,
|
|
1659
|
-
});
|
|
1071
|
+
const engine = createDreamEngine({ maxDurationMs: durationMs, minConceptsRequired: minPatterns });
|
|
1660
1072
|
await engine.initialize();
|
|
1661
|
-
// Load patterns from ReasoningBank
|
|
1662
1073
|
const reasoningBank = await initializeLearningSystem();
|
|
1663
|
-
const patternsResult = await reasoningBank.searchPatterns('', {
|
|
1664
|
-
limit: 100,
|
|
1665
|
-
minConfidence: 0.3,
|
|
1666
|
-
});
|
|
1074
|
+
const patternsResult = await reasoningBank.searchPatterns('', { limit: 100, minConfidence: 0.3 });
|
|
1667
1075
|
let loaded = 0;
|
|
1668
1076
|
if (patternsResult.success && patternsResult.value.length > 0) {
|
|
1669
1077
|
const importPatterns = patternsResult.value.map(result => ({
|
|
1670
|
-
id: result.pattern.id,
|
|
1671
|
-
name: result.pattern.name,
|
|
1078
|
+
id: result.pattern.id, name: result.pattern.name,
|
|
1672
1079
|
description: result.pattern.description || `${result.pattern.patternType} pattern`,
|
|
1673
1080
|
domain: result.pattern.qeDomain || 'learning-optimization',
|
|
1674
|
-
patternType: result.pattern.patternType,
|
|
1675
|
-
confidence: result.pattern.confidence,
|
|
1081
|
+
patternType: result.pattern.patternType, confidence: result.pattern.confidence,
|
|
1676
1082
|
successRate: result.pattern.successRate || 0.5,
|
|
1677
1083
|
}));
|
|
1678
1084
|
loaded = await engine.loadPatternsAsConcepts(importPatterns);
|
|
@@ -1681,26 +1087,14 @@ Examples:
|
|
|
1681
1087
|
else {
|
|
1682
1088
|
printInfo('No patterns found in ReasoningBank — dreaming with existing concepts');
|
|
1683
1089
|
}
|
|
1684
|
-
// Run the dream
|
|
1685
1090
|
const result = await engine.dream(durationMs);
|
|
1686
1091
|
if (options.json) {
|
|
1687
1092
|
printJson({
|
|
1688
|
-
cycleId: result.cycle.id,
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
conceptsProcessed: result.cycle.conceptsProcessed,
|
|
1692
|
-
associationsFound: result.cycle.associationsFound,
|
|
1693
|
-
insightsGenerated: result.cycle.insightsGenerated,
|
|
1694
|
-
activationStats: result.activationStats,
|
|
1093
|
+
cycleId: result.cycle.id, status: result.cycle.status, durationMs: result.cycle.durationMs || 0,
|
|
1094
|
+
conceptsProcessed: result.cycle.conceptsProcessed, associationsFound: result.cycle.associationsFound,
|
|
1095
|
+
insightsGenerated: result.cycle.insightsGenerated, activationStats: result.activationStats,
|
|
1695
1096
|
patternsCreated: result.patternsCreated,
|
|
1696
|
-
insights: result.insights.map(i => ({
|
|
1697
|
-
id: i.id,
|
|
1698
|
-
type: i.type,
|
|
1699
|
-
description: i.description,
|
|
1700
|
-
noveltyScore: i.noveltyScore,
|
|
1701
|
-
confidenceScore: i.confidenceScore,
|
|
1702
|
-
actionable: i.actionable,
|
|
1703
|
-
})),
|
|
1097
|
+
insights: result.insights.map(i => ({ id: i.id, type: i.type, description: i.description, noveltyScore: i.noveltyScore, confidenceScore: i.confidenceScore, actionable: i.actionable })),
|
|
1704
1098
|
});
|
|
1705
1099
|
}
|
|
1706
1100
|
else {
|
|
@@ -1720,8 +1114,7 @@ Examples:
|
|
|
1720
1114
|
if (result.insights.length > 0) {
|
|
1721
1115
|
console.log(chalk.bold('\n Generated Insights:'));
|
|
1722
1116
|
for (const i of result.insights) {
|
|
1723
|
-
const novelty = i.noveltyScore >= 0.7 ? chalk.green(`${(i.noveltyScore * 100).toFixed(0)}%`)
|
|
1724
|
-
: chalk.yellow(`${(i.noveltyScore * 100).toFixed(0)}%`);
|
|
1117
|
+
const novelty = i.noveltyScore >= 0.7 ? chalk.green(`${(i.noveltyScore * 100).toFixed(0)}%`) : chalk.yellow(`${(i.noveltyScore * 100).toFixed(0)}%`);
|
|
1725
1118
|
console.log(` ${chalk.cyan(i.id.slice(0, 8))} [${i.type}] ${i.actionable ? '⚡ actionable' : ''}`);
|
|
1726
1119
|
console.log(` ${i.description}`);
|
|
1727
1120
|
console.log(chalk.dim(` Novelty: ${novelty} | Confidence: ${(i.confidenceScore * 100).toFixed(0)}%`));
|
|
@@ -1739,16 +1132,14 @@ Examples:
|
|
|
1739
1132
|
}
|
|
1740
1133
|
catch (error) {
|
|
1741
1134
|
printError(`dream failed: ${error instanceof Error ? error.message : 'unknown'}`);
|
|
1742
|
-
if (error instanceof Error && error.stack)
|
|
1135
|
+
if (error instanceof Error && error.stack)
|
|
1743
1136
|
console.error(chalk.dim(error.stack));
|
|
1744
|
-
}
|
|
1745
1137
|
process.exit(1);
|
|
1746
1138
|
}
|
|
1747
1139
|
});
|
|
1748
|
-
return learning;
|
|
1749
1140
|
}
|
|
1750
1141
|
// ============================================================================
|
|
1751
1142
|
// Exports
|
|
1752
1143
|
// ============================================================================
|
|
1753
|
-
export { initializeLearningSystem };
|
|
1144
|
+
export { initializeLearningSystem } from './learning-helpers.js';
|
|
1754
1145
|
//# sourceMappingURL=learning.js.map
|