monomind 1.18.13 → 1.19.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/researcher.md +29 -24
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/github-modes.md +1 -1
- package/.claude/agents/github/issue-tracker.md +1 -1
- package/.claude/agents/github/multi-repo-swarm.md +1 -1
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/project-board-sync.md +1 -1
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/github/repo-architect.md +1 -1
- package/.claude/agents/github/swarm-issue.md +1 -1
- package/.claude/agents/github/swarm-pr.md +1 -1
- package/.claude/agents/github/sync-coordinator.md +1 -1
- package/.claude/agents/github/workflow-automation.md +1 -1
- package/.claude/agents/goal/goal-planner.md +1 -1
- package/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
- package/.claude/agents/testing/production-validator.md +8 -7
- package/.claude/agents/testing/testing-evidence-collector.md +3 -1
- package/.claude/commands/mastermind/_repeat.md +22 -3
- package/.claude/commands/mastermind/architect.md +1 -1
- package/.claude/commands/mastermind/autodev.md +1 -1
- package/.claude/commands/mastermind/build.md +1 -1
- package/.claude/commands/mastermind/code-review.md +5 -5
- package/.claude/commands/mastermind/debug.md +1 -1
- package/.claude/commands/mastermind/help.md +2 -2
- package/.claude/commands/mastermind/idea.md +1 -1
- package/.claude/commands/mastermind/improve.md +1 -1
- package/.claude/commands/mastermind/okf-export.md +14 -0
- package/.claude/commands/mastermind/okf-import.md +15 -0
- package/.claude/commands/mastermind/plan.md +1 -1
- package/.claude/commands/mastermind/research.md +1 -1
- package/.claude/commands/mastermind/review.md +12 -1
- package/.claude/commands/mastermind/runorg.md +1 -1
- package/.claude/commands/mastermind/taskdev.md +1 -1
- package/.claude/commands/mastermind/tdd.md +1 -1
- package/.claude/commands/mastermind/verify.md +1 -1
- package/.claude/helpers/graphify-freshen.cjs +16 -20
- package/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
- package/.claude/helpers/handlers/capture-handler.cjs +110 -0
- package/.claude/helpers/handlers/route-handler.cjs +180 -256
- package/.claude/helpers/handlers/session-handler.cjs +139 -142
- package/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
- package/.claude/helpers/handlers/task-handler.cjs +8 -155
- package/.claude/helpers/hook-handler.cjs +89 -5
- package/.claude/helpers/intelligence.cjs +164 -15
- package/.claude/helpers/learning-service.mjs +1 -0
- package/.claude/helpers/mastermind-activate.cjs +33 -51
- package/.claude/helpers/monolean-activate.cjs +13 -3
- package/.claude/helpers/monolean-propagate.cjs +7 -3
- package/.claude/helpers/router.cjs +47 -9
- package/.claude/helpers/utils/monograph.cjs +37 -20
- package/.claude/settings.json +0 -20
- package/.claude/skills/mastermind-skills/_repeat.md +29 -4
- package/.claude/skills/mastermind-skills/architect.md +5 -6
- package/.claude/skills/mastermind-skills/autodev.md +8 -5
- package/.claude/skills/mastermind-skills/review.md +25 -11
- package/.claude/skills/mastermind-skills/techport.md +37 -3
- package/.claude/skills/monodesign/document.md +9 -6
- package/.claude/skills/monodesign/extract.md +1 -1
- package/.claude/skills/monodesign/reference/document.md +1 -1
- package/.claude/skills/monodesign/reference/live.md +1 -1
- package/.claude/skills/monolean/SKILL.md +1 -1
- package/package.json +1 -1
- package/packages/@monomind/cli/.claude/agents/core/researcher.md +29 -24
- package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/github-modes.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/issue-tracker.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/pr-manager.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/release-manager.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/sync-coordinator.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +1 -1
- package/packages/@monomind/cli/.claude/agents/goal/goal-planner.md +1 -1
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
- package/packages/@monomind/cli/.claude/agents/testing/production-validator.md +8 -7
- package/packages/@monomind/cli/.claude/agents/testing/testing-evidence-collector.md +3 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +22 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/architect.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/autodev.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/build.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/debug.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/help.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/idea.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/improve.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-export.md +14 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-import.md +15 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/plan.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/research.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/review.md +12 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/taskdev.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/tdd.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/verify.md +1 -1
- package/packages/@monomind/cli/.claude/helpers/graphify-freshen.cjs +16 -20
- package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
- package/packages/@monomind/cli/.claude/helpers/handlers/capture-handler.cjs +110 -0
- package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +180 -256
- package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +139 -142
- package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
- package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +8 -155
- package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +89 -5
- package/packages/@monomind/cli/.claude/helpers/intelligence.cjs +164 -15
- package/packages/@monomind/cli/.claude/helpers/learning-service.mjs +1 -0
- package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +33 -51
- package/packages/@monomind/cli/.claude/helpers/monolean-activate.cjs +13 -3
- package/packages/@monomind/cli/.claude/helpers/monolean-propagate.cjs +7 -3
- package/packages/@monomind/cli/.claude/helpers/router.cjs +47 -9
- package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +37 -20
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/_repeat.md +29 -4
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/architect.md +5 -6
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/autodev.md +8 -5
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/review.md +25 -11
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/techport.md +37 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/document.md +9 -6
- package/packages/@monomind/cli/.claude/skills/monodesign/extract.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monolean/SKILL.md +1 -1
- package/packages/@monomind/cli/bin/mcp-server.js +11 -1
- package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/agent-ops.js +1 -59
- package/packages/@monomind/cli/dist/src/commands/agent.js +2 -3
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/browse-action.js +94 -2
- package/packages/@monomind/cli/dist/src/commands/completions.js +11 -56
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.d.ts +1 -3
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.js +2 -116
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +2 -5
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +8 -7
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.js +0 -307
- package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -12
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +3 -51
- package/packages/@monomind/cli/dist/src/commands/index.js +36 -184
- package/packages/@monomind/cli/dist/src/commands/init-wizard.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/mcp.js +32 -4
- package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/memory-admin.js +1 -118
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +5 -171
- package/packages/@monomind/cli/dist/src/commands/memory.js +3 -6
- package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +3 -1
- package/packages/@monomind/cli/dist/src/commands/neural-core.js +145 -6
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +4 -4
- package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural-registry.js +4 -4
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural.js +6 -6
- package/packages/@monomind/cli/dist/src/commands/performance.js +68 -58
- package/packages/@monomind/cli/dist/src/commands/providers.js +2 -131
- package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/commands/security-misc.js +69 -45
- package/packages/@monomind/cli/dist/src/commands/security.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/session.js +1 -285
- package/packages/@monomind/cli/dist/src/commands/start.js +2 -41
- package/packages/@monomind/cli/dist/src/commands/status.js +18 -29
- package/packages/@monomind/cli/dist/src/commands/swarm.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/task.js +2 -49
- package/packages/@monomind/cli/dist/src/commands/workflow.js +2 -104
- package/packages/@monomind/cli/dist/src/index.js +7 -0
- package/packages/@monomind/cli/dist/src/init/executor.js +3 -14
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -22
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -1
- package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -3
- package/packages/@monomind/cli/dist/src/init/types.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-client.js +0 -6
- package/packages/@monomind/cli/dist/src/mcp-server.js +16 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +0 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.d.ts +5 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.js +32 -46
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.d.ts +2 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.js +22 -20
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.d.ts +3 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.js +32 -19
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.js +11 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +2 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.js +51 -32
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.d.ts +5 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +25 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +45 -159
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +1 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +24 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +452 -7
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +4 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +28 -54
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +5 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.d.ts +7 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.js +7 -257
- package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +7 -8
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +15 -16
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +37 -0
- package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +3 -21
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +13 -80
- package/packages/@monomind/cli/dist/src/suggest.js +0 -5
- package/packages/@monomind/cli/package.json +1 -1
- package/packages/@monomind/guidance/README.md +49 -1153
- package/packages/@monomind/guidance/package.json +1 -74
- package/.claude/helpers/auto-memory-hook.mjs +0 -503
- package/packages/@monomind/cli/.claude/helpers/auto-memory-hook.mjs +0 -503
- package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/deployment.js +0 -706
|
@@ -1,112 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Commands Index
|
|
3
3
|
* Central registry for all CLI commands
|
|
4
|
-
*
|
|
5
|
-
* NOTE: All commands are synchronously imported at module load time (lines below).
|
|
6
|
-
* The commandLoaders/loadCommand infrastructure provides an async fallback for
|
|
7
|
-
* commands looked up via getCommandAsync() but does NOT reduce startup time since
|
|
8
|
-
* all modules are already imported synchronously for the commands array and
|
|
9
|
-
* commandsByCategory exports.
|
|
10
4
|
*/
|
|
11
|
-
/**
|
|
12
|
-
* Command loaders - commands are only imported when needed
|
|
13
|
-
* This reduces initial bundle parse time by ~200ms
|
|
14
|
-
*/
|
|
15
|
-
const commandLoaders = {
|
|
16
|
-
// P1 Core Commands (frequently used - load first)
|
|
17
|
-
init: () => import('./init.js'),
|
|
18
|
-
start: () => import('./start.js'),
|
|
19
|
-
status: () => import('./status.js'),
|
|
20
|
-
task: () => import('./task.js'),
|
|
21
|
-
session: () => import('./session.js'),
|
|
22
|
-
// Original Commands
|
|
23
|
-
agent: () => import('./agent.js'),
|
|
24
|
-
swarm: () => import('./swarm.js'),
|
|
25
|
-
memory: () => import('./memory.js'),
|
|
26
|
-
mcp: () => import('./mcp.js'),
|
|
27
|
-
config: () => import('./config.js'),
|
|
28
|
-
hooks: () => import('./hooks.js'),
|
|
29
|
-
workflow: () => import('./workflow.js'),
|
|
30
|
-
'hive-mind': () => import('./hive-mind.js'),
|
|
31
|
-
process: () => import('./process.js'),
|
|
32
|
-
daemon: () => import('./daemon.js'),
|
|
33
|
-
// Advanced Commands (less frequently used - lazy load)
|
|
34
|
-
neural: () => import('./neural.js'),
|
|
35
|
-
security: () => import('./security.js'),
|
|
36
|
-
performance: () => import('./performance.js'),
|
|
37
|
-
providers: () => import('./providers.js'),
|
|
38
|
-
deployment: () => import('./deployment.js'),
|
|
39
|
-
claims: () => import('./claims.js'),
|
|
40
|
-
// P0 Commands
|
|
41
|
-
completions: () => import('./completions.js'),
|
|
42
|
-
doctor: () => import('./doctor.js'),
|
|
43
|
-
// Analysis Commands
|
|
44
|
-
analyze: () => import('./analyze.js'),
|
|
45
|
-
// Q-Learning Routing Commands
|
|
46
|
-
route: () => import('./route.js'),
|
|
47
|
-
// Issue Claims Commands (ADR-016)
|
|
48
|
-
issues: () => import('./issues.js'),
|
|
49
|
-
// Auto-update System (ADR-025)
|
|
50
|
-
update: () => import('./update.js'),
|
|
51
|
-
// Guidance Control Plane
|
|
52
|
-
guidance: () => import('./guidance.js'),
|
|
53
|
-
'transfer-store': () => import('./transfer-store.js'),
|
|
54
|
-
'store': () => import('./transfer-store.js'),
|
|
55
|
-
cleanup: () => import('./cleanup.js'),
|
|
56
|
-
autopilot: () => import('./autopilot.js'),
|
|
57
|
-
tokens: () => import('./tokens.js'),
|
|
58
|
-
monograph: () => import('./monograph.js'),
|
|
59
|
-
replay: () => import('./replay.js'),
|
|
60
|
-
// Native browser automation (TypeScript CDP client)
|
|
61
|
-
browse: () => import('./browse.js'),
|
|
62
|
-
platforms: () => import('./platforms.js'),
|
|
63
|
-
// Org management (list, delete)
|
|
64
|
-
org: () => import('./org.js'),
|
|
65
|
-
// Design tooling (anti-pattern detection)
|
|
66
|
-
design: () => import('./design-detect.js'),
|
|
67
|
-
// Enrichment pipeline (T0/T1/T2 progressive content enrichment)
|
|
68
|
-
enrich: () => import('./enrich.js'),
|
|
69
|
-
// Universal search across all activated capabilities
|
|
70
|
-
search: () => import('./search-universal.js'),
|
|
71
|
-
// Re-scan directory and update capability fingerprint
|
|
72
|
-
scan: () => import('./scan.js'),
|
|
73
|
-
'report-crash': () => import('./report-crash.js'),
|
|
74
|
-
'crash-reporting': () => import('./crash-reporting.js'),
|
|
75
|
-
// Second Brain document management
|
|
76
|
-
doc: () => import('./doc.js'),
|
|
77
|
-
};
|
|
78
|
-
// Cache for loaded commands
|
|
79
5
|
const loadedCommands = new Map();
|
|
80
|
-
/**
|
|
81
|
-
* Load a command lazily
|
|
82
|
-
*/
|
|
83
|
-
async function loadCommand(name) {
|
|
84
|
-
if (loadedCommands.has(name)) {
|
|
85
|
-
return loadedCommands.get(name);
|
|
86
|
-
}
|
|
87
|
-
const loader = commandLoaders[name];
|
|
88
|
-
if (!loader)
|
|
89
|
-
return undefined;
|
|
90
|
-
try {
|
|
91
|
-
const module = await loader();
|
|
92
|
-
// Try to find the command export (either default or named)
|
|
93
|
-
const command = (module.default || module[`${name}Command`] || Object.values(module).find((v) => typeof v === 'object' && v !== null && 'name' in v && 'description' in v));
|
|
94
|
-
if (command) {
|
|
95
|
-
loadedCommands.set(name, command);
|
|
96
|
-
return command;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
catch (error) {
|
|
100
|
-
// Silently fail for missing optional commands
|
|
101
|
-
if (process.env.DEBUG) {
|
|
102
|
-
console.error(`Failed to load command ${name}:`, error);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return undefined;
|
|
106
|
-
}
|
|
107
6
|
// =============================================================================
|
|
108
|
-
//
|
|
109
|
-
// These are the most commonly used commands that need instant access
|
|
7
|
+
// Command Imports
|
|
110
8
|
// =============================================================================
|
|
111
9
|
import { initCommand } from './init.js';
|
|
112
10
|
import { startCommand } from './start.js';
|
|
@@ -120,23 +18,19 @@ import { mcpCommand } from './mcp.js';
|
|
|
120
18
|
import { hooksCommand } from './hooks.js';
|
|
121
19
|
import { daemonCommand } from './daemon.js';
|
|
122
20
|
import { doctorCommand } from './doctor.js';
|
|
123
|
-
import { neuralCommand } from './neural.js';
|
|
124
21
|
import { performanceCommand } from './performance.js';
|
|
125
22
|
import { securityCommand } from './security.js';
|
|
126
23
|
import { hiveMindCommand } from './hive-mind.js';
|
|
127
24
|
import browseCommand from './browse.js';
|
|
128
|
-
// Additional commands for categorized help display
|
|
129
25
|
import { configCommand } from './config.js';
|
|
130
26
|
import { completionsCommand } from './completions.js';
|
|
131
27
|
import { workflowCommand } from './workflow.js';
|
|
132
28
|
import { analyzeCommand } from './analyze.js';
|
|
133
29
|
import { routeCommand } from './route.js';
|
|
134
30
|
import { providersCommand } from './providers.js';
|
|
135
|
-
import { deploymentCommand } from './deployment.js';
|
|
136
31
|
import { claimsCommand } from './claims.js';
|
|
137
32
|
import { issuesCommand } from './issues.js';
|
|
138
33
|
import updateCommand from './update.js';
|
|
139
|
-
import { processCommand } from './process.js';
|
|
140
34
|
import { guidanceCommand } from './guidance.js';
|
|
141
35
|
import { cleanupCommand } from './cleanup.js';
|
|
142
36
|
import { autopilotCommand } from './autopilot.js';
|
|
@@ -152,7 +46,8 @@ import { scanCommand } from './scan.js';
|
|
|
152
46
|
import { reportCrashCommand } from './report-crash.js';
|
|
153
47
|
import { crashReportingCommand } from './crash-reporting.js';
|
|
154
48
|
import { docCommand } from './doc.js';
|
|
155
|
-
|
|
49
|
+
import { neuralCommand } from './neural.js';
|
|
50
|
+
// Populate command cache
|
|
156
51
|
loadedCommands.set('init', initCommand);
|
|
157
52
|
loadedCommands.set('start', startCommand);
|
|
158
53
|
loadedCommands.set('status', statusCommand);
|
|
@@ -165,7 +60,6 @@ loadedCommands.set('mcp', mcpCommand);
|
|
|
165
60
|
loadedCommands.set('hooks', hooksCommand);
|
|
166
61
|
loadedCommands.set('daemon', daemonCommand);
|
|
167
62
|
loadedCommands.set('doctor', doctorCommand);
|
|
168
|
-
loadedCommands.set('neural', neuralCommand);
|
|
169
63
|
loadedCommands.set('performance', performanceCommand);
|
|
170
64
|
loadedCommands.set('security', securityCommand);
|
|
171
65
|
loadedCommands.set('hive-mind', hiveMindCommand);
|
|
@@ -178,6 +72,15 @@ loadedCommands.set('transfer-store', storeCommand);
|
|
|
178
72
|
loadedCommands.set('tokens', tokensCommand);
|
|
179
73
|
loadedCommands.set('platforms', platformsCommand);
|
|
180
74
|
loadedCommands.set('browse', browseCommand);
|
|
75
|
+
loadedCommands.set('config', configCommand);
|
|
76
|
+
loadedCommands.set('completions', completionsCommand);
|
|
77
|
+
loadedCommands.set('workflow', workflowCommand);
|
|
78
|
+
loadedCommands.set('analyze', analyzeCommand);
|
|
79
|
+
loadedCommands.set('route', routeCommand);
|
|
80
|
+
loadedCommands.set('providers', providersCommand);
|
|
81
|
+
loadedCommands.set('claims', claimsCommand);
|
|
82
|
+
loadedCommands.set('issues', issuesCommand);
|
|
83
|
+
loadedCommands.set('update', updateCommand);
|
|
181
84
|
loadedCommands.set('design', designCommand);
|
|
182
85
|
loadedCommands.set('enrich', enrichCommand);
|
|
183
86
|
loadedCommands.set('search', searchUniversalCommand);
|
|
@@ -185,10 +88,10 @@ loadedCommands.set('scan', scanCommand);
|
|
|
185
88
|
loadedCommands.set('report-crash', reportCrashCommand);
|
|
186
89
|
loadedCommands.set('crash-reporting', crashReportingCommand);
|
|
187
90
|
loadedCommands.set('doc', docCommand);
|
|
91
|
+
loadedCommands.set('neural', neuralCommand);
|
|
188
92
|
// =============================================================================
|
|
189
|
-
// Exports
|
|
93
|
+
// Exports
|
|
190
94
|
// =============================================================================
|
|
191
|
-
// Export synchronously loaded commands
|
|
192
95
|
export { initCommand } from './init.js';
|
|
193
96
|
export { startCommand } from './start.js';
|
|
194
97
|
export { statusCommand } from './status.js';
|
|
@@ -201,7 +104,6 @@ export { mcpCommand } from './mcp.js';
|
|
|
201
104
|
export { hooksCommand } from './hooks.js';
|
|
202
105
|
export { daemonCommand } from './daemon.js';
|
|
203
106
|
export { doctorCommand } from './doctor.js';
|
|
204
|
-
export { neuralCommand } from './neural.js';
|
|
205
107
|
export { performanceCommand } from './performance.js';
|
|
206
108
|
export { securityCommand } from './security.js';
|
|
207
109
|
export { hiveMindCommand } from './hive-mind.js';
|
|
@@ -217,33 +119,11 @@ export { scanCommand } from './scan.js';
|
|
|
217
119
|
export { reportCrashCommand } from './report-crash.js';
|
|
218
120
|
export { crashReportingCommand } from './crash-reporting.js';
|
|
219
121
|
export { docCommand } from './doc.js';
|
|
220
|
-
|
|
221
|
-
export async function getConfigCommand() { return loadCommand('config'); }
|
|
222
|
-
export async function getWorkflowCommand() { return loadCommand('workflow'); }
|
|
223
|
-
export async function getHiveMindCommand() { return loadCommand('hive-mind'); }
|
|
224
|
-
export async function getProcessCommand() { return loadCommand('process'); }
|
|
225
|
-
export async function getTaskCommand() { return loadCommand('task'); }
|
|
226
|
-
export async function getSessionCommand() { return loadCommand('session'); }
|
|
227
|
-
export async function getNeuralCommand() { return loadCommand('neural'); }
|
|
228
|
-
export async function getSecurityCommand() { return loadCommand('security'); }
|
|
229
|
-
export async function getPerformanceCommand() { return loadCommand('performance'); }
|
|
230
|
-
export async function getProvidersCommand() { return loadCommand('providers'); }
|
|
231
|
-
export async function getDeploymentCommand() { return loadCommand('deployment'); }
|
|
232
|
-
export async function getClaimsCommand() { return loadCommand('claims'); }
|
|
233
|
-
export async function getCompletionsCommand() { return loadCommand('completions'); }
|
|
234
|
-
export async function getAnalyzeCommand() { return loadCommand('analyze'); }
|
|
235
|
-
export async function getRouteCommand() { return loadCommand('route'); }
|
|
236
|
-
export async function getIssuesCommand() { return loadCommand('issues'); }
|
|
237
|
-
export async function getGuidanceCommand() { return loadCommand('guidance'); }
|
|
238
|
-
export async function getCleanupCommand() { return loadCommand('cleanup'); }
|
|
239
|
-
export async function getAutopilotCommand() { return loadCommand('autopilot'); }
|
|
240
|
-
export async function getMonographCommand() { return loadCommand('monograph'); }
|
|
122
|
+
export { neuralCommand } from './neural.js';
|
|
241
123
|
/**
|
|
242
|
-
*
|
|
243
|
-
* Advanced commands loaded on-demand for faster startup
|
|
124
|
+
* All registered commands
|
|
244
125
|
*/
|
|
245
126
|
export const commands = [
|
|
246
|
-
// Core commands (synchronously loaded)
|
|
247
127
|
initCommand,
|
|
248
128
|
startCommand,
|
|
249
129
|
statusCommand,
|
|
@@ -256,7 +136,6 @@ export const commands = [
|
|
|
256
136
|
hooksCommand,
|
|
257
137
|
daemonCommand,
|
|
258
138
|
doctorCommand,
|
|
259
|
-
neuralCommand,
|
|
260
139
|
performanceCommand,
|
|
261
140
|
securityCommand,
|
|
262
141
|
hiveMindCommand,
|
|
@@ -271,6 +150,21 @@ export const commands = [
|
|
|
271
150
|
scanCommand,
|
|
272
151
|
docCommand,
|
|
273
152
|
crashReportingCommand,
|
|
153
|
+
browseCommand,
|
|
154
|
+
configCommand,
|
|
155
|
+
completionsCommand,
|
|
156
|
+
workflowCommand,
|
|
157
|
+
analyzeCommand,
|
|
158
|
+
routeCommand,
|
|
159
|
+
providersCommand,
|
|
160
|
+
claimsCommand,
|
|
161
|
+
issuesCommand,
|
|
162
|
+
updateCommand,
|
|
163
|
+
replayCommand,
|
|
164
|
+
storeCommand,
|
|
165
|
+
tokensCommand,
|
|
166
|
+
reportCrashCommand,
|
|
167
|
+
neuralCommand,
|
|
274
168
|
];
|
|
275
169
|
/**
|
|
276
170
|
* Commands organized by category for help display
|
|
@@ -290,12 +184,12 @@ export const commandsByCategory = {
|
|
|
290
184
|
hooksCommand,
|
|
291
185
|
],
|
|
292
186
|
advanced: [
|
|
293
|
-
neuralCommand,
|
|
294
187
|
securityCommand,
|
|
295
188
|
performanceCommand,
|
|
296
189
|
hiveMindCommand,
|
|
297
190
|
guidanceCommand,
|
|
298
191
|
autopilotCommand,
|
|
192
|
+
neuralCommand,
|
|
299
193
|
],
|
|
300
194
|
utility: [
|
|
301
195
|
configCommand,
|
|
@@ -316,11 +210,9 @@ export const commandsByCategory = {
|
|
|
316
210
|
],
|
|
317
211
|
management: [
|
|
318
212
|
providersCommand,
|
|
319
|
-
deploymentCommand,
|
|
320
213
|
claimsCommand,
|
|
321
214
|
issuesCommand,
|
|
322
215
|
updateCommand,
|
|
323
|
-
processCommand,
|
|
324
216
|
storeCommand,
|
|
325
217
|
cleanupCommand,
|
|
326
218
|
platformsCommand,
|
|
@@ -329,7 +221,6 @@ export const commandsByCategory = {
|
|
|
329
221
|
};
|
|
330
222
|
/**
|
|
331
223
|
* Command registry map for quick lookup
|
|
332
|
-
* Supports both sync (core commands) and async (lazy-loaded) commands
|
|
333
224
|
*/
|
|
334
225
|
export const commandRegistry = new Map();
|
|
335
226
|
// Register core commands and their aliases
|
|
@@ -341,66 +232,27 @@ for (const cmd of commands) {
|
|
|
341
232
|
}
|
|
342
233
|
}
|
|
343
234
|
}
|
|
344
|
-
/**
|
|
345
|
-
* Get command by name (sync for core commands, returns undefined for lazy commands)
|
|
346
|
-
* Use getCommandAsync for lazy-loaded commands
|
|
347
|
-
*/
|
|
348
235
|
export function getCommand(name) {
|
|
349
236
|
return loadedCommands.get(name) || commandRegistry.get(name);
|
|
350
237
|
}
|
|
351
|
-
/**
|
|
352
|
-
* Get command by name (async - supports lazy loading)
|
|
353
|
-
*/
|
|
354
238
|
export async function getCommandAsync(name) {
|
|
355
|
-
|
|
356
|
-
const cached = loadedCommands.get(name);
|
|
357
|
-
if (cached)
|
|
358
|
-
return cached;
|
|
359
|
-
// Check sync registry
|
|
360
|
-
const synced = commandRegistry.get(name);
|
|
361
|
-
if (synced)
|
|
362
|
-
return synced;
|
|
363
|
-
// Try lazy loading
|
|
364
|
-
return loadCommand(name);
|
|
239
|
+
return loadedCommands.get(name) || commandRegistry.get(name);
|
|
365
240
|
}
|
|
366
|
-
/**
|
|
367
|
-
* Check if command exists (sync check for core commands)
|
|
368
|
-
*/
|
|
369
241
|
export function hasCommand(name) {
|
|
370
|
-
return loadedCommands.has(name) || commandRegistry.has(name)
|
|
242
|
+
return loadedCommands.has(name) || commandRegistry.has(name);
|
|
371
243
|
}
|
|
372
|
-
/**
|
|
373
|
-
* Get all command names (including aliases and lazy-loadable)
|
|
374
|
-
*/
|
|
375
244
|
export function getCommandNames() {
|
|
376
245
|
const names = new Set([
|
|
377
246
|
...Array.from(commandRegistry.keys()),
|
|
378
247
|
...Array.from(loadedCommands.keys()),
|
|
379
|
-
...Object.keys(commandLoaders),
|
|
380
248
|
]);
|
|
381
249
|
return Array.from(names);
|
|
382
250
|
}
|
|
383
|
-
/**
|
|
384
|
-
* Get all unique commands (excluding aliases)
|
|
385
|
-
*/
|
|
386
251
|
export function getUniqueCommands() {
|
|
387
252
|
return commands.filter(cmd => !cmd.hidden);
|
|
388
253
|
}
|
|
389
|
-
/**
|
|
390
|
-
* Load all commands (populates lazy-loaded commands)
|
|
391
|
-
* Use this when you need all commands available synchronously
|
|
392
|
-
*/
|
|
393
254
|
export async function loadAllCommands() {
|
|
394
|
-
|
|
395
|
-
for (const name of Object.keys(commandLoaders)) {
|
|
396
|
-
if (!loadedCommands.has(name)) {
|
|
397
|
-
const cmd = await loadCommand(name);
|
|
398
|
-
if (cmd && !allCommands.includes(cmd)) {
|
|
399
|
-
allCommands.push(cmd);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
return allCommands;
|
|
255
|
+
return [...commands];
|
|
404
256
|
}
|
|
405
257
|
/**
|
|
406
258
|
* Setup commands in a CLI instance
|
|
@@ -411,7 +263,7 @@ export function setupCommands(cli) {
|
|
|
411
263
|
}
|
|
412
264
|
}
|
|
413
265
|
/**
|
|
414
|
-
* Setup all commands
|
|
266
|
+
* Setup all commands (async variant)
|
|
415
267
|
*/
|
|
416
268
|
export async function setupAllCommands(cli) {
|
|
417
269
|
const allCommands = await loadAllCommands();
|
|
@@ -132,16 +132,14 @@ export const wizardCommand = {
|
|
|
132
132
|
options.runtime.enableNeural = enableNeural;
|
|
133
133
|
if (memoryBackend === 'lancedb' || memoryBackend === 'hybrid') {
|
|
134
134
|
const enableSelfLearning = await confirm({
|
|
135
|
-
message: 'Enable self-learning memory? (
|
|
135
|
+
message: 'Enable self-learning memory? (Knowledge Graph + Agent Scopes)',
|
|
136
136
|
default: true,
|
|
137
137
|
});
|
|
138
138
|
options.runtime.enableLearningBridge = enableSelfLearning && enableNeural;
|
|
139
|
-
options.runtime.enableMemoryGraph = enableSelfLearning;
|
|
140
139
|
options.runtime.enableAgentScopes = enableSelfLearning;
|
|
141
140
|
}
|
|
142
141
|
else {
|
|
143
142
|
options.runtime.enableLearningBridge = false;
|
|
144
|
-
options.runtime.enableMemoryGraph = false;
|
|
145
143
|
options.runtime.enableAgentScopes = false;
|
|
146
144
|
}
|
|
147
145
|
const enableEmbeddings = await confirm({
|
|
@@ -222,7 +220,7 @@ export const wizardCommand = {
|
|
|
222
220
|
{ setting: 'Memory Backend', value: options.runtime.memoryBackend },
|
|
223
221
|
{ setting: 'HNSW Indexing', value: options.runtime.enableHNSW ? 'Enabled' : 'Disabled' },
|
|
224
222
|
{ setting: 'Neural Learning', value: options.runtime.enableNeural ? 'Enabled' : 'Disabled' },
|
|
225
|
-
{ setting: 'Self-Learning', value: options.runtime.enableLearningBridge ? '
|
|
223
|
+
{ setting: 'Self-Learning', value: options.runtime.enableLearningBridge ? 'Graph + Scopes' : 'Disabled' },
|
|
226
224
|
{ setting: 'Embeddings', value: enableEmbeddings ? `${embeddingModel} (hyperbolic)` : 'Disabled' },
|
|
227
225
|
{ setting: 'Skills', value: `${result.summary.skillsCount} installed` },
|
|
228
226
|
{ setting: 'Commands', value: `${result.summary.commandsCount} installed` },
|
|
@@ -455,10 +455,38 @@ const toggleCommand = {
|
|
|
455
455
|
}
|
|
456
456
|
],
|
|
457
457
|
action: async (ctx) => {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
458
|
+
const fs = await import('node:fs');
|
|
459
|
+
const path = await import('node:path');
|
|
460
|
+
const stateFile = path.join('.monomind', 'mcp-disabled-tools.json');
|
|
461
|
+
let disabled = [];
|
|
462
|
+
try {
|
|
463
|
+
disabled = JSON.parse(fs.readFileSync(stateFile, 'utf8'));
|
|
464
|
+
}
|
|
465
|
+
catch { /* fresh */ }
|
|
466
|
+
const enableArg = ctx.flags.enable;
|
|
467
|
+
const disableArg = ctx.flags.disable;
|
|
468
|
+
if (!enableArg && !disableArg) {
|
|
469
|
+
output.writeln(output.warning('Provide --enable <tool> or --disable <tool>'));
|
|
470
|
+
return { success: false, exitCode: 1 };
|
|
471
|
+
}
|
|
472
|
+
if (disableArg) {
|
|
473
|
+
const tools = disableArg.split(',').map(t => t.trim());
|
|
474
|
+
for (const t of tools) {
|
|
475
|
+
if (!disabled.includes(t))
|
|
476
|
+
disabled.push(t);
|
|
477
|
+
}
|
|
478
|
+
output.printSuccess(`Disabled: ${tools.join(', ')}`);
|
|
479
|
+
}
|
|
480
|
+
if (enableArg) {
|
|
481
|
+
const tools = enableArg.split(',').map(t => t.trim());
|
|
482
|
+
disabled = disabled.filter(t => !tools.includes(t));
|
|
483
|
+
output.printSuccess(`Enabled: ${tools.join(', ')}`);
|
|
484
|
+
}
|
|
485
|
+
fs.mkdirSync(path.dirname(stateFile), { recursive: true });
|
|
486
|
+
fs.writeFileSync(stateFile, JSON.stringify(disabled, null, 2) + '\n');
|
|
487
|
+
output.writeln(output.dim(`State saved to ${stateFile}. ${disabled.length} tool(s) disabled.`));
|
|
488
|
+
output.writeln(output.dim('Note: MCP server restart required for changes to take effect.'));
|
|
489
|
+
return { success: true };
|
|
462
490
|
}
|
|
463
491
|
};
|
|
464
492
|
// Execute tool
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Memory Admin Commands
|
|
3
|
-
* deleteCommand, statsCommand, configureCommand
|
|
3
|
+
* deleteCommand, statsCommand, configureCommand
|
|
4
4
|
*/
|
|
5
5
|
import type { Command } from '../types.js';
|
|
6
6
|
export declare const deleteCommand: Command;
|
|
7
7
|
export declare const statsCommand: Command;
|
|
8
8
|
export declare const configureCommand: Command;
|
|
9
|
-
export declare const cleanupCommand: Command;
|
|
10
9
|
//# sourceMappingURL=memory-admin.d.ts.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Memory Admin Commands
|
|
3
|
-
* deleteCommand, statsCommand, configureCommand
|
|
3
|
+
* deleteCommand, statsCommand, configureCommand
|
|
4
4
|
*/
|
|
5
5
|
import { output } from '../output.js';
|
|
6
6
|
import { select, confirm } from '../prompt.js';
|
|
7
|
-
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
8
7
|
import { configManager } from '../services/config-file-manager.js';
|
|
9
8
|
// Memory backends (needed for configureCommand)
|
|
10
9
|
const BACKENDS = [
|
|
@@ -330,120 +329,4 @@ export const configureCommand = {
|
|
|
330
329
|
return { success: true, data: config };
|
|
331
330
|
}
|
|
332
331
|
};
|
|
333
|
-
// Cleanup command
|
|
334
|
-
export const cleanupCommand = {
|
|
335
|
-
name: 'cleanup',
|
|
336
|
-
description: 'Clean up stale and expired memory entries',
|
|
337
|
-
options: [
|
|
338
|
-
{
|
|
339
|
-
name: 'dry-run',
|
|
340
|
-
short: 'd',
|
|
341
|
-
description: 'Show what would be deleted',
|
|
342
|
-
type: 'boolean',
|
|
343
|
-
default: false
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
name: 'older-than',
|
|
347
|
-
short: 'o',
|
|
348
|
-
description: 'Delete entries older than (e.g., "7d", "30d")',
|
|
349
|
-
type: 'string'
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
name: 'expired-only',
|
|
353
|
-
short: 'e',
|
|
354
|
-
description: 'Only delete expired TTL entries',
|
|
355
|
-
type: 'boolean',
|
|
356
|
-
default: false
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
name: 'low-quality',
|
|
360
|
-
short: 'l',
|
|
361
|
-
description: 'Delete low quality patterns (threshold)',
|
|
362
|
-
type: 'number'
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
name: 'namespace',
|
|
366
|
-
short: 'n',
|
|
367
|
-
description: 'Clean specific namespace only',
|
|
368
|
-
type: 'string'
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
name: 'force',
|
|
372
|
-
short: 'f',
|
|
373
|
-
description: 'Skip confirmation',
|
|
374
|
-
type: 'boolean',
|
|
375
|
-
default: false
|
|
376
|
-
}
|
|
377
|
-
],
|
|
378
|
-
examples: [
|
|
379
|
-
{ command: 'monomind memory cleanup --dry-run', description: 'Preview cleanup' },
|
|
380
|
-
{ command: 'monomind memory cleanup --older-than 30d', description: 'Delete entries older than 30 days' },
|
|
381
|
-
{ command: 'monomind memory cleanup --expired-only', description: 'Clean expired entries' }
|
|
382
|
-
],
|
|
383
|
-
action: async (ctx) => {
|
|
384
|
-
const dryRun = ctx.flags['dry-run'];
|
|
385
|
-
const force = ctx.flags.force;
|
|
386
|
-
if (dryRun) {
|
|
387
|
-
output.writeln(output.warning('DRY RUN - No changes will be made'));
|
|
388
|
-
}
|
|
389
|
-
output.printInfo('Analyzing memory for cleanup...');
|
|
390
|
-
try {
|
|
391
|
-
const result = await callMCPTool('memory_cleanup', {
|
|
392
|
-
dryRun,
|
|
393
|
-
olderThan: ctx.flags['older-than'],
|
|
394
|
-
expiredOnly: ctx.flags['expired-only'],
|
|
395
|
-
lowQualityThreshold: ctx.flags['low-quality'],
|
|
396
|
-
namespace: ctx.flags.namespace,
|
|
397
|
-
});
|
|
398
|
-
if (ctx.flags.format === 'json') {
|
|
399
|
-
output.printJson(result);
|
|
400
|
-
return { success: true, data: result };
|
|
401
|
-
}
|
|
402
|
-
output.writeln();
|
|
403
|
-
output.writeln(output.bold('Cleanup Analysis'));
|
|
404
|
-
output.printTable({
|
|
405
|
-
columns: [
|
|
406
|
-
{ key: 'category', header: 'Category', width: 20 },
|
|
407
|
-
{ key: 'count', header: 'Count', width: 15, align: 'right' }
|
|
408
|
-
],
|
|
409
|
-
data: [
|
|
410
|
-
{ category: 'Expired (TTL)', count: result.candidates.expired },
|
|
411
|
-
{ category: 'Stale (unused)', count: result.candidates.stale },
|
|
412
|
-
{ category: 'Low Quality', count: result.candidates.lowQuality },
|
|
413
|
-
{ category: output.bold('Total'), count: output.bold(String(result.candidates.total)) }
|
|
414
|
-
]
|
|
415
|
-
});
|
|
416
|
-
if (!dryRun && result.candidates.total > 0 && !force) {
|
|
417
|
-
const confirmed = await confirm({
|
|
418
|
-
message: `Delete ${result.candidates.total} entries (${result.freed.formatted})?`,
|
|
419
|
-
default: false
|
|
420
|
-
});
|
|
421
|
-
if (!confirmed) {
|
|
422
|
-
output.printInfo('Cleanup cancelled');
|
|
423
|
-
return { success: true, data: result };
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
if (!dryRun) {
|
|
427
|
-
output.writeln();
|
|
428
|
-
output.printSuccess(`Cleaned ${result.deleted.entries} entries`);
|
|
429
|
-
output.printList([
|
|
430
|
-
`Vectors removed: ${result.deleted.vectors}`,
|
|
431
|
-
`Patterns removed: ${result.deleted.patterns}`,
|
|
432
|
-
`Space freed: ${result.freed.formatted}`,
|
|
433
|
-
`Duration: ${result.duration}ms`
|
|
434
|
-
]);
|
|
435
|
-
}
|
|
436
|
-
return { success: true, data: result };
|
|
437
|
-
}
|
|
438
|
-
catch (error) {
|
|
439
|
-
if (error instanceof MCPClientError) {
|
|
440
|
-
output.printError(`Cleanup error: ${error.message}`);
|
|
441
|
-
}
|
|
442
|
-
else {
|
|
443
|
-
output.printError(`Unexpected error: ${String(error)}`);
|
|
444
|
-
}
|
|
445
|
-
return { success: false, exitCode: 1 };
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
332
|
//# sourceMappingURL=memory-admin.js.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Memory Transfer Commands
|
|
3
|
-
*
|
|
3
|
+
* exportCommand, importCommand
|
|
4
4
|
*/
|
|
5
5
|
import type { Command } from '../types.js';
|
|
6
|
-
export declare const compressCommand: Command;
|
|
7
6
|
export declare const exportCommand: Command;
|
|
8
7
|
export declare const importCommand: Command;
|
|
9
8
|
//# sourceMappingURL=memory-transfer.d.ts.map
|