moflo 4.8.48 → 4.8.49

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/README.md CHANGED
@@ -233,6 +233,17 @@ The memory-first gate doesn't blindly block every request. It classifies each pr
233
233
  - **Simple directives** (e.g., "commit", "yes", "continue", "looks good") — skip the gate entirely, no memory search required
234
234
  - **Task-oriented prompts** (e.g., "fix the auth bug", "add pagination to the API") — gate enforced, must search memory first
235
235
 
236
+ ### Escape hatch
237
+
238
+ Prefix any prompt with `@@` to bypass the memory-first gate for that turn. Useful for conversational questions, thinking out loud, or discussions that don't need prior context:
239
+
240
+ ```
241
+ @@ what do you think about this approach?
242
+ @@ question — is there a better way to handle auth tokens?
243
+ ```
244
+
245
+ The `@@` prefix is stripped before Claude sees the prompt, so it won't affect the response.
246
+
236
247
  ### Disabling gates
237
248
 
238
249
  All gates are configurable in `moflo.yaml`:
package/bin/gate.cjs CHANGED
@@ -41,7 +41,14 @@ var command = process.argv[2];
41
41
 
42
42
  var EXEMPT = ['.claude/', '.claude\\', 'CLAUDE.md', 'MEMORY.md', 'workflow-state', 'node_modules'];
43
43
  var DANGEROUS = ['rm -rf /', 'format c:', 'del /s /q c:\\', ':(){:|:&};:', 'mkfs.', '> /dev/sda'];
44
+ // Short replies starting with directive words ("ok", "yes", etc.) bypass the
45
+ // memory gate — but only if the prompt is under 20 chars. Longer prompts that
46
+ // start with a directive but contain a real question/task still get gated.
44
47
  var DIRECTIVE_RE = /^(yes|no|yeah|yep|nope|sure|ok|okay|correct|right|exactly|perfect)\b/i;
48
+ var DIRECTIVE_MAX_LEN = 20;
49
+ // @@ prefix = explicit escape hatch. User signals "this is conversational,
50
+ // skip the memory gate." Strips the prefix before Claude sees the prompt.
51
+ var ESCAPE_PREFIX = '@@';
45
52
  var TASK_RE = /\b(fix|bug|error|implement|add|create|build|write|refactor|debug|test|feature|issue|security|optimi)\b/i;
46
53
 
47
54
  switch (command) {
@@ -65,17 +72,22 @@ switch (command) {
65
72
  if (s.memorySearched || !s.memoryRequired) break;
66
73
  var target = (process.env.TOOL_INPUT_pattern || '') + ' ' + (process.env.TOOL_INPUT_path || '');
67
74
  if (EXEMPT.some(function(p) { return target.indexOf(p) >= 0; })) break;
68
- process.stderr.write('BLOCKED: Search memory before exploring files. Use mcp__moflo__memory_search.\n');
75
+ process.stderr.write('BLOCKED: Search memory before exploring files. Use mcp__moflo__memory_search with namespace "code-map", "patterns", "knowledge", or "guidance".\n');
69
76
  process.exit(2);
77
+ break; // unreachable but prevents fall-through lint warnings
70
78
  }
71
79
  case 'check-before-read': {
72
80
  if (!config.memory_first) break;
73
81
  var s = readState();
74
82
  if (s.memorySearched || !s.memoryRequired) break;
75
83
  var fp = process.env.TOOL_INPUT_file_path || '';
76
- if (fp.indexOf('.claude/guidance/') < 0 && fp.indexOf('.claude\\guidance\\') < 0) break;
77
- process.stderr.write('BLOCKED: Search memory before reading guidance files. Use mcp__moflo__memory_search.\n');
84
+ // Exempt: node_modules, CLAUDE.md, MEMORY.md, workflow-state
85
+ // NOT exempt: .claude/guidance/ (guidance files must require memory search)
86
+ var isGuidance = fp.indexOf('.claude/guidance/') >= 0 || fp.indexOf('.claude\\guidance\\') >= 0;
87
+ if (!isGuidance && EXEMPT.some(function(p) { return fp.indexOf(p) >= 0; })) break;
88
+ process.stderr.write('BLOCKED: Search memory before reading files. Use mcp__moflo__memory_search with namespace "code-map", "patterns", "knowledge", or "guidance".\n');
78
89
  process.exit(2);
90
+ break; // unreachable but prevents fall-through lint warnings
79
91
  }
80
92
  case 'record-task-created': {
81
93
  var s = readState();
@@ -113,7 +125,10 @@ switch (command) {
113
125
  var s = readState();
114
126
  s.memorySearched = false;
115
127
  var prompt = process.env.CLAUDE_USER_PROMPT || '';
116
- s.memoryRequired = prompt.length >= 4 && !DIRECTIVE_RE.test(prompt) && (TASK_RE.test(prompt) || prompt.length > 80);
128
+ var isEscaped = prompt.indexOf(ESCAPE_PREFIX) === 0;
129
+ if (isEscaped) prompt = prompt.slice(ESCAPE_PREFIX.length).trimStart();
130
+ var isShortDirective = DIRECTIVE_RE.test(prompt) && prompt.length < DIRECTIVE_MAX_LEN;
131
+ s.memoryRequired = !isEscaped && prompt.length >= 4 && !isShortDirective && (TASK_RE.test(prompt) || prompt.length > DIRECTIVE_MAX_LEN);
117
132
  s.interactionCount = (s.interactionCount || 0) + 1;
118
133
  writeState(s);
119
134
  if (!s.tasksCreated) console.log('REMINDER: Use TaskCreate before spawning agents. Task tool is blocked until then.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moflo",
3
- "version": "4.8.48",
3
+ "version": "4.8.49",
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",
@@ -2,5 +2,5 @@
2
2
  * Auto-generated by build. Do not edit manually.
3
3
  * Source of truth: root package.json → scripts/sync-version.mjs
4
4
  */
5
- export const VERSION = '4.8.48';
5
+ export const VERSION = '4.8.49';
6
6
  //# sourceMappingURL=version.js.map
@@ -1,106 +1,106 @@
1
- {
2
- "name": "@moflo/cli",
3
- "version": "4.8.48",
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.49",
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
+ }