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): the Learning pulse folds into its section; the marker quickens and spins while learning runs; settings show their state in the header

ruv98df4d220f4c
diff --git a/plugins/ruflo-console/hooks/views/learning-pulse.ts b/plugins/ruflo-console/hooks/views/learning-pulse.ts
index 70a33b2c44..08875996ef 100644
--- a/plugins/ruflo-console/hooks/views/learning-pulse.ts
+++ b/plugins/ruflo-console/hooks/views/learning-pulse.ts
@@ -1,28 +1,31 @@
import type { RenderElement } from 'claude-code'
import { gauge, sparkline } from '../memory-lines'
-import { count, rule, row, text, THEME, type Ctx } from './common'
+import { section, count, row, text, THEME, type Ctx } from './common'
import { stagesOf } from './frames'
+import { spinAt } from '../spinner'
/** One step of the animation every 160 ms; nothing moves while the pane is hidden (the frame loop stops). */
const beat = (ctx: Ctx, ms: number): number => Math.floor(ctx.nowMs / ms)
/**
- * The learning pulse: text charts that move while the pane is open. A marker travels the pipeline (RETRIEVE β†’ JUDGE β†’ DISTILL β†’
- * CONSOLIDATE), the router's model mix is a bar chart with a highlight that sweeps along each bar, and the success rate is a sparkline
- * with a scanning cursor. They draw what was measured and nothing else: no data, no chart.
+ * The learning pulse, folded in its own section: text charts that move while the pane is open. A marker travels the pipeline
+ * (RETRIEVE β†’ JUDGE β†’ DISTILL β†’ CONSOLIDATE), the router's model mix is a bar chart with a highlight that sweeps along each bar, and
+ * the success rate is a sparkline with a scanning cursor. While a learning action runs the marker quickens and the active stage
+ * shows the spinner, so activity reads at a glance. They draw what was measured and nothing else: no data, no chart.
*/
export function pulseRows(ctx: Ctx): RenderElement[] {
const { state } = ctx
- const rows: RenderElement[] = [rule(ctx, 'Learning pulse', 'live: the marker moves, the data is what ruflo measured')]
+ const rows: RenderElement[] = []
+ const running = state.lab.running?.id.startsWith('nn-') === true
const stages = stagesOf(state)
- const at = beat(ctx, 700) % Math.max(1, stages.length)
+ const at = beat(ctx, running ? 250 : 700) % Math.max(1, stages.length)
rows.push(
row(
ctx,
stages.flatMap((stage, i) => [
- ctx.kit.Text({ bold: i === at, color: i === at ? THEME.warn : THEME.info, children: ` ${i === at ? '●' : 'β—‹'} ${stage.name} ${stage.count ?? 'n/a'}` }),
+ ctx.kit.Text({ bold: i === at, color: i === at ? THEME.warn : THEME.info, children: ` ${i === at ? (running ? spinAt(ctx.nowMs) : '●') : 'β—‹'} ${stage.name} ${stage.count ?? 'n/a'}` }),
...(i < stages.length - 1 ? [ctx.kit.Text({ dimColor: true, children: ' ━━' })] : []),
]),
'pulse-pipeline',
@@ -67,5 +70,7 @@ export function pulseRows(ctx: Ctx): RenderElement[] {
for (const [name, value] of Object.entries(sizes)) rows.push(text(ctx, ` ${name.padEnd(14)} ${gauge(value, top, 24)} ${count(value)}`, { color: THEME.info }))
}
- return rows
+ const live = state.lab.running?.id.startsWith('nn-') === true
+
+ return section(ctx, 'learn-pulse', 'Learning pulse', live ? `${spinAt(ctx.nowMs)} learning now Β· the marker quickens` : 'live: the marker moves, the data is what ruflo measured', rows, true)
}
diff --git a/plugins/ruflo-console/hooks/views/learning.ts b/plugins/ruflo-console/hooks/views/learning.ts
index ac5b28e095..b44d8032ae 100644
--- a/plugins/ruflo-console/hooks/views/learning.ts
+++ b/plugins/ruflo-console/hooks/views/learning.ts
@@ -16,11 +16,14 @@ function configRows(ctx: Ctx): RenderElement[] {
{ key: 'hooks.enabled', title: 'Hooks', help: 'hooks that learn from your edits and routes' },
]
+ // The header says where each switch stands, so the state reads without opening the section; each change still asks first.
+ const summary = keys.map(item => `${item.title.toLowerCase()} ${core?.get(item.key) === 'true' ? 'on' : core?.get(item.key) === 'false' ? 'off' : 'n/a'}`).join(' Β· ')
+
return section(
ctx,
'learn-config',
'Settings & configuration',
- 'what lets ruflo learn Β· each change asks first',
+ `${summary} Β· each change asks first`,
[
...keys.map(item => {
const value = core?.get(item.key)