@sparkleideas/cli 3.1.0-alpha.21 → 3.1.0-alpha.22
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/dist/src/appliance/rvfa-builder.js +4 -4
- package/dist/src/appliance/rvfa-format.d.ts +1 -1
- package/dist/src/appliance/rvfa-format.js +1 -1
- package/dist/src/appliance/rvfa-runner.js +8 -8
- package/dist/src/commands/agent.js +15 -15
- package/dist/src/commands/analyze.js +52 -52
- package/dist/src/commands/appliance-advanced.js +1 -1
- package/dist/src/commands/appliance.js +16 -16
- package/dist/src/commands/benchmark.js +14 -14
- package/dist/src/commands/categories.js +1 -1
- package/dist/src/commands/claims.js +16 -16
- package/dist/src/commands/completions.js +37 -37
- package/dist/src/commands/config.js +9 -9
- package/dist/src/commands/daemon.js +21 -21
- package/dist/src/commands/deployment.js +15 -15
- package/dist/src/commands/doctor.js +26 -26
- package/dist/src/commands/embeddings.js +48 -48
- package/dist/src/commands/guidance.js +22 -22
- package/dist/src/commands/hive-mind.js +21 -21
- package/dist/src/commands/hooks.js +105 -105
- package/dist/src/commands/init.js +32 -32
- package/dist/src/commands/issues.js +6 -6
- package/dist/src/commands/mcp.js +13 -13
- package/dist/src/commands/memory.js +35 -35
- package/dist/src/commands/migrate.js +6 -6
- package/dist/src/commands/neural.js +31 -31
- package/dist/src/commands/performance.js +13 -13
- package/dist/src/commands/plugins.js +26 -26
- package/dist/src/commands/process.js +32 -32
- package/dist/src/commands/progress.js +5 -5
- package/dist/src/commands/providers.js +13 -13
- package/dist/src/commands/route.js +26 -26
- package/dist/src/commands/ruvector/backup.js +9 -9
- package/dist/src/commands/ruvector/benchmark.js +4 -4
- package/dist/src/commands/ruvector/import.d.ts +3 -3
- package/dist/src/commands/ruvector/import.js +11 -11
- package/dist/src/commands/ruvector/index.js +9 -9
- package/dist/src/commands/ruvector/init.js +7 -7
- package/dist/src/commands/ruvector/migrate.js +5 -5
- package/dist/src/commands/ruvector/optimize.js +7 -7
- package/dist/src/commands/ruvector/setup.d.ts +3 -3
- package/dist/src/commands/ruvector/setup.js +9 -9
- package/dist/src/commands/ruvector/status.js +4 -4
- package/dist/src/commands/security.js +19 -19
- package/dist/src/commands/session.js +13 -13
- package/dist/src/commands/start.js +13 -13
- package/dist/src/commands/status.js +9 -9
- package/dist/src/commands/swarm.js +7 -7
- package/dist/src/commands/task.js +9 -9
- package/dist/src/commands/transfer-store.js +16 -16
- package/dist/src/commands/update.js +2 -2
- package/dist/src/commands/workflow.js +13 -13
- package/dist/src/config-adapter.js +3 -3
- package/dist/src/index.js +1 -1
- package/dist/src/init/claudemd-generator.js +1 -1
- package/dist/src/init/executor.js +6 -6
- package/dist/src/init/helpers-generator.js +4 -4
- package/dist/src/init/mcp-generator.js +6 -6
- package/dist/src/init/settings-generator.js +4 -4
- package/dist/src/init/statusline-generator.js +12 -12
- package/dist/src/init/types.d.ts +4 -4
- package/dist/src/init/types.js +3 -3
- package/dist/src/mcp-server.js +2 -2
- package/dist/src/mcp-tools/auto-install.js +5 -5
- package/dist/src/mcp-tools/hooks-tools.js +1 -1
- package/dist/src/mcp-tools/neural-tools.js +6 -6
- package/dist/src/mcp-tools/security-tools.js +2 -2
- package/dist/src/memory/memory-bridge.d.ts +4 -4
- package/dist/src/memory/memory-bridge.js +15 -15
- package/dist/src/memory/memory-initializer.js +10 -10
- package/dist/src/plugins/manager.js +8 -8
- package/dist/src/plugins/tests/demo-plugin-store.js +6 -6
- package/dist/src/ruvector/enhanced-model-router.js +3 -3
- package/dist/src/services/agentic-flow-bridge.d.ts +11 -11
- package/dist/src/services/agentic-flow-bridge.js +11 -11
- package/dist/src/services/container-worker-pool.js +2 -2
- package/dist/src/services/worker-queue.js +1 -1
- package/dist/src/suggest.js +1 -1
- package/dist/src/transfer/models/seraphine.js +1 -1
- package/dist/src/transfer/serialization/cfp.js +1 -1
- package/dist/src/transfer/store/discovery.js +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/update/validator.js +1 -1
- package/package.json +1 -1
|
@@ -49,8 +49,8 @@ const preEditCommand = {
|
|
|
49
49
|
}
|
|
50
50
|
],
|
|
51
51
|
examples: [
|
|
52
|
-
{ command: '
|
|
53
|
-
{ command: '
|
|
52
|
+
{ command: 'claude-flow hooks pre-edit -f src/utils.ts', description: 'Get context before editing' },
|
|
53
|
+
{ command: 'claude-flow hooks pre-edit -f src/api.ts -o refactor', description: 'Pre-edit with operation type' }
|
|
54
54
|
],
|
|
55
55
|
action: async (ctx) => {
|
|
56
56
|
// Default file to 'unknown' for backward compatibility (env var may be empty)
|
|
@@ -154,8 +154,8 @@ const postEditCommand = {
|
|
|
154
154
|
}
|
|
155
155
|
],
|
|
156
156
|
examples: [
|
|
157
|
-
{ command: '
|
|
158
|
-
{ command: '
|
|
157
|
+
{ command: 'claude-flow hooks post-edit -f src/utils.ts --success true', description: 'Record successful edit' },
|
|
158
|
+
{ command: 'claude-flow hooks post-edit -f src/api.ts --success false -o "Type error"', description: 'Record failed edit' }
|
|
159
159
|
],
|
|
160
160
|
action: async (ctx) => {
|
|
161
161
|
// Default file to 'unknown' for backward compatibility (env var may be empty)
|
|
@@ -238,8 +238,8 @@ const preCommandCommand = {
|
|
|
238
238
|
}
|
|
239
239
|
],
|
|
240
240
|
examples: [
|
|
241
|
-
{ command: '
|
|
242
|
-
{ command: '
|
|
241
|
+
{ command: 'claude-flow hooks pre-command -c "rm -rf dist"', description: 'Assess command risk' },
|
|
242
|
+
{ command: 'claude-flow hooks pre-command -c "npm install lodash"', description: 'Check package install' }
|
|
243
243
|
],
|
|
244
244
|
action: async (ctx) => {
|
|
245
245
|
const command = ctx.args[0] || ctx.flags.command;
|
|
@@ -347,8 +347,8 @@ const postCommandCommand = {
|
|
|
347
347
|
}
|
|
348
348
|
],
|
|
349
349
|
examples: [
|
|
350
|
-
{ command: '
|
|
351
|
-
{ command: '
|
|
350
|
+
{ command: 'claude-flow hooks post-command -c "npm test" --success true', description: 'Record successful test run' },
|
|
351
|
+
{ command: 'claude-flow hooks post-command -c "npm build" --success false -e 1', description: 'Record failed build' }
|
|
352
352
|
],
|
|
353
353
|
action: async (ctx) => {
|
|
354
354
|
const command = ctx.args[0] || ctx.flags.command;
|
|
@@ -419,8 +419,8 @@ const routeCommand = {
|
|
|
419
419
|
}
|
|
420
420
|
],
|
|
421
421
|
examples: [
|
|
422
|
-
{ command: '
|
|
423
|
-
{ command: '
|
|
422
|
+
{ command: 'claude-flow hooks route -t "Fix authentication bug"', description: 'Route task to optimal agent' },
|
|
423
|
+
{ command: 'claude-flow hooks route -t "Optimize database queries" -K 5', description: 'Get top 5 suggestions' }
|
|
424
424
|
],
|
|
425
425
|
action: async (ctx) => {
|
|
426
426
|
const task = ctx.args[0] || ctx.flags.task;
|
|
@@ -531,8 +531,8 @@ const explainCommand = {
|
|
|
531
531
|
}
|
|
532
532
|
],
|
|
533
533
|
examples: [
|
|
534
|
-
{ command: '
|
|
535
|
-
{ command: '
|
|
534
|
+
{ command: 'claude-flow hooks explain -t "Fix authentication bug"', description: 'Explain routing decision' },
|
|
535
|
+
{ command: 'claude-flow hooks explain -t "Optimize queries" -a coder --verbose', description: 'Verbose explanation for specific agent' }
|
|
536
536
|
],
|
|
537
537
|
action: async (ctx) => {
|
|
538
538
|
const task = ctx.args[0] || ctx.flags.task;
|
|
@@ -650,10 +650,10 @@ const pretrainCommand = {
|
|
|
650
650
|
}
|
|
651
651
|
],
|
|
652
652
|
examples: [
|
|
653
|
-
{ command: '
|
|
654
|
-
{ command: '
|
|
655
|
-
{ command: '
|
|
656
|
-
{ command: '
|
|
653
|
+
{ command: 'claude-flow hooks pretrain', description: 'Pretrain with embeddings indexing' },
|
|
654
|
+
{ command: 'claude-flow hooks pretrain -p ../my-project --depth deep', description: 'Deep analysis of specific project' },
|
|
655
|
+
{ command: 'claude-flow hooks pretrain --no-with-embeddings', description: 'Skip embedding indexing' },
|
|
656
|
+
{ command: 'claude-flow hooks pretrain --file-types ts,tsx,js', description: 'Index only TypeScript/JS files' }
|
|
657
657
|
],
|
|
658
658
|
action: async (ctx) => {
|
|
659
659
|
const repoPath = ctx.flags.path || '.';
|
|
@@ -722,7 +722,7 @@ const pretrainCommand = {
|
|
|
722
722
|
if (withEmbeddings) {
|
|
723
723
|
output.writeln(output.dim(' Semantic search enabled: Use "embeddings search -q <query>" to search'));
|
|
724
724
|
}
|
|
725
|
-
output.writeln(output.dim(' Next step: Run "
|
|
725
|
+
output.writeln(output.dim(' Next step: Run "claude-flow hooks build-agents" to generate optimized configs'));
|
|
726
726
|
return { success: true, data: result };
|
|
727
727
|
}
|
|
728
728
|
catch (error) {
|
|
@@ -765,8 +765,8 @@ const buildAgentsCommand = {
|
|
|
765
765
|
}
|
|
766
766
|
],
|
|
767
767
|
examples: [
|
|
768
|
-
{ command: '
|
|
769
|
-
{ command: '
|
|
768
|
+
{ command: 'claude-flow hooks build-agents', description: 'Build all agent configs' },
|
|
769
|
+
{ command: 'claude-flow hooks build-agents --focus security -o ./config/agents', description: 'Build security-focused configs' }
|
|
770
770
|
],
|
|
771
771
|
action: async (ctx) => {
|
|
772
772
|
const output_dir = ctx.flags.output || './agents';
|
|
@@ -852,8 +852,8 @@ const metricsCommand = {
|
|
|
852
852
|
}
|
|
853
853
|
],
|
|
854
854
|
examples: [
|
|
855
|
-
{ command: '
|
|
856
|
-
{ command: '
|
|
855
|
+
{ command: 'claude-flow hooks metrics', description: 'View 24h metrics' },
|
|
856
|
+
{ command: 'claude-flow hooks metrics --period 7d --v3-dashboard', description: 'V3 metrics for 7 days' }
|
|
857
857
|
],
|
|
858
858
|
action: async (ctx) => {
|
|
859
859
|
const period = ctx.flags.period || '24h';
|
|
@@ -968,8 +968,8 @@ const transferFromProjectCommand = {
|
|
|
968
968
|
}
|
|
969
969
|
],
|
|
970
970
|
examples: [
|
|
971
|
-
{ command: '
|
|
972
|
-
{ command: '
|
|
971
|
+
{ command: 'claude-flow hooks transfer from-project -s ../old-project', description: 'Transfer all patterns' },
|
|
972
|
+
{ command: 'claude-flow hooks transfer from-project -s ../prod --filter security -m 0.9', description: 'Transfer high-confidence security patterns' }
|
|
973
973
|
],
|
|
974
974
|
action: async (ctx) => {
|
|
975
975
|
const sourcePath = ctx.args[0] || ctx.flags.source;
|
|
@@ -1044,11 +1044,11 @@ const transferCommand = {
|
|
|
1044
1044
|
description: 'Transfer patterns and plugins via IPFS-based decentralized registry',
|
|
1045
1045
|
subcommands: [storeCommand, transferFromProjectCommand],
|
|
1046
1046
|
examples: [
|
|
1047
|
-
{ command: '
|
|
1048
|
-
{ command: '
|
|
1049
|
-
{ command: '
|
|
1050
|
-
{ command: '
|
|
1051
|
-
{ command: '
|
|
1047
|
+
{ command: 'claude-flow hooks transfer store list', description: 'List patterns from registry' },
|
|
1048
|
+
{ command: 'claude-flow hooks transfer store search -q routing', description: 'Search patterns' },
|
|
1049
|
+
{ command: 'claude-flow hooks transfer store download -p seraphine-genesis', description: 'Download pattern' },
|
|
1050
|
+
{ command: 'claude-flow hooks transfer store publish', description: 'Publish pattern to registry' },
|
|
1051
|
+
{ command: 'claude-flow hooks transfer from-project -s ../other-project', description: 'Transfer from project' },
|
|
1052
1052
|
],
|
|
1053
1053
|
action: async () => {
|
|
1054
1054
|
output.writeln();
|
|
@@ -1070,7 +1070,7 @@ const transferCommand = {
|
|
|
1070
1070
|
'Trust levels: unverified, community, verified, official',
|
|
1071
1071
|
]);
|
|
1072
1072
|
output.writeln();
|
|
1073
|
-
output.writeln('Run "
|
|
1073
|
+
output.writeln('Run "claude-flow hooks transfer <subcommand> --help" for details');
|
|
1074
1074
|
return { success: true };
|
|
1075
1075
|
}
|
|
1076
1076
|
};
|
|
@@ -1166,8 +1166,8 @@ const preTaskCommand = {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
],
|
|
1168
1168
|
examples: [
|
|
1169
|
-
{ command: '
|
|
1170
|
-
{ command: '
|
|
1169
|
+
{ command: 'claude-flow hooks pre-task -i task-123 -d "Fix auth bug"', description: 'Record task start' },
|
|
1170
|
+
{ command: 'claude-flow hooks pre-task -i task-456 -d "Implement feature" --auto-spawn', description: 'With auto-spawn' }
|
|
1171
1171
|
],
|
|
1172
1172
|
action: async (ctx) => {
|
|
1173
1173
|
const taskId = ctx.flags.taskId;
|
|
@@ -1310,8 +1310,8 @@ const postTaskCommand = {
|
|
|
1310
1310
|
}
|
|
1311
1311
|
],
|
|
1312
1312
|
examples: [
|
|
1313
|
-
{ command: '
|
|
1314
|
-
{ command: '
|
|
1313
|
+
{ command: 'claude-flow hooks post-task -i task-123 --success true', description: 'Record successful completion' },
|
|
1314
|
+
{ command: 'claude-flow hooks post-task -i task-456 --success false -q 0.3', description: 'Record failed task' }
|
|
1315
1315
|
],
|
|
1316
1316
|
action: async (ctx) => {
|
|
1317
1317
|
// Auto-generate task ID if not provided
|
|
@@ -1374,8 +1374,8 @@ const sessionEndCommand = {
|
|
|
1374
1374
|
}
|
|
1375
1375
|
],
|
|
1376
1376
|
examples: [
|
|
1377
|
-
{ command: '
|
|
1378
|
-
{ command: '
|
|
1377
|
+
{ command: 'claude-flow hooks session-end', description: 'End and save session' },
|
|
1378
|
+
{ command: 'claude-flow hooks session-end --save-state false', description: 'End without saving' }
|
|
1379
1379
|
],
|
|
1380
1380
|
action: async (ctx) => {
|
|
1381
1381
|
output.printInfo('Ending session...');
|
|
@@ -1452,8 +1452,8 @@ const sessionRestoreCommand = {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
],
|
|
1454
1454
|
examples: [
|
|
1455
|
-
{ command: '
|
|
1456
|
-
{ command: '
|
|
1455
|
+
{ command: 'claude-flow hooks session-restore', description: 'Restore latest session' },
|
|
1456
|
+
{ command: 'claude-flow hooks session-restore -i session-12345', description: 'Restore specific session' }
|
|
1457
1457
|
],
|
|
1458
1458
|
action: async (ctx) => {
|
|
1459
1459
|
const sessionId = ctx.args[0] || ctx.flags.sessionId || 'latest';
|
|
@@ -1564,9 +1564,9 @@ const intelligenceCommand = {
|
|
|
1564
1564
|
}
|
|
1565
1565
|
],
|
|
1566
1566
|
examples: [
|
|
1567
|
-
{ command: '
|
|
1568
|
-
{ command: '
|
|
1569
|
-
{ command: '
|
|
1567
|
+
{ command: 'claude-flow hooks intelligence --status', description: 'Show intelligence status' },
|
|
1568
|
+
{ command: 'claude-flow hooks intelligence -m real-time', description: 'Enable real-time mode' },
|
|
1569
|
+
{ command: 'claude-flow hooks intelligence --train', description: 'Force training cycle' }
|
|
1570
1570
|
],
|
|
1571
1571
|
action: async (ctx) => {
|
|
1572
1572
|
const mode = ctx.flags.mode || 'balanced';
|
|
@@ -1773,8 +1773,8 @@ const workerListCommand = {
|
|
|
1773
1773
|
{ name: 'active', short: 'a', type: 'boolean', description: 'Show active worker instances' },
|
|
1774
1774
|
],
|
|
1775
1775
|
examples: [
|
|
1776
|
-
{ command: '
|
|
1777
|
-
{ command: '
|
|
1776
|
+
{ command: 'claude-flow hooks worker list', description: 'List all workers' },
|
|
1777
|
+
{ command: 'claude-flow hooks worker list --active', description: 'Show active instances' },
|
|
1778
1778
|
],
|
|
1779
1779
|
action: async (ctx) => {
|
|
1780
1780
|
const spinner = output.createSpinner({ text: 'Loading workers...', spinner: 'dots' });
|
|
@@ -1850,9 +1850,9 @@ const workerDispatchCommand = {
|
|
|
1850
1850
|
{ name: 'sync', short: 's', type: 'boolean', description: 'Wait for completion (synchronous)' },
|
|
1851
1851
|
],
|
|
1852
1852
|
examples: [
|
|
1853
|
-
{ command: '
|
|
1854
|
-
{ command: '
|
|
1855
|
-
{ command: '
|
|
1853
|
+
{ command: 'claude-flow hooks worker dispatch -t optimize -c src/', description: 'Dispatch optimize worker' },
|
|
1854
|
+
{ command: 'claude-flow hooks worker dispatch -t audit -p critical', description: 'Security audit with critical priority' },
|
|
1855
|
+
{ command: 'claude-flow hooks worker dispatch -t testgaps --sync', description: 'Test coverage analysis (sync)' },
|
|
1856
1856
|
],
|
|
1857
1857
|
action: async (ctx) => {
|
|
1858
1858
|
const trigger = ctx.flags['trigger'];
|
|
@@ -1897,7 +1897,7 @@ const workerDispatchCommand = {
|
|
|
1897
1897
|
});
|
|
1898
1898
|
if (background) {
|
|
1899
1899
|
output.writeln();
|
|
1900
|
-
output.writeln(output.dim(`Check status:
|
|
1900
|
+
output.writeln(output.dim(`Check status: claude-flow hooks worker status --id ${result.workerId}`));
|
|
1901
1901
|
}
|
|
1902
1902
|
return { success: true, data: result };
|
|
1903
1903
|
}
|
|
@@ -1918,9 +1918,9 @@ const workerStatusCommand = {
|
|
|
1918
1918
|
{ name: 'all', short: 'a', type: 'boolean', description: 'Include completed workers' },
|
|
1919
1919
|
],
|
|
1920
1920
|
examples: [
|
|
1921
|
-
{ command: '
|
|
1922
|
-
{ command: '
|
|
1923
|
-
{ command: '
|
|
1921
|
+
{ command: 'claude-flow hooks worker status', description: 'Show running workers' },
|
|
1922
|
+
{ command: 'claude-flow hooks worker status --id worker_audit_1', description: 'Check specific worker' },
|
|
1923
|
+
{ command: 'claude-flow hooks worker status --all', description: 'Include completed workers' },
|
|
1924
1924
|
],
|
|
1925
1925
|
action: async (ctx) => {
|
|
1926
1926
|
const workerId = ctx.flags['id'];
|
|
@@ -2003,8 +2003,8 @@ const workerDetectCommand = {
|
|
|
2003
2003
|
{ name: 'min-confidence', short: 'm', type: 'string', description: 'Minimum confidence threshold (0-1)' },
|
|
2004
2004
|
],
|
|
2005
2005
|
examples: [
|
|
2006
|
-
{ command: '
|
|
2007
|
-
{ command: '
|
|
2006
|
+
{ command: 'claude-flow hooks worker detect -p "optimize performance"', description: 'Detect triggers in prompt' },
|
|
2007
|
+
{ command: 'claude-flow hooks worker detect -p "security audit" --auto-dispatch', description: 'Detect and dispatch' },
|
|
2008
2008
|
],
|
|
2009
2009
|
action: async (ctx) => {
|
|
2010
2010
|
const prompt = ctx.flags['prompt'];
|
|
@@ -2072,7 +2072,7 @@ const workerCancelCommand = {
|
|
|
2072
2072
|
{ name: 'id', type: 'string', description: 'Worker ID to cancel', required: true },
|
|
2073
2073
|
],
|
|
2074
2074
|
examples: [
|
|
2075
|
-
{ command: '
|
|
2075
|
+
{ command: 'claude-flow hooks worker cancel --id worker_audit_1', description: 'Cancel specific worker' },
|
|
2076
2076
|
],
|
|
2077
2077
|
action: async (ctx) => {
|
|
2078
2078
|
const workerId = ctx.flags['id'];
|
|
@@ -2143,8 +2143,8 @@ const coverageRouteCommand = {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
],
|
|
2145
2145
|
examples: [
|
|
2146
|
-
{ command: '
|
|
2147
|
-
{ command: '
|
|
2146
|
+
{ command: 'claude-flow hooks coverage-route -t "fix bug in auth"', description: 'Route with coverage awareness' },
|
|
2147
|
+
{ command: 'claude-flow hooks coverage-route -t "add tests" --threshold 90', description: 'Route with custom threshold' }
|
|
2148
2148
|
],
|
|
2149
2149
|
action: async (ctx) => {
|
|
2150
2150
|
const task = ctx.args[0] || ctx.flags.task;
|
|
@@ -2246,8 +2246,8 @@ const coverageSuggestCommand = {
|
|
|
2246
2246
|
}
|
|
2247
2247
|
],
|
|
2248
2248
|
examples: [
|
|
2249
|
-
{ command: '
|
|
2250
|
-
{ command: '
|
|
2249
|
+
{ command: 'claude-flow hooks coverage-suggest -p src/', description: 'Suggest improvements for src/' },
|
|
2250
|
+
{ command: 'claude-flow hooks coverage-suggest -p src/services --threshold 90', description: 'Stricter threshold' }
|
|
2251
2251
|
],
|
|
2252
2252
|
action: async (ctx) => {
|
|
2253
2253
|
const path = ctx.args[0] || ctx.flags.path;
|
|
@@ -2343,9 +2343,9 @@ const coverageGapsCommand = {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
],
|
|
2345
2345
|
examples: [
|
|
2346
|
-
{ command: '
|
|
2347
|
-
{ command: '
|
|
2348
|
-
{ command: '
|
|
2346
|
+
{ command: 'claude-flow hooks coverage-gaps', description: 'List all coverage gaps' },
|
|
2347
|
+
{ command: 'claude-flow hooks coverage-gaps --critical-only', description: 'Only critical gaps' },
|
|
2348
|
+
{ command: 'claude-flow hooks coverage-gaps --threshold 90', description: 'Stricter threshold' }
|
|
2349
2349
|
],
|
|
2350
2350
|
action: async (ctx) => {
|
|
2351
2351
|
const threshold = ctx.flags.threshold || 80;
|
|
@@ -2458,10 +2458,10 @@ const progressHookCommand = {
|
|
|
2458
2458
|
}
|
|
2459
2459
|
],
|
|
2460
2460
|
examples: [
|
|
2461
|
-
{ command: '
|
|
2462
|
-
{ command: '
|
|
2463
|
-
{ command: '
|
|
2464
|
-
{ command: '
|
|
2461
|
+
{ command: 'claude-flow hooks progress', description: 'Check current progress' },
|
|
2462
|
+
{ command: 'claude-flow hooks progress -d', description: 'Detailed breakdown' },
|
|
2463
|
+
{ command: 'claude-flow hooks progress --sync', description: 'Sync progress to file' },
|
|
2464
|
+
{ command: 'claude-flow hooks progress --summary', description: 'Human-readable summary' }
|
|
2465
2465
|
],
|
|
2466
2466
|
action: async (ctx) => {
|
|
2467
2467
|
const detailed = ctx.flags.detailed;
|
|
@@ -2562,9 +2562,9 @@ const workerCommand = {
|
|
|
2562
2562
|
],
|
|
2563
2563
|
options: [],
|
|
2564
2564
|
examples: [
|
|
2565
|
-
{ command: '
|
|
2566
|
-
{ command: '
|
|
2567
|
-
{ command: '
|
|
2565
|
+
{ command: 'claude-flow hooks worker list', description: 'List all workers' },
|
|
2566
|
+
{ command: 'claude-flow hooks worker dispatch -t optimize', description: 'Dispatch optimizer' },
|
|
2567
|
+
{ command: 'claude-flow hooks worker detect -p "test coverage"', description: 'Detect from prompt' },
|
|
2568
2568
|
],
|
|
2569
2569
|
action: async () => {
|
|
2570
2570
|
output.writeln();
|
|
@@ -2597,7 +2597,7 @@ const workerCommand = {
|
|
|
2597
2597
|
`${output.highlight('cancel')} - Cancel a running worker`,
|
|
2598
2598
|
]);
|
|
2599
2599
|
output.writeln();
|
|
2600
|
-
output.writeln('Run "
|
|
2600
|
+
output.writeln('Run "claude-flow hooks worker <subcommand> --help" for details');
|
|
2601
2601
|
return { success: true };
|
|
2602
2602
|
}
|
|
2603
2603
|
};
|
|
@@ -2626,9 +2626,9 @@ const statuslineCommand = {
|
|
|
2626
2626
|
}
|
|
2627
2627
|
],
|
|
2628
2628
|
examples: [
|
|
2629
|
-
{ command: '
|
|
2630
|
-
{ command: '
|
|
2631
|
-
{ command: '
|
|
2629
|
+
{ command: 'claude-flow hooks statusline', description: 'Display full statusline' },
|
|
2630
|
+
{ command: 'claude-flow hooks statusline --json', description: 'JSON output for hooks' },
|
|
2631
|
+
{ command: 'claude-flow hooks statusline --compact', description: 'Single-line status' }
|
|
2632
2632
|
],
|
|
2633
2633
|
action: async (ctx) => {
|
|
2634
2634
|
const fs = await import('fs');
|
|
@@ -2724,7 +2724,7 @@ const statuslineCommand = {
|
|
|
2724
2724
|
try {
|
|
2725
2725
|
const psCmd = isWindows
|
|
2726
2726
|
? 'tasklist /FI "IMAGENAME eq node.exe" 2>NUL | findstr /I /C:"node" >NUL && echo 1 || echo 0'
|
|
2727
|
-
: 'ps aux 2>/dev/null | grep -c
|
|
2727
|
+
: 'ps aux 2>/dev/null | grep -c agentic-flow || echo "0"';
|
|
2728
2728
|
const ps = execSync(psCmd, { encoding: 'utf-8' });
|
|
2729
2729
|
activeAgents = Math.max(0, parseInt(ps.trim()) - 1);
|
|
2730
2730
|
coordinationActive = activeAgents > 0;
|
|
@@ -2781,7 +2781,7 @@ const statuslineCommand = {
|
|
|
2781
2781
|
maturityScore += 15;
|
|
2782
2782
|
if (fs.existsSync(path.join(process.cwd(), 'CLAUDE.md')))
|
|
2783
2783
|
maturityScore += 10;
|
|
2784
|
-
if (fs.existsSync(path.join(process.cwd(), '
|
|
2784
|
+
if (fs.existsSync(path.join(process.cwd(), 'claude-flow.config.json')))
|
|
2785
2785
|
maturityScore += 10;
|
|
2786
2786
|
if (fs.existsSync(path.join(process.cwd(), '.swarm')))
|
|
2787
2787
|
maturityScore += 10;
|
|
@@ -2898,7 +2898,7 @@ const statuslineCommand = {
|
|
|
2898
2898
|
path.join(process.cwd(), 'data', 'memory.db'),
|
|
2899
2899
|
path.join(process.cwd(), 'memory.db'),
|
|
2900
2900
|
path.join(process.cwd(), '.agentdb', 'memory.db'),
|
|
2901
|
-
path.join(process.cwd(), '.claude-flow', 'memory', '
|
|
2901
|
+
path.join(process.cwd(), '.claude-flow', 'memory', 'agentdb.db'),
|
|
2902
2902
|
];
|
|
2903
2903
|
for (const dbPath of dbPaths) {
|
|
2904
2904
|
if (fs.existsSync(dbPath)) {
|
|
@@ -2915,9 +2915,9 @@ const statuslineCommand = {
|
|
|
2915
2915
|
// Check for AgentDB directories if no direct db found
|
|
2916
2916
|
if (agentdbStats.vectorCount === 0) {
|
|
2917
2917
|
const agentdbDirs = [
|
|
2918
|
-
path.join(process.cwd(), '.claude-flow', '
|
|
2919
|
-
path.join(process.cwd(), '.swarm', '
|
|
2920
|
-
path.join(process.cwd(), 'data', '
|
|
2918
|
+
path.join(process.cwd(), '.claude-flow', 'agentdb'),
|
|
2919
|
+
path.join(process.cwd(), '.swarm', 'agentdb'),
|
|
2920
|
+
path.join(process.cwd(), 'data', 'agentdb'),
|
|
2921
2921
|
path.join(process.cwd(), '.agentdb'),
|
|
2922
2922
|
];
|
|
2923
2923
|
for (const dir of agentdbDirs) {
|
|
@@ -3059,7 +3059,7 @@ const routeTaskCommand = {
|
|
|
3059
3059
|
description: '(DEPRECATED: Use "route" instead) Route task to optimal agent',
|
|
3060
3060
|
options: routeCommand.options,
|
|
3061
3061
|
examples: [
|
|
3062
|
-
{ command: '
|
|
3062
|
+
{ command: 'claude-flow hooks route-task --auto-swarm true', description: 'Route with auto-swarm (v2 compat)' },
|
|
3063
3063
|
],
|
|
3064
3064
|
action: async (ctx) => {
|
|
3065
3065
|
// Silently handle v2-specific flags that don't exist in v3
|
|
@@ -3091,7 +3091,7 @@ const sessionStartCommand = {
|
|
|
3091
3091
|
}
|
|
3092
3092
|
],
|
|
3093
3093
|
examples: [
|
|
3094
|
-
{ command: '
|
|
3094
|
+
{ command: 'claude-flow hooks session-start --auto-configure true', description: 'Start session (v2 compat)' },
|
|
3095
3095
|
],
|
|
3096
3096
|
action: async (ctx) => {
|
|
3097
3097
|
// Map to session-restore for backward compatibility
|
|
@@ -3118,10 +3118,10 @@ const postBashCommand = {
|
|
|
3118
3118
|
examples: postCommandCommand.examples,
|
|
3119
3119
|
action: postCommandCommand.action
|
|
3120
3120
|
};
|
|
3121
|
-
// Token Optimizer command - integrates
|
|
3121
|
+
// Token Optimizer command - integrates agentic-flow Agent Booster
|
|
3122
3122
|
const tokenOptimizeCommand = {
|
|
3123
3123
|
name: 'token-optimize',
|
|
3124
|
-
description: 'Token optimization via
|
|
3124
|
+
description: 'Token optimization via agentic-flow Agent Booster (30-50% savings)',
|
|
3125
3125
|
options: [
|
|
3126
3126
|
{ name: 'query', short: 'q', type: 'string', description: 'Query for compact context retrieval' },
|
|
3127
3127
|
{ name: 'agents', short: 'A', type: 'number', description: 'Agent count for optimal config', default: '6' },
|
|
@@ -3129,16 +3129,16 @@ const tokenOptimizeCommand = {
|
|
|
3129
3129
|
{ name: 'stats', short: 's', type: 'boolean', description: 'Show token savings statistics' },
|
|
3130
3130
|
],
|
|
3131
3131
|
examples: [
|
|
3132
|
-
{ command: '
|
|
3133
|
-
{ command: '
|
|
3134
|
-
{ command: '
|
|
3132
|
+
{ command: 'claude-flow hooks token-optimize --stats', description: 'Show token savings stats' },
|
|
3133
|
+
{ command: 'claude-flow hooks token-optimize -q "auth patterns"', description: 'Get compact context' },
|
|
3134
|
+
{ command: 'claude-flow hooks token-optimize -A 8 --report', description: 'Config for 8 agents + report' },
|
|
3135
3135
|
],
|
|
3136
3136
|
action: async (ctx) => {
|
|
3137
3137
|
const query = ctx.flags['query'];
|
|
3138
3138
|
const agentCount = parseInt(ctx.flags['agents'] || '6', 10);
|
|
3139
3139
|
const showReport = ctx.flags['report'];
|
|
3140
3140
|
const showStats = ctx.flags['stats'];
|
|
3141
|
-
const spinner = output.createSpinner({ text: 'Checking
|
|
3141
|
+
const spinner = output.createSpinner({ text: 'Checking agentic-flow integration...', spinner: 'dots' });
|
|
3142
3142
|
spinner.start();
|
|
3143
3143
|
// Inline TokenOptimizer (self-contained, no external imports)
|
|
3144
3144
|
const stats = {
|
|
@@ -3152,8 +3152,8 @@ const tokenOptimizeCommand = {
|
|
|
3152
3152
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3153
3153
|
let reasoningBank = null;
|
|
3154
3154
|
try {
|
|
3155
|
-
// Check if
|
|
3156
|
-
const rb = await import('
|
|
3155
|
+
// Check if agentic-flow v3 is available
|
|
3156
|
+
const rb = await import('agentic-flow/reasoningbank').catch(() => null);
|
|
3157
3157
|
if (rb) {
|
|
3158
3158
|
agenticFlowAvailable = true;
|
|
3159
3159
|
if (typeof rb.retrieveMemories === 'function') {
|
|
@@ -3161,12 +3161,12 @@ const tokenOptimizeCommand = {
|
|
|
3161
3161
|
}
|
|
3162
3162
|
}
|
|
3163
3163
|
else {
|
|
3164
|
-
// Legacy check for older
|
|
3165
|
-
const af = await import('
|
|
3164
|
+
// Legacy check for older agentic-flow
|
|
3165
|
+
const af = await import('agentic-flow').catch(() => null);
|
|
3166
3166
|
if (af)
|
|
3167
3167
|
agenticFlowAvailable = true;
|
|
3168
3168
|
}
|
|
3169
|
-
const versionLabel = agenticFlowAvailable ?
|
|
3169
|
+
const versionLabel = agenticFlowAvailable ? `agentic-flow v3 detected (ReasoningBank: ${reasoningBank ? 'active' : 'unavailable'})` : 'agentic-flow not available (using fallbacks)';
|
|
3170
3170
|
spinner.succeed(versionLabel);
|
|
3171
3171
|
output.writeln();
|
|
3172
3172
|
// Anti-drift config (hardcoded optimal values from research)
|
|
@@ -3273,8 +3273,8 @@ const modelRouteCommand = {
|
|
|
3273
3273
|
{ name: 'prefer-quality', type: 'boolean', description: 'Prefer higher quality models' },
|
|
3274
3274
|
],
|
|
3275
3275
|
examples: [
|
|
3276
|
-
{ command: '
|
|
3277
|
-
{ command: '
|
|
3276
|
+
{ command: 'claude-flow hooks model-route -t "fix typo"', description: 'Route simple task (likely haiku)' },
|
|
3277
|
+
{ command: 'claude-flow hooks model-route -t "architect auth system"', description: 'Route complex task (likely opus)' },
|
|
3278
3278
|
],
|
|
3279
3279
|
action: async (ctx) => {
|
|
3280
3280
|
const task = ctx.args[0] || ctx.flags.task;
|
|
@@ -3348,8 +3348,8 @@ const modelOutcomeCommand = {
|
|
|
3348
3348
|
{ name: 'quality', short: 'q', type: 'number', description: 'Quality score 0-1' },
|
|
3349
3349
|
],
|
|
3350
3350
|
examples: [
|
|
3351
|
-
{ command: '
|
|
3352
|
-
{ command: '
|
|
3351
|
+
{ command: 'claude-flow hooks model-outcome -t "fix typo" -m haiku -o success', description: 'Record successful haiku task' },
|
|
3352
|
+
{ command: 'claude-flow hooks model-outcome -t "auth system" -m sonnet -o escalated', description: 'Record escalation to opus' },
|
|
3353
3353
|
],
|
|
3354
3354
|
action: async (ctx) => {
|
|
3355
3355
|
const task = ctx.flags.task;
|
|
@@ -3386,8 +3386,8 @@ const modelStatsCommand = {
|
|
|
3386
3386
|
{ name: 'detailed', short: 'd', type: 'boolean', description: 'Show detailed breakdown' },
|
|
3387
3387
|
],
|
|
3388
3388
|
examples: [
|
|
3389
|
-
{ command: '
|
|
3390
|
-
{ command: '
|
|
3389
|
+
{ command: 'claude-flow hooks model-stats', description: 'View routing stats' },
|
|
3390
|
+
{ command: 'claude-flow hooks model-stats --detailed', description: 'Show detailed breakdown' },
|
|
3391
3391
|
],
|
|
3392
3392
|
action: async (ctx) => {
|
|
3393
3393
|
try {
|
|
@@ -3482,8 +3482,8 @@ const teammateIdleCommand = {
|
|
|
3482
3482
|
}
|
|
3483
3483
|
],
|
|
3484
3484
|
examples: [
|
|
3485
|
-
{ command: '
|
|
3486
|
-
{ command: '
|
|
3485
|
+
{ command: 'claude-flow hooks teammate-idle --auto-assign true', description: 'Auto-assign tasks to idle teammate' },
|
|
3486
|
+
{ command: 'claude-flow hooks teammate-idle -t worker-1 --check-task-list', description: 'Check tasks for specific teammate' }
|
|
3487
3487
|
],
|
|
3488
3488
|
action: async (ctx) => {
|
|
3489
3489
|
const autoAssign = ctx.flags.autoAssign !== false;
|
|
@@ -3581,8 +3581,8 @@ const taskCompletedCommand = {
|
|
|
3581
3581
|
}
|
|
3582
3582
|
],
|
|
3583
3583
|
examples: [
|
|
3584
|
-
{ command: '
|
|
3585
|
-
{ command: '
|
|
3584
|
+
{ command: 'claude-flow hooks task-completed -i task-123 --train-patterns', description: 'Complete task and train patterns' },
|
|
3585
|
+
{ command: 'claude-flow hooks task-completed -i task-456 --notify-lead --quality 0.95', description: 'Complete with quality score' }
|
|
3586
3586
|
],
|
|
3587
3587
|
action: async (ctx) => {
|
|
3588
3588
|
const taskId = ctx.args[0] || ctx.flags.taskId;
|
|
@@ -3694,10 +3694,10 @@ export const hooksCommand = {
|
|
|
3694
3694
|
],
|
|
3695
3695
|
options: [],
|
|
3696
3696
|
examples: [
|
|
3697
|
-
{ command: '
|
|
3698
|
-
{ command: '
|
|
3699
|
-
{ command: '
|
|
3700
|
-
{ command: '
|
|
3697
|
+
{ command: 'claude-flow hooks pre-edit -f src/utils.ts', description: 'Get context before editing' },
|
|
3698
|
+
{ command: 'claude-flow hooks route -t "Fix authentication bug"', description: 'Route task to optimal agent' },
|
|
3699
|
+
{ command: 'claude-flow hooks pretrain', description: 'Bootstrap intelligence from repository' },
|
|
3700
|
+
{ command: 'claude-flow hooks metrics --v3-dashboard', description: 'View V3 performance metrics' }
|
|
3701
3701
|
],
|
|
3702
3702
|
action: async (ctx) => {
|
|
3703
3703
|
output.writeln();
|
|
@@ -3705,7 +3705,7 @@ export const hooksCommand = {
|
|
|
3705
3705
|
output.writeln();
|
|
3706
3706
|
output.writeln('Intelligent workflow automation with pattern learning and adaptive routing');
|
|
3707
3707
|
output.writeln();
|
|
3708
|
-
output.writeln('Usage:
|
|
3708
|
+
output.writeln('Usage: claude-flow hooks <subcommand> [options]');
|
|
3709
3709
|
output.writeln();
|
|
3710
3710
|
output.writeln('Subcommands:');
|
|
3711
3711
|
output.printList([
|
|
@@ -3740,7 +3740,7 @@ export const hooksCommand = {
|
|
|
3740
3740
|
`${output.highlight('task-completed')} - Handle task completion (train patterns)`
|
|
3741
3741
|
]);
|
|
3742
3742
|
output.writeln();
|
|
3743
|
-
output.writeln('Run "
|
|
3743
|
+
output.writeln('Run "claude-flow hooks <subcommand> --help" for subcommand help');
|
|
3744
3744
|
output.writeln();
|
|
3745
3745
|
output.writeln(output.bold('V3 Features:'));
|
|
3746
3746
|
output.printList([
|