claude-flow 3.7.0-alpha.1 → 3.7.0-alpha.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "3.7.0-alpha.
|
|
3
|
+
"version": "3.7.0-alpha.3",
|
|
4
4
|
"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",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -232,8 +232,14 @@ async function startBackgroundDaemon(projectRoot, quiet, maxCpuLoad, minFreeMemo
|
|
|
232
232
|
const isWin = process.platform === 'win32';
|
|
233
233
|
const forkOpts = {
|
|
234
234
|
cwd: resolvedRoot,
|
|
235
|
-
// detached
|
|
236
|
-
|
|
235
|
+
// detached: true on every platform (#1766). On Windows, leaving detached:false
|
|
236
|
+
// kept the child in the parent's process group AND the IPC pipe held the
|
|
237
|
+
// child to npx — when npx exited, the IPC pipe tore down and the daemon
|
|
238
|
+
// died within ~1s. detached:true + child.disconnect() (below) gives the
|
|
239
|
+
// child its own session/pgid and breaks the IPC pipe so the daemon
|
|
240
|
+
// genuinely survives parent exit. On POSIX, detached:true was already the
|
|
241
|
+
// path; this just makes Windows match.
|
|
242
|
+
detached: true,
|
|
237
243
|
// Use 'ignore' for all stdio + 'ignore' for the IPC channel via silent:true off.
|
|
238
244
|
// fork() defaults to creating an IPC channel; we don't need it here, so we
|
|
239
245
|
// pass stdio explicitly. Passing fs.openSync() FDs causes the child to die
|
|
@@ -268,8 +274,18 @@ async function startBackgroundDaemon(projectRoot, quiet, maxCpuLoad, minFreeMemo
|
|
|
268
274
|
return { success: false, exitCode: 1 };
|
|
269
275
|
}
|
|
270
276
|
// Unref BEFORE writing PID file — prevents race where parent exits
|
|
271
|
-
// but child hasn't fully detached yet (fixes macOS daemon death #1283)
|
|
277
|
+
// but child hasn't fully detached yet (fixes macOS daemon death #1283).
|
|
272
278
|
child.unref();
|
|
279
|
+
// #1766: also break the IPC pipe explicitly. unref() releases the libuv
|
|
280
|
+
// handle but does NOT close the IPC channel; on Windows the open IPC
|
|
281
|
+
// pipe keeps the daemon tied to its parent npx, and when npx exits the
|
|
282
|
+
// pipe is torn down and the daemon exits with it. disconnect() severs
|
|
283
|
+
// the IPC pipe so the daemon truly stands on its own. Wrapped in try
|
|
284
|
+
// because disconnect() throws if the IPC channel is already gone.
|
|
285
|
+
try {
|
|
286
|
+
child.disconnect();
|
|
287
|
+
}
|
|
288
|
+
catch { /* IPC channel already closed */ }
|
|
273
289
|
// Longer delay to let the child process start and write its own PID file.
|
|
274
290
|
// 100ms was too short on Windows; the child's checkExistingDaemon() would
|
|
275
291
|
// find the parent-written PID and return early (#1478 Bug 1).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.7.0-alpha.
|
|
3
|
+
"version": "3.7.0-alpha.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|