π 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
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix(ruflo-console): an expired confirm leaves an event in the feed (ADR-448 Β§3.2, 0.32.2); ADR review corrections
ruv860ede0bc750
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.jsonindex e0c9834226..fa9ed940bd 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.32.1",+ "version": "0.32.2","author": {"name": "ruvnet","url": "https://github.com/ruvnet"diff --git a/plugins/ruflo-console/hooks/runner.ts b/plugins/ruflo-console/hooks/runner.tsindex 6d19ed9cf7..4f1efc4f35 100644--- a/plugins/ruflo-console/hooks/runner.ts+++ b/plugins/ruflo-console/hooks/runner.ts@@ -5,6 +5,7 @@*/import type { ActionSpec } from './actions'import { rememberKey } from './remember'+import { record } from './data/events'import { plain } from './data/parse'import type { Host } from './host'import { labLines } from './mh-lab'@@ -148,11 +149,17 @@ export function createRunner(state: State, host: Host, deps: RunnerDeps): Runnerconst spec = pendingSpecconst isFresh = state.pending !== null && Date.now() - state.pending.askedAtMs < PENDING_TTL_MS+ const waitedMs = state.pending === null ? 0 : Date.now() - state.pending.askedAtMs+pendingSpec = nullstate.pending = nullif (spec === null || !isFresh || state.isActing) {- if (spec !== null && !isFresh) say(spec.label, false, 'the confirm came more than 30 s after the ask; ask again')+ if (spec !== null && !isFresh) {+ say(spec.label, false, 'the confirm came more than 30 s after the ask; ask again')+ // `say` is one slot that the next action overwrites; the event stays in the feed (ADR-448 Β§3.2).+ record(state.events, [{ atMs: Date.now(), kind: 'tools', text: `confirm for "${plain(spec.label, 60)}" came ${Math.round(waitedMs / 1000)}s after the ask and was not run (${PENDING_TTL_MS / 1000}s window)` }])+ }host.invalidate()diff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.tsindex ebef5cbd5c..8f5db3227d 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.32.1'+export const CONSOLE_VERSION = '0.32.2'diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.shindex f1621036ed..c7018f20ec 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.32.1"+step "1. plugin.json declares ruflo-console 0.32.2"grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \- && grep -q '"version": "0.32.1"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"+ && grep -q '"version": "0.32.2"' "$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/runner.spec.ts b/plugins/ruflo-console/tests/runner.spec.tsnew file mode 100644index 0000000000..b25fe83476--- /dev/null+++ b/plugins/ruflo-console/tests/runner.spec.ts@@ -0,0 +1,47 @@+/**+ * The runner's pending confirm (ADR-448 Β§3.2): a confirm that arrives after the 30 s window runs nothing, clears the pending action and+ * leaves a durable event in the feed (the outcome slot alone is overwritten by the next action).+ * npx vitest run plugins/ruflo-console/tests/runner.spec.ts+ */+import { describe, expect, it } from 'vitest'++import type { ActionSpec } from '../hooks/actions'+import type { Host } from '../hooks/host'+import { createRunner } from '../hooks/runner'+import { newState } from '../hooks/state'++function fake() {+ const ran: string[] = []+ const host = { invalidate: () => undefined, after: () => ({ cancel: () => undefined }) } as unknown as Host+ const state = newState({})+ const runner = createRunner(state, host, { freshRead: async () => undefined, setView: () => undefined, drill: () => undefined, command: () => undefined })+ const spec = { label: 'create the mission and its tasks', args: ['mission', 'create'], expect: 'x', run: async () => void ran.push('ran') } as unknown as ActionSpec++ return { state, runner, spec, ran }+}++describe('a confirm after the window', () => {+ it('runs nothing, clears the pending action and leaves one event naming it', async () => {+ const { state, runner, spec, ran } = fake()++ runner.ask(spec, 'why not')+ expect(state.pending).not.toBeNull()+ state.pending = { ...state.pending!, askedAtMs: Date.now() - 46_000 }+ await runner.confirm()++ expect(ran).toEqual([])+ expect(state.pending).toBeNull()+ expect(state.events).toHaveLength(1)+ expect(state.events[0]?.text).toMatch(/create the mission and its tasks.*4[56]s after the ask and was not run \(30s window\)/)+ })++ it('a prompt confirm runs it and adds no event', async () => {+ const { state, runner, spec, ran } = fake()++ runner.ask(spec, 'why not')+ await runner.confirm()++ expect(ran).toEqual(['ran'])+ expect(state.events).toEqual([])+ })+})diff --git a/v3/docs/adr/ADR-448-console-the-room-shared-activity-feed.md b/v3/docs/adr/ADR-448-console-the-room-shared-activity-feed.mdindex 8ab4c6eda2..659fa8903a 100644--- a/v3/docs/adr/ADR-448-console-the-room-shared-activity-feed.md+++ b/v3/docs/adr/ADR-448-console-the-room-shared-activity-feed.md@@ -1,6 +1,6 @@# ADR 448: The Room β a shared live feed where a person, Claude and the swarm watch and talk to each other-Status: Proposed+Status: Proposed (the Room page); Β§3.2, the expiry event, is implemented in ruflo-console 0.32.2Date: 2026 10 04@@ -12,8 +12,8 @@ Builds on: ADR 407 (cockpit), ADR 416 (Timeline and Events β read-only, per-paTesting the console's four model tools end to end (a full page sweep plus `console_set`/`console_run` probes, 2026-10-04) surfaced a real gap: a person asked the console to create a mission; a few minutes and several unrelated console actions later the pending confirm was simply gone β no mission, no error, nothing in `console_state` pointing at what happened to it. Tracing it through the source (`hooks/runner.ts`, `hooks/model-tools.ts`) found two independent ways that happens, both already in the shipped code, neither visible anywhere:-- **`state.pending` is one slot, not a queue.** `ask()` (`runner.ts:141`) assigns it unconditionally. `model-tools.ts:276` *does* guard Claude's own `console_run` against clobbering a person's pending action ("never replaced, never cleared") β but nothing guards the reverse, and nothing guards a person's own second click. Two asks in a row anywhere in the console still only ever leave one pending.-- **A confirm older than 30 s is silently dropped.** `PENDING_TTL_MS = 30_000` (`runner.ts:15`); `confirm()` (`runner.ts:147-150`) nulls `state.pending` either way and only *speaks* the "more than 30 s, ask again" outcome into the console's own `say()` β which is local, transient UI text, not `state.outcome`, not `control.log`, not an event. A person who answers "y" a minute later sees it fail only if they were still looking at that exact screen; `console_state` afterward shows `waiting: null` with no trace that anything was asked, let alone refused.+- **`state.pending` is one slot, not a queue.** `ask()` (`runner.ts:141`) assigns it unconditionally. `model-tools.ts:276` *does* guard Claude's own `console_run` against clobbering a person's pending action ("never replaced, never cleared") β but nothing guards the reverse, and nothing guards a person's own second click. Two asks in a row anywhere in the console still only ever leave one pending. (Review note: the one background path that did this to Claude's own pending action, the async guidance offer, was fixed in #3699, ruflo-console 0.32.1; a person's own second click still replaces it, by design.)+- **A confirm older than 30 s is silently dropped.** `PENDING_TTL_MS = 30_000` (`runner.ts:15`); `confirm()` (`runner.ts:147-150`) nulls `state.pending` either way and speaks the "more than 30 s, ask again" outcome through `say()`. (Review note, corrected: `say()` does write `state.outcome`, so the miss is not untraced; but `outcome` is one slot that the next action overwrites, and it is not `control.log` or an event, so the trace is gone as soon as anything else runs.) A person who answers "y" a minute later sees it fail only if they were still looking at that exact screen; `console_state` afterward shows `waiting: null` and, once another action has run, no trace that anything was asked, let alone refused.The console already has three real pages for *watching* (Timeline, Events, Approvals) and three real ways to *write into the room* (`broadcast`, `mission-aside`, `mission-guide` β ADR 406/443, `hooks/mission-palette.ts:34-35`, `hooks/palette.ts:136`). Nothing puts the two together, and nothing makes the one pending confirm β the single most consequential thing on screen β impossible to miss. The user asked for a dashboard that helps a human and the agents "see what's happening" and collaborate; this ADR is that page, built from what already exists rather than a fourth notification system (the claims lesson: don't build a fifth of something that already has four).@@ -41,9 +41,9 @@ A new view, `room` (`ViewId`, key `r`, icon `π¬`, label "The Room", blurb "whaSame mechanics as Events (ADR 416 Β§2.2): kind chips, find, pause/resume, paging β reused, not reinvented, because Events already solved "a feed too long to read live."4. **Who's here** β the per-lane busy/idle summary `timelineView` already computes (`manage.ts:27-57`), condensed to one line per lane (name, busy % of the last 15 min, last tool call), each with the existing "β¦ ask Claude" button.-### 3.2 The one behavioral fix this ADR makes (not just a new page)+### 3.2 The one behavioral fix this ADR makes (not just a new page) β implemented-An expired confirm must leave a trace. `confirm()` (`runner.ts:147-150`) gains one line: when `isFresh` is false, push a `ConsoleEvent` ("a confirm for '<label>' arrived 46s after the ask and was not run β answer within 30s next time") before nulling `pending`, the same way every other event reaches `watch.ts`. This is the minimum fix that makes the failure mode this ADR found show up in the feed it just built, instead of nowhere. It does **not** extend the TTL, add a queue, or change who may answer a pending β those are explicitly deferred (Β§5).+An expired confirm must leave a trace. `confirm()` (`runner.ts:147-150`) gains one `record(state.events, β¦)` call (done, with `tests/runner.spec.ts`): when `isFresh` is false, push a `ConsoleEvent` (kind `tools`) ("a confirm for '<label>' arrived 46s after the ask and was not run β answer within 30s next time") before nulling `pending`, the same way every other event reaches `watch.ts`. This is the minimum fix that makes the failure mode this ADR found show up in the feed it just built, instead of nowhere. It does **not** extend the TTL, add a queue, or change who may answer a pending β those are explicitly deferred (Β§5).### 3.3 Model tools