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

Merge remote-tracking branch 'origin/feat/mission-claude' into local/integration

ruva90dbe1abb76
diff --cc plugins/ruflo-console/.claude-plugin/plugin.json
index bd3014946c,eff5be1bc7..234b0f1c41
--- a/plugins/ruflo-console/.claude-plugin/plugin.json
+++ b/plugins/ruflo-console/.claude-plugin/plugin.json
@@@ -1,7 -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.30.0",
- "version": "0.29.0",
++ "version": "0.31.0",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --cc plugins/ruflo-console/hooks/register.ts
index 3edb669975,b8caedfc9c..1249fac0f3
--- a/plugins/ruflo-console/hooks/register.ts
+++ b/plugins/ruflo-console/hooks/register.ts
@@@ -13,8 -13,7 +13,9 @@@ import { BAR_KEY, barView } from './vie
import { setBootChecks } from './boot-checks'
import { buildOf, isOurCheckout, setBuild } from './build'
import { runUpdateCheck } from './update-flow'
+import { announceModelTools, parseControlEnv, serveModelTools } from './model-tools'
+import { loadAiPrefs, settingsOf } from './settings'
+ import { contextSection, onPromptSubmit, onTurnComplete } from './mission-claude'
import { parseMode, RECHECK_EVERY_MS, UPDATES_KEY } from './updates'
import { selfCheckResults } from './self-check'
import type { Kit } from './views/common'
diff --cc plugins/ruflo-console/hooks/settings.ts
index 8897a97d36,54eec9589a..5006d8ad9b
--- a/plugins/ruflo-console/hooks/settings.ts
+++ b/plugins/ruflo-console/hooks/settings.ts
@@@ -45,8 -45,8 +45,8 @@@ export const CORE: readonly CoreKey[]
export const CLAUDE_MODELS = ['default', 'haiku', 'sonnet', 'opus'] as const
export const AI_BUDGETS = [0.25, 0.5, 1, 2] as const
/** `autoAccept`: claude, codex and swarm turns go straight out with no confirm (they stay read-only, in plan mode, under the budget); ruflo commands still ask. */
- export type AiPrefs = { claudeModel: (typeof CLAUDE_MODELS)[number]; budgetUsd: (typeof AI_BUDGETS)[number]; autoAccept: boolean; /** Claude writes guidance after a mission goal is entered. */ guidance: boolean; /** ADR-444: how far Claude may drive the console with its console_* tools (they exist only when not off). */ modelControl: 'off' | 'read' | 'write' | 'manage' | 'full'; /** ADR-444: a non-read action waits for the person's Yes (ask) or confirms itself (auto). */ modelConfirm: 'ask' | 'auto' } & LoopPrefs
- export const DEFAULT_AI: AiPrefs = { claudeModel: 'default', budgetUsd: 1, autoAccept: false, guidance: true, modelControl: 'off', modelConfirm: 'ask', ...DEFAULT_LOOP }
-export type AiPrefs = { claudeModel: (typeof CLAUDE_MODELS)[number]; budgetUsd: (typeof AI_BUDGETS)[number]; autoAccept: boolean; /** Claude writes guidance after a mission goal is entered. */ guidance: boolean; /** ADR-443: the active mission and task ride in Claude's prompt (changes only when the task changes). */ missionContext: boolean; /** ADR-443: the person's own gate commands, one per line or `\n`-separated (parseGates validates). */ loopGates: string; /** ADR-443: a USD cap for one mission's spend ('' none). */ missionCapUsd: string } & LoopPrefs
-export const DEFAULT_AI: AiPrefs = { claudeModel: 'default', budgetUsd: 1, autoAccept: false, guidance: true, missionContext: true, loopGates: '', missionCapUsd: '', ...DEFAULT_LOOP }
++export type AiPrefs = { claudeModel: (typeof CLAUDE_MODELS)[number]; budgetUsd: (typeof AI_BUDGETS)[number]; autoAccept: boolean; /** Claude writes guidance after a mission goal is entered. */ guidance: boolean; /** ADR-443: the active mission and task ride in Claude's prompt (changes only when the task changes). */ missionContext: boolean; /** ADR-443: the person's own gate commands, one per line or `\n`-separated (parseGates validates). */ loopGates: string; /** ADR-443: a USD cap for one mission's spend ('' none). */ missionCapUsd: string; /** ADR-444: how far Claude may drive the console with its console_* tools (they exist only when not off). */ modelControl: 'off' | 'read' | 'write' | 'manage' | 'full'; /** ADR-444: a non-read action waits for the person's Yes (ask) or confirms itself (auto). */ modelConfirm: 'ask' | 'auto' } & LoopPrefs
++export const DEFAULT_AI: AiPrefs = { claudeModel: 'default', budgetUsd: 1, autoAccept: false, guidance: true, missionContext: true, loopGates: '', missionCapUsd: '', modelControl: 'off', modelConfirm: 'ask', ...DEFAULT_LOOP }
const ON_OFF = ['on', 'off'] as const
const onOff = (value: boolean) => (value ? 'on' : 'off')
@@@ -282,8 -282,9 +282,11 @@@ export async function loadAiPrefs(state
budgetUsd: budget ?? DEFAULT_AI.budgetUsd,
autoAccept: stored?.autoAccept === true,
guidance: stored?.guidance !== false,
+ modelControl: (['read', 'write', 'manage', 'full'] as const).find(item => item === stored?.modelControl) ?? 'off',
+ modelConfirm: stored?.modelConfirm === 'auto' ? 'auto' : 'ask',
+ missionContext: stored?.missionContext !== false,
+ loopGates: typeof stored?.loopGates === 'string' ? stored.loopGates.slice(0, 800) : '',
+ missionCapUsd: typeof stored?.missionCapUsd === 'string' && /^\d{1,5}(\.\d{1,2})?$/.test(stored.missionCapUsd) ? stored.missionCapUsd : '',
loopInterval: LOOP_INTERVALS.find(item => item === stored?.loopInterval) ?? DEFAULT_LOOP.loopInterval,
loopWorktrees: flag('loopWorktrees', DEFAULT_LOOP.loopWorktrees),
loopCommit: flag('loopCommit', DEFAULT_LOOP.loopCommit),
diff --cc plugins/ruflo-console/hooks/version.ts
index 020be6eb87,adff5d234f..4a4f7a8414
--- a/plugins/ruflo-console/hooks/version.ts
+++ b/plugins/ruflo-console/hooks/version.ts
@@@ -2,4 -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.30.0'
-export const CONSOLE_VERSION = '0.29.0'
++export const CONSOLE_VERSION = '0.31.0'
diff --cc plugins/ruflo-console/hooks/views/settings.ts
index b156725340,f5ef14f65f..ee771cff19
--- a/plugins/ruflo-console/hooks/views/settings.ts
+++ b/plugins/ruflo-console/hooks/views/settings.ts
@@@ -160,8 -160,9 +160,11 @@@ function aiItems(ctx: Ctx): Item[]
one('budget', 'Turn budget (USD)', 'claude -p --max-budget-usd: the most one turn may spend; the sandbox stays read-only', String(ai.budgetUsd), AI_BUDGETS.map(String), ai.budgetUsd !== DEFAULT_AI.budgetUsd, value => ctx.act.settings.ai({ budgetUsd: Number(value) as (typeof AI_BUDGETS)[number] }), 'cost spend cap'),
one('guidance', 'Mission guidance', 'after a mission goal is entered, claude -p writes detailed guidance by lifecycle stage and suggests ruflo capabilities to bring in (it asks first unless always accept)', ai.guidance ? 'on' : 'off', ['on', 'off'], !ai.guidance, value => ctx.act.settings.ai({ guidance: value === 'on' }), 'mission goal guidance advice suggestions'),
...LOOP_ROWS.map(row => one(row.id, row.title, row.description, row.current(ai), row.options, row.isChanged(ai), value => ctx.act.settings.ai(row.patch(value)), row.extra)),
+ one('model-control', 'Claude control', 'how far Claude may drive this console with its console_* tools: off, read (look and open pages), write (also fill fields and run local actions), manage (also network), full (also spend, deploy, delete); takes effect in a new session or /reload-plugins', ai.modelControl, ['off', 'read', 'write', 'manage', 'full'], ai.modelControl !== 'off', value => ctx.act.settings.ai({ modelControl: value as typeof ai.modelControl }), 'claude control drive computer use tools autonomy model'),
+ one('model-confirm', 'Claude control: confirm', 'ask leaves each action Claude requests waiting for your Yes in the console; auto lets Claude’s call confirm itself, within the level above (every call is logged on Overview)', ai.modelConfirm, ['ask', 'auto'], ai.modelConfirm !== 'ask', value => ctx.act.settings.ai({ modelConfirm: value === 'auto' ? 'auto' : 'ask' }), 'claude control confirm auto ask approve'),
+ one('ctx-mission', 'Mission context in Claude’s prompt', 'the active mission and task ride in Claude’s system prompt, and change only when the task does (a changed prompt makes Claude re-read the chat)', ai.missionContext ? 'on' : 'off', ['on', 'off'], !ai.missionContext, value => ctx.act.settings.ai({ missionContext: value === 'on' }), 'mission context prompt cache claude'),
+ one('loop-gates', 'Mission gates', 'your own commands a mission may run to verify a task, one per line; each asks first and shows its exact argv; no shell characters', ai.loopGates, [], ai.loopGates !== '', value => ctx.act.settings.ai({ loopGates: value.slice(0, 800) }), 'gates verify tests smoke evidence'),
+ one('mission-cap', 'Mission spend cap (USD)', 'auto-run pauses when one mission’s spend reaches this (list-price estimate; empty means no cap)', ai.missionCapUsd, [], ai.missionCapUsd !== '', value => ctx.act.settings.ai({ missionCapUsd: /^\d{1,5}(\.\d{1,2})?$/.test(value.trim()) ? value.trim() : '' }), 'mission cap budget spend cost'),
one('accept', 'Ask before each AI turn', 'always accept sends claude, codex and swarm turns straight out (read-only, plan mode, under the budget); ruflo commands still ask', ai.autoAccept ? 'always accept' : 'ask each time', ['ask each time', 'always accept'], ai.autoAccept, value => ctx.act.settings.ai({ autoAccept: value === 'always accept' }), 'confirm accept approve'),
]
}
diff --cc plugins/ruflo-console/scripts/smoke.sh
index c6c7c45fb1,413e7c11ef..e9fd291612
--- a/plugins/ruflo-console/scripts/smoke.sh
+++ b/plugins/ruflo-console/scripts/smoke.sh
@@@ -11,9 -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.30.0"
-step "1. plugin.json declares ruflo-console 0.29.0"
++step "1. plugin.json declares ruflo-console 0.31.0"
grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \
- && grep -q '"version": "0.30.0"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
- && grep -q '"version": "0.29.0"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
++ && grep -q '"version": "0.31.0"' "$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" \