豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 92dae21

Browse files
authored
Merge pull request #1500 from ruvnet/fix/p0-daemon-agentdb-controllers
fix: P0 daemon startup, ESM controller-registry, memory-bridge
2 parents f547cec + 5a5bfa6 commit 92dae21

File tree

9 files changed

+60
-41
lines changed

9 files changed

+60
-41
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-flow",
3-
"version": "3.5.48",
3+
"version": "3.5.49",
44
"description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
55
"main": "dist/index.js",
66
"type": "module",

ruflo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ruflo",
3-
"version": "3.5.48",
3+
"version": "3.5.49",
44
"description": "Ruflo - Enterprise AI agent orchestration platform. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
55
"main": "bin/ruflo.js",
66
"type": "module",

v3/@claude-flow/cli/README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
[![YouTube](https://img.shields.io/badge/YouTube-Subscribe-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@ReuvenCohen)
2222

2323
# **Production-ready multi-agent AI orchestration for Claude Code**
24-
*Deploy 60+ specialized agents in coordinated swarms with self-learning capabilities, fault-tolerant consensus, and enterprise-grade security.*
24+
*Deploy 100+ specialized agents in coordinated swarms with self-learning capabilities, fault-tolerant consensus, and enterprise-grade security.*
2525

2626
</div>
2727

28-
> **Why Ruflo?** Claude Flow is now Ruflo — named by Ruv, who loves Rust, flow states, and building things that feel inevitable. The "Ru" is the Ruv. The "flo" is the flow. Underneath, WASM kernels written in Rust power the policy engine, embeddings, and proof system. 5,900+ commits later, the alpha is over. This is v3.5.
28+
> **Why Ruflo?** Claude Flow is now Ruflo — named by Ruv, who loves Rust, flow states, and building things that feel inevitable. The "Ru" is the Ruv. The "flo" is the flow. Underneath, WASM kernels written in Rust power the policy engine, embeddings, and proof system. 6,000+ commits later, this is v3.5.
2929
3030
## Getting into the Flow
3131

@@ -56,8 +56,8 @@ flowchart TB
5656
subgraph ROUTING["🧭 Routing Layer"]
5757
QL[Q-Learning Router]
5858
MOE[MoE - 8 Experts]
59-
SK[Skills - 42+]
60-
HK[Hooks - 17]
59+
SK[Skills - 130+]
60+
HK[Hooks - 27]
6161
end
6262
6363
subgraph SWARM["🐝 Swarm Coordination"]
@@ -66,7 +66,7 @@ flowchart TB
6666
CLM[Claims<br/>Human-Agent Coord]
6767
end
6868
69-
subgraph AGENTS["🤖 60+ Agents"]
69+
subgraph AGENTS["🤖 100+ Agents"]
7070
AG1[coder]
7171
AG2[tester]
7272
AG3[reviewer]
@@ -132,7 +132,7 @@ flowchart TB
132132
|-----------|---------|-------------|
133133
| **SONA** | Self-Optimizing Neural Architecture - learns optimal routing | Fast adaptation |
134134
| **EWC++** | Elastic Weight Consolidation - prevents catastrophic forgetting | Preserves learned patterns |
135-
| **Flash Attention** | Optimized attention computation | 2-7x speedup |
135+
| **Flash Attention** | Optimized attention computation | 2-7x speedup (benchmarked) |
136136
| **HNSW** | Hierarchical Navigable Small World vector search | Sub-millisecond retrieval |
137137
| **ReasoningBank** | Pattern storage with trajectory learning | RETRIEVE→JUDGE→DISTILL |
138138
| **Hyperbolic** | Poincare ball embeddings for hierarchical data | Better code relationships |
@@ -161,12 +161,12 @@ curl -fsSL https://cdn.jsdelivr.net/gh/ruvnet/ruflo@main/scripts/install.sh | ba
161161
npx ruflo@latest init --wizard
162162
```
163163

164-
> **New to Ruflo?** You don't need to learn 259 MCP tools or 26 CLI commands. After running `init`, just use Claude Code normally — the hooks system automatically routes tasks to the right agents, learns from successful patterns, and coordinates multi-agent work in the background. The advanced tools exist for fine-grained control when you need it.
164+
> **New to Ruflo?** You don't need to learn 310+ MCP tools or 26 CLI commands. After running `init`, just use Claude Code normally — the hooks system automatically routes tasks to the right agents, learns from successful patterns, and coordinates multi-agent work in the background. The advanced tools exist for fine-grained control when you need it.
165165
166166
---
167167
### Key Capabilities
168168

169-
🤖 **60+ Specialized Agents** - Ready-to-use AI agents for coding, code review, testing, security audits, documentation, and DevOps. Each agent is optimized for its specific role.
169+
🤖 **100+ Specialized Agents** - Ready-to-use AI agents for coding, code review, testing, security audits, documentation, and DevOps. Each agent is optimized for its specific role.
170170

171171
🐝 **Coordinated Agent Teams** - Run unlimited agents simultaneously in organized swarms. Agents spawn sub-workers, communicate, share context, and divide work automatically using hierarchical (queen/workers) or mesh (peer-to-peer) patterns.
172172

@@ -193,7 +193,7 @@ Every request flows through four layers: from your CLI or Claude Code interface,
193193
|-------|------------|--------------|
194194
| User | Claude Code, CLI | Your interface to control and run commands |
195195
| Orchestration | MCP Server, Router, Hooks | Routes requests to the right agents |
196-
| Agents | 60+ types | Specialized workers (coder, tester, reviewer...) |
196+
| Agents | 100+ types | Specialized workers (coder, tester, reviewer...) |
197197
| Providers | Anthropic, OpenAI, Google, Ollama | AI models that power reasoning |
198198

199199
</details>
@@ -702,7 +702,7 @@ claude mcp add ruflo -- npx -y ruflo@latest mcp start
702702
claude mcp list
703703
```
704704

705-
Once added, Claude Code can use all 259 ruflo MCP tools directly:
705+
Once added, Claude Code can use all 313 ruflo MCP tools directly:
706706
- `swarm_init` - Initialize agent swarms
707707
- `agent_spawn` - Spawn specialized agents
708708
- `memory_search` - Search patterns with HNSW vector search
@@ -757,7 +757,7 @@ Ruflo v3 introduces **self-learning neural capabilities** that no other agent or
757757

758758
| Feature | Ruflo v3 | CrewAI | LangGraph | AutoGen | Manus |
759759
|---------|----------------|--------|-----------|---------|-------|
760-
| **MCP Integration** | ✅ Native (259 tools) |||||
760+
| **MCP Integration** | ✅ Native (313 tools) |||||
761761
| **Skills System** | ✅ 42+ pre-built |||| Limited |
762762
| **Stream Pipelines** | ✅ JSON chains || Via code |||
763763
| **Pair Programming** | ✅ Driver/Navigator |||||
@@ -895,7 +895,7 @@ flowchart TB
895895
896896
subgraph Agents["🤖 Agent Layer"]
897897
Queen[Queen Coordinator]
898-
Workers[60+ Specialized Agents]
898+
Workers[100+ Specialized Agents]
899899
Swarm[Swarm Manager]
900900
end
901901
@@ -1180,7 +1180,7 @@ Connect Ruflo to your development environment.
11801180
<details>
11811181
<summary>🔌 <strong>MCP Setup</strong> — Connect Ruflo to Any AI Environment</summary>
11821182

1183-
Ruflo runs as an MCP (Model Context Protocol) server, allowing you to connect it to any MCP-compatible AI client. This means you can use Ruflo's 60+ agents, swarm coordination, and self-learning capabilities from Claude Desktop, VS Code, Cursor, Windsurf, ChatGPT, and more.
1183+
Ruflo runs as an MCP (Model Context Protocol) server, allowing you to connect it to any MCP-compatible AI client. This means you can use Ruflo's 100+ agents, swarm coordination, and self-learning capabilities from Claude Desktop, VS Code, Cursor, Windsurf, ChatGPT, and more.
11841184

11851185
### Quick Add Command
11861186

@@ -1558,12 +1558,12 @@ chain.verify(envelope); // true — tamper-evident
15581558
Comprehensive capabilities for enterprise-grade AI agent orchestration.
15591559

15601560
<details>
1561-
<summary>📦 <strong>Features</strong> — 60+ Agents, Swarm Topologies, MCP Tools & Security</summary>
1561+
<summary>📦 <strong>Features</strong> — 100+ Agents, Swarm Topologies, MCP Tools & Security</summary>
15621562

15631563
Comprehensive feature set for enterprise-grade AI agent orchestration.
15641564

15651565
<details open>
1566-
<summary>🤖 <strong>Agent Ecosystem</strong> — 60+ specialized agents across 8 categories</summary>
1566+
<summary>🤖 <strong>Agent Ecosystem</strong> — 100+ specialized agents across 8 categories</summary>
15671567

15681568
Pre-built agents for every development task, from coding to security audits.
15691569

@@ -1710,7 +1710,7 @@ npx ruflo@latest hooks task-completed --task-id <id> --train-patterns
17101710
</details>
17111711

17121712
<details>
1713-
<summary>🔧 <strong>MCP Tools & Integration</strong> — 259 tools across 7 categories</summary>
1713+
<summary>🔧 <strong>MCP Tools & Integration</strong> — 313 tools across 31 modules</summary>
17141714

17151715
Full MCP server with tools for coordination, monitoring, memory, and GitHub integration.
17161716

@@ -2163,7 +2163,7 @@ npx ruflo@latest worker status
21632163
| `agentConfigs` | 15 V3 agent configurations | Agent testing |
21642164
| `memoryEntries` | Patterns, rules, embeddings | Memory testing |
21652165
| `swarmConfigs` | V3 default, minimal, mesh, hierarchical | Swarm testing |
2166-
| `mcpTools` | 259 tool definitions | MCP testing |
2166+
| `mcpTools` | 313 tool definitions | MCP testing |
21672167

21682168
</details>
21692169

@@ -5023,9 +5023,9 @@ npx agentic-flow mcp stdio
50235023
</details>
50245024

50255025
<details>
5026-
<summary>🔧 <strong>MCP Tools</strong> — 259 Integration Tools</summary>
5026+
<summary>🔧 <strong>MCP Tools</strong> — 313 Integration Tools</summary>
50275027

5028-
Agentic-flow exposes 259 MCP tools for integration:
5028+
Agentic-flow exposes 310+ MCP tools for integration:
50295029

50305030
| Category | Tools | Examples |
50315031
|----------|-------|----------|
@@ -6141,7 +6141,7 @@ Domain-Driven Design with bounded contexts, clean architecture, and measured per
61416141
| **Memory** | Pattern retrieval | <10ms | ✅ Met |
61426142
| **Swarm** | Agent spawn | <200ms | ✅ Met |
61436143
| **Swarm** | Consensus latency | <100ms | ✅ Met |
6144-
| **Neural** | SONA adaptation | <0.05ms | ✅ Met |
6144+
| **Neural** | SONA adaptation | <0.05ms | ⚡ Benchmarked |
61456145
| **Graph** | Build (1k nodes) | <200ms | ✅ Met |
61466146
| **Graph** | PageRank (1k nodes) | <100ms | ✅ Met |
61476147
| **Learning** | Insight recording | <5ms | ✅ Met |
@@ -7349,7 +7349,7 @@ export CLAUDE_FLOW_HNSW_EF=100
73497349
│ Pattern Matching │ Self-learning (ReasoningBank) │
73507350
│ Security │ CVE remediation + strict validation │
73517351
│ Modular Architecture │ 18 @claude-flow/* packages │
7352-
│ Agent Coordination │ 60+ specialized agents │
7352+
│ Agent Coordination │ 100+ specialized agents │
73537353
│ Token Efficiency │ 32% reduction with optimization │
73547354
└───────────────────────┴─────────────────────────────────────┘
73557355
```

v3/@claude-flow/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@claude-flow/cli",
3-
"version": "3.5.48",
3+
"version": "3.5.49",
44
"type": "module",
55
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
66
"main": "dist/src/index.js",

v3/@claude-flow/cli/src/commands/daemon.ts

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ const startCommand: Command = {
9595
fs.mkdirSync(stateDir, { recursive: true });
9696
}
9797

98-
// Write PID file for foreground mode
99-
fs.writeFileSync(pidFile, String(process.pid));
98+
// NOTE: Do NOT write PID file here — startDaemon() writes it internally.
99+
// Writing it before startDaemon() causes checkExistingDaemon() to detect
100+
// our own PID and return early, leaving no workers scheduled (#1478 Bug 1).
100101

101102
// Clean up PID file on exit
102103
const cleanup = () => {
@@ -173,10 +174,13 @@ const startCommand: Command = {
173174
output.writeln(output.error(`[daemon] Worker failed: ${type} - ${error}`));
174175
});
175176

176-
// Keep process alive
177+
// Keep process alive — setInterval creates a ref'd handle that prevents
178+
// Node.js from exiting even when startDaemon's timers are unref'd (#1478 Bug 2).
179+
setInterval(() => {}, 60_000);
177180
await new Promise(() => {}); // Never resolves - daemon runs until killed
178181
} else {
179182
await startDaemon(projectRoot, config);
183+
setInterval(() => {}, 60_000); // Keep alive with ref'd handle (#1478)
180184
await new Promise(() => {}); // Keep alive
181185
}
182186

@@ -255,7 +259,10 @@ async function startBackgroundDaemon(projectRoot: string, quiet: boolean, maxCpu
255259
const spawnOpts: any = {
256260
cwd: resolvedRoot,
257261
detached: !isWin, // detached is POSIX-only; Windows uses windowsHide
258-
stdio: ['ignore', fs.openSync(logFile, 'a'), fs.openSync(logFile, 'a')],
262+
// Use 'ignore' for all stdio — passing fs.openSync() FDs causes the child to
263+
// die on Windows when the parent exits and closes the FDs (#1478 Bug 3).
264+
// The daemon writes its own logs via appendFileSync to .claude-flow/logs/.
265+
stdio: ['ignore', 'ignore', 'ignore'],
259266
env: {
260267
...process.env,
261268
CLAUDE_FLOW_DAEMON: '1',
@@ -294,11 +301,17 @@ async function startBackgroundDaemon(projectRoot: string, quiet: boolean, maxCpu
294301
// but child hasn't fully detached yet (fixes macOS daemon death #1283)
295302
child.unref();
296303

297-
// Small delay to let the child process fully detach on macOS
298-
await new Promise(resolve => setTimeout(resolve, 100));
304+
// Longer delay to let the child process start and write its own PID file.
305+
// 100ms was too short on Windows; the child's checkExistingDaemon() would
306+
// find the parent-written PID and return early (#1478 Bug 1).
307+
await new Promise(resolve => setTimeout(resolve, 500));
299308

300-
// Save PID only after child is detached
301-
fs.writeFileSync(pidFile, String(pid));
309+
// Write PID file only if the child hasn't already written its own.
310+
// The foreground child calls writePidFile() internally, but on some platforms
311+
// it may not have started yet, so we write as a fallback.
312+
if (!fs.existsSync(pidFile)) {
313+
fs.writeFileSync(pidFile, String(pid));
314+
}
302315

303316
if (!quiet) {
304317
output.printSuccess(`Daemon started in background (PID: ${pid})`);

v3/@claude-flow/cli/src/memory/memory-bridge.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,11 +1177,14 @@ export async function bridgeSearchPatterns(options: {
11771177
try {
11781178
const reasoningBank = registry.get('reasoningBank');
11791179

1180-
if (reasoningBank && typeof reasoningBank.search === 'function') {
1181-
const results = await reasoningBank.search(options.query, {
1182-
topK: options.topK || 5,
1183-
minScore: options.minConfidence || 0.3,
1184-
});
1180+
// ReasoningBank may expose .searchPatterns() (agentdb) or .search() (legacy) (#1492 Bug 2)
1181+
if (reasoningBank && typeof (reasoningBank.searchPatterns ?? reasoningBank.search) === 'function') {
1182+
let results: any;
1183+
if (typeof reasoningBank.searchPatterns === 'function') {
1184+
results = await reasoningBank.searchPatterns({ task: options.query, k: options.topK || 5, threshold: options.minConfidence || 0.3 });
1185+
} else {
1186+
results = await reasoningBank.search(options.query, { topK: options.topK || 5, minScore: options.minConfidence || 0.3 });
1187+
}
11851188
return {
11861189
results: Array.isArray(results) ? results.map((r: any) => ({
11871190
id: r.id || r.patternId || '',

v3/@claude-flow/memory/src/controller-registry.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,10 @@ export class ControllerRegistry extends EventEmitter {
462462
// Validate dbPath to prevent path traversal
463463
const dbPath = config.dbPath || ':memory:';
464464
if (dbPath !== ':memory:') {
465-
const resolved = require('path').resolve(dbPath);
465+
// Use dynamic import instead of require() — require() is not defined in ESM
466+
// context and silently kills initAgentDB(), disabling all 15+ controllers (#1492).
467+
const { resolve: resolvePath } = await import('node:path');
468+
const resolved = resolvePath(dbPath);
466469
if (resolved.includes('..')) {
467470
this.emit('agentdb:unavailable', { reason: 'Invalid dbPath' });
468471
return;

v3/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)