moflo 4.8.5 → 4.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moflo",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.7",
|
|
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.6",
|
|
87
87
|
"tsx": "^4.21.0",
|
|
88
88
|
"typescript": "^5.9.3",
|
|
89
89
|
"vitest": "^4.0.0"
|
|
@@ -15,16 +15,102 @@ import { fileURLToPath } from 'url';
|
|
|
15
15
|
// ============================================================================
|
|
16
16
|
// Init
|
|
17
17
|
// ============================================================================
|
|
18
|
+
/**
|
|
19
|
+
* Discover guidance directories by checking top-level candidates AND walking
|
|
20
|
+
* the project tree for subproject .claude/guidance dirs (monorepo support).
|
|
21
|
+
*/
|
|
22
|
+
function discoverGuidanceDirs(root) {
|
|
23
|
+
const TOP_LEVEL = ['.claude/guidance', 'docs/guides', 'docs', 'architecture', 'adr', '.cursor/rules'];
|
|
24
|
+
const found = TOP_LEVEL.filter(d => fs.existsSync(path.join(root, d)));
|
|
25
|
+
// Walk up to 3 levels deep looking for .claude/guidance in subprojects
|
|
26
|
+
const SKIP = new Set(['node_modules', '.git', 'dist', 'build', 'coverage', '.next', '.reports', '.swarm', '.claude-flow', 'packages']);
|
|
27
|
+
function walk(dir, depth) {
|
|
28
|
+
if (depth > 3)
|
|
29
|
+
return;
|
|
30
|
+
try {
|
|
31
|
+
const entries = fs.readdirSync(path.join(root, dir), { withFileTypes: true });
|
|
32
|
+
for (const entry of entries) {
|
|
33
|
+
if (!entry.isDirectory() || SKIP.has(entry.name))
|
|
34
|
+
continue;
|
|
35
|
+
const rel = dir ? `${dir}/${entry.name}` : entry.name;
|
|
36
|
+
const guidancePath = `${rel}/.claude/guidance`;
|
|
37
|
+
if (fs.existsSync(path.join(root, guidancePath))) {
|
|
38
|
+
// Verify it has .md files
|
|
39
|
+
try {
|
|
40
|
+
const files = fs.readdirSync(path.join(root, guidancePath));
|
|
41
|
+
if (files.some(f => f.endsWith('.md')))
|
|
42
|
+
found.push(guidancePath);
|
|
43
|
+
}
|
|
44
|
+
catch { /* skip unreadable */ }
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
walk(rel, depth + 1);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch { /* skip unreadable directories */ }
|
|
52
|
+
}
|
|
53
|
+
walk('', 0);
|
|
54
|
+
return found;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Discover source directories by walking the project tree.
|
|
58
|
+
* Finds directories named 'src' (or top-level 'packages', 'lib', etc.)
|
|
59
|
+
* that contain .ts/.tsx/.js/.jsx files. Skips node_modules, dist, etc.
|
|
60
|
+
*/
|
|
61
|
+
function discoverSrcDirs(root) {
|
|
62
|
+
const SKIP = new Set(['node_modules', '.git', 'dist', 'build', 'coverage', '.next', '.reports', '.swarm', '.claude-flow']);
|
|
63
|
+
// Top-level candidates that are always source roots if they exist
|
|
64
|
+
const TOP_LEVEL = ['packages', 'lib', 'app', 'apps', 'services', 'server', 'client'];
|
|
65
|
+
const found = [];
|
|
66
|
+
// Add top-level candidates first
|
|
67
|
+
for (const d of TOP_LEVEL) {
|
|
68
|
+
if (fs.existsSync(path.join(root, d)))
|
|
69
|
+
found.push(d);
|
|
70
|
+
}
|
|
71
|
+
// Walk up to 3 levels deep looking for 'src' and 'migrations' directories
|
|
72
|
+
const SRC_NAMES = new Set(['src', 'migrations']);
|
|
73
|
+
function walk(dir, depth) {
|
|
74
|
+
if (depth > 3)
|
|
75
|
+
return;
|
|
76
|
+
try {
|
|
77
|
+
const entries = fs.readdirSync(path.join(root, dir), { withFileTypes: true });
|
|
78
|
+
for (const entry of entries) {
|
|
79
|
+
if (!entry.isDirectory() || SKIP.has(entry.name))
|
|
80
|
+
continue;
|
|
81
|
+
const rel = dir ? `${dir}/${entry.name}` : entry.name;
|
|
82
|
+
if (SRC_NAMES.has(entry.name)) {
|
|
83
|
+
// Check it actually has source files
|
|
84
|
+
try {
|
|
85
|
+
const files = fs.readdirSync(path.join(root, rel));
|
|
86
|
+
const hasSource = files.some(f => /\.(ts|tsx|js|jsx)$/.test(f));
|
|
87
|
+
if (hasSource)
|
|
88
|
+
found.push(rel);
|
|
89
|
+
}
|
|
90
|
+
catch { /* skip unreadable */ }
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
walk(rel, depth + 1);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch { /* skip unreadable directories */ }
|
|
98
|
+
}
|
|
99
|
+
walk('', 0);
|
|
100
|
+
// Deduplicate: if 'packages' is found, don't also include 'packages/foo/src'
|
|
101
|
+
// since the code-map walker handles subdirs
|
|
102
|
+
return found.filter(d => {
|
|
103
|
+
return !found.some(other => other !== d && d.startsWith(other + '/'));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
18
106
|
/**
|
|
19
107
|
* Run interactive wizard to collect user preferences.
|
|
20
108
|
*/
|
|
21
109
|
async function runWizard(root) {
|
|
22
110
|
const { confirm, input } = await import('../prompt.js');
|
|
23
111
|
// Detect project structure
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const srcCandidates = ['src', 'packages', 'lib', 'app', 'apps', 'services', 'server', 'client'];
|
|
27
|
-
const detectedSrc = srcCandidates.filter(d => fs.existsSync(path.join(root, d)));
|
|
112
|
+
const detectedGuidance = discoverGuidanceDirs(root);
|
|
113
|
+
const detectedSrc = discoverSrcDirs(root);
|
|
28
114
|
// Ask questions
|
|
29
115
|
const guidance = await confirm({
|
|
30
116
|
message: detectedGuidance.length > 0
|
|
@@ -68,12 +154,10 @@ async function runWizard(root) {
|
|
|
68
154
|
* Get default answers (--yes mode).
|
|
69
155
|
*/
|
|
70
156
|
function defaultAnswers(root) {
|
|
71
|
-
const
|
|
72
|
-
const guidanceDirs = guidanceCandidates.filter(d => fs.existsSync(path.join(root, d)));
|
|
157
|
+
const guidanceDirs = discoverGuidanceDirs(root);
|
|
73
158
|
if (guidanceDirs.length === 0)
|
|
74
159
|
guidanceDirs.push('.claude/guidance');
|
|
75
|
-
const
|
|
76
|
-
const srcDirs = srcCandidates.filter(d => fs.existsSync(path.join(root, d)));
|
|
160
|
+
const srcDirs = discoverSrcDirs(root);
|
|
77
161
|
if (srcDirs.length === 0)
|
|
78
162
|
srcDirs.push('src');
|
|
79
163
|
return { guidance: true, guidanceDirs, codeMap: true, srcDirs, gates: true, stopHook: true };
|
|
@@ -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.7",
|
|
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
|
+
}
|