Commit Graph

48 Commits

Author SHA1 Message Date
Peter Steinberger 59866dd253
fix(memory): restore readonly recovery helper seams 2026-03-31 23:14:24 +09:00
Peter Steinberger 4fb373466e
refactor: simplify memory recovery and test setup 2026-03-31 15:02:11 +01:00
Vincent Koc 3a5042b6cc fix(memory): surface qmd degraded vector status 2026-03-31 17:35:36 +09:00
Vincent Koc d2dcd6fca6
fix(memory): stagger qmd embed maintenance across agents (#58180)
* fix(memory): stagger qmd embed maintenance across agents

* fix(memory): keep qmd embed serialization in-process

* fix(memory): extend qmd embed lock wait budget
2026-03-31 17:17:20 +09:00
Vincent Koc 5707038e6c
fix(memory): preserve qmd query semantics and collection recovery (#58183)
* fix(memory): preserve qmd search queries and repair collection rebuilds

* fix(qmd): cover null-byte rebuild cycle
2026-03-31 17:07:35 +09:00
Vincent Koc 075645f5cb
fix(memory): use explicit qmd snippet line metadata (#58181)
* fix(memory): preserve qmd snippet line metadata

* Memory/QMD: preserve snippet span with partial line metadata
2026-03-31 17:05:53 +09:00
Shakker 020858647d test: fix qmd and discord ci regressions 2026-03-31 01:40:55 +01:00
Altay 910134b702 fix(memory): stabilize qmd collection scoping 2026-03-30 22:41:21 +03:00
Altay 9c25544e6c
test(ci): fix stale regression expectations (#57899) 2026-03-30 22:31:13 +03:00
Vincent Koc b7de04f23f
fix(memory): preserve shared qmd collection names (#57628)
* fix(memory): preserve shared qmd collection names

* fix(memory): canonicalize qmd path containment
2026-03-30 19:29:35 +09:00
Vincent Koc 118a497496
fix(memory): keep qmd session paths roundtrip-safe (#57560) 2026-03-30 18:57:03 +09:00
Vincent Koc 89dbaa87aa
fix(memory): add cli qmd session context (#57493) 2026-03-30 16:18:56 +09:00
Gustavo Madeira Santana fca8880968 Tests: reuse QMD availability mock type 2026-03-30 00:59:26 -04:00
Gustavo Madeira Santana 16b452040b Memory: fix QMD doctor contract typing 2026-03-30 00:54:41 -04:00
Vincent Koc 8623c28f1d
fix(memory): warn when qmd binary is missing (#57467)
* fix(memory): warn when qmd binary is missing

* fix(memory): avoid probing cached qmd managers

* docs(memory): clarify qmd doctor probe behavior

* fix(memory): probe qmd from agent workspace
2026-03-30 13:44:41 +09:00
Vincent Koc c142a396f4
fix(memory): rebind qmd collections on pattern drift (#57438) 2026-03-30 12:43:44 +09:00
Vincent Koc da35718cb2
fix(memory): add qmd mcporter search tool override (#57363)
* fix(memory): add qmd mcporter search tool override

* fix(memory): tighten qmd search tool override guards

* chore(config): drop generated docs baselines from qmd pr

* fix(memory): keep explicit qmd query override on v2 args

* docs(changelog): normalize qmd search tool attribution

* fix(memory): reuse v1 qmd tool after query fallback
2026-03-30 12:07:32 +09:00
Vincent Koc 9b33380fb6 fix(test): harden qmd release callback typing 2026-03-30 09:37:21 +09:00
Vincent Koc 5bac1aad04
fix(memory): support qmd glob collection flags (#57351) 2026-03-30 09:30:49 +09:00
Vincent Koc d26d7c797b
fix(memory): add QMD sync parity hooks (#57354)
* fix(memory): add qmd sync parity hooks

* fix(memory): avoid blocking qmd session warm searches
2026-03-30 09:25:37 +09:00
hnshah 19113637e8
fix(memory): keep qmd embeddings active in search mode (#54509)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-30 08:59:50 +09:00
dadgo 2885c65c74
fix(memory): point qmd config dir at nested path (#39078)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-30 08:59:08 +09:00
Armand du Plessis b888741462
fix: QMD 1.1+ mcporter compatibility with legacy fallback [AI-assisted] (#54728)
* fix: QMD 2.0 mcporter compatibility with v1 fallback [AI-assisted]

QMD 2.0 unified all search modes under a single 'query' MCP tool
with typed sub-queries, replacing search/vector_search/deep_search.

- Default to QMD 2.0 'query' tool with {searches: [...]} format
- Auto-detect version on first call and cache for the session
- Fall back to v1 tool names if 'query' is not found
- Backwards compatible: v1 users get one retry then cached

AI-assisted: Built with Claude (Opus 4.6) via OpenClaw. Fully tested
against QMD 2.0 with mcporter 0.7.3 daemon. v1 fallback path not
live-tested (no v1 instance available). Code reviewed and understood.

* test: add QMD v2 tool format and v1 fallback tests

- Verify mcporter bridge uses 'query' tool with {searches: [...]} format (v2)
- Verify fallback to 'deep_search' with {query, limit} format when v2 not found
- Verify v1 fallback logs a warning for visibility

* fix: address review feedback — multi-collection v1 fallback + test cleanup

- Fix multi-collection v1 fallback: resolve effectiveTool at the top
  of runQmdSearchViaMcporter so stale 'query' tool names from the
  loop are corrected once qmdMcpToolVersion is set to 'v1'
- Assert callCount in v1 fallback test (one v2 attempt + one v1 retry)
- Remove spurious global state reset (qmdMcpToolVersion is per-instance)

* docs: correct version references — breaking change was QMD 1.5, not 2.0

The MCP tool removal (search/vector_search/deep_search → query) happened
in QMD 1.5, not 2.0. QMD 2.0 was the SDK/library refactor.
Updated all comments, test names, and documentation to reflect this.

* fix: respect searchMode when building v2 mcporter queries

When searchMode is 'search' (BM25), only send lex sub-query.
When 'vsearch', only send vec. Default 'query' sends all three
(lex + vec + hyde) for full hybrid search with reranking.

Previously all three sub-queries were always sent regardless of
the configured searchMode, which could trigger unnecessary vector
embedding and HyDE LLM work on setups explicitly requesting
lexical-only search.

Addresses Codex P2 review feedback.

* docs: correct to QMD 1.1.0 — that's the actual version that removed the tools

Per CHANGELOG.md, MCP tools search/vector_search/deep_search were removed
in QMD 1.1.0 (2026-02-20), not 1.5 (which doesn't exist). Versions go
1.0.7 → 1.1.0 → 1.1.1 → 1.1.2 → 1.1.5 → 1.1.6 → 2.0.0.

* fix: remove redundant v1 guard (race condition) + tighten error matching

1. Remove qmdMcpToolVersion !== 'v1' guard from catch block. It's
   redundant (effectiveTool === 'query' already prevents infinite retry)
   and introduces a race condition: concurrent searches that both probe
   with 'query' while version is null would fail after the first sets
   version to 'v1'.

2. Tighten isToolNotFoundError regex to require 'Tool' near 'not found'
   (within 40 chars, no sentence boundary). Prevents false-positives
   when user query text in the mcporter args contains both words.

Addresses Greptile P1 (concurrent-search race) and Codex P2
(overly broad error matching).

* fix: address claude code review — type safety, minScore docs, explicit switch

- Restore type union for tool param instead of bare string
- Add comment explaining minScore omission for v2 (QMD 1.1+ uses
  its own reranking pipeline, no minScore parameter)
- Make buildV2Searches switch exhaustive with explicit case 'query'

* fix: resolve CI failures — oxfmt formatting + TypeScript type errors

- Run oxfmt to fix formatting issues
- Add union return type to resolveQmdMcpTool() and
  runMcporterAcrossCollections() tool param to satisfy tsc
  (string was not assignable to the union type)

* fix(memory): align qmd query collection filters

* fix(memory): narrow qmd missing-tool fallback detection

* fix(memory): ignore qmd timeout text for v1 fallback

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-03-30 08:07:14 +09:00
Peter Steinberger 8861cdbb6f
refactor(plugin-sdk): untangle extension test seams 2026-03-29 23:43:53 +01:00
Vignesh Natarajan 1a0c3bf400
Memory: fix FTS-only branch compile on rebased main 2026-03-29 00:09:33 -07:00
Vignesh Natarajan 598f539be5
Memory: keep FTS-only indexing on reindex (#42714) 2026-03-29 00:06:49 -07:00
opriz 41c30f0c59
fix: populate FTS-only memory search without provider (#56473) (thanks @opriz)
* fix(memory): build FTS index when no embedding provider is available

* fix(memory): trigger full reindex on provider→FTS-only transition

* fix(memory): return FTS-only keyword hits at default threshold

* fix: keep FTS-only memory hits at default threshold (#56473) (thanks @opriz)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-29 12:22:35 +05:30
Tak Hoffman 3ce48aff66
Memory: add configurable FTS5 tokenizer for CJK text support (openclaw#56707)
Verified:
- pnpm build
- pnpm check
- pnpm test -- extensions/memory-core/src/memory/manager-search.test.ts packages/memory-host-sdk/src/host/query-expansion.test.ts
- pnpm test -- extensions/memory-core/src/memory/index.test.ts -t "reindexes when extraPaths change"
- pnpm test -- src/config/schema.base.generated.test.ts
- pnpm test -- src/media-understanding/image.test.ts
- pnpm test

Co-authored-by: Mitsuyuki Osabe <24588751+carrotRakko@users.noreply.github.com>
2026-03-28 20:53:29 -05:00
Vignesh Natarajan 19e52a1ba2
fix(memory/qmd): honor embedInterval independent of update interval 2026-03-28 18:05:05 -07:00
Vignesh Natarajan 4e74e7e26c
fix(memory): resolve slugified qmd search paths (#50313) 2026-03-28 16:26:38 -07:00
buyitsydney 4b69c6d3f1 fix(memory): add CJK/Kana/Hangul support to MMR tokenize() for diversity detection
The tokenize() function only matched [a-z0-9_]+ patterns, returning an
empty set for CJK-only text. This made Jaccard similarity always 0 (or
always 1 for two empty sets) for CJK content, effectively disabling MMR
diversity detection.

Add support for:
- CJK Unified Ideographs (U+4E00–U+9FFF, U+3400–U+4DBF)
- Hiragana (U+3040–U+309F) and Katakana (U+30A0–U+30FF)
- Hangul Syllables (U+AC00–U+D7AF) and Jamo (U+1100–U+11FF)

Characters are extracted as unigrams, and bigrams are generated only
from characters that are adjacent in the original text (no spurious
bigrams across ASCII boundaries).

Fixes #28000
2026-03-28 09:19:52 +05:30
Peter Steinberger ef1784d264 refactor: move bundled plugin policy into manifests 2026-03-27 16:40:27 +00:00
Tak Hoffman f5643544c2
Reduce lint suppressions in core tests and runtime 2026-03-27 02:11:26 -05:00
Peter Steinberger a3e73daa6b refactor: remove ollama legacy shims 2026-03-27 06:38:23 +00:00
Peter Steinberger 2f979e9be0 test: fix memory-core host type import 2026-03-27 05:38:58 +00:00
Peter Steinberger 4c27c90fc2 refactor: finish moving provider runtime into extensions 2026-03-27 05:38:58 +00:00
Peter Steinberger 64bf80d4d5 refactor: move provider runtime into extensions 2026-03-27 05:38:58 +00:00
Peter Steinberger eebce9e9c7
refactor: move memory host into sdk package 2026-03-27 04:12:04 +00:00
Peter Steinberger a9b982c954
refactor: remove memory-core engine barrel 2026-03-27 03:35:00 +00:00
Peter Steinberger f6de4cd766
refactor: remove memory-core runtime barrel 2026-03-27 02:54:23 +00:00
Peter Steinberger bd6c7969ea
refactor: extract memory host sdk package 2026-03-27 02:49:33 +00:00
Peter Steinberger 7a35bca2ec
refactor: make memory embedding adapters generic 2026-03-27 02:02:24 +00:00
Peter Steinberger dbf78de7c6
refactor: move memory engine behind plugin adapters 2026-03-27 00:47:01 +00:00
Peter Steinberger cad83db8b2
refactor: move memory engine into memory plugin 2026-03-26 23:20:35 +00:00
Peter Steinberger b96fccadb9
refactor: clean memory plugin host boundary 2026-03-26 23:02:24 +00:00
Peter Steinberger 0f5a77d058
refactor: route memory runtime through memory plugin 2026-03-26 22:30:47 +00:00
Peter Steinberger d0ce2d1044
refactor: split memory-core plugin helpers 2026-03-26 22:06:06 +00:00
Peter Steinberger 3d0050c306
refactor: add memory-core extension sources 2026-03-26 22:00:13 +00:00