moflo 4.8.29 → 4.8.30

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.
@@ -12,7 +12,8 @@ async function getRealSearchFunction() {
12
12
  const { searchEntries } = await import('../memory/memory-initializer.js');
13
13
  searchEntriesFn = searchEntries;
14
14
  }
15
- catch {
15
+ catch (err) {
16
+ console.error('[hooks-tools] Failed to load memory-initializer searchEntries:', err instanceof Error ? err.message : String(err));
16
17
  searchEntriesFn = null;
17
18
  }
18
19
  }
@@ -26,7 +27,8 @@ async function getRealStoreFunction() {
26
27
  const { storeEntry } = await import('../memory/memory-initializer.js');
27
28
  storeEntryFn = storeEntry;
28
29
  }
29
- catch {
30
+ catch (err) {
31
+ console.error('[hooks-tools] Failed to load memory-initializer storeEntry:', err instanceof Error ? err.message : String(err));
30
32
  storeEntryFn = null;
31
33
  }
32
34
  }
@@ -1410,11 +1412,15 @@ export const hooksPretrain = {
1410
1412
  handler: async (params) => {
1411
1413
  const repoPath = resolve(params.path || '.');
1412
1414
  const depth = params.depth || 'medium';
1413
- const fileTypesStr = params.fileTypes || 'ts,js,py,md';
1415
+ // Handle fileTypes as either string ("ts,js,py") or array (["ts","js","py"])
1416
+ const rawFileTypes = params.fileTypes;
1417
+ const fileTypesArr = Array.isArray(rawFileTypes)
1418
+ ? rawFileTypes.map((t) => String(t).trim())
1419
+ : (typeof rawFileTypes === 'string' ? rawFileTypes : 'ts,js,py,md').split(',').map(e => e.trim());
1414
1420
  const startTime = Date.now();
1415
1421
  // Determine file limit by depth
1416
1422
  const fileLimit = depth === 'deep' ? 100 : depth === 'shallow' ? 30 : 60;
1417
- const extensions = new Set(fileTypesStr.split(',').map(e => e.trim()));
1423
+ const extensions = new Set(fileTypesArr);
1418
1424
  // Phase 1: Retrieve - collect source files
1419
1425
  const retrieveStart = Date.now();
1420
1426
  const files = collectFiles(repoPath, extensions, fileLimit);
@@ -1460,7 +1466,7 @@ export const hooksPretrain = {
1460
1466
  return {
1461
1467
  path: repoPath,
1462
1468
  depth,
1463
- fileTypes: fileTypesStr,
1469
+ fileTypes: fileTypesArr.join(','),
1464
1470
  stats: {
1465
1471
  filesAnalyzed: files.length,
1466
1472
  patternsExtracted: patterns.length,
@@ -2274,7 +2280,7 @@ export const hooksPatternSearch = {
2274
2280
  query: { type: 'string', description: 'Search query' },
2275
2281
  topK: { type: 'number', description: 'Number of results' },
2276
2282
  minConfidence: { type: 'number', description: 'Minimum similarity threshold (0-1)' },
2277
- namespace: { type: 'string', description: 'Namespace to search (default: pattern)' },
2283
+ namespace: { type: 'string', description: 'Namespace to search (default: patterns)' },
2278
2284
  },
2279
2285
  required: ['query'],
2280
2286
  },
@@ -2282,7 +2288,7 @@ export const hooksPatternSearch = {
2282
2288
  const query = params.query;
2283
2289
  const topK = params.topK || 5;
2284
2290
  const minConfidence = params.minConfidence || 0.3;
2285
- const namespace = params.namespace || 'pattern';
2291
+ const namespace = params.namespace || 'patterns';
2286
2292
  // Phase 3: Try ReasoningBank search via bridge first
2287
2293
  try {
2288
2294
  const bridge = await import('../memory/memory-bridge.js');
@@ -2338,7 +2344,7 @@ export const hooksPatternSearch = {
2338
2344
  results: [],
2339
2345
  searchTimeMs: searchResult.searchTime,
2340
2346
  backend: 'real-vector-search',
2341
- note: searchResult.error || 'No matching patterns found. Store patterns first using memory/store with namespace "pattern".',
2347
+ note: searchResult.error || 'No matching patterns found. Store patterns first using memory/store with namespace "patterns".',
2342
2348
  };
2343
2349
  }
2344
2350
  catch (error) {
@@ -1,106 +1,106 @@
1
- {
2
- "name": "@moflo/cli",
3
- "version": "4.8.29",
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.30",
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
+ }