kynjal-cli 3.1.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/core/coder.md +1 -1
- package/.claude/agents/core/planner.md +2 -2
- package/.claude/agents/core/researcher.md +1 -1
- package/.claude/agents/core/reviewer.md +1 -1
- package/.claude/agents/core/tester.md +1 -1
- package/.claude/agents/data/data-ml-model.md +4 -4
- package/.claude/agents/development/dev-backend-api.md +4 -4
- package/.claude/agents/documentation/docs-api-openapi.md +4 -4
- package/.claude/agents/github/code-review-swarm.md +2 -2
- package/.claude/agents/github/issue-tracker.md +2 -2
- package/.claude/agents/github/pr-manager.md +2 -2
- package/.claude/agents/github/release-manager.md +2 -2
- package/.claude/agents/github/workflow-automation.md +2 -2
- package/.claude/agents/sparc/architecture.md +3 -3
- package/.claude/agents/sparc/pseudocode.md +2 -2
- package/.claude/agents/sparc/refinement.md +3 -3
- package/.claude/agents/sparc/specification.md +2 -2
- package/.claude/agents/swarm/adaptive-coordinator.md +1 -1
- package/.claude/agents/swarm/hierarchical-coordinator.md +1 -1
- package/.claude/agents/swarm/mesh-coordinator.md +1 -1
- package/.claude/agents/templates/base-template-generator.md +25 -4
- package/.claude/agents/templates/sparc-coordinator.md +3 -3
- package/.claude/helpers/auto-commit.sh +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +27 -9
- package/.claude/helpers/hook-handler.cjs +58 -18
- package/.claude/helpers/statusline.cjs +14 -33
- package/.claude/helpers/statusline.js +3 -3
- package/.claude/settings.json +9 -9
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
- package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
- package/README.md +383 -170
- package/bin/cli.js +6 -6
- package/bin/mcp-server.js +1 -1
- package/bin/preinstall.cjs +2 -0
- package/dist/src/appliance/gguf-engine.js +664 -0
- package/dist/src/appliance/gguf-engine.js.map +1 -0
- package/dist/src/appliance/ruvllm-bridge.js +492 -0
- package/dist/src/appliance/ruvllm-bridge.js.map +1 -0
- package/dist/src/appliance/rvfa-builder.js +383 -0
- package/dist/src/appliance/rvfa-builder.js.map +1 -0
- package/dist/src/appliance/rvfa-distribution.js +533 -0
- package/dist/src/appliance/rvfa-distribution.js.map +1 -0
- package/dist/src/appliance/rvfa-format.js +465 -0
- package/dist/src/appliance/rvfa-format.js.map +1 -0
- package/dist/src/appliance/rvfa-runner.js +373 -0
- package/dist/src/appliance/rvfa-runner.js.map +1 -0
- package/dist/src/appliance/rvfa-signing.js +469 -0
- package/dist/src/appliance/rvfa-signing.js.map +1 -0
- package/dist/src/benchmarks/pretrain/index.js +542 -331
- package/dist/src/benchmarks/pretrain/index.js.map +1 -1
- package/dist/src/commands/agent.d.ts.map +1 -1
- package/dist/src/commands/agent.js +725 -502
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.js +1548 -1218
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/appliance-advanced.d.ts +9 -0
- package/dist/src/commands/appliance-advanced.d.ts.map +1 -0
- package/dist/src/commands/appliance-advanced.js +324 -0
- package/dist/src/commands/appliance-advanced.js.map +1 -0
- package/dist/src/commands/appliance.d.ts +8 -0
- package/dist/src/commands/appliance.d.ts.map +1 -0
- package/dist/src/commands/appliance.js +581 -0
- package/dist/src/commands/appliance.js.map +1 -0
- package/dist/src/commands/benchmark.js +523 -372
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/claims.js +364 -274
- package/dist/src/commands/claims.js.map +1 -1
- package/dist/src/commands/cleanup.d.ts +13 -0
- package/dist/src/commands/cleanup.d.ts.map +1 -0
- package/dist/src/commands/cleanup.js +262 -0
- package/dist/src/commands/cleanup.js.map +1 -0
- package/dist/src/commands/completions.js +118 -477
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +303 -237
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.d.ts.map +1 -1
- package/dist/src/commands/daemon.js +597 -425
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/deployment.js +275 -194
- package/dist/src/commands/deployment.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +690 -460
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/embeddings.js +1543 -1293
- package/dist/src/commands/embeddings.js.map +1 -1
- package/dist/src/commands/guidance.js +596 -449
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind.js +938 -854
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +3677 -2570
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.js +322 -122
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +943 -787
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.js +558 -383
- package/dist/src/commands/issues.js.map +1 -1
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +605 -475
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.d.ts.map +1 -1
- package/dist/src/commands/memory.js +1031 -814
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +347 -282
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/neural.d.ts.map +1 -1
- package/dist/src/commands/neural.js +1563 -1283
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/performance.js +643 -497
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/plugins.js +841 -668
- package/dist/src/commands/plugins.js.map +1 -1
- package/dist/src/commands/process.js +447 -392
- package/dist/src/commands/process.js.map +1 -1
- package/dist/src/commands/progress.js +256 -162
- package/dist/src/commands/progress.js.map +1 -1
- package/dist/src/commands/providers.js +220 -150
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/route.js +665 -520
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/ruvector/backup.js +651 -505
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js +401 -349
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/import.js +267 -225
- package/dist/src/commands/ruvector/import.js.map +1 -1
- package/dist/src/commands/ruvector/index.js +75 -37
- package/dist/src/commands/ruvector/index.js.map +1 -1
- package/dist/src/commands/ruvector/init.js +359 -336
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js +322 -335
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js +431 -375
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/setup.js +117 -703
- package/dist/src/commands/ruvector/setup.js.map +1 -1
- package/dist/src/commands/ruvector/status.js +419 -364
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/security.d.ts.map +1 -1
- package/dist/src/commands/security.js +610 -456
- package/dist/src/commands/security.js.map +1 -1
- package/dist/src/commands/session.d.ts +1 -1
- package/dist/src/commands/session.js +627 -505
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.d.ts +1 -1
- package/dist/src/commands/start.js +368 -271
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.d.ts +1 -1
- package/dist/src/commands/status.d.ts.map +1 -1
- package/dist/src/commands/status.js +492 -379
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/commands/swarm.js +488 -408
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.d.ts +1 -1
- package/dist/src/commands/task.js +539 -424
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/commands/transfer-store.js +412 -322
- package/dist/src/commands/transfer-store.js.map +1 -1
- package/dist/src/commands/update.js +291 -196
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/workflow.js +486 -386
- package/dist/src/commands/workflow.js.map +1 -1
- package/dist/src/config-adapter.js +40 -39
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.js +416 -312
- package/dist/src/index.js.map +1 -1
- package/dist/src/infrastructure/in-memory-repositories.js +507 -246
- package/dist/src/infrastructure/in-memory-repositories.js.map +1 -1
- package/dist/src/init/claudemd-generator.js +78 -368
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.js +1019 -1345
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.js +60 -635
- 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.d.ts +0 -1
- package/dist/src/init/mcp-generator.d.ts.map +1 -1
- package/dist/src/init/mcp-generator.js +62 -42
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +167 -100
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts +16 -8
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +20 -1300
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +15 -5
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +66 -76
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.js +130 -76
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.js +758 -445
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +492 -391
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.d.ts +30 -0
- package/dist/src/mcp-tools/agentdb-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/agentdb-tools.js +758 -0
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -0
- package/dist/src/mcp-tools/analyze-tools.js +236 -172
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/auto-install.js +142 -80
- package/dist/src/mcp-tools/auto-install.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +375 -252
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +565 -473
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +284 -190
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +600 -349
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +367 -289
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +693 -582
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +312 -261
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +718 -423
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +2726 -1978
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +2 -0
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +2 -0
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +514 -329
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +428 -326
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +480 -420
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +278 -204
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.d.ts +9 -0
- package/dist/src/mcp-tools/ruvllm-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/ruvllm-tools.js +399 -0
- package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -0
- package/dist/src/mcp-tools/security-tools.js +429 -297
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +234 -185
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts +2 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +303 -64
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +352 -200
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +357 -189
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +196 -148
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +333 -186
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/wasm-agent-tools.d.ts +9 -0
- package/dist/src/mcp-tools/wasm-agent-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js +377 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -0
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +471 -335
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ewc-consolidation.js +345 -173
- package/dist/src/memory/ewc-consolidation.js.map +1 -1
- package/dist/src/memory/intelligence.js +841 -359
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.js +1964 -0
- package/dist/src/memory/memory-bridge.js.map +1 -0
- package/dist/src/memory/memory-initializer.js +1895 -1602
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.js +329 -199
- 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 +273 -242
- package/dist/src/output.js.map +1 -1
- package/dist/src/parser.js +217 -124
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/manager.js +531 -278
- package/dist/src/plugins/manager.js.map +1 -1
- package/dist/src/plugins/store/discovery.js +362 -275
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/plugins/store/index.js +105 -48
- package/dist/src/plugins/store/index.js.map +1 -1
- package/dist/src/plugins/store/search.js +107 -69
- package/dist/src/plugins/store/search.js.map +1 -1
- package/dist/src/plugins/tests/demo-plugin-store.js +160 -113
- package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -1
- package/dist/src/plugins/tests/standalone-test.js +223 -172
- package/dist/src/plugins/tests/standalone-test.js.map +1 -1
- package/dist/src/plugins/tests/test-plugin-store.js +228 -190
- package/dist/src/plugins/tests/test-plugin-store.js.map +1 -1
- package/dist/src/production/circuit-breaker.js +126 -62
- package/dist/src/production/circuit-breaker.js.map +1 -1
- package/dist/src/production/error-handler.js +156 -86
- package/dist/src/production/error-handler.js.map +1 -1
- package/dist/src/production/monitoring.js +220 -139
- package/dist/src/production/monitoring.js.map +1 -1
- package/dist/src/production/rate-limiter.js +93 -74
- package/dist/src/production/rate-limiter.js.map +1 -1
- package/dist/src/production/retry.js +167 -75
- package/dist/src/production/retry.js.map +1 -1
- package/dist/src/prompt.js +560 -436
- package/dist/src/prompt.js.map +1 -1
- package/dist/src/runtime/headless.js +289 -200
- package/dist/src/runtime/headless.js.map +1 -1
- package/dist/src/ruvector/agent-wasm.js +511 -0
- package/dist/src/ruvector/agent-wasm.js.map +1 -0
- package/dist/src/ruvector/ast-analyzer.js +232 -145
- package/dist/src/ruvector/ast-analyzer.js.map +1 -1
- package/dist/src/ruvector/coverage-router.js +419 -287
- package/dist/src/ruvector/coverage-router.js.map +1 -1
- package/dist/src/ruvector/coverage-tools.js +101 -56
- package/dist/src/ruvector/coverage-tools.js.map +1 -1
- package/dist/src/ruvector/diff-classifier.js +451 -324
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.js +337 -251
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
- package/dist/src/ruvector/flash-attention.js +254 -223
- package/dist/src/ruvector/flash-attention.js.map +1 -1
- package/dist/src/ruvector/graph-analyzer.js +680 -486
- package/dist/src/ruvector/graph-analyzer.js.map +1 -1
- package/dist/src/ruvector/index.js +113 -27
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/lora-adapter.js +248 -155
- package/dist/src/ruvector/lora-adapter.js.map +1 -1
- package/dist/src/ruvector/model-router.js +248 -175
- package/dist/src/ruvector/model-router.js.map +1 -1
- package/dist/src/ruvector/moe-router.js +286 -228
- package/dist/src/ruvector/moe-router.js.map +1 -1
- package/dist/src/ruvector/q-learning-router.js +338 -257
- package/dist/src/ruvector/q-learning-router.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.js +527 -0
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -0
- package/dist/src/ruvector/semantic-router.js +67 -60
- package/dist/src/ruvector/semantic-router.js.map +1 -1
- package/dist/src/ruvector/vector-db.js +205 -119
- package/dist/src/ruvector/vector-db.js.map +1 -1
- package/dist/src/services/agentic-flow-bridge.js +168 -0
- package/dist/src/services/agentic-flow-bridge.js.map +1 -0
- package/dist/src/services/claim-service.js +940 -615
- package/dist/src/services/claim-service.js.map +1 -1
- package/dist/src/services/container-worker-pool.js +669 -399
- package/dist/src/services/container-worker-pool.js.map +1 -1
- package/dist/src/services/headless-worker-executor.js +467 -441
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/index.d.ts +5 -5
- 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.js +201 -93
- package/dist/src/services/registry-api.js.map +1 -1
- package/dist/src/services/ruvector-training.js +414 -144
- package/dist/src/services/ruvector-training.js.map +1 -1
- package/dist/src/services/worker-daemon.js +928 -531
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/src/services/worker-queue.js +550 -331
- package/dist/src/services/worker-queue.js.map +1 -1
- package/dist/src/suggest.js +55 -45
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/anonymization/index.js +37 -29
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/transfer/deploy-seraphine.d.ts +1 -1
- package/dist/src/transfer/deploy-seraphine.js +156 -129
- package/dist/src/transfer/deploy-seraphine.js.map +1 -1
- package/dist/src/transfer/export.js +142 -84
- 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 +2 -0
- package/dist/src/transfer/index.js.map +1 -1
- package/dist/src/transfer/ipfs/client.js +337 -179
- package/dist/src/transfer/ipfs/client.js.map +1 -1
- package/dist/src/transfer/ipfs/upload.js +434 -290
- package/dist/src/transfer/ipfs/upload.js.map +1 -1
- package/dist/src/transfer/models/seraphine.js +58 -58
- package/dist/src/transfer/models/seraphine.js.map +1 -1
- package/dist/src/transfer/serialization/cfp.js +37 -33
- package/dist/src/transfer/serialization/cfp.js.map +1 -1
- package/dist/src/transfer/storage/gcs.js +248 -139
- package/dist/src/transfer/storage/gcs.js.map +1 -1
- package/dist/src/transfer/store/discovery.js +353 -243
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/transfer/store/download.js +365 -243
- package/dist/src/transfer/store/download.js.map +1 -1
- package/dist/src/transfer/store/index.js +130 -63
- package/dist/src/transfer/store/index.js.map +1 -1
- package/dist/src/transfer/store/publish.js +258 -184
- package/dist/src/transfer/store/publish.js.map +1 -1
- package/dist/src/transfer/store/registry.js +73 -51
- package/dist/src/transfer/store/registry.js.map +1 -1
- package/dist/src/transfer/store/search.js +96 -64
- package/dist/src/transfer/store/search.js.map +1 -1
- package/dist/src/transfer/store/tests/standalone-test.js +231 -174
- package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
- package/dist/src/transfer/test-seraphine.js +130 -95
- package/dist/src/transfer/test-seraphine.js.map +1 -1
- package/dist/src/transfer/tests/test-store.js +239 -194
- package/dist/src/transfer/tests/test-store.js.map +1 -1
- package/dist/src/types.js +56 -27
- package/dist/src/types.js.map +1 -1
- package/dist/src/update/checker.js +183 -106
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.js +198 -135
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.js +85 -38
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/update/rate-limiter.js +31 -19
- package/dist/src/update/rate-limiter.js.map +1 -1
- package/dist/src/update/validator.js +64 -38
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -10
- package/.claude/agents/custom/accessibility-auditor.yaml +0 -56
- package/.claude/agents/custom/design-architect.yaml +0 -48
- package/.claude/agents/custom/ui-developer.yaml +0 -46
- package/.claude/agents/custom/ux-researcher.yaml +0 -60
- package/dist/src/benchmarks/pretrain/index.d.ts +0 -58
- package/dist/src/benchmarks/pretrain/index.d.ts.map +0 -1
- package/dist/src/commands/index.d.ts +0 -108
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/config-adapter.d.ts +0 -15
- package/dist/src/config-adapter.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -76
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
- package/dist/src/infrastructure/in-memory-repositories.d.ts.map +0 -1
- package/dist/src/init/claudemd-generator.d.ts +0 -25
- package/dist/src/init/claudemd-generator.d.ts.map +0 -1
- package/dist/src/init/executor.d.ts +0 -41
- package/dist/src/init/executor.d.ts.map +0 -1
- package/dist/src/init/helpers-generator.d.ts +0 -60
- package/dist/src/init/helpers-generator.d.ts.map +0 -1
- package/dist/src/mcp-client.d.ts +0 -92
- package/dist/src/mcp-client.d.ts.map +0 -1
- package/dist/src/mcp-server.d.ts +0 -161
- package/dist/src/mcp-server.d.ts.map +0 -1
- package/dist/src/mcp-tools/auto-install.d.ts +0 -83
- package/dist/src/mcp-tools/auto-install.d.ts.map +0 -1
- package/dist/src/mcp-tools/types.d.ts +0 -31
- package/dist/src/mcp-tools/types.d.ts.map +0 -1
- package/dist/src/memory/ewc-consolidation.d.ts +0 -271
- package/dist/src/memory/ewc-consolidation.d.ts.map +0 -1
- package/dist/src/memory/intelligence.d.ts +0 -285
- package/dist/src/memory/intelligence.d.ts.map +0 -1
- package/dist/src/memory/memory-initializer.d.ts +0 -396
- package/dist/src/memory/memory-initializer.d.ts.map +0 -1
- package/dist/src/memory/sona-optimizer.d.ts +0 -227
- package/dist/src/memory/sona-optimizer.d.ts.map +0 -1
- package/dist/src/parser.d.ts +0 -41
- package/dist/src/parser.d.ts.map +0 -1
- package/dist/src/plugins/manager.d.ts +0 -133
- package/dist/src/plugins/manager.d.ts.map +0 -1
- package/dist/src/plugins/store/discovery.d.ts +0 -88
- package/dist/src/plugins/store/discovery.d.ts.map +0 -1
- package/dist/src/plugins/store/index.d.ts +0 -76
- package/dist/src/plugins/store/index.d.ts.map +0 -1
- package/dist/src/plugins/store/search.d.ts +0 -46
- package/dist/src/plugins/store/search.d.ts.map +0 -1
- package/dist/src/plugins/store/types.d.ts +0 -274
- package/dist/src/plugins/store/types.d.ts.map +0 -1
- package/dist/src/production/circuit-breaker.d.ts +0 -101
- package/dist/src/production/circuit-breaker.d.ts.map +0 -1
- package/dist/src/production/error-handler.d.ts +0 -92
- package/dist/src/production/error-handler.d.ts.map +0 -1
- package/dist/src/production/monitoring.d.ts +0 -161
- package/dist/src/production/monitoring.d.ts.map +0 -1
- package/dist/src/production/rate-limiter.d.ts +0 -80
- package/dist/src/production/rate-limiter.d.ts.map +0 -1
- package/dist/src/production/retry.d.ts +0 -48
- package/dist/src/production/retry.d.ts.map +0 -1
- package/dist/src/prompt.d.ts +0 -44
- package/dist/src/prompt.d.ts.map +0 -1
- package/dist/src/runtime/headless.d.ts +0 -60
- package/dist/src/runtime/headless.d.ts.map +0 -1
- package/dist/src/ruvector/ast-analyzer.d.ts +0 -67
- package/dist/src/ruvector/ast-analyzer.d.ts.map +0 -1
- package/dist/src/ruvector/coverage-router.d.ts +0 -160
- package/dist/src/ruvector/coverage-router.d.ts.map +0 -1
- package/dist/src/ruvector/diff-classifier.d.ts +0 -175
- package/dist/src/ruvector/diff-classifier.d.ts.map +0 -1
- package/dist/src/ruvector/enhanced-model-router.d.ts +0 -146
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +0 -1
- package/dist/src/ruvector/flash-attention.d.ts +0 -195
- package/dist/src/ruvector/flash-attention.d.ts.map +0 -1
- package/dist/src/ruvector/graph-analyzer.d.ts +0 -187
- package/dist/src/ruvector/graph-analyzer.d.ts.map +0 -1
- package/dist/src/ruvector/index.d.ts +0 -34
- package/dist/src/ruvector/index.d.ts.map +0 -1
- package/dist/src/ruvector/lora-adapter.d.ts +0 -218
- package/dist/src/ruvector/lora-adapter.d.ts.map +0 -1
- package/dist/src/ruvector/model-router.d.ts +0 -220
- package/dist/src/ruvector/model-router.d.ts.map +0 -1
- package/dist/src/ruvector/moe-router.d.ts +0 -206
- package/dist/src/ruvector/moe-router.d.ts.map +0 -1
- package/dist/src/ruvector/q-learning-router.d.ts +0 -211
- package/dist/src/ruvector/q-learning-router.d.ts.map +0 -1
- package/dist/src/ruvector/semantic-router.d.ts +0 -77
- package/dist/src/ruvector/semantic-router.d.ts.map +0 -1
- package/dist/src/ruvector/vector-db.d.ts +0 -69
- package/dist/src/ruvector/vector-db.d.ts.map +0 -1
- package/dist/src/services/claim-service.d.ts +0 -204
- package/dist/src/services/claim-service.d.ts.map +0 -1
- package/dist/src/services/container-worker-pool.d.ts +0 -197
- package/dist/src/services/container-worker-pool.d.ts.map +0 -1
- package/dist/src/services/headless-worker-executor.d.ts +0 -304
- package/dist/src/services/headless-worker-executor.d.ts.map +0 -1
- package/dist/src/services/registry-api.d.ts +0 -58
- package/dist/src/services/registry-api.d.ts.map +0 -1
- package/dist/src/services/ruvector-training.d.ts +0 -213
- package/dist/src/services/ruvector-training.d.ts.map +0 -1
- package/dist/src/services/worker-daemon.d.ts +0 -203
- package/dist/src/services/worker-daemon.d.ts.map +0 -1
- package/dist/src/services/worker-queue.d.ts +0 -194
- package/dist/src/services/worker-queue.d.ts.map +0 -1
- package/dist/src/suggest.d.ts +0 -53
- package/dist/src/suggest.d.ts.map +0 -1
- package/dist/src/transfer/export.d.ts +0 -25
- package/dist/src/transfer/export.d.ts.map +0 -1
- package/dist/src/transfer/ipfs/client.d.ts +0 -109
- package/dist/src/transfer/ipfs/client.d.ts.map +0 -1
- package/dist/src/transfer/ipfs/upload.d.ts +0 -95
- package/dist/src/transfer/ipfs/upload.d.ts.map +0 -1
- package/dist/src/transfer/models/seraphine.d.ts +0 -72
- package/dist/src/transfer/models/seraphine.d.ts.map +0 -1
- package/dist/src/transfer/serialization/cfp.d.ts +0 -49
- package/dist/src/transfer/serialization/cfp.d.ts.map +0 -1
- package/dist/src/transfer/storage/gcs.d.ts +0 -82
- package/dist/src/transfer/storage/gcs.d.ts.map +0 -1
- package/dist/src/transfer/store/discovery.d.ts +0 -84
- package/dist/src/transfer/store/discovery.d.ts.map +0 -1
- package/dist/src/transfer/store/download.d.ts +0 -70
- package/dist/src/transfer/store/download.d.ts.map +0 -1
- package/dist/src/transfer/store/index.d.ts +0 -84
- package/dist/src/transfer/store/index.d.ts.map +0 -1
- package/dist/src/transfer/store/publish.d.ts +0 -76
- package/dist/src/transfer/store/publish.d.ts.map +0 -1
- package/dist/src/transfer/store/search.d.ts +0 -54
- package/dist/src/transfer/store/search.d.ts.map +0 -1
- package/dist/src/transfer/types.d.ts +0 -245
- package/dist/src/transfer/types.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -198
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/update/checker.d.ts +0 -34
- package/dist/src/update/checker.d.ts.map +0 -1
- package/dist/src/update/executor.d.ts +0 -32
- package/dist/src/update/executor.d.ts.map +0 -1
- package/dist/src/update/index.d.ts +0 -33
- package/dist/src/update/index.d.ts.map +0 -1
- package/dist/src/update/rate-limiter.d.ts +0 -20
- package/dist/src/update/rate-limiter.d.ts.map +0 -1
- package/dist/src/update/validator.d.ts +0 -17
- package/dist/src/update/validator.d.ts.map +0 -1
|
@@ -2,18 +2,65 @@
|
|
|
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
|
+
};
|
|
5
52
|
import { output } from '../output.js';
|
|
6
53
|
import { select, confirm, input } from '../prompt.js';
|
|
7
54
|
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
8
55
|
// Memory backends
|
|
9
|
-
|
|
56
|
+
var BACKENDS = [
|
|
10
57
|
{ value: 'agentdb', label: 'AgentDB', hint: 'Vector database with HNSW indexing (150x-12,500x faster)' },
|
|
11
58
|
{ value: 'sqlite', label: 'SQLite', hint: 'Lightweight local storage' },
|
|
12
59
|
{ value: 'hybrid', label: 'Hybrid', hint: 'SQLite + AgentDB (recommended)' },
|
|
13
60
|
{ value: 'memory', label: 'In-Memory', hint: 'Fast but non-persistent' }
|
|
14
61
|
];
|
|
15
62
|
// Store command
|
|
16
|
-
|
|
63
|
+
var storeCommand = {
|
|
17
64
|
name: 'store',
|
|
18
65
|
description: 'Store data in memory',
|
|
19
66
|
options: [
|
|
@@ -35,7 +82,7 @@ const storeCommand = {
|
|
|
35
82
|
short: 'n',
|
|
36
83
|
description: 'Memory namespace',
|
|
37
84
|
type: 'string',
|
|
38
|
-
default: 'default'
|
|
85
|
+
"default": 'default'
|
|
39
86
|
},
|
|
40
87
|
{
|
|
41
88
|
name: 'ttl',
|
|
@@ -51,14 +98,14 @@ const storeCommand = {
|
|
|
51
98
|
name: 'vector',
|
|
52
99
|
description: 'Store as vector embedding',
|
|
53
100
|
type: 'boolean',
|
|
54
|
-
default: false
|
|
101
|
+
"default": false
|
|
55
102
|
},
|
|
56
103
|
{
|
|
57
104
|
name: 'upsert',
|
|
58
105
|
short: 'u',
|
|
59
106
|
description: 'Update if key exists (insert or replace)',
|
|
60
107
|
type: 'boolean',
|
|
61
|
-
default: false
|
|
108
|
+
"default": false
|
|
62
109
|
}
|
|
63
110
|
],
|
|
64
111
|
examples: [
|
|
@@ -66,86 +113,100 @@ const storeCommand = {
|
|
|
66
113
|
{ command: 'claude-flow memory store -k "pattern/singleton" --vector', description: 'Store vector' },
|
|
67
114
|
{ command: 'claude-flow memory store -k "pattern" -v "updated" --upsert', description: 'Update existing' }
|
|
68
115
|
],
|
|
69
|
-
action:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
117
|
+
var key, value, namespace, ttl, tags, asVector, upsert, storeData, storeEntry, result, error_1;
|
|
118
|
+
return __generator(this, function (_a) {
|
|
119
|
+
switch (_a.label) {
|
|
120
|
+
case 0:
|
|
121
|
+
key = ctx.flags.key;
|
|
122
|
+
value = ctx.flags.value || ctx.args[0];
|
|
123
|
+
namespace = ctx.flags.namespace;
|
|
124
|
+
ttl = ctx.flags.ttl;
|
|
125
|
+
tags = ctx.flags.tags ? ctx.flags.tags.split(',') : [];
|
|
126
|
+
asVector = ctx.flags.vector;
|
|
127
|
+
upsert = ctx.flags.upsert;
|
|
128
|
+
if (!key) {
|
|
129
|
+
output.printError('Key is required. Use --key or -k');
|
|
130
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
131
|
+
}
|
|
132
|
+
if (!(!value && ctx.interactive)) return [3 /*break*/, 2];
|
|
133
|
+
return [4 /*yield*/, input({
|
|
134
|
+
message: 'Enter value to store:',
|
|
135
|
+
validate: function (v) { return v.length > 0 || 'Value is required'; }
|
|
136
|
+
})];
|
|
137
|
+
case 1:
|
|
138
|
+
value = _a.sent();
|
|
139
|
+
_a.label = 2;
|
|
140
|
+
case 2:
|
|
141
|
+
if (!value) {
|
|
142
|
+
output.printError('Value is required. Use --value');
|
|
143
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
144
|
+
}
|
|
145
|
+
storeData = {
|
|
146
|
+
key: key,
|
|
147
|
+
namespace: namespace,
|
|
148
|
+
value: value,
|
|
149
|
+
ttl: ttl,
|
|
150
|
+
tags: tags,
|
|
151
|
+
asVector: asVector,
|
|
152
|
+
storedAt: new Date().toISOString(),
|
|
153
|
+
size: Buffer.byteLength(value, 'utf8')
|
|
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*/];
|
|
120
204
|
}
|
|
121
|
-
|
|
122
|
-
|
|
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
|
-
}
|
|
205
|
+
});
|
|
206
|
+
}); }
|
|
146
207
|
};
|
|
147
208
|
// Retrieve command
|
|
148
|
-
|
|
209
|
+
var retrieveCommand = {
|
|
149
210
|
name: 'retrieve',
|
|
150
211
|
aliases: ['get'],
|
|
151
212
|
description: 'Retrieve data from memory',
|
|
@@ -161,55 +222,66 @@ const retrieveCommand = {
|
|
|
161
222
|
short: 'n',
|
|
162
223
|
description: 'Memory namespace',
|
|
163
224
|
type: 'string',
|
|
164
|
-
default: 'default'
|
|
225
|
+
"default": 'default'
|
|
165
226
|
}
|
|
166
227
|
],
|
|
167
|
-
action:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
228
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
229
|
+
var key, namespace, getEntry, result, entry, error_2;
|
|
230
|
+
return __generator(this, function (_a) {
|
|
231
|
+
switch (_a.label) {
|
|
232
|
+
case 0:
|
|
233
|
+
key = ctx.flags.key || ctx.args[0];
|
|
234
|
+
namespace = ctx.flags.namespace;
|
|
235
|
+
if (!key) {
|
|
236
|
+
output.printError('Key is required');
|
|
237
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
238
|
+
}
|
|
239
|
+
_a.label = 1;
|
|
240
|
+
case 1:
|
|
241
|
+
_a.trys.push([1, 4, , 5]);
|
|
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*/];
|
|
190
279
|
}
|
|
191
|
-
|
|
192
|
-
|
|
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
|
-
}
|
|
280
|
+
});
|
|
281
|
+
}); }
|
|
210
282
|
};
|
|
211
283
|
// Search command
|
|
212
|
-
|
|
284
|
+
var searchCommand = {
|
|
213
285
|
name: 'search',
|
|
214
286
|
description: 'Search memory with semantic/vector search',
|
|
215
287
|
options: [
|
|
@@ -231,27 +303,27 @@ const searchCommand = {
|
|
|
231
303
|
short: 'l',
|
|
232
304
|
description: 'Maximum results',
|
|
233
305
|
type: 'number',
|
|
234
|
-
default: 10
|
|
306
|
+
"default": 10
|
|
235
307
|
},
|
|
236
308
|
{
|
|
237
309
|
name: 'threshold',
|
|
238
310
|
description: 'Similarity threshold (0-1)',
|
|
239
311
|
type: 'number',
|
|
240
|
-
default: 0.7
|
|
312
|
+
"default": 0.7
|
|
241
313
|
},
|
|
242
314
|
{
|
|
243
315
|
name: 'type',
|
|
244
316
|
short: 't',
|
|
245
317
|
description: 'Search type (semantic, keyword, hybrid)',
|
|
246
318
|
type: 'string',
|
|
247
|
-
default: 'semantic',
|
|
319
|
+
"default": 'semantic',
|
|
248
320
|
choices: ['semantic', 'keyword', 'hybrid']
|
|
249
321
|
},
|
|
250
322
|
{
|
|
251
323
|
name: 'build-hnsw',
|
|
252
324
|
description: 'Build/rebuild HNSW index before searching (enables 150x-12,500x speedup)',
|
|
253
325
|
type: 'boolean',
|
|
254
|
-
default: false
|
|
326
|
+
"default": false
|
|
255
327
|
}
|
|
256
328
|
],
|
|
257
329
|
examples: [
|
|
@@ -259,96 +331,113 @@ const searchCommand = {
|
|
|
259
331
|
{ command: 'claude-flow memory search -q "JWT" -t keyword', description: 'Keyword search' },
|
|
260
332
|
{ command: 'claude-flow memory search -q "test" --build-hnsw', description: 'Build HNSW index and search' }
|
|
261
333
|
],
|
|
262
|
-
action:
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
334
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
335
|
+
var query, namespace, limit, threshold, searchType, buildHnsw, _a, getHNSWIndex, getHNSWStatus, startTime, index, buildTime, status, error_3, searchEntries, searchResult, results, error_4;
|
|
336
|
+
return __generator(this, function (_b) {
|
|
337
|
+
switch (_b.label) {
|
|
338
|
+
case 0:
|
|
339
|
+
query = ctx.flags.query || ctx.args[0];
|
|
340
|
+
namespace = ctx.flags.namespace || 'all';
|
|
341
|
+
limit = ctx.flags.limit || 10;
|
|
342
|
+
threshold = ctx.flags.threshold || 0.3;
|
|
343
|
+
searchType = ctx.flags.type || 'semantic';
|
|
344
|
+
buildHnsw = (ctx.flags['build-hnsw'] || ctx.flags.buildHnsw);
|
|
345
|
+
if (!query) {
|
|
346
|
+
output.printError('Query is required. Use --query or -q');
|
|
347
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
348
|
+
}
|
|
349
|
+
if (!buildHnsw) return [3 /*break*/, 5];
|
|
350
|
+
output.printInfo('Building HNSW index...');
|
|
351
|
+
_b.label = 1;
|
|
352
|
+
case 1:
|
|
353
|
+
_b.trys.push([1, 4, , 5]);
|
|
354
|
+
return [4 /*yield*/, import('../memory/memory-initializer.js')];
|
|
355
|
+
case 2:
|
|
356
|
+
_a = _b.sent(), getHNSWIndex = _a.getHNSWIndex, getHNSWStatus = _a.getHNSWStatus;
|
|
357
|
+
startTime = Date.now();
|
|
358
|
+
return [4 /*yield*/, getHNSWIndex({ forceRebuild: true })];
|
|
359
|
+
case 3:
|
|
360
|
+
index = _b.sent();
|
|
361
|
+
buildTime = Date.now() - startTime;
|
|
362
|
+
if (index) {
|
|
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*/];
|
|
330
435
|
}
|
|
331
|
-
|
|
332
|
-
|
|
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
|
-
}
|
|
436
|
+
});
|
|
437
|
+
}); }
|
|
349
438
|
};
|
|
350
439
|
// List command
|
|
351
|
-
|
|
440
|
+
var listCommand = {
|
|
352
441
|
name: 'list',
|
|
353
442
|
aliases: ['ls'],
|
|
354
443
|
description: 'List memory entries',
|
|
@@ -370,81 +459,91 @@ const listCommand = {
|
|
|
370
459
|
short: 'l',
|
|
371
460
|
description: 'Maximum entries',
|
|
372
461
|
type: 'number',
|
|
373
|
-
default: 20
|
|
462
|
+
"default": 20
|
|
374
463
|
}
|
|
375
464
|
],
|
|
376
|
-
action:
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
465
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
466
|
+
var namespace, limit, listEntries, listResult, entries, error_5;
|
|
467
|
+
return __generator(this, function (_a) {
|
|
468
|
+
switch (_a.label) {
|
|
469
|
+
case 0:
|
|
470
|
+
namespace = ctx.flags.namespace;
|
|
471
|
+
limit = ctx.flags.limit;
|
|
472
|
+
_a.label = 1;
|
|
473
|
+
case 1:
|
|
474
|
+
_a.trys.push([1, 4, , 5]);
|
|
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*/];
|
|
407
524
|
}
|
|
408
|
-
|
|
409
|
-
|
|
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
|
-
}
|
|
525
|
+
});
|
|
526
|
+
}); }
|
|
428
527
|
};
|
|
429
528
|
// Helper function to format relative time
|
|
430
529
|
function formatRelativeTime(isoDate) {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
530
|
+
var now = Date.now();
|
|
531
|
+
var date = new Date(isoDate).getTime();
|
|
532
|
+
var diff = now - date;
|
|
533
|
+
var seconds = Math.floor(diff / 1000);
|
|
534
|
+
var minutes = Math.floor(seconds / 60);
|
|
535
|
+
var hours = Math.floor(minutes / 60);
|
|
536
|
+
var days = Math.floor(hours / 24);
|
|
438
537
|
if (days > 0)
|
|
439
|
-
return
|
|
538
|
+
return days + "d ago";
|
|
440
539
|
if (hours > 0)
|
|
441
|
-
return
|
|
540
|
+
return hours + "h ago";
|
|
442
541
|
if (minutes > 0)
|
|
443
|
-
return
|
|
542
|
+
return minutes + "m ago";
|
|
444
543
|
return 'just now';
|
|
445
544
|
}
|
|
446
545
|
// Delete command
|
|
447
|
-
|
|
546
|
+
var deleteCommand = {
|
|
448
547
|
name: 'delete',
|
|
449
548
|
aliases: ['rm'],
|
|
450
549
|
description: 'Delete memory entry',
|
|
@@ -460,14 +559,14 @@ const deleteCommand = {
|
|
|
460
559
|
short: 'n',
|
|
461
560
|
description: 'Memory namespace',
|
|
462
561
|
type: 'string',
|
|
463
|
-
default: 'default'
|
|
562
|
+
"default": 'default'
|
|
464
563
|
},
|
|
465
564
|
{
|
|
466
565
|
name: 'force',
|
|
467
566
|
short: 'f',
|
|
468
567
|
description: 'Skip confirmation',
|
|
469
568
|
type: 'boolean',
|
|
470
|
-
default: false
|
|
569
|
+
"default": false
|
|
471
570
|
}
|
|
472
571
|
],
|
|
473
572
|
examples: [
|
|
@@ -475,116 +574,134 @@ const deleteCommand = {
|
|
|
475
574
|
{ command: 'claude-flow memory delete -k "lesson" -n "lessons"', description: 'Delete entry from specific namespace' },
|
|
476
575
|
{ command: 'claude-flow memory delete mykey -f', description: 'Delete without confirmation' }
|
|
477
576
|
],
|
|
478
|
-
action:
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
577
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
578
|
+
var key, namespace, force, confirmed, deleteEntry, result, error_6;
|
|
579
|
+
return __generator(this, function (_a) {
|
|
580
|
+
switch (_a.label) {
|
|
581
|
+
case 0:
|
|
582
|
+
key = ctx.flags.key || ctx.args[0];
|
|
583
|
+
namespace = ctx.flags.namespace || 'default';
|
|
584
|
+
force = ctx.flags.force;
|
|
585
|
+
if (!key) {
|
|
586
|
+
output.printError('Key is required. Use: memory delete -k "key" [-n "namespace"]');
|
|
587
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
588
|
+
}
|
|
589
|
+
if (!(!force && ctx.interactive)) return [3 /*break*/, 2];
|
|
590
|
+
return [4 /*yield*/, confirm({
|
|
591
|
+
message: "Delete memory entry \"" + key + "\" from namespace \"" + namespace + "\"?",
|
|
592
|
+
"default": false
|
|
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*/];
|
|
495
626
|
}
|
|
496
|
-
}
|
|
497
|
-
|
|
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
|
-
}
|
|
627
|
+
});
|
|
628
|
+
}); }
|
|
519
629
|
};
|
|
520
630
|
// Stats command
|
|
521
|
-
|
|
631
|
+
var statsCommand = {
|
|
522
632
|
name: 'stats',
|
|
523
633
|
description: 'Show memory statistics',
|
|
524
|
-
action:
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
634
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
635
|
+
var statsResult, stats, error_7;
|
|
636
|
+
return __generator(this, function (_a) {
|
|
637
|
+
switch (_a.label) {
|
|
638
|
+
case 0:
|
|
639
|
+
_a.trys.push([0, 2, , 3]);
|
|
640
|
+
return [4 /*yield*/, callMCPTool('memory_stats', {})];
|
|
641
|
+
case 1:
|
|
642
|
+
statsResult = _a.sent();
|
|
643
|
+
stats = {
|
|
644
|
+
backend: statsResult.backend,
|
|
645
|
+
entries: {
|
|
646
|
+
total: statsResult.totalEntries,
|
|
647
|
+
vectors: 0,
|
|
648
|
+
text: statsResult.totalEntries
|
|
649
|
+
},
|
|
650
|
+
storage: {
|
|
651
|
+
total: statsResult.totalSize,
|
|
652
|
+
location: statsResult.location
|
|
653
|
+
},
|
|
654
|
+
version: statsResult.version,
|
|
655
|
+
oldestEntry: statsResult.oldestEntry,
|
|
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*/];
|
|
546
699
|
}
|
|
547
|
-
|
|
548
|
-
|
|
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
|
-
}
|
|
700
|
+
});
|
|
701
|
+
}); }
|
|
585
702
|
};
|
|
586
703
|
// Configure command
|
|
587
|
-
|
|
704
|
+
var configureCommand = {
|
|
588
705
|
name: 'configure',
|
|
589
706
|
aliases: ['config'],
|
|
590
707
|
description: 'Configure memory backend',
|
|
@@ -594,7 +711,7 @@ const configureCommand = {
|
|
|
594
711
|
short: 'b',
|
|
595
712
|
description: 'Memory backend',
|
|
596
713
|
type: 'string',
|
|
597
|
-
choices: BACKENDS.map(b
|
|
714
|
+
choices: BACKENDS.map(function (b) { return b.value; })
|
|
598
715
|
},
|
|
599
716
|
{
|
|
600
717
|
name: 'path',
|
|
@@ -610,56 +727,65 @@ const configureCommand = {
|
|
|
610
727
|
name: 'hnsw-m',
|
|
611
728
|
description: 'HNSW M parameter',
|
|
612
729
|
type: 'number',
|
|
613
|
-
default: 16
|
|
730
|
+
"default": 16
|
|
614
731
|
},
|
|
615
732
|
{
|
|
616
733
|
name: 'hnsw-ef',
|
|
617
734
|
description: 'HNSW ef parameter',
|
|
618
735
|
type: 'number',
|
|
619
|
-
default: 200
|
|
736
|
+
"default": 200
|
|
620
737
|
}
|
|
621
738
|
],
|
|
622
|
-
action:
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
739
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
740
|
+
var backend, config;
|
|
741
|
+
return __generator(this, function (_a) {
|
|
742
|
+
switch (_a.label) {
|
|
743
|
+
case 0:
|
|
744
|
+
backend = ctx.flags.backend;
|
|
745
|
+
if (!(!backend && ctx.interactive)) return [3 /*break*/, 2];
|
|
746
|
+
return [4 /*yield*/, select({
|
|
747
|
+
message: 'Select memory backend:',
|
|
748
|
+
options: BACKENDS,
|
|
749
|
+
"default": 'hybrid'
|
|
750
|
+
})];
|
|
751
|
+
case 1:
|
|
752
|
+
backend = _a.sent();
|
|
753
|
+
_a.label = 2;
|
|
754
|
+
case 2:
|
|
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 }];
|
|
638
783
|
}
|
|
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
|
-
]
|
|
655
784
|
});
|
|
656
|
-
|
|
657
|
-
output.printSuccess('Memory configuration updated');
|
|
658
|
-
return { success: true, data: config };
|
|
659
|
-
}
|
|
785
|
+
}); }
|
|
660
786
|
};
|
|
661
787
|
// Cleanup command
|
|
662
|
-
|
|
788
|
+
var cleanupCommand = {
|
|
663
789
|
name: 'cleanup',
|
|
664
790
|
description: 'Clean up stale and expired memory entries',
|
|
665
791
|
options: [
|
|
@@ -668,7 +794,7 @@ const cleanupCommand = {
|
|
|
668
794
|
short: 'd',
|
|
669
795
|
description: 'Show what would be deleted',
|
|
670
796
|
type: 'boolean',
|
|
671
|
-
default: false
|
|
797
|
+
"default": false
|
|
672
798
|
},
|
|
673
799
|
{
|
|
674
800
|
name: 'older-than',
|
|
@@ -681,7 +807,7 @@ const cleanupCommand = {
|
|
|
681
807
|
short: 'e',
|
|
682
808
|
description: 'Only delete expired TTL entries',
|
|
683
809
|
type: 'boolean',
|
|
684
|
-
default: false
|
|
810
|
+
"default": false
|
|
685
811
|
},
|
|
686
812
|
{
|
|
687
813
|
name: 'low-quality',
|
|
@@ -700,7 +826,7 @@ const cleanupCommand = {
|
|
|
700
826
|
short: 'f',
|
|
701
827
|
description: 'Skip confirmation',
|
|
702
828
|
type: 'boolean',
|
|
703
|
-
default: false
|
|
829
|
+
"default": false
|
|
704
830
|
}
|
|
705
831
|
],
|
|
706
832
|
examples: [
|
|
@@ -708,74 +834,87 @@ const cleanupCommand = {
|
|
|
708
834
|
{ command: 'claude-flow memory cleanup --older-than 30d', description: 'Delete entries older than 30 days' },
|
|
709
835
|
{ command: 'claude-flow memory cleanup --expired-only', description: 'Clean expired entries' }
|
|
710
836
|
],
|
|
711
|
-
action:
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
{
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
837
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
838
|
+
var dryRun, force, result, confirmed, error_8;
|
|
839
|
+
return __generator(this, function (_a) {
|
|
840
|
+
switch (_a.label) {
|
|
841
|
+
case 0:
|
|
842
|
+
dryRun = ctx.flags.dryRun;
|
|
843
|
+
force = ctx.flags.force;
|
|
844
|
+
if (dryRun) {
|
|
845
|
+
output.writeln(output.warning('DRY RUN - No changes will be made'));
|
|
846
|
+
}
|
|
847
|
+
output.printInfo('Analyzing memory for cleanup...');
|
|
848
|
+
_a.label = 1;
|
|
849
|
+
case 1:
|
|
850
|
+
_a.trys.push([1, 5, , 6]);
|
|
851
|
+
return [4 /*yield*/, callMCPTool('memory_cleanup', {
|
|
852
|
+
dryRun: dryRun,
|
|
853
|
+
olderThan: ctx.flags.olderThan,
|
|
854
|
+
expiredOnly: ctx.flags.expiredOnly,
|
|
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*/];
|
|
772
912
|
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
}
|
|
913
|
+
});
|
|
914
|
+
}); }
|
|
776
915
|
};
|
|
777
916
|
// Compress command
|
|
778
|
-
|
|
917
|
+
var compressCommand = {
|
|
779
918
|
name: 'compress',
|
|
780
919
|
description: 'Compress and optimize memory storage',
|
|
781
920
|
options: [
|
|
@@ -785,7 +924,7 @@ const compressCommand = {
|
|
|
785
924
|
description: 'Compression level (fast, balanced, max)',
|
|
786
925
|
type: 'string',
|
|
787
926
|
choices: ['fast', 'balanced', 'max'],
|
|
788
|
-
default: 'balanced'
|
|
927
|
+
"default": 'balanced'
|
|
789
928
|
},
|
|
790
929
|
{
|
|
791
930
|
name: 'target',
|
|
@@ -793,27 +932,27 @@ const compressCommand = {
|
|
|
793
932
|
description: 'Target (vectors, text, patterns, all)',
|
|
794
933
|
type: 'string',
|
|
795
934
|
choices: ['vectors', 'text', 'patterns', 'all'],
|
|
796
|
-
default: 'all'
|
|
935
|
+
"default": 'all'
|
|
797
936
|
},
|
|
798
937
|
{
|
|
799
938
|
name: 'quantize',
|
|
800
939
|
short: 'z',
|
|
801
940
|
description: 'Enable vector quantization (reduces memory 4-32x)',
|
|
802
941
|
type: 'boolean',
|
|
803
|
-
default: false
|
|
942
|
+
"default": false
|
|
804
943
|
},
|
|
805
944
|
{
|
|
806
945
|
name: 'bits',
|
|
807
946
|
description: 'Quantization bits (4, 8, 16)',
|
|
808
947
|
type: 'number',
|
|
809
|
-
default: 8
|
|
948
|
+
"default": 8
|
|
810
949
|
},
|
|
811
950
|
{
|
|
812
951
|
name: 'rebuild-index',
|
|
813
952
|
short: 'r',
|
|
814
953
|
description: 'Rebuild HNSW index after compression',
|
|
815
954
|
type: 'boolean',
|
|
816
|
-
default: true
|
|
955
|
+
"default": true
|
|
817
956
|
}
|
|
818
957
|
],
|
|
819
958
|
examples: [
|
|
@@ -821,80 +960,91 @@ const compressCommand = {
|
|
|
821
960
|
{ command: 'claude-flow memory compress --quantize --bits 4', description: '4-bit quantization (32x reduction)' },
|
|
822
961
|
{ command: 'claude-flow memory compress -l max -t vectors', description: 'Max compression on vectors' }
|
|
823
962
|
],
|
|
824
|
-
action:
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
{
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
963
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
964
|
+
var level, target, quantize, bits, rebuildIndex, spinner, result, error_9;
|
|
965
|
+
var _a;
|
|
966
|
+
return __generator(this, function (_b) {
|
|
967
|
+
switch (_b.label) {
|
|
968
|
+
case 0:
|
|
969
|
+
level = ctx.flags.level || 'balanced';
|
|
970
|
+
target = ctx.flags.target || 'all';
|
|
971
|
+
quantize = ctx.flags.quantize;
|
|
972
|
+
bits = ctx.flags.bits || 8;
|
|
973
|
+
rebuildIndex = (_a = ctx.flags.rebuildIndex) !== null && _a !== void 0 ? _a : true;
|
|
974
|
+
output.writeln();
|
|
975
|
+
output.writeln(output.bold('Memory Compression'));
|
|
976
|
+
output.writeln(output.dim("Level: " + level + ", Target: " + target + ", Quantize: " + (quantize ? bits + "-bit" : 'no')));
|
|
977
|
+
output.writeln();
|
|
978
|
+
spinner = output.createSpinner({ text: 'Analyzing current storage...', spinner: 'dots' });
|
|
979
|
+
spinner.start();
|
|
980
|
+
_b.label = 1;
|
|
981
|
+
case 1:
|
|
982
|
+
_b.trys.push([1, 3, , 4]);
|
|
983
|
+
return [4 /*yield*/, callMCPTool('memory_compress', {
|
|
984
|
+
level: level,
|
|
985
|
+
target: target,
|
|
986
|
+
quantize: quantize,
|
|
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*/];
|
|
891
1042
|
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
}
|
|
1043
|
+
});
|
|
1044
|
+
}); }
|
|
895
1045
|
};
|
|
896
1046
|
// Export command
|
|
897
|
-
|
|
1047
|
+
var exportCommand = {
|
|
898
1048
|
name: 'export',
|
|
899
1049
|
description: 'Export memory to file',
|
|
900
1050
|
options: [
|
|
@@ -911,7 +1061,7 @@ const exportCommand = {
|
|
|
911
1061
|
description: 'Export format (json, csv, binary)',
|
|
912
1062
|
type: 'string',
|
|
913
1063
|
choices: ['json', 'csv', 'binary'],
|
|
914
|
-
default: 'json'
|
|
1064
|
+
"default": 'json'
|
|
915
1065
|
},
|
|
916
1066
|
{
|
|
917
1067
|
name: 'namespace',
|
|
@@ -923,50 +1073,61 @@ const exportCommand = {
|
|
|
923
1073
|
name: 'include-vectors',
|
|
924
1074
|
description: 'Include vector embeddings',
|
|
925
1075
|
type: 'boolean',
|
|
926
|
-
default: true
|
|
1076
|
+
"default": true
|
|
927
1077
|
}
|
|
928
1078
|
],
|
|
929
1079
|
examples: [
|
|
930
1080
|
{ command: 'claude-flow memory export -o ./backup.json', description: 'Export all to JSON' },
|
|
931
1081
|
{ command: 'claude-flow memory export -o ./data.csv -f csv', description: 'Export to CSV' }
|
|
932
1082
|
],
|
|
933
|
-
action:
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1083
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
1084
|
+
var outputPath, format, result, error_10;
|
|
1085
|
+
var _a;
|
|
1086
|
+
return __generator(this, function (_b) {
|
|
1087
|
+
switch (_b.label) {
|
|
1088
|
+
case 0:
|
|
1089
|
+
outputPath = ctx.flags.output;
|
|
1090
|
+
format = ctx.flags.format || 'json';
|
|
1091
|
+
if (!outputPath) {
|
|
1092
|
+
output.printError('Output path is required. Use --output or -o');
|
|
1093
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
1094
|
+
}
|
|
1095
|
+
output.printInfo("Exporting memory to " + outputPath + "...");
|
|
1096
|
+
_b.label = 1;
|
|
1097
|
+
case 1:
|
|
1098
|
+
_b.trys.push([1, 3, , 4]);
|
|
1099
|
+
return [4 /*yield*/, callMCPTool('memory_export', {
|
|
1100
|
+
outputPath: outputPath,
|
|
1101
|
+
format: format,
|
|
1102
|
+
namespace: ctx.flags.namespace,
|
|
1103
|
+
includeVectors: (_a = ctx.flags.includeVectors) !== null && _a !== void 0 ? _a : true
|
|
1104
|
+
})];
|
|
1105
|
+
case 2:
|
|
1106
|
+
result = _b.sent();
|
|
1107
|
+
output.printSuccess("Exported to " + result.outputPath);
|
|
1108
|
+
output.printList([
|
|
1109
|
+
"Entries: " + result.exported.entries,
|
|
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*/];
|
|
963
1125
|
}
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
}
|
|
1126
|
+
});
|
|
1127
|
+
}); }
|
|
967
1128
|
};
|
|
968
1129
|
// Import command
|
|
969
|
-
|
|
1130
|
+
var importCommand = {
|
|
970
1131
|
name: 'import',
|
|
971
1132
|
description: 'Import memory from file',
|
|
972
1133
|
options: [
|
|
@@ -982,7 +1143,7 @@ const importCommand = {
|
|
|
982
1143
|
short: 'm',
|
|
983
1144
|
description: 'Merge with existing (skip duplicates)',
|
|
984
1145
|
type: 'boolean',
|
|
985
|
-
default: true
|
|
1146
|
+
"default": true
|
|
986
1147
|
},
|
|
987
1148
|
{
|
|
988
1149
|
name: 'namespace',
|
|
@@ -995,42 +1156,53 @@ const importCommand = {
|
|
|
995
1156
|
{ command: 'claude-flow memory import -i ./backup.json', description: 'Import from file' },
|
|
996
1157
|
{ command: 'claude-flow memory import -i ./data.json -n archive', description: 'Import to namespace' }
|
|
997
1158
|
],
|
|
998
|
-
action:
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1159
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
1160
|
+
var inputPath, result, error_11;
|
|
1161
|
+
var _a;
|
|
1162
|
+
return __generator(this, function (_b) {
|
|
1163
|
+
switch (_b.label) {
|
|
1164
|
+
case 0:
|
|
1165
|
+
inputPath = ctx.flags.input || ctx.args[0];
|
|
1166
|
+
if (!inputPath) {
|
|
1167
|
+
output.printError('Input path is required. Use --input or -i');
|
|
1168
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
1169
|
+
}
|
|
1170
|
+
output.printInfo("Importing memory from " + inputPath + "...");
|
|
1171
|
+
_b.label = 1;
|
|
1172
|
+
case 1:
|
|
1173
|
+
_b.trys.push([1, 3, , 4]);
|
|
1174
|
+
return [4 /*yield*/, callMCPTool('memory_import', {
|
|
1175
|
+
inputPath: inputPath,
|
|
1176
|
+
merge: (_a = ctx.flags.merge) !== null && _a !== void 0 ? _a : true,
|
|
1177
|
+
namespace: ctx.flags.namespace
|
|
1178
|
+
})];
|
|
1179
|
+
case 2:
|
|
1180
|
+
result = _b.sent();
|
|
1181
|
+
output.printSuccess("Imported from " + result.inputPath);
|
|
1182
|
+
output.printList([
|
|
1183
|
+
"Entries: " + result.imported.entries,
|
|
1184
|
+
"Vectors: " + result.imported.vectors,
|
|
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*/];
|
|
1027
1200
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
}
|
|
1201
|
+
});
|
|
1202
|
+
}); }
|
|
1031
1203
|
};
|
|
1032
1204
|
// Init subcommand - initialize memory database using sql.js
|
|
1033
|
-
|
|
1205
|
+
var initMemoryCommand = {
|
|
1034
1206
|
name: 'init',
|
|
1035
1207
|
description: 'Initialize memory database with sql.js (WASM SQLite) - includes vector embeddings, pattern learning, temporal decay',
|
|
1036
1208
|
options: [
|
|
@@ -1039,7 +1211,7 @@ const initMemoryCommand = {
|
|
|
1039
1211
|
short: 'b',
|
|
1040
1212
|
description: 'Backend type: hybrid (default), sqlite, or agentdb',
|
|
1041
1213
|
type: 'string',
|
|
1042
|
-
default: 'hybrid'
|
|
1214
|
+
"default": 'hybrid'
|
|
1043
1215
|
},
|
|
1044
1216
|
{
|
|
1045
1217
|
name: 'path',
|
|
@@ -1052,25 +1224,25 @@ const initMemoryCommand = {
|
|
|
1052
1224
|
short: 'f',
|
|
1053
1225
|
description: 'Overwrite existing database',
|
|
1054
1226
|
type: 'boolean',
|
|
1055
|
-
default: false
|
|
1227
|
+
"default": false
|
|
1056
1228
|
},
|
|
1057
1229
|
{
|
|
1058
1230
|
name: 'verbose',
|
|
1059
1231
|
description: 'Show detailed initialization output',
|
|
1060
1232
|
type: 'boolean',
|
|
1061
|
-
default: false
|
|
1233
|
+
"default": false
|
|
1062
1234
|
},
|
|
1063
1235
|
{
|
|
1064
1236
|
name: 'verify',
|
|
1065
1237
|
description: 'Run verification tests after initialization',
|
|
1066
1238
|
type: 'boolean',
|
|
1067
|
-
default: true
|
|
1239
|
+
"default": true
|
|
1068
1240
|
},
|
|
1069
1241
|
{
|
|
1070
1242
|
name: 'load-embeddings',
|
|
1071
1243
|
description: 'Pre-load ONNX embedding model (lazy by default)',
|
|
1072
1244
|
type: 'boolean',
|
|
1073
|
-
default: false
|
|
1245
|
+
"default": false
|
|
1074
1246
|
}
|
|
1075
1247
|
],
|
|
1076
1248
|
examples: [
|
|
@@ -1079,158 +1251,201 @@ const initMemoryCommand = {
|
|
|
1079
1251
|
{ command: 'claude-flow memory init -p ./data/memory.db --force', description: 'Reinitialize at custom path' },
|
|
1080
1252
|
{ command: 'claude-flow memory init --verbose --verify', description: 'Initialize with full verification' }
|
|
1081
1253
|
],
|
|
1082
|
-
action:
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
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
|
-
// Show tables created
|
|
1141
|
-
if (verbose && result.tablesCreated.length > 0) {
|
|
1142
|
-
output.writeln(output.bold('Tables Created:'));
|
|
1143
|
-
output.printTable({
|
|
1144
|
-
columns: [
|
|
1145
|
-
{ key: 'table', header: 'Table', width: 22 },
|
|
1146
|
-
{ key: 'purpose', header: 'Purpose', width: 38 }
|
|
1147
|
-
],
|
|
1148
|
-
data: [
|
|
1149
|
-
{ table: 'memory_entries', purpose: 'Core memory storage with embeddings' },
|
|
1150
|
-
{ table: 'patterns', purpose: 'Learned patterns with confidence scores' },
|
|
1151
|
-
{ table: 'pattern_history', purpose: 'Pattern versioning and evolution' },
|
|
1152
|
-
{ table: 'trajectories', purpose: 'SONA learning trajectories' },
|
|
1153
|
-
{ table: 'trajectory_steps', purpose: 'Individual trajectory steps' },
|
|
1154
|
-
{ table: 'migration_state', purpose: 'Migration progress tracking' },
|
|
1155
|
-
{ table: 'sessions', purpose: 'Context persistence' },
|
|
1156
|
-
{ table: 'vector_indexes', purpose: 'HNSW index configuration' },
|
|
1157
|
-
{ table: 'metadata', purpose: 'System metadata' }
|
|
1158
|
-
]
|
|
1159
|
-
});
|
|
1160
|
-
output.writeln();
|
|
1161
|
-
output.writeln(output.bold('Indexes Created:'));
|
|
1162
|
-
output.printList(result.indexesCreated.slice(0, 8).map(idx => output.dim(idx)));
|
|
1163
|
-
if (result.indexesCreated.length > 8) {
|
|
1164
|
-
output.writeln(output.dim(` ... and ${result.indexesCreated.length - 8} more`));
|
|
1165
|
-
}
|
|
1166
|
-
output.writeln();
|
|
1167
|
-
}
|
|
1168
|
-
// Run verification if enabled
|
|
1169
|
-
if (verify) {
|
|
1170
|
-
const verifySpinner = output.createSpinner({ text: 'Verifying initialization...', spinner: 'dots' });
|
|
1171
|
-
verifySpinner.start();
|
|
1172
|
-
const verification = await verifyMemoryInit(result.dbPath, { verbose });
|
|
1173
|
-
if (verification.success) {
|
|
1174
|
-
verifySpinner.succeed(`Verification passed (${verification.summary.passed}/${verification.summary.total} tests)`);
|
|
1175
|
-
}
|
|
1176
|
-
else {
|
|
1177
|
-
verifySpinner.fail(`Verification failed (${verification.summary.failed}/${verification.summary.total} tests failed)`);
|
|
1178
|
-
}
|
|
1179
|
-
if (verbose || !verification.success) {
|
|
1254
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
1255
|
+
var backend, customPath, force, verbose, verify, loadEmbeddings, spinner, _a, initializeMemoryDatabase, loadEmbeddingModel, verifyMemoryInit, result, embeddingSpinner, embeddingResult, featureLines, _b, activated, failed, initTimeMs, controllerLines, _i, activated_1, name, _c, failed_1, name, verifySpinner, verification, fs, path, claudeDir, claudeDbPath, error_12;
|
|
1256
|
+
return __generator(this, function (_d) {
|
|
1257
|
+
switch (_d.label) {
|
|
1258
|
+
case 0:
|
|
1259
|
+
backend = ctx.flags.backend || 'hybrid';
|
|
1260
|
+
customPath = ctx.flags.path;
|
|
1261
|
+
force = ctx.flags.force;
|
|
1262
|
+
verbose = ctx.flags.verbose;
|
|
1263
|
+
verify = ctx.flags.verify !== false;
|
|
1264
|
+
loadEmbeddings = ctx.flags.loadEmbeddings;
|
|
1180
1265
|
output.writeln();
|
|
1181
|
-
output.writeln(output.bold('
|
|
1182
|
-
output.
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1266
|
+
output.writeln(output.bold('Initializing Memory Database'));
|
|
1267
|
+
output.writeln(output.dim('─'.repeat(50)));
|
|
1268
|
+
spinner = output.createSpinner({ text: 'Initializing schema...', spinner: 'dots' });
|
|
1269
|
+
spinner.start();
|
|
1270
|
+
_d.label = 1;
|
|
1271
|
+
case 1:
|
|
1272
|
+
_d.trys.push([1, 10, , 11]);
|
|
1273
|
+
return [4 /*yield*/, import('../memory/memory-initializer.js')];
|
|
1274
|
+
case 2:
|
|
1275
|
+
_a = _d.sent(), initializeMemoryDatabase = _a.initializeMemoryDatabase, loadEmbeddingModel = _a.loadEmbeddingModel, verifyMemoryInit = _a.verifyMemoryInit;
|
|
1276
|
+
return [4 /*yield*/, initializeMemoryDatabase({
|
|
1277
|
+
backend: backend,
|
|
1278
|
+
dbPath: customPath,
|
|
1279
|
+
force: force,
|
|
1280
|
+
verbose: verbose
|
|
1281
|
+
})];
|
|
1282
|
+
case 3:
|
|
1283
|
+
result = _d.sent();
|
|
1284
|
+
if (!result.success) {
|
|
1285
|
+
spinner.fail('Initialization failed');
|
|
1286
|
+
output.printError(result.error || 'Unknown error');
|
|
1287
|
+
return [2 /*return*/, { success: false, exitCode: 1 }];
|
|
1288
|
+
}
|
|
1289
|
+
spinner.succeed('Schema initialized');
|
|
1290
|
+
if (!loadEmbeddings) return [3 /*break*/, 5];
|
|
1291
|
+
embeddingSpinner = output.createSpinner({ text: 'Loading embedding model...', spinner: 'dots' });
|
|
1292
|
+
embeddingSpinner.start();
|
|
1293
|
+
return [4 /*yield*/, loadEmbeddingModel({ verbose: verbose })];
|
|
1294
|
+
case 4:
|
|
1295
|
+
embeddingResult = _d.sent();
|
|
1296
|
+
if (embeddingResult.success) {
|
|
1297
|
+
embeddingSpinner.succeed("Embedding model loaded: " + embeddingResult.modelName + " (" + embeddingResult.dimensions + "-dim, " + embeddingResult.loadTime + "ms)");
|
|
1298
|
+
}
|
|
1299
|
+
else {
|
|
1300
|
+
embeddingSpinner.stop(output.warning("Embedding model: " + (embeddingResult.error || 'Using fallback')));
|
|
1301
|
+
}
|
|
1302
|
+
_d.label = 5;
|
|
1303
|
+
case 5:
|
|
1304
|
+
output.writeln();
|
|
1305
|
+
featureLines = [
|
|
1306
|
+
"Backend: " + result.backend,
|
|
1307
|
+
"Schema Version: " + result.schemaVersion,
|
|
1308
|
+
"Database Path: " + result.dbPath,
|
|
1309
|
+
'',
|
|
1310
|
+
output.bold('Features:'),
|
|
1311
|
+
" Vector Embeddings: " + (result.features.vectorEmbeddings ? output.success('✓ Enabled') : output.dim('✗ Disabled')),
|
|
1312
|
+
" Pattern Learning: " + (result.features.patternLearning ? output.success('✓ Enabled') : output.dim('✗ Disabled')),
|
|
1313
|
+
" Temporal Decay: " + (result.features.temporalDecay ? output.success('✓ Enabled') : output.dim('✗ Disabled')),
|
|
1314
|
+
" HNSW Indexing: " + (result.features.hnswIndexing ? output.success('✓ Enabled') : output.dim('✗ Disabled')),
|
|
1315
|
+
" Migration Tracking: " + (result.features.migrationTracking ? output.success('✓ Enabled') : output.dim('✗ Disabled'))
|
|
1316
|
+
];
|
|
1317
|
+
if (verbose) {
|
|
1318
|
+
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");
|
|
1319
|
+
}
|
|
1320
|
+
output.printBox(featureLines.join('\n'), 'Configuration');
|
|
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();
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
// Show tables created
|
|
1349
|
+
if (verbose && result.tablesCreated.length > 0) {
|
|
1350
|
+
output.writeln(output.bold('Tables Created:'));
|
|
1351
|
+
output.printTable({
|
|
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"));
|
|
1373
|
+
}
|
|
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
|
+
}
|
|
1406
|
+
output.writeln();
|
|
1407
|
+
_d.label = 7;
|
|
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*/];
|
|
1219
1443
|
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
data: result
|
|
1223
|
-
};
|
|
1224
|
-
}
|
|
1225
|
-
catch (error) {
|
|
1226
|
-
spinner.fail('Initialization failed');
|
|
1227
|
-
output.printError(`Failed to initialize memory: ${error instanceof Error ? error.message : String(error)}`);
|
|
1228
|
-
return { success: false, exitCode: 1 };
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1444
|
+
});
|
|
1445
|
+
}); }
|
|
1231
1446
|
};
|
|
1232
1447
|
// Main memory command
|
|
1233
|
-
export
|
|
1448
|
+
export var memoryCommand = {
|
|
1234
1449
|
name: 'memory',
|
|
1235
1450
|
description: 'Memory management commands',
|
|
1236
1451
|
subcommands: [initMemoryCommand, storeCommand, retrieveCommand, searchCommand, listCommand, deleteCommand, statsCommand, configureCommand, cleanupCommand, compressCommand, exportCommand, importCommand],
|
|
@@ -1240,29 +1455,31 @@ export const memoryCommand = {
|
|
|
1240
1455
|
{ command: 'claude-flow memory search -q "auth patterns"', description: 'Search memory' },
|
|
1241
1456
|
{ command: 'claude-flow memory stats', description: 'Show statistics' }
|
|
1242
1457
|
],
|
|
1243
|
-
action:
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1458
|
+
action: function (ctx) { return __awaiter(void 0, void 0, Promise, function () {
|
|
1459
|
+
return __generator(this, function (_a) {
|
|
1460
|
+
output.writeln();
|
|
1461
|
+
output.writeln(output.bold('Memory Management Commands'));
|
|
1462
|
+
output.writeln();
|
|
1463
|
+
output.writeln('Usage: claude-flow memory <subcommand> [options]');
|
|
1464
|
+
output.writeln();
|
|
1465
|
+
output.writeln('Subcommands:');
|
|
1466
|
+
output.printList([
|
|
1467
|
+
output.highlight('init') + " - Initialize memory database (sql.js)",
|
|
1468
|
+
output.highlight('store') + " - Store data in memory",
|
|
1469
|
+
output.highlight('retrieve') + " - Retrieve data from memory",
|
|
1470
|
+
output.highlight('search') + " - Semantic/vector search",
|
|
1471
|
+
output.highlight('list') + " - List memory entries",
|
|
1472
|
+
output.highlight('delete') + " - Delete memory entry",
|
|
1473
|
+
output.highlight('stats') + " - Show statistics",
|
|
1474
|
+
output.highlight('configure') + " - Configure backend",
|
|
1475
|
+
output.highlight('cleanup') + " - Clean expired entries",
|
|
1476
|
+
output.highlight('compress') + " - Compress database",
|
|
1477
|
+
output.highlight('export') + " - Export memory to file",
|
|
1478
|
+
output.highlight('import') + " - Import from file"
|
|
1479
|
+
]);
|
|
1480
|
+
return [2 /*return*/, { success: true }];
|
|
1481
|
+
});
|
|
1482
|
+
}); }
|
|
1266
1483
|
};
|
|
1267
1484
|
export default memoryCommand;
|
|
1268
1485
|
//# sourceMappingURL=memory.js.map
|