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(console): read the project on Windows: a drive path is absolute, so the cwd is not prefixed twice (#4175)

r9405bed86336
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.json
index 2ab67a82de..033a42df50 100644
--- a/plugins/ruflo-console/.claude-plugin/plugin.json
+++ b/plugins/ruflo-console/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "ruflo-console",
"description": "ruflo's cockpit inside Claude Code and the one /ruflo command for every ruflo mod (function hooks, early access). Views: overview with health alerts, swarm topology graph, claims flow with TTL rings, federation map, plugin health matrix, learning curve and pipeline, MetaHarness radar and audit trend, memory, cost gauge, agent timeline, approvals queue, event stream, a main menu, an x.ruv.io federation board, an AI terminal (codex, claude or both in remembered sessions, streamed), Skills (npx skills), a Hive-Mind view, a MetaHarness lab, agent drill-down; a command palette for confirm-gated actions through the ruflo CLI; a band above the prompt. Reads ruflo's files and the CLI's local JSON; anything not measured reads n/a. The one network call it makes by itself is a daily read of the published plugin.json at github.com/ruvnet/ruflo to offer an update (Settings → Updates: ask, auto, or off); it installs only through Claude Code's own claude plugin update, and never a new major version without asking.",
- "version": "0.43.5",
+ "version": "0.43.6",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-console/CHANGELOG.md b/plugins/ruflo-console/CHANGELOG.md
index ceeedc50c6..9efc8765ad 100644
--- a/plugins/ruflo-console/CHANGELOG.md
+++ b/plugins/ruflo-console/CHANGELOG.md
@@ -2,6 +2,9 @@
Newest first. One `## <version> — <date>` heading per version, then `feat:`, `fix:`, `breaking:` and `chore:` bullets (ADR-478). Built from git history; older versions: `git log -- plugins/ruflo-console`.
+## 0.43.6 — 2026-10-14
+- fix: the console reads the project on Windows (#4175, thanks @GangOn0215). Every path under the working directory came out as `C:\dev\app/C:\dev\app/.claude-flow/...` (the working directory prefixed twice, because the host wrapper counted only a leading `/` as absolute), so every read failed with ENOENT, the project showed as "Unregistered" and the pane never opened on its own. A drive path (`C:\x` or `C:/x`) and a UNC share (`\\server\share`) now count as absolute (`hooks/data/abs-path.ts`). Tested on win32-style paths only: no Windows machine was available to run the pane. The same leading-`/` test still guards a few other spots (ADR folder, event export, workflow file, mission cost, plugin catalog); those refuse Windows paths rather than misplace them, and are left to the Windows work in #4036.
+
## 0.43.5 — 2026-10-12
- fix: the Skills page runs a pinned skills CLI (`[email protected]`, like the AI page's pinned Codex) instead of whatever npm `latest` is: `npx -y skills` fetched and ran the newest release on every visit to the page (it lists on open) and on every add, remove, update, init and use, with the person's permissions. The hints name the pin from one constant. The pin fixes the top-level package only: its own dependencies (tar, yaml) are npm ranges resolved on the first fetch, and the first run needs the network. 1.7.2 is published by vercel-labs/skills with no install-time scripts (#4113, thanks @martinvlad)
diff --git a/plugins/ruflo-console/hooks/data/abs-path.ts b/plugins/ruflo-console/hooks/data/abs-path.ts
new file mode 100644
index 0000000000..8fa494c03f
--- /dev/null
+++ b/plugins/ruflo-console/hooks/data/abs-path.ts
@@ -0,0 +1,5 @@
+/** Absolute on either family: `/posix`, a drive path (`C:\x` or `C:/x`) or a UNC share (`\\server\share`). A bare `C:` or `C:x` is drive-relative, so it is not. */
+export const isAbsolutePath = (path: string): boolean => path.startsWith('/') || path.startsWith('\\\\') || /^[A-Za-z]:[\\/]/.test(path)
+
+/** The path under the working directory unless it already is absolute (`under()` builds `C:\dev\app/.claude-flow/...` on Windows: prefixing that again was #4175). */
+export const rootedPath = (cwd: string, path: string): string => (isAbsolutePath(path) ? path : `${cwd.replace(/[\\/]+$/, '')}/${path}`)
diff --git a/plugins/ruflo-console/hooks/register.ts b/plugins/ruflo-console/hooks/register.ts
index 5bffc3939e..a91838642c 100644
--- a/plugins/ruflo-console/hooks/register.ts
+++ b/plugins/ruflo-console/hooks/register.ts
@@ -1,7 +1,7 @@
import type { EngineInterface, PluginOptions, Register } from 'claude-code'
import { tolerantPress } from './press-guard'
import { ANSWER_KEYS } from './views/attention'
-
+import { rootedPath } from './data/abs-path'
import { createController, type Controller } from './controller'
import { startSessions } from './sessions'
import { record } from './data/events'
@@ -40,7 +40,7 @@ const RUFLO_TOOL = /^mcp__(claude-flow|ruflo|plugin_ruflo[\w-]*)__/
let isResettingScroll = false
function hostOf($: EngineInterface, cwd: string, toasts: { prefs: () => ToastPrefs; record: (digest: Digest) => void }): Host {
- const rooted = (path: string) => (path.startsWith('/') ? path : `${cwd.replace(/\/+$/, '')}/${path}`)
+ const rooted = (path: string) => rootedPath(cwd, path)
const quietly = (fn: () => unknown) => {
try {
const result = fn()
diff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.ts
index eadcfad5d1..02b40ecfb2 100644
--- a/plugins/ruflo-console/hooks/version.ts
+++ b/plugins/ruflo-console/hooks/version.ts
@@ -2,4 +2,4 @@
* The console's version, shown on the header so a person can tell which build is running. Kept equal to the plugin's manifest
* (`.claude-plugin/plugin.json`); tests/version.spec.ts fails if the two drift.
*/
-export const CONSOLE_VERSION = '0.43.5'
+export const CONSOLE_VERSION = '0.43.6'
diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.sh
index 0ca19cb670..88fa72af60 100755
--- a/plugins/ruflo-console/scripts/smoke.sh
+++ b/plugins/ruflo-console/scripts/smoke.sh
@@ -11,9 +11,9 @@ step() { printf "→ %s ... " "$1"; }
ok() { printf "PASS\n"; PASS=$((PASS+1)); }
bad() { printf "FAIL: %s\n" "$1"; FAIL=$((FAIL+1)); }
-step "1. plugin.json declares ruflo-console 0.43.5"
+step "1. plugin.json declares ruflo-console 0.43.6"
grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \
- && grep -q '"version": "0.43.5"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
+ && grep -q '"version": "0.43.6"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
step "2. hooks.json names exactly one module and no classic hook commands"
grep -q '"modules": \["./register.ts"\]' "$HOOKS/hooks.json" && ! grep -q '"command"' "$HOOKS/hooks.json" \
diff --git a/plugins/ruflo-console/tests/abs-path.spec.ts b/plugins/ruflo-console/tests/abs-path.spec.ts
new file mode 100644
index 0000000000..f31c89513f
--- /dev/null
+++ b/plugins/ruflo-console/tests/abs-path.spec.ts
@@ -0,0 +1,46 @@
+import { describe, expect, it } from 'vitest'
+import { isAbsolutePath, rootedPath } from '../hooks/data/abs-path'
+
+// #4175: on Windows the working directory is `C:\dev\app`, so `under(cwd, ...)` returns `C:\dev\app/.claude-flow/...`.
+// The host wrapper used to treat only a leading `/` as absolute and prefixed the cwd a second time.
+describe('absolute paths, POSIX and Windows (#4175)', () => {
+ it('knows a rooted path on both families', () => {
+ for (const path of ['/home/a/b', 'C:\\dev\\app', 'C:/dev/app', 'c:\\x', 'Z:/', '\\\\server\\share\\x', 'C:\\dev\\app/.claude-flow/console/events.jsonl']) {
+ expect(isAbsolutePath(path), path).toBe(true)
+ }
+ })
+
+ it('treats a relative path, a bare drive and a drive-relative path as relative', () => {
+ for (const path of ['.claude-flow/config.yaml', 'a/b', '', 'C:', 'C:foo', '..\\x', 'dev/C:/x']) {
+ expect(isAbsolutePath(path), path).toBe(false)
+ }
+ })
+
+ it('never prefixes the working directory twice (the doubled path of the issue)', () => {
+ const cwd = 'C:\\dev\\app'
+ const built = `${cwd}/.claude-flow/console/events.jsonl`
+
+ expect(rootedPath(cwd, built)).toBe(built)
+ expect(rootedPath(cwd, built)).not.toContain('app\\C:')
+ expect(rootedPath('C:/dev/app', 'C:/dev/app/x')).toBe('C:/dev/app/x')
+ expect(rootedPath('/home/a', '/home/a/x')).toBe('/home/a/x')
+ expect(rootedPath('\\\\srv\\share\\app', '\\\\srv\\share\\app/x')).toBe('\\\\srv\\share\\app/x')
+ })
+
+ it('still roots a relative path, and trims trailing separators of either kind', () => {
+ expect(rootedPath('/home/a/', '.claude-flow/x')).toBe('/home/a/.claude-flow/x')
+ expect(rootedPath('C:\\dev\\app\\', '.claude-flow/x')).toBe('C:\\dev\\app/.claude-flow/x')
+ expect(rootedPath('C:\\dev\\app', 'a/b')).toBe('C:\\dev\\app/a/b')
+ })
+})
+
+describe('the host wrapper uses it (#4175)', () => {
+ it('register.ts roots host paths through rootedPath, not an inline leading-slash test', async () => {
+ const { readFileSync } = await import('node:fs')
+ const source = readFileSync(new URL('../hooks/register.ts', import.meta.url), 'utf8')
+
+ expect(source).toContain("import { rootedPath } from './data/abs-path'")
+ expect(source).toContain('rootedPath(cwd, path)')
+ expect(source).not.toMatch(/path\.startsWith\('\/'\) \? path/)
+ })
+})