Commit Graph
13 Commits
Author SHA1 Message Date
ruv 6ac6840a11 fix(agentdb): NFKC-fold recalled memories and judge key/value pairs before attaching (ADR-450 T5), 0.4.7
Recall folds each retrieved item with NFKC (bounded, never throws) and screens the folded text, so fullwidth, circled, mathematical and ligature spellings of an injection phrase or a secret are dropped. Structured fields are judged as name=value pairs with the guard's extras(). The shared screen region is untouched.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 05:19:08 -04:00
ruv c07e41850d feat(ruflo-agentdb): screen the file memory_import reads (0.4.6)
The guard saw only inputPath. It now stats then reads the file (regular, 1 MB max, under the project root or home, no traversal) and screens it; it fails open on any problem.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 03:30:03 -04:00
ruv 79470ce892 feat(ruflo-agentdb): guard four more free-text writers (0.4.5)
Verified the claim-10 tools against the MCP registry schemas: agentdb_feedback
(patterns[]), agentdb_session-end (summary), hive-mind_memory (value) and
session_save (description) persist free text, so they join WRITERS.
memory_import (file path), rvf_ingest and hooks_compress_store (vectors) take no
text and stay unguarded.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 01:41:44 -04:00
ruv d06b0122be fix(mods): shared textsOf reports truncation and every guard fails closed on it
The walker dropped input past its node, character and per-string budgets
silently, so 32 guards passed a secret placed after the cap. textsOf now
appends a TRUNCATED marker; names/hasSecretIn treat it as a finding. Regenerated
the 38 copies, bumped the 39 plugins, emptied the known-holes baseline.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 00:27:13 -04:00
ruv aa4b1bc042 chore(mods): bump the six plugins whose version collided with main after merge
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 23:58:54 -04:00
ruv 21adb5ce28 feat(mods): vendor the flag option parser from one origin with the screen sync and drift check (review #2)
Extend scripts/sync-mod-screen.mjs to a second kit: the flag() helper in hooks/options.ts of 38 mods now sits between SHARED FLAG markers and is
rewritten/checked from ruflo-agentdb. Drift, a lost marker or zero copies fails --check. Bump the 39 touched plugin versions and their version pins.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 23:46:06 -04:00
ruv fd3fade675 Merge origin/main into loop/live-recall
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 22:50:32 -04:00
ruv 86f4032195 fix(ruflo-agentdb): live-verified recall (0.4.1) + live harness and validation report
Run against a real initialised AgentDB with real MCP servers and headless haiku
(v3/docs/validation/agentdb-recall-live-2026-10.md, scripts/live-agentdb-recall.sh).

Defects found by the live run and fixed:
- status.json only flushed on attach/block: skipped, timed-out, cached and error
  counters were invisible; add lastReader and lastError
- a permission-refused or failing reader call was swallowed and read as "nothing
  relevant"; now counted in errors/lastError
- memory_search (the only semantic reader) was never used; it is now the first
  reader, whole prompt only, and its 60-character value cut is completed with
  memory_retrieve before the screen and the frame
- ruvector scores arrive as strings and are noise (-0.10..0.10); read numeric
  strings and skip results scoring under 0.25
- an all-unsafe answer ended the search, hiding a clean memory behind a poisoned
  one; the walk continues and dropped counts each note once
- readers were cached even when none was connected
- add directed-at-the-assistant phrasing rules (plugin-local): haiku followed 6 of
  10 injected directives that passed the shared screen, whatever the frame said

41 plugin tests (was 26), smoke 19/19, claude plugin validate passes.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 22:48:04 -04:00
ruv 0b5eb1c109 fix(mods): secret screen judges values, not names — fewer false positives, vendor keys, URL credentials, env assignments, 200 KB scan (ADR-445)
One canonical region in ruflo-agentdb/hooks/screen.ts, regenerated into the 37 copies by sync-mod-screen.mjs. 'key assignment' is now decided by
the value (not a call/env/path/placeholder/UUID/name; two character classes; >=2.5 bits entropy). Adds stripe, npm, huggingface, sendgrid, twilio,
slack webhook and credentialed DB URL rules; bearer and DB URL placeholders are rejected. 40 new agentdb tests; 20 KB ReDoS probe 0.57 -> 0.68 ms.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 19:50:47 -04:00
ruv 1b468fb60e feat(ruflo-agentdb): AgentDB as a mod (ADR-445)
Opt-in safe recall into the prompt (per-prompt context, deadline-bounded, screened as
untrusted), a write guard that keeps secrets out of memory, /agentdb, a status file.
Plugin 0.4.0; 20 hook/unit tests; bench; smoke steps M1-M3.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 14:36:29 -04:00
ruvnet e332689b8c fix(release): harden hooks, statusline, security, and plugin MCP integration 2026-07-16 23:06:29 -04:00
ruv 7fcdede483 darwin-plugins iter 3 — ruflo-agentdb: fix stale '10 checks' count (smoke has 13 + 3 INV) 2026-06-26 20:26:29 -04:00
ReuvenandRuFlo 6324f5ae07 feat(ruflo-agentdb): v0.3.0 — accurate surface, RaBitQ workflow, namespace contract, hook integration
Implements ADR-0001 for ruflo-agentdb: ends the "19 controllers" myth,
surfaces the RaBitQ 32× quantization path that was buried in the substrate,
documents three HNSW operating profiles, owns the namespace convention
that downstream plugins (ruflo-browser, ruflo-rag-memory, ruflo-intelligence)
have been re-inventing, and adds a 16-check smoke contract.

Changes:
- bump 0.2.0 → 0.3.0; new keywords (rabitq, quantization, namespace-convention,
  controller-bridge, mcp)
- README: real INIT_LEVELS table from controller-registry.ts:160-174 (no more
  "19 controllers" magic number); namespace convention contract (reserved
  list, controller-routing rules, GC posture, naming guardrails); operational
  fallback table (pattern-store fallback, graph-node backend, bridge
  unavailable); compatibility section pinning to @claude-flow/cli v3.6
- ADR-0001: surface accuracy, RaBitQ, HNSW tuning, namespace convention,
  fallback docs, smoke as contract, pinning posture (200 lines, status
  Proposed, file-and-line-cited)
- agentdb-specialist agent: replaces "19 Controllers" header with the real
  3-family count table (15+10+3); routing matrix; fallback response branching
- /agentdb command: defers controller count to runtime tool
- /embeddings command: adds RaBitQ 5-step recipe + hyperbolic + neural notes
- agentdb-query skill: drops "19 Controllers", adds namespace-routing warnings
  and fallback branching guide
- vector-search skill: splits @claude-flow/memory HNSW (large-scale, 150–
  12,500×) from WASM ruvllm_hnsw_* router (~11 patterns); adds RaBitQ
  quantized-search section with rerank caveat; documents 3 tuning profiles
  (recall-first/balanced/latency-first)

Claude Code surface (added per follow-up):
- README "How Claude Code populates AgentDB" section: memory_import_claude
  (manual + .claude/helpers/auto-memory-hook.mjs SessionStart=import,
  SessionEnd=sync), memory_bridge_status, memory_search_unified default
  namespace list, plus the pattern-vs-patterns pluralization gotcha
- README "Hook integration convention" table: SessionStart→claude-memories,
  post-task --train-neural→pattern (ReasoningBank), pretrain→patterns,
  ruvector trajectory hooks→ruvector substrate. Implication: don't double-
  write, don't manually refresh claude-memories, surface fallback responses

Verification:
- bash plugins/ruflo-agentdb/scripts/smoke.sh → 16 passed, 0 failed
  (3 doc invariants + 10 ADR contract checks + 3 Claude Code surface checks)
- Smoke checks #7-#9 are source-inspection on agentdb-tools.ts (no env-var
  gate exists to force the bridge-unavailable path live, as flagged in ADR
  Verification caveat)

Pre-existing unrelated edits (v3/@claude-flow/cli/src/commands/performance.ts,
neural-tools.ts, embedding-service.ts) and untracked files left out of this
commit — they predate this session.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-05-04 19:33:35 -04:00