Commit Graph
496 Commits
Author SHA1 Message Date
ruv 0f29acc73d fix(ruflo-console): strip whole ANSI sequences from CLI text (agent logs showed [1m)
plain() removed the ESC byte but left the rest of each colour sequence, so the
drill-down's 'ruflo agent logs' tail read '[1mLogs for agent-…[0m'. Whole
CSI sequences now go first; the hostile-text tests assert the sequence is
gone, and still that no control or bidi character reaches the tree.

Tests: kit 50/50, specs 38/38.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-02 11:49:58 -04:00
ruv 55c2534943 fix(ruflo-console): tab bar fits a narrow dock; the line under it names the view
The dock's width is the engine's to choose (it keeps where the divider was
left), so the current tab spells its name only from 110 columns; below that
it is its key and icon, highlighted, and the line under the bar always leads
with the icon and view name. The swarm table drops the type column when no
agent has a name that differs from its type, and a busy agent's work-in-flight
dot is two dots wide in full amber so it reads at a glance.

Tests: kit 50/50, specs 37/37.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-02 11:42:37 -04:00
ruv dc4ec3f84a feat(ruflo-console): icon tab bar with a line saying what each view is for; clearer swarm and claims; live work-in-flight
Tabs: `1: Ovr◂ 2: Swm 3: Clm …` becomes an icon per view (one terminal cell,
no emoji) with the current tab's key, icon and name in the heading colour —
`1:⌂ 2:⁂ Swarm 3:⚑ 4:⇄ 5:◫ 6:✦ 7:⚙ 8:▤ 9:$ g:◷ q:✓ e:≋ m:⚐` — and one dim
line under the bar says what the current view is for (the drill-down says how
to go back).

Swarm: one label per agent (name, else type, with a short id only where two
read the same: `coder·i1a3`), the type column only when it differs from the
name, `#od014i` instead of the full id, and a one-line legend.

Animation stays data, never decoration (the graph's rule): while ruflo has an
agent busy, a dim amber dot keeps travelling from the leader down its edge and
the node (◉) breathes; idle agents are still. Test: a busy agent moves with no
event and stops when it goes idle; with every agent idle only the leader's
heartbeat moves before an event.

Claims lanes: a card leads with the task's title (from the task store, also
for claimed tasks), then `owner · #shortid`, clipped with an ellipsis; empty
lanes shrink to their title and the room goes to lanes that hold cards.

Tests: kit 50/50, specs 37/37, smoke 14/14, validate --strict clean.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-02 11:34:47 -04:00
ruv e96bf74023 feat(ruflo-console): a band that says what matters, in words
Before: `◆ ruflo · hierarchical 0/0 busy · 7466 patterns · → coder · $1010.66 console`
After:  `◆ ruflo · 2 to approve (q) · ⚠ 1 alert · swarm, no agents · $1,011 this session · routed → coder · +12 learned  open console`

- Leads with what needs a person: approvals waiting and warn/bad alerts,
  in the warning colour. Info alerts (a claim held for days) stay in the pane.
  A stale marketplace clone is one of those alerts, so it is no longer a
  separate word.
- The swarm in words: "3 agents idle", "1/3 agents busy", "swarm, no agents".
  Never "0/0 busy"; the topology name is config and lives in Swarm (2).
- Spend is labelled ("this session"), whole dollars above $100, and hidden
  until it reaches a cent.
- "routed → coder" names the router's last pick.
- Learning shows as growth since the console loaded ("+12 learned"), not a
  running total that never tells you anything new.
- Parts are ordered by importance, so a narrow band drops the least useful.
- The button says "open console" and only shows while the pane is closed.

Tests: band.spec.ts (5), kit behaviour test updated; console kit 50/50,
ruflo-mods and ruflo-swarm 0 fail, smoke 14/14, validate --strict clean.
Seen live in ~/projects/ruflo: `◆ ruflo · 1 agent idle · 26 claims · +1 learned`.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-02 10:54:44 -04:00
ruv 6383a28267 feat(mods): ruflo-console is a required mod plugin; catalog lists /ruflo
#3614 shipped ruflo-console on main, so `ruflo init` and `ruflo mods install`
now install it like ruflo-mods and ruflo-swarm. A marketplace clone without
it is stale (a doctor failure with the exact repair), never "pending".

- MOD_PLUGINS: ruflo-console@ruflo required: true.
- `ruflo mods install` points at /ruflo (and /ruflo mods) instead of /ruflo-mods.
- ADR-406 catalog: the source scan now reads `$.command.registerCommand`, and
  the engine parser splits a `command=a|b` matcher into its names and treats
  `command=?` (a matcher chosen at run time) as naming nothing, deferring to
  the source scan for that plugin. Without this, regenerating after #3614
  either failed schema validation (`ruflo|ruflo-console`, `?`) or dropped the
  five /ruflo-swarm-* commands. Regenerated: 241 -> 243 entries (+/ruflo,
  +/ruflo-console), none removed; the console's catalog copy is synced.
- Tests and the e2e-mods-init script now expect ruflo-console installed.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-02 00:33:07 -04:00
ruv cc56d6470f test(ruflo-console): tool.list fixture uses the ruflo-core plugin MCP prefix (audit-plugin-mcp-prefix)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-02 00:09:03 -04:00
ruv e1723ef825 fix(ruflo-console): focus hint and Esc behaviour say what the engine does; catalog equality spec always runs
- ctrl+x tab focuses the band, not a pane: the footer and help no longer
  suggest it for the pane
- Esc: a pane /ruflo opened (focus, closeOnEscape) closes; one that opened by
  itself under panel=auto only hands the keys back, by design (an unasked dock
  should not vanish on a stray Esc at an empty prompt). Help says so
- main now ships catalog.generated.json, so the parity spec no longer skips

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-02 00:01:08 -04:00
ruv a97c33f5f1 test(ruflo-console): repo e2e stops a ruflo daemon it started (it rewrites the tracked agentdb.rvf.lock)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:59:33 -04:00
ruv 4149a78815 fix(ruflo-console): dump waits at most 8 s for its probes; registration test is exact
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:53:27 -04:00
ruv fcb32c9e5d test(ruflo-console): e2e checks say what they check; repo runs leave ruflo's runtime stores as found
- 100-column inline run: records the rows the layout gave (asked 30, got 16)
  and checks both borders and the controls are on screen, instead of a label
  claiming the whole view fits
- /ruflo commands step: the ADR-406 catalog loads live
- repo mode copies .claude-flow/{agents,tasks,claims,swarm,hive-mind}
  (gitignored) before the run and restores them after, so agents no longer
  pile up across runs

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:51:45 -04:00
ruv 34a630e893 test(ruflo-console): e2e animation check samples up to eight captures (decorations rest part of each cycle)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:38:51 -04:00
ruv be2fc099b9 fix(ruflo-console): the claims view picks the newest open task first
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:36:56 -04:00
ruv 5194355c2a feat(ruflo-console): keep every command (ADR-406), headless views, ADR-406 catalog and missions
- /ruflo-console is registered again and is the same command as /ruflo;
  ruflo-mods and ruflo-swarm answer mods / swarm <sub> on both. /ruflo-mods
  and /ruflo-swarm-* stay registered for good (ADR-406: nothing removed,
  renamed or reassigned); descriptions and READMEs say 'same as', not
  'deprecated'
- without a pane (claude -p), /ruflo <view> answers the view as text; dump
  waits (bounded, 20 s) for the view's CLI probes, joining any already running
- an inline pane given fewer rows than it asked for goes compact: controls
  under the tabs, no title strip, the view scrolls below
- /ruflo commands [word]: browses the ADR-406 command catalog copied into
  catalog/ (parity spec on its digest); built-in mod list as fallback
- Missions view (m): the ADR-406 mission observation, read-only; task status
  shown as recorded, evidence as verified, session-bound said plainly
- ruflo-mods docs: ruflo-console@ruflo in the modTrustAllow example
- e2e: /ruflo-console alias, headless /ruflo <view>, dump waits for probes,
  a 100-column inline run

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:33:06 -04:00
ruv 0150757686 Merge origin/main into feat/ruflo-console-mod
Resolves plugins/ruflo-mods/README.md: main's install and dogfooding docs,
with /ruflo mods as the command and /ruflo-mods as its deprecated alias.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:21:57 -04:00
ruv 88cac6c758 fix(ruflo-console): with ruflo-mods or ruflo-swarm absent, /ruflo mods and /ruflo swarm <sub> show the hint
Found live: Claude Code answers a registered command no hook answered with its
own message, which the dispatcher passed through as if a plugin had answered.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:19:54 -04:00
ruv 736bb7b90a test(ruflo-console): e2e seeds trust for a worktree's main checkout too
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:17:06 -04:00
ruv 0e935d9fc6 test(ruflo-console): end-to-end script against real ruflo state and a real Claude Code
scripts/e2e.sh [--target scratch|repo]: makes real state with this branch's CLI
(swarm, agents, tasks, claims claim/release/handoff, hive proposal, memory,
route, policy status), then with RUFLO_E2E_LIVE=1 drives Claude Code in an
isolated CLAUDE_CONFIG_DIR (login copied 0600, shredded on exit; project and
ancestor .mcp.json servers rejected): /ruflo, /ruflo mods, /ruflo swarm,
/ruflo dump <view> headless; the pane under tmux (hotkeys, palette, a confirm
gated release re-read from disk, animation running and stopping); auto-start
from settings.local.json and a directory marketplace; negative paths. Scratch
run: 66/66 PASS.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 23:13:25 -04:00
ruv 67206969b9 feat(mods): uninstall what ruflo installed, --source local (directory marketplace), exact disclosure
- mods uninstall runs `claude plugin uninstall <id> --scope <scope>` for
  exactly the plugins ruflo installed (absent before, enabled by ruflo;
  recorded as claudeInstalled in install.json), then removes exactly the
  settings keys it added. A plugin installed before is never uninstalled.
- mods install --source local [--marketplace-path <dir>]: declares the
  ruflo marketplace as a directory source (a ruflo checkout), adds it, and
  installs nothing, so the plugins load live from the working tree.
  Verified on 2.1.287 in an isolated config: loads with no install record,
  and an edit shows on the next run. Doctor reports the source type and
  warns when the project's declared source differs from the known one.
- The repair honours the marketplace the settings file declares.
- Init output, README and ADR state exactly what loads: ruflo-swarm's
  commands/skills/agents without function hooks, its host-command mod with
  them; the first trusted start clones github.com/ruvnet/ruflo; headless -p
  on a fresh config loads nothing; refuse-risky + modTrustAllow as opt-in
  hardening (modTrust stays observe). Claude Code's re-serialization of
  settings.json is reported, never fought.
- e2e: live load is `claude -p "/ruflo-mods"` behind RUFLO_E2E_LIVE=1 with
  CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY; no credential file copied,
  nothing printed; adds the --source local and uninstall scenarios.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 22:31:28 -04:00
ruv b84cd3b777 feat(ruflo-console): auto-open only in a ruflo project, remember a person's close, every action argv tested
- autoOpen is gated on a ruflo project; Esc or the pane's mark persists
  isClosedByPerson so a dismissed cockpit stays shut next session
- tests/actions.test.ts: each confirm-gated palette action asks, runs nothing
  until yes, then exactly its fixed argv (13 actions)
- radar axis words, handoff arrows name the target agent, gantt now marker
- READMEs: /ruflo swarm and /ruflo mods, old names deprecated for one release;
  ruflo-swarm panel now defaults to command

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 22:26:03 -04:00
ruv 6fcd9f39d9 feat(ruflo-console): /ruflo dump <view>, and read plugin records from CLAUDE_CONFIG_DIR
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 22:19:08 -04:00
ruv cbbabb8339 feat(ruflo-console): one /ruflo command, auto-start, diagrams, palette and management views
- /ruflo is the single command for every ruflo mod: views, palette, run/yes/no,
  agent drill-down, help; /ruflo mods is answered by ruflo-mods and /ruflo swarm
  <pane|status|topology|claims|consensus> by ruflo-swarm (both hook the same
  command; the old /ruflo-mods and /ruflo-swarm-* stay as deprecated aliases)
- auto-start: panel auto opens the cockpit at session start where it docks,
  never taking the keys; the band says /ruflo to open otherwise. ruflo-swarm's
  own pane now defaults to panel command so two panes do not open
- diagrams (Raster, one pure function per diagram shared by paint and blit):
  topology with event pulses and a leader heartbeat, claims lanes with TTL
  rings and handoff arrows, federation map by trust, plugin health matrix,
  learning curve draw-in and RETRIEVE→JUDGE→DISTILL→CONSOLIDATE pipeline,
  MetaHarness radar and audit trend, cost gauge and burn, agent timeline
- management: command palette (fuzzy, text entries), confirm-gated actions
  through fixed argv, agent drill-down with logs, approvals queue (votes,
  stealable claims, refused mods, policy denies, budget), event stream with
  filter, health alerts with the fix named
- tests: 28 kit tests, 28 vitest specs; 100-agent frame 0.25 ms median

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 22:15:40 -04:00
ruv dcceb32585 feat(mods): default-on in ruflo init, init upgrade --mods, three mod plugins (ADR-404 amendment 1)
- ruflo init enables the mods by default (--no-mods opts out) in the
  committed .claude/settings.json: enabledPlugins for MOD_PLUGINS
  (ruflo-mods, ruflo-swarm, ruflo-console), extraKnownMarketplaces.ruflo and
  CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1, then refreshes the marketplace and
  `claude plugin install`s each plugin at project scope (--no-plugin-install
  skips; skipped under VITEST/CI; manual commands printed on failure).
- ruflo init upgrade --mods applies the same merge + install to an existing
  project; --add-missing and --settings imply it. Never clobbers: only absent
  keys are added (a plugin set to false stays false and is never installed,
  since `claude plugin install` would flip it), each addition is reported.
- MOD_PLUGINS is the one list; `required: false` marks a plugin not yet in
  the marketplace (ruflo-console): reported as pending, never a failure.
- Install record v2 per settings file; v1 (3.50.0) records are read; mods
  uninstall reverses exactly what was added in every file.
- Detection corrected from live evidence: an interactive trusted session
  loads plugins straight from the marketplace clone with no install record,
  so the clone decides. A stale clone (the field report, reproduced live:
  "Unknown command: /ruflo-mods") fails doctor; no clone yet is a warning.
- scripts/e2e-mods-init.sh: built CLI + real claude, isolated HOME and
  CLAUDE_CONFIG_DIR per scenario; E2E_LIVE=1 adds a live tmux session.
- ADR-404 Amendment 1, with where the "safe default" argument stops
  (ruflo-swarm's commands/skills load regardless; modTrust stays observe).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 22:05:16 -04:00
ruv 7dcea3a02e fix(ruflo-console): fixes from the live run
- name the ruflo MCP servers and their tool count (two servers expose the
  same tools, so a bare count overstated it); recount every 30 s, since
  Claude Code connects MCP servers after session start
- back off re-stating a missing file for 10 s (explicit refresh and the
  post-action read skip the backoff), so a closed console stops logging
  ENOENT every 3 s
- tab and footer buttons get a gap; any view switch leaves the help page
- pulses are two dots wide, so one on a vertical edge stands out of it

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 21:45:57 -04:00
ruv 6eb25a823c feat(ruflo-console): tests, smoke, bench, marketplace entry, CI baseline
Kit tests (19) for every view, hotkeys, confirm-gated claims, refusal,
empty project, narrow and desktop fallbacks, the frame loop stopping when
hidden or unfocused, hostile text and the band. Pure vitest specs (18)
for readers, CLI JSON, cell graphics and $.ruflo type parity.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 21:34:10 -04:00
ruv d9bbe88ded feat(ruflo-console): cockpit mod with eight views, band, claims actions (WIP)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 21:25:49 -04:00
ruv 6b8558ad99 fix(mods): install the ruflo-mods plugin, and fail doctor when Claude Code cannot resolve it
`ruflo mods install` only wrote enabledPlugins + extraKnownMarketplaces. With a
local clone of the ruflo marketplace older than ruflo-mods (seen live at
3.38.21), Claude Code skipped the enabled plugin silently and /ruflo-mods was
an unknown command, while `mods status` and `mods doctor` reported all fine.

- Detect (read-only, respects CLAUDE_CONFIG_DIR): two new findings once the
  plugin is enabled. `ruflo marketplace` checks the clone named by
  known_marketplaces.json for plugins/ruflo-mods/.claude-plugin/plugin.json;
  `ruflo-mods installed` checks installed_plugins.json for a user-scope entry
  or a local/project entry for this project whose cache dir exists. Not
  installed = FAIL; a stale clone FAILs only while nothing is installed (a
  cached install still loads). Each failure carries the exact commands.
- Repair on install: when a runnable claude is on PATH, run
  `claude plugin marketplace update ruflo` (or `marketplace add ruvnet/ruflo
  --scope <scope>` when unknown, so user settings are not edited), then
  `claude plugin install ruflo-mods@ruflo --scope <scope>` in the project dir.
  execFile with fixed argv, no shell, no -y, 150s/60s timeouts; re-reads
  Claude Code's records afterwards. --no-plugin-install skips it; --dry-run
  prints the commands; on failure the manual commands are printed and the
  exit is non-zero only with --strict.
- Status: "enabled in settings" is now distinct from installed/resolvable;
  `mods status` exits 0, `mods doctor` and `doctor --component mods` fail.
- README: install steps and the stale-clone failure mode.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 21:13:43 -04:00
ruv d3a3979ae6 Merge origin/main into feat/ruflo-ruos
Resolves .claude-plugin/marketplace.json and scripts/ci-test-baseline.txt
after #3608/#3607 merged: both sides appended entries, so the resolution
keeps both (ruflo-mods + ruflo-ruos marketplace entries; all baseline blocks).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 19:29:44 -04:00
rUv fbaeca0695 Merge pull request #3607 from ruvnet/feat/claude-code-mods-swarm-ui
feat(ruflo-swarm): live swarm pane mod for Claude Code (function hooks)
2026-10-01 19:28:45 -04:00
ruv 969dcb2125 fix(mods): CI — keep metaharness last in doctor help; RUFLO_MODS_OWNS escape hatch; self-contained plugin tsconfigs
- doctor --component help lists 'mods' before 'metaharness': the
  ruflo-metaharness smoke step 17h greps 'metaharness)' (smoke-all,
  smoke-without-metaharness).
- audit-env-var-precedence: RUFLO_MODS_OWNS is the ADR-404 handshake set
  by the running mod, read by hook scripts with no CLI-flag surface
  (Plugin package install-safety job).
- plugins/ruflo-mods and the mod template tsconfigs no longer extend the
  gitignored .claude-plugin/types/tsconfig.json: vite/esbuild loads the
  nearest tsconfig for every transformed module, so in CI (types absent)
  root vitest failed to transform the six mods suites that import plugin
  code (TSCONFIG_ERROR: Tsconfig not found). typeRoots points at the
  generated folder instead; tsc still checks against it where present.

Verified: ruflo-metaharness smoke 125/125; env-var audit clean; root vitest
on the mods suites 99/99 with the generated types moved aside (as in CI);
tsc clean for mod and template; kit 16/16 + 1/1; validate passes.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 19:01:00 -04:00
ruv c150ac7582 fix(ruflo-ruos): jobs API 400 is non-retryable; cancelled (exit 143) is a stop
From the ruOS lane's live e2e of ADR-105 (fleet 64261be):
- 400 (e.g. a Lite machine target) maps to invalid-input, never retried
- DELETE 200 ends the job cancelled with exit 143 and keeps prior output;
  the adapter drains output for up to 15 s after a cancel and reports
  cancelled as stopped, never failed (exec-poll: a runner we killed is
  stopped, not lost)
- ADR-405: ruOS validated the contract live; ruflo's JobsApiTransport is
  contract-tested against it, not called live by ruflo

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:51:53 -04:00
ruv 1dd984d04a fix(ruflo-ruos): align JobsApiTransport with the live ADR-105 jobs API
ruos-desktop #380 (fleet 64261be) is live. Contract deltas applied:
- POST 202 new / 200 idempotent_replay (reuse job_id) / 409 same key with a
  different request = client bug, surfaced, never retried / 429 cap with no
  server queue -> swarm-side backoff; timeout_secs clamped to 21600
- GET with wait_ms=20000 long-poll (adapter skips its own sleep, guarded
  against instant answers); 503 retried 1s/2s/4s; running=true while queued
- exited carries any exit code: only 0 is completed
- tests mock the exact live codes and fields; ADR-405 says JobsApi is
  contract-tested against the live spec but not exercised live (no
  control-scoped token; would need spend approval)

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:39:25 -04:00
ruv 6bd7b2ff70 docs(ruflo-swarm): allow-list note for the ruflo-mods refuse-risky trust gate
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:23:36 -04:00
ruv b1a6f1cb18 docs(plugin-creator): create-mod allow-lists by plugin id, not name
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:23:08 -04:00
ruv a0c4f99c2e fix(mods): trust gate allow-list by provenance, no name-keyed self-exemption; fs.write is risky; strip CSI/OSC from segments
A module's name is its manifest's own word: a Claude-written mod calling
itself 'ruflo-mods' walked past the gate under refuse-risky. The gate now
has no self-exemption (a module only judges those admitted after it) and
modTrustAllow matches the loader-keyed provenance (name@marketplace).
fs.write joins the risky calls (any path: settings/hooks persistence).
Segments lose ANSI CSI/OSC sequences, not just their ESC byte.

Kit 16/16 on 2.1.287 (inline provenance is <name>@claude-plugin-test);
vitest 99/99.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:22:57 -04:00
ruv f0a5d66c56 docs(adr): ADR-404 — 2.1.287 facts, $.ruflo contract, trust gate, live evidence, scaffold
Correction: 2.1.282 needs CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 (live: 'not
turned on' without it); the earlier 'loads unset' observation was on the
already-upgraded 2.1.287 binary. 2.1.287 loads by default; on both the
server-side rollout switch can hold mods off.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:19:29 -04:00
ruv c957086f3b feat(ruflo-ruos): mod part — ruos status segment via $.ruflo.segment
ruflo-mods landed the flat segment API (#3608, ADR-404). The ruflo-ruos mod
reads only .claude-flow/ruos/hosts.json and sets $.ruflo.segment({id:'ruos',
text}) on session start, each prompt and every 15 s; try/catch, no feature
detection, no network, no $.ruos dependency. Vendored $.ruflo type with a
parity test; claude plugin validate + 3 claude plugin tests pass; smoke runs
them when the claude CLI is present. CI baseline lists the two new test files.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:13:29 -04:00
ruv 707977d2bc feat(plugin-creator): scaffold governed Claude Code mods (create-mod + templates/mod, ADR-404)
A working template mod, validated and kit-tested on Claude Code 2.1.287 and
live-loaded with --plugin-dir: hybrid hooks.json (classic UserPromptSubmit
fallback that exits while the module runs, via MY_MOD_ACTIVE), a host
adapter over literal $ calls, refusal-tolerant status drawing, a namespaced
command, userConfig, engine-kit tests and a tsconfig extending the
generated types. create-mod skill carries the rules (tighten-only
tool.check, no process/http from event input, state in $.store/$.state,
namespaced commands) and the validate/test/typecheck loop.

ruflo-plugin-creator 0.2.1 -> 0.3.0 (smoke sentinel + step 11).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:13:02 -04:00
ruv 8a1e11f3bd feat(mods): $.ruflo noun, status segments, mod trust gate, refusal-tolerant $ (ADR-404)
- engine.create adds a flat $.ruflo noun (types/index.d.ts, plugin.json
  "types"): segment({id,text}), lastRoute(), snapshot(). Other mods (ruOS,
  ruflo-ruos) contribute status segments instead of drawing a second bar.
  Segments are untrusted: id token, control/bidi stripped, 48 chars, max 8,
  sorted by id. One drawer for the status line, from the $ beneath.
- plugin.register trust gate: names what a later-registering user-tier mod
  can do (process.run, http.fetch, env.set; tool.check, tool.call, *,
  classic.*, plugin.register, prompt.compose), from the host scan.
  userConfig modTrust: observe (default) | refuse-risky | off, plus
  modTrustAllow. Under refuse-risky a gate failure refuses.
- every ui.status/log/toast call tolerates refusal (admins can withhold $)
- tsconfig extends the types Claude Code >= 2.1.287 writes on load
- kit tests: 15/15 on Claude Code 2.1.287, incl. two tighten-only tool.check
  mods composing, trust refusal at load, budget ladder with options
- vitest: 95/95 (noun/segment and trust suites added)
- CI ratchet baseline: the four engine-kit files (claude-code/testing is not
  resolvable by root vitest), as #3605/#3607 do

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:09:25 -04:00
ruv e1bf696d1a fix(ruflo-ruos): echo-proof nonce markers, CI ratchet entries, ISO heartbeat
- every remote command gets a fresh 64-bit nonce; markers print as
  RUOS<nonce>_NAME via printf 'RUOS%s_NAME' '<nonce>', so the token never
  appears in the command or its desktop_exec echo; parsers accept only
  whole lines with that command's nonce (test replays raw echoes that
  contain every marker name)
- test that poll command + 2 KiB slice fit the ~4 KiB cap, echo counted
- pid file holds digits only; audit hash masks the nonce (stable)
- scripts/ci-test-baseline.txt: the 6 node:test files (run by smoke.sh)
  that root vitest reports as 'No test suite found' (lead-authorized)
- hosts.json heartbeatAt is ISO for the swarm pane (#3607)

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:02:46 -04:00
ruv 8ceed8810b feat(ruflo-swarm): show ruOS-hosted agents and hosts (ruflo-ruos contract); keep pane state per folder
Reads agents[id].config.host (kind ruos), .claude-flow/ruos/hosts.json and the
tail of .claude-flow/ruos/events.jsonl as agreed with the ruflo-ruos lane:
ids checked, names cleaned and bounded, free text (error, lastResult) never
read, an event log past 2 MB not read. The router pick and selection held in
$.store are now keyed by working directory, and the router line says the
pick's age, after a live 2.1.287 run showed a pick from another folder.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:58:23 -04:00
ruv 24c9c4a8d8 fix(mods): handshake in the generated helper; ENOENT-only missing; doctor reports the rollout switch (ADR-404)
- generateHookHandler() carries the same RUFLO_MODS_OWNS handshake, so a
  helper written by the refresh fallback still hands route/post-edit over
- isMissing matches ENOENT only: a misread error must fail the guard
  closed, never read as 'no policy'
- doctor: the server-side rollout switch decides whether the mod loads
  (observed live: loads with the enable variable unset while served on, not
  with it set while served off); the variable is reported, never sufficient
- bin-level tests for init --mods, doctor --component mods, mods status
- ADR: live-run evidence, final counts; README: where options are read

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:58:22 -04:00
ruv 30cd360b6b feat(ruflo-ruos): JobTransport (exec-poll + ruOS jobs API), live-run fixes, ruOS design rules
Live E2E on rUv's Work Desktop (2026-10-01) found that desktop_exec echoes
the command it ran and head-caps stdout at ~4 KiB:
- strip the exec frame and match every marker as a whole line (the echo
  contains the marker names and would always false-match)
- poll slices drop to 2 KiB

Design rules from the ruOS lane:
- JobTransport with ExecPollTransport (now) and JobsApiTransport (ADR-105,
  feature-detected; run id = idempotency key; 404 never retried; capacity
  backoff), adaptive 1s->10s polling, attach to re-read after a restart
- fleet MCP is stateless and the only external transport; SSH :2222 is
  in-tenant only; credentials from env or @cognitum/ruos file, redacted;
  read-only tokens degrade with insufficient-scope
- never issue desktop_delete/secret_delete (runtime guard + static test)
- llm_route_get before launch; per-run audit record; Lite browsers filtered;
  128-bit run ids; 23:00 stopAt recorded in swarm state; deploy read-only
- ADR-405 updated incl. TOFU accepted risk and live evidence

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:58:01 -04:00
ruv 6302b6715e fix(ruflo-swarm): never pass a dash-led task text to the router as an argv value
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:52:51 -04:00
ruv c335261199 feat(helpers): hand route/post-edit to the ruflo mod via RUFLO_MODS_OWNS (ADR-404)
hook-handler.cjs (both copies) returns before any work for route or
post-edit when the ruflo mod, running in the same Claude Code process, has
named them in RUFLO_MODS_OWNS. Guards (pre-bash) and session hooks never
hand over, whatever the variable says. ruflo-core's ruflo-hook.cjs stands
down for post-edit likewise, so an edit is recorded exactly once.

hook-handler.cjs content changed: the helpers manifest must be re-signed at
release (helper-signing.test.ts fails on the hash until then).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:51:02 -04:00
ruv d48897fb34 feat(mods): ruflo-mods plugin — ruflo as a Claude Code mod (ADR-404)
An opt-in hooks module (Claude Code function hooks, early access) with
in-process equivalents of the classic per-event hooks:

- prompt.submit: router.cjs routing + ranked-memory context, text identical
  to hook-handler.cjs route; #3567 no-match semantics
- tool.check: tighten-only (stricter of chain and ruflo), pre-bash list and
  the claude-code.* rules of ruflo policy; fails closed by one step
- tool.call/turn.complete/session.end: edit records in recordEdit's format
- session.measure/agent.spawn: cost-tracker budget ladder (opt-in)
- session.start: ownership handshake (RUFLO_MODS_OWNS), /ruflo-mods

Owns route/post-edit only where the classic hook-handler hands them over.
Kit tests (claude plugin test, 7/7 in the real engine), static security
smoke (9/9), marketplace entry.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:51:02 -04:00
ruv 869101ec1c feat(ruflo-swarm): label teammates by name and unknown loops honestly; document the mod
Live run on 2.1.282 showed a named Agent call runs as an in-process teammate
listed as type 'teammate', and a loop whose tool calls reach the hooks with no
spawn or listing. Name the first, call the second a subagent by id suffix.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:50:42 -04:00
ruv 8ab1703158 fix(ruflo-ruos): merge hosts.json, detect a killed runner, never skip bytes on a truncated poll
- hosts.json is read-merge-write: discovery keeps agent placements and a
  run keeps the other hosts; finished agents are removed
- poll reports runner liveness (kill -0); a dead runner without an exit
  code fails fast instead of waiting out the timeout
- only whole base64 quanta are decoded, so a truncated tool result never
  advances the offset past bytes it did not deliver
- the 23:00 auto-stop window applies to cloud desktops only

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:44:40 -04:00
ruv 56e847b79e feat(ruflo-ruos): README, local overhead benchmark, typecheck in smoke
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:39:26 -04:00
ruv 92ff48b7b5 feat(ruflo-ruos): commands, skill, agent, smoke contract, deploy-info, ADR-405
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:38:09 -04:00
ruv bd228c68ad feat(ruflo-ruos): host adapter, audited command builder, fleet MCP + SSH transports
Optional plugin core for running ruflo swarm agents on the user's own ruOS
desktops (ADR-405). Fleet MCP (tenant-authenticated) and per-tenant SSH :2222
only; the :17870 executor is never contacted. Swarm state flows through
ruflo's existing agent_* and claims_* tools in-process.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:34:38 -04:00