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

feat(ruflo-console): the BBS look β€” ASCII-art banner, β–“β–’β–‘ headers, neon palette (0.3.0)

ruv73d21ca4c216
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.json
index f1f3b1495d..7f3432daaf 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, 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; no network by default.",
- "version": "0.2.0",
+ "version": "0.3.0",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
@@ -75,6 +75,16 @@
"title": "Ask the federation relay",
"description": "Lets the federation view ask the public relay (wss://relay.ruv.io) for the roster. Off by default: without it the console makes no network request.",
"default": false
+ },
+ "look": {
+ "type": "string",
+ "title": "Look",
+ "description": "bbs is the neon BBS look: an ASCII-art banner, β–“β–’β–‘ section headers and a cyberpunk palette. plain uses your terminal theme colours and plain rules (better on light backgrounds).",
+ "default": "bbs",
+ "options": [
+ "bbs",
+ "plain"
+ ]
}
}
}
diff --git a/plugins/ruflo-console/hooks/gfx/pictures.ts b/plugins/ruflo-console/hooks/gfx/pictures.ts
index 397f050155..ecfb568df5 100644
--- a/plugins/ruflo-console/hooks/gfx/pictures.ts
+++ b/plugins/ruflo-console/hooks/gfx/pictures.ts
@@ -231,6 +231,44 @@ export function markPicture(isWorking: boolean, t: number): Grid {
}
/** The pane's title strip: a highlight sweeps across it every few seconds while the pane is focused. Decoration only. */
+/** RUFLO in a two-row half-block font, the way a BBS splash spelled its name. */
+const LOGO = ['β–ˆβ–€β–ˆ β–ˆ β–ˆ β–ˆβ–€β–€ β–ˆ β–ˆβ–€β–ˆ', 'β–ˆβ–€β–„ β–ˆβ–„β–ˆ β–ˆβ–€ β–ˆβ–„β–„ β–ˆβ–„β–ˆ'] as const
+const NEON_MAGENTA = 0xff2a6d
+const NEON_CYAN = 0x05d9e8
+
+/**
+ * The BBS banner: the logo in a magenta-to-cyan gradient with a scanline sweeping across it (decoration), a tag line,
+ * the project, and a blinking block cursor. Two rows.
+ */
+export function bannerPicture(project: string, columns: number, t: number): Grid {
+ const grid = new Grid(columns, 2)
+ const width = LOGO[0].length
+ const sweep = ((t / 28) % (columns + 40)) - 20
+
+ LOGO.forEach((line, y) => {
+ ;[...line].forEach((ch, x) => {
+ if (ch === ' ' || x >= columns) return
+
+ const base = mix(NEON_MAGENTA, NEON_CYAN, x / Math.max(1, width - 1))
+ const glow = Math.max(0, 1 - Math.abs(x - sweep) / 4)
+
+ grid.set(x, y, ch, mix(base, 0xffffff, glow * 0.7))
+ })
+ })
+
+ const x0 = width + 2
+
+ if (columns > x0 + 4) {
+ grid.text(x0, 0, 'β–‘β–’β–“ AGENT SWARM CONSOLE'.slice(0, columns - x0), NEON_MAGENTA)
+ const node = `β–Έ node ${project}`.slice(0, columns - x0 - 2)
+
+ grid.text(x0, 1, node, NEON_CYAN)
+ if (Math.floor(t / 530) % 2 === 0 && x0 + node.length + 1 < columns) grid.set(x0 + node.length + 1, 1, 'β–ˆ', NEON_CYAN)
+ }
+
+ return grid
+}
+
export function headerPicture(title: string, columns: number, t: number): Grid {
const grid = new Grid(columns, 1)
const at = ((t / 22) % (columns + 60)) - 20
diff --git a/plugins/ruflo-console/hooks/state.ts b/plugins/ruflo-console/hooks/state.ts
index 63a9cb8513..19878fce19 100644
--- a/plugins/ruflo-console/hooks/state.ts
+++ b/plugins/ruflo-console/hooks/state.ts
@@ -75,6 +75,8 @@ export type Options = {
panel: 'auto' | 'command' | 'off'
/** Lets the federation view ask the public relay for the roster. Off by default: no network without consent. */
federationNetwork: boolean
+ /** `bbs`: the neon ASCII-art look (default); `plain`: the terminal theme's own colours and plain rules. */
+ look: 'bbs' | 'plain'
}
const num = (value: unknown, fallback: number, lo: number, hi: number): number => {
@@ -94,6 +96,7 @@ export function optionsOf(raw: PluginOptions | undefined): Options {
bar: value.bar === 'on' || value.bar === 'off' ? value.bar : 'auto',
panel: value.panel === 'command' || value.panel === 'off' ? value.panel : 'auto',
federationNetwork: value.federationNetwork === true,
+ look: value.look === 'plain' ? 'plain' : 'bbs',
}
}
diff --git a/plugins/ruflo-console/hooks/views/common.ts b/plugins/ruflo-console/hooks/views/common.ts
index efbf8eca29..1690f8032b 100644
--- a/plugins/ruflo-console/hooks/views/common.ts
+++ b/plugins/ruflo-console/hooks/views/common.ts
@@ -49,7 +49,25 @@ export type Ctx = {
act: Actions
}
-export const THEME = { head: 'claude', ok: 'success', bad: 'error', warn: 'warning', info: 'suggestion' } as const
+export type Look = 'bbs' | 'plain'
+
+/** The terminal theme's own colours: readable on light and dark backgrounds alike. */
+const PLAIN = { head: 'claude', ok: 'success', bad: 'error', warn: 'warning', info: 'suggestion' }
+/** The BBS look: neon magenta headings, cyan values, matrix-green labels; amber stays for attention. */
+const NEON = { head: '#ff2a6d', ok: '#39ff14', bad: '#ff3355', warn: '#ffd319', info: '#05d9e8' }
+const NEON_LABEL = '#2fbf71'
+
+/** The palette every view reads; `setLook` swaps it in place before a render, so callers keep using THEME.x. */
+export const THEME: { head: string; ok: string; bad: string; warn: string; info: string } = { ...PLAIN }
+let look: Look = 'plain'
+
+export function setLook(next: Look): void {
+ if (next === look) return
+ look = next
+ Object.assign(THEME, next === 'bbs' ? NEON : PLAIN)
+}
+
+export const isBbs = (): boolean => look === 'bbs'
export const clip = (text: string, width: number): string => (text.length <= width ? text : `${text.slice(0, Math.max(0, width - 1))}…`)
@@ -90,6 +108,14 @@ export function col(ctx: Ctx, parts: readonly RenderChildren[], key?: string): R
/** A section title with a rule to the right edge. */
export function rule(ctx: Ctx, title: string, right = ''): RenderElement {
+ if (look === 'bbs') {
+ // BBS section header: β–“β–’β–‘ SWARM ░▒▓══════════ right
+ const head = `β–“β–’β–‘ ${title.toUpperCase()} β–‘β–’β–“`
+ const fill = Math.max(1, ctx.columns - head.length - right.length - 2)
+
+ return row(ctx, [ctx.kit.Text({ bold: true, color: THEME.head, children: head }), ctx.kit.Text({ color: THEME.info, dimColor: true, children: `${'═'.repeat(fill)} ` }), ctx.kit.Text({ color: THEME.info, children: right })])
+ }
+
const fill = Math.max(1, ctx.columns - title.length - right.length - 3)
return row(ctx, [ctx.kit.Text({ bold: true, color: THEME.head, children: title }), ctx.kit.Text({ dimColor: true, children: ` ${'─'.repeat(fill)} ` }), ctx.kit.Text({ dimColor: true, children: right })])
@@ -99,9 +125,12 @@ export function rule(ctx: Ctx, title: string, right = ''): RenderElement {
export function kv(ctx: Ctx, label: string, value: string, color?: string): RenderElement {
const isNa = value === 'n/a' || value.startsWith('n/a ') || value === 'missing'
+ // BBS: green labels and cyan values, the way a sysop screen lists its stats.
+ const neonValue = look === 'bbs' && color === undefined ? { color: THEME.info } : {}
+
return row(ctx, [
- ctx.kit.Text({ dimColor: true, children: `${label.padEnd(16)} ` }),
- ctx.kit.Text({ wrap: 'truncate-end', ...(isNa ? { dimColor: true } : color !== undefined ? { color } : {}), children: clip(value, Math.max(4, ctx.columns - 18)) }),
+ ctx.kit.Text(look === 'bbs' ? { color: NEON_LABEL, children: `${label.padEnd(16)} ` } : { dimColor: true, children: `${label.padEnd(16)} ` }),
+ ctx.kit.Text({ wrap: 'truncate-end', ...(isNa ? { dimColor: true } : color !== undefined ? { color } : neonValue), children: clip(value, Math.max(4, ctx.columns - 18)) }),
])
}
diff --git a/plugins/ruflo-console/hooks/views/frames.ts b/plugins/ruflo-console/hooks/views/frames.ts
index 0886e27234..3ac1bcd8f1 100644
--- a/plugins/ruflo-console/hooks/views/frames.ts
+++ b/plugins/ruflo-console/hooks/views/frames.ts
@@ -11,7 +11,7 @@ import type { Channels, Peers, Roster } from '../data/cli'
import { pipelinePicture, radarPicture, samplesPicture, trendPicture, gaugePicture, type Stage } from '../gfx/charts'
import { flowModelOf, flowPicture, flowRows } from '../gfx/flow'
import { federationPicture, ganttPicture, heatmapPicture, type FedNode, type HealthRow, type Lane } from '../gfx/maps'
-import { activityPicture, curvePicture, headerPicture, PULSE_MS, topologyPicture, type TopoModel } from '../gfx/pictures'
+import { activityPicture, bannerPicture, curvePicture, headerPicture, PULSE_MS, topologyPicture, type TopoModel } from '../gfx/pictures'
import type { Grid } from '../gfx/raster'
import { severityOf } from '../data/cli'
import { EXPECTED_IN_MARKET, RUFLO_MARKET } from '../data/snapshot'
@@ -118,7 +118,11 @@ export function picturesOf(state: State, columns: number, nowMs: number, t: numb
const width = Math.max(20, Math.min(200, columns))
const snapshot = state.snapshot
- if (!(state.pane.rows > 0 && state.pane.rows < rowsOf(state.view))) pictures.set('header', headerPicture(`β—† ruflo Β· ${state.cwd.split('/').filter(Boolean).at(-1) ?? ''}`, Math.min(width, 40), t))
+ if (!(state.pane.rows > 0 && state.pane.rows < rowsOf(state.view))) {
+ const project = state.cwd.split('/').filter(Boolean).at(-1) ?? ''
+
+ pictures.set('header', state.options.look === 'bbs' ? bannerPicture(project, Math.min(width, 72), t) : headerPicture(`β—† ruflo Β· ${project}`, Math.min(width, 40), t))
+ }
switch (state.view) {
case 'overview':
diff --git a/plugins/ruflo-console/hooks/views/pane.ts b/plugins/ruflo-console/hooks/views/pane.ts
index 7e161a803b..2db57661d9 100644
--- a/plugins/ruflo-console/hooks/views/pane.ts
+++ b/plugins/ruflo-console/hooks/views/pane.ts
@@ -9,7 +9,7 @@ import { HELP } from '../commands'
import { rowsOf, VIEWS, type ViewId } from '../state'
import { agentView } from './agent'
import { claimsView } from './claims'
-import { ago, button, clip, col, row, text, THEME, type Ctx } from './common'
+import { ago, button, clip, col, isBbs, row, setLook, text, THEME, type Ctx } from './common'
import { costView } from './cost'
import { federationView } from './federation'
import { learningView } from './learning'
@@ -62,7 +62,10 @@ function tabs(ctx: Ctx): RenderElement {
// A Button cannot be styled, so the current tab is Text: its key is not needed, the view is already open
// (from a drill-down, b goes back).
- if (isCurrent) return ctx.kit.Box({ key: `tab-${view.id}`, children: [ctx.kit.Text({ bold: true, color: THEME.head, wrap: 'truncate-end', children: `${view.key}: ${words}` })] })
+ // BBS: the current tab is framed like a menu pick, [2: 🐝 SWARM]; the name always shows there, in capitals.
+ const current = isBbs() ? `[${view.key}: ${view.icon}${withNames || view.label.length <= 6 ? ` ${view.label.toUpperCase()}` : ''}]` : `${view.key}: ${words}`
+
+ if (isCurrent) return ctx.kit.Box({ key: `tab-${view.id}`, children: [ctx.kit.Text({ bold: true, color: THEME.head, wrap: 'truncate-end', children: current })] })
return ctx.kit.Button({ key: `tab-${view.id}`, label: words, hotkey: view.key, plain: true, dimColor: true, onPress: () => ctx.act.view(view.id) })
}
@@ -86,6 +89,15 @@ function blurb(ctx: Ctx): RenderElement | null {
const name = ctx.state.view === 'agent' ? 'Agent' : view.label
const about = ctx.state.view === 'agent' ? `one agent's role, task, claims, activity and logs Β· b goes back to ${view.label}` : view.blurb
+ if (isBbs()) {
+ // A sysop prompt: >> 🐝 SWARM :: what it is for
+ return row(ctx, [
+ ctx.kit.Text({ bold: true, color: THEME.ok, children: '>> ' }),
+ ctx.kit.Text({ bold: true, color: THEME.head, children: `${view.icon} ${name.toUpperCase()}` }),
+ ctx.kit.Text({ color: THEME.info, wrap: 'truncate-end', children: clip(` :: ${about}`, Math.max(4, ctx.columns - name.length - 6)) }),
+ ], 'about')
+ }
+
return row(ctx, [
ctx.kit.Text({ bold: true, color: THEME.head, children: `${view.icon} ${name}` }),
ctx.kit.Text({ dimColor: true, italic: true, wrap: 'truncate-end', children: clip(` β€” ${about}`, Math.max(4, ctx.columns - name.length - 2)) }),
@@ -127,7 +139,8 @@ function footer(ctx: Ctx): RenderElement {
for (const line of (outcome.lines ?? []).slice(0, 8)) parts.push(text(ctx, ` ${line}`, { dimColor: true }))
}
- const read = state.snapshot === null ? 'reading…' : `read ${ago(state.snapshot.readAtMs, nowMs)}`
+ // BBS: the link status in modem-speak, [LINK OK] β–Έ sync 3s Β· keys on.
+ const read = state.snapshot === null ? (isBbs() ? '[DIALING…]' : 'reading…') : isBbs() ? `[LINK OK] β–Έ sync ${ago(state.snapshot.readAtMs, nowMs).replace(' ago', '')}` : `read ${ago(state.snapshot.readAtMs, nowMs)}`
const keys = state.pane.isFocused ? 'keys on' : 'keys off: click the pane (or /ruflo …)'
parts.push(
@@ -154,6 +167,7 @@ function footer(ctx: Ctx): RenderElement {
* tabs, so every control stays on screen while the view below scrolls.
*/
export function paneView(ctx: Ctx): RenderElement {
+ setLook(ctx.state.options.look)
const body = ctx.state.palette.isOpen ? paletteView(ctx) : ctx.state.isHelp ? help(ctx) : BODIES[ctx.state.view](ctx)
const confirm = confirmRow(ctx)
const header = ctx.pictures.get('header')
diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.sh
index 0e1aa8c929..41a7f543c0 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.2.0"
+step "1. plugin.json declares ruflo-console 0.3.0"
grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \
- && grep -q '"version": "0.2.0"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
+ && grep -q '"version": "0.3.0"' "$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/behaviour.test.ts b/plugins/ruflo-console/tests/behaviour.test.ts
index 5bc835c019..663463fcc1 100644
--- a/plugins/ruflo-console/tests/behaviour.test.ts
+++ b/plugins/ruflo-console/tests/behaviour.test.ts
@@ -14,9 +14,9 @@ describe('behaviour', () => {
const pane = await $.ui.mount({ ...paneAt(110), plugin: PLUGIN })
- expect(textOf(await pane.drawn())).toContain('🏠 Overview')
+ expect(textOf(await pane.drawn())).toContain('🏠 OVERVIEW')
await pane.press({ key: 'tab-claims' })
- expect(textOf(await pane.drawn())).toContain('πŸ“Œ Claims')
+ expect(textOf(await pane.drawn())).toContain('πŸ“Œ CLAIMS')
expect(world.stored.get('ruflo-console/ui:/work')).toEqual({ view: 'claims', isClosedByPerson: false })
expect(world.opened.length).toBeGreaterThanOrEqual(2)
await pane.unmount()
@@ -96,7 +96,7 @@ describe('behaviour', () => {
const pane = await $.ui.mount({ ...paneAt(100), plugin: PLUGIN })
const text = textOf(await pane.drawn())
- expect(text).toMatch(/\n\S+ [A-Z][A-Za-z]+\n β€” \w/) // the line under the tabs: icon, view name, what it is for
+ expect(text).toMatch(/>> \n\S+ [A-Z]+\n :: \w/) // the BBS line under the tabs: >> icon NAME :: what it is for
await pane.unmount()
}
diff --git a/plugins/ruflo-console/tests/diagrams.spec.ts b/plugins/ruflo-console/tests/diagrams.spec.ts
index 4a119ef302..b1d262d705 100644
--- a/plugins/ruflo-console/tests/diagrams.spec.ts
+++ b/plugins/ruflo-console/tests/diagrams.spec.ts
@@ -7,7 +7,8 @@ import { describe, expect, it } from 'vitest'
import { gaugePicture, pipelinePicture, radarPicture, samplesPicture, trendPicture } from '../hooks/gfx/charts'
import { flowModelOf, flowPicture, flowRows, ringOf } from '../hooks/gfx/flow'
import { federationPicture, ganttPicture, heatmapPicture } from '../hooks/gfx/maps'
-import { activityPicture, curvePicture, edges, headerPicture, layout, markPicture, topologyPicture, type TopoModel } from '../hooks/gfx/pictures'
+import { activityPicture, bannerPicture, curvePicture, edges, headerPicture, layout, markPicture, topologyPicture, type TopoModel } from '../hooks/gfx/pictures'
+import { optionsOf } from '../hooks/state'
import type { Grid } from '../hooks/gfx/raster'
import { parseClaims, type ClaimRecord } from '../hooks/data/parse'
import { RUFLO_FILES } from './fixtures/ruflo-run'
@@ -122,3 +123,24 @@ describe('diagrams', () => {
expect(times[25]).toBeLessThan(4)
})
})
+
+describe('BBS look', () => {
+ const row = (grid: ReturnType<typeof bannerPicture>, y: number, width: number) => String.fromCodePoint(...Array.from({ length: width }, (_, x) => grid.glyph(x, y) || 32))
+
+ it('the banner spells RUFLO in two half-block rows, names the node, and its cursor blinks', () => {
+ const on = bannerPicture('ruflo-demo', 60, 0)
+ const off = bannerPicture('ruflo-demo', 60, 530)
+
+ expect(row(on, 0, 19)).toBe('β–ˆβ–€β–ˆ β–ˆ β–ˆ β–ˆβ–€β–€ β–ˆ β–ˆβ–€β–ˆ')
+ expect(row(on, 1, 19)).toBe('β–ˆβ–€β–„ β–ˆβ–„β–ˆ β–ˆβ–€ β–ˆβ–„β–„ β–ˆβ–„β–ˆ')
+ expect(row(on, 1, 60)).toContain('β–Έ node ruflo-demo β–ˆ')
+ expect(row(off, 1, 60).slice(21)).not.toContain('β–ˆ')
+ expect(on.encode()).not.toBe(off.encode())
+ })
+
+ it('bbs is the default look; plain is the only other value', () => {
+ expect(optionsOf(undefined).look).toBe('bbs')
+ expect(optionsOf({ look: 'plain' } as never).look).toBe('plain')
+ expect(optionsOf({ look: 'neon' } as never).look).toBe('bbs')
+ })
+})