mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
Merge pull request #3744 from ruvnet/loop/swarm-panel
fix(ruflo-swarm): the pane subcommand honours panel: off (0.3.2)
This commit is contained in:
5 files changed
+21
-4
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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}` }
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user