Commit Graph

144 Commits

Author SHA1 Message Date
Peter Steinberger
4ebec8b5dc fix(memory): group qmd collection searches 2026-04-27 14:37:12 +01:00
Peter Steinberger
c3c8f25bab fix(memory): report qmd dirty watcher state 2026-04-27 14:20:10 +01:00
Peter Steinberger
b181930c23 fix(memory): skip qmd vectors in lexical mode 2026-04-27 14:09:42 +01:00
Peter Steinberger
df65a75f92 fix(memory): avoid live embedding probes in status 2026-04-27 13:55:51 +01:00
Peter Steinberger
3bc29dd604 fix(sqlite): bound WAL sidecar growth 2026-04-27 12:25:10 +01:00
Peter Steinberger
9dcd53c0b6 fix(memory): avoid watchers for memory CLI commands 2026-04-27 11:50:44 +01:00
Peter Steinberger
775ed36c16 feat(memory): support asymmetric embedding input types 2026-04-27 11:25:40 +01:00
Peter Steinberger
9b79eef750 fix(memory-core): honor configured index concurrency 2026-04-27 02:47:39 +01:00
Peter Steinberger
be56f172ab fix: scope qmd root memory collection 2026-04-27 01:01:58 +01:00
Vincent Koc
e53c068d78 fix: repair skills and memory watcher refresh paths 2026-04-26 11:21:21 -07:00
Peter Steinberger
27aedcfd56 style: format repository 2026-04-26 05:47:12 +01:00
Peter Steinberger
956cb1c7db fix: keep local embedding batches from flooding providers 2026-04-26 00:11:35 +01:00
Vincent Koc
9895ecead3 fix(memory): keep llama runtime optional (#71425)
* fix(memory): keep llama runtime optional

* fix(memory): harden optional llama runtime guard
2026-04-25 00:09:12 -07:00
Alex Fries
66e66f19c6 feat(memory-core): expose hybrid search component scores
Expose raw `vectorScore` and `textScore` alongside the combined hybrid memory search `score`.

- Preserve vector/text component scores from `mergeHybridResults` output.
- Add optional component-score fields to both memory host SDK type surfaces.
- Extend hybrid merge tests for vector-only, text-only, and overlapping result cases.
- Document that component scores remain raw retrieval diagnostics while temporal decay/MMR only adjust or reorder the combined ranking `score`.

Closes #68166.

Maintainer verification:
- `pnpm test extensions/memory-core/src/memory/hybrid.test.ts`
- `pnpm check:changed`
- Fresh GitHub checks passed.

Co-authored-by: Alex Fries <alex@engramlabs.io>
2026-04-25 01:46:03 -05:00
Michiel van den Donker
2c716f5677 fix: enforce memory search session visibility (#70761) (thanks @nefainl)
* [EV-001] memory-core: filter memory_search session hits by visibility

- Move session visibility + listSpawnedSessionKeys to plugin-sdk; sync test
  hook with sessions-resolution __testing.setDepsForTest
- Extract loadCombinedSessionStoreForGateway to config/sessions; re-export
  from gateway session-utils
- Add session-transcript-hit stem resolver for builtin + QMD paths
- Post-filter memory_search results before citations/recall; fail closed when
  requester session key missing; optional corpus=sessions
- Tests: stem extraction, visibility filter smoke, existing suites green

* chore: sync plugin-sdk exports for session-transcript-hit and session-visibility

Run pnpm plugin-sdk:sync-exports so package.json exports match
scripts/lib/plugin-sdk-entrypoints.json. Fixes contract tests and
lint:plugins:plugin-sdk-subpaths-exported for memory-core imports.

* fix(EV-001): cross-agent session memory hits + hoist combined store load

- resolveTranscriptStemToSessionKeys: stop filtering by requester agentId so
  keys from other agents reach createSessionVisibilityGuard (a2a + visibility=all).
- Re-export loadCombinedSessionStoreForGateway from session-transcript-hit;
  filterMemorySearchHitsBySessionVisibility loads the combined store once per pass.
- Drop unused agentId from filter params; extend tests (Greptile/Codex review).

* fix(memory_search): honor corpus=sessions before maxResults cap

Pass sources into MemoryIndexManager.search so FTS/vector queries add
source IN (...) before ranking and top-N slice (Codex: non-session hits
could fill the window).

QMD path: oversample fetch limit for single-source recall, filter by
source, then diversify/clamp to the requested maxResults.

Wire corpus=sessions from tools; extend MemorySearchManager opts and
wrappers.

* fix(memory_search): apply corpus=memory source filter like sessions

Pass sources: ["memory"] into manager.search so maxResults applies only
within the memory index; post-filter for defense in depth. Document
corpus=memory in the tool description.

* fix: scope qmd session memory search

* fix: enforce memory search session visibility (#70761) (thanks @nefainl)

---------

Co-authored-by: NefAI <info@nefai.nl>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-25 09:30:21 +05:30
Peter Steinberger
0764f86e18 test(memory): keep embedding provider selection isolated 2026-04-25 04:17:27 +01:00
Peter Steinberger
f70e439699 fix(amazon-bedrock): skip auto memory embeddings without credentials (#71245)
Co-authored-by: bitloi <raphaelaloi.eth@gmail.com>
2026-04-25 02:47:52 +01:00
Patrick Erichsen
4d7c4b3298 fix(memory-core): harden singleton cache recovery (#70925)
* fix memory cache singleton hardening

* refactor(memory-core): simplify singleton cache repair

Co-authored-by: BirdSong <88885494+fire-mirror@users.noreply.github.com>

---------

Co-authored-by: BirdSong <88885494+fire-mirror@users.noreply.github.com>
2026-04-23 21:21:04 -07:00
Peter Steinberger
ededff4bc3 fix(memory): recreate stale qmd collections 2026-04-23 23:00:55 +01:00
Mariano
10a9acbf29 fix: keep root memory uppercase (#70621)
Thanks @mbelinky.
2026-04-23 16:10:36 +01:00
Peter Steinberger
9660cb705b fix(memory): preserve KNN filter limits (#69680) (thanks @aalekh-sarvam) 2026-04-23 04:01:47 +01:00
aalekh-sarvam
7cd051d7f7 fix(memory): use sqlite-vec KNN for searchVector (190x speedup)
Replace full-table scan via vec_distance_cosine() + ORDER BY LIMIT with
sqlite-vec's native MATCH + k = ? KNN operator. Keep vec_distance_cosine()
in the SELECT so score = 1 - dist preserves the existing cosine [0,1]
semantics the downstream merge pipeline depends on.

Fixes #69666.

Benchmark on 10,827 chunks, 4096-dim embeddings:
- Before (full scan):  ~8490 ms/query
- After  (KNN + join): ~50 ms/query

No behavioral changes: returned ids and ordering are identical to the
previous query on all tested queries. The LIMIT ? binding is replaced by
k = ? which caps sqlite-vec's candidate set to the same count.
2026-04-23 04:01:47 +01:00
Bek
dfe0e49c8a fix(qmd): Dedup in-flight manager creation so only one full QMD manager arms per agent/config at a time, eliminating the concurrent exportSessions() collisions that triggered path changed during write errors (#65226)
Fixes concurrent manager creation races that caused SafeOpenErrors during session export.

Deduplicates in-flight manager creation so only one full QMD manager arms per agent/config at a time, eliminating the concurrent exportSessions() collisions that triggered path changed during write errors
Resolves and snapshots runtime inputs before cache reuse, replacing stale managers atomically when workspace/config changes, and aborting queued export work promptly on close()
2026-04-21 18:22:21 -04:00
Peter Steinberger
512dc4f2b1 test: share memory session search setup 2026-04-20 21:14:46 +01:00
Peter Steinberger
b3a97df754 refactor: cache reply and visibility runtimes 2026-04-18 20:54:30 +01:00
Peter Steinberger
df525b90f2 chore(lint): enable unnecessary type parameter rule 2026-04-18 18:31:13 +01:00
Ayaan Zaidi
26f7198eda fix(memory-core): preserve vector dims on readonly recovery 2026-04-17 11:22:56 +05:30
Rubén Cuevas
7b0e950e09 fix: dedupe degraded sqlite-vec warnings (#67898) (thanks @rubencu)
* Agents: dedupe bootstrap truncation warnings

* Memory: dedupe sqlite-vec degradation warnings

* Memory: align degraded vector warning

* test(memory-core): remove stale vector warning arg

* fix(memory-core): reset degraded warning on vector reset

* fix(memory-core): preserve warning latch across reindex rollback

* fix: dedupe degraded sqlite-vec warnings (#67898) (thanks @rubencu)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-17 11:09:14 +05:30
Peter Steinberger
77e6e4cf87 refactor: move memory embeddings into provider plugins 2026-04-17 02:57:18 +01:00
Peter Steinberger
4efd3c3d74 test: harden beta release gates 2026-04-15 19:28:49 +01:00
Tak Hoffman
4f00b76925 fix(context-window): Tighten context limits and bound memory excerpts (#67277)
* Tighten context limits and bound memory excerpts

* Align startup context defaults in config docs

* Align qmd memory_get bounds with shared limits

* Preserve qmd partial memory reads

* Fix shared memory read type import

* Add changelog entry for context bounds
2026-04-15 13:06:02 -05:00
Agustin Rivera
37d5971db3 Align QMD memory reads with canonical memory paths (#66026)
* fix(memory): align qmd read paths

Co-authored-by: zsx <git@zsxsoft.com>

* fix(memory): add qmd exact-path read fast path

* fix(memory): tighten qmd read-path guards

* changelog: note QMD memory_get canonical-path restriction (#66026)

---------

Co-authored-by: zsx <git@zsxsoft.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-14 09:58:27 -06:00
Vincent Koc
37f449d7e1 fix(memory): restore ollama embedding adapter (#66269)
* fix(memory): restore ollama embedding adapter

* Update CHANGELOG.md
2026-04-14 09:02:31 +01:00
Mariano
3d06d90e83 fix(memory): unify default root memory handling (#66141)
* fix(memory): unify default root memory handling

* test(memory): align legacy migration expectation

* docs(changelog): tag qmd root-memory fix

* docs(changelog): append qmd root-memory entry

* docs(changelog): dedupe qmd root-memory entry

* docs(changelog): attribute qmd root-memory fix

---------

Co-authored-by: mbelinky <mbelinky@users.noreply.github.com>
2026-04-13 23:59:57 +02:00
Peter Steinberger
645c7b1897 fix: harden qmd service startup 2026-04-13 10:58:46 +01:00
Rugved Somwanshi
0cfb83edfa feat: LM Studio Integration (#53248)
* Feat: LM Studio Integration

* Format

* Support usage in streaming true

Fix token count

* Add custom window check

* Drop max tokens fallback

* tweak docs

Update generated

* Avoid error if stale header does not resolve

* Fix test

* Fix test

* Fix rebase issues

Trim code

* Fix tests

Drop keyless

Fixes

* Fix linter issues in tests

* Update generated artifacts

* Do not have fatal header resoltuion for discovery

* Do the same for API key as well

* fix: honor lmstudio preload runtime auth

* fix: clear stale lmstudio header auth

* fix: lazy-load lmstudio runtime facade

* fix: preserve lmstudio shared synthetic auth

* fix: clear stale lmstudio header auth in discovery

* fix: prefer lmstudio header auth for discovery

* fix: honor lmstudio header auth in warmup paths

* fix: clear stale lmstudio profile auth

* fix: ignore lmstudio env auth on header migration

* fix: use local lmstudio setup seam

* fix: resolve lmstudio rebase fallout

---------

Co-authored-by: Frank Yang <frank.ekn@gmail.com>
2026-04-13 15:22:44 +08:00
Peter Steinberger
e76c2812b7 style: apply oxfmt 2026-04-12 11:28:43 -07:00
Vincent Koc
d4fb7d893d fix(ci): repair main tsgo regressions 2026-04-12 19:14:00 +01:00
jasonxargs-boop
2204753b62 fix(memory-core): fix macOS chokidar glob issue by watching memory dir directly (#64711)
* fix(memory-core): fix macOS chokidar glob issue by watching memory dir directly

* fix(memory-core): ignore non-markdown memory watch churn

* fix(memory-core): allow multimodal watch events

* test(memory-core): type watcher ignore callback

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-12 18:53:20 +01:00
Peter Steinberger
15b86ac6d0 fix: narrow qmd defaults and clawblocker memory 2026-04-12 18:52:06 +01:00
Anonymous Amit
42590106ab improve memory fallback lexical ranking (#65395)
* improve memory fallback lexical ranking

* use neutral lexical fallback fixtures

* fix(memory-core): keep lexical boosts out of hybrid search

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-12 18:36:28 +01:00
Tak Hoffman
885209ed03 feat: default active memory QMD recall to search (#65068)
* feat(active-memory): default QMD recall to search

* feat(active-memory): surface search debug telemetry

* fix(active-memory): avoid forking qmd managers
2026-04-11 20:56:21 -05:00
Peter Steinberger
d515009c53 fix(ci): stabilize auto-reply CI tests 2026-04-11 04:09:10 +01:00
Peter Steinberger
3e80bd33e4 refactor: simplify extension conversions 2026-04-11 01:37:23 +01:00
Peter Steinberger
d44cd0d452 style: apply oxformat cleanup 2026-04-11 01:17:51 +01:00
Peter Steinberger
ebfd468ee0 refactor: simplify typed conversions 2026-04-11 01:01:30 +01:00
Peter Steinberger
a73dc477d7 style: apply oxfmt cleanup 2026-04-10 23:09:37 +01:00
Peter Steinberger
d236cb4680 chore: enable redundant type constituent checks 2026-04-10 21:23:40 +01:00
Peter Steinberger
f6ed276f51 style: apply updated formatter output 2026-04-10 19:17:39 +01:00
Peter Steinberger
7897fb9c84 refactor: dedupe locale lowercase helpers 2026-04-07 22:57:52 +01:00