openclaw/extensions/memory-core/src
chi cad3da52c9
fix(memory): prefer --mask over --glob for qmd collection pattern flag (#58736)
* fix(memory): prefer --mask over --glob for qmd collection pattern flag

qmd 2.0.1 silently ignores the --glob flag when creating collections,
causing all patterns (e.g. MEMORY.md, memory.md) to fall back to the
default **/*.md glob. This leads to collection conflicts when multiple
collections target the same workspace directory with different patterns.

The existing flag negotiation logic in addCollection() tries --glob
first (when collectionPatternFlag is null), and since qmd accepts the
flag without error, OpenClaw never falls back to --mask. The result is
that memory-root-{agent} gets created with **/*.md instead of MEMORY.md,
and memory-alt-{agent} fails with a duplicate path+pattern conflict.

Fix: default collectionPatternFlag to '--mask' so the working flag is
tried first. The fallback to --glob is preserved for older qmd versions
that may not support --mask.

* docs(changelog): note qmd collection flag fix

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-01 16:11:56 +09:00
..
memory fix(memory): prefer --mask over --glob for qmd collection pattern flag (#58736) 2026-04-01 16:11:56 +09:00
cli.runtime.ts fix(memory): add cli qmd session context (#57493) 2026-03-30 16:18:56 +09:00
cli.test.ts fix(memory): add cli qmd session context (#57493) 2026-03-30 16:18:56 +09:00
cli.ts refactor: extract memory host sdk package 2026-03-27 02:49:33 +00:00
cli.types.ts
flush-plan.ts refactor: extract memory host sdk package 2026-03-27 02:49:33 +00:00
prompt-section.ts refactor: extract memory host sdk package 2026-03-27 02:49:33 +00:00
runtime-provider.ts refactor: remove memory-core runtime barrel 2026-03-27 02:54:23 +00:00
tools.citations.test.ts
tools.citations.ts refactor: extract memory host sdk package 2026-03-27 02:49:33 +00:00
tools.runtime.ts refactor: remove memory-core runtime barrel 2026-03-27 02:54:23 +00:00
tools.shared.ts refactor: remove memory-core runtime barrel 2026-03-27 02:54:23 +00:00
tools.test-helpers.ts refactor: move bundled plugin policy into manifests 2026-03-27 16:40:27 +00:00
tools.test.ts
tools.ts refactor: extract memory host sdk package 2026-03-27 02:49:33 +00:00