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

fix(ruflo-swarm): honour panel: off for the explicit pane subcommand (0.3.2)

ruv1d516d5ca02b
diff --git a/plugins/ruflo-swarm/.claude-plugin/plugin.json b/plugins/ruflo-swarm/.claude-plugin/plugin.json
index 2db4fbcd73..51e3d99aca 100644
--- a/plugins/ruflo-swarm/.claude-plugin/plugin.json
+++ b/plugins/ruflo-swarm/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "ruflo-swarm",
"description": "Agent teams, swarm coordination, Monitor streams, and worktree isolation — wraps 4 swarm_* + 8 agent_* MCP tools (12 total) plus 6 topologies (hierarchical / mesh / hierarchical-mesh / ring / star / adaptive). With Claude Code function hooks on (early access), a live swarm pane: agent tiles lit by reads and writes, topology, task and claims board, cost, router pick and hive-mind votes, with buttons that act through the ruflo CLI",
- "version": "0.3.1",
+ "version": "0.3.2",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-swarm/README.md b/plugins/ruflo-swarm/README.md
index 709ab2ae1e..5c356650b2 100644
--- a/plugins/ruflo-swarm/README.md
+++ b/plugins/ruflo-swarm/README.md
@@ -91,7 +91,7 @@ commands, skills and agents above behave as they always have.
`/ruflo-swarm-pane`, `/ruflo-swarm-status`, `/ruflo-swarm-topology`, `/ruflo-swarm-claims` and
`/ruflo-swarm-consensus` stay registered as aliases (ADR-406: no command is removed or renamed). `/ruflo-swarm:watch` also opens the pane.
- **Options** (`/config`): `panel` (command, the default since ruflo-console's cockpit is the pane that opens by
- itself | auto | off), `cli` (`npx-offline`, the default, never touches the
+ itself | auto | off: `/ruflo swarm pane` refuses and `/ruflo-swarm:watch` does not open it), `cli` (`npx-offline`, the default, never touches the
network), `routeThreshold`, `injectSpawnContext` (off by default: appends a one-line swarm note to spawned subagents'
prompts) and `audit` (off by default: event names, tool names and agent ids into ruflo memory, never content).
- The mod does not register `prompt.submit` or `tool.check` hooks, and its `tool.call` hook only observes.
diff --git a/plugins/ruflo-swarm/hooks/register.ts b/plugins/ruflo-swarm/hooks/register.ts
index e9444bdff0..aec87ef774 100644
--- a/plugins/ruflo-swarm/hooks/register.ts
+++ b/plugins/ruflo-swarm/hooks/register.ts
@@ -322,6 +322,10 @@ export function register(on: On, raw: PluginOptions) {
return { text: 'Swarm pane hidden' }
}
+ if (state.options.panel === 'off') {
+ return { text: 'The swarm pane is off (panel option); set panel to command or auto in /config to open it' }
+ }
+
const opened = await openPane()
return { text: opened.isPlaced ? 'Swarm pane shown' : `The swarm pane could not be shown: ${opened.reason}` }
diff --git a/plugins/ruflo-swarm/scripts/smoke.sh b/plugins/ruflo-swarm/scripts/smoke.sh
index 83b2f00104..47af65c05e 100755
--- a/plugins/ruflo-swarm/scripts/smoke.sh
+++ b/plugins/ruflo-swarm/scripts/smoke.sh
@@ -7,9 +7,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 0.3.1 with new keywords"
+step "1. plugin.json declares 0.3.2 with new keywords"
v=$(grep -E '"version"' "$ROOT/.claude-plugin/plugin.json" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)
-if [[ "$v" != "0.3.1" ]]; then bad "expected 0.3.1, got '$v'"; else
+if [[ "$v" != "0.3.2" ]]; then bad "expected 0.3.1, got '$v'"; else
miss=""
for k in mcp topologies worktree-isolation monitor-stream; do
grep -q "\"$k\"" "$ROOT/.claude-plugin/plugin.json" || miss="$miss $k"
diff --git a/plugins/ruflo-swarm/tests/register.test.ts b/plugins/ruflo-swarm/tests/register.test.ts
index f075af22c9..97f8152373 100644
--- a/plugins/ruflo-swarm/tests/register.test.ts
+++ b/plugins/ruflo-swarm/tests/register.test.ts
@@ -43,6 +43,19 @@ describe('register', () => {
expect(world.opened).toEqual([])
})
+ test('with panel off the explicit pane subcommand refuses and opens nothing; close still works', { options: { panel: 'off' } }, async ($, on) => {
+ const world = worldOf(on, RUFLO_RUN)
+
+ mock.clock(on)
+ await $.session.start(SESSION)
+
+ const refused = await $.command.run(command('ruflo-swarm-pane'))
+
+ expect(refused.text).toContain('swarm pane is off')
+ expect(world.opened).toEqual([])
+ expect((await $.command.run({ ...command('ruflo-swarm-pane'), args: 'close' })).text).toBe('Swarm pane hidden')
+ })
+
test('/ruflo swarm <sub> answers as the kept alias names do; other /ruflo words pass on', async ($, on) => {
worldOf(on, RUFLO_RUN)
mock.clock(on)