π 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
feat(ruflo-console): the ask-first confirm is one bordered card with a header, a rule and labelled sections (0.33.20)
ruvdc1ada1b1201
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.jsonindex eb88a4854c..23c7ee1464 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.33.18",+ "version": "0.33.20","author": {"name": "ruvnet","url": "https://github.com/ruvnet"diff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.tsindex 076933a87b..a2b7983d6b 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.33.18'+export const CONSOLE_VERSION = '0.33.20'diff --git a/plugins/ruflo-console/hooks/views/common.ts b/plugins/ruflo-console/hooks/views/common.tsindex a034cec132..98300c571c 100644--- a/plugins/ruflo-console/hooks/views/common.ts+++ b/plugins/ruflo-console/hooks/views/common.ts@@ -368,25 +368,38 @@ export function confirmRow(ctx: Ctx): RenderElement | null {)}- return col(- ctx,- [- text(ctx, 'βΆ CONFIRM NEEDED β click Yes or press y', { bold: true, color: THEME.warn }),- text(ctx, `Confirm: ${askedBy(pending)}${pending.label.replace(/\?+$/, '')}?`, { bold: true, color: THEME.warn }),+ // One bordered card in the warning colour: the person says yes to everything in it, so it reads as a unit, not as loose lines. Its border and+ // padding take four columns, so the text inside is clipped to the narrower width.+ const inner: Ctx = { ...ctx, columns: Math.max(20, ctx.columns - 4) }+ const hasMoney = pending.note !== undefined && /money|models/i.test(pending.note)++ return ctx.kit.Box({+ key: 'confirm',+ flexDirection: 'column',+ borderStyle: 'round',+ borderColor: THEME.warn,+ paddingX: 1,+ children: [+ row(ctx, [ctx.kit.Text({ bold: true, color: THEME.warn, children: 'βΆ CONFIRM NEEDED' }), ctx.kit.Text({ dimColor: true, children: ' click Yes or press y' })]),+ text(inner, 'β'.repeat(inner.columns), { dimColor: true }),+ text(inner, `Confirm: ${askedBy(pending)}${pending.label.replace(/\?+$/, '')}?`, { bold: true, color: THEME.warn }),// Wrapped, not clipped: the person says yes to the whole argv, so all of it shows (a JSON argument runs long).ctx.kit.Text({ dimColor: true, wrap: 'wrap', children: `runs: ${pending.shows ?? `ruflo ${pending.args.join(' ')}`}` }),- ...(pending.note !== undefined ? [text(ctx, pending.note, { bold: /money|models/i.test(pending.note), color: /money|models/i.test(pending.note) ? THEME.bad : THEME.warn })] : []),- row(ctx, [- button(ctx, 'confirm', 'Yes, run it (y)', ctx.act.confirm, { hotkey: 'y', primary: true }),- button(ctx, 'cancel', 'Cancel (n)', ctx.act.cancel, { hotkey: 'n' }),- // A low-risk ruflo action may be remembered: it is not asked again (Settings lists and forgets it).- ...(pending.rememberKey !== undefined ? [button(ctx, 'remember', `Always allow β${pending.rememberKey}β`, () => ctx.act.remember())] : []),- // An AI terminal turn (claude -p in plan mode, codex read-only, the budget cap) may be always accepted: Settings resets it.- ...(ctx.state.terminal.asked !== null && pending.label === ctx.state.terminal.asked.label && ctx.state.terminal.harness !== 'ruflo' ? [button(ctx, 'always', 'Always accept AI turns', () => ctx.act.settings.alwaysAccept())] : []),- ]),+ ...(pending.note !== undefined ? [ctx.kit.Text({ wrap: 'wrap', bold: hasMoney, color: hasMoney ? THEME.bad : THEME.warn, children: `Effect: ${pending.note}` })] : []),+ ctx.kit.Box({+ flexDirection: 'row',+ marginTop: 1,+ children: [+ button(ctx, 'confirm', 'Yes, run it (y)', ctx.act.confirm, { hotkey: 'y', primary: true }),+ button(ctx, 'cancel', 'Cancel (n)', ctx.act.cancel, { hotkey: 'n' }),+ // A low-risk ruflo action may be remembered: it is not asked again (Settings lists and forgets it).+ ...(pending.rememberKey !== undefined ? [button(ctx, 'remember', `Always allow β${pending.rememberKey}β`, () => ctx.act.remember())] : []),+ // An AI terminal turn (claude -p in plan mode, codex read-only, the budget cap) may be always accepted: Settings resets it.+ ...(ctx.state.terminal.asked !== null && pending.label === ctx.state.terminal.asked.label && ctx.state.terminal.harness !== 'ruflo' ? [button(ctx, 'always', 'Always accept AI turns', () => ctx.act.settings.alwaysAccept())] : []),+ ],+ }),],- 'confirm',- )+ })}/** Views that draw the confirm themselves, under the field it came from (the pane then does not draw it above the body). */diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.shindex f922aebbe2..4940f0d5ba 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.33.18"+step "1. plugin.json declares ruflo-console 0.33.20"grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \- && grep -q '"version": "0.33.18"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"+ && grep -q '"version": "0.33.20"' "$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-card.spec.ts b/plugins/ruflo-console/tests/confirm-card.spec.tsnew file mode 100644index 0000000000..1655a7efc3--- /dev/null+++ b/plugins/ruflo-console/tests/confirm-card.spec.ts@@ -0,0 +1,64 @@+/**+ * The ask-first confirm is one bordered card in the warning colour: a header, a rule, what is being asked, the exact command, the effect, and+ * the buttons set apart. Layout only: the strings the kit tests read (CONFIRM NEEDED, Confirm: β¦?, runs: β¦) are unchanged.+ */+import { describe, expect, it } from 'vitest'++import { newState } from '../hooks/state'+import { confirmRow, THEME, type Ctx } from '../hooks/views/common'++type El = { kind: string; props: Record<string, unknown> }+const make = (kind: string) => (props: Record<string, unknown>): El => ({ kind, props })+const kit = { Box: make('Box'), Text: make('Text'), Button: make('Button'), Input: make('Input') }+const act = new Proxy({}, { get: () => () => undefined }) as unknown as Ctx['act']+const flat = (node: unknown): El[] => {+ if (typeof node !== 'object' || node === null) return []+ const el = node as El+ const children = el.props.children++ return [el, ...(Array.isArray(children) ? children.flatMap(flat) : flat(children))]+}+const draw = (note?: string, columns = 100): El => {+ const state = newState({ boot: false })++ state.pending = { label: 'start a loop in the main Claude UI: /loop do things', args: ['x'], expect: 'e', askedAtMs: 1, ...(note !== undefined && { note }) }++ return confirmRow({ kit, state, act, columns, nowMs: 1_000, pictures: new Map() } as unknown as Ctx) as unknown as El+}+const texts = (card: El): string[] => flat(card).filter(el => el.kind === 'Text').map(el => String(el.props.children))++describe('the confirm card', () => {+ it('is one round bordered box in the warning colour', () => {+ const card = draw()++ expect(card.kind).toBe('Box')+ expect(card.props).toMatchObject({ key: 'confirm', borderStyle: 'round', borderColor: THEME.warn })+ })++ it('keeps the strings the kit tests read, and puts a rule under the header', () => {+ const lines = texts(draw('Starts a recurring loop; edits nothing.'))++ expect(lines).toContain('βΆ CONFIRM NEEDED')+ expect(lines.some(line => line.startsWith('Confirm: start a loop in the main Claude UI'))).toBe(true)+ expect(lines).toContain('runs: ruflo x')+ expect(lines).toContain('Effect: Starts a recurring loop; edits nothing.')+ expect(lines.some(line => /^β+$/.test(line))).toBe(true)+ })++ it('clips its lines to the width inside the border, and sets the buttons apart', () => {+ const card = draw(undefined, 60)+ const rule = texts(card).find(line => /^β+$/.test(line)) ?? ''+ const buttons = flat(card).filter(el => el.kind === 'Button').map(el => String(el.props.key))+ const buttonBox = flat(card).find(el => el.kind === 'Box' && el.props.marginTop === 1)++ expect(rule.length).toBeLessThanOrEqual(56)+ expect(buttons).toEqual(expect.arrayContaining(['confirm', 'cancel']))+ expect(buttonBox).toBeDefined()+ })++ it('shows a money or model effect in the alarm colour', () => {+ const effect = flat(draw('Spends money on a model turn.')).find(el => el.kind === 'Text' && String(el.props.children).startsWith('Effect:'))++ expect(effect?.props).toMatchObject({ bold: true, color: THEME.bad })+ })+})