470 Commits
Author SHA1 Message Date
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
ruv 5004131263 test(ruflo-swarm): hostile-text readers, vitest parser spec, render/refresh benchmark at 8/32/100 agents
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:33:08 -04:00
ruv f1d1fffa03 test(ruflo-swarm): controller actions, refusal tolerance, spawn note and audit options
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:31:30 -04:00
ruv 77e5262537 test(ruflo-swarm): engine-kit tests for register and pane over a real ruflo run
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:28:58 -04:00
ruv 5c133697ee feat(ruflo-swarm): swarm mod skeleton: readers, members, pane view, actions, commands
Function-hooks module for the ruflo-swarm plugin: reads ruflo's swarm,
agent, task, claims and hive-mind files via $.fs, merges Claude Code's own
subagents, draws a live Pane, and acts through fixed-argv ruflo CLI calls
with confirm-on-destructive and verify-on-disk.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:26:11 -04:00
ruv 2578961bf3 chore(ai-team): version the #3556 fix as 0.1.6
0.1.5 is already claimed by open PR #3553 and built as the live
edge-next image (ruflo-ai-team:0.1.5-edge-263c2c2).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-09-30 17:56:05 -04:00
ruv 91d2033024 fix(ai-team): explicit CORS allowlist and documented public discovery (#3556)
MCP discovery (initialize, ping, tools/list, prompts/list, resources/list)
stays anonymous on purpose, but every response carried
`access-control-allow-origin: *`. Replace it with an explicit allowlist
(chatgpt.com, chat.openai.com, claude.ai by default; ALLOWED_ORIGINS
replaces it), echo only an allowlisted origin with Vary: Origin, and send
no ACAO header otherwise, including on 401 responses. Server-to-server
calls without an Origin header are unaffected.

Document exactly which methods are public and why in the README, and bump
the service to 0.1.5.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-09-30 17:55:01 -04:00
rUv 1e814f47a6 fix(ai-team): enlarge workspace rail and restore evidence view (#3550) 2026-09-29 12:41:03 -04:00
rUv 45dcdc76a1 feat(ai-team): unify ChatGPT workspace navigation (#3549) 2026-09-29 12:34:09 -04:00
rUv f208bdf633 feat(ai-team): style board as ruOS desktop workspace (#3546) 2026-09-29 12:17:14 -04:00
rUv da315a834c feat(ai-team): add ChatGPT team board and run completion (#3545) 2026-09-29 12:07:33 -04:00
rUv 9016dd6720 fix(ai-team): verify ChatGPT MCP resource audience (#3544)
* fix(ai-team): verify ChatGPT MCP resource audience

* fix(ai-team): keep public MCP discovery available with stale bearer
2026-09-29 11:19:55 -04:00
rUv fce8e6da5a feat(plugin): add multi-tenant RuFlo AI Team service (#3536)
* feat(plugin): add multi-tenant RuFlo AI Team service

* fix(plugin): isolate AI Team validation from root test discovery

* fix(plugin): document deployment option precedence

* fix(plugin): satisfy Claude directory manifest and tool scoping

* fix(plugin): isolate Claude directory review bundle

* fix(plugin): include Claude MCP endpoint declaration

* docs(plugin): complete Claude directory listing links

* docs(plugin): disclose personal data and retention

* feat(plugin): publish complete RuFlo Claude marketplace
2026-09-28 23:32:27 -04:00
rUv 124196478d fix(gateway): make Claude tool descriptions directory compliant (#3535) 2026-09-28 22:18:51 -04:00
rUv 795058ba18 feat(gateway): add Claude directory MCP profile (#3534) 2026-09-28 22:01:24 -04:00
ruv e69bc340cf feat(federation): add guarded public registration and release 3.47.0 2026-09-28 17:16:02 -04:00
rUv 3dce4664dd fix(gateway): align ChatGPT tool annotations with behavior (#3525)
Correct all four MCP hint classifications for the multi-owner federation relay, synchronize submission justifications, and add regression coverage.
2026-09-28 12:17:21 -04:00
ruv 1d79068c56 fix(ci): repair CI regressions surfaced by the integrated community fixes
- plugins/ruflo-adr smoke step 20: #3432 correctly split the memory-db
  cwd into a more precise DB_ROOT (nearest .git/.swarm ancestor of ROOT),
  but the smoke check still only recognized the literal `cwd: ROOT`
  string. Accept `cwd: DB_ROOT` too.
- plugins/ruflo-core smoke step 6: #3428 replaced the old "pinned to
  v3.6" CLI compatibility line with an accurate description of the new
  resolve-installed-before-npx-fallback contract. Updated the smoke
  check to verify that contract's env vars are documented instead of a
  version pin that no longer exists.
- session-tools.ts: CodeQL flagged Math.random()-derived session IDs as
  insecure randomness in a security context, newly reachable through
  #3486's activate path. Switched both session ID generators to
  randomUUID(), matching the convention already used in mcp-server.ts
  and autopilot-state.ts.
2026-09-27 13:30:29 -04:00
ruv 6832f18d19 Merge PR #3468: fix(metaharness): stop help and invalid flags before execution 2026-09-27 13:15:47 -04:00
ruv b7e6083201 Merge PR #3464: fix(adr): retain qualified relations without inventing narrative edges 2026-09-27 13:15:46 -04:00
ruv 25166e190b Merge PR #3437: fix(adr): fail closed on unreadable or truncated verification input 2026-09-27 13:12:39 -04:00
ruv 8f34f0b934 Merge PR #3432: fix(adr): separate scan and database roots; fail on write errors 2026-09-27 13:12:36 -04:00
ruv 1f31f4bfac Merge PR #3428: fix(mcp): resolve installed CLI before npx fallback 2026-09-27 13:12:34 -04:00
Rudy Celekli 8a79a611a8 test: stabilize CI runner and native binding fixtures 2026-09-26 21:27:38 -04:00
Rudy Celekli ff4b2af271 fix(metaharness): handle help and reject unknown arguments before execution 2026-09-26 19:38:32 -04:00
Rudy Celekli d6fbe172dc fix(adr): retain qualified relations without parsing narrative as edges 2026-09-26 19:32:43 -04:00
ruv 2f192d4eb9 Merge branch 'pr-3367' into integ/train-3.45.1 2026-09-26 11:32:47 -04:00