agentic-qe 3.3.0 → 3.3.2
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/README.md +6 -2
- package/package.json +6 -1
- package/v3/CHANGELOG.md +134 -0
- package/v3/dist/cli/bundle.js +29332 -22739
- package/v3/dist/cli/command-registry.d.ts +55 -0
- package/v3/dist/cli/command-registry.d.ts.map +1 -0
- package/v3/dist/cli/command-registry.js +103 -0
- package/v3/dist/cli/command-registry.js.map +1 -0
- package/v3/dist/cli/commands/code.d.ts +9 -0
- package/v3/dist/cli/commands/code.d.ts.map +1 -0
- package/v3/dist/cli/commands/code.js +254 -0
- package/v3/dist/cli/commands/code.js.map +1 -0
- package/v3/dist/cli/commands/completions.d.ts +8 -0
- package/v3/dist/cli/commands/completions.d.ts.map +1 -0
- package/v3/dist/cli/commands/completions.js +99 -0
- package/v3/dist/cli/commands/completions.js.map +1 -0
- package/v3/dist/cli/commands/coverage.d.ts +9 -0
- package/v3/dist/cli/commands/coverage.d.ts.map +1 -0
- package/v3/dist/cli/commands/coverage.js +208 -0
- package/v3/dist/cli/commands/coverage.js.map +1 -0
- package/v3/dist/cli/commands/fleet.d.ts +11 -0
- package/v3/dist/cli/commands/fleet.d.ts.map +1 -0
- package/v3/dist/cli/commands/fleet.js +338 -0
- package/v3/dist/cli/commands/fleet.js.map +1 -0
- package/v3/dist/cli/commands/migrate.d.ts +9 -0
- package/v3/dist/cli/commands/migrate.d.ts.map +1 -0
- package/v3/dist/cli/commands/migrate.js +566 -0
- package/v3/dist/cli/commands/migrate.js.map +1 -0
- package/v3/dist/cli/commands/quality.d.ts +9 -0
- package/v3/dist/cli/commands/quality.d.ts.map +1 -0
- package/v3/dist/cli/commands/quality.js +40 -0
- package/v3/dist/cli/commands/quality.js.map +1 -0
- package/v3/dist/cli/commands/security.d.ts +9 -0
- package/v3/dist/cli/commands/security.d.ts.map +1 -0
- package/v3/dist/cli/commands/security.js +124 -0
- package/v3/dist/cli/commands/security.js.map +1 -0
- package/v3/dist/cli/commands/sync.d.ts +19 -0
- package/v3/dist/cli/commands/sync.d.ts.map +1 -0
- package/v3/dist/cli/commands/sync.js +283 -0
- package/v3/dist/cli/commands/sync.js.map +1 -0
- package/v3/dist/cli/commands/test.d.ts +9 -0
- package/v3/dist/cli/commands/test.d.ts.map +1 -0
- package/v3/dist/cli/commands/test.js +166 -0
- package/v3/dist/cli/commands/test.js.map +1 -0
- package/v3/dist/cli/handlers/agent-handler.d.ts +20 -0
- package/v3/dist/cli/handlers/agent-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/agent-handler.js +158 -0
- package/v3/dist/cli/handlers/agent-handler.js.map +1 -0
- package/v3/dist/cli/handlers/domain-handler.d.ts +20 -0
- package/v3/dist/cli/handlers/domain-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/domain-handler.js +115 -0
- package/v3/dist/cli/handlers/domain-handler.js.map +1 -0
- package/v3/dist/cli/handlers/index.d.ts +13 -0
- package/v3/dist/cli/handlers/index.d.ts.map +1 -0
- package/v3/dist/cli/handlers/index.js +15 -0
- package/v3/dist/cli/handlers/index.js.map +1 -0
- package/v3/dist/cli/handlers/init-handler.d.ts +38 -0
- package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/init-handler.js +288 -0
- package/v3/dist/cli/handlers/init-handler.js.map +1 -0
- package/v3/dist/cli/handlers/interfaces.d.ts +104 -0
- package/v3/dist/cli/handlers/interfaces.d.ts.map +1 -0
- package/v3/dist/cli/handlers/interfaces.js +109 -0
- package/v3/dist/cli/handlers/interfaces.js.map +1 -0
- package/v3/dist/cli/handlers/protocol-handler.d.ts +19 -0
- package/v3/dist/cli/handlers/protocol-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/protocol-handler.js +79 -0
- package/v3/dist/cli/handlers/protocol-handler.js.map +1 -0
- package/v3/dist/cli/handlers/status-handler.d.ts +30 -0
- package/v3/dist/cli/handlers/status-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/status-handler.js +218 -0
- package/v3/dist/cli/handlers/status-handler.js.map +1 -0
- package/v3/dist/cli/handlers/task-handler.d.ts +22 -0
- package/v3/dist/cli/handlers/task-handler.d.ts.map +1 -0
- package/v3/dist/cli/handlers/task-handler.js +271 -0
- package/v3/dist/cli/handlers/task-handler.js.map +1 -0
- package/v3/dist/cli/index.d.ts +4 -0
- package/v3/dist/cli/index.d.ts.map +1 -1
- package/v3/dist/cli/index.js +48 -2677
- package/v3/dist/cli/index.js.map +1 -1
- package/v3/dist/cli/wizards/core/index.d.ts +11 -0
- package/v3/dist/cli/wizards/core/index.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/index.js +15 -0
- package/v3/dist/cli/wizards/core/index.js.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-base.d.ts +87 -0
- package/v3/dist/cli/wizards/core/wizard-base.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-base.js +120 -0
- package/v3/dist/cli/wizards/core/wizard-base.js.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-command.d.ts +182 -0
- package/v3/dist/cli/wizards/core/wizard-command.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-command.js +45 -0
- package/v3/dist/cli/wizards/core/wizard-command.js.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-step.d.ts +109 -0
- package/v3/dist/cli/wizards/core/wizard-step.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-step.js +384 -0
- package/v3/dist/cli/wizards/core/wizard-step.js.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-utils.d.ts +117 -0
- package/v3/dist/cli/wizards/core/wizard-utils.d.ts.map +1 -0
- package/v3/dist/cli/wizards/core/wizard-utils.js +291 -0
- package/v3/dist/cli/wizards/core/wizard-utils.js.map +1 -0
- package/v3/dist/cli/wizards/coverage-wizard.d.ts +13 -68
- package/v3/dist/cli/wizards/coverage-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/coverage-wizard.js +127 -391
- package/v3/dist/cli/wizards/coverage-wizard.js.map +1 -1
- package/v3/dist/cli/wizards/fleet-wizard.d.ts +13 -64
- package/v3/dist/cli/wizards/fleet-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/fleet-wizard.js +150 -363
- package/v3/dist/cli/wizards/fleet-wizard.js.map +1 -1
- package/v3/dist/cli/wizards/index.d.ts +2 -0
- package/v3/dist/cli/wizards/index.d.ts.map +1 -1
- package/v3/dist/cli/wizards/index.js +3 -0
- package/v3/dist/cli/wizards/index.js.map +1 -1
- package/v3/dist/cli/wizards/security-wizard.d.ts +13 -64
- package/v3/dist/cli/wizards/security-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/security-wizard.js +152 -395
- package/v3/dist/cli/wizards/security-wizard.js.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.d.ts +13 -77
- package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
- package/v3/dist/cli/wizards/test-wizard.js +196 -328
- package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +3 -0
- package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/mincut-health-monitor.js +6 -2
- package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.d.ts +3 -0
- package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
- package/v3/dist/coordination/mincut/queen-integration.js +6 -1
- package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
- package/v3/dist/coordination/queen-coordinator.d.ts +13 -1
- package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
- package/v3/dist/coordination/queen-coordinator.js +91 -3
- package/v3/dist/coordination/queen-coordinator.js.map +1 -1
- package/v3/dist/coordination/task-executor.js +2 -2
- package/v3/dist/coordination/task-executor.js.map +1 -1
- package/v3/dist/domains/chaos-resilience/plugin.js +2 -2
- package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
- package/v3/dist/domains/code-intelligence/plugin.js +2 -2
- package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/contract-testing/plugin.js +2 -2
- package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
- package/v3/dist/domains/coverage-analysis/plugin.d.ts +6 -1
- package/v3/dist/domains/coverage-analysis/plugin.d.ts.map +1 -1
- package/v3/dist/domains/coverage-analysis/plugin.js +75 -1
- package/v3/dist/domains/coverage-analysis/plugin.js.map +1 -1
- package/v3/dist/domains/defect-intelligence/plugin.js +2 -2
- package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
- package/v3/dist/domains/domain-interface.d.ts +39 -2
- package/v3/dist/domains/domain-interface.d.ts.map +1 -1
- package/v3/dist/domains/domain-interface.js +102 -1
- package/v3/dist/domains/domain-interface.js.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.d.ts +83 -0
- package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/coordinator.js +174 -0
- package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
- package/v3/dist/domains/learning-optimization/interfaces.d.ts +14 -0
- package/v3/dist/domains/learning-optimization/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/learning-optimization/plugin.js +2 -2
- package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator.d.ts +23 -0
- package/v3/dist/domains/quality-assessment/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/coordinator.js +139 -1
- package/v3/dist/domains/quality-assessment/coordinator.js.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.d.ts +6 -1
- package/v3/dist/domains/quality-assessment/plugin.d.ts.map +1 -1
- package/v3/dist/domains/quality-assessment/plugin.js +69 -2
- package/v3/dist/domains/quality-assessment/plugin.js.map +1 -1
- package/v3/dist/domains/requirements-validation/plugin.js +2 -2
- package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
- package/v3/dist/domains/security-compliance/plugin.js +2 -2
- package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
- package/v3/dist/domains/test-execution/index.d.ts +2 -1
- package/v3/dist/domains/test-execution/index.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/index.js +0 -2
- package/v3/dist/domains/test-execution/index.js.map +1 -1
- package/v3/dist/domains/test-execution/interfaces.d.ts +222 -25
- package/v3/dist/domains/test-execution/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/interfaces.js +130 -3
- package/v3/dist/domains/test-execution/interfaces.js.map +1 -1
- package/v3/dist/domains/test-execution/plugin.d.ts +6 -1
- package/v3/dist/domains/test-execution/plugin.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/plugin.js +79 -1
- package/v3/dist/domains/test-execution/plugin.js.map +1 -1
- package/v3/dist/domains/test-execution/test-prioritization-types.d.ts +5 -172
- package/v3/dist/domains/test-execution/test-prioritization-types.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/test-prioritization-types.js +6 -129
- package/v3/dist/domains/test-execution/test-prioritization-types.js.map +1 -1
- package/v3/dist/domains/test-execution/types/index.d.ts +7 -3
- package/v3/dist/domains/test-execution/types/index.d.ts.map +1 -1
- package/v3/dist/domains/test-execution/types/index.js +7 -17
- package/v3/dist/domains/test-execution/types/index.js.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.d.ts +41 -1
- package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/coordinator.js +187 -4
- package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
- package/v3/dist/domains/test-generation/factories/index.d.ts +8 -0
- package/v3/dist/domains/test-generation/factories/index.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/factories/index.js +8 -0
- package/v3/dist/domains/test-generation/factories/index.js.map +1 -0
- package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts +108 -0
- package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/factories/test-generator-factory.js +158 -0
- package/v3/dist/domains/test-generation/factories/test-generator-factory.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts +79 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.js +252 -0
- package/v3/dist/domains/test-generation/generators/base-test-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/index.d.ts +11 -0
- package/v3/dist/domains/test-generation/generators/index.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/index.js +13 -0
- package/v3/dist/domains/test-generation/generators/index.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts +77 -0
- package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js +365 -0
- package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts +56 -0
- package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/mocha-generator.js +197 -0
- package/v3/dist/domains/test-generation/generators/mocha-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts +66 -0
- package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/generators/pytest-generator.js +240 -0
- package/v3/dist/domains/test-generation/generators/pytest-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/index.d.ts +2 -2
- package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/index.js +3 -3
- package/v3/dist/domains/test-generation/index.js.map +1 -1
- package/v3/dist/domains/test-generation/interfaces/index.d.ts +9 -0
- package/v3/dist/domains/test-generation/interfaces/index.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/interfaces/index.js +9 -0
- package/v3/dist/domains/test-generation/interfaces/index.js.map +1 -0
- package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts +166 -0
- package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js +8 -0
- package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js.map +1 -0
- package/v3/dist/domains/test-generation/interfaces.d.ts +163 -24
- package/v3/dist/domains/test-generation/interfaces.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/interfaces.js +2 -2
- package/v3/dist/domains/test-generation/plugin.d.ts +6 -1
- package/v3/dist/domains/test-generation/plugin.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/plugin.js +90 -5
- package/v3/dist/domains/test-generation/plugin.js.map +1 -1
- package/v3/dist/domains/test-generation/{coherence-gate.d.ts → services/coherence-gate-service.d.ts} +4 -4
- package/v3/dist/domains/test-generation/services/coherence-gate-service.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/{coherence-gate.js → services/coherence-gate-service.js} +2 -2
- package/v3/dist/domains/test-generation/services/coherence-gate-service.js.map +1 -0
- package/v3/dist/domains/test-generation/services/index.d.ts +8 -2
- package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/index.js +10 -3
- package/v3/dist/domains/test-generation/services/index.js.map +1 -1
- package/v3/dist/domains/test-generation/services/property-test-generator.d.ts +34 -0
- package/v3/dist/domains/test-generation/services/property-test-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/services/property-test-generator.js +306 -0
- package/v3/dist/domains/test-generation/services/property-test-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/services/tdd-generator.d.ts +33 -0
- package/v3/dist/domains/test-generation/services/tdd-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/services/tdd-generator.js +342 -0
- package/v3/dist/domains/test-generation/services/tdd-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/services/test-data-generator.d.ts +34 -0
- package/v3/dist/domains/test-generation/services/test-data-generator.d.ts.map +1 -0
- package/v3/dist/domains/test-generation/services/test-data-generator.js +245 -0
- package/v3/dist/domains/test-generation/services/test-data-generator.js.map +1 -0
- package/v3/dist/domains/test-generation/services/test-generator.d.ts +51 -160
- package/v3/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
- package/v3/dist/domains/test-generation/services/test-generator.js +101 -1858
- package/v3/dist/domains/test-generation/services/test-generator.js.map +1 -1
- package/v3/dist/domains/visual-accessibility/plugin.js +2 -2
- package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
- package/v3/dist/init/phases/12-verification.d.ts +23 -0
- package/v3/dist/init/phases/12-verification.d.ts.map +1 -1
- package/v3/dist/init/phases/12-verification.js +185 -2
- package/v3/dist/init/phases/12-verification.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts +24 -62
- package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js +45 -497
- package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/router.js +2 -2
- package/v3/dist/integrations/agentic-flow/model-router/router.js.map +1 -1
- package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts +98 -0
- package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js +197 -0
- package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts +102 -0
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js +372 -0
- package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts +64 -0
- package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts.map +1 -0
- package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js +120 -0
- package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js.map +1 -0
- package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -1
- package/v3/dist/integrations/coherence/coherence-service.js +87 -30
- 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 +124 -35
- package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -1
- package/v3/dist/kernel/interfaces.d.ts +54 -1
- package/v3/dist/kernel/interfaces.d.ts.map +1 -1
- package/v3/dist/learning/dream/dream-scheduler.d.ts +302 -0
- package/v3/dist/learning/dream/dream-scheduler.d.ts.map +1 -0
- package/v3/dist/learning/dream/dream-scheduler.js +551 -0
- package/v3/dist/learning/dream/dream-scheduler.js.map +1 -0
- package/v3/dist/learning/dream/index.d.ts +1 -0
- package/v3/dist/learning/dream/index.d.ts.map +1 -1
- package/v3/dist/learning/dream/index.js +4 -0
- package/v3/dist/learning/dream/index.js.map +1 -1
- package/v3/dist/learning/memory-auditor.d.ts.map +1 -1
- package/v3/dist/learning/memory-auditor.js +3 -1
- package/v3/dist/learning/memory-auditor.js.map +1 -1
- package/v3/dist/mcp/bundle.js +30870 -23598
- package/v3/dist/mcp/handlers/core-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/core-handlers.js +16 -2
- package/v3/dist/mcp/handlers/core-handlers.js.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.d.ts +1 -0
- package/v3/dist/mcp/handlers/task-handlers.d.ts.map +1 -1
- package/v3/dist/mcp/handlers/task-handlers.js +46 -12
- package/v3/dist/mcp/handlers/task-handlers.js.map +1 -1
- package/v3/dist/mcp/security/cve-prevention.d.ts +31 -134
- package/v3/dist/mcp/security/cve-prevention.d.ts.map +1 -1
- package/v3/dist/mcp/security/cve-prevention.js +37 -562
- package/v3/dist/mcp/security/cve-prevention.js.map +1 -1
- package/v3/dist/mcp/security/index.d.ts +5 -1
- package/v3/dist/mcp/security/index.d.ts.map +1 -1
- package/v3/dist/mcp/security/validators/command-validator.d.ts +41 -0
- package/v3/dist/mcp/security/validators/command-validator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/command-validator.js +123 -0
- package/v3/dist/mcp/security/validators/command-validator.js.map +1 -0
- package/v3/dist/mcp/security/validators/crypto-validator.d.ts +40 -0
- package/v3/dist/mcp/security/validators/crypto-validator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/crypto-validator.js +72 -0
- package/v3/dist/mcp/security/validators/crypto-validator.js.map +1 -0
- package/v3/dist/mcp/security/validators/index.d.ts +12 -0
- package/v3/dist/mcp/security/validators/index.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/index.js +22 -0
- package/v3/dist/mcp/security/validators/index.js.map +1 -0
- package/v3/dist/mcp/security/validators/input-sanitizer.d.ts +56 -0
- package/v3/dist/mcp/security/validators/input-sanitizer.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/input-sanitizer.js +157 -0
- package/v3/dist/mcp/security/validators/input-sanitizer.js.map +1 -0
- package/v3/dist/mcp/security/validators/interfaces.d.ts +164 -0
- package/v3/dist/mcp/security/validators/interfaces.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/interfaces.js +6 -0
- package/v3/dist/mcp/security/validators/interfaces.js.map +1 -0
- package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts +50 -0
- package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/path-traversal-validator.js +242 -0
- package/v3/dist/mcp/security/validators/path-traversal-validator.js.map +1 -0
- package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts +50 -0
- package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/regex-safety-validator.js +183 -0
- package/v3/dist/mcp/security/validators/regex-safety-validator.js.map +1 -0
- package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts +66 -0
- package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts.map +1 -0
- package/v3/dist/mcp/security/validators/validation-orchestrator.js +146 -0
- package/v3/dist/mcp/security/validators/validation-orchestrator.js.map +1 -0
- package/v3/dist/mcp/server.d.ts.map +1 -1
- package/v3/dist/mcp/server.js +1 -0
- package/v3/dist/mcp/server.js.map +1 -1
- package/v3/dist/mcp/services/reasoning-bank-service.d.ts +87 -13
- package/v3/dist/mcp/services/reasoning-bank-service.d.ts.map +1 -1
- package/v3/dist/mcp/services/reasoning-bank-service.js +291 -31
- package/v3/dist/mcp/services/reasoning-bank-service.js.map +1 -1
- package/v3/dist/mcp/tool-registry.d.ts +3 -1
- package/v3/dist/mcp/tool-registry.d.ts.map +1 -1
- package/v3/dist/mcp/tool-registry.js +155 -2
- package/v3/dist/mcp/tool-registry.js.map +1 -1
- package/v3/dist/mcp/tools/test-generation/generate.d.ts +1 -0
- package/v3/dist/mcp/tools/test-generation/generate.d.ts.map +1 -1
- package/v3/dist/mcp/tools/test-generation/generate.js +3 -2
- package/v3/dist/mcp/tools/test-generation/generate.js.map +1 -1
- package/v3/dist/routing/qe-agent-registry.d.ts +27 -0
- package/v3/dist/routing/qe-agent-registry.d.ts.map +1 -1
- package/v3/dist/routing/qe-agent-registry.js +96 -0
- package/v3/dist/routing/qe-agent-registry.js.map +1 -1
- package/v3/dist/shared/events/domain-events.d.ts +27 -0
- package/v3/dist/shared/events/domain-events.d.ts.map +1 -1
- package/v3/dist/shared/events/domain-events.js +1 -0
- package/v3/dist/shared/events/domain-events.js.map +1 -1
- package/v3/dist/sync/cloud/index.d.ts +8 -0
- package/v3/dist/sync/cloud/index.d.ts.map +1 -0
- package/v3/dist/sync/cloud/index.js +8 -0
- package/v3/dist/sync/cloud/index.js.map +1 -0
- package/v3/dist/sync/cloud/postgres-writer.d.ts +88 -0
- package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -0
- package/v3/dist/sync/cloud/postgres-writer.js +319 -0
- package/v3/dist/sync/cloud/postgres-writer.js.map +1 -0
- package/v3/dist/sync/cloud/tunnel-manager.d.ts +75 -0
- package/v3/dist/sync/cloud/tunnel-manager.d.ts.map +1 -0
- package/v3/dist/sync/cloud/tunnel-manager.js +221 -0
- package/v3/dist/sync/cloud/tunnel-manager.js.map +1 -0
- package/v3/dist/sync/index.d.ts +35 -0
- package/v3/dist/sync/index.d.ts.map +1 -0
- package/v3/dist/sync/index.js +35 -0
- package/v3/dist/sync/index.js.map +1 -0
- package/v3/dist/sync/interfaces.d.ts +245 -0
- package/v3/dist/sync/interfaces.d.ts.map +1 -0
- package/v3/dist/sync/interfaces.js +160 -0
- package/v3/dist/sync/interfaces.js.map +1 -0
- package/v3/dist/sync/readers/index.d.ts +8 -0
- package/v3/dist/sync/readers/index.d.ts.map +1 -0
- package/v3/dist/sync/readers/index.js +8 -0
- package/v3/dist/sync/readers/index.js.map +1 -0
- package/v3/dist/sync/readers/json-reader.d.ts +95 -0
- package/v3/dist/sync/readers/json-reader.d.ts.map +1 -0
- package/v3/dist/sync/readers/json-reader.js +306 -0
- package/v3/dist/sync/readers/json-reader.js.map +1 -0
- package/v3/dist/sync/readers/sqlite-reader.d.ts +88 -0
- package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -0
- package/v3/dist/sync/readers/sqlite-reader.js +255 -0
- package/v3/dist/sync/readers/sqlite-reader.js.map +1 -0
- package/v3/dist/sync/sync-agent.d.ts +116 -0
- package/v3/dist/sync/sync-agent.d.ts.map +1 -0
- package/v3/dist/sync/sync-agent.js +416 -0
- package/v3/dist/sync/sync-agent.js.map +1 -0
- package/v3/package.json +13 -2
- package/v3/dist/domains/test-generation/coherence-gate.d.ts.map +0 -1
- package/v3/dist/domains/test-generation/coherence-gate.js.map +0 -1
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DreamScheduler - Automated Dream Cycle Scheduling
|
|
3
|
+
* ADR-021: QE ReasoningBank - Dream Cycle Integration
|
|
4
|
+
*
|
|
5
|
+
* The DreamScheduler provides automated triggering of dream cycles based on:
|
|
6
|
+
* - Time-based scheduling (periodic dreams)
|
|
7
|
+
* - Experience accumulation thresholds
|
|
8
|
+
* - Event-based triggers (quality gate failures, domain milestones)
|
|
9
|
+
*
|
|
10
|
+
* It coordinates with the DreamEngine to run actual dream cycles and
|
|
11
|
+
* can automatically apply high-confidence insights.
|
|
12
|
+
*
|
|
13
|
+
* @module v3/learning/dream/dream-scheduler
|
|
14
|
+
*/
|
|
15
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
16
|
+
/**
|
|
17
|
+
* Default DreamScheduler configuration
|
|
18
|
+
*/
|
|
19
|
+
export const DEFAULT_DREAM_SCHEDULER_CONFIG = {
|
|
20
|
+
// Time-based scheduling
|
|
21
|
+
autoScheduleIntervalMs: 3600000, // 1 hour
|
|
22
|
+
minTimeBetweenDreamsMs: 300000, // 5 minutes
|
|
23
|
+
// Experience-based triggers
|
|
24
|
+
experienceThreshold: 20,
|
|
25
|
+
enableExperienceTrigger: true,
|
|
26
|
+
// Event-based triggers
|
|
27
|
+
enableQualityGateFailureTrigger: true,
|
|
28
|
+
enableDomainMilestoneTrigger: false,
|
|
29
|
+
// Dream configuration
|
|
30
|
+
defaultDreamDurationMs: 10000, // 10 seconds
|
|
31
|
+
quickDreamDurationMs: 5000, // 5 seconds
|
|
32
|
+
fullDreamDurationMs: 30000, // 30 seconds
|
|
33
|
+
// Insight handling
|
|
34
|
+
autoApplyHighConfidenceInsights: false,
|
|
35
|
+
insightConfidenceThreshold: 0.8,
|
|
36
|
+
};
|
|
37
|
+
// ============================================================================
|
|
38
|
+
// DreamScheduler Implementation
|
|
39
|
+
// ============================================================================
|
|
40
|
+
/**
|
|
41
|
+
* DreamScheduler manages automatic triggering of dream cycles.
|
|
42
|
+
*
|
|
43
|
+
* It follows the dependency injection pattern - all required dependencies
|
|
44
|
+
* (DreamEngine, EventBus) must be provided via the constructor.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const scheduler = new DreamScheduler({
|
|
49
|
+
* dreamEngine,
|
|
50
|
+
* eventBus,
|
|
51
|
+
* memoryBackend, // optional
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* await scheduler.initialize();
|
|
55
|
+
* scheduler.start();
|
|
56
|
+
*
|
|
57
|
+
* // Record experiences as they happen
|
|
58
|
+
* scheduler.recordExperience({
|
|
59
|
+
* id: 'exp-1',
|
|
60
|
+
* agentType: 'tester',
|
|
61
|
+
* domain: 'test-execution',
|
|
62
|
+
* taskType: 'run-tests',
|
|
63
|
+
* success: true,
|
|
64
|
+
* duration: 5000,
|
|
65
|
+
* timestamp: new Date(),
|
|
66
|
+
* });
|
|
67
|
+
*
|
|
68
|
+
* // Manually trigger a dream
|
|
69
|
+
* const result = await scheduler.triggerDream();
|
|
70
|
+
*
|
|
71
|
+
* // Stop and cleanup
|
|
72
|
+
* scheduler.stop();
|
|
73
|
+
* await scheduler.dispose();
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export class DreamScheduler {
|
|
77
|
+
config;
|
|
78
|
+
dreamEngine;
|
|
79
|
+
eventBus;
|
|
80
|
+
memoryBackend;
|
|
81
|
+
// State
|
|
82
|
+
initialized = false;
|
|
83
|
+
running = false;
|
|
84
|
+
dreaming = false;
|
|
85
|
+
// Experience buffer
|
|
86
|
+
experienceBuffer = [];
|
|
87
|
+
// Timing
|
|
88
|
+
lastDreamTime = null;
|
|
89
|
+
scheduledDreamTimer = null;
|
|
90
|
+
totalDreamsCompleted = 0;
|
|
91
|
+
// Event subscriptions
|
|
92
|
+
subscriptions = [];
|
|
93
|
+
// Last result
|
|
94
|
+
lastDreamResult = null;
|
|
95
|
+
/**
|
|
96
|
+
* Create a new DreamScheduler instance.
|
|
97
|
+
*
|
|
98
|
+
* @param dependencies - Required dependencies (dreamEngine, eventBus, memoryBackend)
|
|
99
|
+
* @param config - Optional configuration overrides
|
|
100
|
+
* @throws {Error} If required dependencies are missing
|
|
101
|
+
*/
|
|
102
|
+
constructor(dependencies, config) {
|
|
103
|
+
// Validate required dependencies (Integration Prevention Pattern)
|
|
104
|
+
if (!dependencies.dreamEngine) {
|
|
105
|
+
throw new Error('DreamScheduler requires dreamEngine dependency');
|
|
106
|
+
}
|
|
107
|
+
if (!dependencies.eventBus) {
|
|
108
|
+
throw new Error('DreamScheduler requires eventBus dependency');
|
|
109
|
+
}
|
|
110
|
+
this.dreamEngine = dependencies.dreamEngine;
|
|
111
|
+
this.eventBus = dependencies.eventBus;
|
|
112
|
+
this.memoryBackend = dependencies.memoryBackend;
|
|
113
|
+
this.config = { ...DEFAULT_DREAM_SCHEDULER_CONFIG, ...config };
|
|
114
|
+
}
|
|
115
|
+
// ==========================================================================
|
|
116
|
+
// Lifecycle Methods
|
|
117
|
+
// ==========================================================================
|
|
118
|
+
/**
|
|
119
|
+
* Initialize the scheduler.
|
|
120
|
+
*
|
|
121
|
+
* Sets up event subscriptions and restores state from memory if available.
|
|
122
|
+
*/
|
|
123
|
+
async initialize() {
|
|
124
|
+
if (this.initialized)
|
|
125
|
+
return;
|
|
126
|
+
// Subscribe to quality gate failure events
|
|
127
|
+
if (this.config.enableQualityGateFailureTrigger) {
|
|
128
|
+
const qualitySubscription = this.eventBus.subscribe('quality-assessment:gate:completed', this.handleQualityGateEvent.bind(this));
|
|
129
|
+
this.subscriptions.push(qualitySubscription);
|
|
130
|
+
}
|
|
131
|
+
// Subscribe to domain milestone events
|
|
132
|
+
if (this.config.enableDomainMilestoneTrigger) {
|
|
133
|
+
const milestoneSubscription = this.eventBus.subscribe('coordination:milestone:reached', this.handleDomainMilestoneEvent.bind(this));
|
|
134
|
+
this.subscriptions.push(milestoneSubscription);
|
|
135
|
+
}
|
|
136
|
+
// Restore state from memory if available
|
|
137
|
+
await this.restoreState();
|
|
138
|
+
this.initialized = true;
|
|
139
|
+
console.log('[DreamScheduler] Initialized');
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Start the scheduler.
|
|
143
|
+
*
|
|
144
|
+
* Begins automatic dream scheduling based on the configured interval.
|
|
145
|
+
*/
|
|
146
|
+
start() {
|
|
147
|
+
this.ensureInitialized();
|
|
148
|
+
if (this.running)
|
|
149
|
+
return;
|
|
150
|
+
this.running = true;
|
|
151
|
+
this.scheduleNextDream();
|
|
152
|
+
console.log('[DreamScheduler] Started');
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Stop the scheduler.
|
|
156
|
+
*
|
|
157
|
+
* Stops automatic scheduling but does not dispose resources.
|
|
158
|
+
*/
|
|
159
|
+
stop() {
|
|
160
|
+
if (!this.running)
|
|
161
|
+
return;
|
|
162
|
+
this.running = false;
|
|
163
|
+
this.clearScheduledDream();
|
|
164
|
+
console.log('[DreamScheduler] Stopped');
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Dispose of all resources.
|
|
168
|
+
*
|
|
169
|
+
* Stops scheduling, unsubscribes from events, and saves state.
|
|
170
|
+
*/
|
|
171
|
+
async dispose() {
|
|
172
|
+
this.stop();
|
|
173
|
+
// Unsubscribe from all events
|
|
174
|
+
for (const subscription of this.subscriptions) {
|
|
175
|
+
subscription.unsubscribe();
|
|
176
|
+
}
|
|
177
|
+
this.subscriptions = [];
|
|
178
|
+
// Save state before disposing
|
|
179
|
+
await this.saveState();
|
|
180
|
+
this.initialized = false;
|
|
181
|
+
console.log('[DreamScheduler] Disposed');
|
|
182
|
+
}
|
|
183
|
+
// ==========================================================================
|
|
184
|
+
// Manual Dream Triggers
|
|
185
|
+
// ==========================================================================
|
|
186
|
+
/**
|
|
187
|
+
* Manually trigger a dream cycle.
|
|
188
|
+
*
|
|
189
|
+
* @param duration - Optional duration override in ms
|
|
190
|
+
* @returns Result of the dream cycle
|
|
191
|
+
*/
|
|
192
|
+
async triggerDream(duration) {
|
|
193
|
+
this.ensureInitialized();
|
|
194
|
+
// Check minimum time between dreams
|
|
195
|
+
if (!this.canDream()) {
|
|
196
|
+
const waitTime = this.getTimeUntilCanDream();
|
|
197
|
+
throw new Error(`Cannot start dream: minimum interval not met. Wait ${Math.ceil(waitTime / 1000)}s.`);
|
|
198
|
+
}
|
|
199
|
+
return this.executeDream(duration ?? this.config.defaultDreamDurationMs);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Trigger a quick dream (shorter duration).
|
|
203
|
+
*
|
|
204
|
+
* @returns Result of the dream cycle
|
|
205
|
+
*/
|
|
206
|
+
async triggerQuickDream() {
|
|
207
|
+
return this.triggerDream(this.config.quickDreamDurationMs);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Trigger a full dream (longer duration).
|
|
211
|
+
*
|
|
212
|
+
* @returns Result of the dream cycle
|
|
213
|
+
*/
|
|
214
|
+
async triggerFullDream() {
|
|
215
|
+
return this.triggerDream(this.config.fullDreamDurationMs);
|
|
216
|
+
}
|
|
217
|
+
// ==========================================================================
|
|
218
|
+
// Experience Recording
|
|
219
|
+
// ==========================================================================
|
|
220
|
+
/**
|
|
221
|
+
* Record a task experience for future dream processing.
|
|
222
|
+
*
|
|
223
|
+
* If experience threshold is reached and enabled, triggers a dream.
|
|
224
|
+
*
|
|
225
|
+
* @param experience - The experience to record
|
|
226
|
+
*/
|
|
227
|
+
recordExperience(experience) {
|
|
228
|
+
this.experienceBuffer.push(experience);
|
|
229
|
+
// Check if we should trigger an experience-based dream
|
|
230
|
+
if (this.config.enableExperienceTrigger &&
|
|
231
|
+
this.experienceBuffer.length >= this.config.experienceThreshold &&
|
|
232
|
+
this.canDream() &&
|
|
233
|
+
!this.dreaming) {
|
|
234
|
+
console.log(`[DreamScheduler] Experience threshold (${this.config.experienceThreshold}) reached, triggering dream`);
|
|
235
|
+
// Fire and forget - don't block the caller
|
|
236
|
+
this.executeDream(this.config.defaultDreamDurationMs).catch((err) => {
|
|
237
|
+
console.error('[DreamScheduler] Experience-triggered dream failed:', err);
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Get the current experience buffer.
|
|
243
|
+
*
|
|
244
|
+
* @returns Copy of the experience buffer
|
|
245
|
+
*/
|
|
246
|
+
getExperienceBuffer() {
|
|
247
|
+
return [...this.experienceBuffer];
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Clear the experience buffer.
|
|
251
|
+
*/
|
|
252
|
+
clearExperienceBuffer() {
|
|
253
|
+
this.experienceBuffer = [];
|
|
254
|
+
}
|
|
255
|
+
// ==========================================================================
|
|
256
|
+
// Status Methods
|
|
257
|
+
// ==========================================================================
|
|
258
|
+
/**
|
|
259
|
+
* Get the current scheduler status.
|
|
260
|
+
*
|
|
261
|
+
* @returns Current status object
|
|
262
|
+
*/
|
|
263
|
+
getStatus() {
|
|
264
|
+
const timeUntilNext = this.scheduledDreamTimer
|
|
265
|
+
? this.getTimeUntilScheduledDream()
|
|
266
|
+
: null;
|
|
267
|
+
return {
|
|
268
|
+
initialized: this.initialized,
|
|
269
|
+
running: this.running,
|
|
270
|
+
dreaming: this.dreaming,
|
|
271
|
+
experienceCount: this.experienceBuffer.length,
|
|
272
|
+
experienceThreshold: this.config.experienceThreshold,
|
|
273
|
+
timeUntilNextDream: timeUntilNext,
|
|
274
|
+
totalDreamsCompleted: this.totalDreamsCompleted,
|
|
275
|
+
lastDreamTime: this.lastDreamTime,
|
|
276
|
+
autoSchedulingEnabled: this.running,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Get the result of the last completed dream.
|
|
281
|
+
*
|
|
282
|
+
* @returns Last dream result or null
|
|
283
|
+
*/
|
|
284
|
+
getLastDreamResult() {
|
|
285
|
+
return this.lastDreamResult;
|
|
286
|
+
}
|
|
287
|
+
// ==========================================================================
|
|
288
|
+
// Private: Dream Execution
|
|
289
|
+
// ==========================================================================
|
|
290
|
+
/**
|
|
291
|
+
* Execute a dream cycle with the specified duration.
|
|
292
|
+
*/
|
|
293
|
+
async executeDream(durationMs) {
|
|
294
|
+
if (this.dreaming) {
|
|
295
|
+
throw new Error('A dream is already in progress');
|
|
296
|
+
}
|
|
297
|
+
this.dreaming = true;
|
|
298
|
+
console.log(`[DreamScheduler] Starting dream cycle (${durationMs}ms)`);
|
|
299
|
+
try {
|
|
300
|
+
// Run the dream
|
|
301
|
+
const result = await this.dreamEngine.dream(durationMs);
|
|
302
|
+
// Update state
|
|
303
|
+
this.lastDreamTime = new Date();
|
|
304
|
+
this.lastDreamResult = result;
|
|
305
|
+
this.totalDreamsCompleted++;
|
|
306
|
+
// Clear experience buffer after successful dream
|
|
307
|
+
this.clearExperienceBuffer();
|
|
308
|
+
// Auto-apply high-confidence insights if enabled
|
|
309
|
+
if (this.config.autoApplyHighConfidenceInsights) {
|
|
310
|
+
await this.autoApplyInsights(result);
|
|
311
|
+
}
|
|
312
|
+
// Publish dream completed event
|
|
313
|
+
await this.publishDreamCompletedEvent(result);
|
|
314
|
+
// Reschedule next dream if running
|
|
315
|
+
if (this.running) {
|
|
316
|
+
this.scheduleNextDream();
|
|
317
|
+
}
|
|
318
|
+
console.log(`[DreamScheduler] Dream completed: ${result.insights.length} insights generated`);
|
|
319
|
+
return result;
|
|
320
|
+
}
|
|
321
|
+
finally {
|
|
322
|
+
this.dreaming = false;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Auto-apply insights that meet the confidence threshold.
|
|
327
|
+
*/
|
|
328
|
+
async autoApplyInsights(result) {
|
|
329
|
+
const highConfidenceInsights = result.insights.filter((insight) => insight.actionable &&
|
|
330
|
+
insight.confidenceScore >= this.config.insightConfidenceThreshold);
|
|
331
|
+
for (const insight of highConfidenceInsights) {
|
|
332
|
+
try {
|
|
333
|
+
const applyResult = await this.dreamEngine.applyInsight(insight.id);
|
|
334
|
+
if (applyResult.success) {
|
|
335
|
+
console.log(`[DreamScheduler] Auto-applied insight ${insight.id}: ${applyResult.patternId}`);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
catch (err) {
|
|
339
|
+
console.error(`[DreamScheduler] Failed to auto-apply insight ${insight.id}:`, err);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
// ==========================================================================
|
|
344
|
+
// Private: Scheduling
|
|
345
|
+
// ==========================================================================
|
|
346
|
+
/**
|
|
347
|
+
* Schedule the next automatic dream.
|
|
348
|
+
*/
|
|
349
|
+
scheduleNextDream() {
|
|
350
|
+
this.clearScheduledDream();
|
|
351
|
+
if (!this.running)
|
|
352
|
+
return;
|
|
353
|
+
const nextDreamDelay = this.calculateNextDreamDelay();
|
|
354
|
+
this.scheduledDreamTimer = setTimeout(async () => {
|
|
355
|
+
if (!this.running || this.dreaming)
|
|
356
|
+
return;
|
|
357
|
+
try {
|
|
358
|
+
await this.executeDream(this.config.defaultDreamDurationMs);
|
|
359
|
+
}
|
|
360
|
+
catch (err) {
|
|
361
|
+
console.error('[DreamScheduler] Scheduled dream failed:', err);
|
|
362
|
+
// Reschedule even on failure
|
|
363
|
+
if (this.running) {
|
|
364
|
+
this.scheduleNextDream();
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}, nextDreamDelay);
|
|
368
|
+
console.log(`[DreamScheduler] Next dream scheduled in ${Math.ceil(nextDreamDelay / 1000)}s`);
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Clear any scheduled dream timer.
|
|
372
|
+
*/
|
|
373
|
+
clearScheduledDream() {
|
|
374
|
+
if (this.scheduledDreamTimer) {
|
|
375
|
+
clearTimeout(this.scheduledDreamTimer);
|
|
376
|
+
this.scheduledDreamTimer = null;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Calculate delay until next scheduled dream.
|
|
381
|
+
*/
|
|
382
|
+
calculateNextDreamDelay() {
|
|
383
|
+
if (!this.lastDreamTime) {
|
|
384
|
+
// First dream - wait full interval
|
|
385
|
+
return this.config.autoScheduleIntervalMs;
|
|
386
|
+
}
|
|
387
|
+
const timeSinceLastDream = Date.now() - this.lastDreamTime.getTime();
|
|
388
|
+
const remainingTime = this.config.autoScheduleIntervalMs - timeSinceLastDream;
|
|
389
|
+
// Ensure minimum delay
|
|
390
|
+
return Math.max(remainingTime, this.config.minTimeBetweenDreamsMs);
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Get time until the currently scheduled dream.
|
|
394
|
+
*/
|
|
395
|
+
getTimeUntilScheduledDream() {
|
|
396
|
+
// Approximate - we track when we scheduled, not the exact timer
|
|
397
|
+
return this.calculateNextDreamDelay();
|
|
398
|
+
}
|
|
399
|
+
// ==========================================================================
|
|
400
|
+
// Private: Dream Timing Checks
|
|
401
|
+
// ==========================================================================
|
|
402
|
+
/**
|
|
403
|
+
* Check if enough time has passed since the last dream.
|
|
404
|
+
*/
|
|
405
|
+
canDream() {
|
|
406
|
+
if (!this.lastDreamTime)
|
|
407
|
+
return true;
|
|
408
|
+
const timeSinceLastDream = Date.now() - this.lastDreamTime.getTime();
|
|
409
|
+
return timeSinceLastDream >= this.config.minTimeBetweenDreamsMs;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Get time until we can start a dream.
|
|
413
|
+
*/
|
|
414
|
+
getTimeUntilCanDream() {
|
|
415
|
+
if (!this.lastDreamTime)
|
|
416
|
+
return 0;
|
|
417
|
+
const timeSinceLastDream = Date.now() - this.lastDreamTime.getTime();
|
|
418
|
+
return Math.max(0, this.config.minTimeBetweenDreamsMs - timeSinceLastDream);
|
|
419
|
+
}
|
|
420
|
+
// ==========================================================================
|
|
421
|
+
// Private: Event Handlers
|
|
422
|
+
// ==========================================================================
|
|
423
|
+
/**
|
|
424
|
+
* Handle quality gate completion events.
|
|
425
|
+
* Triggers a dream when a gate fails to analyze what went wrong.
|
|
426
|
+
*/
|
|
427
|
+
async handleQualityGateEvent(event) {
|
|
428
|
+
if (event.payload.passed)
|
|
429
|
+
return; // Only trigger on failures
|
|
430
|
+
if (!this.canDream() || this.dreaming) {
|
|
431
|
+
console.log('[DreamScheduler] Quality gate failed but cannot start dream yet');
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
console.log('[DreamScheduler] Quality gate failed, triggering analysis dream');
|
|
435
|
+
try {
|
|
436
|
+
await this.executeDream(this.config.quickDreamDurationMs);
|
|
437
|
+
}
|
|
438
|
+
catch (err) {
|
|
439
|
+
console.error('[DreamScheduler] Quality gate triggered dream failed:', err);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Handle domain milestone events.
|
|
444
|
+
* Triggers a dream to consolidate learnings after significant progress.
|
|
445
|
+
*/
|
|
446
|
+
async handleDomainMilestoneEvent(event) {
|
|
447
|
+
if (!this.canDream() || this.dreaming) {
|
|
448
|
+
console.log('[DreamScheduler] Milestone reached but cannot start dream yet');
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
console.log('[DreamScheduler] Domain milestone reached, triggering consolidation dream');
|
|
452
|
+
try {
|
|
453
|
+
await this.executeDream(this.config.defaultDreamDurationMs);
|
|
454
|
+
}
|
|
455
|
+
catch (err) {
|
|
456
|
+
console.error('[DreamScheduler] Milestone triggered dream failed:', err);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
// ==========================================================================
|
|
460
|
+
// Private: Event Publishing
|
|
461
|
+
// ==========================================================================
|
|
462
|
+
/**
|
|
463
|
+
* Publish a dream completed event.
|
|
464
|
+
*/
|
|
465
|
+
async publishDreamCompletedEvent(result) {
|
|
466
|
+
try {
|
|
467
|
+
await this.eventBus.publish({
|
|
468
|
+
id: uuidv4(),
|
|
469
|
+
type: 'learning-optimization:dream:completed',
|
|
470
|
+
timestamp: new Date(),
|
|
471
|
+
source: 'learning-optimization',
|
|
472
|
+
payload: {
|
|
473
|
+
cycleId: result.cycle.id,
|
|
474
|
+
insightsGenerated: result.insights.length,
|
|
475
|
+
patternsCreated: result.patternsCreated,
|
|
476
|
+
duration: result.cycle.durationMs,
|
|
477
|
+
},
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
catch (err) {
|
|
481
|
+
console.error('[DreamScheduler] Failed to publish dream completed event:', err);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
// ==========================================================================
|
|
485
|
+
// Private: State Persistence
|
|
486
|
+
// ==========================================================================
|
|
487
|
+
/**
|
|
488
|
+
* Save scheduler state to memory backend.
|
|
489
|
+
*/
|
|
490
|
+
async saveState() {
|
|
491
|
+
if (!this.memoryBackend)
|
|
492
|
+
return;
|
|
493
|
+
try {
|
|
494
|
+
await this.memoryBackend.set('dream-scheduler:state', {
|
|
495
|
+
lastDreamTime: this.lastDreamTime?.toISOString() ?? null,
|
|
496
|
+
totalDreamsCompleted: this.totalDreamsCompleted,
|
|
497
|
+
experienceBuffer: this.experienceBuffer,
|
|
498
|
+
}, { namespace: 'learning-optimization', persist: true });
|
|
499
|
+
}
|
|
500
|
+
catch (err) {
|
|
501
|
+
console.error('[DreamScheduler] Failed to save state:', err);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Restore scheduler state from memory backend.
|
|
506
|
+
*/
|
|
507
|
+
async restoreState() {
|
|
508
|
+
if (!this.memoryBackend)
|
|
509
|
+
return;
|
|
510
|
+
try {
|
|
511
|
+
const state = await this.memoryBackend.get('dream-scheduler:state');
|
|
512
|
+
if (state) {
|
|
513
|
+
this.lastDreamTime = state.lastDreamTime
|
|
514
|
+
? new Date(state.lastDreamTime)
|
|
515
|
+
: null;
|
|
516
|
+
this.totalDreamsCompleted = state.totalDreamsCompleted ?? 0;
|
|
517
|
+
this.experienceBuffer = state.experienceBuffer ?? [];
|
|
518
|
+
console.log(`[DreamScheduler] Restored state: ${this.totalDreamsCompleted} dreams, ${this.experienceBuffer.length} experiences`);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
catch (err) {
|
|
522
|
+
console.error('[DreamScheduler] Failed to restore state:', err);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
// ==========================================================================
|
|
526
|
+
// Private: Validation
|
|
527
|
+
// ==========================================================================
|
|
528
|
+
/**
|
|
529
|
+
* Ensure the scheduler is initialized.
|
|
530
|
+
*/
|
|
531
|
+
ensureInitialized() {
|
|
532
|
+
if (!this.initialized) {
|
|
533
|
+
throw new Error('DreamScheduler not initialized. Call initialize() first.');
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
// ============================================================================
|
|
538
|
+
// Factory Function
|
|
539
|
+
// ============================================================================
|
|
540
|
+
/**
|
|
541
|
+
* Create a new DreamScheduler instance.
|
|
542
|
+
*
|
|
543
|
+
* @param dependencies - Required dependencies
|
|
544
|
+
* @param config - Optional configuration overrides
|
|
545
|
+
* @returns New DreamScheduler instance
|
|
546
|
+
*/
|
|
547
|
+
export function createDreamScheduler(dependencies, config) {
|
|
548
|
+
return new DreamScheduler(dependencies, config);
|
|
549
|
+
}
|
|
550
|
+
export default DreamScheduler;
|
|
551
|
+
//# sourceMappingURL=dream-scheduler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dream-scheduler.js","sourceRoot":"","sources":["../../../src/learning/dream/dream-scheduler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AA8CpC;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAyB;IAClE,wBAAwB;IACxB,sBAAsB,EAAE,OAAO,EAAE,SAAS;IAC1C,sBAAsB,EAAE,MAAM,EAAE,YAAY;IAE5C,4BAA4B;IAC5B,mBAAmB,EAAE,EAAE;IACvB,uBAAuB,EAAE,IAAI;IAE7B,uBAAuB;IACvB,+BAA+B,EAAE,IAAI;IACrC,4BAA4B,EAAE,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H,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,GAAG,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IAED,6EAA6E;IAC7E,sBAAsB;IACtB,6EAA6E;IAE7E;;OAEG;IACK,iBAAiB;QACvB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAC9E,CAAC;IACH,CAAC;CACF;AAED,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,YAAwC,EACxC,MAAsC;IAEtC,OAAO,IAAI,cAAc,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -54,5 +54,6 @@ export { ConceptGraph, createConceptGraph } from './concept-graph.js';
|
|
|
54
54
|
export { SpreadingActivation, type ActivationConfig, type ActivationResult, DEFAULT_ACTIVATION_CONFIG, } from './spreading-activation.js';
|
|
55
55
|
export { InsightGenerator, type InsightConfig, type DreamInsight as GeneratedInsight, type PatternTemplate, DEFAULT_INSIGHT_CONFIG, } from './insight-generator.js';
|
|
56
56
|
export { DreamEngine, createDreamEngine, type DreamConfig, type DreamCycleResult as EngineResult, type ApplyInsightResult, DEFAULT_DREAM_CONFIG, } from './dream-engine.js';
|
|
57
|
+
export { DreamScheduler, createDreamScheduler, type DreamSchedulerConfig, type DreamSchedulerDependencies, type DreamSchedulerStatus, type TaskExperience, DEFAULT_DREAM_SCHEDULER_CONFIG, } from './dream-scheduler.js';
|
|
57
58
|
export { default } from './dream-engine.js';
|
|
58
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/learning/dream/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;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B,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAM1D,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAMtE,OAAO,EACL,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAMnC,OAAO,EACL,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,eAAe,EACpB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAMhC,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,IAAI,YAAY,EACrC,KAAK,kBAAkB,EACvB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -66,6 +66,10 @@ export { InsightGenerator, DEFAULT_INSIGHT_CONFIG, } from './insight-generator.j
|
|
|
66
66
|
// ============================================================================
|
|
67
67
|
export { DreamEngine, createDreamEngine, DEFAULT_DREAM_CONFIG, } from './dream-engine.js';
|
|
68
68
|
// ============================================================================
|
|
69
|
+
// DreamScheduler
|
|
70
|
+
// ============================================================================
|
|
71
|
+
export { DreamScheduler, createDreamScheduler, DEFAULT_DREAM_SCHEDULER_CONFIG, } from './dream-scheduler.js';
|
|
72
|
+
// ============================================================================
|
|
69
73
|
// Default Export
|
|
70
74
|
// ============================================================================
|
|
71
75
|
export { default } from './dream-engine.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/learning/dream/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AA0CH,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE1D,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEtE,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,OAAO,EACL,mBAAmB,EAGnB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,OAAO,EACL,gBAAgB,EAIhB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAEhC,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,OAAO,EACL,WAAW,EACX,iBAAiB,EAIjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/learning/dream/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AA0CH,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE1D,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEtE,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,OAAO,EACL,mBAAmB,EAGnB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,OAAO,EACL,gBAAgB,EAIhB,sBAAsB,GACvB,MA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C,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA0FtE;;;;;OAKG;IACG,gBAAgB,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IA8BxE;;;;;;OAMG;IACG,uBAAuB,CAC3B,QAAQ,EAAE,cAAc,EAAE,EAC1B,QAAQ,EAAE,SAAS,EAAE,GACpB,OAAO,CAAC,mBAAmB,EAAE,CAAC;IA4DjC;;;;OAIG;IACG,kBAAkB,CACtB,aAAa,EAAE,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC;IAiDhB;;OAEG;IACH,OAAO,CAAC,aAAa;IAcrB;;OAEG;IACH,OAAO,CAAC,eAAe;IAgBvB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAa/B;;OAEG;IACH,OAAO,CAAC,eAAe;IAWvB;;OAEG;IACH,OAAO,CAAC,cAAc;IAyBtB;;OAEG;IACH,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAYzB;;OAEG;IACH,OAAO,CAAC,aAAa;IAQrB;;OAEG;IACH,OAAO,CAAC,aAAa;IASrB;;OAEG;YACW,SAAS;CAexB;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,CAAC,EAAE,QAAQ,EACnB,MAAM,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACpC,sBAAsB,CAMxB"}
|
|
@@ -405,7 +405,9 @@ export class MemoryCoherenceAuditor {
|
|
|
405
405
|
return patterns
|
|
406
406
|
.filter(p => {
|
|
407
407
|
const hasGenericName = /generic|general|common|basic/i.test(p.name);
|
|
408
|
-
|
|
408
|
+
// Defensive: handle patterns without context or tags
|
|
409
|
+
const tags = p.context?.tags;
|
|
410
|
+
const hasLowSpecificity = !tags || tags.length < 2;
|
|
409
411
|
return hasGenericName || hasLowSpecificity;
|
|
410
412
|
})
|
|
411
413
|
.map(p => p.id);
|