kynjal-cli 4.0.0 → 4.0.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/dist/src/appliance/gguf-engine.d.ts +91 -0
- package/dist/src/appliance/gguf-engine.d.ts.map +1 -0
- package/dist/src/appliance/gguf-engine.js +286 -525
- package/dist/src/appliance/gguf-engine.js.map +1 -1
- package/dist/src/appliance/ruvllm-bridge.d.ts +102 -0
- package/dist/src/appliance/ruvllm-bridge.d.ts.map +1 -0
- package/dist/src/appliance/ruvllm-bridge.js +203 -403
- package/dist/src/appliance/ruvllm-bridge.js.map +1 -1
- package/dist/src/appliance/rvfa-builder.d.ts +44 -0
- package/dist/src/appliance/rvfa-builder.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-builder.js +154 -208
- package/dist/src/appliance/rvfa-builder.js.map +1 -1
- package/dist/src/appliance/rvfa-distribution.d.ts +97 -0
- package/dist/src/appliance/rvfa-distribution.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-distribution.js +260 -423
- package/dist/src/appliance/rvfa-distribution.js.map +1 -1
- package/dist/src/appliance/rvfa-format.d.ts +111 -0
- package/dist/src/appliance/rvfa-format.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-format.js +128 -200
- package/dist/src/appliance/rvfa-format.js.map +1 -1
- package/dist/src/appliance/rvfa-runner.d.ts +69 -0
- package/dist/src/appliance/rvfa-runner.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-runner.js +168 -304
- package/dist/src/appliance/rvfa-runner.js.map +1 -1
- package/dist/src/appliance/rvfa-signing.d.ts +123 -0
- package/dist/src/appliance/rvfa-signing.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-signing.js +173 -295
- package/dist/src/appliance/rvfa-signing.js.map +1 -1
- package/dist/src/benchmarks/pretrain/index.d.ts +58 -0
- package/dist/src/benchmarks/pretrain/index.d.ts.map +1 -0
- package/dist/src/benchmarks/pretrain/index.js +331 -542
- package/dist/src/benchmarks/pretrain/index.js.map +1 -1
- package/dist/src/commands/agent.js +574 -697
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.js +1218 -1548
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/appliance-advanced.js +158 -267
- package/dist/src/commands/appliance-advanced.js.map +1 -1
- package/dist/src/commands/appliance.js +318 -493
- package/dist/src/commands/appliance.js.map +1 -1
- package/dist/src/commands/benchmark.js +372 -523
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/claims.js +274 -364
- package/dist/src/commands/claims.js.map +1 -1
- package/dist/src/commands/cleanup.js +113 -157
- package/dist/src/commands/cleanup.js.map +1 -1
- package/dist/src/commands/completions.js +477 -118
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +237 -303
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.js +487 -596
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/deployment.js +194 -275
- package/dist/src/commands/deployment.js.map +1 -1
- package/dist/src/commands/doctor.js +504 -686
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/embeddings.js +1293 -1543
- package/dist/src/commands/embeddings.js.map +1 -1
- package/dist/src/commands/guidance.js +449 -596
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind.js +854 -938
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.js +3112 -3519
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +115 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +126 -308
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.js +788 -940
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.js +383 -558
- package/dist/src/commands/issues.js.map +1 -1
- package/dist/src/commands/mcp.js +493 -605
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.js +833 -1026
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +282 -347
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/neural.js +1289 -1563
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/performance.js +497 -643
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/plugins.js +668 -841
- package/dist/src/commands/plugins.js.map +1 -1
- package/dist/src/commands/process.js +392 -447
- package/dist/src/commands/process.js.map +1 -1
- package/dist/src/commands/progress.js +162 -256
- package/dist/src/commands/progress.js.map +1 -1
- package/dist/src/commands/providers.js +150 -220
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/route.js +520 -665
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/ruvector/backup.js +505 -651
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js +349 -401
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/import.js +224 -266
- package/dist/src/commands/ruvector/import.js.map +1 -1
- package/dist/src/commands/ruvector/index.js +37 -75
- package/dist/src/commands/ruvector/index.js.map +1 -1
- package/dist/src/commands/ruvector/init.js +336 -359
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js +335 -322
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js +375 -431
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/setup.js +703 -117
- package/dist/src/commands/ruvector/setup.js.map +1 -1
- package/dist/src/commands/ruvector/status.js +364 -419
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/security.js +485 -608
- package/dist/src/commands/security.js.map +1 -1
- package/dist/src/commands/session.js +504 -626
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.js +267 -364
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.js +380 -486
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/commands/swarm.js +408 -488
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.js +423 -538
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/commands/transfer-store.js +322 -412
- package/dist/src/commands/transfer-store.js.map +1 -1
- package/dist/src/commands/update.js +196 -291
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/workflow.js +386 -486
- package/dist/src/commands/workflow.js.map +1 -1
- package/dist/src/config-adapter.d.ts +15 -0
- package/dist/src/config-adapter.d.ts.map +1 -0
- package/dist/src/config-adapter.js +38 -39
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.d.ts +77 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +309 -411
- package/dist/src/index.js.map +1 -1
- package/dist/src/infrastructure/in-memory-repositories.d.ts +68 -0
- package/dist/src/infrastructure/in-memory-repositories.d.ts.map +1 -0
- package/dist/src/infrastructure/in-memory-repositories.js +246 -507
- package/dist/src/infrastructure/in-memory-repositories.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts +25 -0
- package/dist/src/init/claudemd-generator.d.ts.map +1 -0
- package/dist/src/init/claudemd-generator.js +368 -78
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts +41 -0
- package/dist/src/init/executor.d.ts.map +1 -0
- package/dist/src/init/executor.js +1307 -996
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.d.ts +60 -0
- package/dist/src/init/helpers-generator.d.ts.map +1 -0
- package/dist/src/init/helpers-generator.js +657 -12
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/index.d.ts +1 -1
- package/dist/src/init/index.d.ts.map +1 -1
- package/dist/src/init/index.js +1 -1
- package/dist/src/init/index.js.map +1 -1
- package/dist/src/init/mcp-generator.js +33 -37
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.js +76 -77
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.js +801 -3
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +1 -1
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +76 -59
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts +92 -0
- package/dist/src/mcp-client.d.ts.map +1 -0
- package/dist/src/mcp-client.js +81 -125
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.d.ts +161 -0
- package/dist/src/mcp-server.d.ts.map +1 -0
- package/dist/src/mcp-server.js +470 -757
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +391 -492
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.js +332 -533
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.js +172 -236
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/auto-install.d.ts +83 -0
- package/dist/src/mcp-tools/auto-install.d.ts.map +1 -0
- package/dist/src/mcp-tools/auto-install.js +80 -142
- package/dist/src/mcp-tools/auto-install.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +252 -375
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +473 -565
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +197 -272
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +500 -572
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +286 -364
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +582 -693
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +260 -311
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +573 -640
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +2215 -2648
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +350 -505
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +315 -412
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +420 -480
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +204 -278
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.js +163 -279
- package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +297 -429
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +185 -234
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +207 -260
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +276 -325
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +270 -336
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +148 -196
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +186 -333
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/types.d.ts +31 -0
- package/dist/src/mcp-tools/types.d.ts.map +1 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js +133 -280
- package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +405 -450
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ewc-consolidation.d.ts +295 -0
- package/dist/src/memory/ewc-consolidation.d.ts.map +1 -0
- package/dist/src/memory/ewc-consolidation.js +190 -303
- package/dist/src/memory/ewc-consolidation.js.map +1 -1
- package/dist/src/memory/intelligence.d.ts +338 -0
- package/dist/src/memory/intelligence.d.ts.map +1 -0
- package/dist/src/memory/intelligence.js +569 -794
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts +407 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge.js +1170 -1640
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts +412 -0
- package/dist/src/memory/memory-initializer.d.ts.map +1 -0
- package/dist/src/memory/memory-initializer.js +1836 -1851
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts +227 -0
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -0
- package/dist/src/memory/sona-optimizer.js +199 -329
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/output.d.ts +2 -2
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +242 -272
- package/dist/src/output.js.map +1 -1
- package/dist/src/parser.d.ts +51 -0
- package/dist/src/parser.d.ts.map +1 -0
- package/dist/src/parser.js +140 -187
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/manager.d.ts +133 -0
- package/dist/src/plugins/manager.d.ts.map +1 -0
- package/dist/src/plugins/manager.js +285 -521
- package/dist/src/plugins/manager.js.map +1 -1
- package/dist/src/plugins/store/discovery.d.ts +88 -0
- package/dist/src/plugins/store/discovery.d.ts.map +1 -0
- package/dist/src/plugins/store/discovery.js +271 -358
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/plugins/store/index.d.ts +76 -0
- package/dist/src/plugins/store/index.d.ts.map +1 -0
- package/dist/src/plugins/store/index.js +48 -105
- package/dist/src/plugins/store/index.js.map +1 -1
- package/dist/src/plugins/store/search.d.ts +46 -0
- package/dist/src/plugins/store/search.d.ts.map +1 -0
- package/dist/src/plugins/store/search.js +69 -107
- package/dist/src/plugins/store/search.js.map +1 -1
- package/dist/src/plugins/store/types.d.ts +274 -0
- package/dist/src/plugins/store/types.d.ts.map +1 -0
- package/dist/src/plugins/tests/demo-plugin-store.js +113 -160
- package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -1
- package/dist/src/plugins/tests/standalone-test.js +172 -223
- package/dist/src/plugins/tests/standalone-test.js.map +1 -1
- package/dist/src/plugins/tests/test-plugin-store.js +190 -228
- package/dist/src/plugins/tests/test-plugin-store.js.map +1 -1
- package/dist/src/production/circuit-breaker.d.ts +101 -0
- package/dist/src/production/circuit-breaker.d.ts.map +1 -0
- package/dist/src/production/circuit-breaker.js +62 -126
- package/dist/src/production/circuit-breaker.js.map +1 -1
- package/dist/src/production/error-handler.d.ts +92 -0
- package/dist/src/production/error-handler.d.ts.map +1 -0
- package/dist/src/production/error-handler.js +86 -156
- package/dist/src/production/error-handler.js.map +1 -1
- package/dist/src/production/monitoring.d.ts +161 -0
- package/dist/src/production/monitoring.d.ts.map +1 -0
- package/dist/src/production/monitoring.js +139 -220
- package/dist/src/production/monitoring.js.map +1 -1
- package/dist/src/production/rate-limiter.d.ts +80 -0
- package/dist/src/production/rate-limiter.d.ts.map +1 -0
- package/dist/src/production/rate-limiter.js +74 -93
- package/dist/src/production/rate-limiter.js.map +1 -1
- package/dist/src/production/retry.d.ts +48 -0
- package/dist/src/production/retry.d.ts.map +1 -0
- package/dist/src/production/retry.js +75 -167
- package/dist/src/production/retry.js.map +1 -1
- package/dist/src/prompt.d.ts +44 -0
- package/dist/src/prompt.d.ts.map +1 -0
- package/dist/src/prompt.js +436 -560
- package/dist/src/prompt.js.map +1 -1
- package/dist/src/runtime/headless.d.ts +60 -0
- package/dist/src/runtime/headless.d.ts.map +1 -0
- package/dist/src/runtime/headless.js +197 -286
- package/dist/src/runtime/headless.js.map +1 -1
- package/dist/src/ruvector/agent-wasm.d.ts +182 -0
- package/dist/src/ruvector/agent-wasm.d.ts.map +1 -0
- package/dist/src/ruvector/agent-wasm.js +156 -351
- package/dist/src/ruvector/agent-wasm.js.map +1 -1
- package/dist/src/ruvector/ast-analyzer.d.ts +67 -0
- package/dist/src/ruvector/ast-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/ast-analyzer.js +145 -232
- package/dist/src/ruvector/ast-analyzer.js.map +1 -1
- package/dist/src/ruvector/coverage-router.d.ts +160 -0
- package/dist/src/ruvector/coverage-router.d.ts.map +1 -0
- package/dist/src/ruvector/coverage-router.js +287 -419
- package/dist/src/ruvector/coverage-router.js.map +1 -1
- package/dist/src/ruvector/coverage-tools.js +56 -101
- package/dist/src/ruvector/coverage-tools.js.map +1 -1
- package/dist/src/ruvector/diff-classifier.d.ts +175 -0
- package/dist/src/ruvector/diff-classifier.d.ts.map +1 -0
- package/dist/src/ruvector/diff-classifier.js +324 -451
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.d.ts +146 -0
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +1 -0
- package/dist/src/ruvector/enhanced-model-router.js +260 -336
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
- package/dist/src/ruvector/flash-attention.d.ts +195 -0
- package/dist/src/ruvector/flash-attention.d.ts.map +1 -0
- package/dist/src/ruvector/flash-attention.js +223 -254
- package/dist/src/ruvector/flash-attention.js.map +1 -1
- package/dist/src/ruvector/graph-analyzer.d.ts +187 -0
- package/dist/src/ruvector/graph-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/graph-analyzer.js +486 -680
- package/dist/src/ruvector/graph-analyzer.js.map +1 -1
- package/dist/src/ruvector/index.d.ts +40 -0
- package/dist/src/ruvector/index.d.ts.map +1 -0
- package/dist/src/ruvector/index.js +36 -106
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/lora-adapter.d.ts +218 -0
- package/dist/src/ruvector/lora-adapter.d.ts.map +1 -0
- package/dist/src/ruvector/lora-adapter.js +155 -248
- package/dist/src/ruvector/lora-adapter.js.map +1 -1
- package/dist/src/ruvector/model-router.d.ts +220 -0
- package/dist/src/ruvector/model-router.d.ts.map +1 -0
- package/dist/src/ruvector/model-router.js +175 -248
- package/dist/src/ruvector/model-router.js.map +1 -1
- package/dist/src/ruvector/moe-router.d.ts +206 -0
- package/dist/src/ruvector/moe-router.d.ts.map +1 -0
- package/dist/src/ruvector/moe-router.js +228 -286
- package/dist/src/ruvector/moe-router.js.map +1 -1
- package/dist/src/ruvector/q-learning-router.d.ts +211 -0
- package/dist/src/ruvector/q-learning-router.d.ts.map +1 -0
- package/dist/src/ruvector/q-learning-router.js +257 -338
- package/dist/src/ruvector/q-learning-router.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.d.ts +179 -0
- package/dist/src/ruvector/ruvllm-wasm.d.ts.map +1 -0
- package/dist/src/ruvector/ruvllm-wasm.js +270 -434
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -1
- package/dist/src/ruvector/semantic-router.d.ts +77 -0
- package/dist/src/ruvector/semantic-router.d.ts.map +1 -0
- package/dist/src/ruvector/semantic-router.js +60 -67
- package/dist/src/ruvector/semantic-router.js.map +1 -1
- package/dist/src/ruvector/vector-db.d.ts +69 -0
- package/dist/src/ruvector/vector-db.d.ts.map +1 -0
- package/dist/src/ruvector/vector-db.js +119 -205
- package/dist/src/ruvector/vector-db.js.map +1 -1
- package/dist/src/services/agentic-flow-bridge.d.ts +50 -0
- package/dist/src/services/agentic-flow-bridge.d.ts.map +1 -0
- package/dist/src/services/agentic-flow-bridge.js +32 -105
- package/dist/src/services/agentic-flow-bridge.js.map +1 -1
- package/dist/src/services/claim-service.d.ts +204 -0
- package/dist/src/services/claim-service.d.ts.map +1 -0
- package/dist/src/services/claim-service.js +615 -940
- package/dist/src/services/claim-service.js.map +1 -1
- package/dist/src/services/container-worker-pool.d.ts +197 -0
- package/dist/src/services/container-worker-pool.d.ts.map +1 -0
- package/dist/src/services/container-worker-pool.js +398 -666
- package/dist/src/services/container-worker-pool.js.map +1 -1
- package/dist/src/services/headless-worker-executor.d.ts +304 -0
- package/dist/src/services/headless-worker-executor.d.ts.map +1 -0
- package/dist/src/services/headless-worker-executor.js +441 -467
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/index.d.ts +4 -4
- package/dist/src/services/index.d.ts.map +1 -1
- package/dist/src/services/index.js +4 -4
- package/dist/src/services/index.js.map +1 -1
- package/dist/src/services/registry-api.d.ts +58 -0
- package/dist/src/services/registry-api.d.ts.map +1 -0
- package/dist/src/services/registry-api.js +92 -200
- package/dist/src/services/registry-api.js.map +1 -1
- package/dist/src/services/ruvector-training.d.ts +222 -0
- package/dist/src/services/ruvector-training.d.ts.map +1 -0
- package/dist/src/services/ruvector-training.js +257 -337
- package/dist/src/services/ruvector-training.js.map +1 -1
- package/dist/src/services/worker-daemon.d.ts +228 -0
- package/dist/src/services/worker-daemon.d.ts.map +1 -0
- package/dist/src/services/worker-daemon.js +591 -849
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/src/services/worker-queue.d.ts +194 -0
- package/dist/src/services/worker-queue.d.ts.map +1 -0
- package/dist/src/services/worker-queue.js +331 -548
- package/dist/src/services/worker-queue.js.map +1 -1
- package/dist/src/suggest.d.ts +53 -0
- package/dist/src/suggest.d.ts.map +1 -0
- package/dist/src/suggest.js +45 -55
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/anonymization/index.js +29 -37
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/transfer/deploy-seraphine.js +128 -155
- package/dist/src/transfer/deploy-seraphine.js.map +1 -1
- package/dist/src/transfer/export.d.ts +25 -0
- package/dist/src/transfer/export.d.ts.map +1 -0
- package/dist/src/transfer/export.js +84 -142
- package/dist/src/transfer/export.js.map +1 -1
- package/dist/src/transfer/index.d.ts +1 -1
- package/dist/src/transfer/index.d.ts.map +1 -1
- package/dist/src/transfer/index.js +0 -2
- package/dist/src/transfer/index.js.map +1 -1
- package/dist/src/transfer/ipfs/client.d.ts +109 -0
- package/dist/src/transfer/ipfs/client.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/client.js +187 -337
- package/dist/src/transfer/ipfs/client.js.map +1 -1
- package/dist/src/transfer/ipfs/upload.d.ts +95 -0
- package/dist/src/transfer/ipfs/upload.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/upload.js +288 -434
- package/dist/src/transfer/ipfs/upload.js.map +1 -1
- package/dist/src/transfer/models/seraphine.d.ts +72 -0
- package/dist/src/transfer/models/seraphine.d.ts.map +1 -0
- package/dist/src/transfer/models/seraphine.js +55 -55
- package/dist/src/transfer/models/seraphine.js.map +1 -1
- package/dist/src/transfer/serialization/cfp.d.ts +49 -0
- package/dist/src/transfer/serialization/cfp.d.ts.map +1 -0
- package/dist/src/transfer/serialization/cfp.js +30 -31
- package/dist/src/transfer/serialization/cfp.js.map +1 -1
- package/dist/src/transfer/storage/gcs.d.ts +82 -0
- package/dist/src/transfer/storage/gcs.d.ts.map +1 -0
- package/dist/src/transfer/storage/gcs.js +165 -232
- package/dist/src/transfer/storage/gcs.js.map +1 -1
- package/dist/src/transfer/store/discovery.d.ts +84 -0
- package/dist/src/transfer/store/discovery.d.ts.map +1 -0
- package/dist/src/transfer/store/discovery.js +239 -349
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/transfer/store/download.d.ts +70 -0
- package/dist/src/transfer/store/download.d.ts.map +1 -0
- package/dist/src/transfer/store/download.js +243 -365
- package/dist/src/transfer/store/download.js.map +1 -1
- package/dist/src/transfer/store/index.d.ts +84 -0
- package/dist/src/transfer/store/index.d.ts.map +1 -0
- package/dist/src/transfer/store/index.js +63 -130
- package/dist/src/transfer/store/index.js.map +1 -1
- package/dist/src/transfer/store/publish.d.ts +76 -0
- package/dist/src/transfer/store/publish.d.ts.map +1 -0
- package/dist/src/transfer/store/publish.js +184 -258
- package/dist/src/transfer/store/publish.js.map +1 -1
- package/dist/src/transfer/store/registry.js +50 -72
- package/dist/src/transfer/store/registry.js.map +1 -1
- package/dist/src/transfer/store/search.d.ts +54 -0
- package/dist/src/transfer/store/search.d.ts.map +1 -0
- package/dist/src/transfer/store/search.js +64 -96
- package/dist/src/transfer/store/search.js.map +1 -1
- package/dist/src/transfer/store/tests/standalone-test.js +174 -231
- package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
- package/dist/src/transfer/test-seraphine.js +95 -130
- package/dist/src/transfer/test-seraphine.js.map +1 -1
- package/dist/src/transfer/tests/test-store.js +194 -239
- package/dist/src/transfer/tests/test-store.js.map +1 -1
- package/dist/src/transfer/types.d.ts +245 -0
- package/dist/src/transfer/types.d.ts.map +1 -0
- package/dist/src/types.d.ts +198 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +26 -55
- package/dist/src/types.js.map +1 -1
- package/dist/src/update/checker.d.ts +34 -0
- package/dist/src/update/checker.d.ts.map +1 -0
- package/dist/src/update/checker.js +106 -183
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.d.ts +32 -0
- package/dist/src/update/executor.d.ts.map +1 -0
- package/dist/src/update/executor.js +135 -198
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.d.ts +33 -0
- package/dist/src/update/index.d.ts.map +1 -0
- package/dist/src/update/index.js +38 -85
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/update/rate-limiter.d.ts +20 -0
- package/dist/src/update/rate-limiter.d.ts.map +1 -0
- package/dist/src/update/rate-limiter.js +19 -31
- package/dist/src/update/rate-limiter.js.map +1 -1
- package/dist/src/update/validator.d.ts +17 -0
- package/dist/src/update/validator.d.ts.map +1 -0
- package/dist/src/update/validator.js +38 -64
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2,65 +2,18 @@
|
|
|
2
2
|
* V3 CLI Memory Command
|
|
3
3
|
* Memory operations for AgentDB integration
|
|
4
4
|
*/
|
|
5
|
-
var __assign = (this && this.__assign) || function () {
|
|
6
|
-
__assign = Object.assign || function(t) {
|
|
7
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
-
s = arguments[i];
|
|
9
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
-
t[p] = s[p];
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
};
|
|
14
|
-
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
27
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
-
function step(op) {
|
|
30
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
-
while (_) try {
|
|
32
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
33
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
-
switch (op[0]) {
|
|
35
|
-
case 0: case 1: t = op; break;
|
|
36
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
-
default:
|
|
40
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
-
if (t[2]) _.ops.pop();
|
|
45
|
-
_.trys.pop(); continue;
|
|
46
|
-
}
|
|
47
|
-
op = body.call(thisArg, _);
|
|
48
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
5
|
import { output } from '../output.js';
|
|
53
6
|
import { select, confirm, input } from '../prompt.js';
|
|
54
7
|
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
55
8
|
// Memory backends
|
|
56
|
-
|
|
9
|
+
const BACKENDS = [
|
|
57
10
|
{ value: 'agentdb', label: 'AgentDB', hint: 'Vector database with HNSW indexing (150x-12,500x faster)' },
|
|
58
11
|
{ value: 'sqlite', label: 'SQLite', hint: 'Lightweight local storage' },
|
|
59
12
|
{ value: 'hybrid', label: 'Hybrid', hint: 'SQLite + AgentDB (recommended)' },
|
|
60
13
|
{ value: 'memory', label: 'In-Memory', hint: 'Fast but non-persistent' }
|
|
61
14
|
];
|
|
62
15
|
// Store command
|
|
63
|
-
|
|
16
|
+
const storeCommand = {
|
|
64
17
|
name: 'store',
|
|
65
18
|
description: 'Store data in memory',
|
|
66
19
|
options: [
|
|
@@ -82,7 +35,7 @@ var storeCommand = {
|
|
|
82
35
|
short: 'n',
|
|
83
36
|
description: 'Memory namespace',
|
|
84
37
|
type: 'string',
|
|
85
|
-
|
|
38
|
+
default: 'default'
|
|
86
39
|
},
|
|
87
40
|
{
|
|
88
41
|
name: 'ttl',
|
|
@@ -98,14 +51,14 @@ var storeCommand = {
|
|
|
98
51
|
name: 'vector',
|
|
99
52
|
description: 'Store as vector embedding',
|
|
100
53
|
type: 'boolean',
|
|
101
|
-
|
|
54
|
+
default: false
|
|
102
55
|
},
|
|
103
56
|
{
|
|
104
57
|
name: 'upsert',
|
|
105
58
|
short: 'u',
|
|
106
59
|
description: 'Update if key exists (insert or replace)',
|
|
107
60
|
type: 'boolean',
|
|
108
|
-
|
|
61
|
+
default: false
|
|
109
62
|
}
|
|
110
63
|
],
|
|
111
64
|
examples: [
|
|
@@ -113,100 +66,86 @@ var storeCommand = {
|
|
|
113
66
|
{ command: 'claude-flow memory store -k "pattern/singleton" --vector', description: 'Store vector' },
|
|
114
67
|
{ command: 'claude-flow memory store -k "pattern" -v "updated" --upsert', description: 'Update existing' }
|
|
115
68
|
],
|
|
116
|
-
action:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
};
|
|
155
|
-
output.printInfo("Storing in " + namespace + "/" + key + "...");
|
|
156
|
-
_a.label = 3;
|
|
157
|
-
case 3:
|
|
158
|
-
_a.trys.push([3, 6, , 7]);
|
|
159
|
-
return [4 /*yield*/, import('../memory/memory-initializer.js')];
|
|
160
|
-
case 4:
|
|
161
|
-
storeEntry = (_a.sent()).storeEntry;
|
|
162
|
-
if (asVector) {
|
|
163
|
-
output.writeln(output.dim(' Generating embedding vector...'));
|
|
164
|
-
}
|
|
165
|
-
return [4 /*yield*/, storeEntry({
|
|
166
|
-
key: key,
|
|
167
|
-
value: value,
|
|
168
|
-
namespace: namespace,
|
|
169
|
-
generateEmbeddingFlag: true,
|
|
170
|
-
tags: tags,
|
|
171
|
-
ttl: ttl,
|
|
172
|
-
upsert: upsert
|
|
173
|
-
})];
|
|
174
|
-
case 5:
|
|
175
|
-
result = _a.sent();
|
|
176
|
-
if (!result.success) {
|
|
177
|
-
output.printError(result.error || 'Failed to store');
|
|
178
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
179
|
-
}
|
|
180
|
-
output.writeln();
|
|
181
|
-
output.printTable({
|
|
182
|
-
columns: [
|
|
183
|
-
{ key: 'property', header: 'Property', width: 15 },
|
|
184
|
-
{ key: 'val', header: 'Value', width: 40 }
|
|
185
|
-
],
|
|
186
|
-
data: [
|
|
187
|
-
{ property: 'Key', val: key },
|
|
188
|
-
{ property: 'Namespace', val: namespace },
|
|
189
|
-
{ property: 'Size', val: storeData.size + " bytes" },
|
|
190
|
-
{ property: 'TTL', val: ttl ? ttl + "s" : 'None' },
|
|
191
|
-
{ property: 'Tags', val: tags.length > 0 ? tags.join(', ') : 'None' },
|
|
192
|
-
{ property: 'Vector', val: result.embedding ? "Yes (" + result.embedding.dimensions + "-dim)" : 'No' },
|
|
193
|
-
{ property: 'ID', val: result.id.substring(0, 20) }
|
|
194
|
-
]
|
|
195
|
-
});
|
|
196
|
-
output.writeln();
|
|
197
|
-
output.printSuccess('Data stored successfully');
|
|
198
|
-
return [2 /*return*/, { success: true, data: __assign(__assign({}, storeData), { id: result.id, embedding: result.embedding }) }];
|
|
199
|
-
case 6:
|
|
200
|
-
error_1 = _a.sent();
|
|
201
|
-
output.printError("Failed to store: " + (error_1 instanceof Error ? error_1.message : 'Unknown error'));
|
|
202
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
203
|
-
case 7: return [2 /*return*/];
|
|
69
|
+
action: async (ctx) => {
|
|
70
|
+
const key = ctx.flags.key;
|
|
71
|
+
let value = ctx.flags.value || ctx.args[0];
|
|
72
|
+
const namespace = ctx.flags.namespace;
|
|
73
|
+
const ttl = ctx.flags.ttl;
|
|
74
|
+
const tags = ctx.flags.tags ? ctx.flags.tags.split(',') : [];
|
|
75
|
+
const asVector = ctx.flags.vector;
|
|
76
|
+
const upsert = ctx.flags.upsert;
|
|
77
|
+
if (!key) {
|
|
78
|
+
output.printError('Key is required. Use --key or -k');
|
|
79
|
+
return { success: false, exitCode: 1 };
|
|
80
|
+
}
|
|
81
|
+
if (!value && ctx.interactive) {
|
|
82
|
+
value = await input({
|
|
83
|
+
message: 'Enter value to store:',
|
|
84
|
+
validate: (v) => v.length > 0 || 'Value is required'
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if (!value) {
|
|
88
|
+
output.printError('Value is required. Use --value');
|
|
89
|
+
return { success: false, exitCode: 1 };
|
|
90
|
+
}
|
|
91
|
+
const storeData = {
|
|
92
|
+
key,
|
|
93
|
+
namespace,
|
|
94
|
+
value,
|
|
95
|
+
ttl,
|
|
96
|
+
tags,
|
|
97
|
+
asVector,
|
|
98
|
+
storedAt: new Date().toISOString(),
|
|
99
|
+
size: Buffer.byteLength(value, 'utf8')
|
|
100
|
+
};
|
|
101
|
+
output.printInfo(`Storing in ${namespace}/${key}...`);
|
|
102
|
+
// Use direct sql.js storage with automatic embedding generation
|
|
103
|
+
try {
|
|
104
|
+
const { storeEntry } = await import('../memory/memory-initializer.js');
|
|
105
|
+
if (asVector) {
|
|
106
|
+
output.writeln(output.dim(' Generating embedding vector...'));
|
|
204
107
|
}
|
|
205
|
-
|
|
206
|
-
|
|
108
|
+
const result = await storeEntry({
|
|
109
|
+
key,
|
|
110
|
+
value,
|
|
111
|
+
namespace,
|
|
112
|
+
generateEmbeddingFlag: true, // Always generate embeddings for semantic search
|
|
113
|
+
tags,
|
|
114
|
+
ttl,
|
|
115
|
+
upsert
|
|
116
|
+
});
|
|
117
|
+
if (!result.success) {
|
|
118
|
+
output.printError(result.error || 'Failed to store');
|
|
119
|
+
return { success: false, exitCode: 1 };
|
|
120
|
+
}
|
|
121
|
+
output.writeln();
|
|
122
|
+
output.printTable({
|
|
123
|
+
columns: [
|
|
124
|
+
{ key: 'property', header: 'Property', width: 15 },
|
|
125
|
+
{ key: 'val', header: 'Value', width: 40 }
|
|
126
|
+
],
|
|
127
|
+
data: [
|
|
128
|
+
{ property: 'Key', val: key },
|
|
129
|
+
{ property: 'Namespace', val: namespace },
|
|
130
|
+
{ property: 'Size', val: `${storeData.size} bytes` },
|
|
131
|
+
{ property: 'TTL', val: ttl ? `${ttl}s` : 'None' },
|
|
132
|
+
{ property: 'Tags', val: tags.length > 0 ? tags.join(', ') : 'None' },
|
|
133
|
+
{ property: 'Vector', val: result.embedding ? `Yes (${result.embedding.dimensions}-dim)` : 'No' },
|
|
134
|
+
{ property: 'ID', val: result.id.substring(0, 20) }
|
|
135
|
+
]
|
|
136
|
+
});
|
|
137
|
+
output.writeln();
|
|
138
|
+
output.printSuccess('Data stored successfully');
|
|
139
|
+
return { success: true, data: { ...storeData, id: result.id, embedding: result.embedding } };
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
output.printError(`Failed to store: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
143
|
+
return { success: false, exitCode: 1 };
|
|
144
|
+
}
|
|
145
|
+
}
|
|
207
146
|
};
|
|
208
147
|
// Retrieve command
|
|
209
|
-
|
|
148
|
+
const retrieveCommand = {
|
|
210
149
|
name: 'retrieve',
|
|
211
150
|
aliases: ['get'],
|
|
212
151
|
description: 'Retrieve data from memory',
|
|
@@ -222,66 +161,55 @@ var retrieveCommand = {
|
|
|
222
161
|
short: 'n',
|
|
223
162
|
description: 'Memory namespace',
|
|
224
163
|
type: 'string',
|
|
225
|
-
|
|
164
|
+
default: 'default'
|
|
226
165
|
}
|
|
227
166
|
],
|
|
228
|
-
action:
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
return [4 /*yield*/, import('../memory/memory-initializer.js')];
|
|
243
|
-
case 2:
|
|
244
|
-
getEntry = (_a.sent()).getEntry;
|
|
245
|
-
return [4 /*yield*/, getEntry({ key: key, namespace: namespace })];
|
|
246
|
-
case 3:
|
|
247
|
-
result = _a.sent();
|
|
248
|
-
if (!result.success) {
|
|
249
|
-
output.printError("Failed to retrieve: " + result.error);
|
|
250
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
251
|
-
}
|
|
252
|
-
if (!result.found || !result.entry) {
|
|
253
|
-
output.printWarning("Key not found: " + key);
|
|
254
|
-
return [2 /*return*/, { success: false, exitCode: 1, data: { key: key, found: false } }];
|
|
255
|
-
}
|
|
256
|
-
entry = result.entry;
|
|
257
|
-
if (ctx.flags.format === 'json') {
|
|
258
|
-
output.printJson(entry);
|
|
259
|
-
return [2 /*return*/, { success: true, data: entry }];
|
|
260
|
-
}
|
|
261
|
-
output.writeln();
|
|
262
|
-
output.printBox([
|
|
263
|
-
"Namespace: " + entry.namespace,
|
|
264
|
-
"Key: " + entry.key,
|
|
265
|
-
"Size: " + entry.content.length + " bytes",
|
|
266
|
-
"Access Count: " + entry.accessCount,
|
|
267
|
-
"Tags: " + (entry.tags.length > 0 ? entry.tags.join(', ') : 'None'),
|
|
268
|
-
"Vector: " + (entry.hasEmbedding ? 'Yes' : 'No'),
|
|
269
|
-
'',
|
|
270
|
-
output.bold('Value:'),
|
|
271
|
-
entry.content
|
|
272
|
-
].join('\n'), 'Memory Entry');
|
|
273
|
-
return [2 /*return*/, { success: true, data: entry }];
|
|
274
|
-
case 4:
|
|
275
|
-
error_2 = _a.sent();
|
|
276
|
-
output.printError("Failed to retrieve: " + (error_2 instanceof Error ? error_2.message : 'Unknown error'));
|
|
277
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
278
|
-
case 5: return [2 /*return*/];
|
|
167
|
+
action: async (ctx) => {
|
|
168
|
+
const key = ctx.flags.key || ctx.args[0];
|
|
169
|
+
const namespace = ctx.flags.namespace;
|
|
170
|
+
if (!key) {
|
|
171
|
+
output.printError('Key is required');
|
|
172
|
+
return { success: false, exitCode: 1 };
|
|
173
|
+
}
|
|
174
|
+
// Use sql.js directly for consistent data access
|
|
175
|
+
try {
|
|
176
|
+
const { getEntry } = await import('../memory/memory-initializer.js');
|
|
177
|
+
const result = await getEntry({ key, namespace });
|
|
178
|
+
if (!result.success) {
|
|
179
|
+
output.printError(`Failed to retrieve: ${result.error}`);
|
|
180
|
+
return { success: false, exitCode: 1 };
|
|
279
181
|
}
|
|
280
|
-
|
|
281
|
-
|
|
182
|
+
if (!result.found || !result.entry) {
|
|
183
|
+
output.printWarning(`Key not found: ${key}`);
|
|
184
|
+
return { success: false, exitCode: 1, data: { key, found: false } };
|
|
185
|
+
}
|
|
186
|
+
const entry = result.entry;
|
|
187
|
+
if (ctx.flags.format === 'json') {
|
|
188
|
+
output.printJson(entry);
|
|
189
|
+
return { success: true, data: entry };
|
|
190
|
+
}
|
|
191
|
+
output.writeln();
|
|
192
|
+
output.printBox([
|
|
193
|
+
`Namespace: ${entry.namespace}`,
|
|
194
|
+
`Key: ${entry.key}`,
|
|
195
|
+
`Size: ${entry.content.length} bytes`,
|
|
196
|
+
`Access Count: ${entry.accessCount}`,
|
|
197
|
+
`Tags: ${entry.tags.length > 0 ? entry.tags.join(', ') : 'None'}`,
|
|
198
|
+
`Vector: ${entry.hasEmbedding ? 'Yes' : 'No'}`,
|
|
199
|
+
'',
|
|
200
|
+
output.bold('Value:'),
|
|
201
|
+
entry.content
|
|
202
|
+
].join('\n'), 'Memory Entry');
|
|
203
|
+
return { success: true, data: entry };
|
|
204
|
+
}
|
|
205
|
+
catch (error) {
|
|
206
|
+
output.printError(`Failed to retrieve: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
207
|
+
return { success: false, exitCode: 1 };
|
|
208
|
+
}
|
|
209
|
+
}
|
|
282
210
|
};
|
|
283
211
|
// Search command
|
|
284
|
-
|
|
212
|
+
const searchCommand = {
|
|
285
213
|
name: 'search',
|
|
286
214
|
description: 'Search memory with semantic/vector search',
|
|
287
215
|
options: [
|
|
@@ -303,27 +231,27 @@ var searchCommand = {
|
|
|
303
231
|
short: 'l',
|
|
304
232
|
description: 'Maximum results',
|
|
305
233
|
type: 'number',
|
|
306
|
-
|
|
234
|
+
default: 10
|
|
307
235
|
},
|
|
308
236
|
{
|
|
309
237
|
name: 'threshold',
|
|
310
238
|
description: 'Similarity threshold (0-1)',
|
|
311
239
|
type: 'number',
|
|
312
|
-
|
|
240
|
+
default: 0.7
|
|
313
241
|
},
|
|
314
242
|
{
|
|
315
243
|
name: 'type',
|
|
316
244
|
short: 't',
|
|
317
245
|
description: 'Search type (semantic, keyword, hybrid)',
|
|
318
246
|
type: 'string',
|
|
319
|
-
|
|
247
|
+
default: 'semantic',
|
|
320
248
|
choices: ['semantic', 'keyword', 'hybrid']
|
|
321
249
|
},
|
|
322
250
|
{
|
|
323
251
|
name: 'build-hnsw',
|
|
324
252
|
description: 'Build/rebuild HNSW index before searching (enables 150x-12,500x speedup)',
|
|
325
253
|
type: 'boolean',
|
|
326
|
-
|
|
254
|
+
default: false
|
|
327
255
|
}
|
|
328
256
|
],
|
|
329
257
|
examples: [
|
|
@@ -331,113 +259,96 @@ var searchCommand = {
|
|
|
331
259
|
{ command: 'claude-flow memory search -q "JWT" -t keyword', description: 'Keyword search' },
|
|
332
260
|
{ command: 'claude-flow memory search -q "test" --build-hnsw', description: 'Build HNSW index and search' }
|
|
333
261
|
],
|
|
334
|
-
action:
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
index
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
status = getHNSWStatus();
|
|
364
|
-
output.printSuccess("HNSW index built (" + status.entryCount + " vectors, " + buildTime + "ms)");
|
|
365
|
-
output.writeln(output.dim(" Dimensions: " + status.dimensions + ", Metric: cosine"));
|
|
366
|
-
output.writeln(output.dim(" Search speedup: " + (status.entryCount > 10000 ? '12,500x' : status.entryCount > 1000 ? '150x' : '10x')));
|
|
367
|
-
}
|
|
368
|
-
else {
|
|
369
|
-
output.printWarning('HNSW index not available (install @ruvector/core for acceleration)');
|
|
370
|
-
}
|
|
371
|
-
output.writeln();
|
|
372
|
-
return [3 /*break*/, 5];
|
|
373
|
-
case 4:
|
|
374
|
-
error_3 = _b.sent();
|
|
375
|
-
output.printWarning("HNSW build failed: " + (error_3 instanceof Error ? error_3.message : 'Unknown error'));
|
|
376
|
-
output.writeln(output.dim(' Falling back to brute-force search'));
|
|
377
|
-
output.writeln();
|
|
378
|
-
return [3 /*break*/, 5];
|
|
379
|
-
case 5:
|
|
380
|
-
output.printInfo("Searching: \"" + query + "\" (" + searchType + ")");
|
|
381
|
-
output.writeln();
|
|
382
|
-
_b.label = 6;
|
|
383
|
-
case 6:
|
|
384
|
-
_b.trys.push([6, 9, , 10]);
|
|
385
|
-
return [4 /*yield*/, import('../memory/memory-initializer.js')];
|
|
386
|
-
case 7:
|
|
387
|
-
searchEntries = (_b.sent()).searchEntries;
|
|
388
|
-
return [4 /*yield*/, searchEntries({
|
|
389
|
-
query: query,
|
|
390
|
-
namespace: namespace,
|
|
391
|
-
limit: limit,
|
|
392
|
-
threshold: threshold
|
|
393
|
-
})];
|
|
394
|
-
case 8:
|
|
395
|
-
searchResult = _b.sent();
|
|
396
|
-
if (!searchResult.success) {
|
|
397
|
-
output.printError(searchResult.error || 'Search failed');
|
|
398
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
399
|
-
}
|
|
400
|
-
results = searchResult.results.map(function (r) { return ({
|
|
401
|
-
key: r.key,
|
|
402
|
-
score: r.score,
|
|
403
|
-
namespace: r.namespace,
|
|
404
|
-
preview: r.content
|
|
405
|
-
}); });
|
|
406
|
-
if (ctx.flags.format === 'json') {
|
|
407
|
-
output.printJson({ query: query, searchType: searchType, results: results, searchTime: searchResult.searchTime + "ms" });
|
|
408
|
-
return [2 /*return*/, { success: true, data: results }];
|
|
409
|
-
}
|
|
410
|
-
// Performance stats
|
|
411
|
-
output.writeln(output.dim(" Search time: " + searchResult.searchTime + "ms"));
|
|
412
|
-
output.writeln();
|
|
413
|
-
if (results.length === 0) {
|
|
414
|
-
output.printWarning('No results found');
|
|
415
|
-
output.writeln(output.dim('Try: claude-flow memory store -k "key" --value "data"'));
|
|
416
|
-
return [2 /*return*/, { success: true, data: [] }];
|
|
417
|
-
}
|
|
418
|
-
output.printTable({
|
|
419
|
-
columns: [
|
|
420
|
-
{ key: 'key', header: 'Key', width: 20 },
|
|
421
|
-
{ key: 'score', header: 'Score', width: 8, align: 'right', format: function (v) { return Number(v).toFixed(2); } },
|
|
422
|
-
{ key: 'namespace', header: 'Namespace', width: 12 },
|
|
423
|
-
{ key: 'preview', header: 'Preview', width: 35 }
|
|
424
|
-
],
|
|
425
|
-
data: results
|
|
426
|
-
});
|
|
427
|
-
output.writeln();
|
|
428
|
-
output.printInfo("Found " + results.length + " results");
|
|
429
|
-
return [2 /*return*/, { success: true, data: results }];
|
|
430
|
-
case 9:
|
|
431
|
-
error_4 = _b.sent();
|
|
432
|
-
output.printError("Search failed: " + (error_4 instanceof Error ? error_4.message : 'Unknown error'));
|
|
433
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
434
|
-
case 10: return [2 /*return*/];
|
|
262
|
+
action: async (ctx) => {
|
|
263
|
+
const query = ctx.flags.query || ctx.args[0];
|
|
264
|
+
const namespace = ctx.flags.namespace || 'all';
|
|
265
|
+
const limit = ctx.flags.limit || 10;
|
|
266
|
+
const threshold = ctx.flags.threshold || 0.3;
|
|
267
|
+
const searchType = ctx.flags.type || 'semantic';
|
|
268
|
+
const buildHnsw = (ctx.flags['build-hnsw'] || ctx.flags.buildHnsw);
|
|
269
|
+
if (!query) {
|
|
270
|
+
output.printError('Query is required. Use --query or -q');
|
|
271
|
+
return { success: false, exitCode: 1 };
|
|
272
|
+
}
|
|
273
|
+
// Build/rebuild HNSW index if requested
|
|
274
|
+
if (buildHnsw) {
|
|
275
|
+
output.printInfo('Building HNSW index...');
|
|
276
|
+
try {
|
|
277
|
+
const { getHNSWIndex, getHNSWStatus } = await import('../memory/memory-initializer.js');
|
|
278
|
+
const startTime = Date.now();
|
|
279
|
+
const index = await getHNSWIndex({ forceRebuild: true });
|
|
280
|
+
const buildTime = Date.now() - startTime;
|
|
281
|
+
if (index) {
|
|
282
|
+
const status = getHNSWStatus();
|
|
283
|
+
output.printSuccess(`HNSW index built (${status.entryCount} vectors, ${buildTime}ms)`);
|
|
284
|
+
output.writeln(output.dim(` Dimensions: ${status.dimensions}, Metric: cosine`));
|
|
285
|
+
output.writeln(output.dim(` Search speedup: ${status.entryCount > 10000 ? '12,500x' : status.entryCount > 1000 ? '150x' : '10x'}`));
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
output.printWarning('HNSW index not available (install @ruvector/core for acceleration)');
|
|
289
|
+
}
|
|
290
|
+
output.writeln();
|
|
435
291
|
}
|
|
436
|
-
|
|
437
|
-
|
|
292
|
+
catch (error) {
|
|
293
|
+
output.printWarning(`HNSW build failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
294
|
+
output.writeln(output.dim(' Falling back to brute-force search'));
|
|
295
|
+
output.writeln();
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
output.printInfo(`Searching: "${query}" (${searchType})`);
|
|
299
|
+
output.writeln();
|
|
300
|
+
// Use direct sql.js search with vector similarity
|
|
301
|
+
try {
|
|
302
|
+
const { searchEntries } = await import('../memory/memory-initializer.js');
|
|
303
|
+
const searchResult = await searchEntries({
|
|
304
|
+
query,
|
|
305
|
+
namespace,
|
|
306
|
+
limit,
|
|
307
|
+
threshold
|
|
308
|
+
});
|
|
309
|
+
if (!searchResult.success) {
|
|
310
|
+
output.printError(searchResult.error || 'Search failed');
|
|
311
|
+
return { success: false, exitCode: 1 };
|
|
312
|
+
}
|
|
313
|
+
const results = searchResult.results.map(r => ({
|
|
314
|
+
key: r.key,
|
|
315
|
+
score: r.score,
|
|
316
|
+
namespace: r.namespace,
|
|
317
|
+
preview: r.content
|
|
318
|
+
}));
|
|
319
|
+
if (ctx.flags.format === 'json') {
|
|
320
|
+
output.printJson({ query, searchType, results, searchTime: `${searchResult.searchTime}ms` });
|
|
321
|
+
return { success: true, data: results };
|
|
322
|
+
}
|
|
323
|
+
// Performance stats
|
|
324
|
+
output.writeln(output.dim(` Search time: ${searchResult.searchTime}ms`));
|
|
325
|
+
output.writeln();
|
|
326
|
+
if (results.length === 0) {
|
|
327
|
+
output.printWarning('No results found');
|
|
328
|
+
output.writeln(output.dim('Try: claude-flow memory store -k "key" --value "data"'));
|
|
329
|
+
return { success: true, data: [] };
|
|
330
|
+
}
|
|
331
|
+
output.printTable({
|
|
332
|
+
columns: [
|
|
333
|
+
{ key: 'key', header: 'Key', width: 20 },
|
|
334
|
+
{ key: 'score', header: 'Score', width: 8, align: 'right', format: (v) => Number(v).toFixed(2) },
|
|
335
|
+
{ key: 'namespace', header: 'Namespace', width: 12 },
|
|
336
|
+
{ key: 'preview', header: 'Preview', width: 35 }
|
|
337
|
+
],
|
|
338
|
+
data: results
|
|
339
|
+
});
|
|
340
|
+
output.writeln();
|
|
341
|
+
output.printInfo(`Found ${results.length} results`);
|
|
342
|
+
return { success: true, data: results };
|
|
343
|
+
}
|
|
344
|
+
catch (error) {
|
|
345
|
+
output.printError(`Search failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
346
|
+
return { success: false, exitCode: 1 };
|
|
347
|
+
}
|
|
348
|
+
}
|
|
438
349
|
};
|
|
439
350
|
// List command
|
|
440
|
-
|
|
351
|
+
const listCommand = {
|
|
441
352
|
name: 'list',
|
|
442
353
|
aliases: ['ls'],
|
|
443
354
|
description: 'List memory entries',
|
|
@@ -459,91 +370,81 @@ var listCommand = {
|
|
|
459
370
|
short: 'l',
|
|
460
371
|
description: 'Maximum entries',
|
|
461
372
|
type: 'number',
|
|
462
|
-
|
|
373
|
+
default: 20
|
|
463
374
|
}
|
|
464
375
|
],
|
|
465
|
-
action:
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
return [4 /*yield*/, import('../memory/memory-initializer.js')];
|
|
476
|
-
case 2:
|
|
477
|
-
listEntries = (_a.sent()).listEntries;
|
|
478
|
-
return [4 /*yield*/, listEntries({ namespace: namespace, limit: limit, offset: 0 })];
|
|
479
|
-
case 3:
|
|
480
|
-
listResult = _a.sent();
|
|
481
|
-
if (!listResult.success) {
|
|
482
|
-
output.printError("Failed to list: " + listResult.error);
|
|
483
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
484
|
-
}
|
|
485
|
-
entries = listResult.entries.map(function (e) { return ({
|
|
486
|
-
key: e.key,
|
|
487
|
-
namespace: e.namespace,
|
|
488
|
-
size: e.size + ' B',
|
|
489
|
-
vector: e.hasEmbedding ? '✓' : '-',
|
|
490
|
-
accessCount: e.accessCount,
|
|
491
|
-
updated: formatRelativeTime(e.updatedAt)
|
|
492
|
-
}); });
|
|
493
|
-
if (ctx.flags.format === 'json') {
|
|
494
|
-
output.printJson(listResult.entries);
|
|
495
|
-
return [2 /*return*/, { success: true, data: listResult.entries }];
|
|
496
|
-
}
|
|
497
|
-
output.writeln();
|
|
498
|
-
output.writeln(output.bold('Memory Entries'));
|
|
499
|
-
output.writeln();
|
|
500
|
-
if (entries.length === 0) {
|
|
501
|
-
output.printWarning('No entries found');
|
|
502
|
-
output.printInfo('Store data: claude-flow memory store -k "key" --value "data"');
|
|
503
|
-
return [2 /*return*/, { success: true, data: [] }];
|
|
504
|
-
}
|
|
505
|
-
output.printTable({
|
|
506
|
-
columns: [
|
|
507
|
-
{ key: 'key', header: 'Key', width: 25 },
|
|
508
|
-
{ key: 'namespace', header: 'Namespace', width: 12 },
|
|
509
|
-
{ key: 'size', header: 'Size', width: 10, align: 'right' },
|
|
510
|
-
{ key: 'vector', header: 'Vector', width: 8, align: 'center' },
|
|
511
|
-
{ key: 'accessCount', header: 'Accessed', width: 10, align: 'right' },
|
|
512
|
-
{ key: 'updated', header: 'Updated', width: 12 }
|
|
513
|
-
],
|
|
514
|
-
data: entries
|
|
515
|
-
});
|
|
516
|
-
output.writeln();
|
|
517
|
-
output.printInfo("Showing " + entries.length + " of " + listResult.total + " entries");
|
|
518
|
-
return [2 /*return*/, { success: true, data: listResult.entries }];
|
|
519
|
-
case 4:
|
|
520
|
-
error_5 = _a.sent();
|
|
521
|
-
output.printError("Failed to list: " + (error_5 instanceof Error ? error_5.message : 'Unknown error'));
|
|
522
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
523
|
-
case 5: return [2 /*return*/];
|
|
376
|
+
action: async (ctx) => {
|
|
377
|
+
const namespace = ctx.flags.namespace;
|
|
378
|
+
const limit = ctx.flags.limit;
|
|
379
|
+
// Use sql.js directly for consistent data access
|
|
380
|
+
try {
|
|
381
|
+
const { listEntries } = await import('../memory/memory-initializer.js');
|
|
382
|
+
const listResult = await listEntries({ namespace, limit, offset: 0 });
|
|
383
|
+
if (!listResult.success) {
|
|
384
|
+
output.printError(`Failed to list: ${listResult.error}`);
|
|
385
|
+
return { success: false, exitCode: 1 };
|
|
524
386
|
}
|
|
525
|
-
|
|
526
|
-
|
|
387
|
+
// Format entries for display
|
|
388
|
+
const entries = listResult.entries.map(e => ({
|
|
389
|
+
key: e.key,
|
|
390
|
+
namespace: e.namespace,
|
|
391
|
+
size: e.size + ' B',
|
|
392
|
+
vector: e.hasEmbedding ? '✓' : '-',
|
|
393
|
+
accessCount: e.accessCount,
|
|
394
|
+
updated: formatRelativeTime(e.updatedAt)
|
|
395
|
+
}));
|
|
396
|
+
if (ctx.flags.format === 'json') {
|
|
397
|
+
output.printJson(listResult.entries);
|
|
398
|
+
return { success: true, data: listResult.entries };
|
|
399
|
+
}
|
|
400
|
+
output.writeln();
|
|
401
|
+
output.writeln(output.bold('Memory Entries'));
|
|
402
|
+
output.writeln();
|
|
403
|
+
if (entries.length === 0) {
|
|
404
|
+
output.printWarning('No entries found');
|
|
405
|
+
output.printInfo('Store data: claude-flow memory store -k "key" --value "data"');
|
|
406
|
+
return { success: true, data: [] };
|
|
407
|
+
}
|
|
408
|
+
output.printTable({
|
|
409
|
+
columns: [
|
|
410
|
+
{ key: 'key', header: 'Key', width: 25 },
|
|
411
|
+
{ key: 'namespace', header: 'Namespace', width: 12 },
|
|
412
|
+
{ key: 'size', header: 'Size', width: 10, align: 'right' },
|
|
413
|
+
{ key: 'vector', header: 'Vector', width: 8, align: 'center' },
|
|
414
|
+
{ key: 'accessCount', header: 'Accessed', width: 10, align: 'right' },
|
|
415
|
+
{ key: 'updated', header: 'Updated', width: 12 }
|
|
416
|
+
],
|
|
417
|
+
data: entries
|
|
418
|
+
});
|
|
419
|
+
output.writeln();
|
|
420
|
+
output.printInfo(`Showing ${entries.length} of ${listResult.total} entries`);
|
|
421
|
+
return { success: true, data: listResult.entries };
|
|
422
|
+
}
|
|
423
|
+
catch (error) {
|
|
424
|
+
output.printError(`Failed to list: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
425
|
+
return { success: false, exitCode: 1 };
|
|
426
|
+
}
|
|
427
|
+
}
|
|
527
428
|
};
|
|
528
429
|
// Helper function to format relative time
|
|
529
430
|
function formatRelativeTime(isoDate) {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
431
|
+
const now = Date.now();
|
|
432
|
+
const date = new Date(isoDate).getTime();
|
|
433
|
+
const diff = now - date;
|
|
434
|
+
const seconds = Math.floor(diff / 1000);
|
|
435
|
+
const minutes = Math.floor(seconds / 60);
|
|
436
|
+
const hours = Math.floor(minutes / 60);
|
|
437
|
+
const days = Math.floor(hours / 24);
|
|
537
438
|
if (days > 0)
|
|
538
|
-
return days
|
|
439
|
+
return `${days}d ago`;
|
|
539
440
|
if (hours > 0)
|
|
540
|
-
return hours
|
|
441
|
+
return `${hours}h ago`;
|
|
541
442
|
if (minutes > 0)
|
|
542
|
-
return minutes
|
|
443
|
+
return `${minutes}m ago`;
|
|
543
444
|
return 'just now';
|
|
544
445
|
}
|
|
545
446
|
// Delete command
|
|
546
|
-
|
|
447
|
+
const deleteCommand = {
|
|
547
448
|
name: 'delete',
|
|
548
449
|
aliases: ['rm'],
|
|
549
450
|
description: 'Delete memory entry',
|
|
@@ -559,14 +460,14 @@ var deleteCommand = {
|
|
|
559
460
|
short: 'n',
|
|
560
461
|
description: 'Memory namespace',
|
|
561
462
|
type: 'string',
|
|
562
|
-
|
|
463
|
+
default: 'default'
|
|
563
464
|
},
|
|
564
465
|
{
|
|
565
466
|
name: 'force',
|
|
566
467
|
short: 'f',
|
|
567
468
|
description: 'Skip confirmation',
|
|
568
469
|
type: 'boolean',
|
|
569
|
-
|
|
470
|
+
default: false
|
|
570
471
|
}
|
|
571
472
|
],
|
|
572
473
|
examples: [
|
|
@@ -574,134 +475,116 @@ var deleteCommand = {
|
|
|
574
475
|
{ command: 'claude-flow memory delete -k "lesson" -n "lessons"', description: 'Delete entry from specific namespace' },
|
|
575
476
|
{ command: 'claude-flow memory delete mykey -f', description: 'Delete without confirmation' }
|
|
576
477
|
],
|
|
577
|
-
action:
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
case 1:
|
|
595
|
-
confirmed = _a.sent();
|
|
596
|
-
if (!confirmed) {
|
|
597
|
-
output.printInfo('Operation cancelled');
|
|
598
|
-
return [2 /*return*/, { success: true }];
|
|
599
|
-
}
|
|
600
|
-
_a.label = 2;
|
|
601
|
-
case 2:
|
|
602
|
-
_a.trys.push([2, 5, , 6]);
|
|
603
|
-
return [4 /*yield*/, import('../memory/memory-initializer.js')];
|
|
604
|
-
case 3:
|
|
605
|
-
deleteEntry = (_a.sent()).deleteEntry;
|
|
606
|
-
return [4 /*yield*/, deleteEntry({ key: key, namespace: namespace })];
|
|
607
|
-
case 4:
|
|
608
|
-
result = _a.sent();
|
|
609
|
-
if (!result.success) {
|
|
610
|
-
output.printError(result.error || 'Failed to delete');
|
|
611
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
612
|
-
}
|
|
613
|
-
if (result.deleted) {
|
|
614
|
-
output.printSuccess("Deleted \"" + key + "\" from namespace \"" + namespace + "\"");
|
|
615
|
-
output.printInfo("Remaining entries: " + result.remainingEntries);
|
|
616
|
-
}
|
|
617
|
-
else {
|
|
618
|
-
output.printWarning("Key not found: \"" + key + "\" in namespace \"" + namespace + "\"");
|
|
619
|
-
}
|
|
620
|
-
return [2 /*return*/, { success: result.deleted, data: result }];
|
|
621
|
-
case 5:
|
|
622
|
-
error_6 = _a.sent();
|
|
623
|
-
output.printError("Failed to delete: " + (error_6 instanceof Error ? error_6.message : 'Unknown error'));
|
|
624
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
625
|
-
case 6: return [2 /*return*/];
|
|
478
|
+
action: async (ctx) => {
|
|
479
|
+
// Support both --key flag and positional argument
|
|
480
|
+
const key = ctx.flags.key || ctx.args[0];
|
|
481
|
+
const namespace = ctx.flags.namespace || 'default';
|
|
482
|
+
const force = ctx.flags.force;
|
|
483
|
+
if (!key) {
|
|
484
|
+
output.printError('Key is required. Use: memory delete -k "key" [-n "namespace"]');
|
|
485
|
+
return { success: false, exitCode: 1 };
|
|
486
|
+
}
|
|
487
|
+
if (!force && ctx.interactive) {
|
|
488
|
+
const confirmed = await confirm({
|
|
489
|
+
message: `Delete memory entry "${key}" from namespace "${namespace}"?`,
|
|
490
|
+
default: false
|
|
491
|
+
});
|
|
492
|
+
if (!confirmed) {
|
|
493
|
+
output.printInfo('Operation cancelled');
|
|
494
|
+
return { success: true };
|
|
626
495
|
}
|
|
627
|
-
}
|
|
628
|
-
|
|
496
|
+
}
|
|
497
|
+
// Use sql.js directly for consistent data access (Issue #980)
|
|
498
|
+
try {
|
|
499
|
+
const { deleteEntry } = await import('../memory/memory-initializer.js');
|
|
500
|
+
const result = await deleteEntry({ key, namespace });
|
|
501
|
+
if (!result.success) {
|
|
502
|
+
output.printError(result.error || 'Failed to delete');
|
|
503
|
+
return { success: false, exitCode: 1 };
|
|
504
|
+
}
|
|
505
|
+
if (result.deleted) {
|
|
506
|
+
output.printSuccess(`Deleted "${key}" from namespace "${namespace}"`);
|
|
507
|
+
output.printInfo(`Remaining entries: ${result.remainingEntries}`);
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
output.printWarning(`Key not found: "${key}" in namespace "${namespace}"`);
|
|
511
|
+
}
|
|
512
|
+
return { success: result.deleted, data: result };
|
|
513
|
+
}
|
|
514
|
+
catch (error) {
|
|
515
|
+
output.printError(`Failed to delete: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
516
|
+
return { success: false, exitCode: 1 };
|
|
517
|
+
}
|
|
518
|
+
}
|
|
629
519
|
};
|
|
630
520
|
// Stats command
|
|
631
|
-
|
|
521
|
+
const statsCommand = {
|
|
632
522
|
name: 'stats',
|
|
633
523
|
description: 'Show memory statistics',
|
|
634
|
-
action:
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
newestEntry: statsResult.newestEntry
|
|
657
|
-
};
|
|
658
|
-
if (ctx.flags.format === 'json') {
|
|
659
|
-
output.printJson(stats);
|
|
660
|
-
return [2 /*return*/, { success: true, data: stats }];
|
|
661
|
-
}
|
|
662
|
-
output.writeln();
|
|
663
|
-
output.writeln(output.bold('Memory Statistics'));
|
|
664
|
-
output.writeln();
|
|
665
|
-
output.writeln(output.bold('Overview'));
|
|
666
|
-
output.printTable({
|
|
667
|
-
columns: [
|
|
668
|
-
{ key: 'metric', header: 'Metric', width: 20 },
|
|
669
|
-
{ key: 'value', header: 'Value', width: 30, align: 'right' }
|
|
670
|
-
],
|
|
671
|
-
data: [
|
|
672
|
-
{ metric: 'Backend', value: stats.backend },
|
|
673
|
-
{ metric: 'Version', value: stats.version },
|
|
674
|
-
{ metric: 'Total Entries', value: stats.entries.total.toLocaleString() },
|
|
675
|
-
{ metric: 'Total Storage', value: stats.storage.total },
|
|
676
|
-
{ metric: 'Location', value: stats.storage.location }
|
|
677
|
-
]
|
|
678
|
-
});
|
|
679
|
-
output.writeln();
|
|
680
|
-
output.writeln(output.bold('Timeline'));
|
|
681
|
-
output.printTable({
|
|
682
|
-
columns: [
|
|
683
|
-
{ key: 'metric', header: 'Metric', width: 20 },
|
|
684
|
-
{ key: 'value', header: 'Value', width: 30, align: 'right' }
|
|
685
|
-
],
|
|
686
|
-
data: [
|
|
687
|
-
{ metric: 'Oldest Entry', value: stats.oldestEntry || 'N/A' },
|
|
688
|
-
{ metric: 'Newest Entry', value: stats.newestEntry || 'N/A' }
|
|
689
|
-
]
|
|
690
|
-
});
|
|
691
|
-
output.writeln();
|
|
692
|
-
output.printInfo('V3 Performance: 150x-12,500x faster search with HNSW indexing');
|
|
693
|
-
return [2 /*return*/, { success: true, data: stats }];
|
|
694
|
-
case 2:
|
|
695
|
-
error_7 = _a.sent();
|
|
696
|
-
output.printError("Failed to get stats: " + (error_7 instanceof Error ? error_7.message : 'Unknown error'));
|
|
697
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
698
|
-
case 3: return [2 /*return*/];
|
|
524
|
+
action: async (ctx) => {
|
|
525
|
+
// Call MCP memory/stats tool for real statistics
|
|
526
|
+
try {
|
|
527
|
+
const statsResult = await callMCPTool('memory_stats', {});
|
|
528
|
+
const stats = {
|
|
529
|
+
backend: statsResult.backend,
|
|
530
|
+
entries: {
|
|
531
|
+
total: statsResult.totalEntries,
|
|
532
|
+
vectors: 0, // Would need vector backend support
|
|
533
|
+
text: statsResult.totalEntries
|
|
534
|
+
},
|
|
535
|
+
storage: {
|
|
536
|
+
total: statsResult.totalSize,
|
|
537
|
+
location: statsResult.location
|
|
538
|
+
},
|
|
539
|
+
version: statsResult.version,
|
|
540
|
+
oldestEntry: statsResult.oldestEntry,
|
|
541
|
+
newestEntry: statsResult.newestEntry
|
|
542
|
+
};
|
|
543
|
+
if (ctx.flags.format === 'json') {
|
|
544
|
+
output.printJson(stats);
|
|
545
|
+
return { success: true, data: stats };
|
|
699
546
|
}
|
|
700
|
-
|
|
701
|
-
|
|
547
|
+
output.writeln();
|
|
548
|
+
output.writeln(output.bold('Memory Statistics'));
|
|
549
|
+
output.writeln();
|
|
550
|
+
output.writeln(output.bold('Overview'));
|
|
551
|
+
output.printTable({
|
|
552
|
+
columns: [
|
|
553
|
+
{ key: 'metric', header: 'Metric', width: 20 },
|
|
554
|
+
{ key: 'value', header: 'Value', width: 30, align: 'right' }
|
|
555
|
+
],
|
|
556
|
+
data: [
|
|
557
|
+
{ metric: 'Backend', value: stats.backend },
|
|
558
|
+
{ metric: 'Version', value: stats.version },
|
|
559
|
+
{ metric: 'Total Entries', value: stats.entries.total.toLocaleString() },
|
|
560
|
+
{ metric: 'Total Storage', value: stats.storage.total },
|
|
561
|
+
{ metric: 'Location', value: stats.storage.location }
|
|
562
|
+
]
|
|
563
|
+
});
|
|
564
|
+
output.writeln();
|
|
565
|
+
output.writeln(output.bold('Timeline'));
|
|
566
|
+
output.printTable({
|
|
567
|
+
columns: [
|
|
568
|
+
{ key: 'metric', header: 'Metric', width: 20 },
|
|
569
|
+
{ key: 'value', header: 'Value', width: 30, align: 'right' }
|
|
570
|
+
],
|
|
571
|
+
data: [
|
|
572
|
+
{ metric: 'Oldest Entry', value: stats.oldestEntry || 'N/A' },
|
|
573
|
+
{ metric: 'Newest Entry', value: stats.newestEntry || 'N/A' }
|
|
574
|
+
]
|
|
575
|
+
});
|
|
576
|
+
output.writeln();
|
|
577
|
+
output.printInfo('V3 Performance: 150x-12,500x faster search with HNSW indexing');
|
|
578
|
+
return { success: true, data: stats };
|
|
579
|
+
}
|
|
580
|
+
catch (error) {
|
|
581
|
+
output.printError(`Failed to get stats: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
582
|
+
return { success: false, exitCode: 1 };
|
|
583
|
+
}
|
|
584
|
+
}
|
|
702
585
|
};
|
|
703
586
|
// Configure command
|
|
704
|
-
|
|
587
|
+
const configureCommand = {
|
|
705
588
|
name: 'configure',
|
|
706
589
|
aliases: ['config'],
|
|
707
590
|
description: 'Configure memory backend',
|
|
@@ -711,7 +594,7 @@ var configureCommand = {
|
|
|
711
594
|
short: 'b',
|
|
712
595
|
description: 'Memory backend',
|
|
713
596
|
type: 'string',
|
|
714
|
-
choices: BACKENDS.map(
|
|
597
|
+
choices: BACKENDS.map(b => b.value)
|
|
715
598
|
},
|
|
716
599
|
{
|
|
717
600
|
name: 'path',
|
|
@@ -727,65 +610,56 @@ var configureCommand = {
|
|
|
727
610
|
name: 'hnsw-m',
|
|
728
611
|
description: 'HNSW M parameter',
|
|
729
612
|
type: 'number',
|
|
730
|
-
|
|
613
|
+
default: 16
|
|
731
614
|
},
|
|
732
615
|
{
|
|
733
616
|
name: 'hnsw-ef',
|
|
734
617
|
description: 'HNSW ef parameter',
|
|
735
618
|
type: 'number',
|
|
736
|
-
|
|
619
|
+
default: 200
|
|
737
620
|
}
|
|
738
621
|
],
|
|
739
|
-
action:
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
config = {
|
|
756
|
-
backend: backend || 'hybrid',
|
|
757
|
-
path: ctx.flags.path || './data/memory',
|
|
758
|
-
cacheSize: ctx.flags.cacheSize || 256,
|
|
759
|
-
hnsw: {
|
|
760
|
-
m: ctx.flags.hnswM || 16,
|
|
761
|
-
ef: ctx.flags.hnswEf || 200
|
|
762
|
-
}
|
|
763
|
-
};
|
|
764
|
-
output.writeln();
|
|
765
|
-
output.printInfo('Memory Configuration');
|
|
766
|
-
output.writeln();
|
|
767
|
-
output.printTable({
|
|
768
|
-
columns: [
|
|
769
|
-
{ key: 'setting', header: 'Setting', width: 20 },
|
|
770
|
-
{ key: 'value', header: 'Value', width: 25 }
|
|
771
|
-
],
|
|
772
|
-
data: [
|
|
773
|
-
{ setting: 'Backend', value: config.backend },
|
|
774
|
-
{ setting: 'Storage Path', value: config.path },
|
|
775
|
-
{ setting: 'Cache Size', value: config.cacheSize + " MB" },
|
|
776
|
-
{ setting: 'HNSW M', value: config.hnsw.m },
|
|
777
|
-
{ setting: 'HNSW ef', value: config.hnsw.ef }
|
|
778
|
-
]
|
|
779
|
-
});
|
|
780
|
-
output.writeln();
|
|
781
|
-
output.printSuccess('Memory configuration updated');
|
|
782
|
-
return [2 /*return*/, { success: true, data: config }];
|
|
622
|
+
action: async (ctx) => {
|
|
623
|
+
let backend = ctx.flags.backend;
|
|
624
|
+
if (!backend && ctx.interactive) {
|
|
625
|
+
backend = await select({
|
|
626
|
+
message: 'Select memory backend:',
|
|
627
|
+
options: BACKENDS,
|
|
628
|
+
default: 'hybrid'
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
const config = {
|
|
632
|
+
backend: backend || 'hybrid',
|
|
633
|
+
path: ctx.flags.path || './data/memory',
|
|
634
|
+
cacheSize: ctx.flags.cacheSize || 256,
|
|
635
|
+
hnsw: {
|
|
636
|
+
m: ctx.flags.hnswM || 16,
|
|
637
|
+
ef: ctx.flags.hnswEf || 200
|
|
783
638
|
}
|
|
639
|
+
};
|
|
640
|
+
output.writeln();
|
|
641
|
+
output.printInfo('Memory Configuration');
|
|
642
|
+
output.writeln();
|
|
643
|
+
output.printTable({
|
|
644
|
+
columns: [
|
|
645
|
+
{ key: 'setting', header: 'Setting', width: 20 },
|
|
646
|
+
{ key: 'value', header: 'Value', width: 25 }
|
|
647
|
+
],
|
|
648
|
+
data: [
|
|
649
|
+
{ setting: 'Backend', value: config.backend },
|
|
650
|
+
{ setting: 'Storage Path', value: config.path },
|
|
651
|
+
{ setting: 'Cache Size', value: `${config.cacheSize} MB` },
|
|
652
|
+
{ setting: 'HNSW M', value: config.hnsw.m },
|
|
653
|
+
{ setting: 'HNSW ef', value: config.hnsw.ef }
|
|
654
|
+
]
|
|
784
655
|
});
|
|
785
|
-
|
|
656
|
+
output.writeln();
|
|
657
|
+
output.printSuccess('Memory configuration updated');
|
|
658
|
+
return { success: true, data: config };
|
|
659
|
+
}
|
|
786
660
|
};
|
|
787
661
|
// Cleanup command
|
|
788
|
-
|
|
662
|
+
const cleanupCommand = {
|
|
789
663
|
name: 'cleanup',
|
|
790
664
|
description: 'Clean up stale and expired memory entries',
|
|
791
665
|
options: [
|
|
@@ -794,7 +668,7 @@ var cleanupCommand = {
|
|
|
794
668
|
short: 'd',
|
|
795
669
|
description: 'Show what would be deleted',
|
|
796
670
|
type: 'boolean',
|
|
797
|
-
|
|
671
|
+
default: false
|
|
798
672
|
},
|
|
799
673
|
{
|
|
800
674
|
name: 'older-than',
|
|
@@ -807,7 +681,7 @@ var cleanupCommand = {
|
|
|
807
681
|
short: 'e',
|
|
808
682
|
description: 'Only delete expired TTL entries',
|
|
809
683
|
type: 'boolean',
|
|
810
|
-
|
|
684
|
+
default: false
|
|
811
685
|
},
|
|
812
686
|
{
|
|
813
687
|
name: 'low-quality',
|
|
@@ -826,7 +700,7 @@ var cleanupCommand = {
|
|
|
826
700
|
short: 'f',
|
|
827
701
|
description: 'Skip confirmation',
|
|
828
702
|
type: 'boolean',
|
|
829
|
-
|
|
703
|
+
default: false
|
|
830
704
|
}
|
|
831
705
|
],
|
|
832
706
|
examples: [
|
|
@@ -834,87 +708,74 @@ var cleanupCommand = {
|
|
|
834
708
|
{ command: 'claude-flow memory cleanup --older-than 30d', description: 'Delete entries older than 30 days' },
|
|
835
709
|
{ command: 'claude-flow memory cleanup --expired-only', description: 'Clean expired entries' }
|
|
836
710
|
],
|
|
837
|
-
action:
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
lowQualityThreshold: ctx.flags.lowQuality,
|
|
856
|
-
namespace: ctx.flags.namespace
|
|
857
|
-
})];
|
|
858
|
-
case 2:
|
|
859
|
-
result = _a.sent();
|
|
860
|
-
if (ctx.flags.format === 'json') {
|
|
861
|
-
output.printJson(result);
|
|
862
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
863
|
-
}
|
|
864
|
-
output.writeln();
|
|
865
|
-
output.writeln(output.bold('Cleanup Analysis'));
|
|
866
|
-
output.printTable({
|
|
867
|
-
columns: [
|
|
868
|
-
{ key: 'category', header: 'Category', width: 20 },
|
|
869
|
-
{ key: 'count', header: 'Count', width: 15, align: 'right' }
|
|
870
|
-
],
|
|
871
|
-
data: [
|
|
872
|
-
{ category: 'Expired (TTL)', count: result.candidates.expired },
|
|
873
|
-
{ category: 'Stale (unused)', count: result.candidates.stale },
|
|
874
|
-
{ category: 'Low Quality', count: result.candidates.lowQuality },
|
|
875
|
-
{ category: output.bold('Total'), count: output.bold(String(result.candidates.total)) }
|
|
876
|
-
]
|
|
877
|
-
});
|
|
878
|
-
if (!(!dryRun && result.candidates.total > 0 && !force)) return [3 /*break*/, 4];
|
|
879
|
-
return [4 /*yield*/, confirm({
|
|
880
|
-
message: "Delete " + result.candidates.total + " entries (" + result.freed.formatted + ")?",
|
|
881
|
-
"default": false
|
|
882
|
-
})];
|
|
883
|
-
case 3:
|
|
884
|
-
confirmed = _a.sent();
|
|
885
|
-
if (!confirmed) {
|
|
886
|
-
output.printInfo('Cleanup cancelled');
|
|
887
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
888
|
-
}
|
|
889
|
-
_a.label = 4;
|
|
890
|
-
case 4:
|
|
891
|
-
if (!dryRun) {
|
|
892
|
-
output.writeln();
|
|
893
|
-
output.printSuccess("Cleaned " + result.deleted.entries + " entries");
|
|
894
|
-
output.printList([
|
|
895
|
-
"Vectors removed: " + result.deleted.vectors,
|
|
896
|
-
"Patterns removed: " + result.deleted.patterns,
|
|
897
|
-
"Space freed: " + result.freed.formatted,
|
|
898
|
-
"Duration: " + result.duration + "ms"
|
|
899
|
-
]);
|
|
900
|
-
}
|
|
901
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
902
|
-
case 5:
|
|
903
|
-
error_8 = _a.sent();
|
|
904
|
-
if (error_8 instanceof MCPClientError) {
|
|
905
|
-
output.printError("Cleanup error: " + error_8.message);
|
|
906
|
-
}
|
|
907
|
-
else {
|
|
908
|
-
output.printError("Unexpected error: " + String(error_8));
|
|
909
|
-
}
|
|
910
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
911
|
-
case 6: return [2 /*return*/];
|
|
711
|
+
action: async (ctx) => {
|
|
712
|
+
const dryRun = ctx.flags.dryRun;
|
|
713
|
+
const force = ctx.flags.force;
|
|
714
|
+
if (dryRun) {
|
|
715
|
+
output.writeln(output.warning('DRY RUN - No changes will be made'));
|
|
716
|
+
}
|
|
717
|
+
output.printInfo('Analyzing memory for cleanup...');
|
|
718
|
+
try {
|
|
719
|
+
const result = await callMCPTool('memory_cleanup', {
|
|
720
|
+
dryRun,
|
|
721
|
+
olderThan: ctx.flags.olderThan,
|
|
722
|
+
expiredOnly: ctx.flags.expiredOnly,
|
|
723
|
+
lowQualityThreshold: ctx.flags.lowQuality,
|
|
724
|
+
namespace: ctx.flags.namespace,
|
|
725
|
+
});
|
|
726
|
+
if (ctx.flags.format === 'json') {
|
|
727
|
+
output.printJson(result);
|
|
728
|
+
return { success: true, data: result };
|
|
912
729
|
}
|
|
913
|
-
|
|
914
|
-
|
|
730
|
+
output.writeln();
|
|
731
|
+
output.writeln(output.bold('Cleanup Analysis'));
|
|
732
|
+
output.printTable({
|
|
733
|
+
columns: [
|
|
734
|
+
{ key: 'category', header: 'Category', width: 20 },
|
|
735
|
+
{ key: 'count', header: 'Count', width: 15, align: 'right' }
|
|
736
|
+
],
|
|
737
|
+
data: [
|
|
738
|
+
{ category: 'Expired (TTL)', count: result.candidates.expired },
|
|
739
|
+
{ category: 'Stale (unused)', count: result.candidates.stale },
|
|
740
|
+
{ category: 'Low Quality', count: result.candidates.lowQuality },
|
|
741
|
+
{ category: output.bold('Total'), count: output.bold(String(result.candidates.total)) }
|
|
742
|
+
]
|
|
743
|
+
});
|
|
744
|
+
if (!dryRun && result.candidates.total > 0 && !force) {
|
|
745
|
+
const confirmed = await confirm({
|
|
746
|
+
message: `Delete ${result.candidates.total} entries (${result.freed.formatted})?`,
|
|
747
|
+
default: false
|
|
748
|
+
});
|
|
749
|
+
if (!confirmed) {
|
|
750
|
+
output.printInfo('Cleanup cancelled');
|
|
751
|
+
return { success: true, data: result };
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
if (!dryRun) {
|
|
755
|
+
output.writeln();
|
|
756
|
+
output.printSuccess(`Cleaned ${result.deleted.entries} entries`);
|
|
757
|
+
output.printList([
|
|
758
|
+
`Vectors removed: ${result.deleted.vectors}`,
|
|
759
|
+
`Patterns removed: ${result.deleted.patterns}`,
|
|
760
|
+
`Space freed: ${result.freed.formatted}`,
|
|
761
|
+
`Duration: ${result.duration}ms`
|
|
762
|
+
]);
|
|
763
|
+
}
|
|
764
|
+
return { success: true, data: result };
|
|
765
|
+
}
|
|
766
|
+
catch (error) {
|
|
767
|
+
if (error instanceof MCPClientError) {
|
|
768
|
+
output.printError(`Cleanup error: ${error.message}`);
|
|
769
|
+
}
|
|
770
|
+
else {
|
|
771
|
+
output.printError(`Unexpected error: ${String(error)}`);
|
|
772
|
+
}
|
|
773
|
+
return { success: false, exitCode: 1 };
|
|
774
|
+
}
|
|
775
|
+
}
|
|
915
776
|
};
|
|
916
777
|
// Compress command
|
|
917
|
-
|
|
778
|
+
const compressCommand = {
|
|
918
779
|
name: 'compress',
|
|
919
780
|
description: 'Compress and optimize memory storage',
|
|
920
781
|
options: [
|
|
@@ -924,7 +785,7 @@ var compressCommand = {
|
|
|
924
785
|
description: 'Compression level (fast, balanced, max)',
|
|
925
786
|
type: 'string',
|
|
926
787
|
choices: ['fast', 'balanced', 'max'],
|
|
927
|
-
|
|
788
|
+
default: 'balanced'
|
|
928
789
|
},
|
|
929
790
|
{
|
|
930
791
|
name: 'target',
|
|
@@ -932,27 +793,27 @@ var compressCommand = {
|
|
|
932
793
|
description: 'Target (vectors, text, patterns, all)',
|
|
933
794
|
type: 'string',
|
|
934
795
|
choices: ['vectors', 'text', 'patterns', 'all'],
|
|
935
|
-
|
|
796
|
+
default: 'all'
|
|
936
797
|
},
|
|
937
798
|
{
|
|
938
799
|
name: 'quantize',
|
|
939
800
|
short: 'z',
|
|
940
801
|
description: 'Enable vector quantization (reduces memory 4-32x)',
|
|
941
802
|
type: 'boolean',
|
|
942
|
-
|
|
803
|
+
default: false
|
|
943
804
|
},
|
|
944
805
|
{
|
|
945
806
|
name: 'bits',
|
|
946
807
|
description: 'Quantization bits (4, 8, 16)',
|
|
947
808
|
type: 'number',
|
|
948
|
-
|
|
809
|
+
default: 8
|
|
949
810
|
},
|
|
950
811
|
{
|
|
951
812
|
name: 'rebuild-index',
|
|
952
813
|
short: 'r',
|
|
953
814
|
description: 'Rebuild HNSW index after compression',
|
|
954
815
|
type: 'boolean',
|
|
955
|
-
|
|
816
|
+
default: true
|
|
956
817
|
}
|
|
957
818
|
],
|
|
958
819
|
examples: [
|
|
@@ -960,91 +821,80 @@ var compressCommand = {
|
|
|
960
821
|
{ command: 'claude-flow memory compress --quantize --bits 4', description: '4-bit quantization (32x reduction)' },
|
|
961
822
|
{ command: 'claude-flow memory compress -l max -t vectors', description: 'Max compression on vectors' }
|
|
962
823
|
],
|
|
963
|
-
action:
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
bits: bits,
|
|
988
|
-
rebuildIndex: rebuildIndex
|
|
989
|
-
})];
|
|
990
|
-
case 2:
|
|
991
|
-
result = _b.sent();
|
|
992
|
-
spinner.succeed('Compression complete');
|
|
993
|
-
if (ctx.flags.format === 'json') {
|
|
994
|
-
output.printJson(result);
|
|
995
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
996
|
-
}
|
|
997
|
-
output.writeln();
|
|
998
|
-
output.writeln(output.bold('Storage Comparison'));
|
|
999
|
-
output.printTable({
|
|
1000
|
-
columns: [
|
|
1001
|
-
{ key: 'category', header: 'Category', width: 15 },
|
|
1002
|
-
{ key: 'before', header: 'Before', width: 12, align: 'right' },
|
|
1003
|
-
{ key: 'after', header: 'After', width: 12, align: 'right' },
|
|
1004
|
-
{ key: 'saved', header: 'Saved', width: 12, align: 'right' }
|
|
1005
|
-
],
|
|
1006
|
-
data: [
|
|
1007
|
-
{ category: 'Vectors', before: result.before.vectorsSize, after: result.after.vectorsSize, saved: '-' },
|
|
1008
|
-
{ category: 'Text', before: result.before.textSize, after: result.after.textSize, saved: '-' },
|
|
1009
|
-
{ category: 'Patterns', before: result.before.patternsSize, after: result.after.patternsSize, saved: '-' },
|
|
1010
|
-
{ category: 'Index', before: result.before.indexSize, after: result.after.indexSize, saved: '-' },
|
|
1011
|
-
{ category: output.bold('Total'), before: result.before.totalSize, after: result.after.totalSize, saved: output.success(result.compression.formattedSaved) }
|
|
1012
|
-
]
|
|
1013
|
-
});
|
|
1014
|
-
output.writeln();
|
|
1015
|
-
output.printBox([
|
|
1016
|
-
"Compression Ratio: " + result.compression.ratio.toFixed(2) + "x",
|
|
1017
|
-
"Space Saved: " + result.compression.formattedSaved,
|
|
1018
|
-
"Quantization: " + (result.compression.quantizationApplied ? "Yes (" + bits + "-bit)" : 'No'),
|
|
1019
|
-
"Index Rebuilt: " + (result.compression.indexRebuilt ? 'Yes' : 'No'),
|
|
1020
|
-
"Duration: " + (result.duration / 1000).toFixed(1) + "s"
|
|
1021
|
-
].join('\n'), 'Results');
|
|
1022
|
-
if (result.performance) {
|
|
1023
|
-
output.writeln();
|
|
1024
|
-
output.writeln(output.bold('Performance Impact'));
|
|
1025
|
-
output.printList([
|
|
1026
|
-
"Search latency: " + result.performance.searchLatencyBefore.toFixed(2) + "ms \u2192 " + result.performance.searchLatencyAfter.toFixed(2) + "ms",
|
|
1027
|
-
"Speedup: " + output.success(result.performance.searchSpeedup)
|
|
1028
|
-
]);
|
|
1029
|
-
}
|
|
1030
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
1031
|
-
case 3:
|
|
1032
|
-
error_9 = _b.sent();
|
|
1033
|
-
spinner.fail('Compression failed');
|
|
1034
|
-
if (error_9 instanceof MCPClientError) {
|
|
1035
|
-
output.printError("Compression error: " + error_9.message);
|
|
1036
|
-
}
|
|
1037
|
-
else {
|
|
1038
|
-
output.printError("Unexpected error: " + String(error_9));
|
|
1039
|
-
}
|
|
1040
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
1041
|
-
case 4: return [2 /*return*/];
|
|
824
|
+
action: async (ctx) => {
|
|
825
|
+
const level = ctx.flags.level || 'balanced';
|
|
826
|
+
const target = ctx.flags.target || 'all';
|
|
827
|
+
const quantize = ctx.flags.quantize;
|
|
828
|
+
const bits = ctx.flags.bits || 8;
|
|
829
|
+
const rebuildIndex = ctx.flags.rebuildIndex ?? true;
|
|
830
|
+
output.writeln();
|
|
831
|
+
output.writeln(output.bold('Memory Compression'));
|
|
832
|
+
output.writeln(output.dim(`Level: ${level}, Target: ${target}, Quantize: ${quantize ? `${bits}-bit` : 'no'}`));
|
|
833
|
+
output.writeln();
|
|
834
|
+
const spinner = output.createSpinner({ text: 'Analyzing current storage...', spinner: 'dots' });
|
|
835
|
+
spinner.start();
|
|
836
|
+
try {
|
|
837
|
+
const result = await callMCPTool('memory_compress', {
|
|
838
|
+
level,
|
|
839
|
+
target,
|
|
840
|
+
quantize,
|
|
841
|
+
bits,
|
|
842
|
+
rebuildIndex,
|
|
843
|
+
});
|
|
844
|
+
spinner.succeed('Compression complete');
|
|
845
|
+
if (ctx.flags.format === 'json') {
|
|
846
|
+
output.printJson(result);
|
|
847
|
+
return { success: true, data: result };
|
|
1042
848
|
}
|
|
1043
|
-
|
|
1044
|
-
|
|
849
|
+
output.writeln();
|
|
850
|
+
output.writeln(output.bold('Storage Comparison'));
|
|
851
|
+
output.printTable({
|
|
852
|
+
columns: [
|
|
853
|
+
{ key: 'category', header: 'Category', width: 15 },
|
|
854
|
+
{ key: 'before', header: 'Before', width: 12, align: 'right' },
|
|
855
|
+
{ key: 'after', header: 'After', width: 12, align: 'right' },
|
|
856
|
+
{ key: 'saved', header: 'Saved', width: 12, align: 'right' }
|
|
857
|
+
],
|
|
858
|
+
data: [
|
|
859
|
+
{ category: 'Vectors', before: result.before.vectorsSize, after: result.after.vectorsSize, saved: '-' },
|
|
860
|
+
{ category: 'Text', before: result.before.textSize, after: result.after.textSize, saved: '-' },
|
|
861
|
+
{ category: 'Patterns', before: result.before.patternsSize, after: result.after.patternsSize, saved: '-' },
|
|
862
|
+
{ category: 'Index', before: result.before.indexSize, after: result.after.indexSize, saved: '-' },
|
|
863
|
+
{ category: output.bold('Total'), before: result.before.totalSize, after: result.after.totalSize, saved: output.success(result.compression.formattedSaved) }
|
|
864
|
+
]
|
|
865
|
+
});
|
|
866
|
+
output.writeln();
|
|
867
|
+
output.printBox([
|
|
868
|
+
`Compression Ratio: ${result.compression.ratio.toFixed(2)}x`,
|
|
869
|
+
`Space Saved: ${result.compression.formattedSaved}`,
|
|
870
|
+
`Quantization: ${result.compression.quantizationApplied ? `Yes (${bits}-bit)` : 'No'}`,
|
|
871
|
+
`Index Rebuilt: ${result.compression.indexRebuilt ? 'Yes' : 'No'}`,
|
|
872
|
+
`Duration: ${(result.duration / 1000).toFixed(1)}s`
|
|
873
|
+
].join('\n'), 'Results');
|
|
874
|
+
if (result.performance) {
|
|
875
|
+
output.writeln();
|
|
876
|
+
output.writeln(output.bold('Performance Impact'));
|
|
877
|
+
output.printList([
|
|
878
|
+
`Search latency: ${result.performance.searchLatencyBefore.toFixed(2)}ms → ${result.performance.searchLatencyAfter.toFixed(2)}ms`,
|
|
879
|
+
`Speedup: ${output.success(result.performance.searchSpeedup)}`
|
|
880
|
+
]);
|
|
881
|
+
}
|
|
882
|
+
return { success: true, data: result };
|
|
883
|
+
}
|
|
884
|
+
catch (error) {
|
|
885
|
+
spinner.fail('Compression failed');
|
|
886
|
+
if (error instanceof MCPClientError) {
|
|
887
|
+
output.printError(`Compression error: ${error.message}`);
|
|
888
|
+
}
|
|
889
|
+
else {
|
|
890
|
+
output.printError(`Unexpected error: ${String(error)}`);
|
|
891
|
+
}
|
|
892
|
+
return { success: false, exitCode: 1 };
|
|
893
|
+
}
|
|
894
|
+
}
|
|
1045
895
|
};
|
|
1046
896
|
// Export command
|
|
1047
|
-
|
|
897
|
+
const exportCommand = {
|
|
1048
898
|
name: 'export',
|
|
1049
899
|
description: 'Export memory to file',
|
|
1050
900
|
options: [
|
|
@@ -1061,7 +911,7 @@ var exportCommand = {
|
|
|
1061
911
|
description: 'Export format (json, csv, binary)',
|
|
1062
912
|
type: 'string',
|
|
1063
913
|
choices: ['json', 'csv', 'binary'],
|
|
1064
|
-
|
|
914
|
+
default: 'json'
|
|
1065
915
|
},
|
|
1066
916
|
{
|
|
1067
917
|
name: 'namespace',
|
|
@@ -1073,61 +923,50 @@ var exportCommand = {
|
|
|
1073
923
|
name: 'include-vectors',
|
|
1074
924
|
description: 'Include vector embeddings',
|
|
1075
925
|
type: 'boolean',
|
|
1076
|
-
|
|
926
|
+
default: true
|
|
1077
927
|
}
|
|
1078
928
|
],
|
|
1079
929
|
examples: [
|
|
1080
930
|
{ command: 'claude-flow memory export -o ./backup.json', description: 'Export all to JSON' },
|
|
1081
931
|
{ command: 'claude-flow memory export -o ./data.csv -f csv', description: 'Export to CSV' }
|
|
1082
932
|
],
|
|
1083
|
-
action:
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
"Vectors: " + result.exported.vectors,
|
|
1111
|
-
"Patterns: " + result.exported.patterns,
|
|
1112
|
-
"File size: " + result.fileSize
|
|
1113
|
-
]);
|
|
1114
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
1115
|
-
case 3:
|
|
1116
|
-
error_10 = _b.sent();
|
|
1117
|
-
if (error_10 instanceof MCPClientError) {
|
|
1118
|
-
output.printError("Export error: " + error_10.message);
|
|
1119
|
-
}
|
|
1120
|
-
else {
|
|
1121
|
-
output.printError("Unexpected error: " + String(error_10));
|
|
1122
|
-
}
|
|
1123
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
1124
|
-
case 4: return [2 /*return*/];
|
|
933
|
+
action: async (ctx) => {
|
|
934
|
+
const outputPath = ctx.flags.output;
|
|
935
|
+
const format = ctx.flags.format || 'json';
|
|
936
|
+
if (!outputPath) {
|
|
937
|
+
output.printError('Output path is required. Use --output or -o');
|
|
938
|
+
return { success: false, exitCode: 1 };
|
|
939
|
+
}
|
|
940
|
+
output.printInfo(`Exporting memory to ${outputPath}...`);
|
|
941
|
+
try {
|
|
942
|
+
const result = await callMCPTool('memory_export', {
|
|
943
|
+
outputPath,
|
|
944
|
+
format,
|
|
945
|
+
namespace: ctx.flags.namespace,
|
|
946
|
+
includeVectors: ctx.flags.includeVectors ?? true,
|
|
947
|
+
});
|
|
948
|
+
output.printSuccess(`Exported to ${result.outputPath}`);
|
|
949
|
+
output.printList([
|
|
950
|
+
`Entries: ${result.exported.entries}`,
|
|
951
|
+
`Vectors: ${result.exported.vectors}`,
|
|
952
|
+
`Patterns: ${result.exported.patterns}`,
|
|
953
|
+
`File size: ${result.fileSize}`
|
|
954
|
+
]);
|
|
955
|
+
return { success: true, data: result };
|
|
956
|
+
}
|
|
957
|
+
catch (error) {
|
|
958
|
+
if (error instanceof MCPClientError) {
|
|
959
|
+
output.printError(`Export error: ${error.message}`);
|
|
1125
960
|
}
|
|
1126
|
-
|
|
1127
|
-
|
|
961
|
+
else {
|
|
962
|
+
output.printError(`Unexpected error: ${String(error)}`);
|
|
963
|
+
}
|
|
964
|
+
return { success: false, exitCode: 1 };
|
|
965
|
+
}
|
|
966
|
+
}
|
|
1128
967
|
};
|
|
1129
968
|
// Import command
|
|
1130
|
-
|
|
969
|
+
const importCommand = {
|
|
1131
970
|
name: 'import',
|
|
1132
971
|
description: 'Import memory from file',
|
|
1133
972
|
options: [
|
|
@@ -1143,7 +982,7 @@ var importCommand = {
|
|
|
1143
982
|
short: 'm',
|
|
1144
983
|
description: 'Merge with existing (skip duplicates)',
|
|
1145
984
|
type: 'boolean',
|
|
1146
|
-
|
|
985
|
+
default: true
|
|
1147
986
|
},
|
|
1148
987
|
{
|
|
1149
988
|
name: 'namespace',
|
|
@@ -1156,53 +995,42 @@ var importCommand = {
|
|
|
1156
995
|
{ command: 'claude-flow memory import -i ./backup.json', description: 'Import from file' },
|
|
1157
996
|
{ command: 'claude-flow memory import -i ./data.json -n archive', description: 'Import to namespace' }
|
|
1158
997
|
],
|
|
1159
|
-
action:
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
"Patterns: " + result.imported.patterns,
|
|
1186
|
-
"Skipped (duplicates): " + result.skipped,
|
|
1187
|
-
"Duration: " + result.duration + "ms"
|
|
1188
|
-
]);
|
|
1189
|
-
return [2 /*return*/, { success: true, data: result }];
|
|
1190
|
-
case 3:
|
|
1191
|
-
error_11 = _b.sent();
|
|
1192
|
-
if (error_11 instanceof MCPClientError) {
|
|
1193
|
-
output.printError("Import error: " + error_11.message);
|
|
1194
|
-
}
|
|
1195
|
-
else {
|
|
1196
|
-
output.printError("Unexpected error: " + String(error_11));
|
|
1197
|
-
}
|
|
1198
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
1199
|
-
case 4: return [2 /*return*/];
|
|
998
|
+
action: async (ctx) => {
|
|
999
|
+
const inputPath = ctx.flags.input || ctx.args[0];
|
|
1000
|
+
if (!inputPath) {
|
|
1001
|
+
output.printError('Input path is required. Use --input or -i');
|
|
1002
|
+
return { success: false, exitCode: 1 };
|
|
1003
|
+
}
|
|
1004
|
+
output.printInfo(`Importing memory from ${inputPath}...`);
|
|
1005
|
+
try {
|
|
1006
|
+
const result = await callMCPTool('memory_import', {
|
|
1007
|
+
inputPath,
|
|
1008
|
+
merge: ctx.flags.merge ?? true,
|
|
1009
|
+
namespace: ctx.flags.namespace,
|
|
1010
|
+
});
|
|
1011
|
+
output.printSuccess(`Imported from ${result.inputPath}`);
|
|
1012
|
+
output.printList([
|
|
1013
|
+
`Entries: ${result.imported.entries}`,
|
|
1014
|
+
`Vectors: ${result.imported.vectors}`,
|
|
1015
|
+
`Patterns: ${result.imported.patterns}`,
|
|
1016
|
+
`Skipped (duplicates): ${result.skipped}`,
|
|
1017
|
+
`Duration: ${result.duration}ms`
|
|
1018
|
+
]);
|
|
1019
|
+
return { success: true, data: result };
|
|
1020
|
+
}
|
|
1021
|
+
catch (error) {
|
|
1022
|
+
if (error instanceof MCPClientError) {
|
|
1023
|
+
output.printError(`Import error: ${error.message}`);
|
|
1200
1024
|
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1025
|
+
else {
|
|
1026
|
+
output.printError(`Unexpected error: ${String(error)}`);
|
|
1027
|
+
}
|
|
1028
|
+
return { success: false, exitCode: 1 };
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1203
1031
|
};
|
|
1204
1032
|
// Init subcommand - initialize memory database using sql.js
|
|
1205
|
-
|
|
1033
|
+
const initMemoryCommand = {
|
|
1206
1034
|
name: 'init',
|
|
1207
1035
|
description: 'Initialize memory database with sql.js (WASM SQLite) - includes vector embeddings, pattern learning, temporal decay',
|
|
1208
1036
|
options: [
|
|
@@ -1211,7 +1039,7 @@ var initMemoryCommand = {
|
|
|
1211
1039
|
short: 'b',
|
|
1212
1040
|
description: 'Backend type: hybrid (default), sqlite, or agentdb',
|
|
1213
1041
|
type: 'string',
|
|
1214
|
-
|
|
1042
|
+
default: 'hybrid'
|
|
1215
1043
|
},
|
|
1216
1044
|
{
|
|
1217
1045
|
name: 'path',
|
|
@@ -1224,25 +1052,25 @@ var initMemoryCommand = {
|
|
|
1224
1052
|
short: 'f',
|
|
1225
1053
|
description: 'Overwrite existing database',
|
|
1226
1054
|
type: 'boolean',
|
|
1227
|
-
|
|
1055
|
+
default: false
|
|
1228
1056
|
},
|
|
1229
1057
|
{
|
|
1230
1058
|
name: 'verbose',
|
|
1231
1059
|
description: 'Show detailed initialization output',
|
|
1232
1060
|
type: 'boolean',
|
|
1233
|
-
|
|
1061
|
+
default: false
|
|
1234
1062
|
},
|
|
1235
1063
|
{
|
|
1236
1064
|
name: 'verify',
|
|
1237
1065
|
description: 'Run verification tests after initialization',
|
|
1238
1066
|
type: 'boolean',
|
|
1239
|
-
|
|
1067
|
+
default: true
|
|
1240
1068
|
},
|
|
1241
1069
|
{
|
|
1242
1070
|
name: 'load-embeddings',
|
|
1243
1071
|
description: 'Pre-load ONNX embedding model (lazy by default)',
|
|
1244
1072
|
type: 'boolean',
|
|
1245
|
-
|
|
1073
|
+
default: false
|
|
1246
1074
|
}
|
|
1247
1075
|
],
|
|
1248
1076
|
examples: [
|
|
@@ -1251,201 +1079,182 @@ var initMemoryCommand = {
|
|
|
1251
1079
|
{ command: 'claude-flow memory init -p ./data/memory.db --force', description: 'Reinitialize at custom path' },
|
|
1252
1080
|
{ command: 'claude-flow memory init --verbose --verify', description: 'Initialize with full verification' }
|
|
1253
1081
|
],
|
|
1254
|
-
action:
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1082
|
+
action: async (ctx) => {
|
|
1083
|
+
const backend = ctx.flags.backend || 'hybrid';
|
|
1084
|
+
const customPath = ctx.flags.path;
|
|
1085
|
+
const force = ctx.flags.force;
|
|
1086
|
+
const verbose = ctx.flags.verbose;
|
|
1087
|
+
const verify = ctx.flags.verify !== false; // Default true
|
|
1088
|
+
const loadEmbeddings = ctx.flags.loadEmbeddings;
|
|
1089
|
+
output.writeln();
|
|
1090
|
+
output.writeln(output.bold('Initializing Memory Database'));
|
|
1091
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
1092
|
+
const spinner = output.createSpinner({ text: 'Initializing schema...', spinner: 'dots' });
|
|
1093
|
+
spinner.start();
|
|
1094
|
+
try {
|
|
1095
|
+
// Import the memory initializer
|
|
1096
|
+
const { initializeMemoryDatabase, loadEmbeddingModel, verifyMemoryInit } = await import('../memory/memory-initializer.js');
|
|
1097
|
+
const result = await initializeMemoryDatabase({
|
|
1098
|
+
backend,
|
|
1099
|
+
dbPath: customPath,
|
|
1100
|
+
force,
|
|
1101
|
+
verbose
|
|
1102
|
+
});
|
|
1103
|
+
if (!result.success) {
|
|
1104
|
+
spinner.fail('Initialization failed');
|
|
1105
|
+
output.printError(result.error || 'Unknown error');
|
|
1106
|
+
return { success: false, exitCode: 1 };
|
|
1107
|
+
}
|
|
1108
|
+
spinner.succeed('Schema initialized');
|
|
1109
|
+
// Lazy load or pre-load embedding model
|
|
1110
|
+
if (loadEmbeddings) {
|
|
1111
|
+
const embeddingSpinner = output.createSpinner({ text: 'Loading embedding model...', spinner: 'dots' });
|
|
1112
|
+
embeddingSpinner.start();
|
|
1113
|
+
const embeddingResult = await loadEmbeddingModel({ verbose });
|
|
1114
|
+
if (embeddingResult.success) {
|
|
1115
|
+
embeddingSpinner.succeed(`Embedding model loaded: ${embeddingResult.modelName} (${embeddingResult.dimensions}-dim, ${embeddingResult.loadTime}ms)`);
|
|
1116
|
+
}
|
|
1117
|
+
else {
|
|
1118
|
+
embeddingSpinner.stop(output.warning(`Embedding model: ${embeddingResult.error || 'Using fallback'}`));
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
output.writeln();
|
|
1122
|
+
// Show features enabled with detailed capabilities
|
|
1123
|
+
const featureLines = [
|
|
1124
|
+
`Backend: ${result.backend}`,
|
|
1125
|
+
`Schema Version: ${result.schemaVersion}`,
|
|
1126
|
+
`Database Path: ${result.dbPath}`,
|
|
1127
|
+
'',
|
|
1128
|
+
output.bold('Features:'),
|
|
1129
|
+
` Vector Embeddings: ${result.features.vectorEmbeddings ? output.success('✓ Enabled') : output.dim('✗ Disabled')}`,
|
|
1130
|
+
` Pattern Learning: ${result.features.patternLearning ? output.success('✓ Enabled') : output.dim('✗ Disabled')}`,
|
|
1131
|
+
` Temporal Decay: ${result.features.temporalDecay ? output.success('✓ Enabled') : output.dim('✗ Disabled')}`,
|
|
1132
|
+
` HNSW Indexing: ${result.features.hnswIndexing ? output.success('✓ Enabled') : output.dim('✗ Disabled')}`,
|
|
1133
|
+
` Migration Tracking: ${result.features.migrationTracking ? output.success('✓ Enabled') : output.dim('✗ Disabled')}`
|
|
1134
|
+
];
|
|
1135
|
+
if (verbose) {
|
|
1136
|
+
featureLines.push('', output.bold('HNSW Configuration:'), ` M (connections): 16`, ` ef (construction): 200`, ` ef (search): 100`, ` Metric: cosine`, '', output.bold('Pattern Learning:'), ` Confidence scoring: 0.0 - 1.0`, ` Temporal decay: Half-life 30 days`, ` Pattern versioning: Enabled`, ` Types: task-routing, error-recovery, optimization, coordination, prediction`);
|
|
1137
|
+
}
|
|
1138
|
+
output.printBox(featureLines.join('\n'), 'Configuration');
|
|
1139
|
+
output.writeln();
|
|
1140
|
+
// ADR-053: Show ControllerRegistry activation results
|
|
1141
|
+
if (result.controllers) {
|
|
1142
|
+
const { activated, failed, initTimeMs } = result.controllers;
|
|
1143
|
+
if (activated.length > 0 || failed.length > 0) {
|
|
1144
|
+
const controllerLines = [
|
|
1145
|
+
output.bold('AgentDB Controllers:'),
|
|
1146
|
+
` Activated: ${activated.length} Failed: ${failed.length} Init: ${Math.round(initTimeMs)}ms`,
|
|
1316
1147
|
];
|
|
1317
|
-
if (verbose) {
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
output.writeln();
|
|
1322
|
-
// ADR-053: Show ControllerRegistry activation results
|
|
1323
|
-
if (result.controllers) {
|
|
1324
|
-
_b = result.controllers, activated = _b.activated, failed = _b.failed, initTimeMs = _b.initTimeMs;
|
|
1325
|
-
if (activated.length > 0 || failed.length > 0) {
|
|
1326
|
-
controllerLines = [
|
|
1327
|
-
output.bold('AgentDB Controllers:'),
|
|
1328
|
-
" Activated: " + activated.length + " Failed: " + failed.length + " Init: " + Math.round(initTimeMs) + "ms",
|
|
1329
|
-
];
|
|
1330
|
-
if (verbose && activated.length > 0) {
|
|
1331
|
-
controllerLines.push('');
|
|
1332
|
-
for (_i = 0, activated_1 = activated; _i < activated_1.length; _i++) {
|
|
1333
|
-
name = activated_1[_i];
|
|
1334
|
-
controllerLines.push(" " + output.success('✓') + " " + name);
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
if (failed.length > 0 && verbose) {
|
|
1338
|
-
controllerLines.push('');
|
|
1339
|
-
for (_c = 0, failed_1 = failed; _c < failed_1.length; _c++) {
|
|
1340
|
-
name = failed_1[_c];
|
|
1341
|
-
controllerLines.push(" " + output.dim('✗') + " " + name);
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
output.printBox(controllerLines.join('\n'), 'Controller Registry (ADR-053)');
|
|
1345
|
-
output.writeln();
|
|
1148
|
+
if (verbose && activated.length > 0) {
|
|
1149
|
+
controllerLines.push('');
|
|
1150
|
+
for (const name of activated) {
|
|
1151
|
+
controllerLines.push(` ${output.success('✓')} ${name}`);
|
|
1346
1152
|
}
|
|
1347
1153
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
columns: [
|
|
1353
|
-
{ key: 'table', header: 'Table', width: 22 },
|
|
1354
|
-
{ key: 'purpose', header: 'Purpose', width: 38 }
|
|
1355
|
-
],
|
|
1356
|
-
data: [
|
|
1357
|
-
{ table: 'memory_entries', purpose: 'Core memory storage with embeddings' },
|
|
1358
|
-
{ table: 'patterns', purpose: 'Learned patterns with confidence scores' },
|
|
1359
|
-
{ table: 'pattern_history', purpose: 'Pattern versioning and evolution' },
|
|
1360
|
-
{ table: 'trajectories', purpose: 'SONA learning trajectories' },
|
|
1361
|
-
{ table: 'trajectory_steps', purpose: 'Individual trajectory steps' },
|
|
1362
|
-
{ table: 'migration_state', purpose: 'Migration progress tracking' },
|
|
1363
|
-
{ table: 'sessions', purpose: 'Context persistence' },
|
|
1364
|
-
{ table: 'vector_indexes', purpose: 'HNSW index configuration' },
|
|
1365
|
-
{ table: 'metadata', purpose: 'System metadata' }
|
|
1366
|
-
]
|
|
1367
|
-
});
|
|
1368
|
-
output.writeln();
|
|
1369
|
-
output.writeln(output.bold('Indexes Created:'));
|
|
1370
|
-
output.printList(result.indexesCreated.slice(0, 8).map(function (idx) { return output.dim(idx); }));
|
|
1371
|
-
if (result.indexesCreated.length > 8) {
|
|
1372
|
-
output.writeln(output.dim(" ... and " + (result.indexesCreated.length - 8) + " more"));
|
|
1154
|
+
if (failed.length > 0 && verbose) {
|
|
1155
|
+
controllerLines.push('');
|
|
1156
|
+
for (const name of failed) {
|
|
1157
|
+
controllerLines.push(` ${output.dim('✗')} ${name}`);
|
|
1373
1158
|
}
|
|
1374
|
-
output.writeln();
|
|
1375
|
-
}
|
|
1376
|
-
if (!verify) return [3 /*break*/, 7];
|
|
1377
|
-
verifySpinner = output.createSpinner({ text: 'Verifying initialization...', spinner: 'dots' });
|
|
1378
|
-
verifySpinner.start();
|
|
1379
|
-
return [4 /*yield*/, verifyMemoryInit(result.dbPath, { verbose: verbose })];
|
|
1380
|
-
case 6:
|
|
1381
|
-
verification = _d.sent();
|
|
1382
|
-
if (verification.success) {
|
|
1383
|
-
verifySpinner.succeed("Verification passed (" + verification.summary.passed + "/" + verification.summary.total + " tests)");
|
|
1384
|
-
}
|
|
1385
|
-
else {
|
|
1386
|
-
verifySpinner.fail("Verification failed (" + verification.summary.failed + "/" + verification.summary.total + " tests failed)");
|
|
1387
|
-
}
|
|
1388
|
-
if (verbose || !verification.success) {
|
|
1389
|
-
output.writeln();
|
|
1390
|
-
output.writeln(output.bold('Verification Results:'));
|
|
1391
|
-
output.printTable({
|
|
1392
|
-
columns: [
|
|
1393
|
-
{ key: 'status', header: '', width: 3 },
|
|
1394
|
-
{ key: 'name', header: 'Test', width: 22 },
|
|
1395
|
-
{ key: 'details', header: 'Details', width: 30 },
|
|
1396
|
-
{ key: 'duration', header: 'Time', width: 8, align: 'right' }
|
|
1397
|
-
],
|
|
1398
|
-
data: verification.tests.map(function (t) { return ({
|
|
1399
|
-
status: t.passed ? output.success('✓') : output.error('✗'),
|
|
1400
|
-
name: t.name,
|
|
1401
|
-
details: t.details || '',
|
|
1402
|
-
duration: t.duration ? t.duration + "ms" : '-'
|
|
1403
|
-
}); })
|
|
1404
|
-
});
|
|
1405
1159
|
}
|
|
1160
|
+
output.printBox(controllerLines.join('\n'), 'Controller Registry (ADR-053)');
|
|
1406
1161
|
output.writeln();
|
|
1407
|
-
|
|
1408
|
-
case 7:
|
|
1409
|
-
// Show next steps
|
|
1410
|
-
output.writeln(output.bold('Next Steps:'));
|
|
1411
|
-
output.printList([
|
|
1412
|
-
"Store data: " + output.highlight('claude-flow memory store -k "key" --value "data"'),
|
|
1413
|
-
"Search: " + output.highlight('claude-flow memory search -q "query"'),
|
|
1414
|
-
"Train patterns: " + output.highlight('claude-flow neural train -p coordination'),
|
|
1415
|
-
"View stats: " + output.highlight('claude-flow memory stats')
|
|
1416
|
-
]);
|
|
1417
|
-
return [4 /*yield*/, import('fs')];
|
|
1418
|
-
case 8:
|
|
1419
|
-
fs = _d.sent();
|
|
1420
|
-
return [4 /*yield*/, import('path')];
|
|
1421
|
-
case 9:
|
|
1422
|
-
path = _d.sent();
|
|
1423
|
-
claudeDir = path.join(process.cwd(), '.claude');
|
|
1424
|
-
claudeDbPath = path.join(claudeDir, 'memory.db');
|
|
1425
|
-
if (!fs.existsSync(claudeDir)) {
|
|
1426
|
-
fs.mkdirSync(claudeDir, { recursive: true });
|
|
1427
|
-
}
|
|
1428
|
-
if (fs.existsSync(result.dbPath) && (!fs.existsSync(claudeDbPath) || force)) {
|
|
1429
|
-
fs.copyFileSync(result.dbPath, claudeDbPath);
|
|
1430
|
-
output.writeln();
|
|
1431
|
-
output.writeln(output.dim("Synced to: " + claudeDbPath));
|
|
1432
|
-
}
|
|
1433
|
-
return [2 /*return*/, {
|
|
1434
|
-
success: true,
|
|
1435
|
-
data: result
|
|
1436
|
-
}];
|
|
1437
|
-
case 10:
|
|
1438
|
-
error_12 = _d.sent();
|
|
1439
|
-
spinner.fail('Initialization failed');
|
|
1440
|
-
output.printError("Failed to initialize memory: " + (error_12 instanceof Error ? error_12.message : String(error_12)));
|
|
1441
|
-
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
1442
|
-
case 11: return [2 /*return*/];
|
|
1162
|
+
}
|
|
1443
1163
|
}
|
|
1444
|
-
|
|
1445
|
-
|
|
1164
|
+
// Show tables created
|
|
1165
|
+
if (verbose && result.tablesCreated.length > 0) {
|
|
1166
|
+
output.writeln(output.bold('Tables Created:'));
|
|
1167
|
+
output.printTable({
|
|
1168
|
+
columns: [
|
|
1169
|
+
{ key: 'table', header: 'Table', width: 22 },
|
|
1170
|
+
{ key: 'purpose', header: 'Purpose', width: 38 }
|
|
1171
|
+
],
|
|
1172
|
+
data: [
|
|
1173
|
+
{ table: 'memory_entries', purpose: 'Core memory storage with embeddings' },
|
|
1174
|
+
{ table: 'patterns', purpose: 'Learned patterns with confidence scores' },
|
|
1175
|
+
{ table: 'pattern_history', purpose: 'Pattern versioning and evolution' },
|
|
1176
|
+
{ table: 'trajectories', purpose: 'SONA learning trajectories' },
|
|
1177
|
+
{ table: 'trajectory_steps', purpose: 'Individual trajectory steps' },
|
|
1178
|
+
{ table: 'migration_state', purpose: 'Migration progress tracking' },
|
|
1179
|
+
{ table: 'sessions', purpose: 'Context persistence' },
|
|
1180
|
+
{ table: 'vector_indexes', purpose: 'HNSW index configuration' },
|
|
1181
|
+
{ table: 'metadata', purpose: 'System metadata' }
|
|
1182
|
+
]
|
|
1183
|
+
});
|
|
1184
|
+
output.writeln();
|
|
1185
|
+
output.writeln(output.bold('Indexes Created:'));
|
|
1186
|
+
output.printList(result.indexesCreated.slice(0, 8).map(idx => output.dim(idx)));
|
|
1187
|
+
if (result.indexesCreated.length > 8) {
|
|
1188
|
+
output.writeln(output.dim(` ... and ${result.indexesCreated.length - 8} more`));
|
|
1189
|
+
}
|
|
1190
|
+
output.writeln();
|
|
1191
|
+
}
|
|
1192
|
+
// Run verification if enabled
|
|
1193
|
+
if (verify) {
|
|
1194
|
+
const verifySpinner = output.createSpinner({ text: 'Verifying initialization...', spinner: 'dots' });
|
|
1195
|
+
verifySpinner.start();
|
|
1196
|
+
const verification = await verifyMemoryInit(result.dbPath, { verbose });
|
|
1197
|
+
if (verification.success) {
|
|
1198
|
+
verifySpinner.succeed(`Verification passed (${verification.summary.passed}/${verification.summary.total} tests)`);
|
|
1199
|
+
}
|
|
1200
|
+
else {
|
|
1201
|
+
verifySpinner.fail(`Verification failed (${verification.summary.failed}/${verification.summary.total} tests failed)`);
|
|
1202
|
+
}
|
|
1203
|
+
if (verbose || !verification.success) {
|
|
1204
|
+
output.writeln();
|
|
1205
|
+
output.writeln(output.bold('Verification Results:'));
|
|
1206
|
+
output.printTable({
|
|
1207
|
+
columns: [
|
|
1208
|
+
{ key: 'status', header: '', width: 3 },
|
|
1209
|
+
{ key: 'name', header: 'Test', width: 22 },
|
|
1210
|
+
{ key: 'details', header: 'Details', width: 30 },
|
|
1211
|
+
{ key: 'duration', header: 'Time', width: 8, align: 'right' }
|
|
1212
|
+
],
|
|
1213
|
+
data: verification.tests.map(t => ({
|
|
1214
|
+
status: t.passed ? output.success('✓') : output.error('✗'),
|
|
1215
|
+
name: t.name,
|
|
1216
|
+
details: t.details || '',
|
|
1217
|
+
duration: t.duration ? `${t.duration}ms` : '-'
|
|
1218
|
+
}))
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
output.writeln();
|
|
1222
|
+
}
|
|
1223
|
+
// Show next steps
|
|
1224
|
+
output.writeln(output.bold('Next Steps:'));
|
|
1225
|
+
output.printList([
|
|
1226
|
+
`Store data: ${output.highlight('claude-flow memory store -k "key" --value "data"')}`,
|
|
1227
|
+
`Search: ${output.highlight('claude-flow memory search -q "query"')}`,
|
|
1228
|
+
`Train patterns: ${output.highlight('claude-flow neural train -p coordination')}`,
|
|
1229
|
+
`View stats: ${output.highlight('claude-flow memory stats')}`
|
|
1230
|
+
]);
|
|
1231
|
+
// Also sync to .claude directory
|
|
1232
|
+
const fs = await import('fs');
|
|
1233
|
+
const path = await import('path');
|
|
1234
|
+
const claudeDir = path.join(process.cwd(), '.claude');
|
|
1235
|
+
const claudeDbPath = path.join(claudeDir, 'memory.db');
|
|
1236
|
+
if (!fs.existsSync(claudeDir)) {
|
|
1237
|
+
fs.mkdirSync(claudeDir, { recursive: true });
|
|
1238
|
+
}
|
|
1239
|
+
if (fs.existsSync(result.dbPath) && (!fs.existsSync(claudeDbPath) || force)) {
|
|
1240
|
+
fs.copyFileSync(result.dbPath, claudeDbPath);
|
|
1241
|
+
output.writeln();
|
|
1242
|
+
output.writeln(output.dim(`Synced to: ${claudeDbPath}`));
|
|
1243
|
+
}
|
|
1244
|
+
return {
|
|
1245
|
+
success: true,
|
|
1246
|
+
data: result
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
catch (error) {
|
|
1250
|
+
spinner.fail('Initialization failed');
|
|
1251
|
+
output.printError(`Failed to initialize memory: ${error instanceof Error ? error.message : String(error)}`);
|
|
1252
|
+
return { success: false, exitCode: 1 };
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1446
1255
|
};
|
|
1447
1256
|
// Main memory command
|
|
1448
|
-
export
|
|
1257
|
+
export const memoryCommand = {
|
|
1449
1258
|
name: 'memory',
|
|
1450
1259
|
description: 'Memory management commands',
|
|
1451
1260
|
subcommands: [initMemoryCommand, storeCommand, retrieveCommand, searchCommand, listCommand, deleteCommand, statsCommand, configureCommand, cleanupCommand, compressCommand, exportCommand, importCommand],
|
|
@@ -1455,31 +1264,29 @@ export var memoryCommand = {
|
|
|
1455
1264
|
{ command: 'claude-flow memory search -q "auth patterns"', description: 'Search memory' },
|
|
1456
1265
|
{ command: 'claude-flow memory stats', description: 'Show statistics' }
|
|
1457
1266
|
],
|
|
1458
|
-
action:
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
output.
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
});
|
|
1482
|
-
}); }
|
|
1267
|
+
action: async (ctx) => {
|
|
1268
|
+
output.writeln();
|
|
1269
|
+
output.writeln(output.bold('Memory Management Commands'));
|
|
1270
|
+
output.writeln();
|
|
1271
|
+
output.writeln('Usage: claude-flow memory <subcommand> [options]');
|
|
1272
|
+
output.writeln();
|
|
1273
|
+
output.writeln('Subcommands:');
|
|
1274
|
+
output.printList([
|
|
1275
|
+
`${output.highlight('init')} - Initialize memory database (sql.js)`,
|
|
1276
|
+
`${output.highlight('store')} - Store data in memory`,
|
|
1277
|
+
`${output.highlight('retrieve')} - Retrieve data from memory`,
|
|
1278
|
+
`${output.highlight('search')} - Semantic/vector search`,
|
|
1279
|
+
`${output.highlight('list')} - List memory entries`,
|
|
1280
|
+
`${output.highlight('delete')} - Delete memory entry`,
|
|
1281
|
+
`${output.highlight('stats')} - Show statistics`,
|
|
1282
|
+
`${output.highlight('configure')} - Configure backend`,
|
|
1283
|
+
`${output.highlight('cleanup')} - Clean expired entries`,
|
|
1284
|
+
`${output.highlight('compress')} - Compress database`,
|
|
1285
|
+
`${output.highlight('export')} - Export memory to file`,
|
|
1286
|
+
`${output.highlight('import')} - Import from file`
|
|
1287
|
+
]);
|
|
1288
|
+
return { success: true };
|
|
1289
|
+
}
|
|
1483
1290
|
};
|
|
1484
1291
|
export default memoryCommand;
|
|
1485
1292
|
//# sourceMappingURL=memory.js.map
|