claude-flow 3.6.6 → 3.6.8
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"sessionId":"ea43bca2-cc37-44fb-97ff-f1c914a31fb1","pid":12017,"procStart":"Tue Apr 28 01:25:58 2026","acquiredAt":1777350938971}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.8",
|
|
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",
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* CLI integration for @claude-flow/browser package.
|
|
5
5
|
* Provides browser automation tools for web navigation, interaction, and data extraction.
|
|
6
6
|
*/
|
|
7
|
+
import { readFileSync, existsSync } from 'node:fs';
|
|
7
8
|
import { validateIdentifier, validateText } from './validate-input.js';
|
|
8
9
|
// Session registry for multi-session support
|
|
9
10
|
const browserSessions = new Map();
|
|
@@ -78,20 +79,26 @@ async function execBrowserCommand(args, session = 'default') {
|
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
81
|
/**
|
|
81
|
-
*
|
|
82
|
+
* Read a sysctl value, returning the trimmed string or null.
|
|
82
83
|
*/
|
|
83
|
-
function
|
|
84
|
+
function readSysctl(name) {
|
|
84
85
|
try {
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
return
|
|
88
|
-
const clonePath = '/proc/sys/kernel/unprivileged_userns_clone';
|
|
89
|
-
if (existsSync(clonePath)) {
|
|
90
|
-
return readFileSync(clonePath, 'utf-8').trim() === '0';
|
|
91
|
-
}
|
|
86
|
+
const p = `/proc/sys/kernel/${name}`;
|
|
87
|
+
if (existsSync(p))
|
|
88
|
+
return readFileSync(p, 'utf-8').trim();
|
|
92
89
|
}
|
|
93
90
|
catch { /* not Linux or can't read */ }
|
|
94
|
-
return
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Detect if Linux needs --no-sandbox for Chrome.
|
|
95
|
+
* Checks both legacy userns flag and Ubuntu 24.04+ AppArmor restriction.
|
|
96
|
+
*/
|
|
97
|
+
function needsNoSandbox() {
|
|
98
|
+
if (process.platform !== 'linux')
|
|
99
|
+
return false;
|
|
100
|
+
return readSysctl('unprivileged_userns_clone') === '0' ||
|
|
101
|
+
readSysctl('apparmor_restrict_unprivileged_userns') === '1';
|
|
95
102
|
}
|
|
96
103
|
/**
|
|
97
104
|
* Browser MCP Tools
|
|
@@ -140,8 +147,8 @@ export const browserTools = [
|
|
|
140
147
|
const args = ['open', url];
|
|
141
148
|
if (waitUntil)
|
|
142
149
|
args.push('--wait-until', waitUntil);
|
|
143
|
-
|
|
144
|
-
args.push('--
|
|
150
|
+
if (launchArgs.length > 0)
|
|
151
|
+
args.push('--args', launchArgs.join(','));
|
|
145
152
|
// Create session if new
|
|
146
153
|
const sessionId = session || 'default';
|
|
147
154
|
if (!browserSessions.has(sessionId)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.8",
|
|
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",
|
|
@@ -336,11 +336,32 @@ function isContentAwareExecutor(executor) {
|
|
|
336
336
|
return 'setContext' in executor && typeof executor.setContext === 'function';
|
|
337
337
|
}
|
|
338
338
|
class DefaultHeadlessExecutor {
|
|
339
|
+
contextContent = null;
|
|
340
|
+
setContext(claudeMdContent) {
|
|
341
|
+
this.contextContent = claudeMdContent;
|
|
342
|
+
}
|
|
339
343
|
async execute(prompt, workDir) {
|
|
340
344
|
const { execFile } = await import('node:child_process');
|
|
341
345
|
const { promisify } = await import('node:util');
|
|
346
|
+
const fs = await import('node:fs/promises');
|
|
347
|
+
const { join } = await import('node:path');
|
|
342
348
|
const execFileAsync = promisify(execFile);
|
|
343
|
-
|
|
349
|
+
const claudeMdPath = join(workDir, 'CLAUDE.md');
|
|
350
|
+
const backupPath = join(workDir, '.CLAUDE.md.ab-backup');
|
|
351
|
+
let swapped = false;
|
|
352
|
+
if (this.contextContent !== null) {
|
|
353
|
+
try {
|
|
354
|
+
await fs.copyFile(claudeMdPath, backupPath);
|
|
355
|
+
}
|
|
356
|
+
catch { /* no file to back up */ }
|
|
357
|
+
if (this.contextContent.length > 0) {
|
|
358
|
+
await fs.writeFile(claudeMdPath, this.contextContent, 'utf-8');
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
await fs.unlink(claudeMdPath).catch(() => { });
|
|
362
|
+
}
|
|
363
|
+
swapped = true;
|
|
364
|
+
}
|
|
344
365
|
try {
|
|
345
366
|
const { stdout, stderr } = await execFileAsync('claude', ['-p', prompt, '--output-format', 'json'], { timeout: 60000, maxBuffer: 10 * 1024 * 1024, encoding: 'utf-8', cwd: workDir });
|
|
346
367
|
return { stdout, stderr, exitCode: 0 };
|
|
@@ -348,6 +369,17 @@ class DefaultHeadlessExecutor {
|
|
|
348
369
|
catch (error) {
|
|
349
370
|
return { stdout: error.stdout ?? '', stderr: error.stderr ?? '', exitCode: error.code ?? 1 };
|
|
350
371
|
}
|
|
372
|
+
finally {
|
|
373
|
+
if (swapped) {
|
|
374
|
+
try {
|
|
375
|
+
await fs.copyFile(backupPath, claudeMdPath);
|
|
376
|
+
await fs.unlink(backupPath);
|
|
377
|
+
}
|
|
378
|
+
catch {
|
|
379
|
+
await fs.unlink(claudeMdPath).catch(() => { });
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
351
383
|
}
|
|
352
384
|
}
|
|
353
385
|
function getDefaultBenchmarkTasks() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/guidance",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.2",
|
|
4
4
|
"description": "Guidance Control Plane - Compiles, retrieves, enforces, and evolves guidance rules for Claude Code sessions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|