mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 06:06:02 +09:00
v3.32.13
576
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a17a597b67 |
chore(release): bump @claude-flow/cli, claude-flow, ruflo to 3.32.13
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
13a3421f5e |
chore(release): bump @claude-flow/cli, claude-flow, ruflo to 3.32.12
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
2aec43f616 |
chore(release): bump @claude-flow/cli, claude-flow, ruflo to 3.32.11
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
8bc23e76ed |
chore(release): bump @claude-flow/cli, claude-flow, ruflo to 3.32.10
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
26c35b59b4 |
chore(release): bump @claude-flow/cli, claude-flow, ruflo to 3.32.9
Patch release covering the statusline/memory-integrity fix batch merged in #2746, #2747, #2748, #2749 (issues #2733, #2735, #2736, #2737, #2742). Also fixes an npm EOVERRIDE conflict this batch introduced: v3/@claude-flow/cli/package.json had gained both a direct optionalDependency on better-sqlite3 (^12.9.0, from #2748) and a self-referential override pinned to an exact "12.9.0" (from #2736) for the same package — npm publish rejects an override that doesn't match its own direct dependency's spec string. Aligned the override to the same "^12.9.0" range so the dedup guarantee holds without the conflict. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
745dfbe327 |
fix(security): dedup better-sqlite3 to patched 12.9.0 across dependency tree (#2736) (#2746)
* fix(security): dedup better-sqlite3 to patched 12.9.0 across dependency tree Fixes #2736 (defense-in-depth mitigation). SQLite's documented WAL-Reset Bug (sqlite.org/wal.html §11) is a race between overlapping checkpoint operations and a WAL-resetting commit that can make a later checkpoint skip a committed transaction, silently losing acknowledged writes and/or corrupting index/table structure. Affects SQLite 3.7.0-3.51.2; fixed in 3.51.3, backported to 3.44.6 and 3.50.7. agentdb's own published dependency floor (`better-sqlite3@^11.8.1`, confirmed in this tree resolving to 11.10.0, which bundles vulnerable SQLite 3.49.2) created a mixed-engine tree alongside this repo's own direct dependency on better-sqlite3 12.9.0 (patched SQLite 3.53.0, via v3/@claude-flow/memory). Multiple concurrent connections (daemon, MCP servers, CLI invocations) issuing wal_checkpoint(PASSIVE) after every memory-bridge store is exactly the race precondition this bug requires. This forces a single deduplicated better-sqlite3 build tree-wide via pnpm overrides, pinned to the exact version this repo's own @claude-flow/memory package already depends on directly (12.9.0, bundling patched SQLite 3.53.0) — no new version to vet, just true deduplication of agentdb's nested resolution into the already-patched copy. Changes (following this repo's existing #2112-lesson override convention — multiple package.json files, each consumed a different way): - v3/package.json: pnpm.overrides (the v3 pnpm workspace root — this is where agentdb's better-sqlite3@11.10.0 actually lived pre-fix) - v3/@claude-flow/cli/package.json: npm-style overrides (effective when @claude-flow/cli is npm-installed standalone via npx) - package.json (root "claude-flow" umbrella): bumped the existing ">=12.8.0" override to an exact "12.9.0" pin, AND added a pnpm.overrides block — the bare "overrides" key alone is silently ignored by pnpm (only read by npm), so the pre-existing override was a no-op for local `pnpm install` at repo root despite being present in package.json for a while - ruflo/package.json: bumped ">=12.8.0" to exact "12.9.0" (npm-style, effective for `npx ruflo@latest`) - v3/pnpm-lock.yaml, pnpm-lock.yaml: regenerated via `pnpm install` Verification: - `pnpm why -r better-sqlite3` (v3/) and `pnpm why better-sqlite3` (root): exactly one resolved version, 12.9.0, everywhere - Confirmed via realpath resolution (not hoisted symlink) from each of the 4 installed agentdb versions' own on-disk directories (1.6.1, 2.0.0-alpha.3.4, 2.0.0-alpha.3.7, 3.0.0-alpha.17) that each now binds the same deduplicated better-sqlite3@12.9.0 copy - `db.prepare('select sqlite_version()').get()` from that binding returns 3.53.0 (>= 3.51.3 patched floor) - v3/@claude-flow/memory test suite: 438/442 passing; the 4 failures are pre-existing Windows path-separator and perf-threshold issues unrelated to SQLite (none of the failing test files touch better-sqlite3/sqlite at all) Not fixed here (upstream, out of reach from this repo): - agentdb's own published package.json floor (`^11.8.1`) is unchanged — this override is a same-repo mitigation, not a fix to agentdb itself. agentdb needs the same bump upstream. Not touched here (explicitly out of scope, separate/riskier change): - The wal_checkpoint(PASSIVE)-after-every-store pattern in memory-bridge.ts (#2558) is left as-is; the issue calls that "defense-in-depth" / optional, and dedup alone removes the mixed-engine race precondition regardless. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(deps): regenerate package-lock.json for better-sqlite3 dedup override package.json pins the better-sqlite3 override to 12.9.0 (patched, fixes the WAL-reset bug) but package-lock.json still resolved a stray top-level better-sqlite3@12.10.0 and was missing the nested better-sqlite3@12.9.0 entries under @claude-flow/memory, agentdb, and agentic-flow — causing npm ci to fail in CI with "Missing: better-sqlite3@12.9.0 from lock file". Co-Authored-By: RuFlo <ruv@ruv.net> * fix(deps): restore better-sqlite3 as direct root optionalDependency The #2736 dedup fix pinned better-sqlite3 to 12.9.0 via a pure "overrides" entry (no direct dependency), which removed the top-level hoisted node_modules/better-sqlite3 that used to exist under the looser ">=12.8.0" override. That silently broke the "graph schema smoke (ADR-130 P1)" CI job: its "npm rebuild better-sqlite3" step (and graph-edge-writer.ts's bare `await import('better-sqlite3')`, which Node resolves by walking up node_modules from the importing file) had nothing at the root to rebuild/resolve, so _openDb() failed closed and insertGraphEdge() silently returned false — 8/22 assertions failing. Restoring the direct optionalDependency (matching what this file already had historically, before the override-only refactor) gives npm a concrete anchor to hoist a single deduplicated copy back to root node_modules, preserving the override's version pin while keeping the graph-edge-writer's resolution path intact. Regenerated package-lock.json accordingly. Verified locally: `npm rebuild better-sqlite3` now finds and rebuilds the root copy, and a direct insertGraphEdge() call against a real better-sqlite3 handle returns true. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(deps): resync v3/pnpm-lock.yaml specifier after merging main Merging main (which carries #2748's direct better-sqlite3 dependency on @claude-flow/cli) forward into this branch left the recorded lockfile specifier at the pre-override "^12.9.0" while this branch's own overrides.better-sqlite3 pin ("12.9.0", exact) is now the effective spec pnpm resolves against — a one-line drift causing `pnpm install --frozen-lockfile` to fail across the whole v3-ci.yml matrix. Regenerated to match. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(memory): force WAL checkpoint before close in graph-edge-writer The "graph schema smoke (ADR-130 P1)" CI job started failing deterministically on Linux runners after the better-sqlite3 dedup (this branch) pinned a single 12.9.0 build tree-wide: TEST 2/3 insert-then-reread assertions found embedding_ref/source_id undefined immediately after _resetBridgeDb() closed the write connection. _resetBridgeDb()'s close() relied on SQLite's implicit "last connection close" PASSIVE auto-checkpoint to flush the WAL into the main file before a same-process sql.js reader re-reads the raw file. That's best-effort, not guaranteed synchronous, and evidently more prone to leaving data in the WAL under Linux CI's I/O/lock timing than on Windows (did not reproduce locally). Not a correctness regression in 12.9.0 itself — a latent timing assumption the dedup made newly observable by changing which exact build backs every connection. Force a blocking `wal_checkpoint(TRUNCATE)` before close so the main file always reflects committed writes before any other reader (same process or otherwise) touches it, regardless of platform timing. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
fb2f92bb2c |
chore(release): bump @claude-flow/cli, claude-flow, ruflo to 3.32.8
Brings all three packages back into version lockstep (claude-flow had been stuck at 3.32.2 while @claude-flow/cli and ruflo advanced to 3.32.7), fixing the "Plugin package install-safety" CI violation. Bundles the pnpm-lock.yaml drift fix (#2719/#2717) and the memory_search namespace-default fix (#2646), both already merged to main, into this release. |
||
|
|
e332689b8c | fix(release): harden hooks, statusline, security, and plugin MCP integration | ||
|
|
72875da937 | chore(release): prepare stable Ruflo 3.32.1 | ||
|
|
a0c1ac4b4f |
feat(doctor): add --fix-handles to kill orphaned conhost.exe on Windows
Windows-only mitigation for anthropics/claude-code#67888 — Claude Code's Bash tool spawns cmd.exe/bash.exe without cleaning up child conhost.exe handles, so a long session accumulates dozens (observed live: 26+ orphaned conhost.exe after a ~4h session; each holds a kernel object + ~1MB). Combined with memory pressure this measurably slows the machine. The new flag runs a targeted PowerShell cleanup that only touches conhost.exe (safe — Windows respawns on demand). Deliberately does NOT kill cmd.exe/bash.exe/node.exe: those can be the invoking shell or an active MCP server, and killing them would 255 the caller or disconnect ruflo's own MCP tools. Reports before/after conhost count + free RAM delta. Early-return short-circuits the full health-check flow. On non-Windows platforms, prints a friendly "not applicable" and exits 0. Also fixes a latent parser-quirk bug: `--fix-handles` was read as `ctx.flags['fix-handles']` but the arg parser camelCases kebab-case flag names to `ctx.flags.fixHandles`. (Init.ts's `no-codex-detect` / `no-skills-sh` reads probably have the same latent bug — filed as follow-up.) Bumps @claude-flow/cli, claude-flow, and ruflo to 3.32.0 (MINOR — new flag on existing command, backward-compatible addition per CLAUDE.md semver policy). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
8306ad8fe5 |
fix(helper-refresh): also refresh ~/.claude/helpers so global statusline picks up new features
Before 3.31.3, autoRefreshHelpersIfStale only touched <cwd>/.claude/helpers. But Claude Code's global settings.json falls back to ~/.claude/helpers/statusline.cjs when no project-local override exists (executor.ts:460-462), and that global file was frozen at whatever version was current when the user last ran `ruflo init` — nothing refreshed it. So when the 2026-07-13 funnel/promo Line-3 row shipped (PR #2622), users who init'd earlier couldn't see it even after upgrading @claude-flow/cli — their global statusline literally didn't have the render code. Fix: - Extract per-dir refresh into refreshOneHelpersDir() - Add alsoRefreshGlobal: boolean opt-in to autoRefreshHelpersIfStale — defaults FALSE so tests don't touch $HOME - Real CLI entry (src/index.ts) passes alsoRefreshGlobal:true, activating the global pass in production - Same forward-only semver.gte downgrade guard applies to both passes - Result type gains optional `global` sub-object; top-level fields still describe the project pass (API compat) Test additions: two new cases in helper-refresh.test.ts — one exercises the global pass end-to-end under a redirected HOME (proves the fix works), one asserts alsoRefreshGlobal:false is the default and never scaffolds under $HOME (invariant that keeps every other test in this file safe). All 9 tests pass. Bumps @claude-flow/cli, claude-flow, and ruflo to 3.31.3 (PATCH — behavior extension, no API surface change; existing single-object return shape unchanged for callers that don't opt in). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
f00d78ffe8 |
fix(init): skip skills.sh re-registration if .agents/skills/ruflo already exists
3.31.1's `maybeInstallSkillsSh` fired unconditionally on every `ruflo init`, including `--force` reinits and `init upgrade`. Each call clones the ~50MB ruvnet/ruflo repo (skills CLI clones internally) and sends a fresh install telemetry event to skills.sh — silently inflating our own GitHub unique-cloners metric (rough estimate: +20-80%/day) and our skills.sh leaderboard rank, plus wasting user bandwidth. Add an idempotency check: if `.agents/skills/ruflo` already exists in cwd, log a dim skip note and return. First init on a project → real registration + real signal; every subsequent init → no-op. PATCH — behavior change corrects the over-firing, no API surface change. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
23abe26b9b |
fix(init): install only the canonical ruflo skill via skills.sh (not all 267)
3.31.0's `maybeInstallSkillsSh` called `npx skills add ruvnet/ruflo` with no filter, which discovered 267 skills across 30+ plugins and installed them all into the target project's .agents/skills/ — invasive for a user who just wanted the platform's cross-agent entry point. - New: SKILL.md at repo root — a single canonical `ruflo` skill describing the platform (what it is, when to invoke, three-command getting-started, MCP tool namespaces, plugin discovery, cross-agent install path) - Changed: init now runs `npx skills add ruvnet/ruflo --skill ruflo --yes` — installs ONLY the platform skill (~1 file). Users who want all 267 plugin skills can run `npx skills add ruvnet/ruflo --all` themselves; init prints that as a discoverable next step. - Documentation strings + fallback retry command updated to reflect the narrower install. PATCH — behavior change corrects an overreach, no API surface change. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
35ceda351a |
feat(init): auto-register ruflo with skills.sh for cross-agent skill catalog
Adds a post-init step (maybeInstallSkillsSh) that runs `npx --yes skills add ruvnet/ruflo` at the end of every `ruflo init`, exposing ruflo's 134 skills to whatever agent the project uses (Claude Code, Cursor, Copilot, Gemini, Cline, ...). Best-effort — never fails the primary init; on any error prints a soft retry line. Uses windowsHide to avoid Windows console-flash on the spawn. - New: skills.sh.json at repo root with 34 groupings (one per plugin), 134 skills total, controlling how ruflo displays on skills.sh - New: --no-skills-sh flag (also honors RUFLO_NO_SKILLS_SH=1) to opt out - Skipped under --skip-claude and --format json, matching the existing maybeAutoDetectCodex sibling pattern Bumps @claude-flow/cli, claude-flow, and ruflo to 3.31.0 (MINOR — new flag + new default behavior, backward-compatible addition per CLAUDE.md semver policy). All 400 commands-deep tests pass. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
9dd999c93d |
fix(#2357): add sonnet-5 to the sampling-params rejection regex
Sonnet 5 joined the Claude 5 adaptive-thinking family and removed temperature/top_p/top_k like Fable 5, Opus 4.8, and Opus 4.7 — the Anthropic API returns 400 'Extra inputs are not permitted' when any is present. The `modelRejectsSamplingParams` regex in agent-execute-core.ts didn't include sonnet-5, so callAnthropicMessages() would forward its 0.7-default temperature and get rejected on any Sonnet 5 call (including the internal routing that 3.30.4 just bumped `sonnet` → `claude-sonnet-5`). Test coverage extended: sonnet-5 added to both the alias-check and the request-body drop test (32 tests pass, up from 30). Bumps @claude-flow/cli, claude-flow, and ruflo to 3.30.5 (PATCH — bug fix, no API change). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
3e9122a310 |
feat(routing): default to latest Claude 5/4.x models in tier map + init template
- MODEL_MAP: `sonnet` alias bumped from claude-sonnet-4-6 → claude-sonnet-5 (matches the current Claude 5 family default). Prior pin remains reachable via new `sonnet-4.6` alias for back-compat. - DEFAULT_ANTHROPIC_MODEL and `inherit` now resolve to claude-sonnet-5. - ruflo init template (settings-generator.ts): top-level `model` set to claude-sonnet-5 (previously commented out with a stale sonnet-4-5 hint); `claudeFlow.modelPreferences.default` bumped from opus-4-8 → claude-sonnet-5. - Project `.claude/settings.json` synced with the new template output (model + modelPreferences); removed the stale skillListingBudgetFraction rationale comment (kept the 0.06 value — #1834 still has 358 SKILL.md duplicates, workaround is still load-bearing). - Test updates for #2232 / #1906 regression guards to assert the new sonnet-5 resolution and the new `sonnet-4.6` back-compat alias. Bumps @claude-flow/cli, claude-flow, and ruflo to 3.30.4 (PATCH — no API change, default-model refresh only). All 30 model-resolution/sampling-params tests + 400 commands-deep tests green. Follow-up: sampling-params regex in agent-execute-core.ts (#2357) may need `sonnet-5` added if Sonnet 5 rejects temperature/top_p/top_k like the rest of the Claude 5 family — not touched here because I don't have that behavior confirmed. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
38d6079021 |
fix(windows): hide console flash from detached hook-refresh spawn
The spawnDetachedHookRefresh() call in v3/@claude-flow/cli/.claude/helpers/hook-handler.cjs was missing windowsHide: true. On Windows, npx.cmd's cmd.exe wrapper flashed a visible console window every time SessionStart fired the background funnel/advisor refresh. Matches the fix already in place at line 158 in the same file (firstRunAutoEnable path). Bumps @claude-flow/cli, claude-flow, and ruflo to 3.30.3 (PATCH — Windows-only visible bug, no API change). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
5fb503480d |
chore(release): bump claude-flow / @claude-flow/cli / ruflo to 3.30.2
PATCH bump (3.30.1 → 3.30.2) — ships #2677 doctor memory functional checks (@stuinfla checks 1-3: integrity, content, embedding-coverage) plus env-audit allowlist entries for four escape hatches that were flagging CI on every PR (RUFLO_AI_BUDGET_{DIR,DISABLE}, RUFLO_METAHARNESS_SKIP_LOCAL, RUFLO_HELPERS_LOCKED). Related: PR #2681, half of issue #2677 (checks 4-8 pending stuinfla's PR). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
5fa2a3ce6b |
chore(release): bump claude-flow / @claude-flow/cli / ruflo to 3.30.1
PATCH bump (3.30.0 → 3.30.1) — fixes #2679 statusline generator drift: generator now reads .claude/helpers/statusline.cjs as its single source of truth instead of an inline 1000-line template. Every future edit to the helper propagates to `ruflo init` output automatically. No user-facing behavior change — fresh installs get the same helper content that was already shipping in the deployed .claude/helpers/statusline.cjs. CI: three static-regression guards updated for the read-and-substitute pattern. All three now grep the helper (where the content lives) with a paired assertion that the generator still reads it. Related: PR #2680, issue #2679, v3.30.0 ( |
||
|
|
fea1d9e955 |
chore(release): bump claude-flow / @claude-flow/cli / ruflo to 3.30.0
MINOR bump (3.29.0 → 3.30.0) — additive per PR #2676: - ADR-317: developer revenue-share Phase 0 scaffold (ruflo funnel enroll/earnings/unenroll) - ADR-318: spinner-verbs surface (ruflo spinner enable/disable/list/reset) — default ON - ADR-319: startup announcements surface (ruflo announcements enable/disable/list/reset) — opt-in via env - First-run auto-enable mechanism (RUFLO_NO_AUTO_ENABLE + RUFLO_NO_AUTO_ENABLE_SPINNER + RUFLO_AUTO_ENABLE_ANNOUNCEMENTS) - .LOCKED helper-refresh escape hatch (fixes concurrent-session clobber) Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
c89a98a4fd |
feat(funnel,statusline): accept + open subcommands, whole-row-clickable promo, Windows flash mitigations (v3.29.0) (#2671)
Ruflo-side companion to anthropics/claude-code#70200 tracking in #2669. Adds two new user-facing subcommands, one visual+click improvement to the statusline promo row, and layered Windows subprocess-flash mitigations. CLI additions (semver MINOR — additive, backward-compatible): - ruflo funnel accept — backdates disclosure firstShownAt past the 24h grace so promo rotation starts immediately on the next render, without waiting a full day. Refuses cleanly if funnel is disabled or disclosure was declined. - ruflo funnel open — reads ~/.ruflo/statusline-promo.json, validates the URL against a hardcoded allowlist (never trusts the user-writable memo), and opens it in the default browser via execFile (no shell interpretation) with windowsHide. Works independently of whether the terminal renders OSC 8 hyperlinks — critical for hosts like VS Code integrated terminal where left-click pastes and Ctrl+Click hits Quick Open instead of following the link. - recordDisclosureAccepted() helper in disclosure.ts, exported from funnel/index.ts. Statusline row 3 (getPromoRow): - Ellipsis on truncation instead of silent mid-word chop. - Command portion styled bright-white + bold so it visually reads as "shell command to type" (as the design comment always intended) instead of getting lost in the row's kind-color. - Visible dim "(domain)" suffix after the label, showing the final destination host even on terminals that strip the click-redirect wrapper. Both label AND domain wrapped in OSC 8 hyperlinks — two click targets per row. - Whole assembled row wrapped in ONE OSC 8 hyperlink so a click anywhere on the row opens the URL. Command styling deliberately NOT underlined so it still reads as "type this" not "click me"; clicking opens the URL, does not execute the command. Windows console-flash mitigations (upstream tracking anthropics/claude-code#70200, ruflo tracking issue #2669): - windowsHide: true on statusline.cjs execSync (CLI JSON delegation) + safeExec helper (sqlite/git subshells) + hook-handler.cjs detached spawn (background funnel/context refresh). Silences flashes from OUR subprocess grandchildren. Cannot silence Claude Code's own spawn of the hook wrapper — that needs the upstream fix. - statusline cache TTL bumped 60s → 300s so the outer wrapper spawn (which is Claude Code's, not ours) fires 5x less often. Rendering still responsive because the promo/insight rotation has its own tighter 20s clock. Tests: 121/122 funnel invariants pass; 1 unrelated pre-existing perf timer flake on Windows (attributionUrl <100ms for 1000 builds, got 191ms — no relation to these changes). Closes some UX symptoms tracked in #2669; the upstream Claude Code bug is the authoritative fix. |
||
|
|
901a10d20e |
chore(release): bump claude-flow + ruflo to 3.28.0
Umbrella and wrapper version bump to match @claude-flow/cli@3.28.0 (#2661 root-fix: repository supervisor, structured telemetry, budget CLI, migration warning). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
dcfd621d1e |
chore(release): bump claude-flow + ruflo to 3.27.4
Umbrella and wrapper version bump to match @claude-flow/cli@3.27.4 (persistent AgentDB memory on by default). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
b254e3215e |
fix(statusline): bake in the real CLI version, fixing the npx-only fallback
getPkgVersion()'s runtime candidate scan can't find any version when rendering via a pure npx invocation with no persistent local install: npx installs into an ephemeral, unpredictably-hashed ~/.npm/_npx/<hash>/ directory that none of the probed candidate paths (marketplace, project node_modules, global prefix) can locate. It silently fell back to a hardcoded "3.6" placeholder — confirmed live via an isolated fresh-machine simulation (fresh HOME + fresh npm cache, no prior npx history). generateStatuslineScript() now bakes in the CLI's own real version at generation time (via getInstalledCliVersion(), the same reliable createRequire/findPackageRoot resolution helper-refresh.ts already uses) as getPkgVersion()'s default, replacing the hardcoded placeholder. The runtime candidate scan still wins when it finds something newer (e.g. a later `npm update` in the same project) — this only fixes the fallback. chore(release): bump to 3.27.3 across cli/umbrella/wrapper. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
dbcfe15f3c |
fix(hooks,statusline): validate a real compiled dist before trusting a local CLI candidate
Claude Code's own plugin marketplace mechanism installs by git clone/pull
with no build step, so ~/.claude/plugins/marketplaces/ruflo is a
source-only checkout by construction: bin/cli.js exists on disk but
importing dist/src/index.js from it throws ERR_MODULE_NOT_FOUND on every
real command (confirmed live on a real install — only --version survives
it, since it reads package.json directly).
Both resolveCliBinForHook() (hook-handler.cjs) and resolveCliBinCandidates()
(statusline-generator.ts) picked that doomed candidate first and had no
recovery:
- hook-handler.cjs's spawnDetachedFunnelRefresh()/spawnDetachedAdvisorRefresh()
just gave up silently (`if (!cliBin) return;`) — the funnel promo cache
and ADR-316 advisor tip could never populate for a marketplace install,
on any OS.
- statusline.cjs's getStatuslineData() DID already fall through to the
other candidates and finally npx, but wasted every render's time budget
failing against the broken candidate first — starving the 20s
promo-rotation clock and making the row look frozen/non-rotating even
once it did show something.
Fix: both resolvers now also check for dist/src/index.js next to bin/cli.js
before trusting a candidate. hook-handler.cjs additionally gains a shared
spawnDetachedHookRefresh() that falls back to `npx --prefer-offline
@claude-flow/cli` (detached/unref'd, so the slower cold-start costs nothing
perceptible) when no local candidate has a real dist — mirroring the
robustness the statusline path already had.
Existing installs pick this up automatically via autoRefreshHelpersIfStale
on the next `ruflo`/`@claude-flow/cli` command, no reinstall required.
Co-Authored-By: RuFlo <ruv@ruv.net>
|
||
|
|
7006785577 |
chore(release): bump claude-flow + ruflo to 3.27.0
Umbrella and wrapper version bump to match @claude-flow/cli@3.27.0 (#2661/#2662 daemon flywheel fix). ruflo's ^3.23.0 dependency range already covers the new version; no range change needed. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
eabf953042 | chore(release): bump to 3.26.1 across cli/umbrella/wrapper (Windows statusline hotfix) | ||
|
|
d0ac73d798 |
feat: Cognitum customer lifecycle funnel — ADR-301..310 + implementation (#2622)
* docs(adr): add ADR-301..305 — Cognitum customer lifecycle funnel New 300-series ADRs defining the ruflo → cognitum.one conversion funnel: - ADR-301: promotional status surface (rotating bottom status row; reaches existing installs via the ADR-174/177 signed helper auto-refresh channel) - ADR-302: one-time post-init capability enrollment prompt - ADR-303: contextual credit-exhaustion recovery/upgrade experience - ADR-304: optional local Meta LLM proxy (localhost:11435 → api.cognitum.one, OpenAI-compatible, local-first) - ADR-305: funnel overview, design principles, success + guardrail metrics Also indexes the new series in the ADR README. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013FqZGy1zZ49JivKUSyqDKH * docs(adr): harden ADR-301..305 per review — trust and funnel-integrity gates - ADR-301: signed content boundaries — messages are schema-validated data only, length-bounded, URL-allowlisted, expiry-cached, and sanitized so copy can never emit terminal control sequences - ADR-302: split enrollment into four independent consent domains (account, proxy-install, telemetry, cloud-routing) with versioned consent receipts; acceptance authorizes auth login only - ADR-303: deterministic error taxonomy with explicit provider codes and a fail-closed classifier; no text-matching of provider messages - ADR-304: mandatory data-plane disclosure before cloud routing; proxy installs local-only, cloud routing off until explicit opt-in - ADR-305: attribution rules (event vocabulary, anonymous rotating funnel ID, 7/30-day attribution windows, 90-day retention, verifiable deletion), ordered gate hierarchy with hard integrity/ health/trust gates, automatic circuit breaker via the signed config channel, and an end-to-end acceptance test for existing installs Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013FqZGy1zZ49JivKUSyqDKH * docs(adr): amend ADR-301/303/304/305, add ADR-306..310 — deployable funnel system Amendments: - ADR-301: existing-install disclosure gate (never promo before disclosure, once per user, decline disables all surfaces), 4:1 educational:promotional content ratio, 30-min repeat cap, no dark patterns, marquee off for screen readers/reduced motion, control precedence chain - ADR-303: Cognitum account service as sole credit authority (GET /v1/credits), canonical CreditErrorCode enum; only COGNITUM_CREDIT_EXHAUSTED triggers the funnel surface - ADR-304: retitled as the proxy *product* ADR; explicit relationship to the internal metallm dev-bridge (shared routing core, versioned compat layer, no implicit contract dependency); runtime deferred to ADR-307 - ADR-305: kill-switch claim corrected — release-bound vs opt-in freshness mechanisms with honest latencies, 24h revocation TTL, last-valid-signed-policy failure mode; normative control precedence (env > enterprise > user > default > remote); two measurement planes (CI release qualification enforces gates; production analytics measures adoption only) New ADRs: - ADR-306: Cognitum auth — PKCE + device flow, keychain-only refresh tokens, incremental scopes mapped 1:1 to consent domains - ADR-307: proxy runtime — Rust single binary, loopback bind + per-user token, platform user services, explicit lifecycle commands, signed no-self-update packaging - ADR-308: versioned public API contract — OpenAPI in both repos, idempotent event ingestion, normative client failure policy - ADR-309: governance — npm-policy commitments, GDPR/CCPA basis, constrained closed event schema with timestamp bucketing, content approval ownership - ADR-310: staged rollout phases 0-6, promotion criteria, three- package rollback discipline, CI gate matrix, final acceptance test Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013FqZGy1zZ49JivKUSyqDKH * feat(funnel): implement ADR-301/302/303/305 funnel system with release gates Core module (v3/@claude-flow/cli/src/funnel/, local-only, zero network I/O): - precedence.ts: ADR-305 control chain (env > enterprise policy > user config > project config > package default > remote policy); a lower source can never re-enable a higher disable - disclosure.ts: ADR-301 existing-install disclosure gate (never_seen / disclosed_enabled / disclosed_disabled), 72h grace window before any message, decline disables all surfaces - messages.ts: signed-content boundaries: schema validation, 80-col grapheme-aware bound, exact-host URL allowlist, expiry, and hard drop of any C0/C1/ANSI/OSC/bidi sequence (drop, never repair) - rotation.ts: deterministic scheduler; promo only in 1-of-5 slots, 30-min repeat cap, educational fills all other slots - consent.ts: ADR-302 versioned receipts for 5 separate domains; grant AND decline recorded; stale policyVersion means re-ask, never carry forward - credit-errors.ts: ADR-303 CreditErrorCode enum + fail-closed classifier over machine-readable provider codes (never message text); only COGNITUM_CREDIT_EXHAUSTED fires the recovery surface, once per session - events.ts: ADR-309 closed event schema, daily timestamp buckets, bounded local queue, telemetry-consent-gated, opt-out deletes ID+queue - enrollment.ts + promo.ts: surface orchestrators Surface integrations: - hooks statusline --json now computes a promo field (all gates run server-side; failures never break the statusline) - generated statusline.cjs renders the bottom promo row with defense-in-depth re-sanitization + env/CI gates at render time; repo-root artifact regenerated (drift guard green) - init: one-time post-init capability enrollment (--no-signup flag, CI/non-TTY auto-skip, records only the account consent domain) - new command: ruflo funnel status|disable|enable|id - doctor gains a funnel component reporting effective state + deciding precedence source (enterprise audit verification) Contracts and gates: - v3/docs/api/cognitum-v1.openapi.yaml: ADR-308 v1 contract (8 endpoints, error taxonomy mirrored 1:1, normative failure policy, signed policy feed schema with 24h TTL cap) - .github/workflows/funnel-gates.yml: ADR-310 hard gates: invariant suite + runtime suppression proofs (promo in CI = 0, RUFLO_FUNNEL=0 suppression, opt-out persistence, non-interactive init) - __tests__/funnel.test.ts: 50 tests mapping 1:1 to the ADR-310 gate list Verified: cli-core/swarm/memory/neural/security/cli builds green; funnel suite 50/50; statusline-cost-display drift guard + runtime 8/8; init-wizard-bugs and p1-commands green; live smoke of the funnel lifecycle, statusline promo gates (fresh shows disclosure, CI shows nothing, RUFLO_FUNNEL=0 shows nothing, post-grace rotates educational), doctor component, and init under CI. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013FqZGy1zZ49JivKUSyqDKH * fix(funnel-gates): mirror the green Build V3 setup (pnpm 8, frozen lockfile, workspace build) The runtime-suppression job failed on the PR because pnpm 9 with a filtered install resolved the bare-semver workspace deps (@claude-flow/cli-core etc.) from the npm registry instead of linking the workspace packages, so the cli tsc build could not find cli-core's dist. Copy the exact setup the passing Build V3 job in v3-ci.yml uses: pnpm/action-setup@v6 pinned to pnpm 8, pnpm install --frozen-lockfile over the full workspace, and a workspace-wide pnpm build. Also install pyyaml explicitly before the OpenAPI parse check. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013FqZGy1zZ49JivKUSyqDKH * chore(helpers): pending-insights runaway-storage guard in intelligence.cjs Captured from the session's self-learning hook runtime: recordEdit now caps the append-only pending-insights file at ~512KB by keeping the most recent 2000 lines when consolidation has not drained it, so it can never grow unbounded. Non-fatal, statSync-per-edit cost only. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_013FqZGy1zZ49JivKUSyqDKH * feat(funnel): rotating sponsor disclosure, statusline redesign, auto-update ## Statusline (client render) Reorganized 4 rows by purpose (Architecture / Runtime / Health / AgentDB): - suppress zero/healthy fields; glyph-only for 🧠 memory % and 💾 RAM MB - drop DDD % duplicate, drop ADR denominator, drop opaque "◆ DB" marker - "Target 150x-12500x" → "Goal 150x-12500x" (plain language) - Health row hides on NONE; collapses to "✓ Security ✓ No CVEs" when clean, reads "N vulnerabilities" (not "CVE checks 0/3") on unfixed findings - kind-based row color: brightCyan for disclosure, brightPurple for promotional sponsor, yellow for educational — reads as *what it is* ## Funnel promo row (ADR-301/305/309) - Rotating disclosure: 3 copy variants on a deterministic 5-min slot with a shared Cognitum sponsor URL. Neutral framing — no "Sponsored by"/ "Powered by" (would read as advertising and lose OSS trust). - OSC 8 hyperlink wrapper: allowlist ships in renderer (cognitum.one hosts only), https-only, TMUX/CI/TERM=dumb suppression, kill-switch env var, defense-in-depth label re-sanitization. Broken URL / non-https / non-allowed host → plain label, never a raw escape. - Attribution: attributionUrl() decorates every outbound funnel link with utm_source=ruflo · utm_medium=statusline · utm_campaign=<kind> · utm_content=<msg-id>. Client-side link builder, ZERO runtime network call — API-down has no effect on render. `fid` (pseudonymous funnel ID) appended only under telemetry consent (ADR-309 privacy default). - Defense in depth: attributionUrl rejects non-https schemes at build time in addition to renderer's OSC 8 allowlist. ## Auto-update for existing installs - statusline.cjs added to CRITICAL_HELPERS + executor.ts + sign-helpers.mjs. - helper-refresh.ts fallback generates statusline.cjs when the installed package isn't resolvable. - Regen script scripts/regen-statusline-artifact.mjs keeps root artifact in lockstep with the generator (drift-guard test enforces). PUBLISH-TIME REQUIRED (only ruvnet-owned key can do): re-run scripts/sign-helpers.mjs with the Ed25519 signing key so helpers.manifest.json includes statusline.cjs's SHA-256. Without it, auto-refresh fail-closes (intended: tampered helper refuses install). ## Tests: 50 → 57 (+ statusline-cost-display drift guard passes) - parameterized invariant over every DISCLOSURE_TEXTS variant - sponsor URL shape (https + cognitum.one) - 5-min rotation determinism - attributionUrl: UTM shape, absent fid without consent, non-https rejection, malformed base URL verbatim - API-down design lock: promo.ts contains no fetch/https/XMLHttpRequest Co-Authored-By: RuFlo <ruv@ruv.net> * fix(statusline): promo row flicker — stale-while-revalidate cache The funnel promo row would appear on cache warm-up then vanish on the next render whenever the 60s cache TTL expired mid-session and the CLI call either failed, timed out, or was resolved to a bin that returned no promo. Root cause: getStatuslineData() fell through to buildLocalFallback() on CLI failure, and the fallback returned a stub object with no `promo` field. Fix: stale-while-revalidate on the /tmp cache. - readCache() now returns { fresh, data }. The TTL only decides whether the data is fresh; the payload comes back either way. - getStatuslineData(): fresh cache → return immediately. Else try the CLI. On CLI failure, if we have any prior cache data, re-apply local overlays and return it. Only if we've never had a good CLI response do we fall to buildLocalFallback(). Effect: the promo row survives CLI hiccups, timeouts, and cache-expiry mid-render. Live verified: cache backdated 5 min, all 3 CLI bins disabled — row still renders the last known disclosure. Test: pins the generator template shape so a future edit breaking the readCache freshness split or the stale-fallback path trips CI. 57 → 58. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(statusline): 3-line design + persistent promo memo Two related fixes for observed live-session bugs. ## 3-line design (promo as line 1) Claude Code truncates the statusline past line 4 with the system-guidance / input-prompt line. The previous 6-row layout (header + separator + 4 purpose rows + promo) put the funnel row on line 6, so it was silently dropped by the viewport. New layout, exactly 3 lines: Line 1 — Promo / disclosure (funnel row, ADR-301 surface) Line 2 — Header (version · git · model · timing · ctx · cost) Line 3 — Compressed ops (Swarm · Hooks · 🧠 · 💾 · Health) Everything on the previous 4 individual rows is now on the ops line, dot- separated. Diagnostic detail (Domains, ADRs count, vectors, MCP count, DB marker) moves behind `ruflo status --verbose` per the earlier design discipline you documented ("Show healthy state only when it confirms readiness. Show zero values only when zero is actionable. Show failures immediately."). ## Persistent promo memo Even with stale-while-revalidate cache, promo would blink out when an older `@claude-flow/cli` cached by npx succeeded but returned JSON with NO promo field. Cause: the older version predates ADR-301, so its statusline JSON schema is missing our field. The cache path only fires when the CLI THROWS — a promoless success clean-writes. Fix: `~/.ruflo/statusline-promo.json` — a 6h-TTL memo of the last known good promo. Every successful render writes it. Every code path (fresh-cache / CLI-success / stale-cache / cold-fallback) calls `overlayMemoPromo(data)` which injects the memo IFF `data.promo` is missing. The funnel row now survives: - fresh cold cache + working CLI ← memo not needed - stale cache + CLI timeout ← stale-while-revalidate path - cache wiped + CLI down ← memo overlay (proven live) - working CLI, promoless response ← memo overlay (the new fix) Live proof: cache wiped, all 5 known `cli.js` bins renamed to `.disabled`, render still emits the 3-line output with promo on line 1. ## Tests: 58 → 60 in funnel suite, 66 → 68 total Pinned in the generator template: - 3-line ordering (promo push before header push before ops push) - PROMO_MEMO_FILE + readPromoMemo + overlayMemoPromo helpers exist - overlay is called on every code path (spot-checked by call count) Co-Authored-By: RuFlo <ruv@ruv.net> * fix(statusline): 3-line order — RuFlo header · ops · promo (top-to-bottom) Per user preference: RuFlo header must be line 1 (not the promo/disclosure row). Reordering the render: Line 1 — Header (▊ RuFlo · git · model · timing · ctx · cost) Line 2 — Ops (Swarm · Hooks · 🧠 · 💾 · Health) Line 3 — Promo (funnel disclosure / educational tip / sponsor) Promo stays within the visible 3-line viewport so Claude Code doesn't truncate it with the system-guidance line. Memo + stale-while-revalidate safety net from the previous commit is unchanged — promo remains visible even when the CLI returns a promoless response. Test invariant updated to pin the new order (header push < ops push < promo push in the generator source). 68/68 tests still pass. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(statusline): underline the promo label as a clickable CTA The sponsor / disclosure row currently reads as flat text — users don't know it's clickable. Two visual affordances added: 1. ANSI underline ([4m / [24m) on the label portion so terminals show it as a clickable link even when they don't render OSC 8 hyperlinks (a universal cue: underline = interactive text). Combined with the existing OSC 8 wrap, modern terminals get a real hyperlink; legacy terminals get a visual affordance. 2. The trailing "· disable: ruflo funnel disable" instruction now renders dim + non-underlined + outside the OSC 8 wrap. It reads as metadata ("here's how to turn it off") rather than as part of the link target (which would falsely imply that clicking anywhere on that text goes to Cognitum). Split happens on the exact anchor " · disable" — educational tips with no disable tail keep their whole text rendered plainly (no underline, no OSC 8, since they have no URL). Test locks the split-and-underline pattern in the generator template so a future refactor that reunifies the row trips CI. 60 → 61 funnel tests · 68 → 69 total. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(funnel): ADR-308 event transport + Cloud Function reference impl Phase 2 client-side telemetry + reference server. Wires the funnel event queue (v3/@claude-flow/cli/src/funnel/events.ts already exists) to the Cognitum analytics endpoint via a fail-silent HTTP batcher, plus an out-of-band credit-exhaustion notifier. ## Client transport (v3/@claude-flow/cli/src/funnel/event-transport.ts) ADR-308 contract: - POST /v1/events with Idempotency-Key header (UUIDv4 per batch) - Consent-gated: zero network activity when `telemetry` consent is off - Bounded batches (MAX_BATCH = 100), exponential backoff on failure, capped at 30x base interval (~30 min) - 4s POST timeout — telemetry never stalls the CLI - Rejects non-https endpoints inside the transport (defense in depth on top of the client-side allowlist) - Credit-exhaustion detection: 402 response OR body containing the exact ADR-303 machine-readable code triggers the notifier ## Credit notifier (v3/@claude-flow/cli/src/funnel/credit-notifier.ts) Persistent user-visible flag at ~/.ruflo/credit-status.json: - markCreditExhausted() — idempotent, stable `since` timestamp - clearCreditStatus() — stamps `cleared`, drops the exhausted flag - creditExhaustedNotice() — user-facing single line with humanized age - readCreditStatus() — inspector for status/tools ## Server reference (services/cognitum-analytics/) Cloud Function reference implementation: - index.js — POST /v1/events handler, Firestore writes to funnel_events + funnel_aggregates + funnel_credit + funnel_idem collections - package.json — Node 22 + functions-framework + Firestore SDK - deploy.sh — gcloud CLI deploy (gen2, us-central1, 402-on-cap ceiling) - sample-batch.json — fixture for smoke tests - README.md — layout, local run, deploy, verification DEPLOY IS HUMAN-DRIVEN. The autonomous loop does not run deploy.sh — that requires a live gcloud session with cloudfunctions.admin on cognitum-20260110 and is outside the hard-fence for automated actions. Everything up to the deploy is scripted; the human runs `./deploy.sh` when ready. ## Tests: 68 total funnel tests (61 → 68, +7 new) - Transport defaults (https + batch cap + backoff floor + timeout ceiling) - No-consent no-op (zero network activity) - Non-https endpoint rejected inside transport - markCreditExhausted idempotence (stable `since`) - clearCreditStatus stamps `cleared` - creditExhaustedNotice humanized age copy - Null return when not exhausted (no false surface) Co-Authored-By: RuFlo <ruv@ruv.net> * feat(funnel): funnel.ruv.io domain mapping for analytics endpoint The cognitum-analytics Cloud Function is now deployed on cognitum-20260110 and reachable at funnel.ruv.io/v1/events (Cloud Run domain mapping) as well as the raw Cloud Run URL. The client's DEFAULT_ENDPOINT points at the ruv.io subdomain so it: 1. survives Cloud Run hostname-hash changes on redeploy, 2. keeps analytics attribution on rUv's own domain (not cognitum.one, which is a separate product surface), 3. reads honestly to users: telemetry for the OSS CLI lives with the OSS author, not with the cognitum.one commercial product. DNS is a Cloudflare CNAME funnel.ruv.io → ghs.googlehosted.com, unproxied so Cloud Run terminates TLS directly. README documents the recreate-from-scratch flow using the CLOUDFLARE_API_TOKEN in Secret Manager on cognitum-20260110. Live infrastructure state: - Cloud Function cognitum-analytics deployed us-central1, revision 00001 - Firestore collections funnel_events / funnel_aggregates / funnel_credit / funnel_idem writing on first accepted batch - Smoke test at deploy time returned {"ok":true,"accepted":1} - Domain mapping created, DNS resolving, cert provisioning pending (Cloud Run polls hourly) Co-Authored-By: RuFlo <ruv@ruv.net> * docs(adr-311): funnel analytics — server-side split to dedicated repo Server implementation of the ADR-308 /v1/events endpoint has been extracted to its own repo: github.com/cognitum-one/ruflo-funnel-api Reasoning captured in ADR-311: - Commercial-side changes (rate limits, tenant model, BigQuery export) don't churn the OSS CLI PR history. - ADR-308 client contract remains the single source of truth for the wire format; the server can be forked or swapped without touching the CLI. - Server security surface (Firestore rules, IAM, key rotation) belongs with whoever runs the endpoint, not tangled with CLI release cadence. Also captures the concrete deployment decisions that came out of standing up the endpoint against cognitum-20260110: - Runtime: Cloud Function gen2, Node 22, us-central1, 256 MiB - Domain: funnel.ruv.io (Cloud Run mapping, Cloudflare CNAME unproxied) - Storage: 4 Firestore collections (funnel_events / _aggregates / _credit / _idem) with ADR-309 retention rules - Credit signal: HTTP 402 + body 'COGNITUM_CREDIT_EXHAUSTED' wires directly into the ADR-303 recovery surface via credit-notifier.ts services/cognitum-analytics/ in this repo is now a pointer README to the dedicated repo; the four source files were verbatim-committed as the initial commit there. Live-verified 8/8 API contract tests + Firestore writes across all 4 collections at time of adoption. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(funnel): remote-served message rotation + agentics.org sponsor + settings command Three linked changes to the funnel rotation surface. ## Remote-served messages (ADR-311 amendment) New client transport `message-transport.ts`: - GET https://funnel.ruv.io/v1/messages (raw: https://cognitum-analytics-63rzcdswba-uc.a.run.app/v1/messages) - 6h TTL local cache at ~/.ruflo/funnel-messages-cache.json - Every fetched message validated through ADR-301 isValidMessage() — schema, host allowlist, control-char strip, 80-col cap — before it can display - Best-effort: fetch failures leave cache intact; no network call blocks render (fire-and-forget from rotation.selectMessage) - Kill switch: RUFLO_FUNNEL_MESSAGES=0 or RUFLO_FUNNEL=0 - Bounded cache: ≤ 128 KiB, ≤ 200 messages - Non-https rejected at builder AND host allowlist (defense in depth) New pool merger `eligibleMessagesFromPools()` in messages.ts: - Remote pool authoritative (admin edits without a CLI release) - In-code pool fallback (cold starts, API-down, kill-switched) - Dedup by `id` — remote wins over in-code for the same id Rotation kicks a background refresh on every selectMessage() call so the first fresh render after CLI startup lands within seconds. ## Server side (cognitum-one/ruflo-funnel-api@521205a) - Added GET /v1/messages handler (single router by req.path in the same function; POST /v1/events unchanged) - Firestore collection funnel_messages with { id, class, text, url?, active } - Cache-Control: public, max-age=21600 for CDN + client caches - Firestore seeded with 23 initial messages (via seed-messages-rest.sh): 16 educational (ruflo tips + tricks) 4 promotional Cognitum 3 promotional agentics.org - Verified live: 200 OK, 23 messages, all 0 rejected by client pipeline ## Copy discipline + settings command - ALLOWED_URL_HOSTS + PROMO_LINK_HOSTS gain agentics.org (both wire layers need it for OSC 8 to render the link) - DISCLOSURE_TEXTS copy: "· disable: ruflo funnel disable" → "· manage: ruflo settings" — user-facing command surface no longer leaks the internal "funnel" term - New `ruflo settings` command (settings.ts) as a friendly wrapper over the existing funnel primitives: ruflo settings Overview + current state ruflo settings notices status Notices row state ruflo settings notices off Turn off (persistent) ruflo settings notices on Re-enable ruflo settings notices id Pseudonymous notices ID - getPromoRow split anchor moved from " · disable" → " · manage" (so only the linked label is OSC 8 wrapped, tail stays dim/plain) ## Tests: 68 → 76 (+8) - Every disclosure variant: no `\bfunnel\b`, contains `manage`, contains `ruflo settings`, ≤ 80 cols, Cognitum-attributed - Split anchor in generator: " · manage" (not " · disable") Co-Authored-By: RuFlo <ruv@ruv.net> * feat(funnel): impressions + click tracking + coarse geo (ADR-311 amend) Adds the analytics coverage that PR #2622's initial funnel work deferred: impressions, clicks, and coarse geo. Consent-gated end-to-end; nothing new about privacy — same closed vocabulary, same daily-bucket timestamps, same pseudonymous UUID discipline. Wired against the live Cloud Function on cognitum-20260110 + Firestore. ## Client — impression firing + click-tracked URLs - FunnelEventName vocabulary gains `promo_impression` + `promo_open` (matches server; ADR-305 amendment recorded in ADR-311 §6) - FunnelEvent schema gains optional `messageId` (≤ 64 chars, [a-z0-9-]) — the join key across impression → click → conversion - recordFunnelEvent() accepts an options object for `messageId` + `now` (backwards-compat with the Date positional form) - rotation.selectMessage() fires `promo_impression` for the selected message on every render — consent-gated, batched via existing transport - attribution.clickTrackedUrl() wraps promotional URLs in the server-side click-redirect so `promo_open` fires before the browser leaves. Disclosure/educational rows still use attributionUrl direct (no click tracking on disclosure) - promo.ts uses clickTrackedUrl for `msg.class === 'promotional'` ## Server (cognitum-one/ruflo-funnel-api@37f584b — deployed live) - KNOWN_EVENTS gains promo_impression + promo_open - validEvent() accepts optional messageId via MESSAGE_ID_RE allowlist - New `GET /v1/click/{messageId}?to=<https-url>` handler: - messageId validated against MESSAGE_ID_RE (prevents path-traversal or forged doc lookups) - `to` must be https AND host must be in CLICK_ALLOWED_HOSTS (cognitum.one + agentics.org variants — compiled in, not Firestore-editable; no open-redirect vector) - Coarse geo from CF-IPCountry / X-Appengine-Country (ISO-3166 alpha-2 country ONLY — never city, never lat/long; ADR-309 privacy invariant) - Firestore write: funnel_events doc + funnel_aggregates row keyed by (surface, event, day, release, messageId, country) - Firestore hiccup NEVER blocks the redirect — user intent > analytics - 302 with Cache-Control: no-store so aggregators see every click - Router extended to match /v1/click/{msgId} paths ## Verified live at commit | Test | Result | |---|---| | Click w/ good target + fake CF-IPCountry:US | 302 → cognitum.one; Firestore captured US | | Click w/ non-allowed target (evil.com) | 400 DISALLOWED_TARGET | | Click w/ http:// target | 400 DISALLOWED_TARGET | | Click w/ `..` path traversal | 405 (routed as method-not-allowed) | | POST promo_impression event | 200 accepted:1 | | POST promo_open event | 200 accepted:1 | | POST event w/ malformed messageId | 200 accepted:0 dropped:1 | Firestore verified: promo_open with `country: US`, `via: click-redirect`, `messageId: promo-cognitum-meta-llm`. Aggregate row present with `count: 1` keyed by messageId+country. ## Coverage summary (ADR-311 §8) - Impressions per message per day: `promo_impression` events + aggregates - Clicks per message per day: `promo_open` events + aggregates - CTR: ratio of the two above - Geo distribution: `country` field on `promo_open` - Conversions: existing `signup_opened` / `account_created` / `proxy_activated` - Notices disabled rate: existing `funnel_disabled` Zero PII, zero prompt content, zero paths — everything remains closed enum, allowlisted message id, ISO country code, or daily bucket. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(statusline): style "ruflo settings" as bold command, not a dead link User feedback: "the area don't link to anything, manage: ruflo settings" — clarified they expected "manage: ruflo settings" to be clickable/actionable. It can't be a real link: a terminal has no safe way to execute a shell command from a click — that would let any server-served promo message run arbitrary commands on the user's machine. So instead of leaving it looking like inert plain text (which reads as broken/half-finished), it now gets its own visual treatment: ✨ <label, underlined + OSC 8 link> · manage: <ruflo settings, BOLD> - "manage: " stays dim (a connector word, no action implied) - "ruflo settings" renders BOLD, deliberately WITHOUT underline or OSC 8 — bold signals "this is the important bit, copy/type it" without the false affordance of "click me" that underline would carry Split changed from `text.indexOf(' · manage')` to the more precise `text.indexOf(' · manage: ')` so the exact command substring can be isolated for its own styling. getPromoRow() now returns three concatenated segments instead of two: label(+OSC8), dim connector, bold command. Test updated to assert: label sandwiched in UL_ON/UL_OFF + OSC8, connector in DIM_ON/DIM_OFF, command in BOLD_ON/BOLD_OFF, and — critically — that the command is NEVER wrapped in underline or safeTerminalLink (regression guard against accidentally making a "command" look clickable again). Verified via hex dump of the live render: ESC[1m immediately before "ruflo settings", ESC[22m immediately after, no ESC[4m or OSC 8 escape anywhere near it. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(funnel): use raw Cloud Run URL until funnel.ruv.io cert lands funnel.ruv.io's TLS cert has not yet provisioned (Cloud Run domain mapping created 2026-07-10 18:33 UTC; Google's cert issuance is async and still pending as of this commit — verified: curl to funnel.ruv.io returns curl exit 35 / HTTP 000, raw Cloud Run URL returns 200). Every client fetch to messages/events/click was silently timing out (by design — fail-silent), so: - the remote 23-message pool never reached any installed CLI - message-transport's cache file never got created - rotation only ever showed the 3 static in-code disclosure variants All three endpoint defaults now point at the raw Cloud Run URL: https://cognitum-analytics-63rzcdswba-uc.a.run.app/v1/{events,messages,click} Marked TEMP in comments. Flip back to funnel.ruv.io once its cert is live (monitor: curl -o /dev/null -w '%{http_code}' https://funnel.ruv.io/v1/messages). ## Live verification performed this commit 1. Forced message-pool refresh — 23/23 messages accepted, 0 rejected 2. Selected messages across 8 consecutive 20s rotation slots — 8 distinct ids returned (7 educational + 1 promotional), confirming rotation moves 3. Impressions queued locally (8/8), consent-gated 4. Flushed queue to live server — 8/8 accepted, queue drained to 0 5. Fired the click-redirect for the selected promotional message with a forged CF-IPCountry: CA header — 302 to agentics.org with UTM+fid intact 6. Firestore confirmed both events landed: promo_impression messageId=promo-agentics-community promo_open messageId=promo-agentics-community country=CA via=click-redirect 7. Total promo_impression docs in funnel_events: 9 (8 new + 1 prior) Co-Authored-By: RuFlo <ruv@ruv.net> * feat(funnel): zero local promo content — fully remote-served, fail-closed Per explicit direction: no local promo content or URLs should ship in the CLI at all. This completes the ADR-311 remote-message architecture: disclosure text, educational tips, and promotional messages are now ALL served exclusively from the Cloud Function / Firestore feed. If the feed is unreachable and no prior fetch has succeeded, the promo row renders nothing — there is no local fallback content to degrade to. ## What changed - messages.ts: MESSAGES array emptied to []. Zero message text/URLs ship in the package. isValidMessage() extended to accept a new 'disclosure' class alongside educational/promotional, with an invariant that disclosure-class text must retain the exact " · manage: ruflo settings" tail (dropped, never repaired, if missing). - types.ts: FunnelMessageClass extended to 'educational' | 'promotional' | 'disclosure'. - disclosure.ts: removed the hardcoded DISCLOSURE_TEXTS/DISCLOSURE_TEXT/ DISCLOSURE_SPONSOR_URL constants and selectDisclosureText(). Replaced with selectDisclosureMessage() — deterministic 5-min-slot selection over the remote pool filtered to class==='disclosure', returning null when that pool is empty (cold start / API down). The disclosure state MACHINE (never_seen / disclosed_enabled / disclosed_disabled tracking) stays 100% local — that's app state, not promo content. - promo.ts: getFunnelPromo() now sources the disclosure row from selectDisclosureMessage(); returns null (fail-closed) when unavailable. Also wires the previously-defined-but-never-fired 'disclosure_shown' event so disclosure impressions are now tracked alongside promo_impression. - statusline-generator.ts: PROMO_LINK_HOSTS gains the click-redirect hosts (funnel.ruv.io + the raw Cloud Run hostname) — these are DIFFERENT from the final-destination hosts (cognitum.one/agentics.org); without this the renderer's independent host-allowlist check correctly refused to OSC-8- wrap click-tracked URLs, which was silently breaking every clickable link this session had just added. ## Server (cognitum-one/ruflo-funnel-api@698aa73 — deployed live) - All 16 educational tips now carry url: https://cognitum.one and a trailing 🔗 glyph (checked to fit the 80-col bound, max observed 78/78). - 3 disclosure-class messages seeded (disclosure-1/2/3), matching the copy this session iterated on, now server-authoritative instead of hardcoded. - promo.ts routes EVERY message with a url (not just class==='promotional') through the server click-redirect, so click tracking is uniform across the whole rotation. - Firestore funnel_messages collection: 26 total (16 educational + 7 promotional + 3 disclosure), all verified live via GET /v1/messages. ## Verified live end-to-end - GET /v1/messages returns 26 messages, 16/16 educational have url set. - Rendered statusline shows a real educational tip (edu-doctor) with a working OSC 8 hyperlink to the click-redirect, underline, 🔗ical suffix. - Click-redirect → 302 to cognitum.one with UTM + fid intact; Firestore captured both promo_impression and promo_open for the same messageId. - Fail-closed proven via test: selectMessage()/selectDisclosureMessage()/ getFunnelPromo() all return null when the remote cache is unseeded. ## Tests: 68 → 70 funnel (78 total incl. drift-guard), all green - New: "ships ZERO local messages" pins MESSAGES === []. - New: disclosure-class validation (manage tail required). - New: 3 fail-closed tests (selectDisclosureMessage / selectMessage / getFunnelPromo all null on unseeded cache). - Rewrote disclosure-variant + promo-orchestrator tests to seed a mock remote cache (matching message-transport.ts's on-disk shape) instead of asserting against removed local constants. Co-Authored-By: RuFlo <ruv@ruv.net> * docs(adr-312): usage-limit downtime prevention — researched, phased plan Direct instruction was to review Claude Code's actual CLI source (not just docs) to determine feasibility of detecting approaching/hit usage limits and surfacing a Cognitum meta-LLM proxy CTA as a downtime- prevention / session-extension mechanism. ## Research performed (grounded against @anthropic-ai/claude-code@2.1.107) Inspected /usr/lib/node_modules/@anthropic-ai/claude-code/cli.js directly. Findings: 1. A real internal rate-limit state object exists (module var, referred to in the ADR by its minified name since it will rename on any version bump): { status: allowed|allowed_warning|rejected, resetsAt (epoch sec), rateLimitType: five_hour|seven_day|seven_day_opus| seven_day_sonnet|overage, utilization (0-1 float), unifiedRateLimitFallbackAvailable, isUsingOverage }. 2. It's sourced from REAL Anthropic API response headers (anthropic-ratelimit-unified-status/-reset/-fallback/-{type}- utilization etc.) — confirmed via string match in the bundle. The exact "You've used N% of your session limit · resets HH:MM" banner text is generated from this exact object by a UI-only formatter. 3. This state is NOT exposed through any current extension point — checked exhaustively, empirically: - statusLine stdin JSON: confirmed absent (only model/context_window/ cost fields exist — verified against ruflo's own parser) - Hook events: 28 hook names exist, none confirmed to fire on rate-limit transitions - Debug logs: EMPIRICALLY checked an existing 11,424-line debug log at default level — zero occurrences of any rate-limit header - No CLI command / MCP resource surfaces it - The only consumer is an internal React hook wired to Claude Code's own TUI, unreachable from outside its process ## Decision: 3-phase plan - Phase 0 (buildable now): manual/self-reported flag — `ruflo settings notices rate-limited` — reusing the exact credit-notifier.ts pattern from ADR-303/311. Honest that this is user-reported, not detected. - Phase 1 (blocked on upstream): file a Claude Code feature request to expose the real signal via statusLine JSON or a new hook event. Explicitly does NOT recommend building against the current minified internal names — fragile, version-coupled, would silently break. - Phase 2 (once Phase 1 lands): wire the real signal into rotation with a priority override analogous to ADR-303's credit-exhaustion surface; new closed-vocabulary events rate_limit_warning_shown / rate_limit_exhausted_shown; same consent-gated click-tracking as every other promo message. No code changes in this commit — ADR only, per the explicit request. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(funnel): sponsored-downtime capacity via cognitum-one/meta-proxy (ADR-312/313) ADR-312 documents grounded research into detecting an approaching/hit Claude usage limit: direct inspection of the installed Claude Code CLI (v2.1.107) found the rate-limit state is populated from response headers (anthropic-ratelimit-unified-status/-reset/-fallback/-*-utilization) that are NOT exposed to hooks, the statusline JSON, or the debug log today (confirmed by grep — zero occurrences in an 11k-line debug log). Automatic detection is blocked on Anthropic exposing this state; documents a 3-phase plan (manual flag now, wait on upstream, auto-wire once available). ADR-313 implements Phase 0: a manually-set rate-limit flag (`ruflo settings notices rate-limited [--clear]`) that, once set, preempts normal promo rotation with a sponsored-capacity CTA — same precedent as ADR-303's credit-exhaustion override. Two states depending on consent: an enable CTA, or a quiet "active" confirmation once `ruflo proxy sponsor-enable --yes` has been run. Client-side (this commit): - funnel/rate-limit-notifier.ts — TTL'd flag read/write/clear, mirrors credit-notifier.ts's shape - funnel/promo.ts — priority-override hook, reachable only after the disclosure invariant is satisfied (ADR-301 compliance preserved) - commands/proxy.ts — sponsor-enable/disable/status/clear subcommands; writes both the consent receipt (source of truth) and a mirror flag into ~/.ruflo/proxy-config.toml, the file the Rust proxy binary reads - funnel/types.ts, consent.ts, events.ts — new 'sponsored-downtime' consent domain and sponsor_mode_enabled/disabled/capacity_exhausted events - 10 new tests (rate-limit notifier + priority override), 80/80 passing Server-side (separate private repo, already built/tested/pushed): cognitum-one/meta-proxy — Rust/axum binary routing local/cloud/sponsored data planes, per-user bearer token, loopback-only bind by default, never falls back to sponsored capacity implicitly. Verified end-to-end: the Rust binary correctly reads the same ~/.ruflo/proxy-config.toml this commit's `sponsor-enable` command writes. * docs(adr-313): addendum — proxy needed /v1/messages, not /v1/chat/completions Verification found the shipped meta-proxy scaffold spoke the wrong wire protocol for Claude Code (OpenAI chat-completions instead of the Anthropic Messages API Claude Code actually POSTs to). Fixed in cognitum-one/meta-proxy and verified live end-to-end with the real installed Claude Code CLI against the live apicompletions Cloud Run service. Documents the fix and the remaining gap (no automated sponsored-key provisioning yet). * docs(adr-313): addendum — fourth Passthrough plane preserves subscription usage Setting the env vars needed to reach the proxy at all previously meant giving up subscription-based auth entirely, all the time, not just when rate-limited. Documents the new default Passthrough plane (real Anthropic via the user's own OAuth token, read-only from Claude Code's own credentials file) and the live verification of all four planes switching correctly within one continuous session. * fix(statusline): trailing blank line so the input prompt gets breathing room The statusline's last row butted directly against Claude Code's input prompt with no visual separation. generateStatusline() now returns lines.join('\n') + '\n', so combined with console.log's own trailing newline the rendered output ends in exactly one blank line. Regenerated both committed .claude/helpers/statusline.cjs copies (root + package) so the drift-guard test stays in lockstep. Two new tests: a source-level pin on the generator (can't silently regress) and a runtime check on the actual rendered bytes (exactly one blank line — not zero, not two). * fix(helpers): re-sign manifest for the statusline trailing-newline fix The earlier statusline fix ( |
||
|
|
de01ccd544 |
chore(release): 3.25.6 — main-red CI unblock + Cursor hook + #2612 heal
Ships to @claude-flow/cli@3.25.6, claude-flow@3.25.6, ruflo@3.25.6 (latest + alpha + v3alpha all pointed at 3.25.6). Fixes bundled in this release: - #2613 fix(hooks): PreToolUse hook emits valid JSON verdict so Cursor's third-party hook import does not fail-close every Bash/Edit tool call. - #2608 fix(federation): plugin-agent-federation shim types synced with agentic-flow@2.0.12-fix.8 signatures; guard optional close() — fixes Build V3 red on main across all 3 platforms. - #2608 fix(ci): indirect optional-dep imports in @claude-flow/cli (@ruvector/learning-wasm, @ruvector/attention, @metaharness/router) so install-safety builds compile clean when the optional deps are absent. - #2590 resolved as a consequence of the above — the Node 24 pnpm+memory Smoke path re-ran clean once plugin-agent-federation stopped failing. - #2578 witness marker + regression guard already correct on main; #2578 residual is external-verifier scope. - #2561/ADR-150 reconciliation — smoke #16 (ruflo-metaharness) rewritten to enforce the correct ADR-150 rule #2 invariant (no metaharness in ruflo hard dependencies) instead of demanding metaharness PRESENCE, removing the mutual exclusion against guard #2561's RUFLO_MAX=0. - #2612 fix(init): heal duplicate MCP registrations (`claude-flow` + `ruflo` for the same binary) via doctor detection rather than by renaming the canonical key. Canonical MCP key STAYS `claude-flow` to preserve the ~166 plugin tool references to `mcp__claude-flow__*` (#2206). Ruflo doctor now surfaces "Duplicate Ruflo MCP registrations found" with an actionable fix-message pointing operators at the correct entry to remove. Signed helpers manifest re-generated for the new version (Ed25519, verify-helpers OK). All 726 CLI tests pass locally. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
defd71f301 |
chore(release): 3.25.4 — re-sign helpers manifest (closes #2593) (#2603)
3.25.3 shipped with the pre-existing stale helpers.manifest.json (frozen at 3.23.0) because the GCP signing secret wasn't accessible from the publish env. 3.25.4 is a metadata-only patch that ships a properly-signed manifest matching the 3.25.4 package version, closing the #2593 loop. No source or dependency changes. |
||
|
|
11f34ec947 |
chore(release): 3.25.3 — 10 fixes + CI guards (#2602)
* fix(ci): neural status ReasoningBank row shows Empty despite persisted patterns (#2575) Derive the Status cell from the same count Details displays so the label matches the number (7798 patterns → Active) instead of the stale in-memory handle. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): default memory store --upsert=true to fix store→delete→store UNIQUE violation (#2594) memory_entries has UNIQUE(namespace, key) that does not exclude soft-deleted rows, so a store→delete→store cycle reliably hits UNIQUE constraint failed when --upsert defaults to false. storeEntry() already honors upsert via INSERT OR REPLACE; flipping the CLI default closes the footgun without touching schema or plumbing. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): remove reverse-substring collision in GAIA isAnswerCorrect (#2566) The reverse check normExpected.includes(normModel) scored fragmentary model answers as correct whenever they normalized to any substring of the expected answer (e.g. "a" vs "Paris, France" → true), inflating GAIA scores via normalization collision. ADR-169 R1 forbids this vector. Forward-substring and numeric-tolerance paths remain. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): skip onnxruntime-node postinstall to unblock v3 memory smoke (#2590) onnxruntime-node's postinstall fetches a GPU nupkg from nuget.org which ETIMEDOUTs from GitHub runners, taking pnpm install down. Skip it via neverBuiltDependencies (CPU prebuilds ship in the npm tarball, so runtime is unaffected) and pass --ignore-scripts in the memory smoke workflow as a belt-and-braces safety net. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): drop verifyMemoryInit writeback that races better-sqlite3 handle on Windows (#2596) sql.js verification holds an in-memory DB copy; writing it back via atomic rename fights the open better-sqlite3 WAL handle owned by ControllerRegistry / repairVectorIndexes, producing EPERM on Windows. Verification is read-only — close and discard the copy instead. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): auto-heal doctor Learning Bridge sidecar on plain run (#2599) Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): prune CLI optionalDependencies to fix cold npx timeout (#2561) Cold `npx -y @claude-flow/cli@alpha --version` (and the ruflo wrapper) timed out because npm had to resolve and place ~30 optional deps before Node ever ran the in-process --version fast-path in bin/cli.js. Trim optionalDependencies to the 5 actually used by the default CLI path (agentdb, ruvector, agentic-flow, @claude-flow/memory, @claude-flow/security); everything else is already gated behind try/require or the plugins-store lazy-install path. Mirror the pruning in the ruflo wrapper. Add a pre-warm npm install step in verification-pipeline.yml as defense-in-depth. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): align ruflo-hook.cjs npx fallback with .sh dist-tag (#2600) The three shipped .cjs Windows shims hardcoded ruflo@latest while the bash shim used ruflo@alpha, breaking the "mirrors ruflo-hook.sh" contract from #2132. Point all three .cjs shims at ruflo@alpha and extend the smoke test with a static parity assertion so future drift fails CI. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): replace phantom agentic-flow/transport/loader marker in ADR-104 witness (#2578) Co-Authored-By: RuFlo <ruv@ruv.net> * fix(ci): re-sign + verify helpers manifest in prepublishOnly (#2593) Manifest drift (intelligence.cjs was bumped in 3.24/3.25 but the manifest still carried the 3.23.0 hash) triggered writeCriticalHelpers' fail-closed tamper warning on every CLI run in stamped projects. Root cause: sign-helpers.mjs existed but was never wired into publish. This wires sign+verify into prepublishOnly so drift fails the release, not every user. Co-Authored-By: RuFlo <ruv@ruv.net> * test(2590): guard against regression of #2590 Adds a CI guard step to the memory-smoke job that fails fast if either part of the #2590 fix regresses: 1) v3/package.json drops "onnxruntime-node" from pnpm.neverBuiltDependencies 2) the memory-smoke pnpm install loses --ignore-scripts Either regression would let onnxruntime-node's postinstall fetch a GPU nupkg from nuget.org and ETIMEDOUT on GitHub runners, taking pnpm install down as it did on main. Co-Authored-By: RuFlo <ruv@ruv.net> * test(2594): guard against regression of #2594 Co-Authored-By: RuFlo <ruv@ruv.net> * test(2561): guard against regression of #2561 Co-Authored-By: RuFlo <ruv@ruv.net> * test(2593): guard against regression of #2593 Co-Authored-By: RuFlo <ruv@ruv.net> * test(2596): guard against regression of #2596 Adds a vitest regression test asserting verifyMemoryInit() does not modify the on-disk DB file — snapshots bytes+mtime before, calls verify, asserts unchanged after. Fails if the sql.js writeback is re-added (bytes change from re-serialization, mtime bumps), passes on the fix. Co-Authored-By: RuFlo <ruv@ruv.net> * test(2566): guard against regression of #2566 Locks in the removal of the reverse-substring branch in isAnswerCorrect() (v3/@claude-flow/cli/src/benchmarks/gaia-agent.ts). The reverse rule `normExpected.includes(normModel)` scored fragmentary model answers (e.g. "a") as correct against any longer expected answer that contained them ("Paris, France"), inflating GAIA scores via normalization-collision — the vector ADR-167/169 R1 forbid. Verified: FAILS if the reverse-substring branch is reintroduced, PASSES on the current fix. Co-Authored-By: RuFlo <ruv@ruv.net> * test(2578): guard against regression of #2578 Co-Authored-By: RuFlo <ruv@ruv.net> * test(2599): guard against regression of #2599 Co-Authored-By: RuFlo <ruv@ruv.net> * chore(release): 3.25.3 — 10 fixes + CI guards Bumps @claude-flow/cli, claude-flow (umbrella), ruflo (wrapper) to 3.25.3. Regens v3 pnpm-lock.yaml after optionalDependencies pruning (#2561) and neverBuiltDependencies additions (#2590). Fixes included: - #2561 npx cold-install timeout — pruned CLI optionalDependencies - #2566 GAIA isAnswerCorrect reverse-substring collision - #2575 neural status ReasoningBank Empty vs 7798 patterns display - #2578 ADR-104 phantom agentic-flow/transport/loader witness marker - #2590 CI Node24/ubuntu memory smoke — onnxruntime-node postinstall block - #2593 helpers.manifest.json auto-refresh — verify + sign in prepublishOnly - #2594 memory store UNIQUE violation — flip --upsert default to true - #2596 memory init Windows EPERM — drop sql.js writeback race - #2599 doctor Learning Bridge — self-heal via recordMemoryPackagePath - #2600 Windows shim dist-tag parity — align @alpha across all shims CI guards added per fix. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
3641cb70fc |
chore(release): 3.25.2 — AgentDB atomic flushes + backup auto-restore (#2584)
Data-durability fix for AgentDB (sql.js) 'database disk image is malformed' under torn/concurrent full-image flushes (#2585): - Atomic writes (temp -> fsync -> rename) for every full-image DB flush. - Backup auto-restore on malformed open when the in-place rebuild salvages nothing — total loss becomes automatic recovery. Additive, fail-closed, zero-regression. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3 |
||
|
|
5727bf02b8 |
chore(release): 3.25.1 — de-Lattice the WASM embedder tier + enforceable no-stub mode
#2582: renamed the fictional 'Lattice' embedder tier to an honest opt-in generic WASM-embedder seam (no 404 default package; inert unless RUFLO_EMBED_WASM_PKG is set), and added RUFLO_REQUIRE_REAL_EMBEDDINGS strict mode that makes hash last-resorts throw instead of silently returning meaningless vectors. Additive, fail-closed, zero-regression (embeddings still resolve to ruvector ONNX). Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3 |
||
|
|
f71ffa2f99 |
chore(release): 3.25.0 — anti-overfitting (frozen human eval + red/blue deltas + clean-room replay) + Lattice WASM primary embedder tier
Batches #2580 (frozen public human-labeled eval set, per-generation human-relevance deltas, clean-room replay acceptance test) and #2581 (Lattice WASM as the primary, fail-closed, model-capable embedder tier ahead of ruvector-ONNX → hash). All additive + backwards-compatible. Published @3.25.0 across all three packages. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3 |
||
|
|
2ed7f7fa66 |
chore(release): 3.24.0 — self-learning flywheel (ADR-176/177)
Merged #2572: self-optimizing harness flywheel that autonomously compounds verified retrieval-policy improvements into a signed, replayable lineage (shadow-first, meta-learning, drift-canary), + signed RVFA proven-config propagation to installs. All three packages published at 3.24.0. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3 |
||
|
|
05c5545126 |
chore(release): 3.22.0 → 3.23.0 (nightly vector-DB backup)
WAL-safe memory DB backup: services/memory-backup.ts, 'memory backup' CLI, daemon nightly 'backup' worker, rotation + optional GCS offsite. Minor: additive. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
1bbdeb9e5f |
chore(release): 3.21.1 → 3.22.0
Memory distillation self-learning loop (ADR-174) + page-agent browser intent (ADR-175) + failure-signal capture + version-stamped helper auto-refresh with Ed25519 signed provenance (GCP Secret Manager). Minor: all additive. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
cc354c6e27 |
chore(release): 3.21.0 → 3.21.1 (memory-search recall #2558 + init self-learning #2545)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
a5a48fafba |
chore(release): 3.20.0 → 3.21.0 (agenticow governed loop, ADR-170..173)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
d0e77d8447 |
chore(release): 3.19.0 → 3.20.0 (training flywheel + ruvllm 2.6.0)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
66ba809250 |
feat(neural): training flywheel + @ruvector/ruvllm 2.6.0 (resume, val-split, checkpoint auto-load) (#2557)
* feat(neural): training flywheel — val-split, resume, checkpoint auto-load Build on v3.19.0's native TrainingPipeline routing with four features that close the train→route learning loop: 1. `neural train --val-split <frac>` (default 0.1, 0 disables) — passed through as validationSplit; surfaces Best Val Loss + Early Stopped in the results table when a holdout ran (bestValLoss non-null). Normalizes the pipeline's Infinity (validation-off) sentinel to null so the "non-null ⇒ validated" contract holds. 2. `neural train --resume <path>` — prefers pipeline.resumeFrom() (>=2.6.0), falls back to loadCheckpoint() (2.5.7, weights-only, noted in the table). Missing/invalid checkpoint with an explicit --resume is a loud exit-1 failure (ResumeFailedError), never silent fresh training. Native-only: errors on --backend wasm or when the native module is absent. 3. Checkpoint auto-load (the flywheel) — new loadLatestCheckpoint(adapter) in lora-adapter.ts finds the newest .claude-flow/neural/lora-checkpoint-*.json under cwd, validates the envelope, and loads it via the adapter's existing loadCheckpoint. Wired into the routing LoRAAdapter singleton (getLoRAAdapter), which constructs lazily on first adaptation use — off the CLI-startup path (--help stays ~0.08s). Non-fatal; kill-switch CLAUDE_FLOW_NO_CHECKPOINT_AUTOLOAD=1. 4. `neural status` Training Pipeline row now appends the newest checkpoint filename + relative age (truncation-friendly, most-important-info-first). Tests: extend the #2549 suite (+6) — val-split passthrough, val-off ⇒ null, resume loud-failure + success, latestCheckpointInfo picks newest, kill-switch. All 12 green; ruvllm-integration + commands-deep (411) unaffected. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(neural): training flywheel + @ruvector/ruvllm 2.6.0 (resume, val-split, auto-load) Builds on the native training routing (3.19.0) with the 2.6.0 upstream: - --val-split <frac> (default 0.1): passes validationSplit; surfaces bestValLoss + earlyStopped when validation ran - --resume <checkpoint>: prefers 2.6.0 resumeFrom() (continues from restored epoch through config.epochs, LR scheduler fast-forwarded), degrades to 2.5.7 loadCheckpoint weight-restore; loud exit 1 on a missing checkpoint or --backend wasm combo - Checkpoint auto-load (the flywheel): getLoRAAdapter()'s lazy init loads the newest .claude-flow/neural checkpoint on first adaptation use — off the --help hot path (startup stays 0.08s), kill-switch CLAUDE_FLOW_NO_CHECKPOINT_AUTOLOAD=1, non-fatal on any failure - neural status Training Pipeline row shows latest checkpoint + age - Floors bumped >=2.6.0 (wrapper + root + v3 pnpm overrides); locks regenerated; dev tree resolves 2.6.0 E2E: train --val-split → checkpoint; train --resume → 10 native steps (continued from restored 5, not fresh). Tests 12/12, build clean. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
1155b42fa4 |
chore(release): 3.18.2 → 3.19.0 (native training pipeline routing)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
feb6ecb8d9 |
chore(release): 3.18.1 → 3.18.2 (native ruvllm checkpoints end-to-end)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
8547df9862 |
feat(neural): use @ruvector/ruvllm 2.5.7 native checkpoints end-to-end (#2549 follow-up) (#2555)
- Overrides floor @ruvector/ruvllm >=2.5.7 in ruflo wrapper + root npm overrides + v3 pnpm overrides (checkpoint persistence shipped in 2.5.7; agentdb's ^2.5.1 caret reaches it, the floors guarantee it) - LoRAAdapter.saveCheckpoint: mkdir the parent dir before both paths — the JS fallback's writeFileSync threw ENOENT on a missing dir and the catch silently returned false, so neural train's best-effort checkpoint never landed even when everything else worked - neural status: Training Pipeline row now reports checkpoint capability, version-gated via nativeCheckpointsSupported() (walks to the resolved package.json — ./package.json is not in ruvllm's exports) so it never advertises checkpoints against a <2.5.7 install - v3 pnpm lock regenerated (all importers resolve 2.5.7); removed a stale npm-installed @ruvector/ruvllm@0.2.4 real-directory from the pnpm tree that shadowed resolution since April Proven end-to-end: neural train writes .claude-flow/neural/ lora-checkpoint-<ts>.json (format ruvllm-checkpoint v1, 48KB). |
||
|
|
7770ce2ab6 |
chore(release): 3.18.0 → 3.18.1 (#2549 neural status fix)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
dc82e7f6af |
chore(release): 3.17.0 → 3.18.0 (review-driven upgrades + GAIA integrity family)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
d012042800 |
feat: review-driven upgrades — perf, security, SOTA capabilities (6-agent concurrent implementation) (#2547)
* chore(arch): untrack the prepublish plugin mirror — build artifact, not source
v3/@claude-flow/cli/plugins/ is regenerated by prepublishOnly from
plugins/ruflo-metaharness/ at publish time. Keeping it committed caused
silent drift between publishes (4 files diverged this week alone) and
every source edit required a manual mirror sync. npm pack still bundles
it — the files array + prepublish copy are unaffected by gitignore.
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(gaia): submission integrity checklist — fail-closed pre-submit audit (Berkeley RDI hardening)
Adds a 4-part integrity section to the gaia-validate pre-submit gate,
motivated by UC Berkeley RDI's 'Agents' Last Exam' (April 2026), which
gamed all 8 major agent benchmarks to near-100% without solving tasks.
- scripts/gaia-integrity.mjs: (A) answer-key-shaped path reads outside
the sanctioned dataset dir — FAIL-CLOSED exit 2; (B) eval()/new
Function()/exec-of-non-literal strings in gaia-bench runner code
paths — FAIL-CLOSED exit 2; (C) judge-prompt-injection markers in
produced answers/trajectories — WARN; (D) provenance stamp (results
+ git SHA + dataset content hash) written for gaia-submit to embed.
- --allow-integrity-override suppresses the exit code but records
'overridden: true' in the stamp — never silent.
- --self-test plants a fake answer-key read, an eval-of-task runner,
and injection markers in temp fixtures and proves fail-closed/pass/warn.
- gaia-validate.md: new check 7 documenting the checklist + flags.
- gaia-submit.md: package now embeds integrity.json under the Ed25519
witness manifest (tamper-evident attestation); stale/failed stamps block
packaging.
- smoke-gaia.sh: 3 new steps (script wired, self-test green, repo scan
clean); plugin bumped to 0.5.0.
Co-Authored-By: RuFlo <ruv@ruv.net>
* perf(cli): lazy ONNX embedder init + local-first ruvector resolution
Fix 1 — lazy ONNX init (measured, biggest win):
neural-tools.ts had a module-level try/catch with TOP-LEVEL AWAIT that ran
`await import('ruvector')` + `initOnnxEmbedder()` + a probe embed at import
time. Because mcp-client statically imports neural-tools, this added the
full ONNX startup to every CLI command. The block is now a memoized
`ensureEmbeddings()` (module-level promise guard) invoked from
generateEmbedding() and from the three handlers that report the provider
without embedding (neural_compress / neural_status / neural_optimize), so
degraded/fallback semantics and provider reporting are byte-identical.
The probe embed moved inside ensureEmbeddings() — it still guards the
ADR-086 type-load-success-but-runtime-fails trap, but only on first use.
Measured (warm, darwin-arm64):
node bin/cli.js --help 0.50s -> 0.09s
node bin/cli.js status 0.64s -> 0.24s
import(mcp-client.js) 438ms -> 30ms
"Loading ONNX model" no longer appears on non-embedding commands;
appears exactly once on first embed (neural_predict / memory search).
Fix 2 — ruvector pin + local-first resolution:
browser-session-tools.ts pinned `npx -y ruvector@0.2.25` while 0.2.27 is
what the package installs, forcing cold npx downloads of a second version
(4 per browser session). The pin is now 0.2.27 and a memoized
resolveLocalRuvectorCli() (createRequire + package.json bin walk) spawns
`node <local-cli>` directly, falling back to the npx pin only when no
local install exists.
While verifying the 0.2.27 subcommand surface (required before bumping),
found the trajectory-* flags passed here were never valid on 0.2.25 OR
0.2.27 (`--session-id/--task/--args/--verdict` vs the real
`--context/--agent`, `--action/--result`, `--success/--quality`) — every
trajectory call exited with commander "unknown option", same bug class as
the #2015 `rvf create --kind` fix documented in this file. Flags are now
mapped correctly; browser_session_record and browser_session_end verified
end-to-end (rvf create + trajectory-begin/step/end + rvf compact all pass).
Fix 3 — lazy heavy MCP tool groups: profiled and NOT converted.
Per-module timed dynamic imports of all 36 tool modules show neural-tools
was 469.6ms and every other group is 0.3-5.5ms (hooks-tools 3.5ms,
agentdb-tools 2.5ms, embeddings 0.9ms, wasm-agent 0.6ms). After fix 1 the
whole registry builds in ~30ms; converting handler dispatch to lazy
import() would add risk for <6ms of residual win, so mcp-client.ts is
intentionally untouched.
Validation:
- tsc build clean
- plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs: 171/171 passed
- memory search / neural predict still work; ONNX loads lazily then
Co-Authored-By: RuFlo <ruv@ruv.net>
* security(deps): lift OTel floor-became-ceiling pins — core >=2.8.0, otlp family >=0.220.0
The exact pins @opentelemetry/{core,resources,sdk-trace-base}@1.25.1 and
the otlp exporter/transformer family@0.52.1 (root + ruflo wrapper
overrides) were added in #1997/#2112 as a 'fewer-knobs-for-arborist'
defense against the npm arborist Invalid Version crash (empty-version
placeholder from optionalDependencies/peerDependencies overlap). They
were never API-compat pins — but they became a ceiling that forces the
tree onto @opentelemetry/core <2.8.0, which npm audit flags for
GHSA-8988-4f7v-96qf (unbounded memory allocation in W3C Baggage
parsing), and they blocked every upstream fix.
Convert to floors while keeping the lockstep families coherent:
- stable line: core / resources / sdk-trace-base -> >=2.8.0
- otlp line: sdk-node, exporter-prometheus, the three
exporter-trace-otlp-* packages, otlp-exporter-base,
otlp-grpc-exporter-base, otlp-transformer -> >=0.220.0
(sdk-node@0.220.0 declares exactly core@2.9.0 + otlp@0.220.0, so the
floors resolve to one mutually consistent set; verified in both the
root lockfile and a fresh ruflo/ resolution: core 2.9.0 everywhere,
otlp 0.220.0 everywhere.)
The arborist defense is preserved — every package in both families is
still forced to a single resolution via overrides; the override set is
now broader (whole otlp family at root too), which gives arborist fewer
ambiguous nodes than before, not more.
Also adds the exporter family overrides to the root manifest so root
and the published ruflo wrapper stay aligned (#2112 lesson: root
overrides do not propagate to the published wrapper).
Validation:
- root: npm audit --omit=dev 30 moderate -> 0 vulnerabilities
- ruflo: npm install --package-lock-only succeeds, 0 vulnerabilities
- runtime probe: new NodeSDK({}) via @opentelemetry/sdk-node@0.220.0
with core@2.9.0 loads and exposes start(); OTLPTraceExporter loads
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3
* security(deps): npm audit fix on v3 workspace lock — grpc-js, hono/node-server, brace-expansion
Plain `npm audit fix --omit=dev --package-lock-only` (no --force) on the
v3 npm workspace lockfile. Clears the three targeted advisories:
- @grpc/grpc-js 1.14.3 -> 1.14.4 GHSA-5375-pq7m-f5r2 (+GHSA-99f4-grh7-6pcq)
- @hono/node-server 1.19.9 -> 1.19.14 GHSA-wc8c-qw6v-h7f6 (+GHSA-92pp-h63x-v22m)
- @isaacs/brace-expansion 5.0.0 removed/deduped GHSA-7h2j-956f-4vf2
Audit summary: 82 vulnerabilities (2 low, 56 moderate, 24 high)
-> 55 vulnerabilities (50 moderate, 5 high).
The remainder needs --force / dependency swaps and is out of scope for
this pass.
Note: the reify was run with the two pnpm-style `workspace:*` devDep
specs (plugin-agent-federation, plugin-iot-cognitum) temporarily
substituted with the registry pins the lockfile already records
(@claude-flow/shared@3.0.0-alpha.8, @claude-flow/security@3.0.0-alpha.10),
because npm's arborist does not support the workspace: protocol; the
manifests themselves are unchanged. The v3 workspace is otherwise
pnpm-driven (`pnpm -r build`).
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3
* security(deps): align agentdb floor in @claude-flow/memory — ^3.0.0-alpha.17
Root overrides force agentdb >=3.0.0-alpha.17, but @claude-flow/memory
declared ^3.0.0-alpha.16, so its nested/published tree could still
resolve alpha.16 (the #2112 lesson: overrides do not propagate to
nested or published trees). The v3 pnpm lock indeed had memory pinned
to agentdb 3.0.0-alpha.16 — bumping the package's own floor makes both
branches resolve the same version regardless of the consumer's
override set.
pnpm-lock.yaml is regenerated by `pnpm install`; besides the
agentdb 3.0.0-alpha.16 -> 3.0.0-alpha.17 move under memory, it also
reconciles previously committed manifest bumps (metaharness family)
that had drifted from the stale lock.
Verified: `npm ls agentdb` from root shows a single deduped
agentdb@3.0.0-alpha.17 across direct, @claude-flow/memory,
@claude-flow/neural, and agentic-flow branches.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3
* security(deps): correct FEDERATION_BIND_HOST doc default — 127.0.0.1 (ADR-166 Phase 3d)
The bin.ts header JSDoc still advertised `default: 0.0.0.0`, but the
code (makeContext) has defaulted to 127.0.0.1 since the ADR-166
Phase 3d loopback-by-default hardening. Doc-only change.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3
* fix(memory): drop vitest-4 style vi.fn generic that breaks tsc build
The hoisted vitest 1.x types Mock as Mock<Args extends any[], Returns>,
so the single-generic vi.fn<SearchFn> form fails the package build
(pre-existing baseline failure). Annotate the variable instead — the
inferred mock signature is identical.
Co-Authored-By: RuFlo <ruv@ruv.net>
* perf(memory): batch embeddings in the migration import path
MemoryMigrator.processBatch batched entries (batchSize=100) but then
awaited this.embeddingGenerator(content) ONE ENTRY AT A TIME inside the
loop — N sequential ONNX inferences per batch on the
memory_import_claude hot path.
Now:
- New BatchEmbeddingGenerator type ((contents: string[]) =>
Promise<Float32Array[]>) accepted as an optional 4th constructor /
factory param — one true batch call per migration batch when the
embedder supports it (e.g. bge-embedder's single padded forward pass).
- Fallback: bounded concurrency over the single-text generator
(MigrationConfig.embeddingConcurrency, default 8 — never unbounded;
set 1 to restore sequential behavior).
- If the batch call fails, falls back to per-entry embedding so one
backend hiccup doesn't strand the batch.
Per-entry error semantics preserved: validation failures skip, store
failures fail, embedding failures warn and store the entry without a
vector — one bad entry never fails the batch.
Measured (200 synthetic entries, 5ms simulated single-embed latency):
sequential 1220ms -> concurrency-8 156ms (7.8x) -> true batch 115ms
(10.6x).
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(memory): temporal validity on hierarchical memory (Zep/Graphiti-style)
Facts in hierarchical memory can now carry validity windows and are
INVALIDATED on conflict instead of overwritten:
- New TieredMemoryStore module (@claude-flow/memory) promotes the inline
controller-registry stub to a first-class, tested store with optional
validFrom / validUntil (ISO) + supersededBy fields.
- store accepts supersedes=<entryId|key>: the old entry is stamped
validUntil=now + supersededBy=<newId> and archived — never deleted.
- recall filters temporally-invalid entries (expired, superseded, or
not-yet-valid) by default; includeExpired=true is the audit escape
hatch.
- Backward compatible: entries without the fields behave exactly as
before (always valid); legacy store(key,value,tier) / recall(query,
topK) call shapes unchanged; same-key stores still overwrite; the
bridge's real-vs-stub detection signal (getStats+promote) is
preserved.
- CLI bridge passes the new optional fields through
bridgeHierarchicalStore/-Recall. On the native agentdb
HierarchicalMemory backend, validFrom/validUntil ride in metadata and
are filtered at recall; supersedes is reported as unsupported there
(no public update API) rather than silently dropped.
- MCP inputSchemas for agentdb_hierarchical-store (validFrom,
validUntil, supersedes) and agentdb_hierarchical-recall
(includeExpired) expose the fields to agents, with ISO-8601
validation.
Tests: supersede flow (including same-key supersede preserving
history), expired + not-yet-valid filtering, includeExpired escape
hatch, legacy entries untouched, unparseable timestamps fail open.
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(routing): confidence-gated tier escalation — hooks_model-verify ($0 post-generation verifier)
ADR-026/143 classify BEFORE generation only. This adds the 2026-SOTA
post-generation gate: attempt the cheap tier, verify the output with
CHEAP structural signals (no LLM call), escalate only on failure.
- src/ruvector/output-verifier.ts — pure verifier: empty/truncated
output, refusal patterns, degenerate repetition, unbalanced
delimiters, and a real syntax parse for code/JSON tasks (TypeScript
transpileModule diagnostics / JSON.parse, graceful degradation when
typescript is absent). Returns {confident, reasons[], suggestedTier,
suggestedModel, escalate}; ladder haiku→sonnet→opus, tier 2→3.
- hooks_model-verify MCP tool (hooks-tools.ts, surgical) — wraps the
verifier and feeds the verdict into the SAME learning stream as
hooks_model-outcome (ModelRouter.recordOutcome: success when
confident, escalated when not) so the Thompson priors learn which
task shapes the cheap tier fails on. A dedicated tool (not a verify
mode on hooks_model-outcome) because verify is a mid-loop decision
point returning a verdict the agent acts on, while outcome is a
terminal write — the sequence is route → generate → verify →
(escalate) → outcome.
- __tests__/output-verifier.test.ts — refusal/truncation/parse/
escalation-ladder coverage + MCP handler tests (18 tests).
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3
* feat(federation): A2A Agent Cards — spec-1.0 discovery adapter over the bespoke federation schema
Implements the Agent2Agent (A2A, Linux Foundation) Agent Card layer as an
ADAPTER over the existing federation registration/discovery shapes. Cards
only — A2A Tasks/messaging are deliberately out of scope this iteration.
Spec: A2A Protocol 1.0.0 (a2a-protocol.org; schema source of truth
specification/a2a.proto in a2aproject/A2A). Required AgentCard fields per
spec 4.4.1: name, description, supportedInterfaces, version, capabilities,
defaultInputModes, defaultOutputModes, skills. Well-known discovery path
per 8.2 + IANA registration: /.well-known/agent-card.json.
- src/a2a/agent-card.ts: toAgentCard() maps FederationManifest -> spec-
compliant card (agent types -> AgentSkills; federation endpoint -> open-
form RUFLO-FEDERATION AgentInterface; bespoke identity rides in a spec
4.6 extension urn:ruflo:federation:manifest:v1 for lossless round-trip);
validateAgentCard() enforces the 1.0 required-field shape;
fromAgentCard() maps a remote card into a FederationNode — ALWAYS
TrustLevel.UNTRUSTED (cards are self-asserted metadata; trust is earned
via the normal handshake + TrustEvaluator path).
- src/a2a/well-known.ts: minimal node:http endpoint serving GET/HEAD on
the exact well-known path with spec 8.6 Cache-Control + ETag/304.
Binds 127.0.0.1 by default and REFUSES non-loopback binds without an
explicit allowNonLoopback opt-in (ADR-166 posture preserved — no
loosening of federation bind or auth).
- src/a2a/consume.ts: fetchAgentCard (injectable fetch, timeout, size cap,
structural validation) + consumeAgentCard registering the peer into
DiscoveryService so A2A peers appear in federation discovery.
- DiscoveryService: new 'a2a-card' discovery mechanism +
registerExternalPeer() (refresh-not-replace preserves trust state).
- plugin.ts: opt-in wiring via config.a2aCard/a2aCardPort/a2aCardHost;
bind failure degrades gracefully; server closed on shutdown.
- 40 new unit tests incl. golden-file card fixture
(__tests__/fixtures/a2a-agent-card.golden.json), foreign-card mapping,
round-trip, loopback guard, and a live serve->consume e2e over HTTP.
- plugin.test.ts: fixed pre-existing stale assertion (10 -> 11 CLI
commands; 'federation trust elevate' was added without updating the
count) — baseline suite failed before this change.
Build clean; 600/600 tests green.
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(intelligence): execution-state-tree retrieval prototype (MAGE-style positional recall)
Research basis: MAGE (arXiv 2606.06090) — semantic-similarity retrieval
fragments decision trajectories on long-horizon tasks; retrieving by
POSITION in a hierarchical execution-state tree (root→current path)
preserves coherence.
- src/ruvector/trajectory-tree.ts — TrajectoryTree prototype:
trajectory-start opens a node under the session root (nesting under
the deepest open trajectory), steps append children, end closes and
pops the current position. recallPath({sessionId, depth}) returns
the exact root→current path + recent siblings — no embedding search.
Best-effort JSON snapshot at .claude-flow/intelligence/
trajectory-tree.json, ALONGSIDE existing trajectory storage (no
migration). Limitations documented in the module header.
- hooks-tools.ts (surgical): non-fatal tree mirrors in
hooks_intelligence_trajectory-start/step/end (+ optional sessionId
param on start), and an opt-in strategy:"state-tree" on
hooks_intelligence_pattern-search (+ sessionId/depth params).
Default strategy stays "semantic" — zero behavior change unless
opted in.
- __tests__/trajectory-tree.test.ts — synthetic 3-level trajectory
path assertions, nesting/pop, sibling window, persistence
round-trip, and default-strategy-untouched checks (12 tests).
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01S7GYqnVUVxBfZ5W8znqry3
* fix(metaharness): kill third-party @latest, extract shared _invoke.mjs, derive smoke counts
Three of the four converged security/perf/arch review fixes:
1. SECURITY (HIGH) + PERF — _harness.mjs no longer shells to
`npx -y metaharness@latest` (a compromised upstream publish would have
executed arbitrary code on user machines, and @latest forced a registry
check per call). Resolution is now: (a) locally installed metaharness
satisfying the PINNED range ~0.3.0 (walk-up node_modules), then (b) a
one-time `npm install --prefix ~/.ruflo/metaharness-cache-0.3.0`, then
plain `node <abs-path-to-cli>` spawns — zero network per call. Both bins
(metaharness + harness) are read from the resolved package.json bin map.
The {stdout, stderr, exitCode, json, degraded, reason, durationMs}
contract and ADR-150 graceful degradation are preserved; timeouts now
report 'metaharness-timeout' (matching _darwin/_redblue) instead of being
conflated with 'metaharness-not-available'.
Measured: `score.mjs --path .` completes in ~0.35s via the cache.
2. ARCH — new scripts/_invoke.mjs consolidates the copy-pasted plumbing:
DEGRADED_RX (superset incl. `npm ERR`), classifyDegraded (keeps the
-timeout vs -not-available distinction), injectJson, parseTrailingJson
(the LAST-{...}-block variant from _darwin — the old _harness first-block
parse was a live bug), ensureCachedInstall (generalizes gepa/_redblue,
cache-dir naming kept compatible so existing caches keep serving),
importOptionalLibrary, findLocalPackageDir, makeDegradedEmitter.
_harness/_darwin/_redblue/gepa are now thin adapters with IDENTICAL
exported signatures; their genuinely-different parts stay (redblue's
node-direct isMain workaround, darwin's async streaming for evolve,
harness's dual binaries). test-graceful-degradation.mjs gains
RUFLO_METAHARNESS_CACHE_BASE / RUFLO_METAHARNESS_SKIP_LOCAL seams so the
ADR-150 drill still exercises the degraded path on warm-cache machines.
3. ARCH — smoke.sh derives EXPECTED_TOOLS / EXPECTED_SUBS once from
metaharness-tools.ts / metaharness.ts and replaces the 7 independently
hardcoded literals (15 at :750/:829/:2046, 13 at :725/:851, 16 footnote,
15 success-pattern). Cross-surface value preserved: independent surfaces
(CLAUDE.md catalog, test-mcp-tools' own `tools.length === 15` literal,
footnote appends, runScript refs) are compared against the derived count,
never a surface against itself; a >=15/>=13 floor step catches
extraction-regex rot.
Validation: smoke.sh 122/122, test-graceful-degradation 16/16,
test-mcp-tools 171/171.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(metaharness): add --diagnose GEPA failure diagnosis to evolve
GEPA's key trick — natural-language failure diagnosis from execution traces
feeding the next mutation, not just scalar fitness — scoped modestly into
the evolve wrapper as an opt-in flag.
`evolve.mjs --diagnose` now appends a `diagnosis` section to the emitted
JSON after the run completes: losing/failed variants' transcripts are run
through darwin's gepa `analyzeTranscript` + `classifyFailure` ops (via the
shared importGepa resolver, moved to _darwin.mjs because gepa.mjs runs
main() on import) and aggregated into failure classes + counts + dominant
class per variant.
Upstream shape findings (verified against @metaharness/darwin@0.8.0 with a
tiny mock-sandbox evolve):
- `metaharness-darwin evolve --json` emits a TEXT leaderboard — stdout
carries no JSON and no transcripts (r.json has always been null here).
- Per-variant run records live at <repo>/.metaharness/runs/<id>.json as
sandbox exec traces ({taskId, exitCode, stdout, stderr}) — NOT gepa
{actionRaw, obs} transcripts.
Diagnosis therefore layers: gepa-shaped transcripts when a run record
embeds them (agent sandbox / future upstream) → champion-transcript
fallback → `diagnosis: {available: false, reason, traceSummary}` with a
mechanical per-variant tally. Never fails the run — internal errors
degrade to {available: false, reason: 'diagnosis-failed: ...'}.
Both paths exercised end-to-end: mock evolve yields the traceSummary
fallback; a seeded gepa-shaped run record yields
{available: true, scope: 'losing-variants', failureClasses:
{exploration-loop: 1, edit-mechanics: 1}, dominantClass: 'exploration-loop'}.
Documented in skills/harness-evolve/SKILL.md.
Co-Authored-By: RuFlo <ruv@ruv.net>
* Revert "feat(gaia): submission integrity checklist — fail-closed pre-submit audit (Berkeley RDI hardening)"
This reverts commit
|
||
|
|
78810360bb |
chore(release): 3.16.3 → 3.17.0 (metaharness learn + gepa)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
4eb807aa7c |
chore(release): 3.16.2 → 3.16.3 (security)
Security release publishing ADR-166 Phase 1-3 remediation for unauthenticated RCE in the MCP bridge default docker-compose deployment (GHSA-c4hm-4h84-2cf3, CVSS 9.8 critical). Fixes in this release: - MCP bridge binds 127.0.0.1 by default; public bind requires MCP_AUTH_TOKEN or the process exits ≠0 at boot - Bearer auth middleware (timingSafeEqual constant-time compare) - Server-side executeTool gate for terminal_execute (opt-in via MCP_ENABLE_TERMINAL=true) - docker-compose: read_only bridge rootfs, Mongo --auth on by default, MONGO_INITDB_ROOT_PASSWORD required to boot - CORS allowlist wiring (MCP_CORS_ORIGIN) - Static + runtime regression locks + CI workflow Operators of any exposed instance MUST also rotate provider keys and audit the AgentDB pattern store — a patched redeploy alone does NOT undo the AI-supply-chain poisoning vector documented in the ADR step-5 attack path. See GHSA-c4hm-4h84-2cf3 and v3/docs/adr/ADR-166 for details. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
1a88796954 |
chore(release): 3.16.1 → 3.16.2 (#2509)
Security PATCH for ADR-165 Phase 1 (PR #2508): - Closes 5 critical CVEs (vitest, handlebars, protobufjs + 2 v3 criticals) - Closes 12 of 39 high-severity advisories via overrides - CVE registry rewritten 5 → 16 entries - New cve-audit.yml CI gate All 3 packages published: @claude-flow/cli@3.16.2 claude-flow@3.16.2 ruflo@3.16.2 Claude-Session: https://claude.ai/code/session_01WbBa4nccx5aGhXphoHxcni |