moflo 4.6.12 → 4.7.1
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/settings.json +4 -4
- package/.claude/workflow-state.json +1 -5
- package/README.md +1 -1
- package/bin/hooks.mjs +7 -3
- package/bin/setup-project.mjs +1 -1
- package/package.json +1 -1
- package/src/@claude-flow/cli/README.md +452 -7536
- package/src/@claude-flow/cli/dist/src/commands/doctor.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/embeddings.js +4 -4
- package/src/@claude-flow/cli/dist/src/commands/init.js +35 -8
- package/src/@claude-flow/cli/dist/src/commands/swarm.js +2 -2
- package/src/@claude-flow/cli/dist/src/init/claudemd-generator.js +316 -294
- package/src/@claude-flow/cli/dist/src/init/executor.js +461 -465
- package/src/@claude-flow/cli/dist/src/init/helpers-generator.d.ts +0 -36
- package/src/@claude-flow/cli/dist/src/init/helpers-generator.js +146 -1124
- package/src/@claude-flow/cli/dist/src/init/index.d.ts +1 -1
- package/src/@claude-flow/cli/dist/src/init/index.js +1 -1
- package/src/@claude-flow/cli/dist/src/init/moflo-init.js +78 -5
- package/src/@claude-flow/cli/dist/src/init/settings-generator.js +50 -120
- package/src/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +275 -32
- package/src/@claude-flow/cli/dist/src/plugins/store/discovery.js +4 -204
- package/src/@claude-flow/cli/dist/src/plugins/tests/standalone-test.js +4 -4
- package/src/@claude-flow/cli/dist/src/runtime/headless.d.ts +3 -3
- package/src/@claude-flow/cli/dist/src/runtime/headless.js +31 -31
- package/src/@claude-flow/cli/dist/src/services/agentic-flow-bridge.d.ts +3 -3
- package/src/@claude-flow/cli/dist/src/services/agentic-flow-bridge.js +3 -1
- package/src/@claude-flow/cli/dist/src/services/headless-worker-executor.js +14 -0
- package/src/@claude-flow/cli/dist/src/services/workflow-gate.js +21 -1
- package/src/@claude-flow/cli/dist/src/transfer/store/tests/standalone-test.js +4 -4
- package/src/@claude-flow/cli/package.json +1 -1
|
@@ -177,7 +177,7 @@ async function checkMcpServers() {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
return { name: 'MCP Servers', status: 'warn', message: 'No MCP config found', fix: 'claude mcp add claude-flow npx
|
|
180
|
+
return { name: 'MCP Servers', status: 'warn', message: 'No MCP config found', fix: 'claude mcp add claude-flow npx moflo mcp start' };
|
|
181
181
|
}
|
|
182
182
|
// Check disk space (async with proper env inheritance)
|
|
183
183
|
async function checkDiskSpace() {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Created with ❤️ by motailz.com
|
|
14
14
|
*/
|
|
15
15
|
import { output } from '../output.js';
|
|
16
|
-
// Dynamic imports for embeddings package
|
|
16
|
+
// Dynamic imports for embeddings package (optional — may not be installed)
|
|
17
17
|
async function getEmbeddings() {
|
|
18
18
|
try {
|
|
19
19
|
return await import('@claude-flow/embeddings');
|
|
@@ -893,8 +893,8 @@ const hyperbolicCommand = {
|
|
|
893
893
|
const result = Array.from(rawResult);
|
|
894
894
|
output.writeln(output.success('Euclidean → Poincaré conversion:'));
|
|
895
895
|
output.writeln();
|
|
896
|
-
output.writeln(`Input (Euclidean): [${vec.slice(0, 6).map(v => v.toFixed(4)).join(', ')}${vec.length > 6 ? ', ...' : ''}]`);
|
|
897
|
-
output.writeln(`Output (Poincaré): [${result.slice(0, 6).map(v => v.toFixed(4)).join(', ')}${result.length > 6 ? ', ...' : ''}]`);
|
|
896
|
+
output.writeln(`Input (Euclidean): [${vec.slice(0, 6).map((v) => v.toFixed(4)).join(', ')}${vec.length > 6 ? ', ...' : ''}]`);
|
|
897
|
+
output.writeln(`Output (Poincaré): [${result.slice(0, 6).map((v) => v.toFixed(4)).join(', ')}${result.length > 6 ? ', ...' : ''}]`);
|
|
898
898
|
output.writeln(`Curvature: ${curvature}`);
|
|
899
899
|
output.writeln(`Norm: ${Math.sqrt(result.reduce((s, v) => s + v * v, 0)).toFixed(6)} (must be < 1)`);
|
|
900
900
|
return { success: true, data: { result } };
|
|
@@ -924,7 +924,7 @@ const hyperbolicCommand = {
|
|
|
924
924
|
output.writeln(output.success('Hyperbolic centroid (Fréchet mean):'));
|
|
925
925
|
output.writeln();
|
|
926
926
|
output.writeln(`Input vectors: ${vectors.length}`);
|
|
927
|
-
output.writeln(`Centroid: [${centroid.slice(0, 6).map(v => v.toFixed(4)).join(', ')}${centroid.length > 6 ? ', ...' : ''}]`);
|
|
927
|
+
output.writeln(`Centroid: [${centroid.slice(0, 6).map((v) => v.toFixed(4)).join(', ')}${centroid.length > 6 ? ', ...' : ''}]`);
|
|
928
928
|
return { success: true, data: { centroid } };
|
|
929
929
|
}
|
|
930
930
|
default:
|
|
@@ -295,7 +295,7 @@ const initAction = async (ctx) => {
|
|
|
295
295
|
if (startAll) {
|
|
296
296
|
try {
|
|
297
297
|
output.writeln(output.dim(' Initializing memory database...'));
|
|
298
|
-
execSync('npx
|
|
298
|
+
execSync('npx moflo memory init 2>/dev/null', {
|
|
299
299
|
stdio: 'pipe',
|
|
300
300
|
cwd: ctx.cwd,
|
|
301
301
|
timeout: 30000,
|
|
@@ -311,7 +311,7 @@ const initAction = async (ctx) => {
|
|
|
311
311
|
if (startDaemon) {
|
|
312
312
|
try {
|
|
313
313
|
output.writeln(output.dim(' Starting daemon...'));
|
|
314
|
-
execSync('npx
|
|
314
|
+
execSync('npx moflo daemon start 2>/dev/null &', {
|
|
315
315
|
stdio: 'pipe',
|
|
316
316
|
cwd: ctx.cwd,
|
|
317
317
|
timeout: 10000,
|
|
@@ -327,7 +327,7 @@ const initAction = async (ctx) => {
|
|
|
327
327
|
if (startAll) {
|
|
328
328
|
try {
|
|
329
329
|
output.writeln(output.dim(' Initializing swarm...'));
|
|
330
|
-
execSync('npx
|
|
330
|
+
execSync('npx moflo swarm init --topology hierarchical 2>/dev/null', {
|
|
331
331
|
stdio: 'pipe',
|
|
332
332
|
cwd: ctx.cwd,
|
|
333
333
|
timeout: 30000,
|
|
@@ -339,6 +339,34 @@ const initAction = async (ctx) => {
|
|
|
339
339
|
output.writeln(output.dim(' Swarm initialization skipped'));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
+
// Run guidance + code-map indexing so memory is populated immediately
|
|
343
|
+
try {
|
|
344
|
+
output.writeln(output.dim(' Indexing guidance & code map...'));
|
|
345
|
+
execSync('flo-index 2>/dev/null', {
|
|
346
|
+
stdio: 'pipe',
|
|
347
|
+
cwd: ctx.cwd,
|
|
348
|
+
timeout: 60000,
|
|
349
|
+
windowsHide: true
|
|
350
|
+
});
|
|
351
|
+
output.writeln(output.success(' ✓ Guidance & code map indexed'));
|
|
352
|
+
}
|
|
353
|
+
catch {
|
|
354
|
+
output.writeln(output.dim(' Indexing skipped (run flo-index manually)'));
|
|
355
|
+
}
|
|
356
|
+
// Generate embeddings for indexed entries
|
|
357
|
+
try {
|
|
358
|
+
output.writeln(output.dim(' Building embeddings...'));
|
|
359
|
+
execSync('flo-embeddings 2>/dev/null', {
|
|
360
|
+
stdio: 'pipe',
|
|
361
|
+
cwd: ctx.cwd,
|
|
362
|
+
timeout: 120000,
|
|
363
|
+
windowsHide: true
|
|
364
|
+
});
|
|
365
|
+
output.writeln(output.success(' ✓ Embeddings built'));
|
|
366
|
+
}
|
|
367
|
+
catch {
|
|
368
|
+
output.writeln(output.dim(' Embedding generation skipped (run flo-embeddings manually)'));
|
|
369
|
+
}
|
|
342
370
|
output.writeln();
|
|
343
371
|
output.printSuccess('All services started');
|
|
344
372
|
}
|
|
@@ -352,7 +380,7 @@ const initAction = async (ctx) => {
|
|
|
352
380
|
try {
|
|
353
381
|
output.writeln(output.dim(` Model: ${embeddingModel}`));
|
|
354
382
|
output.writeln(output.dim(' Hyperbolic: Enabled (Poincaré ball)'));
|
|
355
|
-
execSync(`npx
|
|
383
|
+
execSync(`npx moflo embeddings init --model ${embeddingModel} --no-download --force 2>/dev/null`, {
|
|
356
384
|
stdio: 'pipe',
|
|
357
385
|
cwd: ctx.cwd,
|
|
358
386
|
timeout: 30000,
|
|
@@ -369,10 +397,9 @@ const initAction = async (ctx) => {
|
|
|
369
397
|
// Next steps (only if not auto-starting)
|
|
370
398
|
output.writeln(output.bold('Next steps:'));
|
|
371
399
|
output.printList([
|
|
400
|
+
`Restart Claude Code to activate hooks and index guidance/code (recommended)`,
|
|
401
|
+
`Or run ${output.highlight('claude-flow init --start-all')} to start services and index now`,
|
|
372
402
|
`Run ${output.highlight('claude-flow daemon start')} to start background workers`,
|
|
373
|
-
`Run ${output.highlight('claude-flow memory init')} to initialize memory database`,
|
|
374
|
-
`Run ${output.highlight('claude-flow swarm init')} to initialize a swarm`,
|
|
375
|
-
`Or use ${output.highlight('claude-flow init --start-all')} to do all of the above`,
|
|
376
403
|
options.components.settings ? `Review ${output.highlight('.claude/settings.json')} for hook configurations` : '',
|
|
377
404
|
].filter(Boolean));
|
|
378
405
|
}
|
|
@@ -578,7 +605,7 @@ const wizardCommand = {
|
|
|
578
605
|
output.printInfo('Initializing ONNX embedding subsystem...');
|
|
579
606
|
const { execSync } = await import('child_process');
|
|
580
607
|
try {
|
|
581
|
-
execSync(`npx
|
|
608
|
+
execSync(`npx moflo embeddings init --model ${embeddingModel} --no-download --force 2>/dev/null`, {
|
|
582
609
|
stdio: 'pipe',
|
|
583
610
|
cwd: ctx.cwd,
|
|
584
611
|
timeout: 30000,
|
|
@@ -437,8 +437,8 @@ const statusCommand = {
|
|
|
437
437
|
output.writeln(output.warning('No active swarm'));
|
|
438
438
|
output.writeln();
|
|
439
439
|
output.writeln(output.dim('Start a swarm with:'));
|
|
440
|
-
output.writeln(output.dim(' npx
|
|
441
|
-
output.writeln(output.dim(' npx
|
|
440
|
+
output.writeln(output.dim(' npx moflo swarm init'));
|
|
441
|
+
output.writeln(output.dim(' npx moflo swarm start'));
|
|
442
442
|
output.writeln();
|
|
443
443
|
return { success: true, data: status };
|
|
444
444
|
}
|