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): bind every confirm route to the card the person saw (#3983), version 0.42.5

r91aa4eef5979
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.json
index 2f07a17e98..4d2c9cad0b 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.42.4",
+ "version": "0.42.5",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-console/CHANGELOG.md b/plugins/ruflo-console/CHANGELOG.md
index 16673da7ed..686ea94304 100644
--- a/plugins/ruflo-console/CHANGELOG.md
+++ b/plugins/ruflo-console/CHANGELOG.md
@@ -2,6 +2,10 @@
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.42.5 — 2026-10-10
+- fix: every confirm route answers the card the person saw. A typed /ruflo yes answers only a card that was put in front of you (drawn in the open pane, or named in the answer to your own /ruflo run) and /ruflo yes <id> names its card; otherwise it runs nothing and says the card's id (#3983)
+- fix: Enter again in the terminal, skills and automation fields answers the card that field raised, by its id, not a later card that merely reads the same; an auto-confirmed Claude call settles only the card it started, so an unrelated write that lands while a read is still running is left to the person (#3983)
+
## 0.42.4 — 2026-10-10
- fix: a confirm card nobody answers is cleared unrun at 30 s on the console's own clock, with one event and "expired: ask again" as the last result, so it no longer blocks every later Claude action; a Yes after the window still runs nothing, and the Room stops counting past 30 s (#3984)
- feat: Claude can withdraw its own waiting write ask (console_run ask-withdraw), never the person's card and never a spend, install, network or delete card; at most 3 a minute, with a cooldown on re-asking the same thing (#3984)
diff --git a/plugins/ruflo-console/hooks/dispatch.ts b/plugins/ruflo-console/hooks/dispatch.ts
index 1597a64c1a..806961e8a3 100644
--- a/plugins/ruflo-console/hooks/dispatch.ts
+++ b/plugins/ruflo-console/hooks/dispatch.ts
@@ -133,7 +133,7 @@ export async function dispatch(control: Controller, state: State, args: string,
// The answer puts this card in front of the person, so a bare /ruflo yes may answer it (and only it).
state.shownCard = pending.id ?? null
- return { text: [`Asked: ${pending.label}. Confirm with /ruflo yes (or y in the pane; /ruflo yes ${pending.id ?? '<id>'} names this card), cancel with /ruflo no.`, ...(pending.shows === undefined ? [] : [`runs: ${pending.shows}`, pending.note ?? ''])].filter(Boolean).join('\n') }
+ return { text: [`Asked: ${pending.label}. Confirm with /ruflo yes (or y in the pane), cancel with /ruflo no.`, ...(pending.shows === undefined ? [] : [`runs: ${pending.shows}`, pending.note ?? ''])].filter(Boolean).join('\n') }
}
return { text: (missionAnswer(state, intent.paletteId) ?? xruvAnswer(state, intent.paletteId, askedAtMs) ?? labAnswer(state, intent.paletteId, askedAtMs) ?? skillsAnswer(state, intent.paletteId, askedAtMs)) ?? (state.outcome !== null && !state.outcome.ok ? `${state.outcome.label}: ${state.outcome.detail}` : (state.outcome?.label ?? 'done')) }
diff --git a/plugins/ruflo-console/hooks/model-fields.ts b/plugins/ruflo-console/hooks/model-fields.ts
new file mode 100644
index 0000000000..66e20ad293
--- /dev/null
+++ b/plugins/ruflo-console/hooks/model-fields.ts
@@ -0,0 +1,40 @@
+/** The fields Claude's console_set may fill (ADR-444): each goes through the same action the page's own field does. Split out of model-tools.ts to keep it under 500 lines. */
+import type { ModelToolDeps } from './model-tools'
+import { DEV_FIELDS } from './data/devtools'
+import { PROFILES, RIGORS } from './goap'
+import { setResearch } from './mission-control'
+import { RESEARCH_DEPTHS } from './mission-options'
+
+export const SET_FIELDS = ['goal', 'profile', 'rigor', 'research.question', 'research.depth', 'research.cap', 'cost.budget'] as const
+
+/** `line` is the console's one model-facing sanitiser (model-tools.ts modelLine): the field name is the model's own text. */
+export function setField(deps: ModelToolDeps, field: string, value: string, line: (raw: unknown, max: number) => string): string | null {
+ const { state, control } = deps
+ const { mission } = control.actions
+
+ if (field === 'goal') mission.goal(value)
+ else if (field === 'profile') {
+ const found = PROFILES.find(profile => profile.id === value)
+
+ if (found === undefined) return `profile must be one of ${PROFILES.map(profile => profile.id).join(', ')}`
+ mission.profile(found.id)
+ } else if (field === 'rigor') {
+ const found = RIGORS.find(rigor => rigor === value)
+
+ if (found === undefined) return `rigor must be one of ${RIGORS.join(', ')}`
+ mission.rigor(found)
+ } else if (field === 'research.question') setResearch(state, { question: value })
+ else if (field === 'research.depth') {
+ const found = RESEARCH_DEPTHS.find(depth => depth === value)
+
+ if (found === undefined) return `research.depth must be one of ${RESEARCH_DEPTHS.join(', ')}`
+ setResearch(state, { depth: found })
+ } else if (field === 'research.cap') setResearch(state, { cap: value })
+ else if (field === 'cost.budget') control.actions.costBudgetDraft(value)
+ else if (field.startsWith('dev.') && DEV_FIELDS.includes(field.slice(4) as never)) control.actions.devtools.draft(field.slice(4) as never, value)
+ else return `unknown field "${line(field, 40)}". Fields: ${[...SET_FIELDS, 'dev.<field>'].join(', ')}`
+
+ control.host.invalidate()
+
+ return null
+}
diff --git a/plugins/ruflo-console/hooks/model-tools.ts b/plugins/ruflo-console/hooks/model-tools.ts
index b3d1a2467f..8360232cfa 100644
--- a/plugins/ruflo-console/hooks/model-tools.ts
+++ b/plugins/ruflo-console/hooks/model-tools.ts
@@ -11,10 +11,8 @@ import type { Register } from 'claude-code'
import type { Controller } from './controller'
import { ESCAPES, INVISIBLE, plain } from './data/parse'
import { askedBy } from './data/room'
-import { DEV_FIELDS } from './data/devtools'
-import { PROFILES, RIGORS } from './goap'
-import { mcOf, setResearch } from './mission-control'
-import { RESEARCH_DEPTHS } from './mission-options'
+import { mcOf } from './mission-control'
+import { setField as setFieldOf } from './model-fields'
import { filterPalette, paletteEntries, WITHDRAW_ID, withdrawHint } from './palette'
import { isStale } from './runner'
import { hasSecret } from './screen'
@@ -231,39 +229,6 @@ function optionChips(state: State): Map<string, string> {
return new Map(pluginNames(state, (catalogOf(state).plugins ?? []).filter(plugin => plugin.options.length > 0).map(plugin => plugin.name)).map(name => [name.replace(/^ruflo-/, ''), name]))
}
-const SET_FIELDS = ['goal', 'profile', 'rigor', 'research.question', 'research.depth', 'research.cap', 'cost.budget'] as const
-
-function setField(deps: ModelToolDeps, field: string, value: string): string | null {
- const { state, control } = deps
- const { mission } = control.actions
-
- if (field === 'goal') mission.goal(value)
- else if (field === 'profile') {
- const found = PROFILES.find(profile => profile.id === value)
-
- if (found === undefined) return `profile must be one of ${PROFILES.map(profile => profile.id).join(', ')}`
- mission.profile(found.id)
- } else if (field === 'rigor') {
- const found = RIGORS.find(rigor => rigor === value)
-
- if (found === undefined) return `rigor must be one of ${RIGORS.join(', ')}`
- mission.rigor(found)
- } else if (field === 'research.question') setResearch(state, { question: value })
- else if (field === 'research.depth') {
- const found = RESEARCH_DEPTHS.find(depth => depth === value)
-
- if (found === undefined) return `research.depth must be one of ${RESEARCH_DEPTHS.join(', ')}`
- setResearch(state, { depth: found })
- } else if (field === 'research.cap') setResearch(state, { cap: value })
- else if (field === 'cost.budget') control.actions.costBudgetDraft(value)
- else if (field.startsWith('dev.') && DEV_FIELDS.includes(field.slice(4) as never)) control.actions.devtools.draft(field.slice(4) as never, value)
- else return `unknown field "${modelLine(field, 40)}". Fields: ${[...SET_FIELDS, 'dev.<field>'].join(', ')}`
-
- control.host.invalidate()
-
- return null
-}
-
/**
* An action the console queued (a palette entry, or the follow-up a field raised) is held to the same rules: above the level it is
* cancelled and nothing runs; in ask mode it waits for the person; in auto mode it confirms and reports. Null when nothing is pending.
@@ -428,14 +393,14 @@ async function answer(name: string, input: Record<string, unknown>, deps: ModelT
const askedAt = Date.now()
const call = ++state.control.callSeq
- const problem = asModel(state, () => setField(deps, field, value), call)
+ const problem = asModel(state, () => setFieldOf(deps, field, value, modelLine), call)
if (problem !== null) return refuse(`set ${field}`, problem)
say(state, name, `set ${field}`, 'ok', value)
// Some fields raise a follow-up themselves (a goal is planned, then guidance is offered): it is held to the same rules.
- const queued = await settlePending(deps, name, `after set ${field}`, askedAt, { call, card: state.pending?.id ?? null })
+ const queued = await settlePending(deps, name, `after set ${field}`, askedAt, { call, card: (state as { pending: Pending | null }).pending?.id ?? null })
return `Set ${field}.${queued === null ? ' It is only filled in: run a console entry to act on it.' : ` The console then queued a follow-up. ${queued.text}`}`
}
diff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.ts
index 63a16fdb59..7ef78a993f 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.42.4'
+export const CONSOLE_VERSION = '0.42.5'
diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.sh
index 2864946206..86a7239c9d 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.42.4"
+step "1. plugin.json declares ruflo-console 0.42.5"
grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \
- && grep -q '"version": "0.42.4"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
+ && grep -q '"version": "0.42.5"' "$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/confirm-binding.spec.ts b/plugins/ruflo-console/tests/confirm-binding.spec.ts
index 383123c535..5c8b40155a 100644
--- a/plugins/ruflo-console/tests/confirm-binding.spec.ts
+++ b/plugins/ruflo-console/tests/confirm-binding.spec.ts
@@ -109,7 +109,7 @@ describe('a typed /ruflo yes names its card or answers only the card the person
const { state, say } = console$()
const asked = await say('run mem-store console k1 v1')
- expect(asked.text).toMatch(/Asked: .*\/ruflo yes \d+ names this card/)
+ expect(asked.text).toMatch(/^Asked: /)
expect(state.pending).not.toBeNull()
expect(state.shownCard).toBe(state.pending?.id)
vi.advanceTimersByTime(4_000)