monomind 1.17.0 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/engineering/engineering-security-engineer.md +1 -1
- package/.claude/commands/mastermind/_repeat.md +4 -0
- package/.claude/commands/mastermind/master.md +52 -1
- package/.claude/scheduled_tasks.lock +1 -1
- package/.claude/skills/mastermind/_repeat.md +2 -0
- package/package.json +1 -1
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-security-engineer.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +4 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/master.md +52 -1
- package/packages/@monomind/cli/.claude/skills/mastermind/_repeat.md +2 -0
- package/packages/@monomind/cli/dist/src/__tests__/browse-analyzer.test.js +42 -59
- package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/agents/registry-builder.js +22 -0
- package/packages/@monomind/cli/dist/src/browser/dashboard/server.js +18 -0
- package/packages/@monomind/cli/dist/src/browser/dashboard/ui.html +37 -125
- package/packages/@monomind/cli/dist/src/commands/agent-lifecycle.d.ts +17 -0
- package/packages/@monomind/cli/dist/src/commands/agent-lifecycle.js +320 -0
- package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/commands/agent-ops.js +329 -0
- package/packages/@monomind/cli/dist/src/commands/agent.js +5 -907
- package/packages/@monomind/cli/dist/src/commands/analyze-ast.d.ts +26 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-ast.js +284 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-boundaries.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-boundaries.js +295 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +395 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-graph.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-graph.js +304 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-imports.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-imports.js +287 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-symbols.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/commands/analyze-symbols.js +302 -0
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +38 -0
- package/packages/@monomind/cli/dist/src/commands/analyze.js +12 -1827
- package/packages/@monomind/cli/dist/src/commands/doctor-env-checks.d.ts +26 -0
- package/packages/@monomind/cli/dist/src/commands/doctor-env-checks.js +189 -0
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +20 -0
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +432 -0
- package/packages/@monomind/cli/dist/src/commands/doctor.js +54 -943
- package/packages/@monomind/cli/dist/src/commands/hive-mind-comms.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-comms.js +242 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.d.ts +35 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.js +203 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.js +233 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-spawn.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind-spawn.js +274 -0
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +10 -1129
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +19 -819
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +334 -0
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +399 -0
- package/packages/@monomind/cli/dist/src/commands/init-subcommands.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/init-subcommands.js +156 -0
- package/packages/@monomind/cli/dist/src/commands/init-upgrade.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/commands/init-upgrade.js +203 -0
- package/packages/@monomind/cli/dist/src/commands/init-wizard.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/commands/init-wizard.js +246 -0
- package/packages/@monomind/cli/dist/src/commands/init.js +6 -623
- package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +10 -0
- package/packages/@monomind/cli/dist/src/commands/memory-admin.js +433 -0
- package/packages/@monomind/cli/dist/src/commands/memory-crud.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/commands/memory-crud.js +342 -0
- package/packages/@monomind/cli/dist/src/commands/memory-list.d.ts +10 -0
- package/packages/@monomind/cli/dist/src/commands/memory-list.js +321 -0
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +372 -0
- package/packages/@monomind/cli/dist/src/commands/memory.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/commands/memory.js +10 -1441
- package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +8 -0
- package/packages/@monomind/cli/dist/src/commands/neural-core.js +274 -0
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +332 -0
- package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/commands/neural-registry.js +290 -0
- package/packages/@monomind/cli/dist/src/commands/neural.js +3 -974
- package/packages/@monomind/cli/dist/src/commands/platforms.js +327 -7
- package/packages/@monomind/cli/dist/src/commands/security-cve.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/commands/security-cve.js +310 -0
- package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/commands/security-misc.js +293 -0
- package/packages/@monomind/cli/dist/src/commands/security-scan.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/commands/security-scan.js +328 -0
- package/packages/@monomind/cli/dist/src/commands/security.js +3 -958
- package/packages/@monomind/cli/dist/src/commands/session.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/swarm.js +23 -17
- package/packages/@monomind/cli/dist/src/index.js +8 -37
- package/packages/@monomind/cli/dist/src/mcp-tools/swarm-tools.js +77 -0
- package/packages/@monomind/cli/dist/src/parser.js +11 -6
- package/packages/@monomind/cli/dist/src/routing/llm-caller.js +1 -2
- package/packages/@monomind/cli/package.json +2 -3
- package/packages/@monomind/cli/scripts/understand-analyze.mjs +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor — system/environment health checks
|
|
3
|
+
* Node, npm, git, disk, TypeScript, Claude CLI, version freshness
|
|
4
|
+
*/
|
|
5
|
+
export declare const MAX_DOCTOR_PKG_BYTES: number;
|
|
6
|
+
export declare const MAX_DOCTOR_CONFIG_BYTES: number;
|
|
7
|
+
export declare const MAX_DOCTOR_GITIGNORE_BYTES: number;
|
|
8
|
+
export declare const MAX_DOCTOR_PID_BYTES = 64;
|
|
9
|
+
export declare const MAX_DOCTOR_HELPER_BYTES: number;
|
|
10
|
+
export interface HealthCheck {
|
|
11
|
+
name: string;
|
|
12
|
+
status: 'pass' | 'warn' | 'fail';
|
|
13
|
+
message: string;
|
|
14
|
+
fix?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function runCommand(command: string, timeoutMs?: number): Promise<string>;
|
|
17
|
+
export declare function checkNodeVersion(): Promise<HealthCheck>;
|
|
18
|
+
export declare function checkNpmVersion(): Promise<HealthCheck>;
|
|
19
|
+
export declare function checkGit(): Promise<HealthCheck>;
|
|
20
|
+
export declare function checkGitRepo(): Promise<HealthCheck>;
|
|
21
|
+
export declare function checkDiskSpace(): Promise<HealthCheck>;
|
|
22
|
+
export declare function checkBuildTools(): Promise<HealthCheck>;
|
|
23
|
+
export declare function checkVersionFreshness(): Promise<HealthCheck>;
|
|
24
|
+
export declare function checkClaudeCode(): Promise<HealthCheck>;
|
|
25
|
+
export declare function installClaudeCode(): Promise<boolean>;
|
|
26
|
+
//# sourceMappingURL=doctor-env-checks.d.ts.map
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor — system/environment health checks
|
|
3
|
+
* Node, npm, git, disk, TypeScript, Claude CLI, version freshness
|
|
4
|
+
*/
|
|
5
|
+
import { existsSync, readFileSync, statSync } from 'fs';
|
|
6
|
+
import { join, dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { execSync, exec } from 'child_process';
|
|
9
|
+
import { promisify } from 'util';
|
|
10
|
+
import { output } from '../output.js';
|
|
11
|
+
export const MAX_DOCTOR_PKG_BYTES = 1024 * 1024; // 1 MB
|
|
12
|
+
export const MAX_DOCTOR_CONFIG_BYTES = 10 * 1024 * 1024; // 10 MB
|
|
13
|
+
export const MAX_DOCTOR_GITIGNORE_BYTES = 512 * 1024; // 512 KB
|
|
14
|
+
export const MAX_DOCTOR_PID_BYTES = 64; // 64 bytes
|
|
15
|
+
export const MAX_DOCTOR_HELPER_BYTES = 2 * 1024 * 1024; // 2 MB
|
|
16
|
+
const execAsync = promisify(exec);
|
|
17
|
+
export async function runCommand(command, timeoutMs = 5000) {
|
|
18
|
+
const { stdout } = await execAsync(command, {
|
|
19
|
+
encoding: 'utf8',
|
|
20
|
+
timeout: timeoutMs,
|
|
21
|
+
shell: process.platform === 'win32' ? 'cmd.exe' : '/bin/sh',
|
|
22
|
+
env: { ...process.env },
|
|
23
|
+
windowsHide: true,
|
|
24
|
+
});
|
|
25
|
+
return stdout.trim();
|
|
26
|
+
}
|
|
27
|
+
export async function checkNodeVersion() {
|
|
28
|
+
const requiredMajor = 20;
|
|
29
|
+
const version = process.version;
|
|
30
|
+
const major = parseInt(version.slice(1).split('.')[0], 10);
|
|
31
|
+
if (major >= requiredMajor) {
|
|
32
|
+
return { name: 'Node.js Version', status: 'pass', message: `${version} (>= ${requiredMajor} required)` };
|
|
33
|
+
}
|
|
34
|
+
else if (major >= 18) {
|
|
35
|
+
return { name: 'Node.js Version', status: 'warn', message: `${version} (>= ${requiredMajor} recommended)`, fix: 'nvm install 20 && nvm use 20' };
|
|
36
|
+
}
|
|
37
|
+
return { name: 'Node.js Version', status: 'fail', message: `${version} (>= ${requiredMajor} required)`, fix: 'nvm install 20 && nvm use 20' };
|
|
38
|
+
}
|
|
39
|
+
export async function checkNpmVersion() {
|
|
40
|
+
try {
|
|
41
|
+
const version = await runCommand('npm --version');
|
|
42
|
+
const major = parseInt(version.split('.')[0], 10);
|
|
43
|
+
if (major >= 9)
|
|
44
|
+
return { name: 'npm Version', status: 'pass', message: `v${version}` };
|
|
45
|
+
return { name: 'npm Version', status: 'warn', message: `v${version} (>= 9 recommended)`, fix: 'npm install -g npm@latest' };
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return { name: 'npm Version', status: 'fail', message: 'npm not found', fix: 'Install Node.js from https://nodejs.org' };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export async function checkGit() {
|
|
52
|
+
try {
|
|
53
|
+
const version = await runCommand('git --version');
|
|
54
|
+
return { name: 'Git', status: 'pass', message: version.replace('git version ', 'v') };
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return { name: 'Git', status: 'warn', message: 'Not installed', fix: 'Install git from https://git-scm.com' };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export async function checkGitRepo() {
|
|
61
|
+
try {
|
|
62
|
+
await runCommand('git rev-parse --git-dir');
|
|
63
|
+
return { name: 'Git Repository', status: 'pass', message: 'In a git repository' };
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return { name: 'Git Repository', status: 'warn', message: 'Not a git repository', fix: 'git init' };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export async function checkDiskSpace() {
|
|
70
|
+
try {
|
|
71
|
+
if (process.platform === 'win32')
|
|
72
|
+
return { name: 'Disk Space', status: 'pass', message: 'Check skipped on Windows' };
|
|
73
|
+
const output_str = await runCommand('df -Ph . | tail -1');
|
|
74
|
+
const parts = output_str.split(/\s+/);
|
|
75
|
+
const available = parts[3];
|
|
76
|
+
const usePercent = parseInt(parts[4]?.replace('%', '') || '0', 10);
|
|
77
|
+
if (isNaN(usePercent))
|
|
78
|
+
return { name: 'Disk Space', status: 'warn', message: `${available || 'unknown'} available (unable to parse usage)` };
|
|
79
|
+
if (usePercent > 90)
|
|
80
|
+
return { name: 'Disk Space', status: 'fail', message: `${available} available (${usePercent}% used)`, fix: 'Free up disk space' };
|
|
81
|
+
if (usePercent > 80)
|
|
82
|
+
return { name: 'Disk Space', status: 'warn', message: `${available} available (${usePercent}% used)` };
|
|
83
|
+
return { name: 'Disk Space', status: 'pass', message: `${available} available` };
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
return { name: 'Disk Space', status: 'warn', message: 'Unable to check' };
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export async function checkBuildTools() {
|
|
90
|
+
try {
|
|
91
|
+
const tscVersion = await runCommand('npx tsc --version', 10000);
|
|
92
|
+
if (!tscVersion || tscVersion.includes('not found')) {
|
|
93
|
+
return { name: 'TypeScript', status: 'warn', message: 'Not installed locally', fix: 'npm install -D typescript' };
|
|
94
|
+
}
|
|
95
|
+
return { name: 'TypeScript', status: 'pass', message: tscVersion.replace('Version ', 'v') };
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return { name: 'TypeScript', status: 'warn', message: 'Not installed locally', fix: 'npm install -D typescript' };
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export async function checkVersionFreshness() {
|
|
102
|
+
try {
|
|
103
|
+
let currentVersion = '0.0.0';
|
|
104
|
+
try {
|
|
105
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
106
|
+
let dir = dirname(thisFile);
|
|
107
|
+
for (;;) {
|
|
108
|
+
const candidate = join(dir, 'package.json');
|
|
109
|
+
try {
|
|
110
|
+
if (existsSync(candidate) && statSync(candidate).size <= MAX_DOCTOR_PKG_BYTES) {
|
|
111
|
+
const pkg = JSON.parse(readFileSync(candidate, 'utf8'));
|
|
112
|
+
if (pkg.version && typeof pkg.name === 'string' &&
|
|
113
|
+
(pkg.name === '@monomind/cli' || pkg.name === 'monomind' || pkg.name === '@monoes/monomindcli')) {
|
|
114
|
+
currentVersion = pkg.version;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch { /* keep walking */ }
|
|
120
|
+
const parent = dirname(dir);
|
|
121
|
+
if (parent === dir)
|
|
122
|
+
break;
|
|
123
|
+
dir = parent;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
currentVersion = '0.0.0';
|
|
128
|
+
}
|
|
129
|
+
const isNpx = process.argv[1]?.includes('_npx') ||
|
|
130
|
+
process.env.npm_execpath?.includes('npx') ||
|
|
131
|
+
process.cwd().includes('_npx');
|
|
132
|
+
let latestVersion = currentVersion;
|
|
133
|
+
try {
|
|
134
|
+
latestVersion = (await runCommand('npm view monomind version', 5000)).trim();
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return { name: 'Version Freshness', status: 'warn', message: `v${currentVersion} (cannot check registry)` };
|
|
138
|
+
}
|
|
139
|
+
const parseVer = (v) => {
|
|
140
|
+
const m = v.match(/^(\d+)\.(\d+)\.(\d+)(?:-[a-zA-Z]+\.(\d+))?/);
|
|
141
|
+
if (!m)
|
|
142
|
+
return { major: 0, minor: 0, patch: 0, pre: 0 };
|
|
143
|
+
return { major: +m[1], minor: +m[2], patch: +m[3], pre: +(m[4] ?? 0) };
|
|
144
|
+
};
|
|
145
|
+
const cur = parseVer(currentVersion);
|
|
146
|
+
const lat = parseVer(latestVersion);
|
|
147
|
+
const outdated = lat.major > cur.major || (lat.major === cur.major && lat.minor > cur.minor) ||
|
|
148
|
+
(lat.major === cur.major && lat.minor === cur.minor && lat.patch > cur.patch) ||
|
|
149
|
+
(lat.major === cur.major && lat.minor === cur.minor && lat.patch === cur.patch && lat.pre > cur.pre);
|
|
150
|
+
if (outdated) {
|
|
151
|
+
return {
|
|
152
|
+
name: 'Version Freshness',
|
|
153
|
+
status: 'warn',
|
|
154
|
+
message: `v${currentVersion} (latest: v${latestVersion})${isNpx ? ' [npx cache stale]' : ''}`,
|
|
155
|
+
fix: isNpx ? 'rm -rf ~/.npm/_npx/* && npx -y monomind@latest doctor' : 'npm update -g monomind',
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
return { name: 'Version Freshness', status: 'pass', message: `v${currentVersion} (up to date)` };
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
return { name: 'Version Freshness', status: 'warn', message: 'Unable to check version freshness' };
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export async function checkClaudeCode() {
|
|
165
|
+
try {
|
|
166
|
+
const version = await runCommand('claude --version');
|
|
167
|
+
const m = version.match(/v?(\d+\.\d+\.\d+)/);
|
|
168
|
+
return { name: 'Claude Code CLI', status: 'pass', message: m ? `v${m[1]}` : version };
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
return { name: 'Claude Code CLI', status: 'warn', message: 'Not installed', fix: 'npm install -g @anthropic-ai/claude-code' };
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
export async function installClaudeCode() {
|
|
175
|
+
try {
|
|
176
|
+
output.writeln();
|
|
177
|
+
output.writeln(output.bold('Installing Claude Code CLI...'));
|
|
178
|
+
execSync('npm install -g @anthropic-ai/claude-code', { encoding: 'utf8', stdio: 'inherit' });
|
|
179
|
+
output.writeln(output.success('Claude Code CLI installed successfully!'));
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
output.writeln(output.error('Failed to install Claude Code CLI'));
|
|
184
|
+
if (error instanceof Error)
|
|
185
|
+
output.writeln(output.dim(error.message));
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=doctor-env-checks.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor — project/monomind health checks
|
|
3
|
+
* Config, daemon, memory, API keys, MCP, monograph, helpers, routing, gates, gitignore
|
|
4
|
+
*/
|
|
5
|
+
import type { HealthCheck } from './doctor-env-checks.js';
|
|
6
|
+
export type { HealthCheck };
|
|
7
|
+
export declare function checkConfigFile(): Promise<HealthCheck>;
|
|
8
|
+
export declare function checkDaemonStatus(): Promise<HealthCheck>;
|
|
9
|
+
export declare function checkMemoryDatabase(): Promise<HealthCheck>;
|
|
10
|
+
export declare function checkApiKeys(): Promise<HealthCheck>;
|
|
11
|
+
export declare function checkMcpServers(): Promise<HealthCheck>;
|
|
12
|
+
export declare function checkMonograph(): Promise<HealthCheck>;
|
|
13
|
+
export declare function checkMonographFreshness(): Promise<HealthCheck>;
|
|
14
|
+
export declare function checkMonoesMemory(): Promise<HealthCheck>;
|
|
15
|
+
export declare function checkHelpersFresh(): Promise<HealthCheck>;
|
|
16
|
+
export declare function checkMonoesIntegration(): Promise<HealthCheck>;
|
|
17
|
+
export declare function checkGitignoreCoverage(): Promise<HealthCheck>;
|
|
18
|
+
export declare function checkAgentRegistry(): Promise<HealthCheck>;
|
|
19
|
+
export declare function checkGuidanceGates(): Promise<HealthCheck>;
|
|
20
|
+
//# sourceMappingURL=doctor-project-checks.d.ts.map
|