Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv7f74dca68220
diff --git a/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts
index eee40bf2fc..747f6a10aa 100644
--- a/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts
+++ b/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts
@@ -772,13 +772,36 @@ export const hooksTransfer: MCPTool = {
const minConfidence = (params.minConfidence as number) || 0.7;
const filter = params.filter as string;
+ // Try to load patterns from source project's memory store
+ const sourceMemoryPath = join(resolve(sourcePath), MEMORY_DIR, MEMORY_FILE);
+ let sourceStore: MemoryStore = { entries: {}, version: '3.0.0' };
+
+ try {
+ if (existsSync(sourceMemoryPath)) {
+ sourceStore = JSON.parse(readFileSync(sourceMemoryPath, 'utf-8'));
+ }
+ } catch {
+ // Fall back to empty store
+ }
+
+ const sourceEntries = Object.values(sourceStore.entries);
+
+ // Count patterns by type from source
const byType: Record<string, number> = {
- 'file-patterns': 8,
- 'task-routing': 12,
- 'command-risk': 5,
- 'agent-success': 15,
+ 'file-patterns': sourceEntries.filter(e => e.key.includes('file') || e.metadata?.type === 'file-pattern').length,
+ 'task-routing': sourceEntries.filter(e => e.key.includes('routing') || e.metadata?.type === 'routing').length,
+ 'command-risk': sourceEntries.filter(e => e.key.includes('command') || e.metadata?.type === 'command-risk').length,
+ 'agent-success': sourceEntries.filter(e => e.key.includes('agent') || e.metadata?.type === 'agent-success').length,
};
+ // If source has no patterns, provide demo data
+ if (Object.values(byType).every(v => v === 0)) {
+ byType['file-patterns'] = 8;
+ byType['task-routing'] = 12;
+ byType['command-risk'] = 5;
+ byType['agent-success'] = 15;
+ }
+
if (filter) {
Object.keys(byType).forEach(key => {
if (!key.includes(filter)) delete byType[key];
@@ -802,6 +825,7 @@ export const hooksTransfer: MCPTool = {
avgConfidence: 0.82 + (minConfidence > 0.8 ? 0.1 : 0),
avgAge: '3 days',
},
+ dataSource: Object.values(sourceStore.entries).length > 0 ? 'source-project' : 'demo-data',
};
},
};