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): an animated BBS boot screen when the cockpit opens

ruv97e92d52eb2a
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.json
index 7f3432daaf..34aadf80ca 100644
--- a/plugins/ruflo-console/.claude-plugin/plugin.json
+++ b/plugins/ruflo-console/.claude-plugin/plugin.json
@@ -85,6 +85,12 @@
"bbs",
"plain"
]
+ },
+ "boot": {
+ "type": "boolean",
+ "title": "Boot screen",
+ "description": "With the bbs look, play a short dial-up boot screen (modem connect, the RUFLO logo drawing in, a loading bar for the first ruflo reads) when the cockpit opens. At least 2.6 s, at most 6 s.",
+ "default": true
}
}
}
diff --git a/plugins/ruflo-console/hooks/controller.ts b/plugins/ruflo-console/hooks/controller.ts
index f1be6671a6..9a099919bf 100644
--- a/plugins/ruflo-console/hooks/controller.ts
+++ b/plugins/ruflo-console/hooks/controller.ts
@@ -314,6 +314,7 @@ export function createController(state: State, host: Host): Controller {
const result = await host.openPane({ id: PANE_ID, title: 'ruflo', rows: rowsOf(state.view), ...(focus && { focus: true, closeOnEscape: true, holdToasts: true }) })
const isPlaced = result === undefined || result.isPlaced !== false
+ if (isPlaced && !state.pane.isOpen) state.pane.bootAtMs = Date.now()
state.pane.isOpen = isPlaced
state.pane.isShown = isPlaced
if (focus) state.pane.isClosedByPerson = false
diff --git a/plugins/ruflo-console/hooks/gfx/pictures.ts b/plugins/ruflo-console/hooks/gfx/pictures.ts
index ecfb568df5..890456aef4 100644
--- a/plugins/ruflo-console/hooks/gfx/pictures.ts
+++ b/plugins/ruflo-console/hooks/gfx/pictures.ts
@@ -269,6 +269,61 @@ export function bannerPicture(project: string, columns: number, t: number): Grid
return grid
}
+/** The boot screen's height. */
+export const BOOT_ROWS = 10
+
+/**
+ * The BBS boot screen, played for the first seconds after the pane opens: a modem dials, connects, the logo draws in
+ * line by line, and a bar fills with the first round of ruflo reads. `age` is ms since the pane opened; the bar mixes
+ * elapsed time with the reads that have answered (`done` of `total`), so it moves even before any read returns.
+ */
+export function bootPicture(project: string, columns: number, age: number, done: number, total: number): Grid {
+ const grid = new Grid(columns, BOOT_ROWS)
+ const GREEN = 0x39ff14
+ const type = (y: number, from: number, text: string, color: number, msPerChar = 22): boolean => {
+ if (age < from) return false
+
+ const shown = text.slice(0, Math.min(text.length, Math.floor((age - from) / msPerChar)))
+
+ grid.text(0, y, shown.slice(0, columns), color)
+
+ return shown.length === text.length
+ }
+
+ type(0, 0, 'ATDT ruflo.local', COLOR.dim)
+ if (age >= 450) grid.text(0, 1, 'RING… RING…'.slice(0, columns), COLOR.dim)
+ type(2, 800, 'CONNECT 115200 / ARQ / V.42bis', GREEN, 12)
+
+ // The logo draws in a row at a time, magenta to cyan, with the banner's sweep.
+ const sweep = ((age / 28) % (LOGO[0].length + 40)) - 20
+
+ LOGO.forEach((line, y) => {
+ if (age < 1200 + y * 220) return
+ ;[...line].forEach((ch, x) => {
+ if (ch === ' ' || x >= columns) return
+
+ const glow = Math.max(0, 1 - Math.abs(x - sweep) / 4)
+
+ grid.set(x, 4 + y, ch, mix(mix(NEON_MAGENTA, NEON_CYAN, x / (LOGO[0].length - 1)), 0xffffff, glow * 0.7))
+ })
+ })
+ if (age >= 1700 && columns > LOGO[0].length + 6) grid.text(LOGO[0].length + 2, 4, 'â–‘â–’â–“ AGENT SWARM CONSOLE'.slice(0, columns - LOGO[0].length - 2), NEON_MAGENTA)
+ type(7, 1900, `> handshake ok · node ${project}`, NEON_CYAN, 14)
+
+ // LOADING [â–“â–“â–“â–“â–‘â–‘â–‘â–‘] 58% reads 6/10, with a blinking cursor while it runs.
+ if (age >= 2000) {
+ const pct = Math.min(1, 0.55 * Math.min(1, (age - 2000) / 1400) + 0.45 * (total > 0 ? done / total : 1))
+ const barWidth = Math.max(6, Math.min(24, columns - 30))
+ const filled = Math.round(pct * barWidth)
+ const line = `LOADING [${'â–“'.repeat(filled)}${'â–‘'.repeat(barWidth - filled)}] ${String(Math.round(pct * 100)).padStart(3)}% reads ${done}/${total}`
+
+ grid.text(0, 9, line.slice(0, columns), pct >= 1 ? GREEN : NEON_CYAN)
+ if (Math.floor(age / 400) % 2 === 0 && line.length + 1 < columns) grid.set(line.length + 1, 9, 'â–ˆ', 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/register.ts b/plugins/ruflo-console/hooks/register.ts
index 75b05e514f..e029acd082 100644
--- a/plugins/ruflo-console/hooks/register.ts
+++ b/plugins/ruflo-console/hooks/register.ts
@@ -136,6 +136,7 @@ export const register: Register = (on, raw: PluginOptions) => {
const isNarrow = columns < NARROW
const kit: Kit = isNarrow ? { Box: table.Box, Text: table.Text, Button: table.Button, ...(table.Input !== undefined && { Input: table.Input }) } : table
+ if (!state.pane.isOpen) state.pane.bootAtMs = Date.now()
state.pane.isOpen = true
state.pane.isFocused = e.props.isFocused === true
state.pane.columns = columns
diff --git a/plugins/ruflo-console/hooks/state.ts b/plugins/ruflo-console/hooks/state.ts
index 19878fce19..4ded6d200b 100644
--- a/plugins/ruflo-console/hooks/state.ts
+++ b/plugins/ruflo-console/hooks/state.ts
@@ -77,6 +77,8 @@ export type Options = {
federationNetwork: boolean
/** `bbs`: the neon ASCII-art look (default); `plain`: the terminal theme's own colours and plain rules. */
look: 'bbs' | 'plain'
+ /** With the bbs look, a short dial-up boot screen when the cockpit opens. */
+ boot: boolean
}
const num = (value: unknown, fallback: number, lo: number, hi: number): number => {
@@ -97,6 +99,7 @@ export function optionsOf(raw: PluginOptions | undefined): Options {
panel: value.panel === 'command' || value.panel === 'off' ? value.panel : 'auto',
federationNetwork: value.federationNetwork === true,
look: value.look === 'plain' ? 'plain' : 'bbs',
+ boot: value.boot !== false,
}
}
@@ -150,7 +153,7 @@ export type State = {
eventFilter: 'all' | ConsoleEvent['kind']
/** When the newest learning point arrived: the curve draws it in from there. */
curveGrewAtMs: number
- pane: { isOpen: boolean; isShown: boolean; isFocused: boolean; columns: number; rows: number; placement: 'dock' | 'inline'; isClosedByPerson: boolean; autoTried: boolean; autoReason: string }
+ pane: { isOpen: boolean; isShown: boolean; isFocused: boolean; columns: number; rows: number; placement: 'dock' | 'inline'; isClosedByPerson: boolean; autoTried: boolean; autoReason: string; /** When the pane last opened: the BBS boot screen plays from here. */ bootAtMs: number }
/** The size of each Raster as last mounted, by key: a blit of any other size is refused, so none is sent. */
mounted: Map<string, { columns: number; rows: number }>
select: { claim: number; agent: number; task: number; item: number }
@@ -194,7 +197,7 @@ export function newState(raw: PluginOptions | undefined): State {
statusLog: new Map(),
eventFilter: 'all',
curveGrewAtMs: 0,
- pane: { isOpen: false, isShown: false, isFocused: false, columns: 0, rows: 0, placement: 'inline', isClosedByPerson: false, autoTried: false, autoReason: '' },
+ pane: { isOpen: false, isShown: false, isFocused: false, columns: 0, rows: 0, placement: 'inline', isClosedByPerson: false, autoTried: false, autoReason: '', bootAtMs: 0 },
mounted: new Map(),
select: { claim: 0, agent: 0, task: 0, item: 0 },
drill: { agentId: null, logs: null, logsAtMs: 0 },
@@ -230,3 +233,15 @@ export function restore(state: State, value: unknown): void {
state.pane.isClosedByPerson = held.isClosedByPerson === true
}
+
+/** The BBS boot screen's span: at least BOOT_MIN_MS, longer while the first read is still out, never past BOOT_MAX_MS. */
+export const BOOT_MIN_MS = 2_600
+export const BOOT_MAX_MS = 6_000
+
+export function isBooting(state: State, nowMs: number): boolean {
+ if (state.options.look !== 'bbs' || !state.options.boot || state.pane.bootAtMs === 0) return false
+
+ const age = nowMs - state.pane.bootAtMs
+
+ return age >= 0 && age < BOOT_MAX_MS && (age < BOOT_MIN_MS || state.snapshot === null)
+}
diff --git a/plugins/ruflo-console/hooks/views/frames.ts b/plugins/ruflo-console/hooks/views/frames.ts
index 3ac1bcd8f1..4b36a522f8 100644
--- a/plugins/ruflo-console/hooks/views/frames.ts
+++ b/plugins/ruflo-console/hooks/views/frames.ts
@@ -11,11 +11,11 @@ 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, bannerPicture, curvePicture, headerPicture, PULSE_MS, topologyPicture, type TopoModel } from '../gfx/pictures'
+import { activityPicture, bannerPicture, bootPicture, curvePicture, headerPicture, PULSE_MS, topologyPicture, type TopoModel } from '../gfx/pictures'
import type { Grid } from '../gfx/raster'
-import { severityOf } from '../data/cli'
+import { PROBES, severityOf } from '../data/cli'
import { EXPECTED_IN_MARKET, RUFLO_MARKET } from '../data/snapshot'
-import { rowsOf, type State } from '../state'
+import { isBooting, rowsOf, type State } from '../state'
import { live } from './common'
import { openTasks } from './select'
@@ -118,6 +118,13 @@ export function picturesOf(state: State, columns: number, nowMs: number, t: numb
const width = Math.max(20, Math.min(200, columns))
const snapshot = state.snapshot
+ // The BBS boot screen owns the pane for its first seconds; nothing else is drawn under it.
+ if (isBooting(state, nowMs)) {
+ pictures.set('boot', bootPicture(state.cwd.split('/').filter(Boolean).at(-1) ?? '', Math.min(width, 72), nowMs - state.pane.bootAtMs, state.probes.size, PROBES.length))
+
+ return pictures
+ }
+
if (!(state.pane.rows > 0 && state.pane.rows < rowsOf(state.view))) {
const project = state.cwd.split('/').filter(Boolean).at(-1) ?? ''
diff --git a/plugins/ruflo-console/hooks/views/pane.ts b/plugins/ruflo-console/hooks/views/pane.ts
index 2db57661d9..7109e1a9de 100644
--- a/plugins/ruflo-console/hooks/views/pane.ts
+++ b/plugins/ruflo-console/hooks/views/pane.ts
@@ -6,7 +6,7 @@
import type { RenderElement } from 'claude-code'
import { HELP } from '../commands'
-import { rowsOf, VIEWS, type ViewId } from '../state'
+import { isBooting, rowsOf, VIEWS, type ViewId } from '../state'
import { agentView } from './agent'
import { claimsView } from './claims'
import { ago, button, clip, col, isBbs, row, setLook, text, THEME, type Ctx } from './common'
@@ -168,6 +168,15 @@ function footer(ctx: Ctx): RenderElement {
*/
export function paneView(ctx: Ctx): RenderElement {
setLook(ctx.state.options.look)
+
+ // The BBS boot screen: the first seconds after the pane opens (or until the first read lands, at most 6 s).
+ if (isBooting(ctx.state, ctx.nowMs)) {
+ const boot = ctx.pictures.get('boot')
+
+ return boot !== undefined && ctx.kit.Raster !== undefined
+ ? col(ctx, [ctx.kit.Raster(boot.toRaster('boot'))], 'boot')
+ : col(ctx, [text(ctx, 'CONNECT 115200 · RUFLO AGENT SWARM CONSOLE · loading…', { bold: true, color: THEME.head })], 'boot')
+ }
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/tests/behaviour.test.ts b/plugins/ruflo-console/tests/behaviour.test.ts
index 663463fcc1..dfdace4950 100644
--- a/plugins/ruflo-console/tests/behaviour.test.ts
+++ b/plugins/ruflo-console/tests/behaviour.test.ts
@@ -6,7 +6,21 @@ import { BAND, command, elementsOf, fakeRuflo, keyOf, paneAt, PLUGIN, SESSION, t
const VIEWS = ['overview', 'swarm', 'claims', 'federation', 'plugins', 'learning', 'metaharness', 'memory', 'cost', 'timeline', 'approvals', 'events', 'agent'] as const
describe('behaviour', () => {
- test('a tab hotkey switches the view and the choice is kept for this folder only', async ($, on) => {
+ test('with the default bbs look, a freshly opened pane plays the boot screen first, and draws nothing else under it', async ($, on) => {
+ worldOf(on, RUFLO_FILES)
+ mock.clock(on)
+ await $.session.start(SESSION)
+ await $.command.run(command())
+
+ const pane = await $.ui.mount({ ...paneAt(110), plugin: PLUGIN })
+ const tree = await pane.drawn()
+
+ expect(elementsOf(tree, 'Raster').map(keyOf)).toEqual(['boot'])
+ expect(textOf(tree)).not.toContain('OVERVIEW')
+ await pane.unmount()
+ })
+
+ test('a tab hotkey switches the view and the choice is kept for this folder only', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -22,7 +36,7 @@ describe('behaviour', () => {
await pane.unmount()
})
- test('claim asks first, runs one fixed argv on yes, and reads the disk to say it took', async ($, on) => {
+ test('claim asks first, runs one fixed argv on yes, and reads the disk to say it took', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
const task = JSON.parse(RUFLO_FILES['.claude-flow/tasks/store.json'] ?? '{}') as { tasks: Record<string, unknown> }
const taskId = Object.keys(task.tasks)[0] as string
@@ -66,7 +80,7 @@ describe('behaviour', () => {
await pane.unmount()
})
- test('cancel runs nothing, and a button with nothing to act on says why', async ($, on) => {
+ test('cancel runs nothing, and a button with nothing to act on says why', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -84,7 +98,7 @@ describe('behaviour', () => {
await pane.unmount()
})
- test('every affordance refused: each view still draws, nothing throws, nothing runs', async ($, on) => {
+ test('every affordance refused: each view still draws, nothing throws, nothing runs', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES, { refuseAll: true })
mock.clock(on)
await $.session.start(SESSION)
@@ -103,7 +117,7 @@ describe('behaviour', () => {
expect(world.runs).toHaveLength(0)
})
- test('no ruflo project: views say n/a or how to start, and the band stays out of the way', async ($, on) => {
+ test('no ruflo project: views say n/a or how to start, and the band stays out of the way', { options: { boot: false } }, async ($, on) => {
worldOf(on, {})
mock.clock(on)
on('ui.render', () => ({ type: 'Text', children: ['engine'] }) as never)
@@ -121,7 +135,7 @@ describe('behaviour', () => {
expect(textOf(await $.ui.render(BAND))).toBe('engine')
})
- test('narrow terminals get text only: no Raster, one tab line, no claims buttons', async ($, on) => {
+ test('narrow terminals get text only: no Raster, one tab line, no claims buttons', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -140,7 +154,7 @@ describe('behaviour', () => {
}
})
- test('the frame loop blits while shown and focused, and stops when hidden or unfocused', async ($, on) => {
+ test('the frame loop blits while shown and focused, and stops when hidden or unfocused', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
const clock = mock.clock(on)
await $.session.start(SESSION)
@@ -164,7 +178,7 @@ describe('behaviour', () => {
await pane.unmount()
})
- test('unfocused, the pane draws but does not animate', async ($, on) => {
+ test('unfocused, the pane draws but does not animate', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
const clock = mock.clock(on)
await $.session.start(SESSION)
@@ -182,7 +196,7 @@ describe('behaviour', () => {
await pane.unmount()
})
- test('hostile text: control and bidi characters never reach the tree, bad ids are dropped', async ($, on) => {
+ test('hostile text: control and bidi characters never reach the tree, bad ids are dropped', { options: { boot: false } }, async ($, on) => {
const agents = JSON.parse(RUFLO_FILES['.claude-flow/agents/store.json'] ?? '{}') as { agents: Record<string, Record<string, unknown>> }
const first = Object.values(agents.agents)[0] as Record<string, unknown>
@@ -204,7 +218,7 @@ describe('behaviour', () => {
expect(textOf(await $.ui.render(paneAt(110)))).toContain('No claims on disk')
})
- test('the band: one line of facts, yields to a survey, and its mark pulses only during a turn', async ($, on) => {
+ test('the band: one line of facts, yields to a survey, and its mark pulses only during a turn', { options: { boot: false } }, async ($, on) => {
fakeRuflo().register(on, {})
const world = worldOf(on, RUFLO_FILES)
const clock = mock.clock(on)
@@ -232,7 +246,7 @@ describe('behaviour', () => {
expect(world.blits.length).toBe(stopped)
})
- test('on the desktop surface, which has no Raster, every picture becomes a text line and the tree is accepted', async ($, on) => {
+ test('on the desktop surface, which has no Raster, every picture becomes a text line and the tree is accepted', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -249,7 +263,7 @@ describe('behaviour', () => {
}
})
- test('an inline pane given fewer rows than it asked for goes compact: controls first, no title strip', async ($, on) => {
+ test('an inline pane given fewer rows than it asked for goes compact: controls first, no title strip', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
diff --git a/plugins/ruflo-console/tests/diagrams.spec.ts b/plugins/ruflo-console/tests/diagrams.spec.ts
index b1d262d705..7cb6d4f494 100644
--- a/plugins/ruflo-console/tests/diagrams.spec.ts
+++ b/plugins/ruflo-console/tests/diagrams.spec.ts
@@ -7,8 +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, bannerPicture, curvePicture, edges, headerPicture, layout, markPicture, topologyPicture, type TopoModel } from '../hooks/gfx/pictures'
-import { optionsOf } from '../hooks/state'
+import { activityPicture, bannerPicture, bootPicture, curvePicture, edges, headerPicture, layout, markPicture, topologyPicture, type TopoModel } from '../hooks/gfx/pictures'
+import { isBooting, newState, 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'
@@ -144,3 +144,34 @@ describe('BBS look', () => {
expect(optionsOf({ look: 'neon' } as never).look).toBe('bbs')
})
})
+
+describe('BBS boot screen', () => {
+ const text = (grid: ReturnType<typeof bootPicture>, width: number) => Array.from({ length: grid.rows }, (_, y) => String.fromCodePoint(...Array.from({ length: width }, (_, x) => grid.glyph(x, y) || 32))).join('\n')
+
+ it('dials, connects, draws the logo and fills a bar from elapsed time and answered reads', () => {
+ expect(text(bootPicture('demo', 60, 100, 0, 10), 60)).toContain('ATDT')
+ expect(text(bootPicture('demo', 60, 100, 0, 10), 60)).not.toContain('CONNECT')
+
+ const done = text(bootPicture('demo', 60, 3_800, 10, 10), 60)
+
+ expect(done).toContain('CONNECT 115200 / ARQ / V.42bis')
+ expect(done).toContain('█▀█ █ █ █▀▀ █ █▀█')
+ expect(done).toContain('> handshake ok · node demo')
+ expect(done).toContain('100% reads 10/10')
+ })
+
+ it('plays at least 2.6 s, longer while the first read is out, never past 6 s; only with the bbs look and boot on', () => {
+ const state = newState({})
+
+ state.pane.bootAtMs = 1_000
+ expect(isBooting(state, 1_100)).toBe(true)
+ expect(isBooting(state, 4_000)).toBe(true) // no snapshot yet
+ state.snapshot = {} as never
+ expect(isBooting(state, 4_000)).toBe(false)
+ expect(isBooting(state, 2_000)).toBe(true)
+ state.snapshot = null
+ expect(isBooting(state, 7_500)).toBe(false)
+ expect(isBooting({ ...state, options: { ...state.options, boot: false } }, 1_100)).toBe(false)
+ expect(isBooting({ ...state, options: { ...state.options, look: 'plain' } }, 1_100)).toBe(false)
+ })
+})
diff --git a/plugins/ruflo-console/tests/palette.test.ts b/plugins/ruflo-console/tests/palette.test.ts
index 43666e6492..eb2f83e281 100644
--- a/plugins/ruflo-console/tests/palette.test.ts
+++ b/plugins/ruflo-console/tests/palette.test.ts
@@ -6,7 +6,7 @@ import { command, elementsOf, keyOf, paneAt, PLUGIN, SESSION, textOf, worldOf }
const runsOf = (runs: readonly string[][], word: string) => runs.filter(argv => argv.includes(word))
describe('palette and /ruflo', () => {
- test('p opens the palette; typing filters; a change asks first and runs one fixed argv on yes', async ($, on) => {
+ test('p opens the palette; typing filters; a change asks first and runs one fixed argv on yes', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -36,7 +36,7 @@ describe('palette and /ruflo', () => {
await pane.unmount()
})
- test('a read runs at once and shows its output: route <words> asks the router', async ($, on) => {
+ test('a read runs at once and shows its output: route <words> asks the router', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
world.respond = argv => (argv.includes('route') ? { exitCode: 0, stdout: '{\n "primaryAgent": {"type": "tester", "confidence": 0.8}\n}', stderr: '' } : { exitCode: 0, stdout: '{}', stderr: '' })
@@ -52,7 +52,7 @@ describe('palette and /ruflo', () => {
expect(text).toContain('"type": "tester"')
})
- test('/ruflo run and /ruflo yes act without focus; a flag-shaped text is refused', async ($, on) => {
+ test('/ruflo run and /ruflo yes act without focus; a flag-shaped text is refused', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -67,7 +67,7 @@ describe('palette and /ruflo', () => {
expect((await $.command.run(command('run nope'))).text).toMatch(/^No palette entry "nope"/)
})
- test('approvals: a hive proposal is voted on in place, as console-operator, after a confirm', async ($, on) => {
+ test('approvals: a hive proposal is voted on in place, as console-operator, after a confirm', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -82,7 +82,7 @@ describe('palette and /ruflo', () => {
await pane.unmount()
})
- test('/ruflo help, an unknown word, and the hints when ruflo-mods or ruflo-swarm are not loaded', async ($, on) => {
+ test('/ruflo help, an unknown word, and the hints when ruflo-mods or ruflo-swarm are not loaded', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -93,7 +93,7 @@ describe('palette and /ruflo', () => {
expect((await $.command.run(command('swarm status'))).text).toMatch(/^ruflo-swarm is not loaded in this session/)
})
- test('the engine saying no hook answered /ruflo mods is not an answer: the hint shows', async ($, on) => {
+ test('the engine saying no hook answered /ruflo mods is not an answer: the hint shows', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
on('command.run', () => ({ text: 'ruflo-console registered /ruflo but no command.run hook answered it: add on("command.run", ...)' }))
@@ -102,7 +102,7 @@ describe('palette and /ruflo', () => {
expect((await $.command.run(command('mods'))).text).toMatch(/^ruflo-mods is not loaded in this session/)
})
- test('/ruflo mods and /ruflo swarm <sub> are answered by the plugin beneath that owns them', async ($, on) => {
+ test('/ruflo mods and /ruflo swarm <sub> are answered by the plugin beneath that owns them', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
on('command.run', ($, e) => ({ text: `beneath answered: ${e.args}` }))
@@ -113,7 +113,7 @@ describe('palette and /ruflo', () => {
expect((await $.command.run(command('swarm'))).text).toBe('ruflo console: Swarm')
})
- test('panel auto opens the cockpit at session start without taking the keys; panel command does not', { options: { panel: 'auto' } }, async ($, on) => {
+ test('panel auto opens the cockpit at session start without taking the keys; panel command does not', { options: { panel: 'auto', boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
const clock = mock.clock(on)
await $.session.start(SESSION)
@@ -124,7 +124,7 @@ describe('palette and /ruflo', () => {
expect(world.openArgs[0]?.focus).toBeUndefined()
})
- test('panel command never opens unasked', { options: { panel: 'command' } }, async ($, on) => {
+ test('panel command never opens unasked', { options: { panel: 'command', boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
const clock = mock.clock(on)
await $.session.start(SESSION)
@@ -133,7 +133,7 @@ describe('palette and /ruflo', () => {
expect(world.opened).toHaveLength(0)
})
- test('/ruflo dump <view> answers the view as plain text, without the pane, with its probes run', async ($, on) => {
+ test('/ruflo dump <view> answers the view as plain text, without the pane, with its probes run', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -148,7 +148,7 @@ describe('palette and /ruflo', () => {
expect(world.opened).toHaveLength(0)
})
- test('panel auto stays shut outside a ruflo project', { options: { panel: 'auto' } }, async ($, on) => {
+ test('panel auto stays shut outside a ruflo project', { options: { panel: 'auto', boot: false } }, async ($, on) => {
const world = worldOf(on, { 'README.md': 'not ruflo' })
const clock = mock.clock(on)
await $.session.start(SESSION)
@@ -157,7 +157,7 @@ describe('palette and /ruflo', () => {
expect(world.openArgs).toHaveLength(0)
})
- test('/ruflo-console stays registered and is the same command as /ruflo; mods and swarm words still pass beneath', async ($, on) => {
+ test('/ruflo-console stays registered and is the same command as /ruflo; mods and swarm words still pass beneath', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
on('command.run', ($, e) => ({ text: `beneath: ${e.command} ${e.args}` }))
@@ -168,7 +168,7 @@ describe('palette and /ruflo', () => {
expect((await $.command.run({ ...command('mods'), command: 'ruflo-console' })).text).toBe('beneath: ruflo-console mods')
})
- test('without a pane (claude -p), /ruflo <view> answers the view as text and opens nothing', async ($, on) => {
+ test('without a pane (claude -p), /ruflo <view> answers the view as text and opens nothing', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start({ ...SESSION, isInteractive: false })
@@ -180,7 +180,7 @@ describe('palette and /ruflo', () => {
expect(world.openArgs).toHaveLength(0)
})
- test('/ruflo commands browses the catalog, and falls back to the mod commands when it is not readable', async ($, on) => {
+ test('/ruflo commands browses the catalog, and falls back to the mod commands when it is not readable', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
diff --git a/plugins/ruflo-console/tests/views.test.ts b/plugins/ruflo-console/tests/views.test.ts
index 2d0156a7b2..d88b89ec60 100644
--- a/plugins/ruflo-console/tests/views.test.ts
+++ b/plugins/ruflo-console/tests/views.test.ts
@@ -33,7 +33,7 @@ async function drawn($: Engine, view: string, columns = 110) {
}
describe('views', () => {
- test('overview: every subsystem from disk, the CLI or the engine, health alerts, the activity raster', async ($, on) => {
+ test('overview: every subsystem from disk, the CLI or the engine, health alerts, the activity raster', { options: { boot: false } }, async ($, on) => {
fakeRuflo().register(on, {})
worldOf(on, RUFLO_FILES, { home: HOME_FILES })
mock.clock(on)
@@ -52,7 +52,7 @@ describe('views', () => {
expect(text).toContain('budget WARNING: $3.90 of $5.00')
})
- test('swarm: the topology graph, selectable agents, the hive with its proposal, no hive token', async ($, on) => {
+ test('swarm: the topology graph, selectable agents, the hive with its proposal, no hive token', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -69,7 +69,7 @@ describe('views', () => {
expect(elementsOf(tree, 'Button').map(keyOf)).toEqual(expect.arrayContaining(['agent-next', 'agent-prev', 'drill', 'palette', 'actions']))
})
- test('claims: the flow diagram with lanes and rings, the board, and the act row', async ($, on) => {
+ test('claims: the flow diagram with lanes and rings, the board, and the act row', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -83,7 +83,7 @@ describe('views', () => {
expect(elementsOf(tree, 'Button').map(keyOf)).toEqual(expect.arrayContaining(['claim', 'release', 'handoff', 'steal', 'agent-next', 'task-next']))
})
- test('federation: the map, local identity and channels; the relay is never asked while the option is off', async ($, on) => {
+ test('federation: the map, local identity and channels; the relay is never asked while the option is off', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -96,7 +96,7 @@ describe('views', () => {
expect(world.runs.some(argv => argv.join(' ').includes('x_federation_roster'))).toBe(false)
})
- test('plugins: the health matrix, and a clone without ruflo-mods reads STALE with the fix named', async ($, on) => {
+ test('plugins: the health matrix, and a clone without ruflo-mods reads STALE with the fix named', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES, { home: HOME_FILES })
mock.clock(on)
await $.session.start(SESSION)
@@ -108,7 +108,7 @@ describe('views', () => {
expect(text).toContain('2 ruflo · 1 enabled · 2 total')
})
- test('learning: last route, outcome rate with its N, the curve, the four-stage pipeline, pattern growth', async ($, on) => {
+ test('learning: last route, outcome rate with its N, the curve, the four-stage pipeline, pattern growth', { options: { boot: false } }, async ($, on) => {
fakeRuflo().register(on, {})
worldOf(on, RUFLO_FILES)
mock.clock(on)
@@ -122,7 +122,7 @@ describe('views', () => {
expect(text).toContain('consolidate: EWC consolidations')
})
- test('metaharness: the radar, the audit trend, the flywheel ledger and the active policy', async ($, on) => {
+ test('metaharness: the radar, the audit trend, the flywheel ledger and the active policy', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -134,7 +134,7 @@ describe('views', () => {
expect(text).toContain('valid · 0 commits · 0 receipts')
})
- test('memory and cost: entries, a namespace sample; spend, the gauge, the ladder and the burn', async ($, on) => {
+ test('memory and cost: entries, a namespace sample; spend, the gauge, the ladder and the burn', { options: { boot: false } }, async ($, on) => {
fakeRuflo().register(on, {})
worldOf(on, RUFLO_FILES)
mock.clock(on)
@@ -152,7 +152,7 @@ describe('views', () => {
expect(cost.text).toContain('WARNING · $3.90 of $5.00 (78%)')
})
- test('timeline, approvals and events draw from what was seen; the drill-down opens an agent', async ($, on) => {
+ test('timeline, approvals and events draw from what was seen; the drill-down opens an agent', { options: { boot: false } }, async ($, on) => {
const world = worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)
@@ -180,7 +180,7 @@ describe('views', () => {
expect(world.runs.some(argv => argv.join(' ').includes('agent logs --id agent-1790903032591-x41b0y --tail 20'))).toBe(true)
})
- test('missions: the ADR-406 observation, task status as recorded, evidence as verified, nothing invented', async ($, on) => {
+ test('missions: the ADR-406 observation, task status as recorded, evidence as verified, nothing invented', { options: { boot: false } }, async ($, on) => {
worldOf(on, { ...RUFLO_FILES, '.claude-flow/missions/observation.json': MISSION_OBSERVATION })
mock.clock(on)
await $.session.start(SESSION)
@@ -194,7 +194,7 @@ describe('views', () => {
expect(text).not.toMatch(/[\u001b\u202e]/)
})
- test('missions: no observation file reads n/a with how to start one', async ($, on) => {
+ test('missions: no observation file reads n/a with how to start one', { options: { boot: false } }, async ($, on) => {
worldOf(on, RUFLO_FILES)
mock.clock(on)
await $.session.start(SESSION)