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(console): animate vector graph and orchestration stages

rUvc33916a07fb5
diff --git a/plugins/ruflo-console/hooks/gfx/orbital.ts b/plugins/ruflo-console/hooks/gfx/orbital.ts
index 7dd66da5ac..6623645f6c 100644
--- a/plugins/ruflo-console/hooks/gfx/orbital.ts
+++ b/plugins/ruflo-console/hooks/gfx/orbital.ts
@@ -111,7 +111,7 @@ export function orbitalGlobe(columns: number, rows: number, timeMs: number): Gri
/** Fixed-height header: red scan line, travelling ASCII pulse and an orbit marker. */
export function orbitalHeader(label: string, columns: number, timeMs: number): Grid {
const swarm = /swarm/i.test(label)
- const grid = blank(columns, swarm ? 12 : 4)
+ const grid = blank(columns, swarm ? 16 : 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)
@@ -131,16 +131,41 @@ export function orbitalHeader(label: string, columns: number, timeMs: number): G
const center = { x: Math.floor(grid.columns / 2), y: 5 }
const ms = Number.isFinite(timeMs) ? timeMs : 0
const phase = ms / 12000 * TAU
- const icons = ['β—‡', 'β–‘', 'β–³', 'β—Ž', 'β—‡', 'β–‘']
+ const icons = ['β—‡', 'β–‘', 'β–³', 'β—Ž', 'β—‡', 'β–‘', 'β–³', 'β—Ž']
const nodes = icons.map((icon, index) => {
const angle = phase + index * TAU / icons.length
const z = Math.sin(angle)
const perspective = 2.8 / (2.8 - z * 0.5)
return { icon, index, z, x: Math.round(center.x + Math.cos(angle) * grid.columns * 0.32 * perspective), y: Math.round(center.y + (Math.sin(angle) * 2.3 + Math.cos(angle) * 0.7) * perspective) }
}).sort((a, b) => a.z - b.z)
+ const beat = ((ms % 4800) + 4800) % 4800
+ const stage = Math.floor(beat / 1200)
+ // Sparse graph mesh and moving edge packets, all illustrative rather than reported traffic.
+ for (let y = 1; y <= 9; y += 2) for (let x = 3; x < grid.columns - 3; x += 6) grid.set(x, y, 'Β·', 0x18241f)
+ nodes.forEach(node => {
+ const next = nodes.find(other => other.index === (node.index + 1) % nodes.length)!
+ const dx = next.x - node.x
+ const dy = next.y - node.y
+ const steps = Math.max(1, Math.abs(dx), Math.abs(dy))
+ const packet = ((ms / 1100 + node.index * 0.19) % 1 + 1) % 1
+ for (let step = 1; step < steps; step++) {
+ const f = step / steps
+ const lit = Math.abs(packet - f) < 0.045
+ grid.set(Math.round(node.x + dx * f), Math.round(node.y + dy * f), lit ? 'β€’' : 'Β·', lit ? INK : 0x344138)
+ }
+ })
+ // Projected direction vectors extend from the hub, rotating independently of the graph.
+ for (let axis = 0; axis < 3; axis++) {
+ const angle = phase * 1.5 + axis * TAU / 3
+ for (let step = 2; step <= 8; step++) {
+ const x = center.x + Math.round(Math.cos(angle) * step * Math.min(1.7, grid.columns / 36))
+ const y = center.y + Math.round(Math.sin(angle) * step * 0.36)
+ grid.set(x, y, step === 8 ? (Math.cos(angle) < 0 ? 'β—€' : 'β–Ά') : 'Β·', step === 8 ? RED : 0x6c4335)
+ }
+ }
const drawHub = () => {
grid.text(center.x - 2, center.y + 1, ' β–‘β–‘β–‘ ', 0x4b2924)
- grid.text(center.x - 2, center.y, '[ β—ˆ ]', INK)
+ grid.text(center.x - 2, center.y, '[ β—ˆ ]', stage === 2 ? GREEN : INK)
}
let hubDrawn = false
nodes.forEach(node => {
@@ -148,7 +173,8 @@ export function orbitalHeader(label: string, columns: number, timeMs: number): G
const dx = node.x - center.x
const dy = node.y - center.y
const steps = Math.max(Math.abs(dx), Math.abs(dy))
- const pulse = ((ms / 1700 + node.index / icons.length) % 1 + 1) % 1
+ const outbound = ((ms / 1300 + node.index / icons.length) % 1 + 1) % 1
+ const pulse = stage >= 2 ? 1 - outbound : outbound
for (let step = 3; step < steps; step++) {
const f = step / steps
const x = Math.round(center.x + dx * f)
@@ -162,8 +188,19 @@ export function orbitalHeader(label: string, columns: number, timeMs: number): G
} else grid.set(node.x, node.y, node.icon, DIM)
})
if (!hubDrawn) drawHub()
- grid.text(1, 10, ' β—ˆ HUB β—‡ WORKER β–‘ TOOL β—Ž MEMORY', DIM)
- grid.text(1, 11, ' Decorative orbit / live topology below', DIM)
+ grid.text(1, 10, ' β—ˆ HUB β—‡ WORKER β–‘ TOOL β–³ TASK β—Ž MEMORY', DIM)
+ const stages = ['DISPATCH', 'PARALLEL', 'SYNC', 'RETURN']
+ const lane = Math.max(1, Math.floor((grid.columns - 2) / 4))
+ stages.forEach((label, index) => {
+ const x = 1 + index * lane
+ grid.text(x, 12, `${index === stage ? 'β–Ά' : 'Β·'} ${label}`.slice(0, lane), index === stage ? INK : DIM)
+ const cells = Math.max(1, lane - 2)
+ for (let i = 0; i < cells; i++) {
+ const lit = index === stage && i === Math.floor((beat % 1200) / 1200 * cells)
+ grid.set(x + i, 13, lit ? 'β–ͺ' : 'Β·', lit ? GREEN : 0x35413c)
+ }
+ })
+ grid.text(1, 15, ' Illustrative orchestration / live graph below', DIM)
} else if (grid.columns >= 30) grid.text(0, 3, ' ruvnet / agent swarm console', DIM)
return grid
}
diff --git a/plugins/ruflo-console/tests/orbital.spec.ts b/plugins/ruflo-console/tests/orbital.spec.ts
index 85ae74340e..1a731bc72e 100644
--- a/plugins/ruflo-console/tests/orbital.spec.ts
+++ b/plugins/ruflo-console/tests/orbital.spec.ts
@@ -116,7 +116,7 @@ it('gives swarm control its own bounded routing animation', () => {
for (const width of [20, 44, 72]) {
const first = orbitalHeader('swarm control', width, 0)
const later = orbitalHeader('swarm control', width, 500)
- expect([first.columns, first.rows]).toEqual([width, 12])
+ expect([first.columns, first.rows]).toEqual([width, 16])
expect(first.cells).not.toEqual(later.cells)
expect(gridText(first)).toContain('β—ˆ')
expect(gridText(first)).not.toContain('agents online')