@sparkleideas/cli 3.1.0-alpha.17 → 3.1.0-alpha.19
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/package.json +6 -6
- package/dist/src/benchmarks/pretrain/index.d.ts +0 -58
- package/dist/src/benchmarks/pretrain/index.d.ts.map +0 -1
- package/dist/src/benchmarks/pretrain/index.js +0 -404
- package/dist/src/benchmarks/pretrain/index.js.map +0 -1
- package/dist/src/commands/agent.d.ts +0 -8
- package/dist/src/commands/agent.d.ts.map +0 -1
- package/dist/src/commands/agent.js +0 -819
- package/dist/src/commands/agent.js.map +0 -1
- package/dist/src/commands/analyze.d.ts +0 -19
- package/dist/src/commands/analyze.d.ts.map +0 -1
- package/dist/src/commands/analyze.js +0 -1823
- package/dist/src/commands/analyze.js.map +0 -1
- package/dist/src/commands/benchmark.d.ts +0 -10
- package/dist/src/commands/benchmark.d.ts.map +0 -1
- package/dist/src/commands/benchmark.js +0 -459
- package/dist/src/commands/benchmark.js.map +0 -1
- package/dist/src/commands/categories.d.ts +0 -75
- package/dist/src/commands/categories.d.ts.map +0 -1
- package/dist/src/commands/categories.js +0 -178
- package/dist/src/commands/categories.js.map +0 -1
- package/dist/src/commands/claims.d.ts +0 -10
- package/dist/src/commands/claims.d.ts.map +0 -1
- package/dist/src/commands/claims.js +0 -373
- package/dist/src/commands/claims.js.map +0 -1
- package/dist/src/commands/completions.d.ts +0 -10
- package/dist/src/commands/completions.d.ts.map +0 -1
- package/dist/src/commands/completions.js +0 -539
- package/dist/src/commands/completions.js.map +0 -1
- package/dist/src/commands/config.d.ts +0 -8
- package/dist/src/commands/config.d.ts.map +0 -1
- package/dist/src/commands/config.js +0 -406
- package/dist/src/commands/config.js.map +0 -1
- package/dist/src/commands/daemon.d.ts +0 -8
- package/dist/src/commands/daemon.d.ts.map +0 -1
- package/dist/src/commands/daemon.js +0 -593
- package/dist/src/commands/daemon.js.map +0 -1
- package/dist/src/commands/deployment.d.ts +0 -10
- package/dist/src/commands/deployment.d.ts.map +0 -1
- package/dist/src/commands/deployment.js +0 -289
- package/dist/src/commands/deployment.js.map +0 -1
- package/dist/src/commands/doctor.d.ts +0 -10
- package/dist/src/commands/doctor.d.ts.map +0 -1
- package/dist/src/commands/doctor.js +0 -571
- package/dist/src/commands/doctor.js.map +0 -1
- package/dist/src/commands/embeddings.d.ts +0 -18
- package/dist/src/commands/embeddings.d.ts.map +0 -1
- package/dist/src/commands/embeddings.js +0 -1576
- package/dist/src/commands/embeddings.js.map +0 -1
- package/dist/src/commands/guidance.d.ts +0 -8
- package/dist/src/commands/guidance.d.ts.map +0 -1
- package/dist/src/commands/guidance.js +0 -560
- package/dist/src/commands/guidance.js.map +0 -1
- package/dist/src/commands/hive-mind.d.ts +0 -11
- package/dist/src/commands/hive-mind.d.ts.map +0 -1
- package/dist/src/commands/hive-mind.js +0 -1230
- package/dist/src/commands/hive-mind.js.map +0 -1
- package/dist/src/commands/hooks.d.ts +0 -8
- package/dist/src/commands/hooks.d.ts.map +0 -1
- package/dist/src/commands/hooks.js +0 -3756
- package/dist/src/commands/hooks.js.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/commands/index.js +0 -359
- package/dist/src/commands/index.js.map +0 -1
- package/dist/src/commands/init.d.ts +0 -8
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js +0 -948
- package/dist/src/commands/init.js.map +0 -1
- package/dist/src/commands/issues.d.ts +0 -21
- package/dist/src/commands/issues.d.ts.map +0 -1
- package/dist/src/commands/issues.js +0 -567
- package/dist/src/commands/issues.js.map +0 -1
- package/dist/src/commands/mcp.d.ts +0 -11
- package/dist/src/commands/mcp.d.ts.map +0 -1
- package/dist/src/commands/mcp.js +0 -700
- package/dist/src/commands/mcp.js.map +0 -1
- package/dist/src/commands/memory.d.ts +0 -8
- package/dist/src/commands/memory.d.ts.map +0 -1
- package/dist/src/commands/memory.js +0 -1268
- package/dist/src/commands/memory.js.map +0 -1
- package/dist/src/commands/migrate.d.ts +0 -8
- package/dist/src/commands/migrate.d.ts.map +0 -1
- package/dist/src/commands/migrate.js +0 -410
- package/dist/src/commands/migrate.js.map +0 -1
- package/dist/src/commands/neural.d.ts +0 -10
- package/dist/src/commands/neural.d.ts.map +0 -1
- package/dist/src/commands/neural.js +0 -1448
- package/dist/src/commands/neural.js.map +0 -1
- package/dist/src/commands/performance.d.ts +0 -10
- package/dist/src/commands/performance.d.ts.map +0 -1
- package/dist/src/commands/performance.js +0 -579
- package/dist/src/commands/performance.js.map +0 -1
- package/dist/src/commands/plugins.d.ts +0 -11
- package/dist/src/commands/plugins.d.ts.map +0 -1
- package/dist/src/commands/plugins.js +0 -820
- package/dist/src/commands/plugins.js.map +0 -1
- package/dist/src/commands/process.d.ts +0 -10
- package/dist/src/commands/process.d.ts.map +0 -1
- package/dist/src/commands/process.js +0 -641
- package/dist/src/commands/process.js.map +0 -1
- package/dist/src/commands/progress.d.ts +0 -11
- package/dist/src/commands/progress.d.ts.map +0 -1
- package/dist/src/commands/progress.js +0 -259
- package/dist/src/commands/progress.js.map +0 -1
- package/dist/src/commands/providers.d.ts +0 -10
- package/dist/src/commands/providers.d.ts.map +0 -1
- package/dist/src/commands/providers.js +0 -232
- package/dist/src/commands/providers.js.map +0 -1
- package/dist/src/commands/route.d.ts +0 -16
- package/dist/src/commands/route.d.ts.map +0 -1
- package/dist/src/commands/route.js +0 -813
- package/dist/src/commands/route.js.map +0 -1
- package/dist/src/commands/ruvector/backup.d.ts +0 -11
- package/dist/src/commands/ruvector/backup.d.ts.map +0 -1
- package/dist/src/commands/ruvector/backup.js +0 -746
- package/dist/src/commands/ruvector/backup.js.map +0 -1
- package/dist/src/commands/ruvector/benchmark.d.ts +0 -11
- package/dist/src/commands/ruvector/benchmark.d.ts.map +0 -1
- package/dist/src/commands/ruvector/benchmark.js +0 -480
- package/dist/src/commands/ruvector/benchmark.js.map +0 -1
- package/dist/src/commands/ruvector/import.d.ts +0 -18
- package/dist/src/commands/ruvector/import.d.ts.map +0 -1
- package/dist/src/commands/ruvector/import.js +0 -349
- package/dist/src/commands/ruvector/import.js.map +0 -1
- package/dist/src/commands/ruvector/index.d.ts +0 -29
- package/dist/src/commands/ruvector/index.d.ts.map +0 -1
- package/dist/src/commands/ruvector/index.js +0 -129
- package/dist/src/commands/ruvector/index.js.map +0 -1
- package/dist/src/commands/ruvector/init.d.ts +0 -11
- package/dist/src/commands/ruvector/init.d.ts.map +0 -1
- package/dist/src/commands/ruvector/init.js +0 -431
- package/dist/src/commands/ruvector/init.js.map +0 -1
- package/dist/src/commands/ruvector/migrate.d.ts +0 -11
- package/dist/src/commands/ruvector/migrate.d.ts.map +0 -1
- package/dist/src/commands/ruvector/migrate.js +0 -481
- package/dist/src/commands/ruvector/migrate.js.map +0 -1
- package/dist/src/commands/ruvector/optimize.d.ts +0 -11
- package/dist/src/commands/ruvector/optimize.d.ts.map +0 -1
- package/dist/src/commands/ruvector/optimize.js +0 -503
- package/dist/src/commands/ruvector/optimize.js.map +0 -1
- package/dist/src/commands/ruvector/setup.d.ts +0 -18
- package/dist/src/commands/ruvector/setup.d.ts.map +0 -1
- package/dist/src/commands/ruvector/setup.js +0 -765
- package/dist/src/commands/ruvector/setup.js.map +0 -1
- package/dist/src/commands/ruvector/status.d.ts +0 -11
- package/dist/src/commands/ruvector/status.d.ts.map +0 -1
- package/dist/src/commands/ruvector/status.js +0 -456
- package/dist/src/commands/ruvector/status.js.map +0 -1
- package/dist/src/commands/security.d.ts +0 -10
- package/dist/src/commands/security.d.ts.map +0 -1
- package/dist/src/commands/security.js +0 -575
- package/dist/src/commands/security.js.map +0 -1
- package/dist/src/commands/session.d.ts +0 -8
- package/dist/src/commands/session.d.ts.map +0 -1
- package/dist/src/commands/session.js +0 -750
- package/dist/src/commands/session.js.map +0 -1
- package/dist/src/commands/start.d.ts +0 -8
- package/dist/src/commands/start.d.ts.map +0 -1
- package/dist/src/commands/start.js +0 -418
- package/dist/src/commands/start.js.map +0 -1
- package/dist/src/commands/status.d.ts +0 -8
- package/dist/src/commands/status.d.ts.map +0 -1
- package/dist/src/commands/status.js +0 -584
- package/dist/src/commands/status.js.map +0 -1
- package/dist/src/commands/swarm.d.ts +0 -8
- package/dist/src/commands/swarm.d.ts.map +0 -1
- package/dist/src/commands/swarm.js +0 -748
- package/dist/src/commands/swarm.js.map +0 -1
- package/dist/src/commands/task.d.ts +0 -8
- package/dist/src/commands/task.d.ts.map +0 -1
- package/dist/src/commands/task.js +0 -671
- package/dist/src/commands/task.js.map +0 -1
- package/dist/src/commands/transfer-store.d.ts +0 -13
- package/dist/src/commands/transfer-store.d.ts.map +0 -1
- package/dist/src/commands/transfer-store.js +0 -428
- package/dist/src/commands/transfer-store.js.map +0 -1
- package/dist/src/commands/update.d.ts +0 -8
- package/dist/src/commands/update.d.ts.map +0 -1
- package/dist/src/commands/update.js +0 -276
- package/dist/src/commands/update.js.map +0 -1
- package/dist/src/commands/workflow.d.ts +0 -8
- package/dist/src/commands/workflow.d.ts.map +0 -1
- package/dist/src/commands/workflow.js +0 -617
- package/dist/src/commands/workflow.js.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/config-adapter.js +0 -186
- package/dist/src/config-adapter.js.map +0 -1
- package/dist/src/index.d.ts +0 -76
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -470
- package/dist/src/index.js.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/infrastructure/in-memory-repositories.js +0 -264
- package/dist/src/infrastructure/in-memory-repositories.js.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/claudemd-generator.js +0 -486
- package/dist/src/init/claudemd-generator.js.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/executor.js +0 -1612
- package/dist/src/init/executor.js.map +0 -1
- package/dist/src/init/helpers-generator.d.ts +0 -42
- package/dist/src/init/helpers-generator.d.ts.map +0 -1
- package/dist/src/init/helpers-generator.js +0 -613
- package/dist/src/init/helpers-generator.js.map +0 -1
- package/dist/src/init/index.d.ts +0 -13
- package/dist/src/init/index.d.ts.map +0 -1
- package/dist/src/init/index.js +0 -15
- package/dist/src/init/index.js.map +0 -1
- package/dist/src/init/mcp-generator.d.ts +0 -27
- package/dist/src/init/mcp-generator.d.ts.map +0 -1
- package/dist/src/init/mcp-generator.js +0 -100
- package/dist/src/init/mcp-generator.js.map +0 -1
- package/dist/src/init/settings-generator.d.ts +0 -14
- package/dist/src/init/settings-generator.d.ts.map +0 -1
- package/dist/src/init/settings-generator.js +0 -396
- package/dist/src/init/settings-generator.js.map +0 -1
- package/dist/src/init/statusline-generator.d.ts +0 -20
- package/dist/src/init/statusline-generator.d.ts.map +0 -1
- package/dist/src/init/statusline-generator.js +0 -1241
- package/dist/src/init/statusline-generator.js.map +0 -1
- package/dist/src/init/types.d.ts +0 -279
- package/dist/src/init/types.d.ts.map +0 -1
- package/dist/src/init/types.js +0 -252
- package/dist/src/init/types.js.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-client.js +0 -233
- package/dist/src/mcp-client.js.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-server.js +0 -601
- package/dist/src/mcp-server.js.map +0 -1
- package/dist/src/mcp-tools/agent-tools.d.ts +0 -9
- package/dist/src/mcp-tools/agent-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/agent-tools.js +0 -549
- package/dist/src/mcp-tools/agent-tools.js.map +0 -1
- package/dist/src/mcp-tools/analyze-tools.d.ts +0 -38
- package/dist/src/mcp-tools/analyze-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/analyze-tools.js +0 -317
- package/dist/src/mcp-tools/analyze-tools.js.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/auto-install.js +0 -131
- package/dist/src/mcp-tools/auto-install.js.map +0 -1
- package/dist/src/mcp-tools/browser-tools.d.ts +0 -13
- package/dist/src/mcp-tools/browser-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/browser-tools.js +0 -550
- package/dist/src/mcp-tools/browser-tools.js.map +0 -1
- package/dist/src/mcp-tools/claims-tools.d.ts +0 -12
- package/dist/src/mcp-tools/claims-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/claims-tools.js +0 -732
- package/dist/src/mcp-tools/claims-tools.js.map +0 -1
- package/dist/src/mcp-tools/config-tools.d.ts +0 -8
- package/dist/src/mcp-tools/config-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/config-tools.js +0 -333
- package/dist/src/mcp-tools/config-tools.js.map +0 -1
- package/dist/src/mcp-tools/coordination-tools.d.ts +0 -13
- package/dist/src/mcp-tools/coordination-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/coordination-tools.js +0 -486
- package/dist/src/mcp-tools/coordination-tools.js.map +0 -1
- package/dist/src/mcp-tools/daa-tools.d.ts +0 -13
- package/dist/src/mcp-tools/daa-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/daa-tools.js +0 -426
- package/dist/src/mcp-tools/daa-tools.js.map +0 -1
- package/dist/src/mcp-tools/embeddings-tools.d.ts +0 -9
- package/dist/src/mcp-tools/embeddings-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/embeddings-tools.js +0 -782
- package/dist/src/mcp-tools/embeddings-tools.js.map +0 -1
- package/dist/src/mcp-tools/github-tools.d.ts +0 -13
- package/dist/src/mcp-tools/github-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/github-tools.js +0 -373
- package/dist/src/mcp-tools/github-tools.js.map +0 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts +0 -8
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +0 -583
- package/dist/src/mcp-tools/hive-mind-tools.js.map +0 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts +0 -44
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/hooks-tools.js +0 -2797
- package/dist/src/mcp-tools/hooks-tools.js.map +0 -1
- package/dist/src/mcp-tools/index.d.ts +0 -23
- package/dist/src/mcp-tools/index.d.ts.map +0 -1
- package/dist/src/mcp-tools/index.js +0 -22
- package/dist/src/mcp-tools/index.js.map +0 -1
- package/dist/src/mcp-tools/memory-tools.d.ts +0 -14
- package/dist/src/mcp-tools/memory-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/memory-tools.js +0 -482
- package/dist/src/mcp-tools/memory-tools.js.map +0 -1
- package/dist/src/mcp-tools/neural-tools.d.ts +0 -16
- package/dist/src/mcp-tools/neural-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/neural-tools.js +0 -456
- package/dist/src/mcp-tools/neural-tools.js.map +0 -1
- package/dist/src/mcp-tools/performance-tools.d.ts +0 -16
- package/dist/src/mcp-tools/performance-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/performance-tools.js +0 -534
- package/dist/src/mcp-tools/performance-tools.js.map +0 -1
- package/dist/src/mcp-tools/progress-tools.d.ts +0 -14
- package/dist/src/mcp-tools/progress-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/progress-tools.js +0 -348
- package/dist/src/mcp-tools/progress-tools.js.map +0 -1
- package/dist/src/mcp-tools/security-tools.d.ts +0 -18
- package/dist/src/mcp-tools/security-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/security-tools.js +0 -434
- package/dist/src/mcp-tools/security-tools.js.map +0 -1
- package/dist/src/mcp-tools/session-tools.d.ts +0 -8
- package/dist/src/mcp-tools/session-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/session-tools.js +0 -315
- package/dist/src/mcp-tools/session-tools.js.map +0 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts +0 -8
- package/dist/src/mcp-tools/swarm-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/swarm-tools.js +0 -102
- package/dist/src/mcp-tools/swarm-tools.js.map +0 -1
- package/dist/src/mcp-tools/system-tools.d.ts +0 -13
- package/dist/src/mcp-tools/system-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/system-tools.js +0 -314
- package/dist/src/mcp-tools/system-tools.js.map +0 -1
- package/dist/src/mcp-tools/task-tools.d.ts +0 -8
- package/dist/src/mcp-tools/task-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/task-tools.js +0 -302
- package/dist/src/mcp-tools/task-tools.js.map +0 -1
- package/dist/src/mcp-tools/terminal-tools.d.ts +0 -13
- package/dist/src/mcp-tools/terminal-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/terminal-tools.js +0 -246
- package/dist/src/mcp-tools/terminal-tools.js.map +0 -1
- package/dist/src/mcp-tools/transfer-tools.d.ts +0 -14
- package/dist/src/mcp-tools/transfer-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/transfer-tools.js +0 -396
- package/dist/src/mcp-tools/transfer-tools.js.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/mcp-tools/types.js +0 -7
- package/dist/src/mcp-tools/types.js.map +0 -1
- package/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/workflow-tools.js +0 -481
- package/dist/src/mcp-tools/workflow-tools.js.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/ewc-consolidation.js +0 -542
- package/dist/src/memory/ewc-consolidation.js.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/intelligence.js +0 -766
- package/dist/src/memory/intelligence.js.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/memory-initializer.js +0 -1929
- package/dist/src/memory/memory-initializer.js.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/memory/sona-optimizer.js +0 -633
- package/dist/src/memory/sona-optimizer.js.map +0 -1
- package/dist/src/output.d.ts +0 -133
- package/dist/src/output.d.ts.map +0 -1
- package/dist/src/output.js +0 -513
- package/dist/src/output.js.map +0 -1
- package/dist/src/parser.d.ts +0 -41
- package/dist/src/parser.d.ts.map +0 -1
- package/dist/src/parser.js +0 -377
- package/dist/src/parser.js.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/manager.js +0 -383
- package/dist/src/plugins/manager.js.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/discovery.js +0 -1147
- package/dist/src/plugins/store/discovery.js.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/index.js +0 -141
- package/dist/src/plugins/store/index.js.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/search.js +0 -230
- package/dist/src/plugins/store/search.js.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/plugins/store/types.js +0 -7
- package/dist/src/plugins/store/types.js.map +0 -1
- package/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
- package/dist/src/plugins/tests/demo-plugin-store.d.ts.map +0 -1
- package/dist/src/plugins/tests/demo-plugin-store.js +0 -126
- package/dist/src/plugins/tests/demo-plugin-store.js.map +0 -1
- package/dist/src/plugins/tests/standalone-test.d.ts +0 -12
- package/dist/src/plugins/tests/standalone-test.d.ts.map +0 -1
- package/dist/src/plugins/tests/standalone-test.js +0 -188
- package/dist/src/plugins/tests/standalone-test.js.map +0 -1
- package/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
- package/dist/src/plugins/tests/test-plugin-store.d.ts.map +0 -1
- package/dist/src/plugins/tests/test-plugin-store.js +0 -206
- package/dist/src/plugins/tests/test-plugin-store.js.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/circuit-breaker.js +0 -241
- package/dist/src/production/circuit-breaker.js.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/error-handler.js +0 -299
- package/dist/src/production/error-handler.js.map +0 -1
- package/dist/src/production/index.d.ts +0 -23
- package/dist/src/production/index.d.ts.map +0 -1
- package/dist/src/production/index.js +0 -18
- package/dist/src/production/index.js.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/monitoring.js +0 -356
- package/dist/src/production/monitoring.js.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/rate-limiter.js +0 -201
- package/dist/src/production/rate-limiter.js.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/production/retry.js +0 -179
- package/dist/src/production/retry.js.map +0 -1
- package/dist/src/prompt.d.ts +0 -44
- package/dist/src/prompt.d.ts.map +0 -1
- package/dist/src/prompt.js +0 -501
- package/dist/src/prompt.js.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/runtime/headless.js +0 -284
- package/dist/src/runtime/headless.js.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/ast-analyzer.js +0 -277
- package/dist/src/ruvector/ast-analyzer.js.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/coverage-router.js +0 -529
- package/dist/src/ruvector/coverage-router.js.map +0 -1
- package/dist/src/ruvector/coverage-tools.d.ts +0 -33
- package/dist/src/ruvector/coverage-tools.d.ts.map +0 -1
- package/dist/src/ruvector/coverage-tools.js +0 -157
- package/dist/src/ruvector/coverage-tools.js.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/diff-classifier.js +0 -698
- package/dist/src/ruvector/diff-classifier.js.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/enhanced-model-router.js +0 -519
- package/dist/src/ruvector/enhanced-model-router.js.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/flash-attention.js +0 -643
- package/dist/src/ruvector/flash-attention.js.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/graph-analyzer.js +0 -929
- package/dist/src/ruvector/graph-analyzer.js.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/index.js +0 -60
- package/dist/src/ruvector/index.js.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/lora-adapter.js +0 -455
- package/dist/src/ruvector/lora-adapter.js.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/model-router.js +0 -488
- package/dist/src/ruvector/model-router.js.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/moe-router.js +0 -626
- package/dist/src/ruvector/moe-router.js.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/q-learning-router.js +0 -681
- package/dist/src/ruvector/q-learning-router.js.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/semantic-router.js +0 -178
- package/dist/src/ruvector/semantic-router.js.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/ruvector/vector-db.js +0 -243
- package/dist/src/ruvector/vector-db.js.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/claim-service.js +0 -818
- package/dist/src/services/claim-service.js.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/container-worker-pool.js +0 -581
- package/dist/src/services/container-worker-pool.js.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/headless-worker-executor.js +0 -999
- package/dist/src/services/headless-worker-executor.js.map +0 -1
- package/dist/src/services/index.d.ts +0 -13
- package/dist/src/services/index.d.ts.map +0 -1
- package/dist/src/services/index.js +0 -11
- package/dist/src/services/index.js.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/registry-api.js +0 -146
- package/dist/src/services/registry-api.js.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/ruvector-training.js +0 -498
- package/dist/src/services/ruvector-training.js.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-daemon.js +0 -756
- package/dist/src/services/worker-daemon.js.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/services/worker-queue.js +0 -511
- package/dist/src/services/worker-queue.js.map +0 -1
- package/dist/src/suggest.d.ts +0 -53
- package/dist/src/suggest.d.ts.map +0 -1
- package/dist/src/suggest.js +0 -200
- package/dist/src/suggest.js.map +0 -1
- package/dist/src/tests/ruvector-integration-benchmark.d.ts +0 -6
- package/dist/src/tests/ruvector-integration-benchmark.d.ts.map +0 -1
- package/dist/src/tests/ruvector-integration-benchmark.js +0 -385
- package/dist/src/tests/ruvector-integration-benchmark.js.map +0 -1
- package/dist/src/transfer/anonymization/index.d.ts +0 -25
- package/dist/src/transfer/anonymization/index.d.ts.map +0 -1
- package/dist/src/transfer/anonymization/index.js +0 -175
- package/dist/src/transfer/anonymization/index.js.map +0 -1
- package/dist/src/transfer/deploy-seraphine.d.ts +0 -13
- package/dist/src/transfer/deploy-seraphine.d.ts.map +0 -1
- package/dist/src/transfer/deploy-seraphine.js +0 -205
- package/dist/src/transfer/deploy-seraphine.js.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/export.js +0 -113
- package/dist/src/transfer/export.js.map +0 -1
- package/dist/src/transfer/index.d.ts +0 -12
- package/dist/src/transfer/index.d.ts.map +0 -1
- package/dist/src/transfer/index.js +0 -31
- package/dist/src/transfer/index.js.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/client.js +0 -299
- package/dist/src/transfer/ipfs/client.js.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/ipfs/upload.js +0 -413
- package/dist/src/transfer/ipfs/upload.js.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/models/seraphine.js +0 -373
- package/dist/src/transfer/models/seraphine.js.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/serialization/cfp.js +0 -180
- package/dist/src/transfer/serialization/cfp.js.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/storage/gcs.js +0 -230
- package/dist/src/transfer/storage/gcs.js.map +0 -1
- package/dist/src/transfer/storage/index.d.ts +0 -6
- package/dist/src/transfer/storage/index.d.ts.map +0 -1
- package/dist/src/transfer/storage/index.js +0 -6
- package/dist/src/transfer/storage/index.js.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/discovery.js +0 -382
- package/dist/src/transfer/store/discovery.js.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/download.js +0 -334
- package/dist/src/transfer/store/download.js.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/index.js +0 -153
- package/dist/src/transfer/store/index.js.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/publish.js +0 -294
- package/dist/src/transfer/store/publish.js.map +0 -1
- package/dist/src/transfer/store/registry.d.ts +0 -58
- package/dist/src/transfer/store/registry.d.ts.map +0 -1
- package/dist/src/transfer/store/registry.js +0 -285
- package/dist/src/transfer/store/registry.js.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/store/search.js +0 -232
- package/dist/src/transfer/store/search.js.map +0 -1
- package/dist/src/transfer/store/tests/standalone-test.d.ts +0 -12
- package/dist/src/transfer/store/tests/standalone-test.d.ts.map +0 -1
- package/dist/src/transfer/store/tests/standalone-test.js +0 -190
- package/dist/src/transfer/store/tests/standalone-test.js.map +0 -1
- package/dist/src/transfer/store/types.d.ts +0 -193
- package/dist/src/transfer/store/types.d.ts.map +0 -1
- package/dist/src/transfer/store/types.js +0 -6
- package/dist/src/transfer/store/types.js.map +0 -1
- package/dist/src/transfer/test-seraphine.d.ts +0 -6
- package/dist/src/transfer/test-seraphine.d.ts.map +0 -1
- package/dist/src/transfer/test-seraphine.js +0 -105
- package/dist/src/transfer/test-seraphine.js.map +0 -1
- package/dist/src/transfer/tests/test-store.d.ts +0 -7
- package/dist/src/transfer/tests/test-store.d.ts.map +0 -1
- package/dist/src/transfer/tests/test-store.js +0 -214
- package/dist/src/transfer/tests/test-store.js.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/transfer/types.js +0 -6
- package/dist/src/transfer/types.js.map +0 -1
- package/dist/src/types.d.ts +0 -198
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -38
- package/dist/src/types.js.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/checker.js +0 -190
- package/dist/src/update/checker.js.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/executor.js +0 -181
- package/dist/src/update/executor.js.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/index.js +0 -64
- package/dist/src/update/index.js.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/rate-limiter.js +0 -96
- package/dist/src/update/rate-limiter.js.map +0 -1
- package/dist/src/update/validator.d.ts +0 -17
- package/dist/src/update/validator.d.ts.map +0 -1
- package/dist/src/update/validator.js +0 -123
- package/dist/src/update/validator.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session MCP Tools for CLI
|
|
3
|
-
*
|
|
4
|
-
* Tool definitions for session management with file persistence.
|
|
5
|
-
*/
|
|
6
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, unlinkSync, statSync } from 'node:fs';
|
|
7
|
-
import { join } from 'node:path';
|
|
8
|
-
// Storage paths
|
|
9
|
-
const STORAGE_DIR = '.claude-flow';
|
|
10
|
-
const SESSION_DIR = 'sessions';
|
|
11
|
-
function getSessionDir() {
|
|
12
|
-
return join(process.cwd(), STORAGE_DIR, SESSION_DIR);
|
|
13
|
-
}
|
|
14
|
-
function getSessionPath(sessionId) {
|
|
15
|
-
// Sanitize sessionId to prevent path traversal
|
|
16
|
-
const safeId = sessionId.replace(/[^a-zA-Z0-9_-]/g, '_');
|
|
17
|
-
return join(getSessionDir(), `${safeId}.json`);
|
|
18
|
-
}
|
|
19
|
-
function ensureSessionDir() {
|
|
20
|
-
const dir = getSessionDir();
|
|
21
|
-
if (!existsSync(dir)) {
|
|
22
|
-
mkdirSync(dir, { recursive: true });
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function loadSession(sessionId) {
|
|
26
|
-
try {
|
|
27
|
-
const path = getSessionPath(sessionId);
|
|
28
|
-
if (existsSync(path)) {
|
|
29
|
-
const data = readFileSync(path, 'utf-8');
|
|
30
|
-
return JSON.parse(data);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
// Return null on error
|
|
35
|
-
}
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
function saveSession(session) {
|
|
39
|
-
ensureSessionDir();
|
|
40
|
-
writeFileSync(getSessionPath(session.sessionId), JSON.stringify(session, null, 2), 'utf-8');
|
|
41
|
-
}
|
|
42
|
-
function listSessions() {
|
|
43
|
-
ensureSessionDir();
|
|
44
|
-
const dir = getSessionDir();
|
|
45
|
-
const files = readdirSync(dir).filter(f => f.endsWith('.json'));
|
|
46
|
-
const sessions = [];
|
|
47
|
-
for (const file of files) {
|
|
48
|
-
try {
|
|
49
|
-
const data = readFileSync(join(dir, file), 'utf-8');
|
|
50
|
-
sessions.push(JSON.parse(data));
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
// Skip invalid files
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return sessions;
|
|
57
|
-
}
|
|
58
|
-
// Load related stores for session data
|
|
59
|
-
function loadRelatedStores(options) {
|
|
60
|
-
const data = {};
|
|
61
|
-
if (options.includeMemory) {
|
|
62
|
-
try {
|
|
63
|
-
const memoryPath = join(process.cwd(), STORAGE_DIR, 'memory', 'store.json');
|
|
64
|
-
if (existsSync(memoryPath)) {
|
|
65
|
-
data.memory = JSON.parse(readFileSync(memoryPath, 'utf-8'));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
catch { /* ignore */ }
|
|
69
|
-
}
|
|
70
|
-
if (options.includeTasks) {
|
|
71
|
-
try {
|
|
72
|
-
const taskPath = join(process.cwd(), STORAGE_DIR, 'tasks', 'store.json');
|
|
73
|
-
if (existsSync(taskPath)) {
|
|
74
|
-
data.tasks = JSON.parse(readFileSync(taskPath, 'utf-8'));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch { /* ignore */ }
|
|
78
|
-
}
|
|
79
|
-
if (options.includeAgents) {
|
|
80
|
-
try {
|
|
81
|
-
const agentPath = join(process.cwd(), STORAGE_DIR, 'agents', 'store.json');
|
|
82
|
-
if (existsSync(agentPath)) {
|
|
83
|
-
data.agents = JSON.parse(readFileSync(agentPath, 'utf-8'));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch { /* ignore */ }
|
|
87
|
-
}
|
|
88
|
-
return data;
|
|
89
|
-
}
|
|
90
|
-
export const sessionTools = [
|
|
91
|
-
{
|
|
92
|
-
name: 'session_save',
|
|
93
|
-
description: 'Save current session state',
|
|
94
|
-
category: 'session',
|
|
95
|
-
inputSchema: {
|
|
96
|
-
type: 'object',
|
|
97
|
-
properties: {
|
|
98
|
-
name: { type: 'string', description: 'Session name' },
|
|
99
|
-
description: { type: 'string', description: 'Session description' },
|
|
100
|
-
includeMemory: { type: 'boolean', description: 'Include memory in session' },
|
|
101
|
-
includeTasks: { type: 'boolean', description: 'Include tasks in session' },
|
|
102
|
-
includeAgents: { type: 'boolean', description: 'Include agents in session' },
|
|
103
|
-
},
|
|
104
|
-
required: ['name'],
|
|
105
|
-
},
|
|
106
|
-
handler: async (input) => {
|
|
107
|
-
const sessionId = `session-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
108
|
-
// Load related data based on options
|
|
109
|
-
const data = loadRelatedStores({
|
|
110
|
-
includeMemory: input.includeMemory,
|
|
111
|
-
includeTasks: input.includeTasks,
|
|
112
|
-
includeAgents: input.includeAgents,
|
|
113
|
-
});
|
|
114
|
-
// Calculate stats
|
|
115
|
-
const stats = {
|
|
116
|
-
tasks: data.tasks ? Object.keys(data.tasks.tasks || {}).length : 0,
|
|
117
|
-
agents: data.agents ? Object.keys(data.agents.agents || {}).length : 0,
|
|
118
|
-
memoryEntries: data.memory ? Object.keys(data.memory.entries || {}).length : 0,
|
|
119
|
-
totalSize: 0,
|
|
120
|
-
};
|
|
121
|
-
const session = {
|
|
122
|
-
sessionId,
|
|
123
|
-
name: input.name,
|
|
124
|
-
description: input.description,
|
|
125
|
-
savedAt: new Date().toISOString(),
|
|
126
|
-
stats,
|
|
127
|
-
data: Object.keys(data).length > 0 ? data : undefined,
|
|
128
|
-
};
|
|
129
|
-
// Calculate size
|
|
130
|
-
const sessionJson = JSON.stringify(session);
|
|
131
|
-
session.stats.totalSize = Buffer.byteLength(sessionJson, 'utf-8');
|
|
132
|
-
saveSession(session);
|
|
133
|
-
return {
|
|
134
|
-
sessionId,
|
|
135
|
-
name: session.name,
|
|
136
|
-
savedAt: session.savedAt,
|
|
137
|
-
stats: session.stats,
|
|
138
|
-
path: getSessionPath(sessionId),
|
|
139
|
-
};
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: 'session_restore',
|
|
144
|
-
description: 'Restore a saved session',
|
|
145
|
-
category: 'session',
|
|
146
|
-
inputSchema: {
|
|
147
|
-
type: 'object',
|
|
148
|
-
properties: {
|
|
149
|
-
sessionId: { type: 'string', description: 'Session ID to restore' },
|
|
150
|
-
name: { type: 'string', description: 'Session name to restore' },
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
handler: async (input) => {
|
|
154
|
-
let session = null;
|
|
155
|
-
// Try to find by sessionId first
|
|
156
|
-
if (input.sessionId) {
|
|
157
|
-
session = loadSession(input.sessionId);
|
|
158
|
-
}
|
|
159
|
-
// Try to find by name if sessionId not found
|
|
160
|
-
if (!session && input.name) {
|
|
161
|
-
const sessions = listSessions();
|
|
162
|
-
session = sessions.find(s => s.name === input.name) || null;
|
|
163
|
-
}
|
|
164
|
-
// Try to find latest if no params
|
|
165
|
-
if (!session && !input.sessionId && !input.name) {
|
|
166
|
-
const sessions = listSessions();
|
|
167
|
-
if (sessions.length > 0) {
|
|
168
|
-
sessions.sort((a, b) => new Date(b.savedAt).getTime() - new Date(a.savedAt).getTime());
|
|
169
|
-
session = sessions[0];
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (session) {
|
|
173
|
-
// Restore data to respective stores
|
|
174
|
-
if (session.data?.memory) {
|
|
175
|
-
const memoryDir = join(process.cwd(), STORAGE_DIR, 'memory');
|
|
176
|
-
if (!existsSync(memoryDir))
|
|
177
|
-
mkdirSync(memoryDir, { recursive: true });
|
|
178
|
-
writeFileSync(join(memoryDir, 'store.json'), JSON.stringify(session.data.memory, null, 2), 'utf-8');
|
|
179
|
-
}
|
|
180
|
-
if (session.data?.tasks) {
|
|
181
|
-
const taskDir = join(process.cwd(), STORAGE_DIR, 'tasks');
|
|
182
|
-
if (!existsSync(taskDir))
|
|
183
|
-
mkdirSync(taskDir, { recursive: true });
|
|
184
|
-
writeFileSync(join(taskDir, 'store.json'), JSON.stringify(session.data.tasks, null, 2), 'utf-8');
|
|
185
|
-
}
|
|
186
|
-
if (session.data?.agents) {
|
|
187
|
-
const agentDir = join(process.cwd(), STORAGE_DIR, 'agents');
|
|
188
|
-
if (!existsSync(agentDir))
|
|
189
|
-
mkdirSync(agentDir, { recursive: true });
|
|
190
|
-
writeFileSync(join(agentDir, 'store.json'), JSON.stringify(session.data.agents, null, 2), 'utf-8');
|
|
191
|
-
}
|
|
192
|
-
return {
|
|
193
|
-
sessionId: session.sessionId,
|
|
194
|
-
name: session.name,
|
|
195
|
-
restored: true,
|
|
196
|
-
restoredAt: new Date().toISOString(),
|
|
197
|
-
stats: session.stats,
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
return {
|
|
201
|
-
sessionId: input.sessionId || input.name || 'latest',
|
|
202
|
-
restored: false,
|
|
203
|
-
error: 'Session not found',
|
|
204
|
-
};
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
name: 'session_list',
|
|
209
|
-
description: 'List saved sessions',
|
|
210
|
-
category: 'session',
|
|
211
|
-
inputSchema: {
|
|
212
|
-
type: 'object',
|
|
213
|
-
properties: {
|
|
214
|
-
limit: { type: 'number', description: 'Maximum sessions to return' },
|
|
215
|
-
sortBy: { type: 'string', description: 'Sort field (date, name, size)' },
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
handler: async (input) => {
|
|
219
|
-
let sessions = listSessions();
|
|
220
|
-
// Sort
|
|
221
|
-
const sortBy = input.sortBy || 'date';
|
|
222
|
-
if (sortBy === 'date') {
|
|
223
|
-
sessions.sort((a, b) => new Date(b.savedAt).getTime() - new Date(a.savedAt).getTime());
|
|
224
|
-
}
|
|
225
|
-
else if (sortBy === 'name') {
|
|
226
|
-
sessions.sort((a, b) => a.name.localeCompare(b.name));
|
|
227
|
-
}
|
|
228
|
-
else if (sortBy === 'size') {
|
|
229
|
-
sessions.sort((a, b) => b.stats.totalSize - a.stats.totalSize);
|
|
230
|
-
}
|
|
231
|
-
// Apply limit
|
|
232
|
-
const limit = input.limit || 10;
|
|
233
|
-
sessions = sessions.slice(0, limit);
|
|
234
|
-
return {
|
|
235
|
-
sessions: sessions.map(s => ({
|
|
236
|
-
sessionId: s.sessionId,
|
|
237
|
-
name: s.name,
|
|
238
|
-
description: s.description,
|
|
239
|
-
savedAt: s.savedAt,
|
|
240
|
-
stats: s.stats,
|
|
241
|
-
})),
|
|
242
|
-
total: sessions.length,
|
|
243
|
-
limit,
|
|
244
|
-
};
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
name: 'session_delete',
|
|
249
|
-
description: 'Delete a saved session',
|
|
250
|
-
category: 'session',
|
|
251
|
-
inputSchema: {
|
|
252
|
-
type: 'object',
|
|
253
|
-
properties: {
|
|
254
|
-
sessionId: { type: 'string', description: 'Session ID to delete' },
|
|
255
|
-
},
|
|
256
|
-
required: ['sessionId'],
|
|
257
|
-
},
|
|
258
|
-
handler: async (input) => {
|
|
259
|
-
const sessionId = input.sessionId;
|
|
260
|
-
const path = getSessionPath(sessionId);
|
|
261
|
-
if (existsSync(path)) {
|
|
262
|
-
unlinkSync(path);
|
|
263
|
-
return {
|
|
264
|
-
sessionId,
|
|
265
|
-
deleted: true,
|
|
266
|
-
deletedAt: new Date().toISOString(),
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
return {
|
|
270
|
-
sessionId,
|
|
271
|
-
deleted: false,
|
|
272
|
-
error: 'Session not found',
|
|
273
|
-
};
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
name: 'session_info',
|
|
278
|
-
description: 'Get detailed session information',
|
|
279
|
-
category: 'session',
|
|
280
|
-
inputSchema: {
|
|
281
|
-
type: 'object',
|
|
282
|
-
properties: {
|
|
283
|
-
sessionId: { type: 'string', description: 'Session ID' },
|
|
284
|
-
},
|
|
285
|
-
required: ['sessionId'],
|
|
286
|
-
},
|
|
287
|
-
handler: async (input) => {
|
|
288
|
-
const sessionId = input.sessionId;
|
|
289
|
-
const session = loadSession(sessionId);
|
|
290
|
-
if (session) {
|
|
291
|
-
const path = getSessionPath(sessionId);
|
|
292
|
-
const stat = statSync(path);
|
|
293
|
-
return {
|
|
294
|
-
sessionId: session.sessionId,
|
|
295
|
-
name: session.name,
|
|
296
|
-
description: session.description,
|
|
297
|
-
savedAt: session.savedAt,
|
|
298
|
-
stats: session.stats,
|
|
299
|
-
fileSize: stat.size,
|
|
300
|
-
path,
|
|
301
|
-
hasData: {
|
|
302
|
-
memory: !!session.data?.memory,
|
|
303
|
-
tasks: !!session.data?.tasks,
|
|
304
|
-
agents: !!session.data?.agents,
|
|
305
|
-
},
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
return {
|
|
309
|
-
sessionId,
|
|
310
|
-
error: 'Session not found',
|
|
311
|
-
};
|
|
312
|
-
},
|
|
313
|
-
},
|
|
314
|
-
];
|
|
315
|
-
//# sourceMappingURL=session-tools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-tools.js","sourceRoot":"","sources":["../../../src/mcp-tools/session-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAChH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,gBAAgB;AAChB,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,MAAM,WAAW,GAAG,UAAU,CAAC;AAoB/B,SAAS,aAAa;IACpB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,cAAc,CAAC,SAAiB;IACvC,+CAA+C;IAC/C,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;IACzD,OAAO,IAAI,CAAC,aAAa,EAAE,EAAE,GAAG,MAAM,OAAO,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,gBAAgB;IACvB,MAAM,GAAG,GAAG,aAAa,EAAE,CAAC;IAC5B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,SAAiB;IACpC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;QACvC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACzC,OAAO,IAAI,CAAC,KA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,CAAC,IAAI,EAAE,MAAM;qBAC/B;iBACF,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,SAAS;gBACT,KAAK,EAAE,mBAAmB;aAC3B,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swarm-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/swarm-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,UAAU,EAAE,OAAO,EAgG/B,CAAC"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Swarm MCP Tools for CLI
|
|
3
|
-
*
|
|
4
|
-
* Tool definitions for swarm coordination.
|
|
5
|
-
*/
|
|
6
|
-
export const swarmTools = [
|
|
7
|
-
{
|
|
8
|
-
name: 'swarm_init',
|
|
9
|
-
description: 'Initialize a swarm',
|
|
10
|
-
category: 'swarm',
|
|
11
|
-
inputSchema: {
|
|
12
|
-
type: 'object',
|
|
13
|
-
properties: {
|
|
14
|
-
topology: { type: 'string', description: 'Swarm topology type' },
|
|
15
|
-
maxAgents: { type: 'number', description: 'Maximum number of agents' },
|
|
16
|
-
config: { type: 'object', description: 'Swarm configuration' },
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
handler: async (input) => {
|
|
20
|
-
const topology = input.topology || 'hierarchical-mesh';
|
|
21
|
-
const maxAgents = input.maxAgents || 15;
|
|
22
|
-
const config = (input.config || {});
|
|
23
|
-
return {
|
|
24
|
-
success: true,
|
|
25
|
-
swarmId: `swarm-${Date.now()}`,
|
|
26
|
-
topology,
|
|
27
|
-
initializedAt: new Date().toISOString(),
|
|
28
|
-
config: {
|
|
29
|
-
topology,
|
|
30
|
-
maxAgents,
|
|
31
|
-
currentAgents: 0,
|
|
32
|
-
communicationProtocol: config.communicationProtocol || 'message-bus',
|
|
33
|
-
autoScaling: config.autoScaling ?? true,
|
|
34
|
-
consensusMechanism: config.consensusMechanism || 'majority',
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: 'swarm_status',
|
|
41
|
-
description: 'Get swarm status',
|
|
42
|
-
category: 'swarm',
|
|
43
|
-
inputSchema: {
|
|
44
|
-
type: 'object',
|
|
45
|
-
properties: {
|
|
46
|
-
swarmId: { type: 'string', description: 'Swarm ID' },
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
handler: async (input) => {
|
|
50
|
-
return {
|
|
51
|
-
swarmId: input.swarmId,
|
|
52
|
-
status: 'running',
|
|
53
|
-
agentCount: 0,
|
|
54
|
-
taskCount: 0,
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'swarm_shutdown',
|
|
60
|
-
description: 'Shutdown a swarm',
|
|
61
|
-
category: 'swarm',
|
|
62
|
-
inputSchema: {
|
|
63
|
-
type: 'object',
|
|
64
|
-
properties: {
|
|
65
|
-
swarmId: { type: 'string', description: 'Swarm ID' },
|
|
66
|
-
graceful: { type: 'boolean', description: 'Graceful shutdown' },
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
handler: async (input) => {
|
|
70
|
-
return {
|
|
71
|
-
success: true,
|
|
72
|
-
swarmId: input.swarmId,
|
|
73
|
-
terminated: true,
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: 'swarm_health',
|
|
79
|
-
description: 'Check swarm health status',
|
|
80
|
-
category: 'swarm',
|
|
81
|
-
inputSchema: {
|
|
82
|
-
type: 'object',
|
|
83
|
-
properties: {
|
|
84
|
-
swarmId: { type: 'string', description: 'Swarm ID to check' },
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
handler: async (input) => {
|
|
88
|
-
return {
|
|
89
|
-
status: 'healthy',
|
|
90
|
-
swarmId: input.swarmId || 'default',
|
|
91
|
-
checks: [
|
|
92
|
-
{ name: 'coordinator', status: 'ok', message: 'Coordinator responding' },
|
|
93
|
-
{ name: 'agents', status: 'ok', message: 'Agent pool healthy' },
|
|
94
|
-
{ name: 'memory', status: 'ok', message: 'Memory backend connected' },
|
|
95
|
-
{ name: 'messaging', status: 'ok', message: 'Message bus active' },
|
|
96
|
-
],
|
|
97
|
-
checkedAt: new Date().toISOString(),
|
|
98
|
-
};
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
];
|
|
102
|
-
//# sourceMappingURL=swarm-tools.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swarm-tools.js","sourceRoot":"","sources":["../../../src/mcp-tools/swarm-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,UAAU,GAAc;IACnC;QACE,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,oBAAoB;QACjC,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE;gBAChE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0BAA0B,EAAE;gBACtE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE;aAC/D;SACF;QACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,mBAAmB,CAAC;YACvD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC;YACxC,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAA4B,CAAC;YAE/D,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,E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AE,IAAI;aACjB,CAAC;QACJ,CAAC;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,2BAA2B;QACxC,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE;aAC9D;SACF;QACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACvB,OAAO;gBACL,MAAM,EAAE,SAAkB;gBAC1B,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,SAAS;gBACnC,MAAM,EAAE;oBACN,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,wBAAwB,EAAE;oBACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,EAAE;oBAC/D,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,0BAA0B,EAAE;oBACrE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,EAAE;iBACnE;gBACD,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACpC,CAAC;QACJ,CAAC;KACF;CACF,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* System MCP Tools for CLI
|
|
3
|
-
*
|
|
4
|
-
* V2 Compatibility - System monitoring tools: status, metrics, health
|
|
5
|
-
*
|
|
6
|
-
* ✅ Uses REAL system metrics via Node.js APIs:
|
|
7
|
-
* - process.memoryUsage() for real memory stats
|
|
8
|
-
* - process.cpuUsage() for real CPU stats
|
|
9
|
-
* - os module for system information
|
|
10
|
-
*/
|
|
11
|
-
import type { MCPTool } from './types.js';
|
|
12
|
-
export declare const systemTools: MCPTool[];
|
|
13
|
-
//# sourceMappingURL=system-tools.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/system-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAiE1C,eAAO,MAAM,WAAW,EAAE,OAAO,EAuRhC,CAAC"}
|