3861 Commits
Author SHA1 Message Date
rUv 8b132881ae Merge pull request #4791 from ruvnet/fix/untrusted-project-context
fix(hooks): ignore repo-committed learning data; label surfaced notes as project data
2026-11-04 21:10:17 -06:00
randRuFlo f91135144b fix(hooks): ignore repo-committed learning data; label surfaced notes as project data
.claude-flow/data stores committed to a cloned repository are no longer read
as this machine's learned patterns or synced into the user's Claude Code
memory, and are never rewritten. Surfaced entries are flattened to one line
(control, bidi and zero-width characters removed) and the block ends with a
line saying they are project notes, not instructions. Same change in the
generated fallback helper and the ruflo-mods routeContext block (0.16.2).
Helper manifest re-signed.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 21:53:45 -05:00
randRuFlo 95328e7762 release: 3.71.4
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 21:38:12 -05:00
randRuFlo b239250d25 fix(federation): bind BBS envelope origin to the signing key
An envelope is accepted only when its origin is the syncing peer or another
pinned peer and it verifies against that origin's pinned key. The sync
cursor advances only past envelopes that verified or were already held.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 21:38:12 -05:00
randRuFlo e4ec6167d7 fix(cli): refuse reserved ids and load record maps without a prototype
Identifiers such as __proto__ and constructor are refused by the CLI's
validateIdentifier, and the agent, task, terminal, swarm and neural record
maps load as null-prototype maps, completing #4671 for the remaining stores.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 21:38:12 -05:00
randRuFlo 146de16425 fix(memory): contain MCP export/import paths to the project
memory_export and memory_import now resolve outputPath/inputPath inside the
project directory (no symlinks, not in .git, no executables, nothing when the
server runs from a home or filesystem root), and import parse errors no
longer quote the file. An explicit dbPath must be a SQLite database file.
The local CLI keeps operator-chosen paths. session_export shares the helper.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 21:38:12 -05:00
randRuFlo 34fff62b79 fix(browser): allowlist launch switches and refuse option-like values
browser_open accepted any Chromium launch arguments, and caller text in
other browser tools could be read as agent-browser options. Launch args are
now a fixed list of plain switches, and execBrowserCommand refuses any value
that would add an option the tool did not emit itself.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 21:38:12 -05:00
randRuFlo 9045ab8477 release: 3.71.3 — Claude Code 2.1.318 adoption, narrow band, AutoMemory persistence, daemon stop, sweep fixes; performance 3.0.1, browser 3.0.1
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 18:52:18 -05:00
93d4a8188c chore(deps): bump agent-browser from 0.39.2 to 0.41.0 in /v3/@claude-flow/browser (#4662)
* chore(deps): bump agent-browser in /v3/@claude-flow/browser

Bumps [agent-browser](https://github.com/vercel-labs/agent-browser) from 0.39.2 to 0.41.0.
- [Release notes](https://github.com/vercel-labs/agent-browser/releases)
- [Changelog](https://github.com/vercel-labs/agent-browser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vercel-labs/agent-browser/compare/v0.39.2...v0.41.0)

---
updated-dependencies:
- dependency-name: agent-browser
  dependency-version: 0.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): update v3/pnpm-lock.yaml for agent-browser 0.41.2

Dependabot bumped the browser package's own lockfile but not the v3 pnpm
lock, so frozen-lockfile CI failed. Surgical edit (importer + package entry,
integrity checked against the registry); a full regen would have churned
@opentelemetry/api across every importer.

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: r <r@x>
Co-authored-by: RuFlo <ruv@ruv.net>
2026-11-04 17:48:55 -06:00
Michael ValderramaandMichael Valderrama 1a5ceb62cc feat(hive-mind): add --model to hive-mind spawn --claude (#4672)
Part of #1870. With --claude, -m/--model goes to the Claude Code worker as --model. No flag, no change. Values starting with '-' are refused before anything spawns.

Co-authored-by: Michael Valderrama <17348490+ibucketbranch@users.noreply.github.com>
2026-11-04 17:48:51 -06:00
rUvandr 8d4475d963 fix(auto-memory): JSON store surfaces write/read failures, verifies imports, adds read-only lookup (#4685) (#4708)
* fix(auto-memory): JSON store surfaces write/read failures and verifies imports (#4685)

- JsonFileBackend._persist() no longer swallows errors: a failed write or
  rename rejects store/bulkInsert/bulkDelete/update/shutdown.
- Only ENOENT means "no store". A read failure (e.g. EACCES), invalid JSON,
  a non-array document, or an entry without a unique non-empty string id
  throws a StoreError, and the file is never rewritten, so its bytes stay.
- Every persist reads the file back inside the lock and checks the intended
  entries are present and equal and the deleted ids are gone.
- import reports success only after shutdown plus a fresh readback of every
  entry it wrote; a failed import (including unreadable source files) exits 1.
  Sync failures also exit 1. Exit 2 is never used, since Claude Code treats it
  as "block". A missing @claude-flow/memory still exits 0 with its warning.
- New read-only `read <namespace> <key>` prints
  {schemaVersion, store, storePresent, namespace, key, found, entry}; it never
  loads the memory package, creates directories, takes the lock or calls
  shutdown, and refuses an ambiguous key.
- The repository and packaged helper copies are byte-identical again.

The signed helpers.manifest.json is NOT re-signed here: the
auto-memory-hook.mjs hash in it is now stale, so helper-signing.test.ts and
the helpers-manifest-guard workflow fail until a maintainer runs
`node scripts/sign-helpers.mjs` (docs/helpers-sync.md step 2).

Regression: __tests__/auto-memory-persistence-4685.test.ts (28 of 30 fail on
the previous helper). Reported by @sparkling.

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(helpers): re-sign helpers.manifest.json for the auto-memory-hook fix (#4685)

Signed with the project key through RUFLO_HELPERS_SIGNING_SECRET (Secret
Manager, ruv-dev); check-helper-sync passes.

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-11-04 17:48:45 -06:00
rUvandr 8a033a4e63 fix(daemon): keep a stopped daemon stopped until an explicit start (#4654) (#4706)
Every ruflo-core plugin hook runs the CLI, and the CLI auto-starts a daemon
whenever none is alive, so a daemon the user stopped came back within minutes.

daemon stop now writes .claude-flow/daemon.stopped (only in a Ruflo project or
an existing .claude-flow/; stop --all marks every stamped workspace).
ensureDaemonRunning declines to spawn while the marker exists. An explicit
daemon start clears it. The start that auto-start spawns carries
RUFLO_DAEMON_AUTOSTARTED=1: it never clears the marker and re-checks it, so a
stop that lands after the hook checked still wins.

Co-authored-by: r <r@x>
2026-11-04 17:48:40 -06:00
randRuFlo e95c77d469 fix: refuse a trajectoryIds selection in hooks_intelligence_learn (#4693); route research synthesis away from the episode controller (#4691)
- hooks_intelligence_learn advertised trajectoryIds but never read it, so a
  scoped request ran global learning. The learning path cannot select, so an
  explicit selection is now refused before anything is imported or mutated.
- agentdb_context-synthesize summarizes validated task episodes; its description,
  the research-synthesize skill (ruflo-goals 0.4.6) and the researcher agent
  (ruflo-core 0.2.14) no longer send research documents to it.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 17:46:14 -05:00
r 825f4f8b97 Merge PR #4696 2026-11-04 17:43:47 -05:00
r 062a1988fb Merge PR #4698 2026-11-04 17:43:20 -05:00
r 01673fcbf3 Merge PR #4695 2026-11-04 17:43:20 -05:00
r 4685e6962b Merge PR #4694 2026-11-04 17:43:19 -05:00
rUvandr bdfbcc11ad feat(cli): adapt headless workers and hooks to Claude Code 2.1.295–2.1.318 (#4699)
- headless claude -p argv gets --permission-mode auto unless the caller set a
  mode or --dangerously-skip-permissions (2.1.302 starts -p in manual mode on
  third-party providers, telemetry off, or fresh installs; workers would stall).
  RUFLO_HEADLESS_PERMISSION_MODE overrides; none passes no flag.
- parse credential_expires_at from the -p JSON result (2.1.318), carry it on
  the execution result and emit 'credential-expiring' within 10 days.
- onFailure: "block" on the pre-bash safety gate in init-generated and repo
  settings (2.1.295): a gate that can't start or times out blocks instead of
  letting the command through. Older Claude Code ignores the key (checked on
  2.1.289).

Co-authored-by: r <r@x>
2026-11-04 14:33:07 -06:00
kevin9327 178fb86095 fix(tasks): mark agents assigned in task_create as busy 2026-11-05 04:42:11 +09:00
randRuFlo af95dd71a0 release: 3.71.2 — PR sweep fixes (embeddings, session, memory paging, claims, terminal, security) + providers 3.0.1
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 13:18:23 -05:00
cmf235 89a9206b81 fix(performance): correct range check and de-bias attention benchmark
- quickValidation(): "Within Range" now requires meetsMinimum && meetsMaximum (previously reported YES for speedups below the 2.49x minimum).
- runComparison(): untimed warm-up plus 5 interleaved trials with alternating order; reports median per-call time; guards 0ms timer reads. Run-to-run speedup spread drops ~38% -> ~22% (256D x 50 keys, 10 runs).

Verified: tsc --noEmit clean; benchmarks.test.ts + attention.test.ts 94/94 pass.
2026-11-04 13:13:20 -05:00
kevin9327 65081ae7eb fix(claims): leave completed claims out of claims_load and claims_rebalance 2026-11-05 02:18:00 +09:00
kevin9327 07d39352f1 fix(claims): take a claim off the stealable list when claims_handoff hands it over 2026-11-05 02:16:18 +09:00
r 9c1031452d Merge PR #4663: chore(deps): bump agentic-flow from 2.1.4 to 2.1.5 in /v3/@claude-flow/browser 2026-11-04 10:28:56 -05:00
r 5048deda75 Merge PR #4671: fix(security): daily scan 2026-11-03 — 2 fixes 2026-11-04 10:28:55 -05:00
r 2ad1257416 Merge PR #4579: fix(cli): stop installing default skills whose commands v3 does not ship 2026-11-04 10:28:55 -05:00
r e68b7ebe10 Merge PR #4655: fix(claims): take a claim off the stealable list when claims_status updates it 2026-11-04 10:28:54 -05:00
r a2e3a1dc66 Merge PR #4656: fix(claims): keep the claim context in claims_steal when no handoff context was given 2026-11-04 10:28:54 -05:00
r c9816cf623 Merge PR #4658: fix(terminal): report an unknown sessionId in terminal_execute instead of running in a new session 2026-11-04 10:28:54 -05:00
r 36ea7452c3 Merge PR #4675: fix(embeddings): read --db-path, --max-size, --ef-construction and --batch-size 2026-11-04 10:28:53 -05:00
rUvandr a135c978e3 test(neural): warm the JIT before the DT and PPO timing checks (#4690)
The Decision Transformer 'should train under performance target' check
times the very first train() call in a fresh worker. That cold call is
several times slower than steady state (17ms vs 4ms locally), and on a
loaded 2-worker CI runner it alone crossed the 100ms bound: 110-154ms
on #4653, #4655, #4657, #4663 and #4521. Run one train() on a throwaway
instance with the same config first, then time. The PPO update check has
the same shape and gets the same warm-up. Bounds are unchanged.

Co-authored-by: r <r@x>
2026-11-04 09:28:37 -06:00
ordinary being ad7e9e5416 fix(memory): page list row identities before loading payloads (#4687)
bridgeListEntries() and the sql.js listEntries() fallback selected full content and embedding columns before ORDER BY updated_at DESC LIMIT/OFFSET, so metadata-only pages sorted large payloads that were then discarded (#4686).\n\nUse a rowid subquery to order/limit row identities first, then fetch the page's payload columns. The original full-row query remains as a fallback for legacy WITHOUT ROWID tables. Filters (status/TTL/namespace/provenance/tags), total count, embedding cap, page membership, order and returned fields are unchanged.\n\nAdds a sql.js fixture test for descending offset pages, full content, total and limit 0. Existing sql.js list/provenance/tag and ADR-472 embedding tests pass 12/12 locally; tsc reports only the pre-existing missing workspace packages.
2026-11-04 09:05:02 -06:00
ordinary being d45db2597d fix(providers): account for Anthropic prompt-cache tokens (#4673)
* fix(providers): account for Anthropic prompt-cache tokens

Anthropic reports input_tokens separately from cache_creation_input_tokens and cache_read_input_tokens, with cache writes priced at 1.25x and reads at 0.1x base input. The provider ignored both fields: promptTokens undercounted every cache hit/write and promptCost used the full base rate for all input (#4597 performance/security scan).\n\nAdd optional cache fields to LLMResponse.usage, compute total prompt tokens from all three, apply the cache multipliers in cost accounting, and carry the same fields through the streaming done event. Non-cached responses are unchanged.\n\nTwo tests mock the Anthropic REST/SSE responses: a non-streamed response (100 ordinary + 200 write + 800 read -> 1100 prompt tokens, .00129 prompt cost) and a streamed response (60 prompt, 5 output, .000114 prompt). Baseline returns 100/10 prompt tokens and omits the cache fields; candidate passes 2/2. Full provider unit tests pass (the integration suite is skipped locally: missing dotenv); tsc only reports the pre-existing missing @ruvector/ruvllm.

* test(providers): keep non-cached Anthropic usage unchanged

Add a compatibility control proving the new cache accounting leaves a response with no cache tokens byte-identical: 100 prompt, 50 completion, 150 total, \.0003 prompt cost.
2026-11-04 09:04:55 -06:00
nk-batman21 cc665b12f6 fix(session): honor the component flags in session save, restore and export (#4649)
The parser stores --memory-only as flags.memoryOnly and --no-include-memory
(or --include-memory false) as flags.includeMemory = false, but session
save, restore and export read only the kebab-case keys, which are never
set. `session restore <id> --memory-only` overwrote the agent and task
stores, and `session save` / `session export` with --no-include-memory
still wrote the memory entries.

Read the camelCase keys and keep the kebab ones as a fallback, as init and
mods do.
2026-11-04 09:04:51 -06:00
kevin 36d0d79b06 fix(embeddings): honour threshold 0 in embeddings_search (#4611) 2026-11-04 09:04:45 -06:00
randRuFlo 2a75e765c3 chore(release): 3.71.1 — shared 3.0.7, mcp 3.1.6, plugin-agent-federation 1.0.5
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 03:30:34 -05:00
r d3c5244eae Merge PR #4682 into release/3.71.1 2026-11-04 03:28:54 -05:00
r b694a8ae01 Merge PR #4647 into release/3.71.1 2026-11-04 03:28:54 -05:00
r 86840b68a6 Merge PR #4646 into release/3.71.1 2026-11-04 03:28:54 -05:00
r 4c22c1b48d Merge PR #4664 into release/3.71.1 2026-11-04 03:28:54 -05:00
r 3c388f18e0 Merge PR #4669 into release/3.71.1 2026-11-04 03:28:54 -05:00
rUv bca5d10958 Merge branch 'main' into fix/4674-http-session-retire 2026-11-04 01:58:18 -06:00
rUv 090317b4cc Merge branch 'main' into fix/shared-rate-reset-empty-key 2026-11-04 01:58:15 -06:00
rUv 031a109b6b Merge branch 'main' into fix/resilience-ownership-20261101 2026-11-04 01:58:12 -06:00
rUv 504c2bd080 Merge branch 'main' into fix/federation-handoff-dual-floor 2026-11-04 01:58:09 -06:00
rUv 9973d61028 Merge branch 'main' into fix/dry-run-ruvector-deployment 2026-11-04 01:58:05 -06:00
rUv 32f6f680be Merge branch 'main' into fix/memory-import-claude-slug 2026-11-04 01:58:03 -06:00
rUvandr bbd057eb17 fix(memory): find stored patterns when agentdb serves mock embeddings (#4643) (#4681)
agentdb_pattern-store writes through ReasoningBank.storePattern(), but when
agentdb's Transformers.js model fails to load (offline, failed sharp install,
or a loaded CI runner) it serves hash-based mock embeddings. A passage and a
query then embed to unrelated vectors, so searchPatterns() returned [] for a
pattern that was just stored. This is the full-suite #2226 failure that has
kept the CI ratchet red since the move to agentdb 3.2.

- bridgeSearchPatterns: when the agentdb vector search returns nothing, scan
  the same reasoning_patterns table for the query text, matching what the
  LocalReasoningBank branch already does over getAll().
- rescueAgentdbEmbedder: agentdb 3.x's ReasoningBank calls embedQuery() /
  embedPassage(), which bypass embed(). Patch the role methods too and clear
  the cached mock vectors, so a host with ONNX actually gets real vectors.
- Regression test forces AGENTDB_DISABLE_TRANSFORMERS=1 and requires the
  round-trip to hit; it fails without the fix.

Co-authored-by: r <r@x>
2026-11-04 01:57:56 -06:00
randRuFlo 536a7315bd fix(mcp): retire superseded sessions instead of refusing at maxSessions (#4674)
Every initialize created a session, but the server answers every client
through one currentSession, so a superseded session is never addressed again.
It still held a slot until the 30-minute expiry, and 100 short-lived SDK
clients (connect, listTools, close) were enough to make the next initialize
fail with "Maximum sessions (100) reached".

SessionManager.reserveCapacity(keepId) closes the least recently active
session other than keepId when the manager is full. The server calls it
before creating a session, keeping the current one. Capacity and expiry are
unchanged, and nothing is closed while there is room.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 02:07:21 -05:00
ordinary being 762fbf74c2 fix(memory): expose AgentDB init failures in health (#4667)
agentdb_health could return available:true with controllers while AgentDB itself had failed to open (for example because the daemon or another MCP server owned the RuVector store). The only trace was the separate isBridgeAvailable() check; the health payload had no init error or lock hint (#4654).\n\nbridgeHealthCheck now reads the registry's getAgentDBInitError(), reports available:false, includes agentdbInitError and the recorded bridgeFailureReason, and adds an actionable hint when the cause is an already-open/locked native store. Older registries without the record are unchanged.\n\nRegression extends the #4622 fake registry with listControllers and covers failed and healthy health payloads. Baseline returns available:true and no error for the failure case; candidate 5/5 with the Windows bridge opt-in, existing 3 tests unchanged.
2026-11-04 01:01:20 -06:00