mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-12-04 06:21:59 +09:00
b7ee03e29464dfffa027580eaabfa9b8cfdf024e
66
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e89236b0ec |
chore(memory): 3.3.1 — onInsightAccessed key lookup (#4942) + package metadata (#4932)
Bumps @claude-flow/memory to 3.3.1 and moves the CLI's exact pin. Must not merge before @claude-flow/memory@3.3.1 is on npm (audit-leaf-versions-published). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
dfc87e5c03 |
chore(npm): canonical repository, homepage and keywords for 12 packages; verified quickstarts for memory and security
Package metadata only (ADR-356 distribution lane). No version bumps, no dependency, script or source changes; it ships with each package's next release. - homepage https://ruv.io, repository {url ruvnet/ruflo, directory}, bugs ruvnet/ruflo/issues on @claude-flow/{memory,security,embeddings, swarm,testing,plugins,performance,providers,deployment, plugin-agent-federation,plugin-iot-cognitum} and ruflo-graph-intelligence. Nine of these had no repository field at all, so their npm pages link nowhere. - 10-12 keywords per package, taken from each package's README features. - ruflo-graph-intelligence description trimmed to 160 chars. - memory and security READMEs: one-line job statement, supported environments, a quickstart run against the published 3.3.0 / 3.0.7 with its real output, a link to the next package, and an animated SVG (2.5 KB / 2.1 KB, prefers-reduced-motion aware) that shows that run. Packages in #4897 (aidefence, browser, cli-core, guidance, neural, teammate-plugin) are left alone to avoid conflicting with it. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
105033d1f2 |
feat(memory,cli): persisted inventory + exact-ID reads for TieredMemoryStore (#4712)
TieredMemoryStore exposed store/recall/remove/count but no way to enumerate
what is persisted or read an entry back by id. recall() scores the hydrated
maps, which cap each tier and the archive at 5,000 rows and collapse same-key
rows, so the in-memory view cannot establish the persisted population.
@claude-flow/memory 3.3.0:
- TieredMemoryStore.listEntries({ tier, status = 'active', limit = 100, cursor })
reads the tiered_memory table with keyset pagination on ts DESC, id DESC.
status is active | expired | superseded | archived | all, derived by one
function with fixed precedence (superseded > archived > expired > active;
not-yet-valid rows count as expired, matching recall's includeExpired).
limit is clamped to 1..1000. The cursor is base64url JSON bound to the
tier/status filter; altered, malformed or foreign cursors throw
TieredMemoryCursorError. totalEstimate is an exact COUNT for all /
superseded / archived and omitted for the temporal filters.
- TieredMemoryStore.getEntry(id, { includeInactive = false }) is an exact
stable-id read returning the entry plus its status, or null.
- Both throw TieredMemoryUnsupportedError ("unsupported: volatile store") on a
store without a SQLite handle, never write, and let SQL errors propagate.
- Logic lives in tiered-memory-inventory.ts with injected decode/isValid, so
there is no runtime import cycle.
CLI: read-only MCP tools agentdb_hierarchical-list and agentdb_hierarchical-get,
appended at the end of agentdbTools from a new module. Bridge helpers are
appended to memory-bridge.ts and run inside one bridge operation; they refuse
with a reason on a native agentdb controller, an older @claude-flow/memory
without the API, a volatile store, or a read failure.
Fixes #4712
Co-Authored-By: RuFlo <ruv@ruv.net>
|
||
|
|
4791f07685 |
chore(release): @claude-flow/memory 3.2.6, @claude-flow/plugins 3.0.3; cli pins memory 3.2.6
Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
37eca9892f |
fix(pagerank): converge MemoryGraph PageRank; fix GraphOperations teleport and weights
MemoryGraph.computePageRank (memory-graph.ts) stopped on a per-node change below 1e-6 within 50 iterations. On a 10k-node graph it exited after 10 iterations with an L1 error of 1.46e-4 (max 3.95e-7) against an exact solution. It now stops on the L1 change (default 1e-10, up to 200 iterations): 30 iterations, L1 error 2.76e-11. GraphOperations.pageRank (plugins gnn.ts) had three mass leaks: - personalization: nodes missing from the map still got the uniform 1/n teleport on top of the personalization weights, so a single-seed run summed to 1.98; - isolated nodes lost their mass (global runs summed to 0.983); - weighted runs divided by the neighbour count instead of the neighbour's total edge weight (scores summed to ~8e12 on a weighted test graph). Teleport is now the normalized personalization restricted to graph nodes, dangling mass is redistributed by it, and weights are normalized by out-strength. Both use @ruvnet/sublinear-core (^1.0.1, zero deps) as an optional dependency, loaded lazily via createRequire, with an in-tree fallback of the same semantics (pagerank.ts, one copy per package). Tests: both backends sum to 1 and match an independent power iteration within 1e-9 (global, personalized, weighted, MemoryGraph), and the fallback is used when the package is absent. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
e83c3ab6fd |
chore(release): @claude-flow/memory 3.2.5 (agentdb ^3.7.2); cli pins memory 3.2.5
agentdb ^3.0.0-alpha.20 -> ^3.7.2 (filtered search and in-memory isolation the backends rely on). Workspace lockfile now resolves agentdb 3.7.2 everywhere. memory@3.2.5 is published before merge, which audit-leaf-versions-published requires. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
1979a92053 |
chore(release): @claude-flow/memory 3.2.4; cli pins memory 3.2.4 and plugin-agent-federation 1.0.7
The SQLiteBackend migration is in @claude-flow/memory, which the CLI resolves from the registry, so the leaf-package publish audit (#3335) requires a bump and a matching CLI pin. memory@3.2.4 is published right after this merges. The federation pin moves to the 1.0.7 already on npm (GHSA-vcv2 peer range, #4890). Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
722232566a |
fix(memory): RvfBackend search through hnsw-index.ts (recall@10 0.09 → 0.89) (#4836)
* fix(memory): RvfBackend search through hnsw-index.ts (recall@10 0.09 -> 0.89) RvfBackend's inlined HnswLite seeded every search from the first efConstruction vectors in insertion order and BFS'd a flat neighbour graph, and each insert was an O(n) brute-force scan. Measured against exact search on 5,000 random unit vectors (cosine, 200 queries, seed 42): index 384-dim recall@10 1536-dim clustered 384 HnswLite (before) 0.091 0.079 0.999 @ruvector/diskann 0.1.3 0.896 0.739 1.000 hnsw-index.ts, ef=200 0.888 0.744 0.990 DiskANN matched HNSWIndex on recall but a vector inserted after build() is not searchable until a full rebuild (3.6-4.3 s at 1k vectors), which breaks store()-then-search(). HNSWIndex is incremental and is the single HNSW implementation ADR-125 asks for, so RvfBackend now uses it through a private RvfVectorIndex (not exported; the prepublishOnly surface check still passes). - indexes of <= 1000 vectors and dimension-mismatched queries use an exact scan - distances map back to the old similarity scale; threshold filter unchanged - re-storing an entry without an embedding removes its old vector - update() re-indexes when an untyped caller passes an embedding New rvf-backend-recall.test.ts drives the real RvfBackend.search: recall@10 >= 0.9 on 2000 random 64-dim vectors (HnswLite scored 0.294 there), exact results at 300 vectors, delete/re-store correctness, recall after reopen. @claude-flow/memory 3.2.2 -> 3.2.3. Co-Authored-By: claude-flow <ruv@ruv.net> * chore(memory): leave the version at 3.2.2 in this PR audit-leaf-package-publish requires the CLI pin to cover the workspace version, and audit-leaf-versions-published requires that pin to exist on the registry. The 3.2.3 bump, its publish and the CLI pin move together in the release that follows. Co-Authored-By: claude-flow <ruv@ruv.net> * release(memory): @claude-flow/memory 3.2.3, CLI pins it The RvfBackend change has to reach users through a standalone publish: memory is not bundled into the release tarballs (Publishing Rules). @claude-flow/memory@3.2.3 is published from this branch's tree; the CLI pin (dependencies + optionalDependencies) moves to it so audit-leaf-package-publish and audit-leaf-versions-published both hold. The lockfile also gains the @ruvector/sona 0.1.10 package entries pnpm reported missing. Co-Authored-By: claude-flow <ruv@ruv.net> --------- Co-authored-by: r <r@x> |
||
|
|
47406b0a96 |
fix(memory,neural): AgentDB SQL fallback persistence, cache size reuse, MoE mean P_i (#4639)
* fix(memory,neural): persist AgentDB SQL fallback, reuse cached sizes, average MoE P_i - memory (#4410): AgentDBBackend's SQL fallback gated on db.run/db.get, which agentdb's prepare/exec handle never has, so no table was created and every write was a silent no-op. Use prepare().run/get with spread params (safe on better-sqlite3 and agentdb's sql.js shim) and quote the "references" column. - memory (#4481): CacheManager stores each entry's size on its LRU node and refunds that number on overwrite/delete/eviction instead of re-serializing. - neural (#4381): computeLoadBalanceLoss() uses the mean gate probability over the same route() history as f_i, persisted and reset with the routing stats. - Bump @claude-flow/memory 3.2.2, @claude-flow/neural 3.0.2. Co-Authored-By: RuFlo <ruv@ruv.net> * chore(cli): pin @claude-flow/memory 3.2.2 and @claude-flow/neural 3.0.2 (both published) Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: r <r@x> |
||
|
|
56fe4dc604 |
feat: ecosystem convergence — agentdb 3.0.0, agentic-flow 3.0.0, AIMDS packs; release 3.67.0 (#4628)
* fix(aidefence): restore the ADR-118 wider-detection pass to source (3.0.4) @claude-flow/aidefence 3.0.3 (npm latest) was published from an uncommitted tree carrying the ADR-118 / #2004 patterns, so main never had them, and main's #3177 ReDoS bounds never reached npm. 3.0.4 is a true superset: the verb-noun override window, behave-as role hijack and god/root/admin/sudo mode jailbreak markers, on top of main's bounded PII/marker regexes. Parity against the published 3.0.3 dist: 24-input corpus, 0 regressions. Drops publishConfig.tag=alpha. Refs #4625. Co-Authored-By: RuFlo <ruv@ruv.net> * feat(aidefence): merge AIMDS pattern packs into ThreatDetectionService (3.1.0) Vendors the AIMDS pack engine (normalize, decoders, pattern-loader, engine) and its six pattern packs (53 patterns) from midstream AIMDS at abe78d6 into src/domain/services/packs/. Packs are embedded as TS modules, so they load from the published ESM dist with no fs path lookup; the files allowlist is unchanged. ThreatDetectionService.detect() runs the packs in a second pass over the raw input and merges findings into the existing result shape (one threat per type, as before). Built-in patterns, including the ADR-118 extras, stay and their confidences are unchanged. Packs are on by default; disable or select them with createThreatDetectionService({ packs }) or createAIDefence({ packs }). The legacy pattern-array argument still works. - ThreatType gains tool_invocation, data_exfiltration, markup_forgery; Threat gains an optional ruleId (e.g. EX-001) for pack findings. - Packs are validated, compiled and regex-warmed once per process, so isSafe()/checkThreats() no longer pay a compile per call and the first detect() is not charged ~17 ms of lazy regex compilation. - Fixes a quadratic regex in the vendored normaliser (undoLeet): 100 KB of hex digits took 1.8 s; now 6 ms. Decoders cap each blob before decoding. Corpus (55 attacks / 30 legit): built-ins only 8/55, packs on 55/55; false positives F13 and F27 in both modes (built-in encoding_attack), pinned. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(memory): build AgentDB controllers with an embedder and the shared vector backend LearningSystem, NightlyLearner, ExplainableRecall and the graph transformer's CausalMemoryGraph take (db, embedder, ...). The registry passed only the database, so the first predict/discover/recall threw on this.embedder (the #3327 Finding A class, fixed for ReasoningBank only). Real-agentdb test fails on the old source (learningSystem.embedder undefined). memory suite 659/659. Adds ADR-513 (stable versions, convergence) and ADR-516 (aidefence recovery). Co-Authored-By: RuFlo <ruv@ruv.net> * feat(cli): move to agentic-flow ^2.2.0 (main line); stable-only tag policy - agentic-flow ^3.0.0-alpha.1 resolved to the March 3.0.0-alpha.2, which pulled @xenova/transformers -> onnx-proto -> protobufjs 6 (critical). 2.2.0 is agentic-flow's main line (ADR-515). The update validator and the init doc table follow. - neural-tools: computeEmbedding returns a Float32Array, which JSON.stringify writes as {"0":...}; convert to an array before the neural store. - CLAUDE.md: no more alpha/v3alpha/next dist-tags (ADR-513); overrides do not reach users; examples use ruflo@latest. Co-Authored-By: RuFlo <ruv@ruv.net> * chore(cli): pin @claude-flow/aidefence 3.1.0 (AIMDS pattern packs) Co-Authored-By: RuFlo <ruv@ruv.net> * chore(cli): target agentic-flow ^3.0.0 (first stable 3.x, ADR-515) agentic-flow's security defaults change in a breaking way (agents no longer bypass permissions by default, proxies need a token), so the main line ships as 3.0.0 rather than 2.2.0. That also gives the 3.x alpha line a stable head: existing ^3.0.0-alpha.1 installs resolve to it and drop the March alpha's protobufjs 6 (critical). Co-Authored-By: RuFlo <ruv@ruv.net> * fix(memory): capture AgentDB's backend failure reason from stderr too agentdb 3.0.0 moves library diagnostics off stdout (they corrupted stdio MCP JSON-RPC), so the #4622 lock-reason capture patches console.error as well. Co-Authored-By: RuFlo <ruv@ruv.net> * docs(adr): ADR-514 agentdb 3.0.0, ADR-515 agentic-flow 3.0.0, ADR-517 AIMDS pattern packs Co-Authored-By: RuFlo <ruv@ruv.net> * chore(memory): 3.2.1 (embedder wiring, stderr reason capture) Co-Authored-By: RuFlo <ruv@ruv.net> * chore(release): 3.67.0 — agentdb 3.0.0, agentic-flow 3.0.0, aidefence 3.1.0, memory 3.2.1 - CLI and the claude-flow umbrella declare agentic-flow ^3.0.0 (root lock and v3 pnpm lock resolve 3.0.0 / agentdb 3.0.0). - CHANGELOG 3.67.0. Co-Authored-By: RuFlo <ruv@ruv.net> * test/docs: dated ADRs 513-517; scope the bracket/DAN timing test to built-ins - ADRs 513-517 gain Date lines (the console ADR parser expects >97% dated) and ADR-513/516 name the versions that shipped (agentic-flow 3.0.0, aidefence 3.1.0). - threat-detection 'bounds the bracket and DAN patterns' measures the built-in regexes it was written for ({ packs: false }); the AIMDS packs have their own 100 KB adversarial timing test. Full detector on that input: 86 ms locally, 301 ms on the CI runner (linear, budget was 200 ms). Co-Authored-By: RuFlo <ruv@ruv.net> * fix(deps): stop pinning ruvector 0.2.27 under agentdb 3.0.0; CLI agentdb ^3.0.0 The root (and ruflo wrapper) overrides pinned ruvector ^0.2.27 from the BEIR work (3.10.29). npm applies overrides inside this repo's tree, so CI ran agentdb 3.0.0 on ruvector 0.2.27, below agentdb's own ^0.2.40: a pairing no user ever installs (published overrides are ignored), and the one where #2226 pattern recall failed on CI. Raised to ^0.2.41. The CLI's agentdb range moves to ^3.0.0 (stable; no alpha ranges, ADR-513), so the v3 pnpm lock resolves 3.0.0 and the v3 test job exercises what users get instead of 3.0.0-alpha.20. 115 agentdb/memory-related CLI test files: 868/868 on 3.0.0. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: r <r@x> |
||
|
|
49adc540a0 |
fix(memory): report the original AgentDB open failure; memory_list reports failed queries (#4622); release 3.66.1 (#4623)
- ControllerRegistry keeps the first backend failure AgentDB logs (e.g. a native vector store locked by another process) instead of only the last fallback's format rejection, exposed as getAgentDBInitError(), with the single-owner HTTP remedy. @claude-flow/memory 3.2.0. - The CLI bridge records that reason, so the sql.js fallback's refusal names it, and isBridgeAvailable() is false when AgentDB did not open. - memory_list returns success:false with the error on a failed query instead of an empty inventory. - Release 3.66.1 with plugin-agent-federation 1.0.4 (#4619 trust thresholds). Co-authored-by: r <r@x> |
||
|
|
7387295568 |
dream(memory): #4549 wire ControllerRegistry.set() — MutationGuard/AttestationLog activation was permanently dead (evaluated, ACCEPT-scoped) (#4550)
* dream(memory): wire ControllerRegistry.set() so MutationGuard/AttestationLog activation stops being dead code
memory-bridge.ts's post-init controller-activation wiring (reasoningBank,
learningSystem, skills, semanticRouter, gnnService, rvfOptimizer,
mutationGuard, attestationLog, guardedVectorBackend) has always gated
registration on `typeof reg.set === 'function'`, falling back to an
unread `reg._controllers` property otherwise. ControllerRegistry never
implemented a public set() method, so every external activation silently
took the dead fallback: registry.get('mutationGuard')/get('attestationLog')
always returned null, permanently disabling write-mutation validation
(fail-open "no guard installed = allow") and audit logging (silent no-op)
on the real store/delete/purge paths. Same bug shape as the already-fixed
#3327 Finding A (reasoningBank.store never existed, so its own
typeof-guard was dead too).
Adds ControllerRegistry.set<T>(name, instance) mirroring the shape
initController() already produces internally. Zero changes needed at any
of the 9 memory-bridge.ts call sites.
5 new discriminating tests reproduce memory-bridge.ts's exact activation
pattern; stash-isolated baseline fails all 5 (TypeError: registry.set is
not a function), candidate passes all 5. Full @claude-flow/memory suite:
650/651 both ways (1 pre-existing environmental failure, byte-identical,
unrelated chmod/root-bypass test). tsc --noEmit: 0 errors.
Evaluated, pending independent adversarial critique.
* dream(memory): close prior instance on ControllerRegistry.set() (post-critique)
Independent adversarial critique of
|
||
|
|
6e213d5bb3 |
fix(memory): distinguish recent dead locks from live writers (#4389)
* fix(memory): distinguish recent dead locks from live writers inspectAgentdbLock() labeled a dead holder as 'live' when the lock was younger than the 10s stale threshold. The same state then produced 'another process is writing this database' guidance, so callers could wait for a writer that did not exist or leave a recoverable lock in place indefinitely (#3979 item 5).\n\nAdd a distinct 'recent' LockState for dead-PID locks still inside the stale window, clamp clock-skewed ages to zero, and give withAgentdbLockRecovery a precise retry message. The guard still refuses to clear the lock until it is old enough; only the diagnosis changes. * chore(memory): bump @claude-flow/memory to 3.0.9 The leaf-package-publish audit correctly requires a version bump whenever publishable @claude-flow/memory source changes. Bump the leaf and both CLI dependency pins, and update the pnpm importer specifier, matching the #4279/#4152 release pattern. |
||
|
|
462c573cb7 |
fix(memory): wire real AgentDB HNSWIndex with safe fallback (#4249) (#4322)
* fix(memory): adapt real AgentDB HNSWIndex with safe fallback Verify actual native search, mutation lifecycle, concurrency and exact fallback. Include source-bound regression and bounded benchmark evidence for #4249. No persistence or package-release claim. * fix(memory): preserve expiry and vector ownership across native search Keep TTL-bearing semantic queries exact and detach stored/returned vectors. Snapshot query vectors before awaits. Add three real-native regressions and refresh the verification receipt: 645 tests pass; disclose transient timing miss. * fix(memory): bump @claude-flow/memory to 3.0.8 for the real HNSW adapter #4249's leaf-package-publish audit correctly flagged that agentdb-backend.ts/agentdb-hnsw-adapter.ts changed source but the package version was still 3.0.7. Bumps the leaf, the CLI's exact pin, and the pnpm-lock.yaml specifier together so the fix actually ships. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: r <r@x> |
||
|
|
9cf2ad57ba |
dream(memory): #4137 wire delete-sync into AutoMemoryBridge.importFromAutoMemory() (evaluated, ACCEPT) (#4138)
* dream(memory): #4137 AutoMemoryBridge was additive-only, never delete-synced removed/vanished source content
importFromAutoMemory() diffed new content against AgentDB by content-hash
to insert/skip, but never detected or deleted an entry whose source
heading (or whole source file) was removed — deleted memory content
stayed retrievable via semantic search indefinitely. Adds a per-source-
file key diff (reusing the existing single bulk query, zero schema
change) plus a second pass for files removed entirely from disk, each
with a false-full-wipe guard. Evaluated: 7 new discriminating tests,
baseline-fails/candidate-passes via stash isolation; full suite and tsc
clean modulo pre-existing/unrelated flakes. Adversarial critique found
and this session fixed forward the whole-file-removed gap and a vacuous
test assertion before this commit.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01UkpQrJUNdFzDJVnY2FzXh8
* dream(memory): #4137 append 2026-10-13 ledger row
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01UkpQrJUNdFzDJVnY2FzXh8
* fix(memory): #4137 bump @claude-flow/memory to 3.0.5 for the delete-sync change
CI's leaf-package-publish audit caught this: @claude-flow/memory is a
non-bundled leaf that resolves from the registry for the release train,
so a publishable source change (auto-memory-bridge.ts) must bump the
leaf's own version or the fix silently never reaches a release. Bumps
the leaf's package.json, the CLI's exact pin (dependencies +
optionalDependencies), and the matching pnpm-lock.yaml specifier.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01UkpQrJUNdFzDJVnY2FzXh8
* fix(memory): #4137 scope delete-sync to the writing memoryDir, avoid version collision with #4183
Review finding: the backend can be shared across multiple memory dirs
(e.g. the SessionStart hook's main dir vs. a worktree dir from
worktreeMemoryDir()). Without recording which memoryDir wrote an entry,
importing one dir could see another dir's same-named file/heading as
"gone" and delete it. Entries now carry metadata.memoryDir, and both
delete-sync passes (per-heading diff and whole-file-removed) only
consider entries whose memoryDir matches the importing bridge's own —
legacy entries written before this field existed (no memoryDir at all)
are therefore never delete-sync eligible. Two new discriminating tests
cover cross-dir isolation and the legacy-entry case; all 9 existing
delete-sync fixtures updated to carry memoryDir so they still exercise
the intended "same dir" path rather than being silently excluded.
Also bumps @claude-flow/memory to 3.0.6 (CLI pins + lockfile specifier)
since #4183 independently claimed 3.0.5 for the same leaf — whichever
of the two PRs lands second needs a version past the other's.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01UkpQrJUNdFzDJVnY2FzXh8
* fix(memory): #4137 revert stray codex/security/shared lockfile drift
An earlier `pnpm install` run in this session (unrelated to this PR's
own change) left pnpm-lock.yaml recording codex/security/shared at
specifier 3.0.6 while v3/@claude-flow/cli/package.json still pins them
at 3.0.5 — a mismatch that got swept into a prior commit by staging the
whole lockfile file. `pnpm install --frozen-lockfile` (what CI runs)
fails on that drift regardless of this PR's actual content. Reverted
those three specifiers back to 3.0.5 to match package.json; the memory
specifier bump to 3.0.6 (this PR's real change) is untouched. Verified
locally: `pnpm install --frozen-lockfile` now succeeds.
Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01UkpQrJUNdFzDJVnY2FzXh8
* chore(memory): untrack test-generated agentdb.rvf.idmap.json
Swept into the previous merge commit by running the test suite to
verify the merge; it's a fresh-run artifact (empty idToLabel/labelToId
maps), not source. Added to .gitignore alongside the other *.rvf
test-pollution exclusions in this package.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(memory): bump @claude-flow/memory to 3.0.7 for the delete-sync fix
AutoMemoryBridge.importFromAutoMemory()'s delete-sync fix in this PR
changed v3/@claude-flow/memory/src/auto-memory-bridge.ts without
bumping the package version. @claude-flow/memory is not bundled into
the release tarballs — it resolves from the registry — so publishing
the three train packages without this bump would ship the old 3.0.6
copy and the fix would reach nobody (ruvnet/ruflo#3335, #3390).
Will publish @claude-flow/memory@3.0.7 standalone once this merges.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(memory): #4137 bump CLI pins + lockfile specifier to match memory@3.0.7
|
||
|
|
5b9b6a9476 |
chore(memory): bump @claude-flow/memory to 3.0.6 and pin it in the CLI (#4279)
The leaf-package-publish audit requires a version bump when publishable memory source changes. Same shape as #4152: memory/package.json, both CLI dependency entries, and the CLI importer's specifier in v3/pnpm-lock.yaml. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
3251adca1e |
chore(memory): bump @claude-flow/memory to 3.0.5 and pin it in the CLI (#4152)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
c536e77fda |
fix(memory): reroute the stale-lock retry AgentDB too; memory 3.0.4
Rebased onto main, where ControllerRegistry and AgentDBBackend build AgentDB inside withAgentdbLockRecovery(); useHostSqliteDriver() now runs inside that closure right after each `new AgentDB`, so the instance a stale-lock retry creates also opens its handle with getHostSqliteDriver(). Tests drive the retry path for both sites. @claude-flow/memory 3.0.3 was published by 3.56.3 without the driver, so this ships as 3.0.4 and the CLI pins 3.0.4. The #3693 memory-owner test now reports a skip when no native addon is available instead of passing. |
||
|
|
dffb5171e0 |
chore(release): 3.56.3 versions and changelog (memory 3.0.3, AgentDB alpha.20)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
01fa240e7c |
wip(memory): agentdb alpha.20 floor + sql.js lock/concurrency guard
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
ec00eed619 |
chore(release): bump leaf packages for 3.56.0 (memory 3.0.2, security 3.0.3)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
f6ad57ba8a |
chore(release): bump leaf packages for 3.55.0 (memory 3.0.1, swarm 3.0.1, security 3.0.2, mcp 3.1.0, plugin-agent-federation 1.0.1)
Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
7307d1d86a |
chore(release): move 18 internal leaf packages from alpha to stable semver
Every @claude-flow/* leaf still on X.Y.Z-alpha.N moves to its stable X.Y.Z (3.0.0, cli-core 3.7.0, the two plugins 1.0.0), matching the public train's move to stable at 3.7.0. @claude-flow/embeddings is deliberately excluded: its registry `latest` (3.0.0-alpha.45) was built from a branch not on main, and publishing from main would drop 139 exported names. Validated before publish: - API surface: each package's main build compared against its published `latest` tarball (files, exports/bin keys, exported names). All 18 are equal-or-superset; no export removed. - Every package builds; ~7.8k tests across 17 suites pass (cli-core has no suite of its own and is exercised through the CLI's). Packaging fixes made along the way: - publishConfig.tag v3alpha/alpha removed so stable versions land on `latest` rather than only the legacy channel tag. - `files` allowlists (dist + README) on the 7 packages that had none. Their published tarballs shipped local runtime state: .claude-flow daemon logs and pids, settings.json, .swarm/memory.db, headless-worker prompt logs. A secret scan of every affected published version found no credentials. mcp shrinks from 335 files to 70, and no longer ships the .claude/ helpers copy that #3411 concerned. - plugins/providers/testing pointed every `types` condition at a nonexistent `.d.js` file; now `.d.ts`, so consumer type resolution works. - Removed three subpath exports whose targets were never built (plugins ./examples/*, performance ./benchmarks/*); they could only throw ERR_MODULE_NOT_FOUND. - Intra-leaf ranges normalised to ^<stable>, including a `file:../security` and a `workspace:*` devDependency that npm publish would ship verbatim. Security: harden attention toSQL against injection (plugins) The 13 attention SQL builders interpolated caller-supplied vectors and config values into SQL that AttentionExecutor executes. TypeScript types do not exist at runtime, so a string element could break out of the quoted vector literal. Every interpolated value is now proven finite-numeric or boolean. A differential run of 195 legitimate inputs across all 13 mechanisms produced byte-identical SQL; the new test fails 11/13 on the original code (which emitted DROP TABLE for 5 payloads) and passes 13/13. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
44ac70aa39 | fix(memory): align leaf version and CLI dependency pins | ||
|
|
582d7d9318 |
chore(release): bump unbundled leaves memory alpha.26, neural alpha.10, cli-core alpha.6
These three resolve from the registry, not the train tarballs, so the source changes already on main (#3352+#3359 memory upsert, #3330 MoE load-balance, #3385 validateEnv denylist) reach nobody without a standalone publish. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
cf9aebf21e |
chore(release): 3.42.5 + @claude-flow/memory 3.0.0-alpha.25
Ships #3390 (#3327 Finding A). The fix spans two packages and only one of them rides the release train, so memory is bumped and published alongside: - cli/src/memory/memory-bridge.ts -> @claude-flow/cli 3.42.5 (train) - memory/src/controller-registry.ts -> @claude-flow/memory 3.0.0-alpha.25 Without the memory publish the embedder half of the fix never reaches users and reasoningBank stays inert, since @claude-flow/memory is NOT in INTERNAL_RUNTIME_PACKAGES and resolves from the registry via ^3.0.0-alpha.23. CLAUDE.md: correct the Publishing Rules claim that internal @claude-flow/* components are all bundled. Only four are (security, codex, mcp, plugin-agent-federation); cli-core, neural, shared and memory resolve from the registry and need a standalone publish when their source changes. Adds a semver-aware pre-tag drift check that fails loudly if it inspects zero leaves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
127a6546c4 |
chore(release): 3.38.17 -> 3.38.18, @claude-flow/memory 3.0.0-alpha.22 -> alpha.23
3.38.17 was published by a concurrent session mid-race with a stale
package.json (the @claude-flow/mcp pin had been reverted to the broken
3.0.0-alpha.10 by a background helper-refresh process just before publish;
see #3005). npm forbids republishing over an existing version, so cutting
3.38.18 with the verified-correct pin instead of trying to fix 3.38.17.
Also discovered @claude-flow/memory is NOT in @claude-flow/cli's
bundleDependencies (unlike @claude-flow/mcp/codex/security/plugin-agent-federation)
-- it's resolved from the registry via a normal ^3.0.0-alpha.22 semver range,
and that exact version is what's currently published, without the #2977 fix
from
|
||
|
|
efd0406e7a |
chore: sync committed versions to already-published 3.36.0 / memory@alpha.22
@claude-flow/cli, claude-flow, and ruflo were published at 3.36.0 (and @claude-flow/memory at 3.0.0-alpha.22, carrying the #2887 durability fix) without the version bump landing back in git — this just reconciles the committed package.json versions with what's actually live on npm, and bumps the cli's @claude-flow/memory floor to the version that has the fix. No code changes. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
f074987ea0 |
feat(security): implement ADR-377 — AgentDB Retrieval Security Layer (#2874)
Implements all 3 phases of ADR-377 (ruvnet/ruflo#2516, tracked in #2873): AgentDB's retrieval and write paths had zero certified defenses against memory poisoning — SMSR (arXiv:2606.12703) shows 93-100% undefended attack success. All three phases are off by default; enabling each is opt-in via env flag until independently benchmarked, per the ADR's own gate criteria. Phase 1 — AgentDbRetrievalGuard (@claude-flow/memory) - New `agentdb-retrieval-guard.ts`, wired into `AgentDBBackend.search()` (covers `query()`'s semantic path too, since it calls `search()` internally). Reuses `@claude-flow/security`'s `ToolOutputGuardrail` (ADR-131) for the actual OWASP LLM01/LLM08 pattern scan rather than duplicating it — `@claude-flow/memory` now depends on `@claude-flow/security` (no cycle: security has zero workspace deps). - Size gate + guardrail scan per retrieved chunk. Flag-only by default; `CLAUDE_FLOW_RETRIEVAL_GUARD_STRICT=true` drops unsafe/oversized chunks instead of just annotating them. Both flags off by default (`CLAUDE_FLOW_RETRIEVAL_GUARD=true` to enable scanning at all). Phase 2 — MemoryPoisonForensics (@claude-flow/hooks) - New `workers/memory-poison-forensics.ts`: rolling-window z-score anomaly detection on write-interval and content-length features per (agentId, namespace), reproducing the Forensic Trajectory Signatures (arXiv:2606.30566) shape (behavioral features on write *sequences*, not content). Opt-in `HookEvent.PostToolUse` handler for memory-write tools; `CLAUDE_FLOW_POISON_FORENSICS=0` disables recording. - NOT wired into any of this repo's three separate "worker" dispatch systems (hooks' own workers/index.ts codebase-analyzers, @claude-flow/swarm's worker-dispatch.ts 12-trigger table, or the CLI's scheduled daemon) — @claude-flow/swarm is a deliberately zero-workspace-dependency package and adding hooks there would break that property; picking the wrong one of three ambiguous dispatch tables seemed worse than leaving that integration as an explicit follow-up. See the file header for detail. Phase 3 — McpCallerIdentity (@claude-flow/security) - New `mcp-caller-identity.ts`: per-invocation Ed25519-signed capability tokens (callerId + toolName + nonce + 30s TTL by default), native node:crypto sign/verify following the same pattern already used by `@claude-flow/browser`'s witness-signer.ts (reimplemented rather than cross-imported — a security-primitives module depending on the browser package would be a backwards layering dependency). - Standalone issue/verify API; deliberately NOT wired into `AgentAuthorizationPropagator.checkToolCall` (ADR-144) or any tool dispatcher — this repo has at least 3 distinct `ToolRegistry` implementations and guessing which is authoritative risked silently wiring the wrong path. `CLAUDE_FLOW_MCP_CALLER_AUTH` defaults to disabled, matching the ADR's own text: key distribution needs a follow-on ADR before this ships enabled. Deviations from the ADR's guessed file paths/class names (documented inline where relevant): the ADR was written against aspirational paths (`agentdb/retrieval-guard.ts`, a `BackgroundWorker` interface, `SafeExecutor`) that don't match the real repo layout — implementation targets the actual `AgentDBBackend`, the actual worker systems, and the actual `AgentAuthorizationPropagator`/tool-registries respectively. Tests: 31 new tests across the three packages (9 + 11 + 11), all passing; full existing suites re-run clean (memory 451, hooks 145, security 570 — zero regressions). |
||
|
|
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
|
||
|
|
402b701a9d |
fix(security): ADR-165 Phase 1 — close 5 critical CVEs + refresh registry + audit CI gate (#2508)
* fix(security): ADR-165 Phase 1 — close all critical CVEs, refresh registry, add CI gate Closes ADR-165 Phase 1. Both workspaces pass `npm audit --audit-level=critical`. ## Before (2026-06-29) | Workspace | Critical | High | Moderate | Total | |-----------|----------|------|----------|-------| | Root | **1** | 6 | 31 | 38 | | v3 | **4** | 33 | 57 | 97 | ## After | Workspace | Critical | High | Moderate | Total | |-----------|----------|------|----------|-------| | Root | **0** | 0 | 31 | 31 | | v3 | **0** | 27 | 58 | 88 | All 5 critical advisories closed (vitest GHSA-5xrq, handlebars prototype-pollution, protobufjs constructor-pollution, plus 2 more in v3). 12 of 39 high advisories closed via overrides; the remaining 27 v3 highs are deeper transitive chains that would require breaking-change major bumps — flagged for ADR-165 Phase 2. ## Changes ### Root workspace overrides (package.json) - `vitest`: `^1.0.0` → `^3.2.6` (closes critical GHSA-5xrq CVSS 9.8) - `hono`: `>=4.11.4` → `>=4.12.25` (closes 6 hono advisories) - `undici`: `>=7.18.0` → `>=8.5.0` (closes 7 undici advisories — bumps the stale pin that ADR-165 flagged as still-in-vulnerable-range) - `vite`: `>=6.4.6` → `>=8.0.16` (closes 2 vite advisories) - NEW `@grpc/grpc-js`: `>=1.14.4` - NEW `form-data`: `>=4.0.6` - NEW `http-proxy-middleware`: `>=3.0.7` - `@hono/node-server`: `>=1.19.10` → `>=1.19.14` ### v3 workspace overrides (v3/package.json + pnpm.overrides) - `vitest`: `^4.0.16` → `^4.1.0` (and `@vitest/coverage-v8` matched) - Top-level + pnpm overrides: `handlebars: >=4.7.9`, `protobufjs: >=8.6.0` - 27 sub-package `package.json` updated to `vitest ^4.1.0` ### CVE registry refresh (v3/@claude-flow/security/src/CVE-REMEDIATION.ts) Rewritten from 5 stale Jan-2026 entries to 16 total: 15 fixed, 1 open (ADR165-OPEN-01 — PII pipeline wiring per ADR-164 §6.1 not yet on dispatch-layer). `SECURITY_SUMMARY` is now computed dynamically from the registry; `validateRemediation()` correctly returns `allFixed: false` with 1 issue. ADR-165 §5 flagged this as THE Phase 2 priority — now closed. ### New CI gate `.github/workflows/cve-audit.yml`: - `audit-root` — `npm audit --audit-level=critical` in root, blocking - `audit-v3` — same in v3, blocking - `audit-high-report` — warn-only summary on high-severity drift - Triggers: PR, push to main, daily cron ### ADR-165 §9 evidence ledger addendum Captures AFTER-remediation `npm audit --json` metadata for both workspaces. The diff between BEFORE (already in §9) and AFTER makes Phase 1 verifiable. Also CORRECTED one prior surprise in §9: the `validate-input.ts` in `mcp-tools/` is NOT a 9-line shim. It's 269 lines of real implementation. (That was an inaccurate findings note from the initial audit.) ### §7.3 research items resolved - `protobufjs` v3 chain confirmed gone after override pins - `handlebars` v3 chain confirmed not user-reachable on the workflow path (toolchain-only; override sufficient) - `validate-input.ts` confirmed real implementation, not a shim (registry entry corrected) - CORS surface check: no `cors()` / `app.use(cors` call sites — the hono CORS-wildcard advisory is not exploitable on the current server - ADR-164 §6.1 PII pipeline NOT wired in current agentbbs dispatch — recorded as ADR165-OPEN-01 (Phase 3 work) ## Gates (all PASS) - `npm audit --audit-level=critical` root: exit 0 (was non-zero) - `npm audit --audit-level=critical` v3: exit 0 (was non-zero) - vitest suites: 105/109 pass (4 skip-conditional — same as before) - ADR-112 audit: 352/352 tools with guidance - business-pods smoke: 11/11 PASS - agentbbs smoke: 8/8 PASS - agenticow smoke: 8/8 PASS - cli build: clean (tsc) ## Phase 2+ deferred The 27 v3 high-severity advisories that remain are transitive chains with no patched-in-range version. ADR-165 §6 Phase 2 picks these up after the `cve-watch.yml` automation in §6 lands (NEW PR — not in scope here). Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01WbBa4nccx5aGhXphoHxcni * chore(lock): regen v3/pnpm-lock.yaml after override updates (PR #2508 CI fix) PR #2508 added handlebars + protobufjs to v3 overrides + bumped vitest pin, but v3/pnpm-lock.yaml wasn't regenerated. CI surfaced ERR_PNPM_LOCKFILE_CONFIG_MISMATCH on every install step. Same pattern as the previous lockfile-drift fixes on PR #2500 and #2503. * fix(ci): cve-audit.yml jq-only + regen witness manifests for #1609 marker drift Two PR #2508 CI failures fixed: 1. Static-regression-guard tripped on cve-audit.yml line 52: the static YAML strict-parser sees `if high > 0:` inside the `run: |` block as a YAML block-mapping key indicator. Refactored all 3 inline-python blocks to use jq (preinstalled on ubuntu-latest) — no embedded `if x > 0:` lines, so the YAML guard passes. 2. Witness marker drift smoke flagged fix-marker #1609 — the Phase 1 vitest bump (4.0.16 → 4.1.0) drifted the cited marker string in v3/@claude-flow/aidefence/package.json. Updated `marker` field in all 3 platform manifests + `desc` to reference ADR-165 Phase 1, then re-signed via plugins/ruflo-core/scripts/witness/regen.mjs. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
d112d4fc8b |
fix(memory): #2432 #2431 + release 3.13.1 — close prior controllers, WAL-safe graph-edge writes
PATCH per semver — pure bug fixes, no API changes. Fixes: #2432 — Unbounded sql.js MEMFS leak (~36 GB observed in production) Root cause: ControllerRegistry.initController() called controllers.set(name, ...) without closing the prior instance. SqlJsRvfBackend wrappers held an Emscripten MEMFS file (~11 MB each = sizeof memory.db) that only releases on explicit .close() — JS GC of the wrapper does NOT reclaim MEMFS because the sql.js module is a process singleton. Fix: added closePriorIfAny(name) helper, called before every controllers.set() site in v3/@claude-flow/memory/src/controller-registry.ts. Best-effort close (catches errors so replacement always proceeds). #2431 — graph-edge-writer.ts dual-write corrupts memory.db (ADR-130 regression) Root cause: sql.js opened memory.db, did in-memory writes, then called fs.writeFileSync(dbPath, db.export()) after every edge insert. This whole-file flush overwrote memory.db while the better-sqlite3 bridge was writing through its WAL — exactly the dual-write race that ADR-068 (#1257) removed. Symptom: PRAGMA integrity_check reports "database disk image is malformed (11)" after a single memory_store + causal-edge sequence. Fix: ported v3/@claude-flow/cli/src/memory/graph-edge-writer.ts from sql.js to better-sqlite3 + WAL mode. Same native engine as the bridge, no whole-file fsync, no race. Public API unchanged. Smoke-tested: 50 concurrent insertGraphEdge() calls + PRAGMA integrity_check → ok. Note: this is the minimum-safe fix. The architecturally cleaner fix (route edge writes through the bridge's controller layer per ADR-068) is deferred to a future ADR. The current fix removes the race by ensuring both writers share the same WAL-coordinated SQLite engine. Version bumps: - @claude-flow/memory 3.0.0-alpha.20 → 3.0.0-alpha.21 - @claude-flow/cli 3.13.0 → 3.13.1 (pins memory ^3.0.0-alpha.21) - claude-flow umbrella 3.13.0 → 3.13.1 - ruflo wrapper 3.13.0 → 3.13.1 Published to npm with all three dist-tags (latest, alpha, v3alpha) for each of the four packages. Verified post-publish: every package × every tag = 3.13.1 (memory at alpha.21). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
5681939173 |
chore(release): 3.10.39 — ADR-147 entity arm + signal provenance (#2317 #2327)
@claude-flow/memory 3.0.0-alpha.19 → 3.0.0-alpha.20. Adds the entity arm
to hybridSearch alongside the existing dense + sparse RRF fusion, plus
per-result signals: ('vector'|'bm25'|'entity')[] provenance.
End-to-end capability smoke against built dist confirmed: Alice needle in
31-doc corpus ranks #1 with all three signals; runner-up has only
vector+bm25 — RRF score gap of ~47%.
@claude-flow/cli, claude-flow, ruflo 3.10.38 → 3.10.39. CLI also pins
@claude-flow/memory to ^3.0.0-alpha.20 so the wrapper users pick up the
entity arm automatically.
All four packages published with latest+alpha+v3alpha aligned.
Lockfile regen included (lesson from #2311 — bumping a workspace dep
without regenerating v3/pnpm-lock.yaml breaks frozen-lockfile CI).
Co-Authored-By: RuFlo <ruv@ruv.net>
|
||
|
|
d065b15927 |
chore(release): 3.10.37 — auto-memory cluster fixes (#2281–#2285)
- @claude-flow/memory: 3.0.0-alpha.18 → 3.0.0-alpha.19 - @claude-flow/cli: 3.10.33 → 3.10.37 - claude-flow: 3.10.33 → 3.10.37 - ruflo: 3.10.33 → 3.10.37 All four packages published to npm with `alpha`, `latest`, and `v3alpha` dist-tags pointing at the new versions. README syncs in `ruflo/` and `v3/@claude-flow/cli/` come from prepublishOnly's `cp ../README.md ./README.md`. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
e6dc21fc79 |
chore(release): bump 3.10.12 → 3.10.13 + agentdb@3.0.0-alpha.16
Picks up the agentdb ADR-073 round (ruvnet/agentdb#6): - security hardening: parseJsonStrict, validateSqlIdentifier on migrate.ts, crypto.randomBytes() IDs (CWE-338) — closes 3 HIGH/MED findings - 3 new MCP tools: causal_traverse · agentdb_delete_batch · consolidate_now - recall@k benchmark harness (committed run JSON: recall@10 = 0.912 at N=2000, D=384, M=16/efC=200/efS=100) ruflo's MCP memory bridge automatically picks up the new tools. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
cea01866ee |
chore(release): bump 3.10.11 → 3.10.12 + agentdb@3.0.0-alpha.15 (closes #2235 A)
Upgrades the bundled `agentdb` to `3.0.0-alpha.15`, which fixes the legacy- SQLite branch so the optionally-installed `better-sqlite3` is finally engaged by the MCP memory bridge (ruflo#2235 part A — the matching agentdb fix is ruvnet/agentdb#3, also closing ruvnet/agentdb#1 + #2 via inlined schemas). - `@claude-flow/cli` optionalDeps `agentdb`: ^3.0.0-alpha.14 → ^3.0.0-alpha.15 - `@claude-flow/memory` deps `agentdb`: ^3.0.0-alpha.14 → ^3.0.0-alpha.15 - root + `ruflo` wrapper `overrides.agentdb`: >=3.0.0-alpha.15 (per the #2112 lesson — root overrides do NOT propagate to the published wrapper, so both need it) Closes #2235 (A). Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
27e91c7fb5 |
chore(release): publish 3.7.0-alpha.71 + @claude-flow/memory@3.0.0-alpha.18
Bumps @claude-flow/cli, claude-flow, ruflo to 3.7.0-alpha.71 and @claude-flow/memory to 3.0.0-alpha.18. This release ships ADR-125 end-to-end — `@claude-flow/memory` consolidation across both PR A (#2062, phases 1+2+6+7) and PR B (#2063, phases 3+4+5). Published artifacts: - @claude-flow/cli@3.7.0-alpha.71 (tags: alpha, latest, v3alpha) - claude-flow@3.7.0-alpha.71 (tags: alpha, latest, v3alpha) - ruflo@3.7.0-alpha.71 (tags: alpha, latest, v3alpha) - @claude-flow/memory@3.0.0-alpha.18 (tags: alpha, latest, v3alpha) ADR-125 delivered: - Canonical MemoryService entry point (UnifiedMemoryService deprecated) - Real HybridBackend default wired (ADR-009 fulfilled) - Persistent HNSW with snapshot/restore on close + every Nth write - MemoryConsolidator (sweepExpired + dedup + compactHnsw + autoRun) - Graceful retrieval degradation + FTS5 keyword fallback - Runnable benchmarks with measured baseline - RuVector boundary cleanup + no-stray-DB CI smoke Test count: 367 → 378 (PR A) → 403 (PR B) across 15 test files. All 8 ADR-125 acceptance criteria locked in. Closes #2061 Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
ed95d67822 |
feat(memory): #2061 ADR-125 Phase 6 — runnable benchmarks + baseline results
Previously `npm run bench` matched no files because `vitest.config.ts` restricts include to `src/**/*.test.ts`. ADR-125 Phase 6 lands a dedicated `vitest.bench.config.ts` that discovers `benchmarks/**/*.bench.ts`, and the `bench` script now points at it. Additions: - `vitest.bench.config.ts` — bench discovery config; legacy custom-framework bench files (cache-hit-rate, hnsw-indexing, memory-write, vector-search) are excluded for now and will be ported in a follow-up alongside Phase 3. - `benchmarks/hnsw-search.bench.ts` — first real vitest `bench()` suite. Measures `HNSWIndex.search` (k=10, k=50) and `addPoint` against 1k random 128-dim vectors. - `benchmarks/results/baseline-20260519T212453Z.md` — first measured baseline, committed so the README perf table has a real referent. - `benchmarks/results/scripts/run-baseline.mjs` — companion script that produces the JSON blob the baseline.md references. Measured baseline on Darwin / M-series: build_time_ms: 533.42 (1k vectors, 128-dim) search_k10_avg_ms: 0.5294 (~1.9k ops/s) search_k50_avg_ms: 0.5235 add_avg_ms: 0.8656 378 tests still passing — no regression. Refs: ADR-125 Phase 6 Closes: part of #2061 Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
4e9a33ce2a |
feat(memory): #2061 ADR-125 Phase 1 — MemoryService canonical entry point + deprecate UnifiedMemoryService
Land Phase 1 of ADR-125. Public API now exports `MemoryService` as the
canonical entry point, with `UnifiedMemoryService` preserved as an
`@deprecated` alias (same class) until 3.0.0-rc.
Removed from the public surface:
- `HnswLite` — internal to RvfBackend; reachable via explicit module path.
- `RvfBackend` — selected through `createDatabase({ provider: 'rvf' })`.
Updates:
- `prepublishOnly` now requires `MemoryService` + `UnifiedMemoryService`
AND fails if `HnswLite` / `RvfBackend` re-appear on the top-level surface.
- New `src/index.test.ts` (7 tests) asserts the canonical surface.
- New `docs/migration-3.0.0-alpha.18.md` documents rename + deprecation.
No runtime behavior change. All 367 existing tests still pass; +7 new.
Refs: ADR-125 Phase 1, ADR-006, ADR-009
Closes: part of #2061
Co-Authored-By: RuFlo <ruv@ruv.net>
|
||
|
|
9a8c9c464f |
fix(supply-chain): #2046 — eliminate all root-level HIGH/CRITICAL CVEs
Before:
Root npm audit: 13 HIGH/CRITICAL across 25 vulns
@claude-flow/browser fresh install: similar transitive chain
Audit script reported 0 unaccepted only because it correctly scopes
to direct deps — but transitive surface was hostile
Changes:
1. Bump agentdb to 3.0.0-alpha.14 (was alpha.10/13 across repo)
- 3.0.0-alpha.14 dropped @opentelemetry/sdk-node from its
dependencies block (still in optionalDependencies; overrides handle
that). Eliminates the @opentelemetry/sdk-node CVE chain via direct
dep replacement.
- Updated: v3/@claude-flow/memory, v3/@claude-flow/cli, root.
2. Bump agentic-flow 2.0.7 → 2.0.11 (root) and ^2.0.3 → ^2.0.11
(v3/@claude-flow/browser). Latest 2.x; closer to a Xenova-clean
release when upstream ships it.
3. Add npm overrides at the root + at v3/@claude-flow/browser package
(overrides do not cascade across separate npm projects, so browser
needs its own block for standalone publish):
@opentelemetry/sdk-node >= 0.218.0 (was <0.217.0 CVE)
@opentelemetry/auto-instrumentations >= 0.75.0
@opentelemetry/exporter-prometheus >= 0.217.0
axios >= 1.13.2
fast-uri >= 3.1.0
vite >= 6.4.6
ws >= 8.18.4
Plus the existing browser-package overrides for hono / undici / tar /
minimatch / picomatch / flatted / etc. — copied from root to keep
the standalone npm-published install clean.
After:
Root npm audit: 0 vulnerabilities (13 HIGH/CRITICAL → 0)
Supply-chain audit: PASS (0 unaccepted direct-dep findings)
Browser tests: 230/230 passing
Graph-intel tests: 104/104 passing
One CVE remains in v3/@claude-flow/browser's STANDALONE fresh install
(end-user `npm install`): @xenova/transformers via agentic-flow direct
dependency. Cannot fix without upstream agentic-flow shipping a Xenova-
free release. agentic-flow@3.0.0-alpha.2 still has it. Documented in
accepted-findings.json under cve[] with:
tracking: ADR-121 Phase 4
expiresAt: 2026-08-19 (audit re-fails if upstream still hasn't shipped)
rationale: browser package does not invoke embedding code paths
This is the right level of triage. The audit doesn't lie about it — it
just doesn't block our shipping while we wait for upstream.
Co-Authored-By: RuFlo <ruv@ruv.net>
|
||
|
|
5b71c7ac13 |
release(alpha.43+44): pin neural→sona@0.1.5, republish modules w/ standalone READMEs, add npm download badges everywhere (#2022)
This commit closes the chain started in |
||
|
|
9056720219 |
fix(browser): #2015 round 2 — strip bogus --kind flag, ship alpha.42
Round 1 (alpha.41) added the required --dimension flag to `ruvector rvf create` but left the equally bogus `--kind browser-session` in place. ruvector@0.2.25's `rvf create` accepts only: -d, --dimension <n> (required) -m, --metric <metric> (optional, default cosine) Commander's required-option check fires before its unknown-option check, so the original bug report (#2015) only surfaced the dimension error. The fresh live regression check after publishing alpha.41 exposed the second-layer bug: `error: unknown option '--kind'`. This round: - Strip `--kind browser-session` from all 5 call sites (TS source, compiled dist via rebuild, replay-spike.sh, browser-agent.md, browser-record/SKILL.md). Also fixed the ADR prose example. - Tighten the smoke (scripts/smoke-browser-rvf-create-flags.mjs): - Switch from rg-based content scan to an explicit PATHS_IN_SCOPE list (the original `--kind browser-session` anchor is gone, so we can no longer identify call sites by content). - Police BOTH invariants per line: * --dimension / -d is present * --kind is ABSENT (since ruvector@0.2.25 rejects it) - Skip quoted-string false positives ('rvf create failed' log lines). Versions: @claude-flow/cli 3.7.0-alpha.42 claude-flow 3.7.0-alpha.42 ruflo 3.7.0-alpha.42 @claude-flow/memory 3.0.0-alpha.16 (unchanged, #2019 fix already live) Post-publish live functional check (everything green): - ruvector rvf create --dimension 384 (no --kind): exit 0, .rvf file written. Reproduces what the MCP tool now invokes. - Published CLI dist:113 carries '--dimension','384', no --kind. - #2019 vectorBackend / graphAdapter functional test from alpha.41 still passes against published memory@3.0.0-alpha.16. - verify.mjs precondition contract still holds. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
d6936bae33 |
chore(@claude-flow/memory): bump to 3.0.0-alpha.15 (published)
Anchor the version published to npm with the #1867 fix. Co-Authored-By: RuFlo <ruv@ruv.net> |
||
|
|
966335022a |
fix(@claude-flow/memory@3.0.0-alpha.15): #1867 unblock install on Node 26
`better-sqlite3@^11` has no Node-26 prebuilds and fails its node-gyp source
build against current V8, breaking `npm i ruflo@latest` on Node 26.
The runtime already had a sql.js / RVF fallback in `database-provider.ts`,
but `sqlite-backend.ts` carried a top-level `import Database from
'better-sqlite3'`. ESM evaluated that on import, so missing native module
threw `ERR_MODULE_NOT_FOUND` before any provider selection could happen.
- `sqlite-backend.ts`: type-only static import; runtime load deferred to
`initialize()` via `await import('better-sqlite3')`, with an actionable
error if missing.
- `package.json`: `better-sqlite3` moved from `dependencies` →
`optionalDependencies`, bumped to `^12.9.0` (Node-26 prebuilds available).
Verified: install survives without better-sqlite3 (auto-falls back to
RVF, store/get round-trips OK); native path still works end-to-end with
better-sqlite3@12.9.0 installed.
Closes #1867
Co-Authored-By: RuFlo <ruv@ruv.net>
|
||
|
|
01070ede81 |
fix: Tier A blockers #1596, #1567, #1556 (v3.5.80) (#1598)
* fix: resolve Tier A blockers #1596, #1567, #1556 #1596 — CLI lazy-command routing: `ruflo daemon start` was mis-routed to the top-level `start` command because the parser only registered the 10 core sync commands and its greedy Pass 1 walk happily matched `start` as the command with `daemon` left as a positional. Teach the parser about lazy command names via `registerLazyCommandName()`, stop Pass 1 at the first non-flag positional, and recognize lazy names in Pass 2 so commandPath becomes `['daemon', 'start']`. The existing positional-based subcommand fallback in CLI.run() then dispatches correctly. Affects every lazy-loaded command (daemon, doctor, embeddings, neural, config, workflow, hive-mind, ...). #1567 — agent_spawn Zod field mismatch: validate-input.ts was passing `{ agentType, name }` to @claude-flow/security's SpawnAgentSchema, which expects `{ type, id }`, so every MCP agent_spawn call failed with `type: Required`. Align the field names. Also swallow `invalid_enum_value` issues because the schema enumerates only 15 built-in agent types — we support custom types and the inline identifier validator already gated unsafe input. #1556 — AutoMemoryBridge destroys hand-curated MEMORY.md: `curateIndex()` fired on every Stop hook tick and overwrote MEMORY.md with a single-line title stub whenever none of the files in memoryDir matched the 7 hardcoded DEFAULT_TOPIC_MAPPING filenames — which is exactly the situation for any project using Claude Code's native `<type>_<topic>.md` memory convention. Skip the write entirely when there are no sections to curate and emit `index:skipped` instead; `curate` must be non-destructive when there's nothing to curate. Tests: - __tests__/parser.test.ts: 4 new cases cover lazy command routing, bare lazy commands, and global flags before a lazy command. - __tests__/validate-input-agent-spawn.test.ts: built-in type, custom type, bad identifier, and no-domain cases. - src/auto-memory-bridge.test.ts: new #1556 case + updated empty-file case to assert the new non-destructive semantics. All 120 CLI + 74 memory tests pass locally. Co-Authored-By: claude-flow <ruv@ruv.net> * chore: bump to 3.5.80 / memory 3.0.0-alpha.14 for Tier A fixes - @claude-flow/cli 3.5.78 → 3.5.80 - @claude-flow/memory 3.0.0-alpha.13 → 3.0.0-alpha.14 - claude-flow umbrella 3.5.78 → 3.5.80 - ruflo umbrella 3.5.78 → 3.5.80 Also fixes memory package's prebuild script to clean tsconfig.tsbuildinfo so tsc --incremental produces fresh output after rm -rf dist. Matches published npm artifacts for issues #1596, #1567, #1556. Co-Authored-By: claude-flow <ruv@ruv.net> --------- Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
0752e5963c |
fix: remove simulations, real embeddings, honest metrics v3.5.53
- #1514: Remove fabricated token savings (hardcoded +=100 per cache hit, baseline=1000). getOptimalConfig() now scales with agentCount. neural_train stores real embedding patterns via generateEmbedding(). neural_predict uses cosine similarity against stored patterns (no hardcoded labels). Returns empty array when no patterns exist. verifySignature() confirmed already real (HMAC + timingSafeEqual). - #1516: All embedding model defaults prefixed with Xenova/ so @xenova/transformers resolves correctly. ControllerRegistry now passes embeddingModel to AgentDB constructor. - #1521: @claude-flow/memory bumped to 3.0.0-alpha.13, better-sqlite3 moved from optionalDependencies to dependencies. - #1526: hook-handler normalizes snake_case tool_input/tool_name from Claude Code. intelligence.cjs scoped to current project only (was scanning all 51+ project dirs). - ADR-073: Documents stub tool honesty policy and real predictions. Closes #1514, #1516, #1521, #1526 Co-authored-by: Reuven <cohen@ruv-mac-mini.local> |
||
|
|
5e51914c19 |
fix(memory): add prepublishOnly guard to prevent missing dist exports (#1314)
Reviewed in ADR-065. ACCEPT — runtime export verification guard. |
||
|
|
748a1d424a |
fix: doctor checks + AgentDB bridge errors (v3.5.19)
Doctor fixes: - #1339: detect .claude-flow/config.yaml and .yml configs - #1340: suppress API key warning inside Claude Code (detect CLAUDE_PROJECT_DIR) - #1344: recognize 'ruflo' as valid MCP server name alongside 'claude-flow' AgentDB bridge fixes: - #1313: republish @claude-flow/memory@3.0.0-alpha.12 with controller-registry.js - #1343: actionable error messages pointing to memory_store/memory_search Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
4603300368 |
feat: Ruflo v3.5.0 — first major stable release with full agentic-flow integration
Rebranding from Claude Flow to Ruflo. Includes: - agentic-flow v3.0.0-alpha.1 deep integration (10 subpath exports) - AgentDB v3.0.0-alpha.9 with 8 controllers + 6 MCP tools - Unified agentic-flow bridge with tiered embedding resolution - Security hardening (command injection fix, TOCTOU race fix) - Doctor health check for agentic-flow - 22 agent/skill files updated to v3.0.0-alpha.1 - ADR-054, ADR-055, ADR-056 - Comprehensive CHANGELOG from 5,800+ commits - All 3 packages bumped to 3.5.0 Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
a55737991d |
feat: integrate agentdb 3.0.0-alpha.9 with 8 new controllers + 6 MCP tools
Upgrade agentdb dependency to 3.0.0-alpha.9 (zero deprecation warnings, pure JS SQLite, updated ruvector). Wire 8 new controllers into ControllerRegistry (HierarchicalMemory, MemoryConsolidation, BatchOperations, ContextSynthesizer, GNNService, RVFOptimizer, MMRDiversityRanker, GuardedVectorBackend) with level-based init. Add 6 new MCP tools (hierarchical-store/recall, consolidate, batch, context-synthesize, semantic-route) and bridge functions. Update README with AgentDB v3 Controllers documentation section. Co-Authored-By: claude-flow <ruv@ruv.net> |