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

chore(console): 0.40.6 changelog; keep perf probe entries gated as delete (do not lower the gate); reduce instead of Math.max spread

rf407072f3510
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.json
index c63830a39c..a413886363 100644
--- a/plugins/ruflo-console/.claude-plugin/plugin.json
+++ b/plugins/ruflo-console/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "ruflo-console",
"description": "ruflo's cockpit inside Claude Code and the one /ruflo command for every ruflo mod (function hooks, early access). Views: overview with health alerts, swarm topology graph, claims flow with TTL rings, federation map, plugin health matrix, learning curve and pipeline, MetaHarness radar and audit trend, memory, cost gauge, agent timeline, approvals queue, event stream, a main menu, an x.ruv.io federation board, an AI terminal (codex, claude or both in remembered sessions, streamed), Skills (npx skills), a Hive-Mind view, a MetaHarness lab, agent drill-down; a command palette for confirm-gated actions through the ruflo CLI; a band above the prompt. Reads ruflo's files and the CLI's local JSON; anything not measured reads n/a. The one network call it makes by itself is a daily read of the published plugin.json at github.com/ruvnet/ruflo to offer an update (Settings → Updates: ask, auto, or off); it installs only through Claude Code's own claude plugin update, and never a new major version without asking.",
- "version": "0.40.5",
+ "version": "0.40.6",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-console/CHANGELOG.md b/plugins/ruflo-console/CHANGELOG.md
index 7344e02b08..2a8008eaad 100644
--- a/plugins/ruflo-console/CHANGELOG.md
+++ b/plugins/ruflo-console/CHANGELOG.md
@@ -2,6 +2,9 @@
Newest first. One `## <version> — <date>` heading per version, then `feat:`, `fix:`, `breaking:` and `chore:` bullets (ADR-478). Built from git history; older versions: `git log -- plugins/ruflo-console`.
+## 0.40.6 — 2026-10-09
+- fix: times read as times and a swarm reads as itself: the AgentDB mod's "written" age no longer shows 100020735d ago or 0s for a future stamp (it reads n/a), a swarm's agent count and status agree on Overview, Swarm, the topology graph, the status bar and Workflows (a swarm with no listed members says so; "stalled" needs evidence, not just an old record), Workflows agent ages show days, and `mission-goal` says it replaces the goal instead of "nothing is written" (#3935, #3936, thanks @proffesor-for-testing)
+
## 0.40.5 — 2026-10-09
- fix: a verdict command's "found something" exit (security scans, AIDefence checks, MetaHarness mcp-scan, threat-model and drift) is an answer, not a failure: Claude is told what was found, and a failed run names its real reason (the [ERROR] line, a wrapped tool error) instead of the CLI's [WARN] banner; the answer is read out of stdout in bounded time (#3933, #3934, thanks @proffesor-for-testing)
diff --git a/plugins/ruflo-console/hooks/data/swarm-status.ts b/plugins/ruflo-console/hooks/data/swarm-status.ts
index 047e166dfc..f47b230008 100644
--- a/plugins/ruflo-console/hooks/data/swarm-status.ts
+++ b/plugins/ruflo-console/hooks/data/swarm-status.ts
@@ -44,7 +44,7 @@ export function uniqueAgents(agents: readonly AgentRecord[]): AgentRecord[] {
export function swarmStatusOf(swarm: SwarmInfo, nowMs: number, agents: readonly AgentRecord[]): SwarmStatus {
const updatedMs = sinceOf(msOf(swarm.updatedAt), nowMs)
const own = swarmMembersOf(swarm, agents)
- const newest = Math.max(...own.members.map(agent => sinceOf(agent.createdAtMs, nowMs) ?? Number.POSITIVE_INFINITY))
+ const newest = own.members.reduce((latest, agent) => Math.max(latest, sinceOf(agent.createdAtMs, nowMs) ?? Number.POSITIVE_INFINITY), Number.NEGATIVE_INFINITY)
const quiet = own.members.length > 0 && !own.members.some(agent => BUSY.test(agent.status)) && Number.isFinite(newest) && nowMs - newest > SWARM_STALE_MS
const isStale = swarm.status === 'running' && updatedMs !== undefined && nowMs - updatedMs > SWARM_STALE_MS && quiet
diff --git a/plugins/ruflo-console/hooks/optimizer.ts b/plugins/ruflo-console/hooks/optimizer.ts
index 72c2da23f5..517dafaa38 100644
--- a/plugins/ruflo-console/hooks/optimizer.ts
+++ b/plugins/ruflo-console/hooks/optimizer.ts
@@ -104,7 +104,7 @@ export function diagnose(state: State, nowMs: number, loadedAtMs: number): Findi
}
// ---- performance
- out.push({ id: 'performance-unprofiled', area: 'performance', level: 'info', title: 'where the time goes has not been measured', why: 'find the bottleneck before optimising: a local measurement shows it, and optimise applies ruflo’s own suggestions.', metric: 'bottlenecks n/a', fixes: [fix('perf-bottleneck', 'find bottlenecks', 'safe', 'local measurement; writes a temporary probe file, so Claude needs write control'), fix('perf-optimize', 'optimise', 'balanced', 'local; applies ruflo’s suggested settings')] })
+ out.push({ id: 'performance-unprofiled', area: 'performance', level: 'info', title: 'where the time goes has not been measured', why: 'find the bottleneck before optimising: a local measurement shows it, and optimise applies ruflo’s own suggestions.', metric: 'bottlenecks n/a', fixes: [fix('perf-bottleneck', 'find bottlenecks', 'safe', 'local measurement; writes and removes a temporary probe file, so Claude needs full control'), fix('perf-optimize', 'optimise', 'balanced', 'local; applies ruflo’s suggested settings')] })
// ---- health and the install (what the console already raises as alerts)
for (const alert of alertsOf(state, nowMs, loadedAtMs)) {
diff --git a/plugins/ruflo-console/hooks/perf.ts b/plugins/ruflo-console/hooks/perf.ts
index c9d60a4f99..ab4dc54914 100644
--- a/plugins/ruflo-console/hooks/perf.ts
+++ b/plugins/ruflo-console/hooks/perf.ts
@@ -127,9 +127,9 @@ export const reportReader: Reader = (stdout, stderr, state) => {
}
const LOCAL = '$0, local: measures in-process and writes nothing'
-// The note is read by Claude's gate (model-tools.ts classOf): it must name what the entry does in words that do not read as a delete. The probe
-// file is the tool's own scratch, gone when it returns; "removes" here made the gate call these delete actions needing 'full' (they write locally).
-const PROBE = '$0, local: writes a temporary 4 KB probe file in .claude-flow/performance/ (it does not stay)'
+// The note is read by Claude's gate (model-tools.ts classOf). "removes" is deliberate: these entries delete the probe file they write, and the
+// gate classes them 'delete' (full control). A reword that drops the word would lower the gate, so it stays and a spec pins the class.
+const PROBE = '$0, local: writes and removes a 4 KB probe file in .claude-flow/performance/'
export const PERF: readonly PerfEntry[] = [
{ id: 'perf-metrics', name: 'METRICS', about: 'heap, rss, load and event-loop latency, now', label: 'performance metrics: memory, load and latency now', cost: 'read', args: ['performance', 'metrics', '--format', 'json'], read: metricsReader, note: LOCAL },
diff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.ts
index dcdefe0f3e..220f227e08 100644
--- a/plugins/ruflo-console/hooks/version.ts
+++ b/plugins/ruflo-console/hooks/version.ts
@@ -2,4 +2,4 @@
* The console's version, shown on the header so a person can tell which build is running. Kept equal to the plugin's manifest
* (`.claude-plugin/plugin.json`); tests/version.spec.ts fails if the two drift.
*/
-export const CONSOLE_VERSION = '0.40.5'
+export const CONSOLE_VERSION = '0.40.6'
diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.sh
index 881fac885e..5f5c8681cb 100755
--- a/plugins/ruflo-console/scripts/smoke.sh
+++ b/plugins/ruflo-console/scripts/smoke.sh
@@ -11,9 +11,9 @@ step() { printf "→ %s ... " "$1"; }
ok() { printf "PASS\n"; PASS=$((PASS+1)); }
bad() { printf "FAIL: %s\n" "$1"; FAIL=$((FAIL+1)); }
-step "1. plugin.json declares ruflo-console 0.40.5"
+step "1. plugin.json declares ruflo-console 0.40.6"
grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \
- && grep -q '"version": "0.40.5"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
+ && grep -q '"version": "0.40.6"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
step "2. hooks.json names exactly one module and no classic hook commands"
grep -q '"modules": \["./register.ts"\]' "$HOOKS/hooks.json" && ! grep -q '"command"' "$HOOKS/hooks.json" \
diff --git a/plugins/ruflo-console/tests/display-truth.spec.ts b/plugins/ruflo-console/tests/display-truth.spec.ts
index 1ac5684bf7..7ccf615598 100644
--- a/plugins/ruflo-console/tests/display-truth.spec.ts
+++ b/plugins/ruflo-console/tests/display-truth.spec.ts
@@ -145,24 +145,26 @@ describe('swarm: its own agent count and age, never the agent store', () => {
})
describe('labels agree with the gate', () => {
- it('every security and performance entry is gated as the cost tier it shows (writes → write, network → network)', () => {
+ it('every security and performance entry is gated as the cost tier it shows (writes → write, network → network); an entry that removes its probe file stays a delete', () => {
for (const entry of [...SECURE, ...PERF]) {
if (entry.cost === 'read') continue
- expect(classOf({ label: entry.label, args: entry.args, expect: '', ...(entry.note !== undefined && { note: entry.note }) }), entry.id).toBe(entry.cost === 'writes' ? 'write' : 'network')
+ expect(classOf({ label: entry.label, args: entry.args, expect: '', ...(entry.note !== undefined && { note: entry.note }) }), entry.id).toBe(entry.note?.includes('removes') === true ? 'delete' : entry.cost === 'writes' ? 'write' : 'network')
}
})
- it('perf-bottleneck at read is refused as a write (it was a delete needing full), and runs at write', async () => {
- const read = rig()
+ it('perf-bottleneck and perf-optimize stay a delete: refused at write, run at full (the gate is not lowered)', async () => {
+ for (const id of ['perf-bottleneck', 'perf-optimize']) {
+ const write = rig()
- Object.assign(settingsOf(read.state).ai, { modelControl: 'read', modelConfirm: 'auto' })
- expect(await callTool('console_run', { id: 'perf-bottleneck' }, read.deps)).toMatch(/is a write action/)
+ Object.assign(settingsOf(write.state).ai, { modelControl: 'write', modelConfirm: 'auto' })
+ expect(await callTool('console_run', { id }, write.deps), id).toMatch(/is a delete action/)
- const write = rig()
+ const full = rig()
- Object.assign(settingsOf(write.state).ai, { modelControl: 'write', modelConfirm: 'auto' })
- expect(await callTool('console_run', { id: 'perf-bottleneck' }, write.deps)).not.toMatch(/^Refused/)
+ Object.assign(settingsOf(full.state).ai, { modelControl: 'full', modelConfirm: 'auto' })
+ expect(await callTool('console_run', { id }, full.deps), id).not.toMatch(/^Refused/)
+ }
})
it('mission-goal does not claim "nothing is written": it is gated as a write, like console_set goal, and it replaces the goal', async () => {