moflo 4.7.3 → 4.7.6

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.
@@ -19,8 +19,8 @@ export function generateSettings(options) {
19
19
  // Add permissions
20
20
  settings.permissions = {
21
21
  allow: [
22
- 'Bash(npx @claude-flow*)',
23
- 'Bash(npx claude-flow*)',
22
+ 'Bash(npx moflo*)',
23
+ 'Bash(npx flo*)',
24
24
  'Bash(node .claude/*)',
25
25
  'mcp__claude-flow__:*',
26
26
  ],
@@ -172,6 +172,10 @@ function hookHandlerCmd(subcommand) {
172
172
  function autoMemoryCmd(subcommand) {
173
173
  return hookCmdEsm('"$CLAUDE_PROJECT_DIR/.claude/helpers/auto-memory-hook.mjs"', subcommand);
174
174
  }
175
+ /** Shorthand for gate commands (lightweight JSON state checks) */
176
+ function gateCmd(subcommand) {
177
+ return hookCmd('"$CLAUDE_PROJECT_DIR/.claude/helpers/gate.cjs"', subcommand);
178
+ }
175
179
  /**
176
180
  * Generate statusLine configuration for Claude Code
177
181
  * Uses local helper script for cross-platform compatibility (no npx cold-start)
@@ -189,8 +193,9 @@ function generateStatusLineConfig(_options) {
189
193
  }
190
194
  /**
191
195
  * Generate hooks configuration
192
- * All hooks route through the npx flo CLI for consistent behavior.
193
- * The CLI handles routing, gates, learning, and session management.
196
+ * All hooks use direct node invocation via lightweight helper scripts
197
+ * (gate.cjs, hook-handler.cjs) instead of `npx flo` to avoid spawning
198
+ * a full CLI process on every tool call.
194
199
  */
195
200
  function generateHooksConfig(config) {
196
201
  const hooks = {};
@@ -199,26 +204,26 @@ function generateHooksConfig(config) {
199
204
  hooks.PreToolUse = [
200
205
  {
201
206
  matcher: '^(Write|Edit|MultiEdit)$',
202
- hooks: [{ type: 'command', command: 'npx flo hooks pre-edit', timeout: 5000 }],
207
+ hooks: [{ type: 'command', command: hookHandlerCmd('post-edit'), timeout: 5000 }],
203
208
  },
204
209
  {
205
210
  matcher: '^(Glob|Grep)$',
206
- hooks: [{ type: 'command', command: 'npx flo gate check-before-scan', timeout: 3000 }],
211
+ hooks: [{ type: 'command', command: gateCmd('check-before-scan'), timeout: 3000 }],
207
212
  },
208
213
  {
209
214
  matcher: '^Read$',
210
- hooks: [{ type: 'command', command: 'npx flo gate check-before-read', timeout: 3000 }],
215
+ hooks: [{ type: 'command', command: gateCmd('check-before-read'), timeout: 3000 }],
211
216
  },
212
217
  {
213
218
  matcher: '^Task$',
214
219
  hooks: [
215
- { type: 'command', command: 'npx flo gate check-before-agent', timeout: 3000 },
216
- { type: 'command', command: 'npx flo hooks pre-task', timeout: 5000 },
220
+ { type: 'command', command: gateCmd('check-before-agent'), timeout: 3000 },
221
+ { type: 'command', command: hookHandlerCmd('pre-task'), timeout: 5000 },
217
222
  ],
218
223
  },
219
224
  {
220
225
  matcher: '^Bash$',
221
- hooks: [{ type: 'command', command: 'npx flo gate check-dangerous-command', timeout: 2000 }],
226
+ hooks: [{ type: 'command', command: gateCmd('check-dangerous-command'), timeout: 2000 }],
222
227
  },
223
228
  ];
224
229
  }
@@ -227,23 +232,23 @@ function generateHooksConfig(config) {
227
232
  hooks.PostToolUse = [
228
233
  {
229
234
  matcher: '^(Write|Edit|MultiEdit)$',
230
- hooks: [{ type: 'command', command: 'npx flo hooks post-edit', timeout: 5000 }],
235
+ hooks: [{ type: 'command', command: hookHandlerCmd('post-edit'), timeout: 5000 }],
231
236
  },
232
237
  {
233
238
  matcher: '^Task$',
234
- hooks: [{ type: 'command', command: 'npx flo hooks post-task', timeout: 5000 }],
239
+ hooks: [{ type: 'command', command: hookHandlerCmd('post-task'), timeout: 5000 }],
235
240
  },
236
241
  {
237
242
  matcher: '^TaskCreate$',
238
- hooks: [{ type: 'command', command: 'npx flo gate record-task-created', timeout: 2000 }],
243
+ hooks: [{ type: 'command', command: gateCmd('record-task-created'), timeout: 2000 }],
239
244
  },
240
245
  {
241
246
  matcher: '^Bash$',
242
- hooks: [{ type: 'command', command: 'npx flo gate check-bash-memory', timeout: 2000 }],
247
+ hooks: [{ type: 'command', command: gateCmd('check-bash-memory'), timeout: 2000 }],
243
248
  },
244
249
  {
245
250
  matcher: '^mcp__claude-flow__memory_(search|retrieve)$',
246
- hooks: [{ type: 'command', command: 'npx flo gate record-memory-searched', timeout: 2000 }],
251
+ hooks: [{ type: 'command', command: gateCmd('record-memory-searched'), timeout: 2000 }],
247
252
  },
248
253
  ];
249
254
  }
@@ -252,8 +257,8 @@ function generateHooksConfig(config) {
252
257
  hooks.UserPromptSubmit = [
253
258
  {
254
259
  hooks: [
255
- { type: 'command', command: 'npx flo gate prompt-reminder', timeout: 2000 },
256
- { type: 'command', command: 'npx flo hooks route', timeout: 5000 },
260
+ { type: 'command', command: gateCmd('prompt-reminder'), timeout: 2000 },
261
+ { type: 'command', command: hookHandlerCmd('route'), timeout: 5000 },
257
262
  ],
258
263
  },
259
264
  ];
@@ -282,7 +287,7 @@ function generateHooksConfig(config) {
282
287
  hooks.Stop = [
283
288
  {
284
289
  hooks: [
285
- { type: 'command', command: 'npx flo hooks session-end', timeout: 5000 },
290
+ { type: 'command', command: hookHandlerCmd('session-end'), timeout: 5000 },
286
291
  { type: 'command', command: autoMemoryCmd('sync'), timeout: 10000 },
287
292
  ],
288
293
  },
@@ -292,7 +297,7 @@ function generateHooksConfig(config) {
292
297
  if (config.preCompact) {
293
298
  hooks.PreCompact = [
294
299
  {
295
- hooks: [{ type: 'command', command: 'npx flo gate compact-guidance', timeout: 3000 }],
300
+ hooks: [{ type: 'command', command: gateCmd('compact-guidance'), timeout: 3000 }],
296
301
  },
297
302
  ];
298
303
  }
@@ -303,7 +308,7 @@ function generateHooksConfig(config) {
303
308
  hooks: [
304
309
  {
305
310
  type: 'command',
306
- command: 'npx flo hooks notification',
311
+ command: hookHandlerCmd('notification'),
307
312
  timeout: 3000,
308
313
  },
309
314
  ],
@@ -150,8 +150,8 @@ export const MINIMAL_INIT_OPTIONS = {
150
150
  skills: true,
151
151
  commands: false,
152
152
  agents: false,
153
- helpers: false,
154
- statusline: false,
153
+ helpers: true,
154
+ statusline: true,
155
155
  mcp: true,
156
156
  runtime: true,
157
157
  claudeMd: true,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Update checker for @claude-flow packages
2
+ * Update checker for moflo packages
3
3
  * Queries npm registry and compares versions
4
4
  */
5
5
  export interface UpdateCheckResult {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Update checker for @claude-flow packages
2
+ * Update checker for moflo packages
3
3
  * Queries npm registry and compares versions
4
4
  */
5
5
  import * as semver from 'semver';
@@ -13,21 +13,21 @@ const DEFAULT_CONFIG = {
13
13
  major: false,
14
14
  },
15
15
  priority: {
16
- '@claude-flow/security': 'critical',
17
- '@claude-flow/cli': 'high',
18
- '@claude-flow/embeddings': 'normal',
19
- '@claude-flow/integration': 'normal',
20
- '@claude-flow/testing': 'low',
16
+ 'moflo': 'high',
17
+ '@moflo/security': 'critical',
18
+ '@moflo/embeddings': 'normal',
19
+ '@moflo/integration': 'normal',
20
+ '@moflo/testing': 'low',
21
21
  },
22
22
  exclude: [],
23
23
  };
24
24
  // Packages to check for updates
25
25
  const CLAUDE_FLOW_PACKAGES = [
26
- '@claude-flow/cli',
27
- '@claude-flow/embeddings',
28
- '@claude-flow/security',
29
- '@claude-flow/integration',
30
- '@claude-flow/testing',
26
+ 'moflo',
27
+ '@moflo/embeddings',
28
+ '@moflo/security',
29
+ '@moflo/integration',
30
+ '@moflo/testing',
31
31
  ];
32
32
  async function fetchPackageInfo(packageName) {
33
33
  try {
@@ -3,31 +3,31 @@
3
3
  * Ensures updates don't break the ecosystem
4
4
  */
5
5
  import * as semver from 'semver';
6
- // Known compatibility matrix between @claude-flow packages
6
+ // Known compatibility matrix between moflo packages
7
7
  const COMPATIBILITY_MATRIX = {
8
- '@claude-flow/cli': {
9
- '@claude-flow/embeddings': { minVersion: '3.0.0-alpha.1' },
10
- '@claude-flow/security': { minVersion: '3.0.0-alpha.1' },
11
- '@claude-flow/integration': { minVersion: '3.0.0-alpha.1' },
8
+ 'moflo': {
9
+ '@moflo/embeddings': { minVersion: '3.0.0-alpha.1' },
10
+ '@moflo/security': { minVersion: '3.0.0-alpha.1' },
11
+ '@moflo/integration': { minVersion: '3.0.0-alpha.1' },
12
12
  },
13
- '@claude-flow/embeddings': {
14
- '@claude-flow/cli': { minVersion: '3.0.0-alpha.50' },
13
+ '@moflo/embeddings': {
14
+ 'moflo': { minVersion: '3.0.0-alpha.50' },
15
15
  },
16
- '@claude-flow/integration': {
17
- '@claude-flow/cli': { minVersion: '3.0.0-alpha.70' },
16
+ '@moflo/integration': {
17
+ 'moflo': { minVersion: '3.0.0-alpha.70' },
18
18
  'agentic-flow': { minVersion: '3.0.0-alpha.1' },
19
19
  },
20
20
  };
21
21
  // Known breaking changes by version
22
22
  const BREAKING_CHANGES = {
23
- '@claude-flow/cli': {
23
+ 'moflo': {
24
24
  '3.0.0': [
25
25
  'Memory API changed from key-value to vector-based',
26
26
  'Hooks system completely redesigned',
27
27
  'Agent spawning now requires type parameter',
28
28
  ],
29
29
  },
30
- '@claude-flow/embeddings': {
30
+ '@moflo/embeddings': {
31
31
  '3.0.0': [
32
32
  'Switched from better-sqlite3 to sql.js',
33
33
  'New initialization required with initEmbeddings()',
@@ -1,110 +1,110 @@
1
- {
2
- "name": "@moflo/cli",
3
- "version": "4.7.3",
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
- "vitest": "^4.0.16"
86
- },
87
- "dependencies": {
88
- "@claude-flow/mcp": "^3.0.0-alpha.8",
89
- "@claude-flow/shared": "^3.0.0-alpha.1",
90
- "@noble/ed25519": "^2.1.0",
91
- "semver": "^7.6.0"
92
- },
93
- "optionalDependencies": {
94
- "@claude-flow/aidefence": "^3.0.2",
95
- "@claude-flow/codex": "^3.0.0-alpha.8",
96
- "@claude-flow/embeddings": "^3.0.0-alpha.12",
97
- "@claude-flow/guidance": "^3.0.0-alpha.1",
98
- "@claude-flow/memory": "^3.0.0-alpha.11",
99
- "@claude-flow/plugin-gastown-bridge": "^0.1.3",
100
- "agentic-flow": "^3.0.0-alpha.1",
101
- "@ruvector/attention": "^0.1.4",
102
- "@ruvector/learning-wasm": "^0.1.29",
103
- "@ruvector/router": "^0.1.27",
104
- "@ruvector/sona": "^0.1.5"
105
- },
106
- "publishConfig": {
107
- "access": "public",
108
- "tag": "latest"
109
- }
110
- }
1
+ {
2
+ "name": "@moflo/cli",
3
+ "version": "4.7.6",
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
+ "vitest": "^4.0.16"
86
+ },
87
+ "dependencies": {
88
+ "@claude-flow/mcp": "^3.0.0-alpha.8",
89
+ "@claude-flow/shared": "^3.0.0-alpha.1",
90
+ "@noble/ed25519": "^2.1.0",
91
+ "semver": "^7.6.0"
92
+ },
93
+ "optionalDependencies": {
94
+ "@claude-flow/aidefence": "^3.0.2",
95
+ "@claude-flow/codex": "^3.0.0-alpha.8",
96
+ "@claude-flow/embeddings": "^3.0.0-alpha.12",
97
+ "@claude-flow/guidance": "^3.0.0-alpha.1",
98
+ "@claude-flow/memory": "^3.0.0-alpha.11",
99
+ "@claude-flow/plugin-gastown-bridge": "^0.1.3",
100
+ "agentic-flow": "^3.0.0-alpha.1",
101
+ "@ruvector/attention": "^0.1.4",
102
+ "@ruvector/learning-wasm": "^0.1.29",
103
+ "@ruvector/router": "^0.1.27",
104
+ "@ruvector/sona": "^0.1.5"
105
+ },
106
+ "publishConfig": {
107
+ "access": "public",
108
+ "tag": "latest"
109
+ }
110
+ }