π 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): spread the pages across the sections; the menu's top area no longer repeats them; the logo banner leads the compact menu (ADR-430)
ruv2ed937ac16bf
diff --git a/plugins/ruflo-console/hooks/gfx/pictures.ts b/plugins/ruflo-console/hooks/gfx/pictures.tsindex 3693273cfd..13bf2f5e2e 100644--- a/plugins/ruflo-console/hooks/gfx/pictures.ts+++ b/plugins/ruflo-console/hooks/gfx/pictures.ts@@ -338,7 +338,11 @@ export function bannerPicture(project: string, columns: number, t: number, age =if (columns > x0 + 4) {// The version, and the git revision when the session knows it: the revision changes with every commit, so it shows which build is loaded.- grid.text(x0, 0, `βββ AGENT SWARM CONSOLE v${CONSOLE_VERSION}${getBuild() === '' ? '' : ` Β· ${getBuild()}`}`.slice(0, columns - x0), NEON_MAGENTA)+ // The title, with the version and build when they fit beside the logo; when they do not, the title whole rather than cut mid-word.+ const title = 'βββ AGENT SWARM CONSOLE'+ const full = `${title} v${CONSOLE_VERSION}${getBuild() === '' ? '' : ` Β· ${getBuild()}`}`++ grid.text(x0, 0, (full.length <= columns - x0 ? full : title).slice(0, columns - x0), NEON_MAGENTA)const node = `βΈ npx ruflo Β· ${project}`.slice(0, columns - x0 - 2)grid.text(x0, 1, node, NEON_CYAN)diff --git a/plugins/ruflo-console/hooks/nav-state.ts b/plugins/ruflo-console/hooks/nav-state.tsindex 80b791427c..7439c62d19 100644--- a/plugins/ruflo-console/hooks/nav-state.ts+++ b/plugins/ruflo-console/hooks/nav-state.ts@@ -8,11 +8,11 @@ import { VIEWS, type State, type ViewId } from './state'/** The nav's groups, the main menu's own, each in rows short enough to spell their names: every view but the menu is in exactly one. */export const NAV_GROUPS: readonly { title: string; icon: string; rows: readonly (readonly ViewId[])[] }[] = [- { title: 'SWARM', icon: 'π', rows: [['missions', 'overview', 'swarm', 'hive', 'claims', 'approvals'], ['automate', 'timeline', 'events']] },- { title: 'MIND', icon: 'π§ ', rows: [['learning', 'neural', 'metaharness', 'evolve'], ['memory', 'vector', 'cost', 'perf']] },- { title: 'SAFETY', icon: 'π‘οΈ', rows: [['secure', 'devtools']] },+ { title: 'SWARM', icon: 'π', rows: [['missions', 'overview', 'swarm', 'hive', 'claims', 'approvals']] },+ { title: 'MIND', icon: 'π§ ', rows: [['learning', 'neural', 'metaharness', 'evolve', 'memory', 'vector']] },+ { title: 'SAFETY', icon: 'π‘οΈ', rows: [['secure', 'cost', 'perf', 'timeline', 'events']] },{ title: 'NETWORK', icon: 'π', rows: [['federation', 'xruv', 'plugins', 'skills', 'market']] },- { title: 'TOOLS', icon: 'π οΈ', rows: [['terminal', 'settings']] },+ { title: 'TOOLS', icon: 'π οΈ', rows: [['terminal', 'automate', 'devtools', 'settings']] },]export const groupOf = (view: ViewId): string | null => NAV_GROUPS.find(group => group.rows.some(row => row.includes(view)))?.title ?? nulldiff --git a/plugins/ruflo-console/hooks/views/menu.ts b/plugins/ruflo-console/hooks/views/menu.tsindex 152254496f..25d8ff5c2e 100644--- a/plugins/ruflo-console/hooks/views/menu.ts+++ b/plugins/ruflo-console/hooks/views/menu.ts@@ -25,20 +25,22 @@ export const GROUPS: readonly { title: string; sections: readonly { name: stringtitle: 'SWARM',sections: [{ name: 'start here', items: [{ label: 'Missions', go: 'missions' }, { label: 'Overview', go: 'overview' }, { label: 'Swarm Topology', go: 'swarm' }] },- { name: 'coordinate', items: [{ label: 'Hive-Mind', go: 'hive' }, { label: 'Claims Board', go: 'claims' }, { label: 'Approvals', go: 'approvals' }, { label: 'Automation', go: 'automate' }] },- { name: 'observe', items: [{ label: 'Agent Timeline', go: 'timeline' }, { label: 'Event Stream', go: 'events' }] },+ { name: 'coordinate', items: [{ label: 'Hive-Mind', go: 'hive' }, { label: 'Claims Board', go: 'claims' }, { label: 'Approvals', go: 'approvals' }] },],},{title: 'INTELLIGENCE',sections: [{ name: 'learn', items: [{ label: 'Learning', go: 'learning' }, { label: 'Neural', go: 'neural' }, { label: 'MetaHarness', go: 'metaharness' }, { label: 'Self-Evolution', go: 'evolve' }] },- { name: 'data & spend', items: [{ label: 'Memory Lab', go: 'memory' }, { label: 'Vector Lab', go: 'vector' }, { label: 'Cost & Budget', go: 'cost' }, { label: 'Performance', go: 'perf' }] },+ { name: 'remember', items: [{ label: 'Memory Lab', go: 'memory' }, { label: 'Vector Lab', go: 'vector' }] },],},{title: 'SAFETY & OPS',- sections: [{ name: 'safety & ops', items: [{ label: 'Security & Doctor', go: 'secure' }, { label: 'Dev Tools', go: 'devtools' }] }],+ sections: [+ { name: 'protect', items: [{ label: 'Security & Doctor', go: 'secure' }, { label: 'Cost & Budget', go: 'cost' }] },+ { name: 'observe', items: [{ label: 'Performance', go: 'perf' }, { label: 'Agent Timeline', go: 'timeline' }, { label: 'Event Stream', go: 'events' }] },+ ],},{title: 'NETWORK & EXTEND',@@ -49,7 +51,7 @@ export const GROUPS: readonly { title: string; sections: readonly { name: string},{title: 'TOOLS',- sections: [{ name: 'tools', items: [{ label: 'AI Terminal', go: 'terminal' }, { label: 'Settings', go: 'settings' }, { label: 'Command Palette', go: 'palette' }, { label: 'Help', go: 'help' }, { label: 'Log Off', go: 'close' }] }],+ sections: [{ name: 'tools', items: [{ label: 'AI Terminal', go: 'terminal' }, { label: 'Automation', go: 'automate' }, { label: 'Dev Tools', go: 'devtools' }, { label: 'Settings', go: 'settings' }, { label: 'Command Palette', go: 'palette' }, { label: 'Help', go: 'help' }, { label: 'Log Off', go: 'close' }] }],},]diff --git a/plugins/ruflo-console/hooks/views/nav.ts b/plugins/ruflo-console/hooks/views/nav.tsindex c332b056a8..841fd69853 100644--- a/plugins/ruflo-console/hooks/views/nav.ts+++ b/plugins/ruflo-console/hooks/views/nav.ts@@ -27,18 +27,37 @@ export function groupedTabs(ctx: Ctx, hasHotkey: (view: View) => boolean): Rendeconst query = state.navQueryconst find = (id: ViewId) => VIEWS.find(entry => entry.id === id)const found = query === '' ? null : findPages(query)- const pages: ViewId[][] = found !== null ? Array.from({ length: Math.ceil(found.length / PER_ROW) }, (_, i) => found.slice(i * PER_ROW, (i + 1) * PER_ROW)) : (NAV_GROUPS.find(group => group.title === shown)?.rows ?? []).map(ids => [...ids])+ // On the main menu the cards below already list every page, so the card up here is just the groups and the search: no row of pages repeating+ // them (and wrapping across the border in a narrow pane) until a group is picked.+ const isMenuIdle = open === 'menu' && !(state.navPick !== null && state.navPick.view === 'menu')+ const pages: ViewId[][] = isMenuIdle && found === null ? [] : found !== null ? Array.from({ length: Math.ceil(found.length / PER_ROW) }, (_, i) => found.slice(i * PER_ROW, (i + 1) * PER_ROW)) : (NAV_GROUPS.find(group => group.title === shown)?.rows ?? []).map(ids => [...ids])// What a page spells: its icon, and from `brief` a short name, from `full` the whole name. The engine puts a hotkey in front ("3: ").const spell = (view: View, form: string) => (form === 'icons' ? view.icon : form === 'brief' ? `${view.icon} ${view.short}` : `${view.icon} ${view.label}`)// The same badges the menu carries (approvals waiting, findings, an update ...), so the nav says what is going on behind a page too.const badges = badgesOf(state, ctx.nowMs)const badgeText = (view: View): string => (badges[view.id] === undefined ? '' : ` ${badges[view.id]?.text}`)- const cells = (view: View, form: string) => (hasHotkey(view) && view.key !== '' ? 3 : 0) + spell(view, form).length + badgeText(view).length + 3+ // The open page always spells out its whole name, whatever the form (see `tab`), so that is how wide it is.+ const openName = (view: View) => (isBbs() ? `[${view.key === '' ? '' : `${view.key}: `}${view.icon} ${view.label.toUpperCase()}]` : `${view.key === '' ? '' : `${view.key}: `}${view.icon} ${view.label}`)+ const cells = (view: View, form: string) => (view.id === open ? openName(view).length + 1 : (hasHotkey(view) && view.key !== '' ? 3 : 0) + spell(view, form).length + badgeText(view).length + 3)const widest = (form: string) => Math.max(0, ...pages.map(ids => ids.reduce((sum, id) => sum + (find(id) === undefined ? 0 : cells(find(id) as View, form)), 0)))// auto: the richest form whose widest row fits the page; the others are the person's choice (Settings).const form = state.nav === 'auto' ? (['full', 'brief'].find(candidate => widest(candidate) <= inner) ?? 'icons') : state.nav+ // A row of pages too wide even in the narrowest form wraps onto further rows, greedily, rather than running off the edge.+ const laid: ViewId[][] =+ widest(form) <= inner+ ? pages+ : pages.flat().reduce<ViewId[][]>((rows, id) => {+ const last = rows.at(-1)+ const width = (ids: readonly ViewId[]) => ids.reduce((sum, each) => sum + (find(each) === undefined ? 0 : cells(find(each) as View, form)), 0)++ if (last !== undefined && width([...last, id]) <= inner) last.push(id)+ else rows.push([id])++ return rows+ }, [])+const tab = (view: View): RenderElement => {const words = spell(view, form)const prefix = view.key === '' ? '' : `${view.key}: `@@ -57,7 +76,7 @@ export function groupedTabs(ctx: Ctx, hasHotkey: (view: View) => boolean): Rendeconst chipCells = NAV_GROUPS.reduce((sum, group) => sum + group.title.length + (icons ? 5 : 3), 12)const isSearchInline = inner - chipCells >= 28const chips = NAV_GROUPS.map(group =>- group.title === shown && found === null+ group.title === shown && found === null && !isMenuIdle? ctx.kit.Box({ key: `nav-group-${group.title}`, children: [ctx.kit.Text({ ...(isBbs() ? chip(NAV_ACCENT[group.title] ?? THEME.head) : { bold: true, color: THEME.head }), children: `[${icons ? `${group.icon} ` : ''}${group.title} βΎ]` })] }): ctx.kit.Button({ key: `nav-group-${group.title}`, label: ` ${icons ? `${group.icon} ` : ''}${group.title} `, plain: true, dimColor: true, onPress: () => ctx.act.navigator.group(group.title) }),)@@ -74,7 +93,7 @@ export function groupedTabs(ctx: Ctx, hasHotkey: (view: View) => boolean): Rendeconst lines =found !== null && found.length === 0? [ctx.kit.Text({ dimColor: true, children: ` no page matches β${query}β β try a name, a group or what it does` })]- : pages.map((ids, i) =>+ : laid.map((ids, i) =>ctx.kit.Box({ flexDirection: 'row', gap: 1, key: `tabs-row-${i}`, children: ids.flatMap(id => (find(id) === undefined ? [] : [tab(find(id) as View)])) }),)const note = found === null ? [] : [ctx.kit.Text({ dimColor: true, children: ` ${found.length} found for β${query}β${found.length === 1 ? '' : ' β Enter again on one name opens it'}` })]diff --git a/plugins/ruflo-console/hooks/views/pane.ts b/plugins/ruflo-console/hooks/views/pane.tsindex 92bf2e78a9..95f4f96acd 100644--- a/plugins/ruflo-console/hooks/views/pane.ts+++ b/plugins/ruflo-console/hooks/views/pane.ts@@ -347,7 +347,8 @@ export function paneView(base: Ctx): RenderElement {const confirm = attention.placed ? null : confirmRow(ctx)const header = ctx.pictures.get('header')const isCompact = isCompactPane(ctx.state)- const title = !isCompact && header !== undefined && ctx.kit.Raster !== undefined ? [ctx.kit.Raster(header.toRaster('header'))] : []+ // 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: [] }// 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.@@ -358,7 +359,7 @@ export function paneView(base: Ctx): RenderElement {// The confirm row sits above the body in both layouts: below it, a tall view would push the question off the screen.// Compact keeps every page's title and its line of purpose; only the banner and the spacing go. The title leads, then the tabs, as in the wide layout.const parts = isCompact- ? [...bbs.art, ...(about !== null ? [about] : []), tabs(ctx), ...(confirm !== null && !confirmInline(ctx.state.view, ctx.state.pending?.scope) ? [confirm] : []), footer(ctx, attention.placed), body]+ ? [...(ctx.state.view === 'menu' && title.length > 0 ? title : bbs.art), ...(about !== null ? [about] : []), tabs(ctx), ...(confirm !== null && !confirmInline(ctx.state.view, ctx.state.pending?.scope) ? [confirm] : []), footer(ctx, attention.placed), body]: !isMenu && isBbs()? // Every page but the main menu leads with its own title and purpose line; the welcome line and network links follow, with a blank row between the blocks.[...bbs.art, ...(about !== null ? [about] : []), ...(cardsOn ? [] : [...gap, ...bbs.strip, ...gap]), tabs(ctx), ...(cardsOn ? [] : gap), footer(ctx, attention.placed), ...(confirm !== null && !isTerminal && !confirmInline(ctx.state.view, ctx.state.pending?.scope) ? [confirm] : []), body, ...(confirm !== null && isTerminal ? [confirm] : [])]diff --git a/plugins/ruflo-console/tests/design.spec.ts b/plugins/ruflo-console/tests/design.spec.tsindex c7efaf05cb..0ac475a8c1 100644--- a/plugins/ruflo-console/tests/design.spec.ts+++ b/plugins/ruflo-console/tests/design.spec.ts@@ -96,7 +96,7 @@ describe('the nav card', () => {})it('puts the menu\'s badges on the page buttons: spend on Cost, an update on Settings', () => {- const cost = open('learning', 140, state => {+ const cost = open('secure', 140, state => {state.usage = { costUsd: 19.81 }})const settings = open('terminal', 140, state => {@@ -106,14 +106,14 @@ describe('the nav card', () => {expect(String(tab(cost.card, 'cost')?.props.label)).toContain('$19.81')expect(String(tab(settings.card, 'settings')?.props.label)).toContain('β¬ 0.27.0')// And none where there is nothing to say.- expect(String(tab(open('learning', 140).card, 'cost')?.props.label)).not.toMatch(/\$\d/)+ expect(String(tab(open('secure', 140).card, 'cost')?.props.label)).not.toMatch(/\$\d/)})it('never lets a badge push a row of pages past the width, at any width the nav draws', () => {// Every width, not a few: the auto form is chosen by whether the widest row fits, so an uncounted badge only overruns in the narrow// window of widths where that choice is on the edge.- for (let columns = 44; columns <= 200; columns++) {- const { card } = open('learning', columns, state => {+ for (const view of ['learning', 'secure', 'swarm', 'settings', 'federation'] as const) for (let columns = 44; columns <= 200; columns++) {+ const { card } = open(view, columns, state => {state.usage = { costUsd: 1234.5 }state.updateAvailable = '10.20.30'})@@ -147,3 +147,32 @@ describe('a chip cannot vanish', () => {expect(trees.flatMap(texts).filter(node => node.props.inverse === true).length).toBeGreaterThan(10)})})++describe('the nav card on the main menu', () => {+ const draw = (pick: boolean): El => {+ const state = newState({})++ state.view = 'menu'+ if (pick) state.navPick = { group: 'MIND', view: 'menu' }+ setLook('bbs')++ return groupedTabs(ctxOf(state, 100), () => true) as unknown as El+ }+ const rows = (card: El): El[] => flat(card).filter(node => String(node.props.key).startsWith('tabs-row-'))++ it('has no row of pages while idle (the cards below list them), and shows a group\'s pages once it is picked', () => {+ expect(rows(draw(false))).toEqual([])+ expect(flat(draw(false)).some(node => node.props.key === 'nav-group-SWARM')).toBe(true)++ const picked = rows(draw(true))++ expect(picked.length).toBeGreaterThan(0)+ expect(flat(picked[0]).some(node => node.props.key === 'tab-learning')).toBe(true)+ })++ it('keeps every page reachable by its key from the menu: they are hidden buttons, not gone', () => {+ const keys = flat(draw(false)).filter(node => String(node.props.key).startsWith('tab-') && node.props.hotkey !== undefined).map(node => String(node.props.key))++ for (const page of ['missions', 'overview', 'swarm', 'hive', 'claims', 'approvals']) expect(keys, page).toContain(`tab-${page}`)+ })+})diff --git a/plugins/ruflo-console/tests/pane-order.spec.ts b/plugins/ruflo-console/tests/pane-order.spec.tsindex 4d4d04e051..7010176fd6 100644--- a/plugins/ruflo-console/tests/pane-order.spec.ts+++ b/plugins/ruflo-console/tests/pane-order.spec.ts@@ -67,3 +67,40 @@ describe('the pane\'s order', () => {expect(title).toBeLessThan(tabs)})})++describe('the main menu\'s header when the pane is small', () => {+ it('is the logo banner in the compact layout too, not the big-letter page title', () => {+ const state = newState({})++ state.options.look = 'bbs'+ state.options.boot = false+ state.view = 'menu'+ state.pane.placement = 'inline'+ state.pane.rows = 8+ state.pane.columns = 60+ state.snapshot = null++ const pictures = new Map([['title', new Grid(40, 2)], ['header', new Grid(60, 2)]])+ const tree = paneView({ kit, state, nowMs: Date.now(), columns: 60, pictures, act, cards: false } as unknown as Ctx) as unknown as El+ const rasters = flat(tree).filter(node => node.kind === 'Raster').map(node => String((node.props as { key?: unknown }).key ?? ''))++ expect(rasters[0]).toBe('header')+ expect(rasters).not.toContain('title')+ })++ it('shows the title whole, with the version only when it fits beside the logo', async () => {+ const { bannerPicture } = await import('../hooks/gfx/pictures')+ const text = (columns: number): string => {+ const grid = bannerPicture('ruflo', columns, 0)+ let row = ''++ for (let x = 0; x < columns; x++) row += String.fromCodePoint(grid.glyph(x, 0))++ return row+ }++ expect(text(44)).toContain('AGENT SWARM CONSOLE')+ expect(text(44)).not.toMatch(/ v\d/)+ expect(text(90)).toMatch(/AGENT SWARM CONSOLE v\d/)+ })+})diff --git a/v3/docs/adr/ADR-430-console-menu-design.md b/v3/docs/adr/ADR-430-console-menu-design.mdindex 2b5a2ca2af..5cb64618df 100644--- a/v3/docs/adr/ADR-430-console-menu-design.md+++ b/v3/docs/adr/ADR-430-console-menu-design.md@@ -9,3 +9,9 @@- **Sub-sections that earn their rule.** The five cards had 13 sub-sections, several of one entry that only restated it (`mission` β Missions, `protect` β Security, `build` β Dev Tools). They are now 9: SWARM *start here* (Missions, Overview, Swarm Topology) Β· *coordinate* Β· *observe*; INTELLIGENCE *learn* Β· *data & spend*; NETWORK & EXTEND *network* Β· *plugins*; and SAFETY & OPS and TOOLS (Settings, the AI terminal, the palette, help, log off) each a single section, which draws no rule at all. Every page is listed once. Specs: each page appears once (and Overview, Missions, Swarm and Settings are there); a card with several sections has two or more entries in each; the rules drawn equal the multi-section cards' sections; a card keeps its height while the entry animation plays.- **Scroll to top.** Switching pages, opening help and opening the palette scroll the pane back to its first row (`$.ui.scroll({ to: 'start' })`, once at once and once more 80 ms later, so a page taller than the last still lands at its top). The terminal page's own wheel handling ignores that scroll. Pressing the page you are on does not scroll.++## Amendment (2026 10 03, later): the pages are spread across the sections, and the menu's top area stops repeating them++- **Balanced sections.** SWARM held nine pages over two rows while SAFETY and TOOLS held two each. Every page still exists, now spread: SWARM (Missions, Overview, Swarm, Hive-Mind, Claims, Approvals) Β· MIND (Learning, Neural, MetaHarness, Self-Evolution, Memory, Vector) Β· SAFETY (Security & Doctor, Cost, Performance, Timeline, Events) Β· NETWORK (Federation, x.ruv.io, Plugins, Skills, Plugin Catalog) Β· TOOLS (Terminal, Automation, Dev Tools, Settings). The menu's cards use the same assignment (a spec requires each page's menu colour to equal its nav colour). No group is more than one row, and a row too wide for its pane wraps onto the next instead of running through the card's border (the open page is counted at its full spelled name).+- **No repeated page row on the main menu.** The nav card at the top of the main menu is the groups and the search; the cards below already list every page. Picking a group chip shows that group's pages. Every page's key still works from the menu (the pages are hidden buttons).+- **The logo banner leads the menu in a small pane too** (it had been replaced by the big-letter page title in the compact layout), and its title keeps `AGENT SWARM CONSOLE` whole, dropping the version before it would cut the title.