monomind 1.7.0 → 1.8.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/commands/monomind-createtask.md +2 -2
- package/.claude/commands/monomind-do.md +1 -1
- package/.claude/commands/monomind-idea.md +1 -1
- package/.claude/commands/monomind-improve.md +3 -3
- package/.claude/helpers/learning-service.mjs +0 -0
- package/.claude/helpers/metrics-db.mjs +0 -0
- package/.claude/helpers/swarm-hooks.sh +0 -0
- package/.claude/statusline-command.sh +0 -0
- package/.claude/statusline.sh +0 -0
- package/.claude-plugin/scripts/install.sh +0 -0
- package/.claude-plugin/scripts/uninstall.sh +0 -0
- package/.claude-plugin/scripts/verify.sh +0 -0
- package/package.json +17 -17
- package/packages/@monomind/cli/bin/cli.js +0 -0
- package/packages/@monomind/cli/bin/mcp-server.js +0 -0
- package/packages/@monomind/cli/dist/src/commands/doctor.js +23 -58
- package/packages/@monomind/cli/dist/src/init/executor.js +10 -67
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +14 -14
- package/packages/@monomind/cli/dist/src/mcp-client.js +5 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/graphify-tools.d.ts +4 -67
- package/packages/@monomind/cli/dist/src/mcp-tools/graphify-tools.js +40 -1250
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +1 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +495 -0
- package/packages/@monomind/cli/package.json +2 -1
- package/packages/@monomind/cli/README.md +0 -441
- package/packages/@monomind/guidance/README.md +0 -1195
- package/packages/@monomind/shared/README.md +0 -323
- package/packages/README.md +0 -514
|
@@ -73,8 +73,8 @@ Parse `$ARGUMENTS` to determine input type:
|
|
|
73
73
|
|
|
74
74
|
Run ALL of the following in parallel (skip any that error):
|
|
75
75
|
|
|
76
|
-
1. **Knowledge graph — suggest**: Call `
|
|
77
|
-
2. **Knowledge graph — query**: If any specific module/component names appear in `RAW_CONTENT`, call `
|
|
76
|
+
1. **Knowledge graph — suggest**: Call `mcp__monomind__monograph_suggest` with the first 200 chars of `RAW_CONTENT`.
|
|
77
|
+
2. **Knowledge graph — query**: If any specific module/component names appear in `RAW_CONTENT`, call `mcp__monomind__monograph_query` for each (up to 5 queries).
|
|
78
78
|
3. **Memory search**: Call `mcp__monomind__memory_search` with a summary of the input. Use top 5 results.
|
|
79
79
|
4. **README**: Read `README.md` (first 200 lines). Skip if missing.
|
|
80
80
|
5. **Package manifest**: Read whichever exists first: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`.
|
|
@@ -258,7 +258,7 @@ Collect in parallel (skip any that error):
|
|
|
258
258
|
1. **README**: Read `README.md` (first 200 lines).
|
|
259
259
|
2. **Package manifest**: Read whichever exists first: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`.
|
|
260
260
|
3. **Memory search**: Call `mcp__monomind__memory_search` with the first task's title.
|
|
261
|
-
4. **Knowledge graph**: Call `
|
|
261
|
+
4. **Knowledge graph**: Call `mcp__monomind__monograph_suggest` with the first task's title.
|
|
262
262
|
|
|
263
263
|
Bundle into `PROJECT_CONTEXT` and include in every agent prompt.
|
|
264
264
|
|
|
@@ -49,7 +49,7 @@ Collect ALL of the following in parallel (skip any that error):
|
|
|
49
49
|
|
|
50
50
|
3. **Package manifest**: Read whichever exists first: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`. Extract name, description, and keywords/tags.
|
|
51
51
|
|
|
52
|
-
4. **Knowledge graph**: Call `
|
|
52
|
+
4. **Knowledge graph**: Call `mcp__monomind__monograph_suggest` with the user's prompt (`$ARGUMENTS`). Skip if it errors or returns empty.
|
|
53
53
|
|
|
54
54
|
5. **Memory search**: Call `mcp__monomind__memory_search` with the user's prompt (`$ARGUMENTS`). Use the top 5 results.
|
|
55
55
|
|
|
@@ -53,7 +53,7 @@ Collect ALL of the following in parallel (skip any that error):
|
|
|
53
53
|
|
|
54
54
|
3. **Package manifest**: Read whichever exists first: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`. Extract name, description, and keywords/tags.
|
|
55
55
|
|
|
56
|
-
4. **Knowledge graph**: Call `
|
|
56
|
+
4. **Knowledge graph**: Call `mcp__monomind__monograph_suggest` with the user's prompt (`$ARGUMENTS`). Skip if it errors or returns empty.
|
|
57
57
|
|
|
58
58
|
5. **Memory search**: Call `mcp__monomind__memory_search` with the user's prompt (`$ARGUMENTS`). Use the top 5 results.
|
|
59
59
|
|
|
@@ -71,8 +71,8 @@ Spawn 2 agents in parallel via the Agent tool:
|
|
|
71
71
|
|
|
72
72
|
Provide it with `$ARGUMENTS` and `PROJECT_CONTEXT`. It must:
|
|
73
73
|
|
|
74
|
-
1. **Trace the component** — find all files, functions, classes, and modules related to the target. Use `
|
|
75
|
-
2. **Map dependencies** — what does the component depend on? What depends on it? Use `
|
|
74
|
+
1. **Trace the component** — find all files, functions, classes, and modules related to the target. Use `mcp__monomind__monograph_query` for each key term found.
|
|
75
|
+
2. **Map dependencies** — what does the component depend on? What depends on it? Use `mcp__monomind__monograph_shortest_path` for key relationships.
|
|
76
76
|
3. **Identify pain points** — look for:
|
|
77
77
|
- Code smells (large files, deep nesting, god objects, duplicated logic)
|
|
78
78
|
- Missing tests or low coverage areas
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/.claude/statusline.sh
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monomind",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Monomind - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -39,21 +39,6 @@
|
|
|
39
39
|
"README.md",
|
|
40
40
|
"LICENSE"
|
|
41
41
|
],
|
|
42
|
-
"scripts": {
|
|
43
|
-
"dev": "tsx watch src/index.ts",
|
|
44
|
-
"build": "tsc",
|
|
45
|
-
"build:ts": "cd packages/@monomind/cli && npm run build || true",
|
|
46
|
-
"test": "vitest",
|
|
47
|
-
"test:ui": "vitest --ui",
|
|
48
|
-
"test:security": "vitest run packages/__tests__/security/",
|
|
49
|
-
"lint": "cd packages/@monomind/cli && npm run lint || true",
|
|
50
|
-
"security:audit": "npm audit --audit-level high",
|
|
51
|
-
"security:fix": "npm audit fix",
|
|
52
|
-
"security:test": "npm run test:security",
|
|
53
|
-
"v1:domains": "npm run build:domains",
|
|
54
|
-
"v1:swarm": "npm run start:swarm",
|
|
55
|
-
"v1:security": "npm run security:audit && npm run security:test"
|
|
56
|
-
},
|
|
57
42
|
"dependencies": {
|
|
58
43
|
"semver": "^7.6.0"
|
|
59
44
|
},
|
|
@@ -120,5 +105,20 @@
|
|
|
120
105
|
"publishConfig": {
|
|
121
106
|
"access": "public",
|
|
122
107
|
"tag": "latest"
|
|
108
|
+
},
|
|
109
|
+
"scripts": {
|
|
110
|
+
"dev": "tsx watch src/index.ts",
|
|
111
|
+
"build": "tsc",
|
|
112
|
+
"build:ts": "cd packages/@monomind/cli && npm run build || true",
|
|
113
|
+
"test": "vitest",
|
|
114
|
+
"test:ui": "vitest --ui",
|
|
115
|
+
"test:security": "vitest run packages/__tests__/security/",
|
|
116
|
+
"lint": "cd packages/@monomind/cli && npm run lint || true",
|
|
117
|
+
"security:audit": "npm audit --audit-level high",
|
|
118
|
+
"security:fix": "npm audit fix",
|
|
119
|
+
"security:test": "npm run test:security",
|
|
120
|
+
"v1:domains": "npm run build:domains",
|
|
121
|
+
"v1:swarm": "npm run start:swarm",
|
|
122
|
+
"v1:security": "npm run security:audit && npm run security:test"
|
|
123
123
|
}
|
|
124
|
-
}
|
|
124
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -382,50 +382,31 @@ async function installClaudeCode() {
|
|
|
382
382
|
return false;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
// Check
|
|
386
|
-
async function
|
|
385
|
+
// Check monograph (TypeScript knowledge graph engine, bundled with CLI)
|
|
386
|
+
async function checkMonograph() {
|
|
387
387
|
try {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
await runCommand('uv --version');
|
|
396
|
-
fix = 'uv tool install graphifyy';
|
|
388
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
389
|
+
const candidates = [
|
|
390
|
+
join(dirname(__filename), '..', '..', 'node_modules', '@monomind', 'monograph', 'package.json'),
|
|
391
|
+
join(dirname(__filename), '..', '..', '..', '..', 'node_modules', '@monomind', 'monograph', 'package.json'),
|
|
392
|
+
];
|
|
393
|
+
if (candidates.some(p => existsSync(p))) {
|
|
394
|
+
return { name: 'Monograph', status: 'pass', message: 'available (knowledge graph engine)' };
|
|
397
395
|
}
|
|
398
|
-
catch { }
|
|
399
396
|
return {
|
|
400
|
-
name: '
|
|
397
|
+
name: 'Monograph',
|
|
401
398
|
status: 'warn',
|
|
402
|
-
message: '
|
|
403
|
-
fix
|
|
399
|
+
message: 'Package not found (knowledge graph disabled)',
|
|
400
|
+
fix: 'npm install in project root'
|
|
404
401
|
};
|
|
405
402
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
let cmd = 'pip install graphifyy';
|
|
414
|
-
try {
|
|
415
|
-
await runCommand('uv --version');
|
|
416
|
-
cmd = 'uv tool install graphifyy';
|
|
417
|
-
}
|
|
418
|
-
catch { }
|
|
419
|
-
execSync(cmd, { encoding: 'utf8', stdio: 'inherit', timeout: 120000 });
|
|
420
|
-
output.writeln(output.success('Graphify installed successfully!'));
|
|
421
|
-
return true;
|
|
422
|
-
}
|
|
423
|
-
catch (error) {
|
|
424
|
-
output.writeln(output.error('Failed to install Graphify'));
|
|
425
|
-
if (error instanceof Error) {
|
|
426
|
-
output.writeln(output.dim(error.message));
|
|
427
|
-
}
|
|
428
|
-
return false;
|
|
403
|
+
catch {
|
|
404
|
+
return {
|
|
405
|
+
name: 'Monograph',
|
|
406
|
+
status: 'warn',
|
|
407
|
+
message: 'Package check failed (knowledge graph may be unavailable)',
|
|
408
|
+
fix: 'npm install in project root'
|
|
409
|
+
};
|
|
429
410
|
}
|
|
430
411
|
}
|
|
431
412
|
// Check agentic-flow v1 integration (filesystem-based to avoid slow WASM/DB init)
|
|
@@ -491,14 +472,14 @@ export const doctorCommand = {
|
|
|
491
472
|
{
|
|
492
473
|
name: 'install',
|
|
493
474
|
short: 'i',
|
|
494
|
-
description: 'Auto-install missing dependencies (Claude Code CLI
|
|
475
|
+
description: 'Auto-install missing dependencies (Claude Code CLI)',
|
|
495
476
|
type: 'boolean',
|
|
496
477
|
default: false
|
|
497
478
|
},
|
|
498
479
|
{
|
|
499
480
|
name: 'component',
|
|
500
481
|
short: 'c',
|
|
501
|
-
description: 'Check specific component (version, node, npm, config, daemon, memory, api, git, mcp, claude, disk, typescript,
|
|
482
|
+
description: 'Check specific component (version, node, npm, config, daemon, memory, api, git, mcp, claude, disk, typescript, monograph)',
|
|
502
483
|
type: 'string'
|
|
503
484
|
},
|
|
504
485
|
{
|
|
@@ -540,7 +521,7 @@ export const doctorCommand = {
|
|
|
540
521
|
checkMcpServers,
|
|
541
522
|
checkDiskSpace,
|
|
542
523
|
checkBuildTools,
|
|
543
|
-
|
|
524
|
+
checkMonograph,
|
|
544
525
|
checkAgenticFlow
|
|
545
526
|
];
|
|
546
527
|
const componentMap = {
|
|
@@ -557,7 +538,7 @@ export const doctorCommand = {
|
|
|
557
538
|
'mcp': checkMcpServers,
|
|
558
539
|
'disk': checkDiskSpace,
|
|
559
540
|
'typescript': checkBuildTools,
|
|
560
|
-
'
|
|
541
|
+
'monograph': checkMonograph,
|
|
561
542
|
'agentic-flow': checkAgenticFlow
|
|
562
543
|
};
|
|
563
544
|
let checksToRun = allChecks;
|
|
@@ -616,22 +597,6 @@ export const doctorCommand = {
|
|
|
616
597
|
output.writeln(formatCheck(newCheck));
|
|
617
598
|
}
|
|
618
599
|
}
|
|
619
|
-
const graphifyResult = results.find(r => r.name === 'Graphify');
|
|
620
|
-
if (graphifyResult && graphifyResult.status !== 'pass') {
|
|
621
|
-
const installed = await installGraphify();
|
|
622
|
-
if (installed) {
|
|
623
|
-
const newCheck = await checkGraphify();
|
|
624
|
-
const idx = results.findIndex(r => r.name === 'Graphify');
|
|
625
|
-
if (idx !== -1) {
|
|
626
|
-
results[idx] = newCheck;
|
|
627
|
-
const fixIdx = fixes.findIndex(f => f.startsWith('Graphify:'));
|
|
628
|
-
if (fixIdx !== -1 && newCheck.status === 'pass') {
|
|
629
|
-
fixes.splice(fixIdx, 1);
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
output.writeln(formatCheck(newCheck));
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
600
|
}
|
|
636
601
|
// Summary
|
|
637
602
|
const passed = results.filter(r => r.status === 'pass').length;
|
|
@@ -302,82 +302,25 @@ export async function executeInit(options) {
|
|
|
302
302
|
return result;
|
|
303
303
|
}
|
|
304
304
|
/**
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*/
|
|
308
|
-
async function ensureGraphifyInstalled(result) {
|
|
309
|
-
const { execSync } = await import('child_process');
|
|
310
|
-
try {
|
|
311
|
-
execSync('graphify --help', { encoding: 'utf8', stdio: 'ignore' });
|
|
312
|
-
return true;
|
|
313
|
-
}
|
|
314
|
-
catch {
|
|
315
|
-
const installers = ['uv tool install graphifyy', 'pip install graphifyy'];
|
|
316
|
-
for (const cmd of installers) {
|
|
317
|
-
try {
|
|
318
|
-
execSync(cmd, { encoding: 'utf8', stdio: 'ignore', timeout: 120000 });
|
|
319
|
-
result.created.files.push('graphify (installed via ' + cmd.split(' ')[0] + ')');
|
|
320
|
-
return true;
|
|
321
|
-
}
|
|
322
|
-
catch { /* try next */ }
|
|
323
|
-
}
|
|
324
|
-
result.skipped.push('graphify: could not auto-install (run: uv tool install graphifyy)');
|
|
325
|
-
return false;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Initialize graphify fully: install skill, git hooks, build graph, install watch.
|
|
330
|
-
* Fire-and-forget for the graph build — init does not wait for it to complete.
|
|
331
|
-
* Non-fatal: if graphify is unavailable the step is simply skipped.
|
|
305
|
+
* Initialize the Monograph knowledge graph (native TypeScript, no Python required).
|
|
306
|
+
* Fire-and-forget build — init does not wait for it to complete.
|
|
332
307
|
*/
|
|
333
308
|
async function initKnowledgeGraph(targetDir, result) {
|
|
334
|
-
const installed = await ensureGraphifyInstalled(result);
|
|
335
|
-
if (!installed)
|
|
336
|
-
return;
|
|
337
|
-
const { execSync, spawn } = await import('child_process');
|
|
338
309
|
const { mkdirSync } = await import('fs');
|
|
339
310
|
const outputDir = path.join(targetDir, '.monomind', 'graph');
|
|
340
311
|
mkdirSync(outputDir, { recursive: true });
|
|
341
|
-
// 1. Install graphify skill into Claude Code config
|
|
342
312
|
try {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
try {
|
|
349
|
-
execSync('graphify hook install', { cwd: targetDir, stdio: 'ignore', timeout: 10000 });
|
|
350
|
-
result.created.files.push('graphify git hooks (post-commit, post-checkout)');
|
|
351
|
-
}
|
|
352
|
-
catch { /* non-fatal */ }
|
|
353
|
-
// 3. Build knowledge graph in background (fire-and-forget)
|
|
354
|
-
try {
|
|
355
|
-
const child = spawn('graphify', ['update', targetDir], {
|
|
356
|
-
stdio: 'ignore',
|
|
357
|
-
detached: true,
|
|
358
|
-
cwd: targetDir,
|
|
313
|
+
const { buildAsync } = await import('@monoes/monograph');
|
|
314
|
+
buildAsync(targetDir, { codeOnly: false })
|
|
315
|
+
.then(() => { })
|
|
316
|
+
.catch((err) => {
|
|
317
|
+
console.warn('[monograph] Background build failed:', err);
|
|
359
318
|
});
|
|
360
|
-
|
|
361
|
-
result.created.files.push('.monomind/graph/ (knowledge graph building in background)');
|
|
319
|
+
result.created.files.push('.monomind/monograph.db (knowledge graph building in background)');
|
|
362
320
|
}
|
|
363
|
-
catch (
|
|
364
|
-
result.skipped.push('knowledge graph:
|
|
321
|
+
catch (err) {
|
|
322
|
+
result.skipped.push('knowledge graph: monograph package unavailable');
|
|
365
323
|
}
|
|
366
|
-
// 4. Start graphify watch daemon (live graph updates on file save)
|
|
367
|
-
try {
|
|
368
|
-
const watchChild = spawn('graphify', ['watch', targetDir], {
|
|
369
|
-
stdio: 'ignore',
|
|
370
|
-
detached: true,
|
|
371
|
-
cwd: targetDir,
|
|
372
|
-
});
|
|
373
|
-
watchChild.unref();
|
|
374
|
-
// Store PID so it can be stopped later
|
|
375
|
-
const { writeFileSync } = await import('fs');
|
|
376
|
-
const pidPath = path.join(outputDir, 'watch.pid');
|
|
377
|
-
writeFileSync(pidPath, String(watchChild.pid));
|
|
378
|
-
result.created.files.push('graphify watch (live graph updates on file save)');
|
|
379
|
-
}
|
|
380
|
-
catch { /* non-fatal */ }
|
|
381
324
|
}
|
|
382
325
|
/**
|
|
383
326
|
* Start the monomind daemon with background workers.
|
|
@@ -22,7 +22,7 @@ STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
|
|
|
22
22
|
for FILE in $STAGED_FILES; do
|
|
23
23
|
if [[ "$FILE" =~ \\.(ts|js|tsx|jsx)$ ]]; then
|
|
24
24
|
echo " Validating: $FILE"
|
|
25
|
-
npx @
|
|
25
|
+
npx @monomind/cli hooks pre-edit --file "$FILE" --validate-syntax 2>/dev/null || true
|
|
26
26
|
fi
|
|
27
27
|
done
|
|
28
28
|
|
|
@@ -451,21 +451,21 @@ export function generateHookHandler() {
|
|
|
451
451
|
" var archKeywords = ['understand', 'architecture', 'how does', 'what calls', 'dependency', 'depends on', 'flow', 'how is', 'explain codebase', 'project structure', 'what is the relationship', 'graph', 'knowledge'];",
|
|
452
452
|
' var promptLower = prompt.toLowerCase();',
|
|
453
453
|
' var isArchQuery = archKeywords.some(function(k) { return promptLower.includes(k); });',
|
|
454
|
-
" var graphJson = require('path').join(process.cwd(), '
|
|
454
|
+
" var graphJson = require('path').join(process.cwd(), '.monomind', 'monograph.db');",
|
|
455
455
|
" var hasGraph = require('fs').existsSync(graphJson);",
|
|
456
456
|
' if (isArchQuery) {',
|
|
457
457
|
" var gfOutput = [];",
|
|
458
458
|
" gfOutput.push('');",
|
|
459
|
-
" gfOutput.push('+-------
|
|
459
|
+
" gfOutput.push('+------- monograph | Knowledge Graph Available ---------------+');",
|
|
460
460
|
' if (hasGraph) {',
|
|
461
|
-
" gfOutput.push('| Graph:
|
|
462
|
-
" gfOutput.push('| Use:
|
|
463
|
-
" gfOutput.push('|
|
|
464
|
-
" gfOutput.push('|
|
|
465
|
-
" gfOutput.push('| Tip: Call
|
|
461
|
+
" gfOutput.push('| Graph: .monomind/monograph.db |');",
|
|
462
|
+
" gfOutput.push('| Use: mcp__monomind__monograph_god_nodes |');",
|
|
463
|
+
" gfOutput.push('| mcp__monomind__monograph_query |');",
|
|
464
|
+
" gfOutput.push('| mcp__monomind__monograph_shortest_path |');",
|
|
465
|
+
" gfOutput.push('| Tip: Call monograph_god_nodes first for architecture overview|');",
|
|
466
466
|
' } else {',
|
|
467
467
|
" gfOutput.push('| No graph found. Build with: |');",
|
|
468
|
-
" gfOutput.push('|
|
|
468
|
+
" gfOutput.push('| mcp__monomind__monograph_build |');",
|
|
469
469
|
' }',
|
|
470
470
|
" gfOutput.push('+--------------------------------------------------------------+');",
|
|
471
471
|
" console.log(gfOutput.join('\\n'));",
|
|
@@ -842,7 +842,7 @@ export function generateIntelligenceStub() {
|
|
|
842
842
|
/**
|
|
843
843
|
* Generate a minimal auto-memory-hook.mjs fallback for fresh installs.
|
|
844
844
|
* This ESM script handles import/sync/status commands gracefully when
|
|
845
|
-
* @
|
|
845
|
+
* @monomind/memory is not installed. Gets overwritten when source copy succeeds.
|
|
846
846
|
*/
|
|
847
847
|
export function generateAutoMemoryHook() {
|
|
848
848
|
return `#!/usr/bin/env node
|
|
@@ -879,17 +879,17 @@ async function loadMemoryPackage() {
|
|
|
879
879
|
try {
|
|
880
880
|
const { createRequire } = await import('module');
|
|
881
881
|
const require = createRequire(join(PROJECT_ROOT, 'package.json'));
|
|
882
|
-
return require('@
|
|
882
|
+
return require('@monomind/memory');
|
|
883
883
|
} catch { /* fall through */ }
|
|
884
884
|
|
|
885
|
-
// Strategy 2: ESM import (works when @
|
|
886
|
-
try { return await import('@
|
|
885
|
+
// Strategy 2: ESM import (works when @monomind/memory is a direct dependency)
|
|
886
|
+
try { return await import('@monomind/memory'); } catch { /* fall through */ }
|
|
887
887
|
|
|
888
888
|
// Strategy 3: Walk up from PROJECT_ROOT looking for the package in any node_modules
|
|
889
889
|
let searchDir = PROJECT_ROOT;
|
|
890
890
|
const { parse } = await import('path');
|
|
891
891
|
while (searchDir !== parse(searchDir).root) {
|
|
892
|
-
const candidate = join(searchDir, 'node_modules', '@
|
|
892
|
+
const candidate = join(searchDir, 'node_modules', '@monomind', 'memory', 'dist', 'index.js');
|
|
893
893
|
if (existsSync(candidate)) {
|
|
894
894
|
try { return await import(\`file://\${candidate}\`); } catch { /* fall through */ }
|
|
895
895
|
}
|
|
@@ -39,8 +39,9 @@ import { ruvllmWasmTools } from './mcp-tools/ruvllm-tools.js';
|
|
|
39
39
|
import { wasmAgentTools } from './mcp-tools/wasm-agent-tools.js';
|
|
40
40
|
import { guidanceTools } from './mcp-tools/guidance-tools.js';
|
|
41
41
|
import { autopilotTools } from './mcp-tools/autopilot-tools.js';
|
|
42
|
-
// Knowledge graph tools (graphify)
|
|
42
|
+
// Knowledge graph tools (graphify — deprecated shims + monograph native)
|
|
43
43
|
import { graphifyTools } from './mcp-tools/graphify-tools.js';
|
|
44
|
+
import { monographTools } from './mcp-tools/monograph-tools.js';
|
|
44
45
|
// Coverage-aware routing tools
|
|
45
46
|
import { coverageRouterTools } from './ruvector/coverage-tools.js';
|
|
46
47
|
// A2A Agent Card protocol (source: https://a2a-protocol.org)
|
|
@@ -91,7 +92,9 @@ registerTools([
|
|
|
91
92
|
...guidanceTools,
|
|
92
93
|
// Autopilot persistent completion tools
|
|
93
94
|
...autopilotTools,
|
|
94
|
-
// Knowledge graph
|
|
95
|
+
// Knowledge graph — native monograph tools (replaces Python graphify)
|
|
96
|
+
...monographTools,
|
|
97
|
+
// Graphify deprecated shims — proxy to monograph_* tools
|
|
95
98
|
...graphifyTools,
|
|
96
99
|
// Coverage-aware routing tools
|
|
97
100
|
...coverageRouterTools,
|
|
@@ -1,73 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Graphify MCP Tools
|
|
2
|
+
* Graphify MCP Tools — DEPRECATED SHIMS
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* god_nodes(), query_graph(), shortest_path() give structural understanding
|
|
7
|
-
* in milliseconds vs. reading dozens of source files.
|
|
8
|
-
*
|
|
9
|
-
* Graph is built by `graphify update` (Python CLI) on `monomind init` and
|
|
10
|
-
* stored at .monomind/graph/graph.json (legacy: graphify-out/graph.json).
|
|
11
|
-
* Install: uv tool install graphifyy
|
|
12
|
-
*/
|
|
13
|
-
import { type MCPTool } from './types.js';
|
|
14
|
-
/**
|
|
15
|
-
* Build or rebuild the knowledge graph for a directory.
|
|
16
|
-
*/
|
|
17
|
-
export declare const graphifyBuildTool: MCPTool;
|
|
18
|
-
/**
|
|
19
|
-
* Query the knowledge graph with natural language.
|
|
20
|
-
*/
|
|
21
|
-
export declare const graphifyQueryTool: MCPTool;
|
|
22
|
-
/**
|
|
23
|
-
* Get the most connected (god) nodes — the core abstractions.
|
|
24
|
-
*/
|
|
25
|
-
export declare const graphifyGodNodesTool: MCPTool;
|
|
26
|
-
/**
|
|
27
|
-
* Get full details for a specific node.
|
|
28
|
-
*/
|
|
29
|
-
export declare const graphifyGetNodeTool: MCPTool;
|
|
30
|
-
/**
|
|
31
|
-
* Find shortest path between two concepts.
|
|
32
|
-
*/
|
|
33
|
-
export declare const graphifyShortestPathTool: MCPTool;
|
|
34
|
-
/**
|
|
35
|
-
* Get all nodes in a community (cluster of related components).
|
|
36
|
-
*/
|
|
37
|
-
export declare const graphifyGetCommunityTool: MCPTool;
|
|
38
|
-
/**
|
|
39
|
-
* Get graph statistics: node/edge counts, communities, confidence breakdown.
|
|
40
|
-
*/
|
|
41
|
-
export declare const graphifyStatsTool: MCPTool;
|
|
42
|
-
/**
|
|
43
|
-
* Find surprising cross-community connections (architectural insights).
|
|
44
|
-
*/
|
|
45
|
-
export declare const graphifySurprisesTool: MCPTool;
|
|
46
|
-
/**
|
|
47
|
-
* Generate or open the interactive HTML visualization of the knowledge graph.
|
|
48
|
-
*/
|
|
49
|
-
export declare const graphifyVisualizeTool: MCPTool;
|
|
50
|
-
/**
|
|
51
|
-
* Start a background file watcher that rebuilds the knowledge graph + HTML
|
|
52
|
-
* whenever source files change (debounced 2 s).
|
|
53
|
-
*/
|
|
54
|
-
export declare const graphifyWatchTool: MCPTool;
|
|
55
|
-
/**
|
|
56
|
-
* Stop the background graph watcher started by graphify_watch.
|
|
57
|
-
*/
|
|
58
|
-
export declare const graphifyWatchStopTool: MCPTool;
|
|
59
|
-
/**
|
|
60
|
-
* Read the GRAPH_REPORT.md generated during the last build.
|
|
61
|
-
*/
|
|
62
|
-
export declare const graphifyReportTool: MCPTool;
|
|
63
|
-
/**
|
|
64
|
-
* Suggest questions the knowledge graph can answer about the codebase.
|
|
65
|
-
*/
|
|
66
|
-
export declare const graphifySuggestTool: MCPTool;
|
|
67
|
-
/**
|
|
68
|
-
* Run a corpus health check on the project files.
|
|
4
|
+
* All graphify_* tools are deprecated. They proxy to monograph_* tools.
|
|
5
|
+
* Will be removed in next major release.
|
|
69
6
|
*/
|
|
70
|
-
|
|
7
|
+
import type { MCPTool } from './types.js';
|
|
71
8
|
export declare const graphifyTools: MCPTool[];
|
|
72
9
|
export default graphifyTools;
|
|
73
10
|
//# sourceMappingURL=graphify-tools.d.ts.map
|