agentic-qe 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/qe-coverage-analyzer.md +8 -0
- package/.claude/agents/qe-flaky-test-hunter.md +9 -1
- package/.claude/agents/qe-test-generator.md +7 -0
- package/.claude/agents/reasoning/agent.md +816 -0
- package/.claude/agents/reasoning/goal-planner.md +73 -0
- package/.claude/settings.json +64 -25
- package/.claude/skills/README.md +124 -0
- package/.claude/skills/accessibility-testing/SKILL.md +777 -0
- package/.claude/skills/agentdb-advanced/SKILL.md +550 -0
- package/.claude/skills/agentdb-learning/SKILL.md +545 -0
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +339 -0
- package/.claude/skills/agentdb-optimization/SKILL.md +509 -0
- package/.claude/skills/agentdb-vector-search/SKILL.md +339 -0
- package/.claude/skills/agentic-quality-engineering/SKILL.md +604 -0
- package/.claude/skills/api-testing-patterns/SKILL.md +686 -0
- package/.claude/skills/bug-reporting-excellence/SKILL.md +632 -0
- package/.claude/skills/chaos-engineering-resilience/SKILL.md +109 -0
- package/.claude/skills/code-review-quality/SKILL.md +683 -0
- package/.claude/skills/compatibility-testing/SKILL.md +101 -0
- package/.claude/skills/compliance-testing/SKILL.md +162 -0
- package/.claude/skills/consultancy-practices/SKILL.md +540 -0
- package/.claude/skills/context-driven-testing/SKILL.md +466 -0
- package/.claude/skills/contract-testing/SKILL.md +193 -0
- package/.claude/skills/database-testing/SKILL.md +243 -0
- package/.claude/skills/exploratory-testing-advanced/SKILL.md +676 -0
- package/.claude/skills/flow-nexus-neural/SKILL.md +738 -0
- package/.claude/skills/flow-nexus-platform/SKILL.md +1157 -0
- package/.claude/skills/flow-nexus-swarm/SKILL.md +610 -0
- package/.claude/skills/github-code-review/SKILL.md +1140 -0
- package/.claude/skills/github-multi-repo/SKILL.md +874 -0
- package/.claude/skills/github-project-management/SKILL.md +1277 -0
- package/.claude/skills/github-release-management/SKILL.md +1081 -0
- package/.claude/skills/github-workflow-automation/SKILL.md +1065 -0
- package/.claude/skills/hive-mind-advanced/SKILL.md +712 -0
- package/.claude/skills/holistic-testing-pact/SKILL.md +225 -0
- package/.claude/skills/hooks-automation/SKILL.md +1201 -0
- package/.claude/skills/localization-testing/SKILL.md +115 -0
- package/.claude/skills/mobile-testing/SKILL.md +548 -0
- package/.claude/skills/mutation-testing/SKILL.md +129 -0
- package/.claude/skills/pair-programming/SKILL.md +1202 -0
- package/.claude/skills/performance-analysis/SKILL.md +563 -0
- package/.claude/skills/performance-testing/SKILL.md +662 -0
- package/.claude/skills/quality-metrics/SKILL.md +592 -0
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +446 -0
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
- package/.claude/skills/refactoring-patterns/SKILL.md +778 -0
- package/.claude/skills/regression-testing/SKILL.md +1045 -0
- package/.claude/skills/risk-based-testing/SKILL.md +721 -0
- package/.claude/skills/security-testing/SKILL.md +651 -0
- package/.claude/skills/shift-left-testing/SKILL.md +535 -0
- package/.claude/skills/shift-right-testing/SKILL.md +591 -0
- package/.claude/skills/skill-builder/SKILL.md +910 -0
- package/.claude/skills/sparc-methodology/SKILL.md +1115 -0
- package/.claude/skills/stream-chain/SKILL.md +563 -0
- package/.claude/skills/swarm-advanced/SKILL.md +973 -0
- package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
- package/.claude/skills/tdd-london-chicago/SKILL.md +567 -0
- package/.claude/skills/technical-writing/SKILL.md +235 -0
- package/.claude/skills/test-automation-strategy/SKILL.md +842 -0
- package/.claude/skills/test-data-management/SKILL.md +1067 -0
- package/.claude/skills/test-design-techniques/SKILL.md +160 -0
- package/.claude/skills/test-environment-management/SKILL.md +204 -0
- package/.claude/skills/test-reporting-analytics/SKILL.md +143 -0
- package/.claude/skills/verification-quality/SKILL.md +649 -0
- package/.claude/skills/visual-testing-advanced/SKILL.md +148 -0
- package/.claude/skills/xp-practices/SKILL.md +671 -0
- package/.claude/statusline-command.sh +176 -0
- package/CHANGELOG.md +623 -6
- package/README.md +101 -5
- package/config/improvement-loop.config.ts +323 -0
- package/config/neural-agent.config.ts +197 -0
- package/dist/adapters/MemoryStoreAdapter.d.ts +16 -16
- package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
- package/dist/adapters/MemoryStoreAdapter.js +16 -16
- package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
- package/dist/agents/BaseAgent.d.ts +69 -0
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +387 -5
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.d.ts +13 -2
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.js +112 -12
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
- package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -1
- package/dist/agents/DeploymentReadinessAgent.js +13 -13
- package/dist/agents/DeploymentReadinessAgent.js.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.d.ts +28 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.js +160 -4
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
- package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
- package/dist/agents/FleetCommanderAgent.js +4 -3
- package/dist/agents/FleetCommanderAgent.js.map +1 -1
- package/dist/agents/LearningAgent.d.ts +14 -5
- package/dist/agents/LearningAgent.d.ts.map +1 -1
- package/dist/agents/LearningAgent.js +36 -16
- package/dist/agents/LearningAgent.js.map +1 -1
- package/dist/agents/NeuralAgentExtension.d.ts +117 -0
- package/dist/agents/NeuralAgentExtension.d.ts.map +1 -0
- package/dist/agents/NeuralAgentExtension.js +288 -0
- package/dist/agents/NeuralAgentExtension.js.map +1 -0
- package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
- package/dist/agents/PerformanceTesterAgent.js +11 -9
- package/dist/agents/PerformanceTesterAgent.js.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.js +14 -13
- package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.js +39 -38
- package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
- package/dist/agents/QualityGateAgent.d.ts.map +1 -1
- package/dist/agents/QualityGateAgent.js +7 -6
- package/dist/agents/QualityGateAgent.js.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.js +22 -21
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
- package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -1
- package/dist/agents/RequirementsValidatorAgent.js +1 -1
- package/dist/agents/RequirementsValidatorAgent.js.map +1 -1
- package/dist/agents/SecurityScannerAgent.d.ts.map +1 -1
- package/dist/agents/SecurityScannerAgent.js +8 -7
- package/dist/agents/SecurityScannerAgent.js.map +1 -1
- package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -1
- package/dist/agents/TestDataArchitectAgent.js +12 -11
- package/dist/agents/TestDataArchitectAgent.js.map +1 -1
- package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
- package/dist/agents/TestExecutorAgent.js +18 -19
- package/dist/agents/TestExecutorAgent.js.map +1 -1
- package/dist/agents/TestGeneratorAgent.d.ts +15 -4
- package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
- package/dist/agents/TestGeneratorAgent.js +172 -49
- package/dist/agents/TestGeneratorAgent.js.map +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +2 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/mixins/NeuralCapableMixin.d.ts +130 -0
- package/dist/agents/mixins/NeuralCapableMixin.d.ts.map +1 -0
- package/dist/agents/mixins/NeuralCapableMixin.js +358 -0
- package/dist/agents/mixins/NeuralCapableMixin.js.map +1 -0
- package/dist/agents/mixins/QUICCapableMixin.d.ts +34 -0
- package/dist/agents/mixins/QUICCapableMixin.d.ts.map +1 -0
- package/dist/agents/mixins/QUICCapableMixin.js +346 -0
- package/dist/agents/mixins/QUICCapableMixin.js.map +1 -0
- package/dist/cli/commands/agent/benchmark.d.ts.map +1 -1
- package/dist/cli/commands/agent/benchmark.js +2 -1
- package/dist/cli/commands/agent/benchmark.js.map +1 -1
- package/dist/cli/commands/agent/index.d.ts +5 -0
- package/dist/cli/commands/agent/index.d.ts.map +1 -1
- package/dist/cli/commands/agent/index.js +11 -6
- package/dist/cli/commands/agent/index.js.map +1 -1
- package/dist/cli/commands/agent/kill.d.ts +13 -0
- package/dist/cli/commands/agent/kill.d.ts.map +1 -0
- package/dist/cli/commands/agent/kill.js +65 -0
- package/dist/cli/commands/agent/kill.js.map +1 -0
- package/dist/cli/commands/agent/list.d.ts +19 -0
- package/dist/cli/commands/agent/list.d.ts.map +1 -0
- package/dist/cli/commands/agent/list.js +92 -0
- package/dist/cli/commands/agent/list.js.map +1 -0
- package/dist/cli/commands/agent/logs.d.ts +14 -0
- package/dist/cli/commands/agent/logs.d.ts.map +1 -0
- package/dist/cli/commands/agent/logs.js +77 -0
- package/dist/cli/commands/agent/logs.js.map +1 -0
- package/dist/cli/commands/agent/metrics.d.ts +21 -0
- package/dist/cli/commands/agent/metrics.d.ts.map +1 -0
- package/dist/cli/commands/agent/metrics.js +87 -0
- package/dist/cli/commands/agent/metrics.js.map +1 -0
- package/dist/cli/commands/agent/spawn.d.ts +28 -0
- package/dist/cli/commands/agent/spawn.d.ts.map +1 -0
- package/dist/cli/commands/agent/spawn.js +84 -0
- package/dist/cli/commands/agent/spawn.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +2 -1
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/config/list.d.ts.map +1 -1
- package/dist/cli/commands/config/list.js +2 -1
- package/dist/cli/commands/config/list.js.map +1 -1
- package/dist/cli/commands/config/set.d.ts +7 -0
- package/dist/cli/commands/config/set.d.ts.map +1 -1
- package/dist/cli/commands/config/set.js +35 -4
- package/dist/cli/commands/config/set.js.map +1 -1
- package/dist/cli/commands/fleet/logs.d.ts.map +1 -1
- package/dist/cli/commands/fleet/logs.js +2 -1
- package/dist/cli/commands/fleet/logs.js.map +1 -1
- package/dist/cli/commands/fleet/metrics.d.ts.map +1 -1
- package/dist/cli/commands/fleet/metrics.js +2 -1
- package/dist/cli/commands/fleet/metrics.js.map +1 -1
- package/dist/cli/commands/fleet/monitor.d.ts.map +1 -1
- package/dist/cli/commands/fleet/monitor.js +7 -5
- package/dist/cli/commands/fleet/monitor.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts.map +1 -1
- package/dist/cli/commands/fleet.js +2 -1
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +2 -1
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/improve/index.d.ts.map +1 -1
- package/dist/cli/commands/improve/index.js +12 -11
- package/dist/cli/commands/improve/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +24 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +503 -11
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learn/index.d.ts.map +1 -1
- package/dist/cli/commands/learn/index.js +13 -12
- package/dist/cli/commands/learn/index.js.map +1 -1
- package/dist/cli/commands/monitor/alerts.d.ts.map +1 -1
- package/dist/cli/commands/monitor/alerts.js +2 -1
- package/dist/cli/commands/monitor/alerts.js.map +1 -1
- package/dist/cli/commands/patterns/index.d.ts.map +1 -1
- package/dist/cli/commands/patterns/index.js +20 -19
- package/dist/cli/commands/patterns/index.js.map +1 -1
- package/dist/cli/commands/quality/decision.d.ts.map +1 -1
- package/dist/cli/commands/quality/decision.js +9 -7
- package/dist/cli/commands/quality/decision.js.map +1 -1
- package/dist/cli/commands/quality/gate.d.ts.map +1 -1
- package/dist/cli/commands/quality/gate.js +10 -8
- package/dist/cli/commands/quality/gate.js.map +1 -1
- package/dist/cli/commands/quality/policy.d.ts.map +1 -1
- package/dist/cli/commands/quality/policy.js +10 -8
- package/dist/cli/commands/quality/policy.js.map +1 -1
- package/dist/cli/commands/quality/risk.d.ts.map +1 -1
- package/dist/cli/commands/quality/risk.js +5 -3
- package/dist/cli/commands/quality/risk.js.map +1 -1
- package/dist/cli/commands/quality/validate.d.ts.map +1 -1
- package/dist/cli/commands/quality/validate.js +10 -8
- package/dist/cli/commands/quality/validate.js.map +1 -1
- package/dist/cli/commands/quantization.d.ts +6 -0
- package/dist/cli/commands/quantization.d.ts.map +1 -0
- package/dist/cli/commands/quantization.js +188 -0
- package/dist/cli/commands/quantization.js.map +1 -0
- package/dist/cli/commands/routing/index.d.ts +0 -6
- package/dist/cli/commands/routing/index.d.ts.map +1 -1
- package/dist/cli/commands/routing/index.js +17 -16
- package/dist/cli/commands/routing/index.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +2 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/skills/index.d.ts +51 -0
- package/dist/cli/commands/skills/index.d.ts.map +1 -0
- package/dist/cli/commands/skills/index.js +365 -0
- package/dist/cli/commands/skills/index.js.map +1 -0
- package/dist/cli/commands/test/debug.d.ts.map +1 -1
- package/dist/cli/commands/test/debug.js +2 -1
- package/dist/cli/commands/test/debug.js.map +1 -1
- package/dist/cli/commands/test/mutate.d.ts.map +1 -1
- package/dist/cli/commands/test/mutate.js +2 -1
- package/dist/cli/commands/test/mutate.js.map +1 -1
- package/dist/cli/commands/test/parallel.d.ts.map +1 -1
- package/dist/cli/commands/test/parallel.js +6 -4
- package/dist/cli/commands/test/parallel.js.map +1 -1
- package/dist/cli/commands/test/profile.d.ts.map +1 -1
- package/dist/cli/commands/test/profile.js +3 -2
- package/dist/cli/commands/test/profile.js.map +1 -1
- package/dist/cli/commands/test/queue.d.ts.map +1 -1
- package/dist/cli/commands/test/queue.js +2 -1
- package/dist/cli/commands/test/queue.js.map +1 -1
- package/dist/cli/commands/test/retry.d.ts.map +1 -1
- package/dist/cli/commands/test/retry.js +6 -4
- package/dist/cli/commands/test/retry.js.map +1 -1
- package/dist/cli/commands/test/trace.d.ts.map +1 -1
- package/dist/cli/commands/test/trace.js +2 -1
- package/dist/cli/commands/test/trace.js.map +1 -1
- package/dist/cli/commands/test/watch.d.ts.map +1 -1
- package/dist/cli/commands/test/watch.js +3 -2
- package/dist/cli/commands/test/watch.js.map +1 -1
- package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
- package/dist/cli/commands/workflow/cancel.js +2 -1
- package/dist/cli/commands/workflow/cancel.js.map +1 -1
- package/dist/cli/index-working.js +9 -8
- package/dist/cli/index-working.js.map +1 -1
- package/dist/cli/index.js +97 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/core/EventBus.d.ts +38 -0
- package/dist/core/EventBus.d.ts.map +1 -1
- package/dist/core/EventBus.js +176 -31
- package/dist/core/EventBus.js.map +1 -1
- package/dist/core/FleetManager.d.ts +35 -1
- package/dist/core/FleetManager.d.ts.map +1 -1
- package/dist/core/FleetManager.js +121 -45
- package/dist/core/FleetManager.js.map +1 -1
- package/dist/core/MemoryManager.d.ts +19 -1
- package/dist/core/MemoryManager.d.ts.map +1 -1
- package/dist/core/MemoryManager.js +25 -1
- package/dist/core/MemoryManager.js.map +1 -1
- package/dist/core/coordination/OODACoordination.d.ts.map +1 -1
- package/dist/core/coordination/OODACoordination.js +2 -1
- package/dist/core/coordination/OODACoordination.js.map +1 -1
- package/dist/core/embeddings/EmbeddingCache.d.ts +134 -0
- package/dist/core/embeddings/EmbeddingCache.d.ts.map +1 -0
- package/dist/core/embeddings/EmbeddingCache.js +239 -0
- package/dist/core/embeddings/EmbeddingCache.js.map +1 -0
- package/dist/core/embeddings/EmbeddingGenerator.d.ts +224 -0
- package/dist/core/embeddings/EmbeddingGenerator.d.ts.map +1 -0
- package/dist/core/embeddings/EmbeddingGenerator.js +459 -0
- package/dist/core/embeddings/EmbeddingGenerator.js.map +1 -0
- package/dist/core/embeddings/index.d.ts +15 -0
- package/dist/core/embeddings/index.d.ts.map +1 -0
- package/dist/core/embeddings/index.js +22 -0
- package/dist/core/embeddings/index.js.map +1 -0
- package/dist/core/memory/AgentDBIntegration.d.ts +35 -0
- package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -0
- package/dist/core/memory/AgentDBIntegration.js +75 -0
- package/dist/core/memory/AgentDBIntegration.js.map +1 -0
- package/dist/core/memory/AgentDBManager.d.ts +200 -0
- package/dist/core/memory/AgentDBManager.d.ts.map +1 -0
- package/dist/core/memory/AgentDBManager.js +246 -0
- package/dist/core/memory/AgentDBManager.js.map +1 -0
- package/dist/core/memory/AgentDBService.d.ts +160 -0
- package/dist/core/memory/AgentDBService.d.ts.map +1 -0
- package/dist/core/memory/AgentDBService.js +450 -0
- package/dist/core/memory/AgentDBService.js.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts +51 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.js +231 -0
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -0
- package/dist/core/memory/ReasoningBankAdapter.d.ts +58 -0
- package/dist/core/memory/ReasoningBankAdapter.d.ts.map +1 -0
- package/dist/core/memory/ReasoningBankAdapter.js +77 -0
- package/dist/core/memory/ReasoningBankAdapter.js.map +1 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts +75 -3
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +240 -55
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/index.d.ts +4 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +9 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/neural/NeuralTrainer.d.ts +137 -0
- package/dist/core/neural/NeuralTrainer.d.ts.map +1 -0
- package/dist/core/neural/NeuralTrainer.js +544 -0
- package/dist/core/neural/NeuralTrainer.js.map +1 -0
- package/dist/core/neural/index.d.ts +8 -0
- package/dist/core/neural/index.d.ts.map +1 -0
- package/dist/core/neural/index.js +24 -0
- package/dist/core/neural/index.js.map +1 -0
- package/dist/core/neural/types.d.ts +216 -0
- package/dist/core/neural/types.d.ts.map +1 -0
- package/dist/core/neural/types.js +8 -0
- package/dist/core/neural/types.js.map +1 -0
- package/dist/core/quantization/QuantizationManager.d.ts +83 -0
- package/dist/core/quantization/QuantizationManager.d.ts.map +1 -0
- package/dist/core/quantization/QuantizationManager.js +264 -0
- package/dist/core/quantization/QuantizationManager.js.map +1 -0
- package/dist/core/quantization/index.d.ts +5 -0
- package/dist/core/quantization/index.d.ts.map +1 -0
- package/dist/core/quantization/index.js +9 -0
- package/dist/core/quantization/index.js.map +1 -0
- package/dist/core/security/CertificateValidator.d.ts +130 -0
- package/dist/core/security/CertificateValidator.d.ts.map +1 -0
- package/dist/core/security/CertificateValidator.js +376 -0
- package/dist/core/security/CertificateValidator.js.map +1 -0
- package/dist/core/transport/QUICTransport.d.ts +62 -0
- package/dist/core/transport/QUICTransport.d.ts.map +1 -0
- package/dist/core/transport/QUICTransport.js +381 -0
- package/dist/core/transport/QUICTransport.js.map +1 -0
- package/dist/core/transport/SecureQUICTransport.d.ts +71 -0
- package/dist/core/transport/SecureQUICTransport.d.ts.map +1 -0
- package/dist/core/transport/SecureQUICTransport.js +253 -0
- package/dist/core/transport/SecureQUICTransport.js.map +1 -0
- package/dist/learning/AdvancedFeatureExtractor.d.ts +123 -0
- package/dist/learning/AdvancedFeatureExtractor.d.ts.map +1 -0
- package/dist/learning/AdvancedFeatureExtractor.js +423 -0
- package/dist/learning/AdvancedFeatureExtractor.js.map +1 -0
- package/dist/learning/FlakyPredictionModel.d.ts +11 -1
- package/dist/learning/FlakyPredictionModel.d.ts.map +1 -1
- package/dist/learning/FlakyPredictionModel.js +82 -35
- package/dist/learning/FlakyPredictionModel.js.map +1 -1
- package/dist/learning/FlakyTestDetector.d.ts +9 -0
- package/dist/learning/FlakyTestDetector.d.ts.map +1 -1
- package/dist/learning/FlakyTestDetector.js +28 -6
- package/dist/learning/FlakyTestDetector.js.map +1 -1
- package/dist/learning/ImprovementLoop.d.ts +16 -2
- package/dist/learning/ImprovementLoop.d.ts.map +1 -1
- package/dist/learning/ImprovementLoop.js +67 -8
- package/dist/learning/ImprovementLoop.js.map +1 -1
- package/dist/learning/ImprovementWorker.d.ts +83 -0
- package/dist/learning/ImprovementWorker.d.ts.map +1 -0
- package/dist/learning/ImprovementWorker.js +164 -0
- package/dist/learning/ImprovementWorker.js.map +1 -0
- package/dist/learning/NeuralPatternMatcher.d.ts +184 -0
- package/dist/learning/NeuralPatternMatcher.d.ts.map +1 -0
- package/dist/learning/NeuralPatternMatcher.js +702 -0
- package/dist/learning/NeuralPatternMatcher.js.map +1 -0
- package/dist/learning/NeuralTrainer.d.ts +209 -0
- package/dist/learning/NeuralTrainer.d.ts.map +1 -0
- package/dist/learning/NeuralTrainer.js +478 -0
- package/dist/learning/NeuralTrainer.js.map +1 -0
- package/dist/learning/index.d.ts +13 -7
- package/dist/learning/index.d.ts.map +1 -1
- package/dist/learning/index.js +27 -11
- package/dist/learning/index.js.map +1 -1
- package/dist/learning/types.d.ts +1 -0
- package/dist/learning/types.d.ts.map +1 -1
- package/dist/learning/types.js +16 -0
- package/dist/learning/types.js.map +1 -1
- package/dist/mcp/MCPToolRegistry.d.ts +34 -0
- package/dist/mcp/MCPToolRegistry.d.ts.map +1 -0
- package/dist/mcp/MCPToolRegistry.js +48 -0
- package/dist/mcp/MCPToolRegistry.js.map +1 -0
- package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts +3 -3
- package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/advanced/mutation-test-execute.js +5 -4
- package/dist/mcp/handlers/advanced/mutation-test-execute.js.map +1 -1
- package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -1
- package/dist/mcp/handlers/agent-spawn.js +2 -1
- package/dist/mcp/handlers/agent-spawn.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js +9 -8
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js +6 -5
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js.map +1 -1
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js +5 -4
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js +8 -7
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js +7 -6
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js +18 -21
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js.map +1 -1
- package/dist/mcp/handlers/base-handler.d.ts.map +1 -1
- package/dist/mcp/handlers/base-handler.js +2 -9
- package/dist/mcp/handlers/base-handler.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js +4 -3
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js +6 -5
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -1
- package/dist/mcp/handlers/coordination/event-emit.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/event-emit.js +2 -1
- package/dist/mcp/handlers/coordination/event-emit.js.map +1 -1
- package/dist/mcp/handlers/coordination/event-subscribe.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/event-subscribe.js +2 -1
- package/dist/mcp/handlers/coordination/event-subscribe.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-create.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-create.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-create.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-execute.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-execute.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-resume.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-resume.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-resume.js.map +1 -1
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-init.js +2 -1
- package/dist/mcp/handlers/fleet-init.js.map +1 -1
- package/dist/mcp/handlers/fleet-status.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-status.js +31 -30
- package/dist/mcp/handlers/fleet-status.js.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.d.ts.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.js +3 -2
- package/dist/mcp/handlers/integration/dependency-check.js.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js +2 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/optimize-tests.d.ts.map +1 -1
- package/dist/mcp/handlers/optimize-tests.js +33 -32
- package/dist/mcp/handlers/optimize-tests.js.map +1 -1
- package/dist/mcp/handlers/predict-defects.d.ts.map +1 -1
- package/dist/mcp/handlers/predict-defects.js +46 -45
- package/dist/mcp/handlers/predict-defects.js.map +1 -1
- package/dist/mcp/handlers/prediction/deployment-readiness-check.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/deployment-readiness-check.js +24 -23
- package/dist/mcp/handlers/prediction/deployment-readiness-check.js.map +1 -1
- package/dist/mcp/handlers/prediction/predict-defects-ai.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/predict-defects-ai.js +10 -9
- package/dist/mcp/handlers/prediction/predict-defects-ai.js.map +1 -1
- package/dist/mcp/handlers/prediction/regression-risk-analyze.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/regression-risk-analyze.js +10 -9
- package/dist/mcp/handlers/prediction/regression-risk-analyze.js.map +1 -1
- package/dist/mcp/handlers/prediction/visual-test-regression.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/visual-test-regression.js +7 -6
- package/dist/mcp/handlers/prediction/visual-test-regression.js.map +1 -1
- package/dist/mcp/handlers/quality-analyze.d.ts.map +1 -1
- package/dist/mcp/handlers/quality-analyze.js +53 -52
- package/dist/mcp/handlers/quality-analyze.js.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.js +19 -18
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/test/test-execute-parallel.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-execute-parallel.js +7 -6
- package/dist/mcp/handlers/test/test-execute-parallel.js.map +1 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.js +2 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.js.map +1 -1
- package/dist/mcp/handlers/test/test-optimize-sublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-optimize-sublinear.js +3 -2
- package/dist/mcp/handlers/test/test-optimize-sublinear.js.map +1 -1
- package/dist/mcp/handlers/test-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/test-execute.js +11 -10
- package/dist/mcp/handlers/test-execute.js.map +1 -1
- package/dist/mcp/handlers/test-generate.d.ts.map +1 -1
- package/dist/mcp/handlers/test-generate.js +4 -3
- package/dist/mcp/handlers/test-generate.js.map +1 -1
- package/dist/mcp/server.d.ts +4 -4
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +9 -2
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.d.ts.map +1 -1
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js +10 -9
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js.map +1 -1
- package/dist/mcp/streaming/StreamingMCPTool.d.ts.map +1 -1
- package/dist/mcp/streaming/StreamingMCPTool.js +2 -1
- package/dist/mcp/streaming/StreamingMCPTool.js.map +1 -1
- package/dist/mcp/streaming/TestExecuteStreamHandler.d.ts.map +1 -1
- package/dist/mcp/streaming/TestExecuteStreamHandler.js +6 -5
- package/dist/mcp/streaming/TestExecuteStreamHandler.js.map +1 -1
- package/dist/reasoning/TestTemplateCreator.d.ts +10 -2
- package/dist/reasoning/TestTemplateCreator.d.ts.map +1 -1
- package/dist/reasoning/TestTemplateCreator.js +81 -21
- package/dist/reasoning/TestTemplateCreator.js.map +1 -1
- package/dist/transport/QUICTransport.d.ts +340 -0
- package/dist/transport/QUICTransport.d.ts.map +1 -0
- package/dist/transport/QUICTransport.js +814 -0
- package/dist/transport/QUICTransport.js.map +1 -0
- package/dist/transport/UDPTransport.d.ts +348 -0
- package/dist/transport/UDPTransport.d.ts.map +1 -0
- package/dist/transport/UDPTransport.js +820 -0
- package/dist/transport/UDPTransport.js.map +1 -0
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/index.d.ts +37 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/pattern.types.d.ts +39 -3
- package/dist/types/pattern.types.d.ts.map +1 -1
- package/dist/types/quic.d.ts +339 -0
- package/dist/types/quic.d.ts.map +1 -0
- package/dist/types/quic.js +48 -0
- package/dist/types/quic.js.map +1 -0
- package/dist/utils/Config.js +3 -3
- package/dist/utils/Config.js.map +1 -1
- package/dist/utils/Database.d.ts +14 -0
- package/dist/utils/Database.d.ts.map +1 -1
- package/dist/utils/Database.js +51 -4
- package/dist/utils/Database.js.map +1 -1
- package/dist/utils/Logger.d.ts.map +1 -1
- package/dist/utils/Logger.js +111 -26
- package/dist/utils/Logger.js.map +1 -1
- package/dist/utils/ProcessExit.d.ts +23 -0
- package/dist/utils/ProcessExit.d.ts.map +1 -0
- package/dist/utils/ProcessExit.js +40 -0
- package/dist/utils/ProcessExit.js.map +1 -0
- package/dist/utils/SecureRandom.d.ts +171 -0
- package/dist/utils/SecureRandom.d.ts.map +1 -0
- package/dist/utils/SecureRandom.js +229 -0
- package/dist/utils/SecureRandom.js.map +1 -0
- package/dist/utils/SecureUrlValidator.d.ts +167 -0
- package/dist/utils/SecureUrlValidator.d.ts.map +1 -0
- package/dist/utils/SecureUrlValidator.js +306 -0
- package/dist/utils/SecureUrlValidator.js.map +1 -0
- package/dist/utils/SecureValidation.d.ts +131 -0
- package/dist/utils/SecureValidation.d.ts.map +1 -0
- package/dist/utils/SecureValidation.js +265 -0
- package/dist/utils/SecureValidation.js.map +1 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +5 -4
- package/dist/utils/validation.js.map +1 -1
- package/package.json +31 -8
|
@@ -38,9 +38,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.SwarmMemoryManager = void 0;
|
|
40
40
|
const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
|
|
41
|
+
const SecureRandom_js_1 = require("../../utils/SecureRandom.js");
|
|
41
42
|
const path = __importStar(require("path"));
|
|
42
43
|
const fs = __importStar(require("fs-extra"));
|
|
43
44
|
const AccessControl_1 = require("./AccessControl");
|
|
45
|
+
const AgentDBManager_1 = require("./AgentDBManager");
|
|
44
46
|
/**
|
|
45
47
|
* SwarmMemoryManager - Manages persistent memory for agent swarm coordination
|
|
46
48
|
*
|
|
@@ -65,6 +67,7 @@ class SwarmMemoryManager {
|
|
|
65
67
|
constructor(dbPath = ':memory:') {
|
|
66
68
|
this.db = null;
|
|
67
69
|
this.initialized = false;
|
|
70
|
+
this.agentDBManager = null;
|
|
68
71
|
// TTL policy constants (in seconds)
|
|
69
72
|
this.TTL_POLICY = {
|
|
70
73
|
artifacts: 0, // Never expire
|
|
@@ -77,6 +80,7 @@ class SwarmMemoryManager {
|
|
|
77
80
|
this.dbPath = dbPath;
|
|
78
81
|
this.accessControl = new AccessControl_1.AccessControl();
|
|
79
82
|
this.aclCache = new Map();
|
|
83
|
+
this.lastModifiedTimestamps = new Map();
|
|
80
84
|
}
|
|
81
85
|
run(sql, params = []) {
|
|
82
86
|
if (!this.db) {
|
|
@@ -84,13 +88,13 @@ class SwarmMemoryManager {
|
|
|
84
88
|
}
|
|
85
89
|
this.db.prepare(sql).run(...params);
|
|
86
90
|
}
|
|
87
|
-
|
|
91
|
+
queryOne(sql, params = []) {
|
|
88
92
|
if (!this.db) {
|
|
89
93
|
throw new Error('Database not initialized');
|
|
90
94
|
}
|
|
91
95
|
return this.db.prepare(sql).get(...params);
|
|
92
96
|
}
|
|
93
|
-
|
|
97
|
+
queryAll(sql, params = []) {
|
|
94
98
|
if (!this.db) {
|
|
95
99
|
throw new Error('Database not initialized');
|
|
96
100
|
}
|
|
@@ -100,11 +104,16 @@ class SwarmMemoryManager {
|
|
|
100
104
|
if (this.initialized) {
|
|
101
105
|
return;
|
|
102
106
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
try {
|
|
108
|
+
// Ensure directory exists for file-based DB
|
|
109
|
+
if (this.dbPath !== ':memory:') {
|
|
110
|
+
await fs.ensureDir(path.dirname(this.dbPath));
|
|
111
|
+
}
|
|
112
|
+
this.db = new better_sqlite3_1.default(this.dbPath);
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
throw new Error(`Failed to create database connection: ${error}`);
|
|
106
116
|
}
|
|
107
|
-
this.db = new better_sqlite3_1.default(this.dbPath);
|
|
108
117
|
// Create memory entries table with access control fields
|
|
109
118
|
await this.run(`
|
|
110
119
|
CREATE TABLE IF NOT EXISTS memory_entries (
|
|
@@ -312,8 +321,12 @@ class SwarmMemoryManager {
|
|
|
312
321
|
this.initialized = true;
|
|
313
322
|
}
|
|
314
323
|
async store(key, value, options = {}) {
|
|
324
|
+
// Auto-initialize if not initialized
|
|
325
|
+
if (!this.initialized) {
|
|
326
|
+
await this.initialize();
|
|
327
|
+
}
|
|
315
328
|
if (!this.db) {
|
|
316
|
-
throw new Error('Memory manager not initialized');
|
|
329
|
+
throw new Error('Memory manager not initialized. Call initialize() first.');
|
|
317
330
|
}
|
|
318
331
|
const partition = options.partition || 'default';
|
|
319
332
|
const owner = options.owner || 'system';
|
|
@@ -322,7 +335,7 @@ class SwarmMemoryManager {
|
|
|
322
335
|
const expiresAt = options.ttl ? createdAt + (options.ttl * 1000) : null;
|
|
323
336
|
const metadata = options.metadata ? JSON.stringify(options.metadata) : null;
|
|
324
337
|
// Check write permission if updating existing entry
|
|
325
|
-
const existing = await this.
|
|
338
|
+
const existing = await this.queryOne(`SELECT owner, access_level, team_id, swarm_id FROM memory_entries WHERE key = ? AND partition = ?`, [key, partition]);
|
|
326
339
|
if (existing && options.owner) {
|
|
327
340
|
// Verify write permission
|
|
328
341
|
const permCheck = this.accessControl.checkPermission({
|
|
@@ -353,17 +366,39 @@ class SwarmMemoryManager {
|
|
|
353
366
|
options.teamId || null,
|
|
354
367
|
options.swarmId || null
|
|
355
368
|
]);
|
|
369
|
+
// Track modification for QUIC sync
|
|
370
|
+
const entryKey = `${partition}:${key}`;
|
|
371
|
+
this.lastModifiedTimestamps.set(entryKey, createdAt);
|
|
356
372
|
}
|
|
357
373
|
/**
|
|
358
374
|
* Alias for store() method to maintain compatibility with MemoryStore interface
|
|
359
375
|
* Used by VerificationHookManager and other components
|
|
360
376
|
*/
|
|
361
377
|
async set(key, value, options = {}) {
|
|
378
|
+
// Handle legacy API: set(key, value, partition)
|
|
379
|
+
if (typeof options === 'string') {
|
|
380
|
+
return this.store(key, value, { partition: options });
|
|
381
|
+
}
|
|
362
382
|
return this.store(key, value, options);
|
|
363
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* Alias for retrieve() method to maintain compatibility
|
|
386
|
+
* Supports both options object and partition string
|
|
387
|
+
*/
|
|
388
|
+
async get(key, options = {}) {
|
|
389
|
+
// Handle legacy API: get(key, partition)
|
|
390
|
+
if (typeof options === 'string') {
|
|
391
|
+
return this.retrieve(key, { partition: options });
|
|
392
|
+
}
|
|
393
|
+
return this.retrieve(key, options);
|
|
394
|
+
}
|
|
364
395
|
async retrieve(key, options = {}) {
|
|
396
|
+
// Auto-initialize if not initialized
|
|
397
|
+
if (!this.initialized) {
|
|
398
|
+
await this.initialize();
|
|
399
|
+
}
|
|
365
400
|
if (!this.db) {
|
|
366
|
-
throw new Error('Memory manager not initialized');
|
|
401
|
+
throw new Error('Memory manager not initialized. Call initialize() first.');
|
|
367
402
|
}
|
|
368
403
|
const partition = options.partition || 'default';
|
|
369
404
|
const now = Date.now();
|
|
@@ -374,7 +409,7 @@ class SwarmMemoryManager {
|
|
|
374
409
|
query += ` AND (expires_at IS NULL OR expires_at > ?)`;
|
|
375
410
|
params.push(now);
|
|
376
411
|
}
|
|
377
|
-
const row = await this.
|
|
412
|
+
const row = await this.queryOne(query, params);
|
|
378
413
|
if (!row) {
|
|
379
414
|
return null;
|
|
380
415
|
}
|
|
@@ -411,7 +446,7 @@ class SwarmMemoryManager {
|
|
|
411
446
|
query += ` AND (expires_at IS NULL OR expires_at > ?)`;
|
|
412
447
|
params.push(now);
|
|
413
448
|
}
|
|
414
|
-
const rows = await this.
|
|
449
|
+
const rows = await this.queryAll(query, params);
|
|
415
450
|
// Filter by access control if agentId provided
|
|
416
451
|
const filteredRows = options.agentId
|
|
417
452
|
? rows.filter((row) => {
|
|
@@ -447,7 +482,7 @@ class SwarmMemoryManager {
|
|
|
447
482
|
}
|
|
448
483
|
// Check delete permission if agentId provided
|
|
449
484
|
if (options.agentId) {
|
|
450
|
-
const row = await this.
|
|
485
|
+
const row = await this.queryOne(`SELECT owner, access_level, team_id, swarm_id FROM memory_entries WHERE key = ? AND partition = ?`, [key, partition]);
|
|
451
486
|
if (row) {
|
|
452
487
|
const permCheck = this.accessControl.checkPermission({
|
|
453
488
|
agentId: options.agentId,
|
|
@@ -490,7 +525,7 @@ class SwarmMemoryManager {
|
|
|
490
525
|
throw new Error('Memory manager not initialized');
|
|
491
526
|
}
|
|
492
527
|
const now = Date.now();
|
|
493
|
-
const rows = await this.
|
|
528
|
+
const rows = await this.queryAll(`SELECT key, value, created_at, expires_at
|
|
494
529
|
FROM hints
|
|
495
530
|
WHERE key LIKE ? AND (expires_at IS NULL OR expires_at > ?)
|
|
496
531
|
ORDER BY created_at DESC`, [pattern, now]);
|
|
@@ -529,22 +564,22 @@ class SwarmMemoryManager {
|
|
|
529
564
|
if (!this.db) {
|
|
530
565
|
throw new Error('Memory manager not initialized');
|
|
531
566
|
}
|
|
532
|
-
const entriesCount = await this.
|
|
533
|
-
const hintsCount = await this.
|
|
534
|
-
const eventsCount = await this.
|
|
535
|
-
const workflowsCount = await this.
|
|
536
|
-
const patternsCount = await this.
|
|
537
|
-
const consensusCount = await this.
|
|
538
|
-
const metricsCount = await this.
|
|
539
|
-
const artifactsCount = await this.
|
|
540
|
-
const sessionsCount = await this.
|
|
541
|
-
const agentsCount = await this.
|
|
542
|
-
const goapGoalsCount = await this.
|
|
543
|
-
const goapActionsCount = await this.
|
|
544
|
-
const goapPlansCount = await this.
|
|
545
|
-
const oodaCyclesCount = await this.
|
|
546
|
-
const partitionsResult = await this.
|
|
547
|
-
const accessLevelsResult = await this.
|
|
567
|
+
const entriesCount = await this.queryOne(`SELECT COUNT(*) as count FROM memory_entries`);
|
|
568
|
+
const hintsCount = await this.queryOne(`SELECT COUNT(*) as count FROM hints`);
|
|
569
|
+
const eventsCount = await this.queryOne(`SELECT COUNT(*) as count FROM events`);
|
|
570
|
+
const workflowsCount = await this.queryOne(`SELECT COUNT(*) as count FROM workflow_state`);
|
|
571
|
+
const patternsCount = await this.queryOne(`SELECT COUNT(*) as count FROM patterns`);
|
|
572
|
+
const consensusCount = await this.queryOne(`SELECT COUNT(*) as count FROM consensus_state`);
|
|
573
|
+
const metricsCount = await this.queryOne(`SELECT COUNT(*) as count FROM performance_metrics`);
|
|
574
|
+
const artifactsCount = await this.queryOne(`SELECT COUNT(*) as count FROM artifacts`);
|
|
575
|
+
const sessionsCount = await this.queryOne(`SELECT COUNT(*) as count FROM sessions`);
|
|
576
|
+
const agentsCount = await this.queryOne(`SELECT COUNT(*) as count FROM agent_registry`);
|
|
577
|
+
const goapGoalsCount = await this.queryOne(`SELECT COUNT(*) as count FROM goap_goals`);
|
|
578
|
+
const goapActionsCount = await this.queryOne(`SELECT COUNT(*) as count FROM goap_actions`);
|
|
579
|
+
const goapPlansCount = await this.queryOne(`SELECT COUNT(*) as count FROM goap_plans`);
|
|
580
|
+
const oodaCyclesCount = await this.queryOne(`SELECT COUNT(*) as count FROM ooda_cycles`);
|
|
581
|
+
const partitionsResult = await this.queryAll(`SELECT DISTINCT partition FROM memory_entries`);
|
|
582
|
+
const accessLevelsResult = await this.queryAll(`SELECT access_level, COUNT(*) as count FROM memory_entries GROUP BY access_level`);
|
|
548
583
|
const accessLevels = {};
|
|
549
584
|
accessLevelsResult.forEach(row => {
|
|
550
585
|
accessLevels[row.access_level] = row.count;
|
|
@@ -575,7 +610,7 @@ class SwarmMemoryManager {
|
|
|
575
610
|
if (!this.db) {
|
|
576
611
|
throw new Error('Memory manager not initialized');
|
|
577
612
|
}
|
|
578
|
-
const id = event.id || `event-${Date.now()}-${
|
|
613
|
+
const id = event.id || `event-${Date.now()}-${SecureRandom_js_1.SecureRandom.generateId(5)}`;
|
|
579
614
|
const timestamp = event.timestamp || Date.now();
|
|
580
615
|
const ttl = event.ttl !== undefined ? event.ttl : this.TTL_POLICY.events;
|
|
581
616
|
const expiresAt = ttl > 0 ? timestamp + (ttl * 1000) : null;
|
|
@@ -588,7 +623,7 @@ class SwarmMemoryManager {
|
|
|
588
623
|
throw new Error('Memory manager not initialized');
|
|
589
624
|
}
|
|
590
625
|
const now = Date.now();
|
|
591
|
-
const rows = await this.
|
|
626
|
+
const rows = await this.queryAll(`SELECT id, type, payload, timestamp, source, ttl
|
|
592
627
|
FROM events
|
|
593
628
|
WHERE type = ? AND (expires_at IS NULL OR expires_at > ?)
|
|
594
629
|
ORDER BY timestamp DESC`, [type, now]);
|
|
@@ -606,7 +641,7 @@ class SwarmMemoryManager {
|
|
|
606
641
|
throw new Error('Memory manager not initialized');
|
|
607
642
|
}
|
|
608
643
|
const now = Date.now();
|
|
609
|
-
const rows = await this.
|
|
644
|
+
const rows = await this.queryAll(`SELECT id, type, payload, timestamp, source, ttl
|
|
610
645
|
FROM events
|
|
611
646
|
WHERE source = ? AND (expires_at IS NULL OR expires_at > ?)
|
|
612
647
|
ORDER BY timestamp DESC`, [source, now]);
|
|
@@ -635,7 +670,7 @@ class SwarmMemoryManager {
|
|
|
635
670
|
if (!this.db) {
|
|
636
671
|
throw new Error('Memory manager not initialized');
|
|
637
672
|
}
|
|
638
|
-
const row = await this.
|
|
673
|
+
const row = await this.queryOne(`SELECT id, step, status, checkpoint, sha, ttl, created_at, updated_at
|
|
639
674
|
FROM workflow_state
|
|
640
675
|
WHERE id = ?`, [id]);
|
|
641
676
|
if (!row) {
|
|
@@ -673,7 +708,7 @@ class SwarmMemoryManager {
|
|
|
673
708
|
if (!this.db) {
|
|
674
709
|
throw new Error('Memory manager not initialized');
|
|
675
710
|
}
|
|
676
|
-
const rows = await this.
|
|
711
|
+
const rows = await this.queryAll(`SELECT id, step, status, checkpoint, sha, ttl, created_at, updated_at
|
|
677
712
|
FROM workflow_state
|
|
678
713
|
WHERE status = ?`, [status]);
|
|
679
714
|
return rows.map((row) => ({
|
|
@@ -694,7 +729,7 @@ class SwarmMemoryManager {
|
|
|
694
729
|
if (!this.db) {
|
|
695
730
|
throw new Error('Memory manager not initialized');
|
|
696
731
|
}
|
|
697
|
-
const id = pattern.id || `pattern-${Date.now()}-${
|
|
732
|
+
const id = pattern.id || `pattern-${Date.now()}-${SecureRandom_js_1.SecureRandom.generateId(5)}`;
|
|
698
733
|
const now = Date.now();
|
|
699
734
|
const ttl = pattern.ttl !== undefined ? pattern.ttl : this.TTL_POLICY.patterns;
|
|
700
735
|
const expiresAt = ttl > 0 ? now + (ttl * 1000) : null;
|
|
@@ -716,7 +751,7 @@ class SwarmMemoryManager {
|
|
|
716
751
|
throw new Error('Memory manager not initialized');
|
|
717
752
|
}
|
|
718
753
|
const now = Date.now();
|
|
719
|
-
const row = await this.
|
|
754
|
+
const row = await this.queryOne(`SELECT id, pattern, confidence, usage_count, metadata, ttl, created_at
|
|
720
755
|
FROM patterns
|
|
721
756
|
WHERE pattern = ? AND (expires_at IS NULL OR expires_at > ?)`, [patternName, now]);
|
|
722
757
|
if (!row) {
|
|
@@ -745,7 +780,7 @@ class SwarmMemoryManager {
|
|
|
745
780
|
throw new Error('Memory manager not initialized');
|
|
746
781
|
}
|
|
747
782
|
const now = Date.now();
|
|
748
|
-
const rows = await this.
|
|
783
|
+
const rows = await this.queryAll(`SELECT id, pattern, confidence, usage_count, metadata, ttl, created_at
|
|
749
784
|
FROM patterns
|
|
750
785
|
WHERE confidence >= ? AND (expires_at IS NULL OR expires_at > ?)
|
|
751
786
|
ORDER BY confidence DESC`, [threshold, now]);
|
|
@@ -788,7 +823,7 @@ class SwarmMemoryManager {
|
|
|
788
823
|
throw new Error('Memory manager not initialized');
|
|
789
824
|
}
|
|
790
825
|
const now = Date.now();
|
|
791
|
-
const row = await this.
|
|
826
|
+
const row = await this.queryOne(`SELECT id, decision, proposer, votes, quorum, status, version, ttl, created_at
|
|
792
827
|
FROM consensus_state
|
|
793
828
|
WHERE id = ? AND (expires_at IS NULL OR expires_at > ?)`, [id, now]);
|
|
794
829
|
if (!row) {
|
|
@@ -828,7 +863,7 @@ class SwarmMemoryManager {
|
|
|
828
863
|
throw new Error('Memory manager not initialized');
|
|
829
864
|
}
|
|
830
865
|
const now = Date.now();
|
|
831
|
-
const rows = await this.
|
|
866
|
+
const rows = await this.queryAll(`SELECT id, decision, proposer, votes, quorum, status, version, ttl, created_at
|
|
832
867
|
FROM consensus_state
|
|
833
868
|
WHERE status = ? AND (expires_at IS NULL OR expires_at > ?)`, [status, now]);
|
|
834
869
|
return rows.map((row) => ({
|
|
@@ -850,7 +885,7 @@ class SwarmMemoryManager {
|
|
|
850
885
|
if (!this.db) {
|
|
851
886
|
throw new Error('Memory manager not initialized');
|
|
852
887
|
}
|
|
853
|
-
const id = metric.id || `metric-${Date.now()}-${
|
|
888
|
+
const id = metric.id || `metric-${Date.now()}-${SecureRandom_js_1.SecureRandom.generateId(5)}`;
|
|
854
889
|
const timestamp = metric.timestamp || Date.now();
|
|
855
890
|
await this.run(`INSERT INTO performance_metrics (id, metric, value, unit, timestamp, agent_id)
|
|
856
891
|
VALUES (?, ?, ?, ?, ?, ?)`, [id, metric.metric, metric.value, metric.unit, timestamp, metric.agentId || null]);
|
|
@@ -860,7 +895,7 @@ class SwarmMemoryManager {
|
|
|
860
895
|
if (!this.db) {
|
|
861
896
|
throw new Error('Memory manager not initialized');
|
|
862
897
|
}
|
|
863
|
-
const rows = await this.
|
|
898
|
+
const rows = await this.queryAll(`SELECT id, metric, value, unit, timestamp, agent_id
|
|
864
899
|
FROM performance_metrics
|
|
865
900
|
WHERE metric = ?
|
|
866
901
|
ORDER BY timestamp DESC`, [metricName]);
|
|
@@ -877,7 +912,7 @@ class SwarmMemoryManager {
|
|
|
877
912
|
if (!this.db) {
|
|
878
913
|
throw new Error('Memory manager not initialized');
|
|
879
914
|
}
|
|
880
|
-
const rows = await this.
|
|
915
|
+
const rows = await this.queryAll(`SELECT id, metric, value, unit, timestamp, agent_id
|
|
881
916
|
FROM performance_metrics
|
|
882
917
|
WHERE agent_id = ?
|
|
883
918
|
ORDER BY timestamp DESC`, [agentId]);
|
|
@@ -894,7 +929,7 @@ class SwarmMemoryManager {
|
|
|
894
929
|
if (!this.db) {
|
|
895
930
|
throw new Error('Memory manager not initialized');
|
|
896
931
|
}
|
|
897
|
-
const row = await this.
|
|
932
|
+
const row = await this.queryOne(`SELECT AVG(value) as avg FROM performance_metrics WHERE metric = ?`, [metricName]);
|
|
898
933
|
return row?.avg || 0;
|
|
899
934
|
}
|
|
900
935
|
// ============================================================================
|
|
@@ -922,7 +957,7 @@ class SwarmMemoryManager {
|
|
|
922
957
|
if (!this.db) {
|
|
923
958
|
throw new Error('Memory manager not initialized');
|
|
924
959
|
}
|
|
925
|
-
const row = await this.
|
|
960
|
+
const row = await this.queryOne(`SELECT id, kind, path, sha256, tags, metadata, ttl, created_at
|
|
926
961
|
FROM artifacts
|
|
927
962
|
WHERE id = ?`, [id]);
|
|
928
963
|
if (!row) {
|
|
@@ -943,7 +978,7 @@ class SwarmMemoryManager {
|
|
|
943
978
|
if (!this.db) {
|
|
944
979
|
throw new Error('Memory manager not initialized');
|
|
945
980
|
}
|
|
946
|
-
const rows = await this.
|
|
981
|
+
const rows = await this.queryAll(`SELECT id, kind, path, sha256, tags, metadata, ttl, created_at
|
|
947
982
|
FROM artifacts
|
|
948
983
|
WHERE kind = ?`, [kind]);
|
|
949
984
|
return rows.map((row) => ({
|
|
@@ -961,7 +996,7 @@ class SwarmMemoryManager {
|
|
|
961
996
|
if (!this.db) {
|
|
962
997
|
throw new Error('Memory manager not initialized');
|
|
963
998
|
}
|
|
964
|
-
const rows = await this.
|
|
999
|
+
const rows = await this.queryAll(`SELECT id, kind, path, sha256, tags, metadata, ttl, created_at
|
|
965
1000
|
FROM artifacts
|
|
966
1001
|
WHERE tags LIKE ?`, [`%"${tag}"%`]);
|
|
967
1002
|
return rows.map((row) => ({
|
|
@@ -997,7 +1032,7 @@ class SwarmMemoryManager {
|
|
|
997
1032
|
if (!this.db) {
|
|
998
1033
|
throw new Error('Memory manager not initialized');
|
|
999
1034
|
}
|
|
1000
|
-
const row = await this.
|
|
1035
|
+
const row = await this.queryOne(`SELECT id, mode, state, checkpoints, created_at, last_resumed
|
|
1001
1036
|
FROM sessions
|
|
1002
1037
|
WHERE id = ?`, [id]);
|
|
1003
1038
|
if (!row) {
|
|
@@ -1060,7 +1095,7 @@ class SwarmMemoryManager {
|
|
|
1060
1095
|
if (!this.db) {
|
|
1061
1096
|
throw new Error('Memory manager not initialized');
|
|
1062
1097
|
}
|
|
1063
|
-
const row = await this.
|
|
1098
|
+
const row = await this.queryOne(`SELECT id, type, capabilities, status, performance, created_at, updated_at
|
|
1064
1099
|
FROM agent_registry
|
|
1065
1100
|
WHERE id = ?`, [id]);
|
|
1066
1101
|
if (!row) {
|
|
@@ -1089,7 +1124,7 @@ class SwarmMemoryManager {
|
|
|
1089
1124
|
if (!this.db) {
|
|
1090
1125
|
throw new Error('Memory manager not initialized');
|
|
1091
1126
|
}
|
|
1092
|
-
const rows = await this.
|
|
1127
|
+
const rows = await this.queryAll(`SELECT id, type, capabilities, status, performance, created_at, updated_at
|
|
1093
1128
|
FROM agent_registry
|
|
1094
1129
|
WHERE status = ?`, [status]);
|
|
1095
1130
|
return rows.map((row) => ({
|
|
@@ -1126,7 +1161,7 @@ class SwarmMemoryManager {
|
|
|
1126
1161
|
if (!this.db) {
|
|
1127
1162
|
throw new Error('Memory manager not initialized');
|
|
1128
1163
|
}
|
|
1129
|
-
const row = await this.
|
|
1164
|
+
const row = await this.queryOne(`SELECT id, conditions, cost, priority, created_at
|
|
1130
1165
|
FROM goap_goals
|
|
1131
1166
|
WHERE id = ?`, [id]);
|
|
1132
1167
|
if (!row) {
|
|
@@ -1159,7 +1194,7 @@ class SwarmMemoryManager {
|
|
|
1159
1194
|
if (!this.db) {
|
|
1160
1195
|
throw new Error('Memory manager not initialized');
|
|
1161
1196
|
}
|
|
1162
|
-
const row = await this.
|
|
1197
|
+
const row = await this.queryOne(`SELECT id, preconditions, effects, cost, agent_type, created_at
|
|
1163
1198
|
FROM goap_actions
|
|
1164
1199
|
WHERE id = ?`, [id]);
|
|
1165
1200
|
if (!row) {
|
|
@@ -1186,7 +1221,7 @@ class SwarmMemoryManager {
|
|
|
1186
1221
|
if (!this.db) {
|
|
1187
1222
|
throw new Error('Memory manager not initialized');
|
|
1188
1223
|
}
|
|
1189
|
-
const row = await this.
|
|
1224
|
+
const row = await this.queryOne(`SELECT id, goal_id, sequence, total_cost, created_at
|
|
1190
1225
|
FROM goap_plans
|
|
1191
1226
|
WHERE id = ?`, [id]);
|
|
1192
1227
|
if (!row) {
|
|
@@ -1224,7 +1259,7 @@ class SwarmMemoryManager {
|
|
|
1224
1259
|
if (!this.db) {
|
|
1225
1260
|
throw new Error('Memory manager not initialized');
|
|
1226
1261
|
}
|
|
1227
|
-
const row = await this.
|
|
1262
|
+
const row = await this.queryOne(`SELECT id, phase, observations, orientation, decision, action, timestamp, completed, result
|
|
1228
1263
|
FROM ooda_cycles
|
|
1229
1264
|
WHERE id = ?`, [id]);
|
|
1230
1265
|
if (!row) {
|
|
@@ -1269,7 +1304,7 @@ class SwarmMemoryManager {
|
|
|
1269
1304
|
if (!this.db) {
|
|
1270
1305
|
throw new Error('Memory manager not initialized');
|
|
1271
1306
|
}
|
|
1272
|
-
const rows = await this.
|
|
1307
|
+
const rows = await this.queryAll(`SELECT id, phase, observations, orientation, decision, action, timestamp, completed, result
|
|
1273
1308
|
FROM ooda_cycles
|
|
1274
1309
|
WHERE phase = ?`, [phase]);
|
|
1275
1310
|
return rows.map((row) => ({
|
|
@@ -1320,7 +1355,7 @@ class SwarmMemoryManager {
|
|
|
1320
1355
|
if (this.aclCache.has(resourceId)) {
|
|
1321
1356
|
return this.aclCache.get(resourceId);
|
|
1322
1357
|
}
|
|
1323
|
-
const row = await this.
|
|
1358
|
+
const row = await this.queryOne(`SELECT * FROM memory_acl WHERE resource_id = ?`, [resourceId]);
|
|
1324
1359
|
if (!row) {
|
|
1325
1360
|
return null;
|
|
1326
1361
|
}
|
|
@@ -1399,6 +1434,156 @@ class SwarmMemoryManager {
|
|
|
1399
1434
|
getAccessControl() {
|
|
1400
1435
|
return this.accessControl;
|
|
1401
1436
|
}
|
|
1437
|
+
// ============================================================================
|
|
1438
|
+
// QUIC Integration (Optional, opt-in feature)
|
|
1439
|
+
// ============================================================================
|
|
1440
|
+
/**
|
|
1441
|
+
* Enable AgentDB for distributed memory synchronization
|
|
1442
|
+
*
|
|
1443
|
+
* @param config - AgentDB configuration (optional, uses defaults if not provided)
|
|
1444
|
+
*/
|
|
1445
|
+
async enableAgentDB(config) {
|
|
1446
|
+
if (this.agentDBManager) {
|
|
1447
|
+
throw new Error('AgentDB already enabled');
|
|
1448
|
+
}
|
|
1449
|
+
const fullConfig = {
|
|
1450
|
+
dbPath: config?.dbPath || './data/agentdb',
|
|
1451
|
+
enableQUICSync: config?.enableQUICSync !== false,
|
|
1452
|
+
syncPort: config?.syncPort || 4433,
|
|
1453
|
+
syncPeers: config?.syncPeers || [],
|
|
1454
|
+
enableLearning: config?.enableLearning !== false,
|
|
1455
|
+
enableReasoning: config?.enableReasoning !== false,
|
|
1456
|
+
cacheSize: config?.cacheSize || 1000,
|
|
1457
|
+
quantizationType: config?.quantizationType || 'scalar'
|
|
1458
|
+
};
|
|
1459
|
+
this.agentDBManager = await (0, AgentDBManager_1.createAgentDBManager)(fullConfig);
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Disable AgentDB
|
|
1463
|
+
*/
|
|
1464
|
+
async disableAgentDB() {
|
|
1465
|
+
if (!this.agentDBManager) {
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
try {
|
|
1469
|
+
await this.agentDBManager.close();
|
|
1470
|
+
}
|
|
1471
|
+
finally {
|
|
1472
|
+
this.agentDBManager = null;
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Add peer for QUIC synchronization via AgentDB
|
|
1477
|
+
*
|
|
1478
|
+
* @param address - Peer IP address
|
|
1479
|
+
* @param port - Peer port number
|
|
1480
|
+
* @returns Peer ID
|
|
1481
|
+
*/
|
|
1482
|
+
async addQUICPeer(address, port) {
|
|
1483
|
+
if (!this.agentDBManager) {
|
|
1484
|
+
throw new Error('AgentDB not enabled. Call enableAgentDB() first.');
|
|
1485
|
+
}
|
|
1486
|
+
// AgentDB handles peer management internally via QUIC sync
|
|
1487
|
+
const peerId = `${address}:${port}`;
|
|
1488
|
+
return peerId;
|
|
1489
|
+
}
|
|
1490
|
+
/**
|
|
1491
|
+
* Remove peer from QUIC synchronization
|
|
1492
|
+
*
|
|
1493
|
+
* @param peerId - Peer ID to remove
|
|
1494
|
+
*/
|
|
1495
|
+
async removeQUICPeer(peerId) {
|
|
1496
|
+
if (!this.agentDBManager) {
|
|
1497
|
+
throw new Error('AgentDB not enabled');
|
|
1498
|
+
}
|
|
1499
|
+
// AgentDB handles peer management internally
|
|
1500
|
+
}
|
|
1501
|
+
/**
|
|
1502
|
+
* Get QUIC performance metrics
|
|
1503
|
+
*
|
|
1504
|
+
* @returns Performance metrics or null if not enabled
|
|
1505
|
+
*/
|
|
1506
|
+
getQUICMetrics() {
|
|
1507
|
+
if (!this.agentDBManager) {
|
|
1508
|
+
return null;
|
|
1509
|
+
}
|
|
1510
|
+
// AgentDB provides metrics through different API
|
|
1511
|
+
return null;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Get list of connected QUIC peers
|
|
1515
|
+
*
|
|
1516
|
+
* @returns Array of peer information or empty array if not enabled
|
|
1517
|
+
*/
|
|
1518
|
+
getQUICPeers() {
|
|
1519
|
+
if (!this.agentDBManager) {
|
|
1520
|
+
return [];
|
|
1521
|
+
}
|
|
1522
|
+
// AgentDB handles peer discovery internally
|
|
1523
|
+
return [];
|
|
1524
|
+
}
|
|
1525
|
+
/**
|
|
1526
|
+
* Check if QUIC integration is enabled
|
|
1527
|
+
*
|
|
1528
|
+
* @returns True if AgentDB is enabled with QUIC sync
|
|
1529
|
+
*/
|
|
1530
|
+
isQUICEnabled() {
|
|
1531
|
+
return this.agentDBManager !== null;
|
|
1532
|
+
}
|
|
1533
|
+
/**
|
|
1534
|
+
* Get memory entries modified since timestamp (for QUIC sync)
|
|
1535
|
+
*
|
|
1536
|
+
* @param since - Timestamp to get entries modified after
|
|
1537
|
+
* @param partition - Optional partition filter
|
|
1538
|
+
* @returns Array of modified entries with metadata
|
|
1539
|
+
*/
|
|
1540
|
+
async getModifiedEntries(since, partition) {
|
|
1541
|
+
if (!this.db) {
|
|
1542
|
+
throw new Error('Memory manager not initialized');
|
|
1543
|
+
}
|
|
1544
|
+
let query = `
|
|
1545
|
+
SELECT key, value, partition, created_at, expires_at, owner, access_level, team_id, swarm_id
|
|
1546
|
+
FROM memory_entries
|
|
1547
|
+
WHERE created_at > ?
|
|
1548
|
+
`;
|
|
1549
|
+
const params = [since];
|
|
1550
|
+
if (partition) {
|
|
1551
|
+
query += ` AND partition = ?`;
|
|
1552
|
+
params.push(partition);
|
|
1553
|
+
}
|
|
1554
|
+
query += ` ORDER BY created_at ASC`;
|
|
1555
|
+
const rows = await this.queryAll(query, params);
|
|
1556
|
+
return rows.map((row) => ({
|
|
1557
|
+
key: row.key,
|
|
1558
|
+
value: JSON.parse(row.value),
|
|
1559
|
+
partition: row.partition,
|
|
1560
|
+
createdAt: row.created_at,
|
|
1561
|
+
expiresAt: row.expires_at,
|
|
1562
|
+
owner: row.owner,
|
|
1563
|
+
accessLevel: row.access_level,
|
|
1564
|
+
teamId: row.team_id,
|
|
1565
|
+
swarmId: row.swarm_id
|
|
1566
|
+
}));
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
* Get last modification timestamp for an entry
|
|
1570
|
+
*
|
|
1571
|
+
* @param key - Entry key
|
|
1572
|
+
* @param partition - Entry partition
|
|
1573
|
+
* @returns Timestamp or undefined if not tracked
|
|
1574
|
+
*/
|
|
1575
|
+
getLastModified(key, partition = 'default') {
|
|
1576
|
+
const entryKey = `${partition}:${key}`;
|
|
1577
|
+
return this.lastModifiedTimestamps.get(entryKey);
|
|
1578
|
+
}
|
|
1579
|
+
/**
|
|
1580
|
+
* Get AgentDB manager instance (for advanced usage)
|
|
1581
|
+
*
|
|
1582
|
+
* @returns AgentDBManager instance or null if not enabled
|
|
1583
|
+
*/
|
|
1584
|
+
getAgentDBManager() {
|
|
1585
|
+
return this.agentDBManager;
|
|
1586
|
+
}
|
|
1402
1587
|
}
|
|
1403
1588
|
exports.SwarmMemoryManager = SwarmMemoryManager;
|
|
1404
1589
|
//# sourceMappingURL=SwarmMemoryManager.js.map
|