moflo 4.6.11 → 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/helpers/hook-handler.cjs +35 -6
- package/.claude/settings.json +4 -4
- package/.claude/workflow-state.json +5 -0
- package/README.md +11 -1
- package/bin/hooks.mjs +519 -0
- package/bin/session-start-launcher.mjs +63 -0
- package/bin/setup-project.mjs +1 -1
- package/package.json +3 -2
- 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/mcp-generator.js +6 -3
- package/src/@claude-flow/cli/dist/src/init/moflo-init.js +108 -424
- package/src/@claude-flow/cli/dist/src/init/settings-generator.js +50 -120
- package/src/@claude-flow/cli/dist/src/init/types.d.ts +2 -0
- package/src/@claude-flow/cli/dist/src/init/types.js +2 -0
- 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
|
@@ -197,10 +197,10 @@ export class PluginDiscoveryService {
|
|
|
197
197
|
totalPlugins: plugins.length,
|
|
198
198
|
totalDownloads: plugins.reduce((sum, p) => sum + p.downloads, 0),
|
|
199
199
|
totalAuthors: 1,
|
|
200
|
-
featured: ['@claude-flow/
|
|
201
|
-
trending: [
|
|
202
|
-
newest: [
|
|
203
|
-
official: ['@claude-flow/
|
|
200
|
+
featured: ['@claude-flow/security', '@claude-flow/claims'],
|
|
201
|
+
trending: [],
|
|
202
|
+
newest: [],
|
|
203
|
+
official: ['@claude-flow/security', '@claude-flow/claims'],
|
|
204
204
|
compatibilityMatrix: [
|
|
205
205
|
{ pluginId: '@claude-flow/neural', pluginVersion: '3.0.0', claudeFlowVersions: ['3.x'], tested: true },
|
|
206
206
|
{ pluginId: '@claude-flow/security', pluginVersion: '3.0.0', claudeFlowVersions: ['3.x'], tested: true },
|
|
@@ -531,124 +531,6 @@ export class PluginDiscoveryService {
|
|
|
531
531
|
verified: true,
|
|
532
532
|
trustLevel: 'official',
|
|
533
533
|
},
|
|
534
|
-
// Agentic QE - AI-powered quality engineering
|
|
535
|
-
{
|
|
536
|
-
id: '@claude-flow/plugin-agentic-qe',
|
|
537
|
-
name: '@claude-flow/plugin-agentic-qe',
|
|
538
|
-
displayName: 'Agentic Quality Engineering',
|
|
539
|
-
description: 'AI-powered quality engineering with 58 agents that write tests, find bugs, predict defects, scan security, and perform chaos engineering safely.',
|
|
540
|
-
version: '3.0.0-alpha.3',
|
|
541
|
-
cid: 'bafybeiagenticqeplugin2024',
|
|
542
|
-
size: 285000,
|
|
543
|
-
checksum: 'sha256:agenticqe2024xyz',
|
|
544
|
-
author: officialAuthor,
|
|
545
|
-
license: 'MIT',
|
|
546
|
-
categories: ['ai-ml', 'devops', 'security'],
|
|
547
|
-
tags: ['testing', 'qe', 'tdd', 'security', 'chaos-engineering', 'coverage', 'defect-prediction', 'agents'],
|
|
548
|
-
keywords: ['quality', 'testing', 'agents', 'tdd', 'security'],
|
|
549
|
-
downloads: 1200,
|
|
550
|
-
rating: 4.8,
|
|
551
|
-
ratingCount: 24,
|
|
552
|
-
lastUpdated: baseTime,
|
|
553
|
-
createdAt: '2026-01-20T00:00:00Z',
|
|
554
|
-
minClaudeFlowVersion: '3.0.0',
|
|
555
|
-
dependencies: [
|
|
556
|
-
{ name: '@claude-flow/core', version: '^3.0.0' },
|
|
557
|
-
],
|
|
558
|
-
type: 'integration',
|
|
559
|
-
hooks: [
|
|
560
|
-
'aqe:generate-tests',
|
|
561
|
-
'aqe:analyze-coverage',
|
|
562
|
-
'aqe:security-scan',
|
|
563
|
-
'aqe:predict-defects',
|
|
564
|
-
'aqe:chaos-inject',
|
|
565
|
-
],
|
|
566
|
-
commands: [
|
|
567
|
-
'aqe generate-tests',
|
|
568
|
-
'aqe tdd-cycle',
|
|
569
|
-
'aqe security-scan',
|
|
570
|
-
'aqe predict-defects',
|
|
571
|
-
'aqe chaos-inject',
|
|
572
|
-
'aqe quality-gate',
|
|
573
|
-
'aqe visual-regression',
|
|
574
|
-
],
|
|
575
|
-
permissions: ['filesystem', 'network', 'memory'],
|
|
576
|
-
exports: [
|
|
577
|
-
'TestGenerator',
|
|
578
|
-
'CoverageAnalyzer',
|
|
579
|
-
'SecurityScanner',
|
|
580
|
-
'DefectPredictor',
|
|
581
|
-
'ChaosInjector',
|
|
582
|
-
'QualityGate',
|
|
583
|
-
],
|
|
584
|
-
verified: true,
|
|
585
|
-
trustLevel: 'official',
|
|
586
|
-
securityAudit: {
|
|
587
|
-
auditor: 'claude-flow-security-team',
|
|
588
|
-
auditDate: '2026-01-20T00:00:00Z',
|
|
589
|
-
auditVersion: '3.0.0-alpha.3',
|
|
590
|
-
passed: true,
|
|
591
|
-
issues: [],
|
|
592
|
-
},
|
|
593
|
-
},
|
|
594
|
-
// Prime Radiant - Mathematical coherence and consensus verification
|
|
595
|
-
{
|
|
596
|
-
id: '@claude-flow/plugin-prime-radiant',
|
|
597
|
-
name: '@claude-flow/plugin-prime-radiant',
|
|
598
|
-
displayName: 'Prime Radiant',
|
|
599
|
-
description: 'Mathematical AI that catches contradictions, verifies consensus, prevents hallucinations, and analyzes swarm stability using sheaf cohomology and spectral graph theory.',
|
|
600
|
-
version: '0.1.5',
|
|
601
|
-
cid: 'bafybeiprimeradiantplugin2024',
|
|
602
|
-
size: 195000,
|
|
603
|
-
checksum: 'sha256:primeradiant2024xyz',
|
|
604
|
-
author: officialAuthor,
|
|
605
|
-
license: 'MIT',
|
|
606
|
-
categories: ['ai-ml', 'agents'],
|
|
607
|
-
tags: ['coherence', 'consensus', 'mathematics', 'validation', 'hallucination-prevention', 'spectral', 'causal'],
|
|
608
|
-
keywords: ['coherence', 'consensus', 'validation', 'mathematics'],
|
|
609
|
-
downloads: 850,
|
|
610
|
-
rating: 4.9,
|
|
611
|
-
ratingCount: 18,
|
|
612
|
-
lastUpdated: baseTime,
|
|
613
|
-
createdAt: '2026-01-20T00:00:00Z',
|
|
614
|
-
minClaudeFlowVersion: '3.0.0',
|
|
615
|
-
dependencies: [
|
|
616
|
-
{ name: '@claude-flow/core', version: '^3.0.0' },
|
|
617
|
-
],
|
|
618
|
-
type: 'integration',
|
|
619
|
-
hooks: [
|
|
620
|
-
'pr:pre-memory-store',
|
|
621
|
-
'pr:pre-consensus',
|
|
622
|
-
'pr:post-swarm-task',
|
|
623
|
-
'pr:pre-rag-retrieval',
|
|
624
|
-
],
|
|
625
|
-
commands: [
|
|
626
|
-
'pr coherence-check',
|
|
627
|
-
'pr consensus-verify',
|
|
628
|
-
'pr spectral-analyze',
|
|
629
|
-
'pr causal-infer',
|
|
630
|
-
'pr memory-gate',
|
|
631
|
-
'pr quantum-topology',
|
|
632
|
-
],
|
|
633
|
-
permissions: ['memory', 'hooks'],
|
|
634
|
-
exports: [
|
|
635
|
-
'CoherenceChecker',
|
|
636
|
-
'ConsensusVerifier',
|
|
637
|
-
'SpectralAnalyzer',
|
|
638
|
-
'CausalInference',
|
|
639
|
-
'MemoryGate',
|
|
640
|
-
'QuantumTopology',
|
|
641
|
-
],
|
|
642
|
-
verified: true,
|
|
643
|
-
trustLevel: 'official',
|
|
644
|
-
securityAudit: {
|
|
645
|
-
auditor: 'claude-flow-security-team',
|
|
646
|
-
auditDate: '2026-01-20T00:00:00Z',
|
|
647
|
-
auditVersion: '0.1.5',
|
|
648
|
-
passed: true,
|
|
649
|
-
issues: [],
|
|
650
|
-
},
|
|
651
|
-
},
|
|
652
534
|
// Domain-specific plugins
|
|
653
535
|
{
|
|
654
536
|
id: '@claude-flow/plugin-healthcare-clinical',
|
|
@@ -942,83 +824,6 @@ export class PluginDiscoveryService {
|
|
|
942
824
|
verified: true,
|
|
943
825
|
trustLevel: 'official',
|
|
944
826
|
},
|
|
945
|
-
// Gas Town Bridge - Multi-agent orchestrator integration
|
|
946
|
-
{
|
|
947
|
-
id: '@claude-flow/plugin-gastown-bridge',
|
|
948
|
-
name: '@claude-flow/plugin-gastown-bridge',
|
|
949
|
-
displayName: 'Gas Town Bridge',
|
|
950
|
-
description: 'Gas Town orchestrator integration with WASM-accelerated formula parsing, Beads sync, convoy management, and graph analysis (352x faster).',
|
|
951
|
-
version: '0.1.0',
|
|
952
|
-
cid: 'bafybeigastownbridgeplugin2024',
|
|
953
|
-
size: 485000,
|
|
954
|
-
checksum: 'sha256:gastownbridge2024xyz',
|
|
955
|
-
author: officialAuthor,
|
|
956
|
-
license: 'MIT',
|
|
957
|
-
categories: ['integrations', 'agents'],
|
|
958
|
-
tags: ['gastown', 'orchestration', 'beads', 'formulas', 'wasm', 'convoy', 'workflows'],
|
|
959
|
-
keywords: ['gastown', 'orchestration', 'beads'],
|
|
960
|
-
downloads: 0,
|
|
961
|
-
rating: 0,
|
|
962
|
-
ratingCount: 0,
|
|
963
|
-
lastUpdated: baseTime,
|
|
964
|
-
createdAt: '2026-01-24T00:00:00Z',
|
|
965
|
-
minClaudeFlowVersion: '3.0.0',
|
|
966
|
-
dependencies: [{ name: '@claude-flow/core', version: '^3.0.0' }],
|
|
967
|
-
type: 'integration',
|
|
968
|
-
hooks: ['gastown:sync', 'gastown:formula', 'gastown:convoy'],
|
|
969
|
-
commands: ['gastown beads', 'gastown convoy', 'gastown formula', 'gastown sync'],
|
|
970
|
-
permissions: ['filesystem', 'memory', 'network'],
|
|
971
|
-
exports: ['BeadsBridge', 'ConvoyManager', 'FormulaEngine', 'GastownSync'],
|
|
972
|
-
verified: true,
|
|
973
|
-
trustLevel: 'official',
|
|
974
|
-
securityAudit: {
|
|
975
|
-
auditor: 'claude-flow-security-team',
|
|
976
|
-
auditDate: '2026-01-24T00:00:00Z',
|
|
977
|
-
auditVersion: '0.1.0',
|
|
978
|
-
passed: true,
|
|
979
|
-
issues: [],
|
|
980
|
-
},
|
|
981
|
-
},
|
|
982
|
-
// Teammate Plugin - Claude Code v2.1.19+ integration
|
|
983
|
-
{
|
|
984
|
-
id: '@claude-flow/teammate-plugin',
|
|
985
|
-
name: '@claude-flow/teammate-plugin',
|
|
986
|
-
displayName: 'Teammate Plugin',
|
|
987
|
-
description: 'Native TeammateTool integration for Claude Code v2.1.19+. Multi-agent team orchestration with plan approval workflows, delegation, messaging, and BMSSP-optimized topology routing. 21 MCP tools.',
|
|
988
|
-
version: '1.0.0-alpha.1',
|
|
989
|
-
cid: 'bafybeiteammateplugin2026',
|
|
990
|
-
size: 387000,
|
|
991
|
-
checksum: 'sha256:e335dd24ec2e68e8952c517794421a0b18dfb23f',
|
|
992
|
-
author: officialAuthor,
|
|
993
|
-
license: 'MIT',
|
|
994
|
-
categories: ['agents', 'integrations'],
|
|
995
|
-
tags: ['teammate', 'claude-code', 'multi-agent', 'swarm', 'orchestration', 'bmssp'],
|
|
996
|
-
keywords: ['teammate', 'claude-code', 'multi-agent'],
|
|
997
|
-
downloads: 0,
|
|
998
|
-
rating: 0,
|
|
999
|
-
ratingCount: 0,
|
|
1000
|
-
lastUpdated: baseTime,
|
|
1001
|
-
createdAt: '2026-01-25T00:00:00Z',
|
|
1002
|
-
minClaudeFlowVersion: '3.0.0',
|
|
1003
|
-
dependencies: [
|
|
1004
|
-
{ name: '@claude-flow/core', version: '^3.0.0' },
|
|
1005
|
-
{ name: 'eventemitter3', version: '^5.0.1' },
|
|
1006
|
-
],
|
|
1007
|
-
type: 'integration',
|
|
1008
|
-
hooks: ['teammate:spawn', 'teammate:message', 'teammate:plan', 'teammate:delegate'],
|
|
1009
|
-
commands: ['teammate spawn', 'teammate team', 'teammate message', 'teammate plan'],
|
|
1010
|
-
permissions: ['filesystem', 'memory', 'network'],
|
|
1011
|
-
exports: ['TeammateBridge', 'createTeammateBridge', 'TEAMMATE_MCP_TOOLS', 'TopologyOptimizer', 'SemanticRouter'],
|
|
1012
|
-
verified: true,
|
|
1013
|
-
trustLevel: 'official',
|
|
1014
|
-
securityAudit: {
|
|
1015
|
-
auditor: 'claude-flow-security-team',
|
|
1016
|
-
auditDate: '2026-01-25T00:00:00Z',
|
|
1017
|
-
auditVersion: '1.0.0-alpha.1',
|
|
1018
|
-
passed: true,
|
|
1019
|
-
issues: [],
|
|
1020
|
-
},
|
|
1021
|
-
},
|
|
1022
827
|
];
|
|
1023
828
|
}
|
|
1024
829
|
/**
|
|
@@ -1028,15 +833,12 @@ export class PluginDiscoveryService {
|
|
|
1028
833
|
const basePlugins = this.getDemoPlugins();
|
|
1029
834
|
// Only fetch stats for real npm packages
|
|
1030
835
|
const realNpmPackages = [
|
|
1031
|
-
'@claude-flow/plugin-agentic-qe',
|
|
1032
|
-
'@claude-flow/plugin-prime-radiant',
|
|
1033
836
|
'@claude-flow/claims',
|
|
1034
837
|
'@claude-flow/security',
|
|
1035
838
|
'@claude-flow/plugins',
|
|
1036
839
|
'@claude-flow/embeddings',
|
|
1037
840
|
'@claude-flow/neural',
|
|
1038
841
|
'@claude-flow/performance',
|
|
1039
|
-
'@claude-flow/teammate-plugin',
|
|
1040
842
|
// Domain-specific plugins
|
|
1041
843
|
'@claude-flow/plugin-healthcare-clinical',
|
|
1042
844
|
'@claude-flow/plugin-financial-risk',
|
|
@@ -1050,8 +852,6 @@ export class PluginDiscoveryService {
|
|
|
1050
852
|
'@claude-flow/plugin-cognitive-kernel',
|
|
1051
853
|
'@claude-flow/plugin-quantum-optimizer',
|
|
1052
854
|
'@claude-flow/plugin-hyperbolic-reasoning',
|
|
1053
|
-
// Gas Town Bridge
|
|
1054
|
-
'@claude-flow/plugin-gastown-bridge',
|
|
1055
855
|
];
|
|
1056
856
|
// Fetch stats in parallel
|
|
1057
857
|
const statsPromises = realNpmPackages.map(pkg => fetchNpmStats(pkg));
|
|
@@ -173,10 +173,10 @@ async function main() {
|
|
|
173
173
|
console.log(' 🎉 All tests passed! Plugin Store is working correctly.');
|
|
174
174
|
console.log('');
|
|
175
175
|
console.log(' Available CLI Commands:');
|
|
176
|
-
console.log(' npx
|
|
177
|
-
console.log(' npx
|
|
178
|
-
console.log(' npx
|
|
179
|
-
console.log(' npx
|
|
176
|
+
console.log(' npx moflo plugins list');
|
|
177
|
+
console.log(' npx moflo plugins list --official');
|
|
178
|
+
console.log(' npx moflo plugins search -q "plugin creator"');
|
|
179
|
+
console.log(' npx moflo plugins info -n plugin-creator');
|
|
180
180
|
console.log('');
|
|
181
181
|
}
|
|
182
182
|
process.exit(failed > 0 ? 1 : 0);
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Runs without TTY for daemon processes and scheduled tasks
|
|
5
5
|
*
|
|
6
6
|
* Usage:
|
|
7
|
-
* npx
|
|
8
|
-
* npx
|
|
9
|
-
* npx
|
|
7
|
+
* npx moflo headless --worker <type>
|
|
8
|
+
* npx moflo headless --daemon
|
|
9
|
+
* npx moflo headless --benchmark
|
|
10
10
|
*
|
|
11
11
|
* Environment:
|
|
12
12
|
* CLAUDE_FLOW_HEADLESS=true
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Runs without TTY for daemon processes and scheduled tasks
|
|
5
5
|
*
|
|
6
6
|
* Usage:
|
|
7
|
-
* npx
|
|
8
|
-
* npx
|
|
9
|
-
* npx
|
|
7
|
+
* npx moflo headless --worker <type>
|
|
8
|
+
* npx moflo headless --daemon
|
|
9
|
+
* npx moflo headless --benchmark
|
|
10
10
|
*
|
|
11
11
|
* Environment:
|
|
12
12
|
* CLAUDE_FLOW_HEADLESS=true
|
|
@@ -62,34 +62,34 @@ function parseArgs() {
|
|
|
62
62
|
* Show help message
|
|
63
63
|
*/
|
|
64
64
|
function showHelp() {
|
|
65
|
-
console.log(`
|
|
66
|
-
Headless Runtime for MoFlo V4
|
|
67
|
-
|
|
68
|
-
Usage:
|
|
69
|
-
headless --worker <type> Run a specific worker
|
|
70
|
-
headless --daemon Start background daemon
|
|
71
|
-
headless --benchmark Run performance benchmarks
|
|
72
|
-
headless --status Show system status
|
|
73
|
-
|
|
74
|
-
Workers: ${HEADLESS_WORKER_TYPES.join(', ')}
|
|
75
|
-
|
|
76
|
-
Options:
|
|
77
|
-
-w, --worker <type> Worker type to run
|
|
78
|
-
-d, --daemon Run as daemon
|
|
79
|
-
-b, --benchmark Run benchmarks
|
|
80
|
-
-s, --status Show status
|
|
81
|
-
-t, --timeout <ms> Execution timeout (default: 60000)
|
|
82
|
-
-v, --verbose Verbose output
|
|
83
|
-
-h, --help Show help
|
|
84
|
-
|
|
85
|
-
Environment:
|
|
86
|
-
CLAUDE_FLOW_HEADLESS=true Enable headless mode
|
|
87
|
-
CLAUDE_CODE_HEADLESS=true Enable Claude Code headless
|
|
88
|
-
|
|
89
|
-
Examples:
|
|
90
|
-
headless --worker audit --timeout 120000
|
|
91
|
-
headless --daemon
|
|
92
|
-
headless --benchmark
|
|
65
|
+
console.log(`
|
|
66
|
+
Headless Runtime for MoFlo V4
|
|
67
|
+
|
|
68
|
+
Usage:
|
|
69
|
+
headless --worker <type> Run a specific worker
|
|
70
|
+
headless --daemon Start background daemon
|
|
71
|
+
headless --benchmark Run performance benchmarks
|
|
72
|
+
headless --status Show system status
|
|
73
|
+
|
|
74
|
+
Workers: ${HEADLESS_WORKER_TYPES.join(', ')}
|
|
75
|
+
|
|
76
|
+
Options:
|
|
77
|
+
-w, --worker <type> Worker type to run
|
|
78
|
+
-d, --daemon Run as daemon
|
|
79
|
+
-b, --benchmark Run benchmarks
|
|
80
|
+
-s, --status Show status
|
|
81
|
+
-t, --timeout <ms> Execution timeout (default: 60000)
|
|
82
|
+
-v, --verbose Verbose output
|
|
83
|
+
-h, --help Show help
|
|
84
|
+
|
|
85
|
+
Environment:
|
|
86
|
+
CLAUDE_FLOW_HEADLESS=true Enable headless mode
|
|
87
|
+
CLAUDE_CODE_HEADLESS=true Enable Claude Code headless
|
|
88
|
+
|
|
89
|
+
Examples:
|
|
90
|
+
headless --worker audit --timeout 120000
|
|
91
|
+
headless --daemon
|
|
92
|
+
headless --benchmark
|
|
93
93
|
`);
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
* Returns null if agentic-flow is not installed.
|
|
13
13
|
* Race-safe: concurrent callers share the same import Promise.
|
|
14
14
|
*/
|
|
15
|
-
export declare function getReasoningBank(): Promise<
|
|
15
|
+
export declare function getReasoningBank(): Promise<any>;
|
|
16
16
|
/**
|
|
17
17
|
* Load the ModelRouter module (multi-provider LLM routing).
|
|
18
18
|
* Returns null if agentic-flow is not installed.
|
|
19
19
|
*/
|
|
20
|
-
export declare function getRouter(): Promise<
|
|
20
|
+
export declare function getRouter(): Promise<any>;
|
|
21
21
|
/**
|
|
22
22
|
* Load the Orchestration module (workflow engine).
|
|
23
23
|
* Returns null if agentic-flow is not installed.
|
|
24
24
|
*/
|
|
25
|
-
export declare function getOrchestration(): Promise<
|
|
25
|
+
export declare function getOrchestration(): Promise<any>;
|
|
26
26
|
/**
|
|
27
27
|
* Compute an embedding vector via ReasoningBank, falling back to null.
|
|
28
28
|
*/
|
|
@@ -43,7 +43,9 @@ export function getRouter() {
|
|
|
43
43
|
*/
|
|
44
44
|
export function getOrchestration() {
|
|
45
45
|
if (_orchestrationP === null) {
|
|
46
|
-
|
|
46
|
+
// Use dynamic string to prevent vite from statically resolving the subpath
|
|
47
|
+
const mod = 'agentic-flow' + '/orchestration';
|
|
48
|
+
_orchestrationP = import(/* @vite-ignore */ mod).catch(() => null);
|
|
47
49
|
}
|
|
48
50
|
return _orchestrationP;
|
|
49
51
|
}
|
|
@@ -374,6 +374,20 @@ export class HeadlessWorkerExecutor extends EventEmitter {
|
|
|
374
374
|
};
|
|
375
375
|
// Ensure log directory exists
|
|
376
376
|
this.ensureLogDir();
|
|
377
|
+
// Kill child processes on parent exit to prevent orphaned node processes.
|
|
378
|
+
// Uses 'exit' (not 'beforeExit') so it fires even on explicit process.exit().
|
|
379
|
+
// The handler must be synchronous — no async work allowed in 'exit' handlers.
|
|
380
|
+
process.on('exit', () => {
|
|
381
|
+
for (const [, entry] of this.processPool) {
|
|
382
|
+
try {
|
|
383
|
+
clearTimeout(entry.timeout);
|
|
384
|
+
entry.process.kill('SIGTERM');
|
|
385
|
+
}
|
|
386
|
+
catch {
|
|
387
|
+
// Process already gone — ignore
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
});
|
|
377
391
|
}
|
|
378
392
|
// ============================================
|
|
379
393
|
// Public API
|
|
@@ -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 mcp__claude-flow__memory_search with namespace "code-map", "patterns", or "guidance".';
|
|
180
|
+
message = 'BLOCKED: Search memory before exploring files. Use mcp__claude-flow__memory_search with namespace "code-map", "patterns", "knowledge", or "guidance".';
|
|
181
181
|
}
|
|
182
182
|
return { allowed: false, message };
|
|
183
183
|
}
|
|
@@ -351,6 +351,26 @@ export function processGateCommand(command, env = process.env) {
|
|
|
351
351
|
console.log(bracket);
|
|
352
352
|
process.exit(0);
|
|
353
353
|
}
|
|
354
|
+
case 'compact-guidance': {
|
|
355
|
+
console.log('Pre-Compact Guidance:');
|
|
356
|
+
console.log('IMPORTANT: Before compacting, preserve key context:');
|
|
357
|
+
console.log(' - Check CLAUDE.md for project rules and architecture');
|
|
358
|
+
console.log(' - Memory namespaces: guidance, code-map, patterns, knowledge');
|
|
359
|
+
console.log(' - Use memory search to recover context after compact');
|
|
360
|
+
console.log(' - Batch all operations in single messages (GOLDEN RULE)');
|
|
361
|
+
process.exit(0);
|
|
362
|
+
}
|
|
363
|
+
case 'check-dangerous-command': {
|
|
364
|
+
const cmd = (env.TOOL_INPUT_command || '').toLowerCase();
|
|
365
|
+
const dangerous = ['rm -rf /', 'format c:', 'del /s /q c:\\', ':(){:|:&};:', 'mkfs.', '> /dev/sda'];
|
|
366
|
+
for (const pattern of dangerous) {
|
|
367
|
+
if (cmd.includes(pattern)) {
|
|
368
|
+
console.log(`[BLOCKED] Dangerous command detected: ${pattern}`);
|
|
369
|
+
process.exit(2);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
process.exit(0);
|
|
373
|
+
}
|
|
354
374
|
case 'session-reset':
|
|
355
375
|
gate.sessionReset();
|
|
356
376
|
process.exit(0);
|
|
@@ -175,10 +175,10 @@ async function main() {
|
|
|
175
175
|
console.log(' 🎉 All tests passed! Pattern Store is working correctly.');
|
|
176
176
|
console.log('');
|
|
177
177
|
console.log(' Available CLI Commands:');
|
|
178
|
-
console.log(' npx
|
|
179
|
-
console.log(' npx
|
|
180
|
-
console.log(' npx
|
|
181
|
-
console.log(' npx
|
|
178
|
+
console.log(' npx moflo patterns list');
|
|
179
|
+
console.log(' npx moflo patterns list --featured');
|
|
180
|
+
console.log(' npx moflo patterns search -q "agent"');
|
|
181
|
+
console.log(' npx moflo patterns info -n <pattern-id>');
|
|
182
182
|
console.log('');
|
|
183
183
|
}
|
|
184
184
|
process.exit(failed > 0 ? 1 : 0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moflo/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MoFlo CLI — AI agent orchestration with specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|