🌊 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(console): animate Orbital headers and ASCII globe intro
rUvd13740908f7a
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.jsonindex ccfbbd1b62..1efe23da59 100644--- a/plugins/ruflo-console/.claude-plugin/plugin.json+++ b/plugins/ruflo-console/.claude-plugin/plugin.json@@ -96,7 +96,7 @@"boot": {"type": "boolean","title": "Boot screen",- "description": "With the bbs look, play a dial-up boot screen (modem connect, the RUFLO logo drawing in, every area of the console coming online in a log, a loading bar for the first ruflo reads) when the cockpit opens. At least 5.4 s, at most 8 s.",+ "description": "With the bbs look, play a dial-up boot screen (modem connect, the RUFLO logo drawing in, every area of the console coming online in a log, a loading bar for the first ruflo reads) when the cockpit opens. At least 5.4 s, at most 8 s. Orbital uses a rotating ASCII globe for 1.5 seconds, up to 6 seconds while initial data is pending; fps 0 skips it.","default": true},"eventsPersist": {diff --git a/plugins/ruflo-console/README.md b/plugins/ruflo-console/README.mdindex 02f057196b..a5240d4683 100644--- a/plugins/ruflo-console/README.md+++ b/plugins/ruflo-console/README.md@@ -95,3 +95,5 @@ printf '%s\n' '{"look":"orbital"}' | claude plugin configure ruflo-console@ruflo```Reload plugins after changing the option. Select `bbs` or `plain` to restore those looks. A dark terminal background gives the closest match; terminal graphics and host controls keep their existing renderer. Narrow panes retain the existing responsive layout.++Orbital includes a four-row animated ASCII telemetry header with a red scan line, green decorative pulse and orbit marker. The optional boot intro uses a rotating ASCII Earth (one turn per 12 seconds), with actual self-check counts below it. It runs for 1.5 seconds when data is ready, at most 6 seconds while data is pending. Set `fps` to `0` for still headers and no boot intro. Existing frame scheduling stops motion in hidden panes. The pulse and globe are decoration, not measured activity or a progress percentage.diff --git a/plugins/ruflo-console/hooks/gfx/orbital.ts b/plugins/ruflo-console/hooks/gfx/orbital.tsnew file mode 100644index 0000000000..419d7111bf--- /dev/null+++ b/plugins/ruflo-console/hooks/gfx/orbital.ts@@ -0,0 +1,95 @@+/** Orbital cell art: decorative motion, never a simulated health or progress measurement. */+import type { BootCheck } from '../boot-checks'+import { Grid } from './raster'++const RED = 0xf06449+const GREEN = 0x72c79b+const INK = 0xc6cbc8+const DIM = 0x596561+const BLACK = 0x000000+const TAU = Math.PI * 2++// Coarse original continent silhouettes in longitude/latitude degrees, for decoration only.+const LAND = [+ [[-168, 65], [-130, 72], [-58, 49], [-82, 10], [-112, 28], [-125, 50]],+ [[-81, 12], [-49, 2], [-35, -10], [-68, -56], [-76, -20]],+ [[-18, 35], [12, 37], [51, 12], [33, -34], [17, -35], [-5, 5]],+ [[-10, 36], [-10, 60], [45, 72], [170, 64], [135, 35], [105, 0], [70, 24], [35, 30]],+ [[112, -12], [139, -10], [154, -28], [132, -39], [113, -30]],+ [[-53, 59], [-22, 81], [-52, 84], [-66, 70]],+] as const++function onLand(lon: number, lat: number): boolean {+ return LAND.some(poly => {+ let inside = false+ for (let i = 0, j = poly.length - 1; i < poly.length; j = i++) {+ const a = poly[i]!+ const b = poly[j]!+ if ((a[1] > lat) !== (b[1] > lat) && lon < (b[0] - a[0]) * (lat - a[1]) / (b[1] - a[1]) + a[0]) inside = !inside+ }+ return inside+ })+}++function blank(columns: number, rows: number): Grid {+ const grid = new Grid(Math.max(12, Math.min(200, Math.floor(columns) || 12)), rows)+ for (let y = 0; y < rows; y++) for (let x = 0; x < grid.columns; x++) grid.set(x, y, ' ', INK, BLACK)+ return grid+}++/** Orthographic rotating Earth, using only ASCII cells. Rotation repeats every 12 seconds. */+export function orbitalGlobe(columns: number, rows: number, timeMs: number): Grid {+ const height = Math.max(5, Math.min(24, Math.floor(rows) || 5))+ const grid = blank(columns, height)+ const radius = Math.min((height - 1) / 2, (grid.columns - 1) / 4)+ const angle = (Number.isFinite(timeMs) ? timeMs % 12000 : 0) / 12000 * TAU+ for (let y = 0; y < height; y++) for (let x = 0; x < grid.columns; x++) {+ const nx = (x - (grid.columns - 1) / 2) / (radius * 2)+ const ny = ((height - 1) / 2 - y) / radius+ const r2 = nx * nx + ny * ny+ if (r2 > 1) continue+ const z = Math.sqrt(1 - r2)+ const lat = Math.asin(ny) * 180 / Math.PI+ const lon = ((Math.atan2(nx, z) + angle) * 180 / Math.PI + 540) % 360 - 180+ const land = onLand(lon, lat)+ const meridian = Math.abs(lon / 30 - Math.round(lon / 30)) < 0.045+ const parallel = Math.abs(lat / 30 - Math.round(lat / 30)) < 0.045+ grid.set(x, y, land ? (z > 0.55 ? '#' : '+') : meridian || parallel ? ':' : '.', land ? (z > 0.55 ? INK : RED) : DIM, BLACK)+ }+ return grid+}++/** Fixed-height header: red scan line, travelling ASCII pulse and an orbit marker. */+export function orbitalHeader(label: string, columns: number, timeMs: number): Grid {+ const grid = blank(columns, 4)+ const tick = Math.floor((Number.isFinite(timeMs) ? timeMs : 0) / 160)+ const title = ` RUFLO / ${label.toUpperCase()} `+ grid.text(0, 0, title.slice(0, grid.columns), RED)+ grid.text(0, 1, '-'.repeat(grid.columns), DIM)+ grid.set(((tick % grid.columns) + grid.columns) % grid.columns, 1, '+', RED)+ for (let x = 0; x < grid.columns - 12; x++) {+ const phase = ((x - tick) % 19 + 19) % 19+ grid.set(x, 2, phase === 9 ? '|' : phase === 8 || phase === 10 ? '/' : phase === 7 || phase === 11 ? '.' : '_', phase >= 7 && phase <= 11 ? GREEN : DIM)+ }+ grid.text(Math.max(0, grid.columns - 10), 2, `[${'|/-\\'[Math.abs(tick) % 4]}] ORBIT`, RED)+ return grid+}++/** Checks are actual self-check results; the globe and sweep are explicitly decorative. */+export function orbitalBoot(project: string, columns: number, timeMs: number, checks?: readonly BootCheck[]): Grid {+ const grid = blank(columns, 22)+ grid.text(0, 0, ' RUFLO / ORBITAL', RED)+ grid.text(0, 1, ` ${project}`.slice(0, grid.columns), INK)+ const globe = orbitalGlobe(Math.min(38, grid.columns), 14, timeMs)+ const left = Math.floor((grid.columns - globe.columns) / 2)+ for (let y = 0; y < globe.rows; y++) for (let x = 0; x < globe.columns; x++) {+ const i = (y * globe.columns + x) * 3+ grid.set(left + x, y + 3, globe.cells[i]!, globe.cells[i + 1]!, BLACK)+ }+ grid.text(0, 18, ' LOADING CONSOLE / decorative orbit', RED)+ const passed = checks?.filter(c => c.ok).length ?? 0+ const failed = checks?.filter(c => !c.ok).length ?? 0+ grid.text(0, 19, checks === undefined ? ' Self-check: pending' : ` Self-check: ${passed} passed / ${failed} failed`, failed > 0 ? RED : GREEN)+ grid.text(0, 21, ' Motion: Settings > fps | Boot: optional', DIM)+ return grid+}diff --git a/plugins/ruflo-console/hooks/state.ts b/plugins/ruflo-console/hooks/state.tsindex 845b2d41ff..92b0172868 100644--- a/plugins/ruflo-console/hooks/state.ts+++ b/plugins/ruflo-console/hooks/state.ts@@ -461,11 +461,15 @@ export const BOOT_MIN_MS = 5_400export const BOOT_MAX_MS = 8_000export function isBooting(state: State, nowMs: number): boolean {- if (state.options.look !== 'bbs' || !state.options.boot || state.pane.bootAtMs === 0) return false+ if (!['bbs', 'orbital'].includes(state.options.look) || !state.options.boot || state.pane.bootAtMs === 0) return false+ // Reduced motion skips Orbital's decorative intro and cannot leave a static loader blocking the page.+ if (state.options.look === 'orbital' && state.options.fps === 0) return falseconst age = nowMs - state.pane.bootAtMs- return age >= 0 && age < BOOT_MAX_MS && (age < BOOT_MIN_MS || state.snapshot === null)+ return state.options.look === 'orbital'+ ? age >= 0 && age < 6_000 && (age < 1_500 || state.snapshot === null)+ : 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.tsindex 3bce007ebf..6be5712e54 100644--- a/plugins/ruflo-console/hooks/views/frames.ts+++ b/plugins/ruflo-console/hooks/views/frames.ts@@ -7,6 +7,7 @@ import type { AuditTrend, HarnessScore, Intelligence } from '../data/cli'import { recentByAgent } from '../data/events'import { agentLabels } from '../data/parse'import { presentAgents, swarmStatusOf } from '../data/swarm-status'+import { orbitalBoot, orbitalHeader } from '../gfx/orbital'import { getBootChecks } from '../boot-checks'import { bootFacts } from '../boot-facts'import { getBuild } from '../build'@@ -181,9 +182,9 @@ export function picturesOf(state: State, columns: number, nowMs: number, t: numbconst width = Math.max(20, Math.min(200, hasCards(columns, isCompactPane(state)) ? columns - CARD_COLUMNS : columns))const snapshot = state.snapshot- // The BBS boot screen owns the pane for its first seconds; nothing else is drawn under it.+ // The selected 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, 90), nowMs - state.pane.bootAtMs, state.probes.size, PROBES.length, state.pane.rows, getBootChecks(), bootFacts(state, CONSOLE_VERSION, getBuild())))+ pictures.set('boot', state.options.look === 'orbital' ? orbitalBoot(state.cwd.split('/').filter(Boolean).at(-1) ?? '', Math.min(width, 90), state.options.fps > 0 ? nowMs - state.pane.bootAtMs : 0, getBootChecks()) : bootPicture(state.cwd.split('/').filter(Boolean).at(-1) ?? '', Math.min(width, 90), nowMs - state.pane.bootAtMs, state.probes.size, PROBES.length, state.pane.rows, getBootChecks(), bootFacts(state, CONSOLE_VERSION, getBuild())))return pictures}@@ -213,6 +214,11 @@ export function picturesOf(state: State, columns: number, nowMs: number, t: numbpictures.set('title', titleThatFits(columns, names, (candidate, size) => titlePicture(candidate, size, t, headerAge)))}+ if (state.options.look === 'orbital') {+ const page = state.isHelp ? 'help' : state.palette.isOpen ? 'commands' : (VIEWS.find(view => view.id === state.view)?.label ?? state.view)+ pictures.set(state.view === 'menu' ? 'header' : 'title', fitHeader(columns, size => orbitalHeader(page, size, state.options.fps > 0 ? t : 0), 72))+ }+switch (state.view) {case 'overview':pictures.set('activity', activityPicture([{ label: 'tool calls/5s', values: state.activity }, { label: 'state writes', values: state.writes }], width, t))diff --git a/plugins/ruflo-console/hooks/views/pane.ts b/plugins/ruflo-console/hooks/views/pane.tsindex 6ce582ab4c..3561626742 100644--- a/plugins/ruflo-console/hooks/views/pane.ts+++ b/plugins/ruflo-console/hooks/views/pane.ts@@ -368,7 +368,7 @@ export function paneView(base: Ctx): RenderElement {const attention = newAttention(base.state.origin, [])const ctx: Ctx = { ...base, kit: wrapKit(base.kit, base.state, attention), attention }- // The BBS boot screen: the first seconds after the pane opens (or until the first read lands, at most 6 s).+ // The selected boot screen: a bounded intro while the first snapshot arrives.if (isBooting(ctx.state, ctx.nowMs)) {const boot = ctx.pictures.get('boot')@@ -422,7 +422,8 @@ export function paneView(base: Ctx): RenderElement {// The logo banner leads the main menu in every layout, compact too (the other pages lead with their own title art there).const title = (!isCompact || ctx.state.view === 'menu') && header !== undefined && ctx.kit.Raster !== undefined ? [ctx.kit.Raster(header.toRaster('header'))] : []const about = blurb(ctx)- const bbs = isBbs() ? wildcat(ctx) : { strip: [], art: [] }+ const orbitalArt = ctx.pictures.get('title')+ const bbs = isBbs() ? wildcat(ctx) : { strip: [], art: isOrbital() && orbitalArt !== undefined && ctx.kit.Raster !== undefined ? [ctx.kit.Raster(orbitalArt.toRaster('title'))] : [] }// The status row (keys, sync, Palette, Actions) sits above the body, so a tall view cannot push it off the screen; only the main menu keeps it below its prompt, as a BBS does.const isMenu = ctx.state.view === 'menu'// The terminal's own Enter-again confirm stays under its field, where the field is.diff --git a/plugins/ruflo-console/tests/orbital.spec.ts b/plugins/ruflo-console/tests/orbital.spec.tsindex 4b7bcfd033..d1d7812bb4 100644--- a/plugins/ruflo-console/tests/orbital.spec.ts+++ b/plugins/ruflo-console/tests/orbital.spec.ts@@ -31,3 +31,73 @@ describe('orbital theme', () => {expect(setOption(state, 'ruflo-console', 'look', 'unknown', () => undefined)).toBeNull()})})++import { orbitalGlobe, orbitalHeader, orbitalBoot } from '../hooks/gfx/orbital'+import { isBooting, VIEWS } from '../hooks/state'+import { picturesOf } from '../hooks/views/frames'+import type { Grid } from '../hooks/gfx/raster'++const gridText = (grid: Grid) => Array.from({ length: grid.rows }, (_, y) => Array.from({ length: grid.columns }, (_, x) => String.fromCodePoint(grid.glyph(x, y))).join('')).join('\n')++describe('orbital motion', () => {+ it('turns an ASCII globe and returns to the same frame after one revolution', () => {+ const initial = orbitalGlobe(38, 14, 0)+ expect(gridText(initial)).not.toBe(gridText(orbitalGlobe(38, 14, 3000)))+ expect(initial.cells).toEqual(orbitalGlobe(38, 14, 12000).cells)+ expect(gridText(initial)).toMatch(/^[\x20-\x7e\n]+$/)+ expect(gridText(initial)).toContain('#')+ expect(orbitalGlobe(38, 14, NaN).cells).toEqual(initial.cells)+ })++ it('keeps header dimensions stable while its pulse and scan move', () => {+ for (const columns of [20, 44, 72, 200]) {+ const first = orbitalHeader('overview', columns, 0)+ const next = orbitalHeader('overview', columns, 480)+ expect([next.columns, next.rows]).toEqual([columns, 4])+ expect(next.cells).not.toEqual(first.cells)+ expect(gridText(next).split('\n')[0]).toBe(gridText(first).split('\n')[0])+ }+ })++ it('uses actual boot checks without inventing successes or progress', () => {+ expect(gridText(orbitalBoot('project', 72, 0))).toContain('Self-check: pending')+ const result = orbitalBoot('project', 72, 1000, [{ area: 'one', ok: true, problems: [] }, { area: 'two', ok: false, problems: ['unavailable'] }])+ expect(gridText(result)).toContain('Self-check: 1 passed / 1 failed')+ expect(gridText(result)).not.toContain('%')+ })++ it('bounds the intro and skips it when motion or boot is disabled', () => {+ const state = newState({})+ state.options.look = 'orbital'+ state.options.boot = true+ state.options.fps = 12+ state.pane.bootAtMs = 1000+ expect(isBooting(state, 999)).toBe(false)+ expect(isBooting(state, 2499)).toBe(true)+ expect(isBooting(state, 6999)).toBe(true)+ expect(isBooting(state, 7000)).toBe(false)+ state.snapshot = {} as NonNullable<typeof state.snapshot>+ expect(isBooting(state, 2500)).toBe(false)+ state.options.fps = 0+ expect(isBooting(state, 1100)).toBe(false)+ state.options.fps = 12+ state.options.boot = false+ expect(isBooting(state, 1100)).toBe(false)+ })++ it('provides an animated header on every page and a stable header at fps zero', () => {+ const state = newState({})+ state.options.look = 'orbital'+ state.options.boot = false+ for (const view of VIEWS) {+ state.view = view.id+ const key = view.id === 'menu' ? 'header' : 'title'+ state.options.fps = 12+ expect(picturesOf(state, 60, 1000, 1000).get(key)?.cells).not.toEqual(picturesOf(state, 60, 2000, 2000).get(key)?.cells)+ state.options.fps = 0+ const still = picturesOf(state, 60, 1000, 1000).get(key)+ expect(still).toBeDefined()+ expect(still!.cells).toEqual(picturesOf(state, 60, 2000, 2000).get(key)!.cells)+ }+ })+})