3332 Commits
Author SHA1 Message Date
r bb7067587f Merge main into release/3.56.7 (TUI phases 2-3) 2026-10-11 18:29:21 -04:00
randRuFlo 30a2336377 chore(release): 3.56.7 (ruflo tui, MCP resources, auto-memory/purge fixes, doctor native-addon check, mods hardening, safe init --dual); codex 3.0.4 pin; witness regen from a full build
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 16:57:22 -04:00
randRuFlo 7718a142b4 feat(tui): the AI page: ask Codex (read-only, pinned) or OpenRouter, each question after a card (ADR-489 phase 3)
Page 6. Reuses harness.send and the conversation bridge's sendTo, not a second harness. Host.spawn runs only the pinned Codex 0.162.0
release (never current or PATH), read-only, from a fixed argument allow-list; Host.httpSend sends only https POST to openrouter.ai or a
convoTargets host, never follows a redirect, and a key is read by variable name and never drawn. Enter shows a card of exactly what would be
sent; a lone y answers it only while it was drawn in full (#3983); spend cap from the provider-reported cost. e2e host matrix gets a tui leg
(keyless in CI, live gated). Not in this PR: the workspace-write toggle.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 16:54:16 -04:00
rUv 87e6d32716 Merge pull request #4075 from ruvnet/feat/tui-phase2
feat(tui): Swarm, Events and Missions pages, page bar and keys, resize, no Claude-only chrome (ADR-489 phase 2)
2026-10-11 13:54:09 -07:00
rUv 741619b5bf Merge pull request #4070 from ruvnet/fix/codex-dual-safe-defaults
fix(codex): safe default .codex/config.toml; permissive mode needs --codex-trust full
2026-10-11 13:50:57 -07:00
randRuFlo ba6f9273a3 feat(tui): Swarm, Events and Missions pages, page bar and keys, resize, and no Claude-only chrome (ADR-489 phase 2)
Five pages (Overview, Cost, Swarm, Events, Missions) with keys 1-5 / o c s e m / Tab / Shift-Tab, a page bar, a key line that
shortens with the width, clear-and-redraw on resize, a position bar under 60 columns and a notice under 40. Room is left out on
purpose (a message box and Claude sessions this host does not have).

state.isStandalone is the capability flag: on this host the shared chrome is not drawn (no tab bar, footer buttons, Launch,
Ask Claude, Claude control card); a button nobody can press is not drawn, a state chip and a section title are. Missions reads
the ADR-406 record only. Under Claude Code nothing changes. Console 0.42.7.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 16:24:56 -04:00
rUv bd9119dde8 Merge pull request #4074 from ruvnet/fix/doctor-4055-pr-number
fix(doctor): cite nodejs/node#65943 (not #65946) in the native-addon warning (#4055)
2026-10-11 12:56:28 -07:00
rUv 228d578173 Merge pull request #4072 from ruvnet/fix/memory-purge-native-4057-hooklog-4056
fix(memory,hooks): keep on-disk format on sql.js write-back (#4057); command-recording off switch, redaction, expired-row cleanup (#4056)
2026-10-11 12:40:18 -07:00
rUv dd62f06485 Merge pull request #4071 from ruvnet/fix/auto-memory-hooks-4058
fix(auto-memory): hooks deliver their subcommand, sync sees learnings, worktrees share main memory dir, atomic store writes (#4058)
2026-10-11 12:36:32 -07:00
rUv f9732f1c81 Merge pull request #4073 from ruvnet/feat/mods-hardening-toast
feat(mods): doctor repairs that repair, --strict, atomic install, startup self-check (mods 0.6.0) + toast spike
2026-10-11 12:25:06 -07:00
rUv 17a8b86256 Merge pull request #4059 from ruvnet/feat/ruflo-tui-adr
feat(cli,console): ruflo tui, the console in a terminal of its own (ADR-489, phase 1)
2026-10-11 12:16:32 -07:00
randRuFlo 212e63ea22 Merge main into fix/codex-dual-safe-defaults; record the ADR-490 advisory as resolved
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 15:03:54 -04:00
rUv 7fca18f86e Merge pull request #4068 from ruvnet/feat/e2e-host-matrix
feat(e2e): three-host integration loop (Claude Code, Codex, OpenRouter) + fixes + ADR-490/491
2026-10-11 11:56:45 -07:00
randRuFlo 9c4d9be656 fix(doctor): cite the right Node PR (#65943) in the native-addon workaround text (#4055)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:55:40 -04:00
randRuFlo 3111685d37 fix(auto-memory): snapshot store ids before dedup so id-less entries are not re-added by the merge (#4058)
CI caught it: #2920 consolidate() assigns an ID to an ID-less entry in place, so the
ids captured at write time no longer matched the on-disk copy and the merge appended
it again. Capture ids when the store is read, and never treat an id-less on-disk
entry as one another writer added. Helpers re-signed.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:25:37 -04:00
randRuFlo f9e10b90f7 chore(codex): sync VERSION const with package.json 3.0.4 (audit-codex-integration)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:14:26 -04:00
randRuFlo e1c9d75590 feat(mods): doctor names each broken state with a one-line repair, --strict, atomic install with rollback
- probe: a plugin set to false is reported as disabled with 'claude plugin enable', not 'ruflo mods install' (which never flips it); installed-but-not-enabled; partial install (some mod plugins, no marketplace, record drift)
- every non-passing finding carries a one-line fix; headless -p fresh-config caveat named
- doctor --strict exits 1 on a warning too
- install writes settings and record as one operation: a failing record write restores the settings

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:07:52 -04:00
randRuFlo 11cc8cd648 feat(cli,console): ruflo tui --plain, exit 2 without a terminal, bundle staged for publish, esbuild declared (ADR-489 A-E)
- E: `ruflo tui --plain` prints one plain frame and exits 0; without a TTY and
  without --plain it prints a one-line hint on stderr and exits 2 (no frame).
  Tests for terminal, non-terminal, --plain in a terminal, no raw mode, and
  through the command with the real bundle.
- A: esbuild is a declared root devDependency (^0.27.2, already locked).
- B: v3/@claude-flow/cli/scripts/prepare-publish.mjs builds and stages
  plugins/ruflo-console/dist/tui.mjs so a registry install runs `ruflo tui`.
  Measured: +449,345 bytes on the CLI tarball.
- ADR-489: status Accepted; section 8 records decisions A-E (C: Swarm, Events,
  Missions, Room; D: Codex read-only by default, no danger-full-access, OpenRouter
  https-only to openrouter.ai + convoTargets hosts). Repairs a corrupted table row
  that had pasted copies of the file head into the ADR.
- README: a short ruflo tui section.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:07:28 -04:00
RuFlo 18ecd8ae7b fix(memory,hooks): keep the on-disk format on sql.js write-back (#4057); command-recording off switch, redaction and a cleanup that sees expired rows (#4056)
#4057: with encryption at rest on, `memory purge`'s sql.js fallback rewrote a
plaintext native SQLite store as an RFE1 blob and still printed [OK]; the
native bridge and every SQLite reader then rejected the file. Every whole-file
read-modify-write (purge, delete, get access-count, store, schema migration,
decay) now writes the image back in the format it read (plaintext -> plaintext,
RFE1 -> RFE1) via writeDbImagePreservingFormat. applyTemporalDecay also read
the raw bytes, so it failed on encrypted stores, and wrote plaintext: both
fixed.

#4056: `hooks post-command` stored every Bash command in full with no off
switch. Add CLAUDE_FLOW_HOOKS_RECORD_COMMANDS=0 / CLAUDE_FLOW_HOOKS_ENABLED=false /
hooks.recordCommands=false (nothing is stored when off), redact common secret
shapes and cap stored text at 2000 chars (bounded patterns, linear on hostile
input). `memory cleanup --expired-only` never saw expired rows because
listEntries hides them (TTL is a read-time rule): listEntries gains
includeExpired + expiresAt, and memory_cleanup uses it. ruflo-core 0.2.8: the
Bash shim stands down when recording is off.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:07:02 -04:00
randRuFlo ceed62b1b4 fix(auto-memory): hooks deliver their subcommand, sync sees learnings, worktrees share the main memory dir, writes are atomic (#4058)
- Upgrade-written import/sync hooks used `node -e "...import(file)" import`, which
  leaves the subcommand in process.argv[1]; the helper read argv[2], so both hooks
  only printed the status banner. They now use helperHookCommand like every other
  helper hook, and the helper also accepts the argv[1] shape so settings.json files
  already written keep working.
- Hook timeouts were written as 6000/8000 (and 8000/10000 from init) but Claude Code
  reads them in seconds; the auto-memory hooks now use 30.
- JsonFileBackend.query treated MemoryQuery.type (a query mode: hybrid, semantic...)
  as an entry type, so the bridge's learnings query matched nothing and sync always
  reported 0. It now treats modes as modes and honours tags, updatedAfter, key,
  keyPrefix and memoryType. The "Curated MEMORY.md index" line is no longer printed
  when the bridge emitted index:skipped.
- In a git worktree the memory dir is keyed by the main checkout (resolved with
  `git rev-parse --git-common-dir`, no shell) to match Claude Code.
- auto-memory-hook.mjs and intelligence.cjs both read-modify-write
  auto-memory-store.json: writes are atomic (temp + rename), serialised by a short
  fail-open directory lock, and keep entries another writer added since the read.
- Not changed: autoAssignOnIdle/autoAssign are false on purpose (#3031).

Helpers re-signed. Regression: __tests__/auto-memory-hooks-4058.test.ts (10 of 11
failed before; the 8-writer race kept 6 of 8 entries).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:04:41 -04:00
randRuFlo a6b563c60f fix(codex): safe default .codex/config.toml, explicit --codex-trust full opt-in
init, init --dual and @claude-flow/codex init wrote a gitignored
.codex/config.toml with sandbox_mode = danger-full-access,
approval_policy = never and web_search = live. Default is now standard
trust (workspace-write, on-request, cached); the permissive file needs
--codex-trust full (or RUFLO_CODEX_TRUST=full). init prints which level
it wrote, an existing .codex/config.toml is never rewritten (not even
with --force) and a kept permissive file is flagged. Unknown levels are
rejected on the CLI and fall back to standard from the environment.

Found by the three-host e2e run (ADR-490). @claude-flow/codex 3.0.4
(bundled: ships with the next train).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:04:07 -04:00
randRuFlo f38576e125 feat(doctor): flag better-sqlite3 copies built against Node 24.19+ headers on 24.19-24.21 (#4055)
Read-only check: reads build/config.gypi of each better-sqlite3 copy in the
resolved tree (never loads an addon), warns when a locally compiled copy used
24.19+ headers while the runtime is 24.19-24.21 (nodejs/node#65446), with the
documented workarounds. Prebuilt copies carry no config.gypi and pass.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:03:35 -04:00
r a5a2b1b9b9 Merge main into feat/ruflo-tui-adr 2026-10-11 14:00:53 -04:00
r b0a35764f3 Merge remote-tracking branch 'origin/main' into feat/e2e-host-matrix 2026-10-11 12:43:22 -04:00
randRuFlo 98f2eb5213 feat(e2e): three-host integration loop (Claude Code, Codex, OpenRouter); fix MCP resources capability and Codex plugin clone budget
ADR-490 (loop), ADR-491 (mods host integration, Proposed). The loop's first run found two defects, fixed test-first:
- ruflo mcp start advertised resources but answered resources/* with -32601 (3 stdio servers).
- init --dual's marketplace clone ran under a 20 s budget (17.5 s measured), swallowing the real error.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 12:43:14 -04:00
randRuFlo 1a6e95ff4b chore(release): 3.56.6 (Windows hooks via node -e, SessionStart risk scanner, trajectory feedback, cli-core 3.7.1 / shared 3.0.3 pins); witness regen from a full build
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 12:06:55 -04:00
rUv 8137b3d2f6 Merge pull request #4061 from ruvnet/batch/rudycelekli-fixes
fix: reviewed batch from rudycelekli (cli-core 3.7.1, shared 3.0.3, ruflo-adr 0.5.5)
2026-10-11 09:03:12 -07:00
randRuFlo 66b42ec532 fix(security): linear-time encoded-powershell match (repeated-token case was quadratic) in both scanners; re-sign helpers
Refs #4052, #4053.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 10:52:06 -04:00
r b40e8053ce Merge main into dream/2026-10-11-security 2026-10-11 10:49:55 -04:00
rUv 47ad62e5af Merge pull request #4054 from ruvnet/fix/win-hooks-4045
fix(init): Windows hooks launch through node -e, not cmd /c (#4045)
2026-10-11 07:48:54 -07:00
randRuFlo b662966540 chore: bump cli-core 3.7.1, shared 3.0.3, ruflo-adr 0.5.5 for the reviewed rudycelekli batch
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 10:46:01 -04:00
r 21622f6769 Merge branch 'pr-4026' into batch/rudycelekli-fixes
# Conflicts:
#	v3/@claude-flow/cli-core/src/output.ts
2026-10-11 10:45:32 -04:00
r 665808183b Merge branch 'pr-4037' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 17ecf82cf9 Merge branch 'pr-4035' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 6f36161c7e Merge branch 'pr-4030' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r e2384d4e6e Merge branch 'pr-4029' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r ffd66d59fc Merge branch 'pr-4028' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 29b5574fd0 Merge branch 'pr-4025' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 78cd445550 Merge branch 'pr-4024' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 33af710814 Merge branch 'pr-4023' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 096643f123 Merge branch 'pr-4033' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 18ed76d3e0 Merge branch 'pr-4032' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r af5b6b92c6 Merge branch 'pr-4022' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r cc44e3248c Merge branch 'pr-4021' into batch/rudycelekli-fixes 2026-10-11 10:45:18 -04:00
r 2940c91fcd Merge branch 'pr-4020' into batch/rudycelekli-fixes 2026-10-11 10:45:18 -04:00
randRuFlo c11b5461f5 feat(cli,console): ruflo tui, the console in a terminal of its own (ADR-489, phase 1)
Adds a standalone host for the ruflo-console views: a Node Host adapter
(confined reads, CLI-only run, everything engine-bound refused), a zero
dependency terminal renderer that is also the escape/secret chokepoint, and
`ruflo tui [--view overview|cost]` which draws the mod's own paneView.
Read-only; headless prints one plain frame. No hooks/ file changed, no
version bump, publish path untouched (bundle staging is a decision in the ADR).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 09:47:49 -04:00
ClaudeandRuFlo 25f26f5e3e fix(security): address review — linear-time regex, drop snippet from automatic-boot stdout
Two findings from ruvnet's review on #4053:

1. The powershell/-EncodedCommand pattern (`\s+.*-e(...)`) backtracks
   quadratically on hostile input -- measured ~1.9s on 64,000 spaces with no
   match; a 1MB hook command would stall session-restore (an unconditional
   boot path) for minutes. Rewritten as a linear token-walk
   (`(?:\S+\s+)*?`), confirmed <5ms on a 1MB hostile input while still
   matching real EncodedCommand payloads. Fixed in both the CJS mirror and
   the shared TS original (settings-risk-scanner.ts), since the TS version
   is already live via init/--upgrade.

2. scanSessionStartSettingsForRisk()'s warnings included up to 120 chars of
   the matched hook-command snippet -- but session-restore's stdout is read
   back into the live Claude Code session as context, unlike init/--upgrade
   where a human reads the terminal directly. Printing attacker-controlled
   settings.json content into that context is a prompt-injection path even
   with control characters stripped. The automatic-boot path now prints
   only the scanner-generated location + reason, never the snippet;
   srFormatRiskFindingsAsWarnings (snippet included) is unchanged for
   init/--upgrade's human-facing output.

New tests: a 1MB ReDoS timing guard, a snippet-leak regression guard, and a
real-payload-still-detected check after the regex rewrite. 75/75 related
tests pass.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01HW4yuGGcrCy4CcPgQ7Q2dx
2026-10-11 13:38:47 +00:00
rUv 9723fa33ea Merge branch 'main' into fix/circuit-breaker-completion-window-20261010 2026-10-11 06:31:52 -07:00
rUv 9ad0743e11 Merge branch 'main' into fix/circuit-breaker-stats-date-snapshots-20261010 2026-10-11 06:31:50 -07:00
rUv 37d78d6a17 Merge branch 'main' into fix/json-memory-expired-key-reuse-20261010 2026-10-11 06:31:48 -07:00