From 3d6ccf389fb72d86998afa11e50abaf9f369f744 Mon Sep 17 00:00:00 2001 From: Dragan Spiridonov Date: Sun, 11 Oct 2026 18:41:53 +0200 Subject: [PATCH 1/2] fix(console): console_state reports an expired confirm card as lastResult.expired #3985 sets Outcome.expired when a card nobody answered is cleared, and its description says console_state returns that as lastResult. lastResult was built from label, ok, detail and lines only, so Claude saw ok:false and had to parse the detail text. Pass the flag through when it is set. --- plugins/ruflo-console/hooks/model-tools.ts | 2 +- .../ruflo-console/tests/pending-expiry.spec.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/plugins/ruflo-console/hooks/model-tools.ts b/plugins/ruflo-console/hooks/model-tools.ts index 8360232cfa..a0d9fe2471 100644 --- a/plugins/ruflo-console/hooks/model-tools.ts +++ b/plugins/ruflo-console/hooks/model-tools.ts @@ -215,7 +215,7 @@ function stateJson(deps: ModelToolDeps, filter: string): string { title: VIEWS.find(view => view.id === state.view)?.label ?? state.view, screen, waiting: state.pending === null ? null : { ...(askedBy(state.pending) !== '' && { askedBy: askedBy(state.pending).replace(/: $/, '') }), label: modelLine(state.pending.label, 120), expect: modelLine(state.pending.expect, 160), note: state.pending.note === undefined ? undefined : modelLine(state.pending.note, 160) }, - lastResult: state.outcome === null ? null : { label: modelLine(state.outcome.label, 100), ok: state.outcome.ok, detail: modelLine(state.outcome.detail, 200), lines: (state.outcome.lines ?? []).slice(0, 12).map(line => modelLine(line, 160)) }, + lastResult: state.outcome === null ? null : { label: modelLine(state.outcome.label, 100), ok: state.outcome.ok, detail: modelLine(state.outcome.detail, 200), lines: (state.outcome.lines ?? []).slice(0, 12).map(line => modelLine(line, 160)), ...(state.outcome.expired === true && { expired: true }) }, entries, entryCount: all.length, entriesNote: entries.length < (words.length === 0 ? all.length : entries.length) || (words.length > 0 && entries.length === 40) ? 'the list is cut: pass filter (words in an id or label) to find other entries' : undefined, diff --git a/plugins/ruflo-console/tests/pending-expiry.spec.ts b/plugins/ruflo-console/tests/pending-expiry.spec.ts index 9e567eb94a..b64d26cd8d 100644 --- a/plugins/ruflo-console/tests/pending-expiry.spec.ts +++ b/plugins/ruflo-console/tests/pending-expiry.spec.ts @@ -169,6 +169,24 @@ describe('console_run with a stale or withdrawable card', () => { expect(state.events.some(event => /expired after 30 s, not run/.test(event.text))).toBe(true) }) + it('console_state hands the expiry to Claude as lastResult.expired, and an ordinary result carries no such field', async () => { + const { state, deps, age } = modelSetup() + + expect(await callTool('console_run', { id: 'mem-store', text: 'console k1 v1' }, deps)).toMatch(/Waiting for the person/) + age() + + const expired = JSON.parse(await callTool('console_state', {}, deps)) as { waiting: unknown; lastResult: { ok: boolean; detail: string; expired?: boolean } | null } + + expect(expired.waiting).toBeNull() + expect(expired.lastResult).toMatchObject({ ok: false, expired: true }) + expect(expired.lastResult?.detail).toMatch(/^expired: ask again/) + + state.outcome = { label: 'store a note', ok: true, verified: 'n/a', detail: 'stored', atMs: Date.now() } + const ordinary = JSON.parse(await callTool('console_state', {}, deps)) as { lastResult: Record | null } + + expect(ordinary.lastResult).not.toHaveProperty('expired') + }) + it('console_run ask-withdraw takes back Claude’s own write-class card; nothing runs', async () => { const { state, deps, ran } = modelSetup() From 5caaa53a1bfae9e3aa83edd74239b4017a0fbe3d Mon Sep 17 00:00:00 2001 From: RuFlo Date: Mon, 12 Oct 2026 13:55:22 -0400 Subject: [PATCH 2/2] chore(console): 0.43.3 for the console_state expired flag (#4067) Co-Authored-By: RuFlo --- plugins/ruflo-console/.claude-plugin/plugin.json | 2 +- plugins/ruflo-console/CHANGELOG.md | 3 +++ plugins/ruflo-console/hooks/version.ts | 2 +- plugins/ruflo-console/scripts/smoke.sh | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.json index a91951dc3c..145f2747e7 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.1", + "version": "0.43.3", "author": { "name": "ruvnet", "url": "https://github.com/ruvnet" diff --git a/plugins/ruflo-console/CHANGELOG.md b/plugins/ruflo-console/CHANGELOG.md index e5d0b3e4d8..dbb5326e44 100644 --- a/plugins/ruflo-console/CHANGELOG.md +++ b/plugins/ruflo-console/CHANGELOG.md @@ -2,6 +2,9 @@ Newest first. One `## — ` 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.3 — 2026-10-12 +- fix: `console_state` tells Claude that a confirm card expired: `lastResult` carries `expired: true` after a card nobody answered was cleared unrun at 30 s (the runner already set the flag; the tool left it out), so Claude can tell "you did not answer" from a run that failed without reading the detail text. An ordinary result has no `expired` field (#3985 follow-up, thanks @proffesor-for-testing, #4067) + ## 0.43.1 — 2026-10-12 - fix: `ruflo tui` marks the page on screen in the page bar: on the AI page it kept the previous page lit (`5 Missions`, or `1 Overview` after a number key) because the bar was painted from the console view the session last showed and the AI page is not one; it is now drawn from the page itself, through Tab, Shift-Tab, letters, digits and resize - fix: `ruflo tui --help` and the console README list the page keys as `1-6` and `o c s e m a` (they said `1-5`); a test holds the help text diff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.ts index dd0b099a7d..9d7e2133dd 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.1' +export const CONSOLE_VERSION = '0.43.3' diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.sh index 85e94c4e3f..8c655f440c 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.1" +step "1. plugin.json declares ruflo-console 0.43.3" grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \ - && grep -q '"version": "0.43.1"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version" + && grep -q '"version": "0.43.3"' "$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" \