moflo 4.8.10 → 4.8.12
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/agents/browser/browser-agent.yaml +182 -0
- package/.claude/agents/core/coder.md +265 -265
- package/.claude/agents/core/planner.md +167 -167
- package/.claude/agents/core/researcher.md +189 -189
- package/.claude/agents/core/reviewer.md +325 -325
- package/.claude/agents/core/tester.md +318 -318
- package/.claude/agents/dual-mode/codex-coordinator.md +224 -224
- package/.claude/agents/dual-mode/codex-worker.md +211 -211
- package/.claude/agents/dual-mode/dual-orchestrator.md +291 -291
- package/.claude/agents/github/code-review-swarm.md +537 -537
- package/.claude/agents/github/github-modes.md +172 -172
- package/.claude/agents/github/issue-tracker.md +318 -318
- package/.claude/agents/github/multi-repo-swarm.md +552 -552
- package/.claude/agents/github/pr-manager.md +190 -190
- package/.claude/agents/github/project-board-sync.md +508 -508
- package/.claude/agents/github/release-manager.md +366 -366
- package/.claude/agents/github/release-swarm.md +582 -582
- package/.claude/agents/github/repo-architect.md +397 -397
- package/.claude/agents/github/swarm-issue.md +572 -572
- package/.claude/agents/github/swarm-pr.md +427 -427
- package/.claude/agents/github/sync-coordinator.md +451 -451
- package/.claude/agents/github/workflow-automation.md +634 -634
- package/.claude/agents/goal/code-goal-planner.md +445 -445
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +129 -129
- package/.claude/agents/hive-mind/queen-coordinator.md +202 -202
- package/.claude/agents/hive-mind/scout-explorer.md +241 -241
- package/.claude/agents/hive-mind/swarm-memory-manager.md +192 -192
- package/.claude/agents/hive-mind/worker-specialist.md +216 -216
- package/.claude/agents/neural/safla-neural.md +73 -73
- package/.claude/agents/reasoning/goal-planner.md +72 -72
- package/.claude/agents/swarm/adaptive-coordinator.md +395 -395
- package/.claude/agents/swarm/hierarchical-coordinator.md +326 -326
- package/.claude/agents/swarm/mesh-coordinator.md +391 -391
- package/.claude/agents/templates/migration-plan.md +745 -745
- package/.claude/commands/agents/agent-spawning.md +28 -28
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +53 -53
- package/.claude/commands/analysis/bottleneck-detect.md +162 -162
- package/.claude/commands/analysis/performance-bottlenecks.md +58 -58
- package/.claude/commands/analysis/token-efficiency.md +44 -44
- package/.claude/commands/automation/auto-agent.md +122 -122
- package/.claude/commands/automation/self-healing.md +105 -105
- package/.claude/commands/automation/session-memory.md +89 -89
- package/.claude/commands/automation/smart-agents.md +72 -72
- package/.claude/commands/coordination/init.md +44 -44
- package/.claude/commands/coordination/orchestrate.md +43 -43
- package/.claude/commands/coordination/spawn.md +45 -45
- package/.claude/commands/coordination/swarm-init.md +85 -85
- package/.claude/commands/github/github-modes.md +146 -146
- package/.claude/commands/github/github-swarm.md +121 -121
- package/.claude/commands/github/issue-tracker.md +291 -291
- package/.claude/commands/github/pr-manager.md +169 -169
- package/.claude/commands/github/release-manager.md +337 -337
- package/.claude/commands/github/repo-architect.md +366 -366
- package/.claude/commands/github/sync-coordinator.md +300 -300
- package/.claude/commands/memory/neural.md +47 -47
- package/.claude/commands/monitoring/agents.md +44 -44
- package/.claude/commands/monitoring/status.md +46 -46
- package/.claude/commands/optimization/auto-topology.md +61 -61
- package/.claude/commands/optimization/parallel-execution.md +49 -49
- package/.claude/commands/sparc/analyzer.md +51 -51
- package/.claude/commands/sparc/architect.md +53 -53
- package/.claude/commands/sparc/ask.md +97 -97
- package/.claude/commands/sparc/batch-executor.md +54 -54
- package/.claude/commands/sparc/code.md +89 -89
- package/.claude/commands/sparc/coder.md +54 -54
- package/.claude/commands/sparc/debug.md +83 -83
- package/.claude/commands/sparc/debugger.md +54 -54
- package/.claude/commands/sparc/designer.md +53 -53
- package/.claude/commands/sparc/devops.md +109 -109
- package/.claude/commands/sparc/docs-writer.md +80 -80
- package/.claude/commands/sparc/documenter.md +54 -54
- package/.claude/commands/sparc/innovator.md +54 -54
- package/.claude/commands/sparc/integration.md +83 -83
- package/.claude/commands/sparc/mcp.md +117 -117
- package/.claude/commands/sparc/memory-manager.md +54 -54
- package/.claude/commands/sparc/optimizer.md +54 -54
- package/.claude/commands/sparc/orchestrator.md +131 -131
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +83 -83
- package/.claude/commands/sparc/refinement-optimization-mode.md +83 -83
- package/.claude/commands/sparc/researcher.md +54 -54
- package/.claude/commands/sparc/reviewer.md +54 -54
- package/.claude/commands/sparc/security-review.md +80 -80
- package/.claude/commands/sparc/sparc-modes.md +174 -174
- package/.claude/commands/sparc/sparc.md +111 -111
- package/.claude/commands/sparc/spec-pseudocode.md +80 -80
- package/.claude/commands/sparc/supabase-admin.md +348 -348
- package/.claude/commands/sparc/swarm-coordinator.md +54 -54
- package/.claude/commands/sparc/tdd.md +54 -54
- package/.claude/commands/sparc/tester.md +54 -54
- package/.claude/commands/sparc/tutorial.md +79 -79
- package/.claude/commands/sparc/workflow-manager.md +54 -54
- package/.claude/commands/sparc.md +166 -166
- package/.claude/commands/swarm/analysis.md +95 -95
- package/.claude/commands/swarm/development.md +96 -96
- package/.claude/commands/swarm/examples.md +168 -168
- package/.claude/commands/swarm/maintenance.md +102 -102
- package/.claude/commands/swarm/optimization.md +117 -117
- package/.claude/commands/swarm/research.md +136 -136
- package/.claude/commands/swarm/testing.md +131 -131
- package/.claude/commands/training/neural-patterns.md +73 -73
- package/.claude/commands/training/specialization.md +62 -62
- package/.claude/commands/workflows/development.md +77 -77
- package/.claude/commands/workflows/research.md +62 -62
- package/.claude/guidance/moflo-bootstrap.md +129 -0
- package/.claude/guidance/{agent-bootstrap.md → shipped/agent-bootstrap.md} +126 -126
- package/.claude/guidance/{guidance-memory-strategy.md → shipped/guidance-memory-strategy.md} +262 -262
- package/.claude/guidance/{memory-strategy.md → shipped/memory-strategy.md} +204 -204
- package/.claude/guidance/{moflo.md → shipped/moflo.md} +45 -31
- package/.claude/guidance/{task-swarm-integration.md → shipped/task-swarm-integration.md} +441 -348
- package/.claude/helpers/gate-hook.mjs +50 -0
- package/.claude/helpers/gate.cjs +138 -236
- package/.claude/helpers/hook-handler.cjs +64 -326
- package/.claude/helpers/post-commit +16 -0
- package/.claude/helpers/pre-commit +26 -0
- package/.claude/helpers/prompt-hook.mjs +72 -0
- package/.claude/scripts/build-embeddings.mjs +549 -0
- package/.claude/scripts/generate-code-map.mjs +697 -0
- package/.claude/scripts/hooks.mjs +656 -0
- package/.claude/scripts/index-guidance.mjs +893 -0
- package/.claude/scripts/index-tests.mjs +710 -0
- package/.claude/scripts/semantic-search.mjs +473 -0
- package/.claude/scripts/session-start-launcher.mjs +226 -0
- package/.claude/settings.json +351 -290
- package/.claude/settings.local.json +4 -3
- package/.claude/skills/browser/SKILL.md +204 -0
- package/.claude/skills/fl/SKILL.md +29 -23
- package/.claude/skills/flo/SKILL.md +29 -23
- package/.claude/skills/github-code-review/SKILL.md +4 -4
- package/.claude/skills/github-multi-repo/SKILL.md +8 -8
- package/.claude/skills/github-project-management/SKILL.md +6 -6
- package/.claude/skills/github-release-management/SKILL.md +12 -12
- package/.claude/skills/github-workflow-automation/SKILL.md +6 -6
- package/.claude/skills/hooks-automation/SKILL.md +1201 -1201
- package/.claude/skills/performance-analysis/SKILL.md +563 -563
- package/.claude/skills/sparc-methodology/SKILL.md +64 -64
- package/.claude/skills/swarm-advanced/SKILL.md +77 -77
- package/.claude/workflow-state.json +9 -0
- package/.claude-plugin/README.md +3 -3
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +3 -3
- package/.claude-plugin/docs/QUICKSTART.md +4 -4
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +3 -3
- package/.claude-plugin/scripts/install.sh +9 -9
- package/.claude-plugin/scripts/verify.sh +7 -7
- package/README.md +311 -116
- package/bin/gate-hook.mjs +50 -0
- package/bin/gate.cjs +138 -0
- package/bin/hook-handler.cjs +83 -0
- package/bin/hooks.mjs +72 -12
- package/bin/index-guidance.mjs +29 -35
- package/bin/index-tests.mjs +710 -0
- package/bin/lib/process-manager.mjs +243 -0
- package/bin/lib/registry-cleanup.cjs +41 -0
- package/bin/prompt-hook.mjs +72 -0
- package/bin/semantic-search.mjs +472 -440
- package/bin/session-start-launcher.mjs +81 -31
- package/bin/setup-project.mjs +65 -65
- package/package.json +4 -2
- package/src/@claude-flow/cli/README.md +1 -1
- package/src/@claude-flow/cli/bin/cli.js +175 -175
- package/src/@claude-flow/cli/dist/src/commands/doctor.js +1091 -736
- package/src/@claude-flow/cli/dist/src/commands/github.d.ts +12 -0
- package/src/@claude-flow/cli/dist/src/commands/github.js +505 -0
- package/src/@claude-flow/cli/dist/src/commands/hive-mind.js +90 -90
- package/src/@claude-flow/cli/dist/src/commands/index.d.ts +1 -0
- package/src/@claude-flow/cli/dist/src/commands/index.js +7 -0
- package/src/@claude-flow/cli/dist/src/config-adapter.js +1 -1
- package/src/@claude-flow/cli/dist/src/init/claudemd-generator.d.ts +29 -24
- package/src/@claude-flow/cli/dist/src/init/claudemd-generator.js +73 -494
- package/src/@claude-flow/cli/dist/src/init/executor.js +109 -5
- package/src/@claude-flow/cli/dist/src/init/helpers-generator.d.ts +14 -0
- package/src/@claude-flow/cli/dist/src/init/helpers-generator.js +156 -24
- package/src/@claude-flow/cli/dist/src/init/mcp-generator.js +20 -20
- package/src/@claude-flow/cli/dist/src/init/moflo-init.d.ts +30 -23
- package/src/@claude-flow/cli/dist/src/init/moflo-init.js +727 -670
- package/src/@claude-flow/cli/dist/src/init/settings-generator.js +23 -14
- package/src/@claude-flow/cli/dist/src/mcp-server.js +3 -3
- package/src/@claude-flow/cli/dist/src/plugins/manager.js +9 -8
- package/src/@claude-flow/cli/dist/src/services/worker-daemon.d.ts +1 -0
- package/src/@claude-flow/cli/dist/src/services/worker-daemon.js +3 -1
- package/src/@claude-flow/cli/dist/src/services/workflow-gate.js +10 -10
- package/src/@claude-flow/cli/package.json +106 -106
|
@@ -22,7 +22,7 @@ export function generateSettings(options) {
|
|
|
22
22
|
'Bash(npx moflo*)',
|
|
23
23
|
'Bash(npx flo*)',
|
|
24
24
|
'Bash(node .claude/*)',
|
|
25
|
-
'
|
|
25
|
+
'mcp__moflo__:*',
|
|
26
26
|
],
|
|
27
27
|
deny: [
|
|
28
28
|
'Read(./.env)',
|
|
@@ -176,6 +176,14 @@ function autoMemoryCmd(subcommand) {
|
|
|
176
176
|
function gateCmd(subcommand) {
|
|
177
177
|
return hookCmd('"$CLAUDE_PROJECT_DIR/.claude/helpers/gate.cjs"', subcommand);
|
|
178
178
|
}
|
|
179
|
+
/** Gate hook wrapper — reads stdin JSON for tool input, uses exit code 2 for blocking */
|
|
180
|
+
function gateHookCmd(subcommand) {
|
|
181
|
+
return hookCmdEsm('"$CLAUDE_PROJECT_DIR/.claude/helpers/gate-hook.mjs"', subcommand);
|
|
182
|
+
}
|
|
183
|
+
/** Prompt hook — reads stdin JSON for user prompt, classifies namespace */
|
|
184
|
+
function promptHookCmd() {
|
|
185
|
+
return `node "$CLAUDE_PROJECT_DIR/.claude/helpers/prompt-hook.mjs"`;
|
|
186
|
+
}
|
|
179
187
|
/**
|
|
180
188
|
* Generate statusLine configuration for Claude Code
|
|
181
189
|
* Uses local helper script for cross-platform compatibility (no npx cold-start)
|
|
@@ -194,7 +202,7 @@ function generateStatusLineConfig(_options) {
|
|
|
194
202
|
/**
|
|
195
203
|
* Generate hooks configuration
|
|
196
204
|
* All hooks use direct node invocation via lightweight helper scripts
|
|
197
|
-
* (gate.cjs, hook-handler.cjs) instead of `npx flo` to avoid spawning
|
|
205
|
+
* (gate.cjs, gate-hook.mjs, hook-handler.cjs) instead of `npx flo` to avoid spawning
|
|
198
206
|
* a full CLI process on every tool call.
|
|
199
207
|
*/
|
|
200
208
|
function generateHooksConfig(config) {
|
|
@@ -208,22 +216,21 @@ function generateHooksConfig(config) {
|
|
|
208
216
|
},
|
|
209
217
|
{
|
|
210
218
|
matcher: '^(Glob|Grep)$',
|
|
211
|
-
hooks: [{ type: 'command', command:
|
|
219
|
+
hooks: [{ type: 'command', command: gateHookCmd('check-before-scan'), timeout: 3000 }],
|
|
212
220
|
},
|
|
213
221
|
{
|
|
214
222
|
matcher: '^Read$',
|
|
215
|
-
hooks: [{ type: 'command', command:
|
|
223
|
+
hooks: [{ type: 'command', command: gateHookCmd('check-before-read'), timeout: 3000 }],
|
|
216
224
|
},
|
|
217
225
|
{
|
|
218
|
-
matcher: '^
|
|
226
|
+
matcher: '^Agent$',
|
|
219
227
|
hooks: [
|
|
220
|
-
{ type: 'command', command:
|
|
221
|
-
{ type: 'command', command: hookHandlerCmd('pre-task'), timeout: 5000 },
|
|
228
|
+
{ type: 'command', command: gateHookCmd('check-before-agent'), timeout: 3000 },
|
|
222
229
|
],
|
|
223
230
|
},
|
|
224
231
|
{
|
|
225
232
|
matcher: '^Bash$',
|
|
226
|
-
hooks: [{ type: 'command', command:
|
|
233
|
+
hooks: [{ type: 'command', command: gateHookCmd('check-dangerous-command'), timeout: 2000 }],
|
|
227
234
|
},
|
|
228
235
|
];
|
|
229
236
|
}
|
|
@@ -235,20 +242,23 @@ function generateHooksConfig(config) {
|
|
|
235
242
|
hooks: [{ type: 'command', command: hookHandlerCmd('post-edit'), timeout: 5000 }],
|
|
236
243
|
},
|
|
237
244
|
{
|
|
238
|
-
matcher: '^
|
|
245
|
+
matcher: '^Agent$',
|
|
239
246
|
hooks: [{ type: 'command', command: hookHandlerCmd('post-task'), timeout: 5000 }],
|
|
240
247
|
},
|
|
241
248
|
{
|
|
249
|
+
// TaskCreate PostToolUse only fires in some Claude Code versions.
|
|
250
|
+
// The prompt-reminder and soft gate in check-before-agent handle the common case.
|
|
242
251
|
matcher: '^TaskCreate$',
|
|
243
252
|
hooks: [{ type: 'command', command: gateCmd('record-task-created'), timeout: 2000 }],
|
|
244
253
|
},
|
|
245
254
|
{
|
|
246
255
|
matcher: '^Bash$',
|
|
247
|
-
hooks: [{ type: 'command', command:
|
|
256
|
+
hooks: [{ type: 'command', command: gateHookCmd('check-bash-memory'), timeout: 2000 }],
|
|
248
257
|
},
|
|
249
258
|
{
|
|
250
|
-
matcher
|
|
251
|
-
|
|
259
|
+
// Simplified matcher — anchored regex with parens doesn't match MCP tool names reliably
|
|
260
|
+
matcher: 'mcp__moflo__memory_',
|
|
261
|
+
hooks: [{ type: 'command', command: gateCmd('record-memory-searched'), timeout: 3000 }],
|
|
252
262
|
},
|
|
253
263
|
];
|
|
254
264
|
}
|
|
@@ -257,8 +267,7 @@ function generateHooksConfig(config) {
|
|
|
257
267
|
hooks.UserPromptSubmit = [
|
|
258
268
|
{
|
|
259
269
|
hooks: [
|
|
260
|
-
{ type: 'command', command:
|
|
261
|
-
{ type: 'command', command: hookHandlerCmd('route'), timeout: 5000 },
|
|
270
|
+
{ type: 'command', command: promptHookCmd(), timeout: 3000 },
|
|
262
271
|
],
|
|
263
272
|
},
|
|
264
273
|
];
|
|
@@ -274,7 +274,7 @@ export class MCPServerManager extends EventEmitter {
|
|
|
274
274
|
method: 'server.initialized',
|
|
275
275
|
params: {
|
|
276
276
|
serverInfo: {
|
|
277
|
-
name: '
|
|
277
|
+
name: 'moflo',
|
|
278
278
|
version: VERSION,
|
|
279
279
|
capabilities: {
|
|
280
280
|
tools: { listChanged: true },
|
|
@@ -388,7 +388,7 @@ export class MCPServerManager extends EventEmitter {
|
|
|
388
388
|
id: message.id,
|
|
389
389
|
result: {
|
|
390
390
|
protocolVersion: '2024-11-05',
|
|
391
|
-
serverInfo: { name: '
|
|
391
|
+
serverInfo: { name: 'moflo', version: '3.0.0' },
|
|
392
392
|
capabilities: {
|
|
393
393
|
tools: { listChanged: true },
|
|
394
394
|
resources: { subscribe: true, listChanged: true },
|
|
@@ -480,7 +480,7 @@ export class MCPServerManager extends EventEmitter {
|
|
|
480
480
|
error: (msg, data) => this.emit('log', { level: 'error', msg, data }),
|
|
481
481
|
};
|
|
482
482
|
const mcpServer = createMCPServer({
|
|
483
|
-
name: '
|
|
483
|
+
name: 'MoFlo MCP Server V3',
|
|
484
484
|
version: '3.0.0',
|
|
485
485
|
transport: this.options.transport,
|
|
486
486
|
host: this.options.host,
|
|
@@ -114,10 +114,11 @@ export class PluginManager {
|
|
|
114
114
|
if (fs.existsSync(packageJsonPath)) {
|
|
115
115
|
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
116
116
|
installedVersion = pkg.version;
|
|
117
|
-
// Check for claude-flow plugin metadata
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
// Check for moflo/claude-flow plugin metadata (backward compat)
|
|
118
|
+
const pluginMeta = pkg['moflo'] || pkg['claude-flow'];
|
|
119
|
+
if (pluginMeta) {
|
|
120
|
+
commands = pluginMeta.commands || [];
|
|
121
|
+
hooks = pluginMeta.hooks || [];
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
// Create plugin entry
|
|
@@ -177,8 +178,8 @@ export class PluginManager {
|
|
|
177
178
|
enabled: true,
|
|
178
179
|
source: 'local',
|
|
179
180
|
path: absolutePath,
|
|
180
|
-
commands: pkg['claude-flow']?.commands || [],
|
|
181
|
-
hooks: pkg['claude-flow']?.hooks || [],
|
|
181
|
+
commands: (pkg['moflo'] || pkg['claude-flow'])?.commands || [],
|
|
182
|
+
hooks: (pkg['moflo'] || pkg['claude-flow'])?.hooks || [],
|
|
182
183
|
};
|
|
183
184
|
// Save to manifest
|
|
184
185
|
this.manifest.plugins[packageName] = plugin;
|
|
@@ -338,8 +339,8 @@ export class PluginManager {
|
|
|
338
339
|
if (fs.existsSync(packageJsonPath)) {
|
|
339
340
|
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
340
341
|
existing.version = pkg.version;
|
|
341
|
-
existing.commands = pkg['claude-flow']?.commands || existing.commands;
|
|
342
|
-
existing.hooks = pkg['claude-flow']?.hooks || existing.hooks;
|
|
342
|
+
existing.commands = (pkg['moflo'] || pkg['claude-flow'])?.commands || existing.commands;
|
|
343
|
+
existing.hooks = (pkg['moflo'] || pkg['claude-flow'])?.hooks || existing.hooks;
|
|
343
344
|
}
|
|
344
345
|
await this.saveManifest();
|
|
345
346
|
console.log(`[PluginManager] Upgraded ${packageName} to ${existing.version}`);
|
|
@@ -71,6 +71,7 @@ export declare class WorkerDaemon extends EventEmitter {
|
|
|
71
71
|
private headlessExecutor;
|
|
72
72
|
private headlessAvailable;
|
|
73
73
|
private originalConfig?;
|
|
74
|
+
private _osProvider?;
|
|
74
75
|
constructor(projectRoot: string, config?: Partial<DaemonConfig>);
|
|
75
76
|
/**
|
|
76
77
|
* Initialize headless executor if Claude Code is available
|
|
@@ -44,6 +44,8 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
44
44
|
// Preserve the original constructor config so we can detect explicit overrides
|
|
45
45
|
// during state restoration (R1: constructor config takes priority over stale state)
|
|
46
46
|
originalConfig;
|
|
47
|
+
// Injectable OS provider for testing (avoids ESM module namespace issues)
|
|
48
|
+
_osProvider;
|
|
47
49
|
constructor(projectRoot, config) {
|
|
48
50
|
super();
|
|
49
51
|
this.projectRoot = projectRoot;
|
|
@@ -212,7 +214,7 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
212
214
|
* Check if system resources allow worker execution
|
|
213
215
|
*/
|
|
214
216
|
async canRunWorker() {
|
|
215
|
-
const os = await import('os');
|
|
217
|
+
const os = this._osProvider ?? await import('os');
|
|
216
218
|
const cpuLoad = os.loadavg()[0];
|
|
217
219
|
const totalMem = os.totalmem();
|
|
218
220
|
const freeMem = os.freemem();
|
|
@@ -143,7 +143,7 @@ export class WorkflowGateService {
|
|
|
143
143
|
if (this.config.memory_first && !state.memorySearched) {
|
|
144
144
|
return {
|
|
145
145
|
allowed: false,
|
|
146
|
-
message: 'BLOCKED: Search memory (
|
|
146
|
+
message: 'BLOCKED: Search memory (mcp__moflo__memory_search) before spawning agents.',
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
return { allowed: true };
|
|
@@ -177,7 +177,7 @@ export class WorkflowGateService {
|
|
|
177
177
|
if (now - lastBlocked > 2000) {
|
|
178
178
|
state.lastBlockedAt = new Date(now).toISOString();
|
|
179
179
|
this.writeState(state);
|
|
180
|
-
message = 'BLOCKED: Search memory before exploring files. Use
|
|
180
|
+
message = 'BLOCKED: Search memory before exploring files. Use mcp__moflo__memory_search with namespace "code-map", "patterns", "knowledge", or "guidance".';
|
|
181
181
|
}
|
|
182
182
|
return { allowed: false, message };
|
|
183
183
|
}
|
|
@@ -208,7 +208,7 @@ export class WorkflowGateService {
|
|
|
208
208
|
if (now - lastBlocked > 2000) {
|
|
209
209
|
state.lastBlockedAt = new Date(now).toISOString();
|
|
210
210
|
this.writeState(state);
|
|
211
|
-
message = 'BLOCKED: Search memory before reading guidance files. Use
|
|
211
|
+
message = 'BLOCKED: Search memory before reading guidance files. Use mcp__moflo__memory_search with namespace "guidance".';
|
|
212
212
|
}
|
|
213
213
|
return { allowed: false, message };
|
|
214
214
|
}
|
|
@@ -310,8 +310,8 @@ export function processGateCommand(command, env = process.env) {
|
|
|
310
310
|
const result = gate.checkBeforeAgent();
|
|
311
311
|
if (!result.allowed) {
|
|
312
312
|
if (result.message)
|
|
313
|
-
|
|
314
|
-
process.exit(
|
|
313
|
+
process.stderr.write(result.message + '\n');
|
|
314
|
+
process.exit(2); // Exit 2 = block tool call in Claude Code
|
|
315
315
|
}
|
|
316
316
|
process.exit(0);
|
|
317
317
|
}
|
|
@@ -319,8 +319,8 @@ export function processGateCommand(command, env = process.env) {
|
|
|
319
319
|
const result = gate.checkBeforeScan(env.TOOL_INPUT_pattern, env.TOOL_INPUT_path);
|
|
320
320
|
if (!result.allowed) {
|
|
321
321
|
if (result.message)
|
|
322
|
-
|
|
323
|
-
process.exit(
|
|
322
|
+
process.stderr.write(result.message + '\n');
|
|
323
|
+
process.exit(2);
|
|
324
324
|
}
|
|
325
325
|
process.exit(0);
|
|
326
326
|
}
|
|
@@ -328,8 +328,8 @@ export function processGateCommand(command, env = process.env) {
|
|
|
328
328
|
const result = gate.checkBeforeRead(env.TOOL_INPUT_file_path);
|
|
329
329
|
if (!result.allowed) {
|
|
330
330
|
if (result.message)
|
|
331
|
-
|
|
332
|
-
process.exit(
|
|
331
|
+
process.stderr.write(result.message + '\n');
|
|
332
|
+
process.exit(2);
|
|
333
333
|
}
|
|
334
334
|
process.exit(0);
|
|
335
335
|
}
|
|
@@ -365,7 +365,7 @@ export function processGateCommand(command, env = process.env) {
|
|
|
365
365
|
const dangerous = ['rm -rf /', 'format c:', 'del /s /q c:\\', ':(){:|:&};:', 'mkfs.', '> /dev/sda'];
|
|
366
366
|
for (const pattern of dangerous) {
|
|
367
367
|
if (cmd.includes(pattern)) {
|
|
368
|
-
|
|
368
|
+
process.stderr.write(`[BLOCKED] Dangerous command detected: ${pattern}\n`);
|
|
369
369
|
process.exit(2);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -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.12",
|
|
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
|
+
}
|