moflo 4.8.3 → 4.8.5
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/helpers/gate.cjs +113 -25
- package/README.md +10 -2
- package/bin/index-guidance.mjs +899 -892
- package/package.json +2 -2
- package/src/@claude-flow/cli/dist/src/commands/doctor.js +39 -17
- package/src/@claude-flow/cli/package.json +106 -106
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moflo",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.5",
|
|
4
4
|
"description": "MoFlo — AI agent orchestration for Claude Code. Forked from ruflo/claude-flow with patches applied to source, plus feature-level orchestration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@types/bcrypt": "^5.0.2",
|
|
84
84
|
"@types/node": "^20.19.37",
|
|
85
85
|
"eslint": "^8.0.0",
|
|
86
|
-
"moflo": "^4.8.
|
|
86
|
+
"moflo": "^4.8.4",
|
|
87
87
|
"tsx": "^4.21.0",
|
|
88
88
|
"typescript": "^5.9.3",
|
|
89
89
|
"vitest": "^4.0.0"
|
|
@@ -407,47 +407,69 @@ async function checkAgenticFlow() {
|
|
|
407
407
|
return { name: 'agentic-flow', status: 'warn', message: 'Check failed' };
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
//
|
|
410
|
+
// Check whether a given PID is still running.
|
|
411
|
+
// Uses signal 0 which works cross-platform (Windows, Linux, macOS) without
|
|
412
|
+
// needing PowerShell or /proc — Node handles the platform abstraction.
|
|
413
|
+
function isProcessAlive(pid) {
|
|
414
|
+
try {
|
|
415
|
+
process.kill(pid, 0);
|
|
416
|
+
return true;
|
|
417
|
+
}
|
|
418
|
+
catch {
|
|
419
|
+
return false;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
// Find and optionally kill orphaned moflo/claude-flow node processes.
|
|
423
|
+
// A process is only "orphaned" if its parent is no longer alive — meaning
|
|
424
|
+
// nothing will clean it up. MCP servers spawned by a live Claude Code session
|
|
425
|
+
// have a live parent (claude.exe) and must not be flagged.
|
|
411
426
|
async function findZombieProcesses(kill = false) {
|
|
412
427
|
const legitimatePid = getDaemonLockHolder(process.cwd());
|
|
413
428
|
const currentPid = process.pid;
|
|
414
429
|
const parentPid = process.ppid;
|
|
415
430
|
const found = [];
|
|
416
431
|
let killed = 0;
|
|
432
|
+
// Collect candidates as { pid, ppid } so we can check parent liveness
|
|
433
|
+
const candidates = [];
|
|
417
434
|
try {
|
|
418
435
|
if (process.platform === 'win32') {
|
|
419
|
-
// Windows:
|
|
420
|
-
const result = execSync('powershell -NoProfile -Command "Get-CimInstance Win32_Process -Filter \\"Name=\'node.exe\'\\" | Select-Object ProcessId,CommandLine | Format-Table -AutoSize -Wrap"', { encoding: 'utf-8', timeout: 10000, windowsHide: true });
|
|
436
|
+
// Windows: include ParentProcessId so we can verify orphan status
|
|
437
|
+
const result = execSync('powershell -NoProfile -Command "Get-CimInstance Win32_Process -Filter \\"Name=\'node.exe\'\\" | Select-Object ProcessId,ParentProcessId,CommandLine | Format-Table -AutoSize -Wrap"', { encoding: 'utf-8', timeout: 10000, windowsHide: true });
|
|
421
438
|
const lines = result.split('\n');
|
|
422
439
|
for (const line of lines) {
|
|
423
440
|
if (/moflo|claude-flow|flo\s+(hooks|gate|mcp|daemon)/i.test(line)) {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
if (pid === currentPid || pid === parentPid || pid === legitimatePid)
|
|
429
|
-
continue;
|
|
430
|
-
found.push(pid);
|
|
441
|
+
// Format-Table columns: ProcessId ParentProcessId CommandLine...
|
|
442
|
+
const match = line.match(/^\s*(\d+)\s+(\d+)/);
|
|
443
|
+
if (match) {
|
|
444
|
+
candidates.push({ pid: parseInt(match[1], 10), ppid: parseInt(match[2], 10) });
|
|
431
445
|
}
|
|
432
446
|
}
|
|
433
447
|
}
|
|
434
448
|
}
|
|
435
449
|
else {
|
|
436
|
-
// Unix/macOS: use ps
|
|
437
|
-
const result = execSync('ps
|
|
450
|
+
// Unix/macOS: use ps with explicit PID+PPID columns for reliable parsing
|
|
451
|
+
const result = execSync('ps -eo pid,ppid,command | grep -E "node.*(moflo|claude-flow)" | grep -v grep', { encoding: 'utf-8', timeout: 5000 });
|
|
438
452
|
const lines = result.trim().split('\n');
|
|
439
453
|
for (const line of lines) {
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
found.push(pid);
|
|
454
|
+
const match = line.trim().match(/^(\d+)\s+(\d+)/);
|
|
455
|
+
if (match) {
|
|
456
|
+
candidates.push({ pid: parseInt(match[1], 10), ppid: parseInt(match[2], 10) });
|
|
457
|
+
}
|
|
445
458
|
}
|
|
446
459
|
}
|
|
447
460
|
}
|
|
448
461
|
catch {
|
|
449
462
|
// No matches found (grep exits non-zero) or command failed
|
|
450
463
|
}
|
|
464
|
+
// Filter: skip known-good PIDs and processes whose parent is still alive.
|
|
465
|
+
// A live parent (e.g. claude.exe for MCP servers) means the process is managed, not orphaned.
|
|
466
|
+
for (const { pid, ppid } of candidates) {
|
|
467
|
+
if (pid === currentPid || pid === parentPid || pid === legitimatePid)
|
|
468
|
+
continue;
|
|
469
|
+
if (isProcessAlive(ppid))
|
|
470
|
+
continue;
|
|
471
|
+
found.push(pid);
|
|
472
|
+
}
|
|
451
473
|
if (kill && found.length > 0) {
|
|
452
474
|
for (const pid of found) {
|
|
453
475
|
try {
|
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@moflo/cli",
|
|
3
|
-
"version": "4.8.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "MoFlo CLI — AI agent orchestration with specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
|
-
"main": "dist/src/index.js",
|
|
7
|
-
"types": "dist/src/index.d.ts",
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"bin": {
|
|
10
|
-
"cli": "./bin/cli.js",
|
|
11
|
-
"claude-flow": "./bin/cli.js",
|
|
12
|
-
"claude-flow-mcp": "./bin/mcp-server.js"
|
|
13
|
-
},
|
|
14
|
-
"homepage": "https://github.com/eric-cielo/moflo#readme",
|
|
15
|
-
"bugs": {
|
|
16
|
-
"url": "https://github.com/eric-cielo/moflo/issues"
|
|
17
|
-
},
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "https://github.com/eric-cielo/moflo.git",
|
|
21
|
-
"directory": "v3/@claude-flow/cli"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"claude",
|
|
25
|
-
"claude-code",
|
|
26
|
-
"anthropic",
|
|
27
|
-
"ai-agents",
|
|
28
|
-
"multi-agent",
|
|
29
|
-
"swarm",
|
|
30
|
-
"mcp",
|
|
31
|
-
"model-context-protocol",
|
|
32
|
-
"llm",
|
|
33
|
-
"cli",
|
|
34
|
-
"orchestration",
|
|
35
|
-
"automation",
|
|
36
|
-
"developer-tools",
|
|
37
|
-
"coding-assistant",
|
|
38
|
-
"vector-database",
|
|
39
|
-
"embeddings",
|
|
40
|
-
"self-learning",
|
|
41
|
-
"enterprise"
|
|
42
|
-
],
|
|
43
|
-
"author": {
|
|
44
|
-
"name": "Eric Cielo",
|
|
45
|
-
"email": "eric@motailz.com",
|
|
46
|
-
"url": "https://github.com/eric-cielo"
|
|
47
|
-
},
|
|
48
|
-
"license": "MIT",
|
|
49
|
-
"exports": {
|
|
50
|
-
".": {
|
|
51
|
-
"types": "./dist/src/index.d.ts",
|
|
52
|
-
"import": "./dist/src/index.js"
|
|
53
|
-
},
|
|
54
|
-
"./ruvector": {
|
|
55
|
-
"types": "./dist/src/ruvector/index.d.ts",
|
|
56
|
-
"import": "./dist/src/ruvector/index.js"
|
|
57
|
-
},
|
|
58
|
-
"./ruvector/*": {
|
|
59
|
-
"types": "./dist/src/ruvector/*.d.ts",
|
|
60
|
-
"import": "./dist/src/ruvector/*.js"
|
|
61
|
-
},
|
|
62
|
-
"./mcp-tools": {
|
|
63
|
-
"types": "./dist/src/mcp-tools/index.d.ts",
|
|
64
|
-
"import": "./dist/src/mcp-tools/index.js"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"files": [
|
|
68
|
-
"dist",
|
|
69
|
-
"bin",
|
|
70
|
-
".claude",
|
|
71
|
-
"README.md"
|
|
72
|
-
],
|
|
73
|
-
"scripts": {
|
|
74
|
-
"build": "tsc",
|
|
75
|
-
"test": "vitest run",
|
|
76
|
-
"test:plugin-store": "npx tsx src/plugins/tests/standalone-test.ts",
|
|
77
|
-
"test:pattern-store": "npx tsx src/transfer/store/tests/standalone-test.ts",
|
|
78
|
-
"preinstall": "node bin/preinstall.cjs || true",
|
|
79
|
-
"prepublishOnly": "cp ../../../README.md ./README.md",
|
|
80
|
-
"release": "npm version prerelease --preid=alpha && npm run publish:all",
|
|
81
|
-
"publish:all": "./scripts/publish.sh"
|
|
82
|
-
},
|
|
83
|
-
"devDependencies": {
|
|
84
|
-
"typescript": "^5.3.0"
|
|
85
|
-
},
|
|
86
|
-
"dependencies": {
|
|
87
|
-
"@noble/ed25519": "^2.1.0",
|
|
88
|
-
"semver": "^7.6.0"
|
|
89
|
-
},
|
|
90
|
-
"optionalDependencies": {
|
|
91
|
-
"@claude-flow/aidefence": "file:../aidefence",
|
|
92
|
-
"@claude-flow/embeddings": "file:../embeddings",
|
|
93
|
-
"@claude-flow/guidance": "file:../guidance",
|
|
94
|
-
"@claude-flow/memory": "file:../memory",
|
|
95
|
-
"@claude-flow/plugin-gastown-bridge": "^0.1.3",
|
|
96
|
-
"agentic-flow": "^2.0.7",
|
|
97
|
-
"@ruvector/attention": "^0.1.4",
|
|
98
|
-
"@ruvector/learning-wasm": "^0.1.29",
|
|
99
|
-
"@ruvector/router": "^0.1.27",
|
|
100
|
-
"@ruvector/sona": "^0.1.5"
|
|
101
|
-
},
|
|
102
|
-
"publishConfig": {
|
|
103
|
-
"access": "public",
|
|
104
|
-
"tag": "latest"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@moflo/cli",
|
|
3
|
+
"version": "4.8.5",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "MoFlo CLI — AI agent orchestration with specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"bin": {
|
|
10
|
+
"cli": "./bin/cli.js",
|
|
11
|
+
"claude-flow": "./bin/cli.js",
|
|
12
|
+
"claude-flow-mcp": "./bin/mcp-server.js"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/eric-cielo/moflo#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/eric-cielo/moflo/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/eric-cielo/moflo.git",
|
|
21
|
+
"directory": "v3/@claude-flow/cli"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"claude",
|
|
25
|
+
"claude-code",
|
|
26
|
+
"anthropic",
|
|
27
|
+
"ai-agents",
|
|
28
|
+
"multi-agent",
|
|
29
|
+
"swarm",
|
|
30
|
+
"mcp",
|
|
31
|
+
"model-context-protocol",
|
|
32
|
+
"llm",
|
|
33
|
+
"cli",
|
|
34
|
+
"orchestration",
|
|
35
|
+
"automation",
|
|
36
|
+
"developer-tools",
|
|
37
|
+
"coding-assistant",
|
|
38
|
+
"vector-database",
|
|
39
|
+
"embeddings",
|
|
40
|
+
"self-learning",
|
|
41
|
+
"enterprise"
|
|
42
|
+
],
|
|
43
|
+
"author": {
|
|
44
|
+
"name": "Eric Cielo",
|
|
45
|
+
"email": "eric@motailz.com",
|
|
46
|
+
"url": "https://github.com/eric-cielo"
|
|
47
|
+
},
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"exports": {
|
|
50
|
+
".": {
|
|
51
|
+
"types": "./dist/src/index.d.ts",
|
|
52
|
+
"import": "./dist/src/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./ruvector": {
|
|
55
|
+
"types": "./dist/src/ruvector/index.d.ts",
|
|
56
|
+
"import": "./dist/src/ruvector/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./ruvector/*": {
|
|
59
|
+
"types": "./dist/src/ruvector/*.d.ts",
|
|
60
|
+
"import": "./dist/src/ruvector/*.js"
|
|
61
|
+
},
|
|
62
|
+
"./mcp-tools": {
|
|
63
|
+
"types": "./dist/src/mcp-tools/index.d.ts",
|
|
64
|
+
"import": "./dist/src/mcp-tools/index.js"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"files": [
|
|
68
|
+
"dist",
|
|
69
|
+
"bin",
|
|
70
|
+
".claude",
|
|
71
|
+
"README.md"
|
|
72
|
+
],
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "tsc",
|
|
75
|
+
"test": "vitest run",
|
|
76
|
+
"test:plugin-store": "npx tsx src/plugins/tests/standalone-test.ts",
|
|
77
|
+
"test:pattern-store": "npx tsx src/transfer/store/tests/standalone-test.ts",
|
|
78
|
+
"preinstall": "node bin/preinstall.cjs || true",
|
|
79
|
+
"prepublishOnly": "cp ../../../README.md ./README.md",
|
|
80
|
+
"release": "npm version prerelease --preid=alpha && npm run publish:all",
|
|
81
|
+
"publish:all": "./scripts/publish.sh"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"typescript": "^5.3.0"
|
|
85
|
+
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"@noble/ed25519": "^2.1.0",
|
|
88
|
+
"semver": "^7.6.0"
|
|
89
|
+
},
|
|
90
|
+
"optionalDependencies": {
|
|
91
|
+
"@claude-flow/aidefence": "file:../aidefence",
|
|
92
|
+
"@claude-flow/embeddings": "file:../embeddings",
|
|
93
|
+
"@claude-flow/guidance": "file:../guidance",
|
|
94
|
+
"@claude-flow/memory": "file:../memory",
|
|
95
|
+
"@claude-flow/plugin-gastown-bridge": "^0.1.3",
|
|
96
|
+
"agentic-flow": "^2.0.7",
|
|
97
|
+
"@ruvector/attention": "^0.1.4",
|
|
98
|
+
"@ruvector/learning-wasm": "^0.1.29",
|
|
99
|
+
"@ruvector/router": "^0.1.27",
|
|
100
|
+
"@ruvector/sona": "^0.1.5"
|
|
101
|
+
},
|
|
102
|
+
"publishConfig": {
|
|
103
|
+
"access": "public",
|
|
104
|
+
"tag": "latest"
|
|
105
|
+
}
|
|
106
|
+
}
|