mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
fix(ruflo-console): a background guidance offer never displaces an action waiting for a Yes (0.32.1)
Reported by a Claude driving the console in ask mode: the pending mission-create vanished. Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
1 parent
bd3daee854
commit
d47f5e8d9b
5 files changed
+17
-4
No files matched your search
@@ -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.32.0",
|
||||
"version": "0.32.1",
|
||||
"author": {
|
||||
"name": "ruvnet",
|
||||
"url": "https://github.com/ruvnet"
|
||||
|
||||
@@ -247,6 +247,8 @@ export function offerGuidance(state: State, host: Host, runner: Runner, mc: McSt
|
||||
// Claude is the one driving the console (ADR-444): it needs no second `claude -p` turn, billed, to advise it on its own goal.
|
||||
if (state.control.drivingUntilMs > Date.now()) return
|
||||
if (ai.autoAccept) return startGuidance(state, host, mc)
|
||||
// A background offer never displaces an action already waiting for a Yes (the console holds one): it would vanish unanswered.
|
||||
if (state.pending !== null) return
|
||||
|
||||
runner.ask(guidanceSpec(state, host, mc), 'type a goal first')
|
||||
}
|
||||
@@ -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.32.0'
|
||||
export const CONSOLE_VERSION = '0.32.1'
|
||||
@@ -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.32.0"
|
||||
step "1. plugin.json declares ruflo-console 0.32.1"
|
||||
grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \
|
||||
&& grep -q '"version": "0.32.0"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
|
||||
&& grep -q '"version": "0.32.1"' "$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" \
|
||||
|
||||
@@ -110,6 +110,17 @@ describe('mission guidance', () => {
|
||||
expect(calls[0]?.input).toContain('GOAL: add a dark mode toggle to settings')
|
||||
})
|
||||
|
||||
it('never displaces an action that is already waiting for a Yes', () => {
|
||||
const state = ready()
|
||||
const { host } = fakeHost(ANSWER)
|
||||
const asked: unknown[] = []
|
||||
const runner = { ask: (spec: unknown) => void asked.push(spec) } as unknown as Runner
|
||||
|
||||
state.pending = { label: 'create the mission and its tasks', args: [], expect: 'x', askedAtMs: Date.now() }
|
||||
offerGuidance(state, host, runner, mcOf(state))
|
||||
expect(asked).toEqual([])
|
||||
})
|
||||
|
||||
it('always accept runs it at once; turning Mission guidance off in Settings asks and runs nothing', async () => {
|
||||
const state = ready()
|
||||
const { host, calls } = fakeHost(ANSWER)
|
||||
|
||||
Reference in new issue
Block a user