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

fix(browser): #2015 round 2 β€” strip bogus --kind flag, ship alpha.42

ruv905672021937
diff --git a/package.json b/package.json
index 096f6defe9..425bd15f4d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "claude-flow",
- "version": "3.7.0-alpha.40",
+ "version": "3.7.0-alpha.42",
"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",
"main": "dist/index.js",
"type": "module",
diff --git a/plugins/ruflo-browser/agents/browser-agent.md b/plugins/ruflo-browser/agents/browser-agent.md
index f2572d0c6f..8ec589ffa3 100644
--- a/plugins/ruflo-browser/agents/browser-agent.md
+++ b/plugins/ruflo-browser/agents/browser-agent.md
@@ -12,7 +12,7 @@ Every browser session you open MUST be allocated as an RVF cognitive container a
```bash
SID=$(date +%Y%m%d-%H%M%S)-<task-slug>
-npx -y [email protected] rvf create "$SID.rvf" --kind browser-session --dimension 384
+npx -y [email protected] rvf create "$SID.rvf" --dimension 384
npx -y [email protected] hooks trajectory-begin --session-id "$SID" --task "<human-task>"
```
diff --git a/plugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.md b/plugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.md
index 49c4e4c7b1..8148f7ed8b 100644
--- a/plugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.md
+++ b/plugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.md
@@ -47,7 +47,7 @@ We propose to refactor `ruflo-browser` around a **session-as-skill** architectur
### 1. Session model β€” RVF as the session container
-Every browser session opened by ruflo-browser is allocated an RVF container at session start (`rvf create --kind browser-session --dimension 384 --id <session-name>`) and committed at session end (`rvf compact && rvf export`). The container holds:
+Every browser session opened by ruflo-browser is allocated an RVF container at session start (`rvf create --dimension 384 <session-name>.rvf`) and committed at session end (`rvf compact && rvf export`). The container holds:
| Slot | Producer | Notes |
|------|----------|-------|
diff --git a/plugins/ruflo-browser/scripts/replay-spike.sh b/plugins/ruflo-browser/scripts/replay-spike.sh
index 4cac02164e..b1bc7ad5fe 100755
--- a/plugins/ruflo-browser/scripts/replay-spike.sh
+++ b/plugins/ruflo-browser/scripts/replay-spike.sh
@@ -43,8 +43,9 @@ site_record_replay() {
local rvf="$RESULTS_DIR/$sid.rvf"
# 1. Record a minimal baseline interaction
- # #2015: [email protected] requires --dimension on `rvf create`.
- if ! npx -y [email protected] rvf create "$rvf" --kind browser-session --dimension 384 >/dev/null 2>&1; then
+ # #2015: [email protected]'s rvf create needs --dimension and does NOT
+ # support --kind (unknown option). Strip --kind, keep --dimension 384.
+ if ! npx -y [email protected] rvf create "$rvf" --dimension 384 >/dev/null 2>&1; then
echo "SKIP:$label rvf-create-failed" ; return 2
fi
if ! npx -y [email protected] hooks trajectory-begin --session-id "$sid" --task "spike-$label" >/dev/null 2>&1; then
diff --git a/plugins/ruflo-browser/skills/browser-record/SKILL.md b/plugins/ruflo-browser/skills/browser-record/SKILL.md
index 938f1d6717..5887c5a70c 100644
--- a/plugins/ruflo-browser/skills/browser-record/SKILL.md
+++ b/plugins/ruflo-browser/skills/browser-record/SKILL.md
@@ -20,7 +20,7 @@ Primitive on which every other browser skill composes. Opens a named browser ses
1. **Allocate session id and RVF container**:
```bash
SID="$(date +%Y%m%d-%H%M%S)-${TASK_SLUG:-record}"
- npx -y [email protected] rvf create "$SID.rvf" --kind browser-session --dimension 384
+ npx -y [email protected] rvf create "$SID.rvf" --dimension 384
npx -y [email protected] hooks trajectory-begin --session-id "$SID" --task "$1"
```
2. **Open the browser** via `mcp__claude-flow__browser_open` with the URL.
diff --git a/ruflo/package.json b/ruflo/package.json
index 8003a309b9..ed9fca63db 100644
--- a/ruflo/package.json
+++ b/ruflo/package.json
@@ -1,6 +1,6 @@
{
"name": "ruflo",
- "version": "3.7.0-alpha.40",
+ "version": "3.7.0-alpha.42",
"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",
"main": "bin/ruflo.js",
"type": "module",
diff --git a/scripts/smoke-browser-rvf-create-flags.mjs b/scripts/smoke-browser-rvf-create-flags.mjs
index 456755dd94..c33cacab22 100644
--- a/scripts/smoke-browser-rvf-create-flags.mjs
+++ b/scripts/smoke-browser-rvf-create-flags.mjs
@@ -2,89 +2,88 @@
/**
* Regression guard for ruvnet/ruflo#2015.
*
- * [email protected]'s `rvf create` requires a `-d, --dimension <n>`
- * flag. ruflo-browser 0.2.0's `browser_session_record` MCP tool
- * invoked the command WITHOUT it, so every call failed with:
+ * `[email protected] rvf create` accepts only:
+ * -d, --dimension <n> (required)
+ * -m, --metric <metric> (optional, default cosine)
*
- * error: required option '-d, --dimension <n>' not specified
+ * It does NOT accept `--kind <value>` β€” commander's required-option
+ * check fires before its unknown-option check, so the original bug
+ * report only showed the dimension error. Stripping the bogus
+ * `--kind browser-session` was round 2 of the fix; this guard now
+ * polices BOTH invariants on every call site:
*
- * The fix passes `--dimension 384` (matches the MiniLM-L6 default
- * used by AgentDB indexes and the ONNX embedder). This script
- * statically scans every place we shell out to `ruvector rvf create`
- * across the repo and fails if any of them is missing the flag.
+ * - `--dimension` / `-d` is present
+ * - `--kind` is absent
*
- * Covers:
- * - TS source + compiled dist of the MCP tool
- * - Shell scripts in plugins/ruflo-browser/scripts/
- * - Doc snippets in plugins/ruflo-browser/{agents,skills}/*.md
- * (these are agent-facing recipes that get pasted into bashes β€”
- * if the doc is wrong, agents reproduce the broken call)
+ * Scans TS, compiled dist, shell scripts, and the markdown recipes
+ * agents copy-paste into bashes.
*/
import { readFileSync, existsSync } from 'node:fs';
-import { resolve, relative } from 'node:path';
-import { execSync } from 'node:child_process';
+import { resolve } from 'node:path';
const REPO_ROOT = resolve(process.cwd());
-// Find every file that mentions `rvf create` with the browser-session
-// kind. ripgrep is faster than glob+read; fall back to find+grep if rg
-// isn't on the runner.
-let hits;
-try {
- hits = execSync(
- `rg -l --no-messages "rvf.{0,8}create" -g '!node_modules' -g '!**/dist/**/*.map' -g '!.git'`,
- { cwd: REPO_ROOT, encoding: 'utf8' },
- )
- .split('\n')
- .filter(Boolean);
-} catch {
- hits = execSync(
- `grep -rl --exclude-dir=node_modules --exclude-dir=.git "rvf create" .`,
- { cwd: REPO_ROOT, encoding: 'utf8' },
- )
- .split('\n')
- .filter(Boolean);
-}
-
-// We only police call sites that pair `rvf create` with `--kind browser-session`.
-// Other `rvf create` uses (e.g. inside ruvector's own dist or unrelated kinds)
-// aren't in scope of #2015.
+// We police every `rvf create` call we control across the repo β€”
+// the original anchor (`--kind browser-session`) is gone post-fix, so
+// we have to identify call sites by path, not by content.
+const PATHS_IN_SCOPE = [
+ 'v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts',
+ 'v3/@claude-flow/cli/dist/src/mcp-tools/browser-session-tools.js',
+ 'plugins/ruflo-browser/scripts/replay-spike.sh',
+ 'plugins/ruflo-browser/agents/browser-agent.md',
+ 'plugins/ruflo-browser/skills/browser-record/SKILL.md',
+ 'plugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.md',
+];
const failures = [];
const checked = [];
-for (const rel of hits) {
+for (const rel of PATHS_IN_SCOPE) {
const path = resolve(REPO_ROOT, rel);
- if (!existsSync(path)) continue;
- // Skip worktree clones β€” they're not on the publish path and they
- // duplicate every finding.
- if (rel.includes('.claude/worktrees/')) continue;
- // Skip node_modules just in case the rg ignore didn't match.
- if (rel.includes('node_modules/')) continue;
- // Skip stale untracked dist/ at the repo root (the real published
- // dist lives under v3/@claude-flow/cli/dist/, which IS scanned).
- if (rel.startsWith('dist/') || rel.startsWith('./dist/')) continue;
- // Skip this script itself β€” its grep patterns aren't real calls.
- if (rel.endsWith('smoke-browser-rvf-create-flags.mjs')) continue;
+ if (!existsSync(path)) {
+ failures.push(`${rel} expected call-site file missing from checkout`);
+ continue;
+ }
const content = readFileSync(path, 'utf8');
-
- // Find every line that has both `rvf create` and `browser-session`.
- // Multi-line shell quoting is fine β€” the args we care about land
- // on the same line in every call site we control.
const lines = content.split('\n');
+
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
- if (!/rvf['"\s,]*create/.test(line)) continue;
- if (!/browser-session/.test(line)) continue;
+
+ // Two invocation shapes we police:
+ // - TS/JS array form: 'rvf', 'create' (comma-separated tokens)
+ // - Shell / markdown: rvf create (whitespace-separated, not
+ // enclosed in a single quoted string)
+ const isArrayCall = /['"]rvf['"]\s*,\s*['"]create['"]/.test(line);
+ const isShellCall = /(^|[^'"`])\brvf\s+create\b(?!\s*(failed|succeeded))/.test(line);
+ if (!isArrayCall && !isShellCall) continue;
+
+ // Skip lines whose `rvf create` only appears inside a quoted
+ // string literal (e.g. an error message like `'rvf create failed'`).
+ // The /failed|succeeded/ negative-lookahead above usually catches it,
+ // but belt-and-suspenders for other literal strings.
+ if (/['"`][^'"`]*rvf\s+create[^'"`]*['"`]/.test(line) && !isArrayCall) {
+ continue;
+ }
+
+ // Skip comments.
+ const trimmed = line.trim();
+ if (/^(#|\/\/|\*)/.test(trimmed)) continue;
checked.push(`${rel}:${i + 1}`);
- // Accept either flag form: `--dimension <n>` or `-d <n>`.
- const hasFlag = /--dimension\b|(^|[^a-zA-Z0-9_])-d\b/.test(line);
- if (!hasFlag) {
+ // Required: --dimension or -d
+ const hasDim = /--dimension\b|(^|[^a-zA-Z0-9_])-d\b/.test(line);
+ if (!hasDim) {
failures.push(`${rel}:${i + 1} missing --dimension on rvf create`);
}
+
+ // Forbidden: --kind ([email protected] rejects it as unknown option)
+ const hasKind = /--kind\b/.test(line);
+ if (hasKind) {
+ failures.push(`${rel}:${i + 1} carries bogus --kind flag (unknown option in [email protected])`);
+ }
}
}
diff --git a/v3/@claude-flow/cli/package.json b/v3/@claude-flow/cli/package.json
index 59b4a2831e..efb96677af 100644
--- a/v3/@claude-flow/cli/package.json
+++ b/v3/@claude-flow/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@claude-flow/cli",
- "version": "3.7.0-alpha.40",
+ "version": "3.7.0-alpha.42",
"type": "module",
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
"main": "dist/src/index.js",
@@ -109,7 +109,7 @@
"@claude-flow/codex": "^3.0.0-alpha.8",
"@claude-flow/embeddings": "^3.0.0-alpha.17",
"@claude-flow/guidance": "^3.0.0-alpha.1",
- "@claude-flow/memory": "^3.0.0-alpha.14",
+ "@claude-flow/memory": "^3.0.0-alpha.16",
"@claude-flow/plugin-gastown-bridge": "^0.1.3",
"@claude-flow/security": "^3.0.0-alpha.1",
"@ruvector/attention": "^0.1.32",
diff --git a/v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts
index 6352cbf209..1eddd1e029 100644
--- a/v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts
+++ b/v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts
@@ -113,14 +113,20 @@ export const browserSessionTools: MCPTool[] = [
const rvfPath = path.join(dir, `${sessionId}.rvf`);
// 1. RVF allocate.
- // Issue #2015: [email protected] requires `-d, --dimension <n>` for
- // `rvf create`. Without it the command exits non-zero and the
- // tool returned `{ success: false, error: "rvf create failed" }`
- // for every invocation. 384 matches the MiniLM-L6 default used by
- // the rest of the toolchain (ONNX embedder + AgentDB indexes).
+ // Issue #2015: [email protected]'s `rvf create` accepts only
+ // `-d/--dimension <n>` (required) and `-m/--metric <metric>`.
+ // The wrapper previously passed `--kind browser-session` and
+ // omitted `--dimension`, so commander hit the required-option
+ // check first and the wrapper returned `rvf create failed` for
+ // every call. The second round of the fix strips the bogus
+ // `--kind` flag β€” when round 1 only added `--dimension`, the
+ // next call surfaced `error: unknown option '--kind'`.
+ //
+ // 384 matches the MiniLM-L6 default used elsewhere in the
+ // toolchain (ONNX embedder + AgentDB vector indexes).
const rvf = await shell(
'npx',
- ['-y', RUVECTOR_PIN, 'rvf', 'create', rvfPath, '--kind', 'browser-session', '--dimension', '384'],
+ ['-y', RUVECTOR_PIN, 'rvf', 'create', rvfPath, '--dimension', '384'],
{ timeout: 60000 },
);
if (!rvf.success) return fail('rvf create failed', { detail: rvf.error, stderr: rvf.stderr, sessionId, rvfPath });
diff --git a/v3/@claude-flow/memory/package.json b/v3/@claude-flow/memory/package.json
index 2001f19b60..254a5c333d 100644
--- a/v3/@claude-flow/memory/package.json
+++ b/v3/@claude-flow/memory/package.json
@@ -1,6 +1,6 @@
{
"name": "@claude-flow/memory",
- "version": "3.0.0-alpha.15",
+ "version": "3.0.0-alpha.16",
"type": "module",
"description": "Memory module - AgentDB unification, HNSW indexing, vector search, hybrid SQLite+AgentDB backend (ADR-009)",
"main": "dist/index.js",