π 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 menu banner strikes in with the same glitch; shared strike-in (ADR-433)
ruv8603e345d4da
diff --git a/plugins/ruflo-console/hooks/gfx/pictures.ts b/plugins/ruflo-console/hooks/gfx/pictures.tsindex bbbe5cfa64..d83087b171 100644--- a/plugins/ruflo-console/hooks/gfx/pictures.ts+++ b/plugins/ruflo-console/hooks/gfx/pictures.ts@@ -242,11 +242,50 @@ const LOGO = ['βββ β β βββ β βββ', 'βββ ββconst NEON_MAGENTA = 0xff2a6dconst NEON_CYAN = 0x05d9e8+/** A header strikes in over this long when its page is switched to, and when the menu enters. */+export const TITLE_ENTRY_MS = 1_200+const GLITCH = '#%&@/\\|<>=+*'++/**+ * The strike-in shared by the page titles and the menu banner: from `from`, the letters appear left to right, a bright edge leading+ * and block noise ahead of it; behind the edge a few settled cells flip for a frame to an ASCII character (pink or cyan, fading to none),+ * and now and then a row slips one cell sideways. Hash-driven, so a frame is reproducible; nothing once `age` reaches TITLE_ENTRY_MS.+ */+function strikeIn(grid: Grid, from: number, age: number): void {+ if (age >= TITLE_ENTRY_MS) return++ let last = from++ for (let i = 0; i < grid.columns * grid.rows; i++) if (grid.cells[i * 3] !== 0x20) last = Math.max(last, i % grid.columns)++ const span = last - from + 1+ const lead = from + (age / TITLE_ENTRY_MS) * (span + 1)++ for (let y = 0; y < grid.rows; y++) {+ for (let x = from; x <= last; x++) {+ if (grid.glyph(x, y) === 0x20) continue++ if (x > lead + 1) grid.set(x, y, 'ββββ'[hash(x * 7 + y + Math.floor(age / 60)) % 4] as string, mix(0x3a0f2e, NEON_CYAN, 0.35))+ else if (x > lead - 1.5) grid.set(x, y, grid.glyph(x, y), 0xffffff)+ else if (hash(x * 13 + y * 7 + Math.floor(age / 50)) % 100 < 4 * (1 - age / TITLE_ENTRY_MS)) grid.set(x, y, GLITCH[hash(x + y + Math.floor(age / 50)) % GLITCH.length] as string, hash(x + Math.floor(age / 50)) % 2 === 0 ? 0xff2a6d : 0x05d9e8)+ }++ const slip = hash(y * 5 + Math.floor(age / 80))++ if (slip % 16 === 0 && age < TITLE_ENTRY_MS - 150) {+ const by = (slip >>> 4) % 2 === 0 ? 1 : -1+ const row = grid.cells.slice(y * grid.columns * 3, (y + 1) * grid.columns * 3)++ for (let x = from; x <= last; x++) grid.cells.set(row.slice(Math.max(0, x - by) * 3, Math.max(0, x - by) * 3 + 3), (y * grid.columns + x) * 3)+ }+ }+}+/*** 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 {+export function bannerPicture(project: string, columns: number, t: number, age = Infinity): Grid {const grid = new Grid(columns, 2)const width = LOGO[0].lengthconst sweep = ((t / 28) % (columns + 40)) - 20@@ -273,6 +312,8 @@ export function bannerPicture(project: string, columns: number, t: number): Gridif (Math.floor(t / 530) % 2 === 0 && x0 + node.length + 1 < columns) grid.set(x0 + node.length + 1, 1, 'β', NEON_CYAN)}+ strikeIn(grid, 0, age)+return grid}@@ -282,10 +323,6 @@ const NEON_CORAL = 0xff7a59* A view's BBS title: its name in the two-row half-block font, magenta to coral like the ANSI art boards, framed by* dithered βββ ramps, with a slow shimmer down the letters (decoration). Two rows.*/-/** A page title strikes in over this long when the page is switched to. */-export const TITLE_ENTRY_MS = 1_200-const GLITCH = '#%&@/\\|<>=+*'-export function titlePicture(name: string, columns: number, t: number, age = Infinity): Grid {const grid = new Grid(columns, 2)const [top, bottom] = bigText(name)@@ -322,31 +359,7 @@ export function titlePicture(name: string, columns: number, t: number, age = Inf})}- // Just switched to: the letters strike in from the left, a bright edge leading and noise ahead of it, the same entry as the boot's log.- if (age < TITLE_ENTRY_MS) {- const lead = x0 + (age / TITLE_ENTRY_MS) * (width + 1)-- for (let y = 0; y < 2; y++) {- for (let x = x0; x < Math.min(columns, x0 + width); x++) {- if (grid.glyph(x, y) === 0x20) continue-- if (x > lead + 1) grid.set(x, y, 'ββββ'[hash(x * 7 + y + Math.floor(age / 60)) % 4] as string, mix(0x3a0f2e, NEON_CYAN, 0.35))- else if (x > lead - 1.5) grid.set(x, y, grid.glyph(x, y), 0xffffff)- // Behind the edge the letters are settled but still glitching: some flip to an ASCII character for a frame, pink or cyan, less as the entry ends.- else if (hash(x * 13 + y * 7 + Math.floor(age / 50)) % 100 < 4 * (1 - age / TITLE_ENTRY_MS)) grid.set(x, y, GLITCH[hash(x + y + Math.floor(age / 50)) % GLITCH.length] as string, hash(x + Math.floor(age / 50)) % 2 === 0 ? 0xff2a6d : 0x05d9e8)- }-- // And now and then a whole row slips sideways a cell or two, and snaps back.- const slip = hash(y * 5 + Math.floor(age / 80))-- if (slip % 16 === 0 && age < TITLE_ENTRY_MS - 150) {- const by = (slip >>> 4) % 2 === 0 ? 1 : -1- const row = grid.cells.slice(y * columns * 3, (y + 1) * columns * 3)-- for (let x = x0; x < Math.min(columns, x0 + width); x++) grid.cells.set(row.slice(Math.max(0, x - by) * 3, Math.max(0, x - by) * 3 + 3), (y * columns + x) * 3)- }- }- }+ strikeIn(grid, x0, age)return grid}diff --git a/plugins/ruflo-console/hooks/views/frames.ts b/plugins/ruflo-console/hooks/views/frames.tsindex 4a2ffb3baf..f91c285386 100644--- a/plugins/ruflo-console/hooks/views/frames.ts+++ b/plugins/ruflo-console/hooks/views/frames.ts@@ -21,7 +21,8 @@ import { activityPicture, bannerPicture, bootPicture, titlePicture, curvePictureimport type { Grid } from '../gfx/raster'import { PROBES, severityOf } from '../data/cli'import { EXPECTED_IN_MARKET, RUFLO_MARKET } from '../data/snapshot'-import { isBooting, isCompactPane, VIEWS, type State } from '../state'+import { entryAge } from '../menu-entry'+import { BOOT_MIN_MS, isBooting, isCompactPane, VIEWS, type State } from '../state'import { CARD_COLUMNS, hasCards } from './card'import { live } from './common'import { hivePictures } from './hive'@@ -134,10 +135,14 @@ export function picturesOf(state: State, columns: number, nowMs: number, t: numbreturn pictures}+ // The headers strike in when a page is switched to and when the menu enters (never with fps 0, which draws the still header).+ const sinceSwitch = state.pane.viewAtMs > 0 ? nowMs - state.pane.viewAtMs : Infinity+ const headerAge = state.options.fps > 0 ? Math.min(sinceSwitch, entryAge({ look: state.options.look, boot: state.options.boot, ...state.pane }, nowMs, BOOT_MIN_MS) ?? Infinity) : Infinity+if (!isCompactPane(state) && state.view === 'menu') {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 v${CONSOLE_VERSION}${getBuild() === '' ? '' : ` Β· ${getBuild()}`} Β· ${project}`, Math.min(width, 64), t))+ pictures.set('header', state.options.look === 'bbs' ? bannerPicture(project, Math.min(width, 72), t, headerAge) : headerPicture(`β ruflo v${CONSOLE_VERSION}${getBuild() === '' ? '' : ` Β· ${getBuild()}`} Β· ${project}`, Math.min(width, 64), t))// The palette strip above the menu's groups moves while the frame loop runs; with fps 0 it is the still strip (the light is off it).if (state.options.look === 'bbs') pictures.set('palette', palettePicture(Math.max(8, width - 2), state.options.fps > 0 ? t : 0, PALETTE.map(rgb)))}@@ -148,7 +153,7 @@ export function picturesOf(state: State, columns: number, nowMs: number, t: numb// The menu is the RUFLO board itself; every other page reads `RUFLO | PAGE`, the logo's style left of the page's name.const name = state.view === 'menu' && !state.isHelp && !state.palette.isOpen ? 'ruflo bbs' : `ruflo | ${page}`- pictures.set('title', titlePicture(name, Math.min(width, 120), t, state.pane.viewAtMs > 0 && state.options.fps > 0 ? nowMs - state.pane.viewAtMs : Infinity))+ pictures.set('title', titlePicture(name, Math.min(width, 120), t, headerAge))}switch (state.view) {diff --git a/plugins/ruflo-console/tests/menu-entry.spec.ts b/plugins/ruflo-console/tests/menu-entry.spec.tsindex a3916b34d5..5ec10a4f95 100644--- a/plugins/ruflo-console/tests/menu-entry.spec.ts+++ b/plugins/ruflo-console/tests/menu-entry.spec.ts@@ -146,3 +146,16 @@ describe('the title glitch', () => {expect(ascii(Infinity)).toBe(0)})})++describe('the menu banner', () => {+ it('strikes in like the titles, and is the still banner once over or with no age', async () => {+ const { bannerPicture, TITLE_ENTRY_MS } = await import('../hooks/gfx/pictures')+ const cells = (age?: number): string => [...bannerPicture('p', 72, 0, age).cells].join(',')+ const done = cells()++ expect(cells(TITLE_ENTRY_MS)).toBe(done)+ expect(cells(Infinity)).toBe(done)+ expect(cells(300)).not.toBe(done)+ expect(cells(300)).toBe(cells(300))+ })+})diff --git a/v3/docs/adr/ADR-433-console-menu-entry-and-page-title-strike-in.md b/v3/docs/adr/ADR-433-console-menu-entry-and-page-title-strike-in.mdindex e04c21cb28..92ce898cc1 100644--- a/v3/docs/adr/ADR-433-console-menu-entry-and-page-title-strike-in.md+++ b/v3/docs/adr/ADR-433-console-menu-entry-and-page-title-strike-in.md@@ -22,3 +22,7 @@ Seen only as text and element trees, not on a terminal. A press on an entry whil## 3. Amendment: ASCII glitch in the strike-inBehind the leading edge, a share of the settled letters (4%, fading to none by the end; first tried at 14%, too loud) flip for a frame to an ASCII character (`#%&@/\|<>=+*`) in pink or cyan, and a title row now and then slips sideways one cell (about one frame in sixteen) and snaps back. Hash-driven, so reproducible; none once the 1.2 s are over (spec: glitch characters appear during the entry and the finished title has none).++## 4. Amendment: the menu banner, and one shared strike-in++The strike-in and its glitch are one function (`strikeIn` in `gfx/pictures.ts`) used by the page titles and by the menu's RUFLO banner. Headers take one age: the time since the page was switched to, or since the menu's entry began (so the banner and the title strike in at launch too), whichever is more recent. With fps 0 they are the still headers.