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): list the ruflo-mods tool hints, agent trim and delivery screen switches in Settings (0.33.11)

ruv79cdf571ad4e
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.json
index 77431bb3bd..5d564ff101 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.33.10",
+ "version": "0.33.11",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-console/hooks/help-topics-more.ts b/plugins/ruflo-console/hooks/help-topics-more.ts
index c1d49e1961..d3b14ca76f 100644
--- a/plugins/ruflo-console/hooks/help-topics-more.ts
+++ b/plugins/ruflo-console/hooks/help-topics-more.ts
@@ -211,6 +211,7 @@ export const MORE_TOPICS: readonly HelpTopic[] = [
{ text: 'fps sets how fast things move: 0 turns motion off, 12 is the most.' },
{ text: 'panel decides whether the cockpit opens by itself: auto, only on /ruflo, or never.' },
{ text: 'More options (how often the disk is re-read, the band above the prompt) are listed under the plugin’s options.' },
+ { text: 'Pick ruflo-mods to see its switches: budget, hard stop, tool hints, hiding unused agent types (agentTrim) and screening peer deliveries (deliveryScreen). The last three are off by default, and each change asks for your Yes.' },
],
tips: ['On a slow connection or a small window, set look to plain and fps to 0.'],
related: ['updates', 'cost'],
diff --git a/plugins/ruflo-console/hooks/settings.ts b/plugins/ruflo-console/hooks/settings.ts
index 5fe75a591e..57b38efc99 100644
--- a/plugins/ruflo-console/hooks/settings.ts
+++ b/plugins/ruflo-console/hooks/settings.ts
@@ -24,7 +24,22 @@ export type PluginConfig = { pluginId: string; name: string; schema: Record<stri
/** Which options a first-time person sees. Anything not listed is advanced; a plugin not listed shows its first four. */
export const SIMPLE: Record<string, readonly string[]> = {
'ruflo-console': ['look', 'boot', 'panel', 'fps'],
- 'ruflo-mods': ['costBudgetUsd', 'costHardStop', 'statusLine'],
+ 'ruflo-mods': ['costBudgetUsd', 'costHardStop', 'statusLine', 'toolHints', 'agentTrim', 'agentTrimKeep', 'deliveryScreen'],
+}
+
+/**
+ * One honest line per ruflo-mods option the plugin's own long description is too wide for. It replaces the description on screen only: the
+ * value, its choices and how it is changed all still come from the plugin's schema, and a change is the same confirm-gated
+ * `claude plugin configure` as any other option (so it is the same safety class: it waits for the person's Yes, and Claude's console tools
+ * cannot change it below their install level).
+ */
+export const OPTION_NOTES: Record<string, Record<string, string>> = {
+ 'ruflo-mods': {
+ toolHints: 'one short static usage hint on a few ruflo tools, from your CLAUDE.md; default off',
+ agentTrim: 'about 4,000 fewer prompt tokens measured; a hidden type the prompt does not name is refused when spawned',
+ agentTrimKeep: 'comma-separated agent types agentTrim must never hide',
+ deliveryScreen: 'default off; screening tuned on a small test set, real-world rate unknown',
+ },
}
/** ruflo's own configuration: key, how it is edited, and who sees it. */
diff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.ts
index 0c8c0d39ef..a003af81d3 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.33.10'
+export const CONSOLE_VERSION = '0.33.11'
diff --git a/plugins/ruflo-console/hooks/views/settings.ts b/plugins/ruflo-console/hooks/views/settings.ts
index 03cbfd8eb7..2e5e2f8fdd 100644
--- a/plugins/ruflo-console/hooks/views/settings.ts
+++ b/plugins/ruflo-console/hooks/views/settings.ts
@@ -1,7 +1,7 @@
import type { RenderElement } from 'claude-code'
import { catalogOf } from '../plugin-catalog'
-import { AI_BUDGETS, CLAUDE_MODELS, CORE, DEFAULT_AI, LOOP_ROWS, pluginNames, SIMPLE, settingsOf, type CoreKey, type Level, type PluginConfig } from '../settings'
+import { AI_BUDGETS, CLAUDE_MODELS, CORE, DEFAULT_AI, LOOP_ROWS, pluginNames, OPTION_NOTES, SIMPLE, settingsOf, type CoreKey, type Level, type PluginConfig } from '../settings'
import { NAV_STYLES } from '../state'
import { UPDATES_MODES, type UpdatesMode } from '../updates'
import { button, clip, col, row, rule, section, text, THEME, type Ctx } from './common'
@@ -94,7 +94,7 @@ function pluginItems(ctx: Ctx, config: PluginConfig): Item[] {
settingRows(ctx, {
key: id,
title: entry.title,
- description: entry.description,
+ description: OPTION_NOTES[config.name]?.[key] ?? entry.description,
current,
isChanged,
isSecret: entry.isSecret,
diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.sh
index 2592c10ea3..27dda9a585 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.33.10"
+step "1. plugin.json declares ruflo-console 0.33.11"
grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \
- && grep -q '"version": "0.33.10"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
+ && grep -q '"version": "0.33.11"' "$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/fixtures/settings.ts b/plugins/ruflo-console/tests/fixtures/settings.ts
index c4995ed7c7..95030c3a56 100644
--- a/plugins/ruflo-console/tests/fixtures/settings.ts
+++ b/plugins/ruflo-console/tests/fixtures/settings.ts
@@ -22,11 +22,15 @@ export const MODS_CONFIG = JSON.stringify({
pluginId: 'ruflo-mods@ruflo',
schema: {
costBudgetUsd: { type: 'number', title: 'Session budget (USD)', description: 'Apply the budget ladder. 0 turns it off.', default: 0 },
+ toolHints: { type: 'boolean', title: 'Usage hints on ruflo tools', description: 'schema text that is replaced on screen', default: false },
+ agentTrim: { type: 'boolean', title: 'Hide unused agent types', description: 'schema text that is replaced on screen', default: false },
+ agentTrimKeep: { type: 'string', title: 'Agent types to never hide', description: 'Comma-separated names.', default: '' },
+ deliveryScreen: { type: 'boolean', title: 'Screen peer deliveries and outgoing messages', description: 'schema text that is replaced on screen', default: false },
modTrustAllow: { type: 'string', title: 'Trusted mods', description: 'Plugin ids to trust.', default: '' },
relayApiToken: { type: 'string', title: 'Relay token', description: 'A bearer token.', sensitive: true },
},
- inputs: { costBudgetUsd: '', modTrustAllow: '', relayApiToken: 'sk-must-never-show' },
- choices: {},
+ inputs: { costBudgetUsd: '', toolHints: 'false', agentTrim: 'false', agentTrimKeep: '', deliveryScreen: 'false', modTrustAllow: '', relayApiToken: 'sk-must-never-show' },
+ choices: { toolHints: ['true', 'false'], agentTrim: ['true', 'false'], deliveryScreen: ['true', 'false'] },
configured: ['relayApiToken'],
unconfigured: ['costBudgetUsd', 'modTrustAllow'],
})
diff --git a/plugins/ruflo-console/tests/settings-mod-options.spec.ts b/plugins/ruflo-console/tests/settings-mod-options.spec.ts
new file mode 100644
index 0000000000..39aedeee94
--- /dev/null
+++ b/plugins/ruflo-console/tests/settings-mod-options.spec.ts
@@ -0,0 +1,70 @@
+/**
+ * The ruflo-mods switches (toolHints, agentTrim, agentTrimKeep, deliveryScreen) in Settings: shown at the simple level with an honest one-line
+ * note, changed only through the same confirm-gated option write as every other plugin option, and in the install class for Claude's console tools.
+ */
+import { describe, expect, it } from 'vitest'
+
+import { allows, ALWAYS_ASK, classOf } from '../hooks/model-tools'
+import { OPTION_NOTES, parseConfig, setOption, settingsOf, shownKeys } from '../hooks/settings'
+import { newState } from '../hooks/state'
+import { MODS_CONFIG } from './fixtures/settings'
+
+const KEYS = ['toolHints', 'agentTrim', 'agentTrimKeep', 'deliveryScreen']
+
+function loaded() {
+ const state = newState({})
+ const config = parseConfig('ruflo-mods', MODS_CONFIG)
+
+ if (config === null) throw new Error('fixture does not parse')
+ settingsOf(state).configs.set('ruflo-mods', config)
+
+ return { state, config }
+}
+
+describe('ruflo-mods switches in Settings', () => {
+ it('lists all four at the simple level and keeps the secret hidden', () => {
+ const { config } = loaded()
+
+ expect(shownKeys(config, 'simple')).toEqual(expect.arrayContaining(KEYS))
+ expect(shownKeys(config, 'advanced')).toEqual(expect.arrayContaining(KEYS))
+ expect(config.schema.relayApiToken?.isSecret).toBe(true)
+ expect(shownKeys(config, 'simple')).not.toContain('relayApiToken')
+ })
+
+ it('has an honest note for each, with the measured and unmeasured claims stated', () => {
+ const notes = OPTION_NOTES['ruflo-mods'] ?? {}
+
+ expect(Object.keys(notes).sort()).toEqual([...KEYS].sort())
+ expect(notes.agentTrim).toContain('about 4,000 fewer prompt tokens measured')
+ expect(notes.agentTrim).toContain('refused when spawned')
+ expect(notes.deliveryScreen).toContain('default off')
+ expect(notes.deliveryScreen).toContain('small test set, real-world rate unknown')
+ for (const note of Object.values(notes)) expect(note.length).toBeLessThan(110)
+ })
+
+ it('changes one through the same confirm-gated plugin write as any other option', () => {
+ const { state } = loaded()
+ const spec = setOption(state, 'ruflo-mods', 'agentTrim', 'true', () => undefined)
+
+ expect(spec?.argv).toEqual(['claude', 'plugin', 'configure', 'ruflo-mods@ruflo', '--values-stdin'])
+ expect(spec?.stdin).toBe('{"agentTrim":"true"}')
+ expect(setOption(state, 'ruflo-mods', 'agentTrim', 'maybe', () => undefined)).toBeNull()
+ expect(setOption(state, 'ruflo-mods', 'relayApiToken', 'x', () => undefined)).toBeNull()
+ })
+
+ it('is in the same class as every other option write: install, full level only, and always asks', () => {
+ const { state } = loaded()
+
+ for (const key of ['agentTrim', 'deliveryScreen', 'toolHints']) {
+ const spec = setOption(state, 'ruflo-mods', key, 'true', () => undefined)
+
+ expect(spec, key).not.toBeNull()
+ expect(classOf(spec as NonNullable<typeof spec>), key).toBe('install')
+ }
+
+ expect(allows('manage', 'install')).toBe(false)
+ expect(allows('write', 'install')).toBe(false)
+ expect(allows('full', 'install')).toBe(true)
+ expect(ALWAYS_ASK).toContain('install')
+ })
+})
diff --git a/plugins/ruflo-console/tests/settings.test.ts b/plugins/ruflo-console/tests/settings.test.ts
index 9c866a9d14..51bf16a982 100644
--- a/plugins/ruflo-console/tests/settings.test.ts
+++ b/plugins/ruflo-console/tests/settings.test.ts
@@ -76,6 +76,31 @@ describe('settings', () => {
await pane.unmount()
})
+ test('ruflo-mods lists its tool hints, agent trim and delivery screen at the simple level, each with an honest note, and a toggle asks first', { options: { boot: false } }, async ($, on) => {
+ const { world, pane } = await opened($, on)
+
+ await pane.press({ key: 'st-plugin-ruflo-mods' })
+
+ const tree = await pane.drawn()
+ const text = textOf(tree)
+
+ expect(text).toContain('Hide unused agent types')
+ expect(text).toContain('about 4,000 fewer prompt tokens measured')
+ expect(text).toContain('Screen peer deliveries and outgoing messages')
+ expect(text).toContain('real-world rate unknown')
+ expect(text).toContain('Usage hints on ruflo tools')
+ expect(elementsOf(tree, 'Button').map(keyOf)).toEqual(expect.arrayContaining(['st-ask-claude-ruflo-mods-agentTrim', 'st-ask-codex-ruflo-mods-deliveryScreen', 'st-opt-ruflo-mods-agentTrim-true']))
+ await pane.press({ key: 'st-opt-ruflo-mods-agentTrim-true' })
+
+ const asked = textOf(await pane.drawn())
+
+ expect(asked).toContain('Confirm: set ruflo-mods agentTrim to true')
+ expect(asked).toContain('{"agentTrim":"true"}')
+ expect(claudeRuns(world.runs).filter(argv => argv.includes('--values-stdin'))).toEqual([])
+ await $.command.run(command('no'))
+ await pane.unmount()
+ })
+
test('a number field takes digits only; ruflo config keys outside the list or out of range are refused', { options: { boot: false } }, async ($, on) => {
const { world, pane } = await opened($, on)