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): register memory-health probe; move segmentOf out of controller (500-line limit)

ruvdb2299956cf4
diff --git a/plugins/ruflo-console/hooks/controller.ts b/plugins/ruflo-console/hooks/controller.ts
index 34b76957fd..0b30af4a44 100644
--- a/plugins/ruflo-console/hooks/controller.ts
+++ b/plugins/ruflo-console/hooks/controller.ts
@@ -8,9 +8,10 @@ import type { Catalog } from './data/catalog'
import { PROBES, probeArgv, probeError, probeReady, type ProbeResult } from './data/cli'
import { ALL_COST_PROBES as COST_PROBES } from './data/cost-probes'
import { memmapProbe } from './data/memmap'
+import { memoryHealthProbe } from './data/memory-health'
import { X_PROBES } from './data/xruv'
import { diffEvents, record } from './data/events'
-import { agentName, announceChanges, factsOf } from './notices'
+import { agentName, announceChanges, factsOf, segmentOf } from './notices'
import { plain } from './data/parse'
import { readSnapshot } from './data/snapshot'
import { markPicture } from './gfx/pictures'
@@ -33,7 +34,7 @@ import { pulseDue } from './pulse'
const ACTIVITY_BUCKET_MS = 5_000
const PANE_WATCH_MS = 1_000
const MAX_PARALLEL_PROBES = 2
-const ALL_PROBES = [...PROBES, ...X_PROBES, ...COST_PROBES, memmapProbe] // CLI probes, the x.ruv.io board's network reads, cost, the memory map's list: one cadence and option gate
+const ALL_PROBES = [...PROBES, ...X_PROBES, ...COST_PROBES, memmapProbe, memoryHealthProbe] // CLI probes, the x.ruv.io board's network reads, cost, the memory map's list: one cadence and option gate
const BAR_FRESH_MS = 10_000
const IDLE_REFRESH_MS = 30_000
const TOOLS_RECOUNT_MS = 30_000
@@ -64,14 +65,6 @@ export type Controller = {
markFrame: (requestId: string, isWorking: boolean) => void
}
-/** With the band off, the console's words ride ruflo-mods' status line instead: claims and a stale marketplace only. */
-export function segmentOf(state: State): string | null {
- const claims = state.snapshot?.claims ?? []
- const parts = [claims.length > 0 ? `${claims.length} claims` : '', state.snapshot?.plugins.missingFromClone.length ? 'marketplace stale' : ''].filter(Boolean)
-
- return parts.length === 0 ? null : parts.join(' · ')
-}
-
export function createController(state: State, host: Host): Controller {
let activityCount = 0
let markRequest: string | null = null
diff --git a/plugins/ruflo-console/hooks/notices.ts b/plugins/ruflo-console/hooks/notices.ts
index dc1389a54e..36c643d57d 100644
--- a/plugins/ruflo-console/hooks/notices.ts
+++ b/plugins/ruflo-console/hooks/notices.ts
@@ -175,3 +175,11 @@ const sorted = (values: readonly number[]) => [...values].sort((a, b) => a - b)
export const median = (values: readonly number[]) => sorted(values)[Math.floor(values.length / 2)] ?? 0
export const p95 = (values: readonly number[]) => sorted(values)[Math.min(values.length - 1, Math.floor(values.length * 0.95))] ?? 0
+
+/** With the band off, the console's words ride ruflo-mods' status line instead: claims and a stale marketplace only. */
+export function segmentOf(state: State): string | null {
+ const claims = state.snapshot?.claims ?? []
+ const parts = [claims.length > 0 ? `${claims.length} claims` : '', state.snapshot?.plugins.missingFromClone.length ? 'marketplace stale' : ''].filter(Boolean)
+
+ return parts.length === 0 ? null : parts.join(' · ')
+}