v2.9.02026-11-18
QMD2.9.0带来文档处理器、元数据过滤与远程模型支持,并同步升级llama.cpp。
新增方面,每个collection可配置独立的处理器,通过SDK回调或可信的argv命令把源文件转成带稳定键的Markdown索引文档;CI中加入有界TLA+模型检查,覆盖锁、信任、索引、处理器、SDK与服务端生命周期。
修复与加固集中在并发场景:信任记录的增删改为串行加原子发布,CLI、SDK与嵌入运行共享可崩溃恢复的SQLite锁,避免互相删掉对方刚写入的向量;清空向量、YAML配置改名等操作也改为串行发布,改名引入PendingRenameError等显式错误,防止中断后误判。SDK按store隔离配置来源,关闭前等待在途操作,拒绝重入关闭。MCP关停默认给5秒宽限期,事件响应改为流式传输并随客户端断开取消;stdio与HTTP启动会先校验本地配置信任,未批准的模型URI一律忽略。另修复CJK全文索引重建期间的并发写入可搜性、Nix的libc泄漏与Darwin启动器选择,以及qmd doctor在重复路径大索引上的内存占用问题。
v2.8.32026-08-17
2.8.3以安全修复为主。qmd update不再自动执行项目内.qmd/index.yml的update:命令(#886)——该文件随git clone进入本地即被采纳,等于让仓库作者决定你的机器上跑什么。现在终端会列出命令征求确认,无人值守
v2.5.32026-05-29
[2.5.3] - 2026-05-28
Features
- qmd get now accepts a :from:count suffix on a path or docid (e.g.
qmd get "#abc123:120:40" reads 40 lines starting at line 120). Explicit
--from/-l flags still override the suffix. The MCP get tool accepts the
same suffix.
- qmd get and qmd multi-get are now line-numbered by default and print
the document's #docid and qmd:// path in the output header. Disable line
numbers with --no-line-numbers. The MCP get/multi_get tools default
lineNumbers to true to match.
- qmd multi-get now includes the #docid in every output format
(--md, --json, --csv, --xml, --files, and the default CLI view),
consistent with qmd search.
- qmd get and qmd multi-get accept --full-path, which replaces the
qmd:// path + #docid with the document's on-disk filesystem path (handy for
piping into Read/Edit/an editor). Falls back to the canonical qmd:// +
docid header when the file no longer exists on disk.
- qmd search / qmd query now show a clearer hit identifier: the default CLI
view (and the new file: line in --md output) always prints the full
qmd://collection/path URI so you can pipe it straight back into qmd get.
- qmd search / qmd query accept --full-path with the same semantics as
qmd get: the result label becomes the file's on-disk path — ./-prefixed
relative path when the file lives in a subfolder of $PWD, absolute realpath
otherwise — and the per-result #docid is dropped because the path is the
identifier. The leading ./ is intentional so the output is unambiguously a
filesystem path. Applies to all output formats.
- qmd get and qmd multi-get now also use the ./-prefixed convention when
--full-path renders a path under $PWD, matching search/query.
- New --format <kind> flag selects the output format (cli | json | csv |
md | xml | files) for search, query, and multi-get. The legacy
boolean aliases (--json/--csv/--md/--xml/--files) still work but are
no longer in --help; prefer --format.
Fixes
- Launcher: source-mode runner selection now prefers Node + tsx over Bun when
both package-lock.json and bun.lock are present in the package root,
mirroring the dist-mode "npm priority" rule. Fixes pnpm-global installs that
copy the entire working tree (including .git and bun.lock) into the
install dir and previously routed through Bun, causing ABI mismatches with
the Node-built better-sqlite3 / sqlite-vec native modules.
- Darwin Metal: llama-using commands (query, vsearch, embed) no longer
dump a multi-kB GGML/Metal backtrace at process exit even when output
succeeded. The libggml-metal static ggmlmetaldevice destructor asserts
[rsets->data count] == 0 during cxafinalize_ranges, but the
buffer-free path never calls the symmetric ggmlmetaldevicersetsrm
to remove released rsets from the device collection (upstream
ggml-org/llama.cpp#22593, one-line fix open as PR #22595). The assertion
only fires when process.exit() skips Node's beforeExit hook, which is
what node-llama-cpp uses to auto-dispose Metal contexts. Primary fix:
finishSuccessfulCliCommand now sets process.exitCode = 0 and returns
instead of calling process.exit(0), so beforeExit fires and the native
binding cleans up before libc's static destructor runs. Defense-in-depth:
the launcher (bin/qmd) and the npm test driver (scripts/test-all.mjs
+ the test:bun / test:unit package.json scripts) also set
GGMLMETALNO_RESIDENCY=1 on darwin before spawning node/bun, covering
error paths and tests that still terminate via process.exit(). The env
var must be set before node/bun start — libggml-metal reads it via libc
getenv at module-load time, and Bun does not propagate process.env
mutations to libc setenv — so it lives in the launcher rather than in
test-preload. Residency sets give no measurable speedup for QMD's
short-lived CLI workflow (benchmarked on M3 Pro). Opt back in with
QMDMETALKEEP_RESIDENCY=1 for long-lived qmd processes (e.g. the MCP
daemon may benefit on hot reload) or to triage the upstream fix.
qmd doctor reports the mitigation state. Minimal reproduction:
scripts/repro-metal-rsets-crash.mjs.
Docs
- qmd skill: emphasize reading line ranges with get's built-in
:from:count suffix / --from/-l flags instead of piping through
sed/head/tail; cite the docid and line numbers now present in retrieval
output; and author structured intent:/lex:/vec:/hyde: queries yourself
rather than relying on built-in query expansion.
[2.5.2] - 2026-05-22
Fixes
- Launcher: Rewrite bin/qmd as a Node-based shebang polyglot to fix global npm installation execution failures on Windows (#668 / #452), while supporting seamless fallback to Bun in Node-less environments.
[2.5.1] - 2026-05-20
Changes
- Release: publish from GitHub Actions via npm Trusted Publishing/OIDC instead of a long-lived NPM_TOKEN secret.
[2.5.0] - 2026-05-19
Changes
- Dependencies: update core SQLite/config/chunking packages (better-sqlite3, yaml, web-tree-sitter, tree-sitter-go, and tree-sitter-python) while keeping incompatible zod, tsx, and vitest majors pinned.
- Agent skills: add qmd skills list|get|path to serve version-matched runtime skill instructions from the installed CLI, and make qmd skill install write a stable discovery stub so installed agent skills do not go stale after QMD upgrades.
- CLI: add qmd doctor for index/runtime diagnostics, including SQLite/sqlite-vec versions, embedding fingerprint freshness, mixed-fingerprint detection, safe legacy fingerprint adoption, and content-hash sampling.
Fixes
- Launcher: prefer runnable TypeScript source in git checkouts even when ignored dist/ artifacts exist, while packaged installs continue to run dist/.
- GPU: keep node-llama-cpp's documented gpu: "auto" initialization as the primary path, then perform no-build packaged CUDA/Vulkan/Metal probes only if auto falls back to CPU.
- CLI: move GPU/CPU runtime diagnostics out of qmd status; use qmd doctor for device probing and related environment guidance.
- CLI: point unexpected command/setup failures toward qmd doctor so diagnostics are the default next step when QMD behaves incorrectly.
- Doctor: explicitly warn when content_vectors contains multiple non-empty embedding fingerprint names, with the per-fingerprint document/chunk breakdown.
- Embed: make the TTY progress line label byte-based input progress explicitly, show embedded chunks as a count, and shorten the displayed model name.
- Embed: retain per-chunk failure details, retry failed chunks after later successful embeds and again when no other chunks remain, clear recovered errors, and cap retries to avoid endless loops.
- Tests: expand the container smoke harness to cover npm-global, npx-style, and Bun-global install scenarios, always checking auto and QMDFORCECPU=1 doctor modes, with opt-in tiny qmd embed and GPU probe runs for supported container runtimes.
- Embedding: fingerprint vector metadata using the active embedding model and formatting/chunking parameters so stale vectors are treated as pending after search semantics change. Legacy content_vectors columns are migrated lazily on first vector-health/write use to preserve fast QMD startup.
- Skill: expand the packaged QMD skill with retrieval-first workflows, structured query examples, wiki/source collection guidance, and safe fallbacks when model-backed search is unavailable.
- Tests: make bun run test execute the local unit suite under both Node/Vitest and Bun (test:node + test:bun) so runtime-specific regressions are caught before CI.
- Model config: centralize embedding/rerank/generation model resolution so qmd embed, status, query, vsearch, pull, SDK
v2.5.22026-05-23
2.5.2:启动器把bin/qmd重写为兼容Node的shebang polyglot,修复Windows下npm全局安装后无法执行的问题,无Node的环境仍可回退到Bun。
2.5.1:发布流程改走GitHub Actions的npm Trusted Publishing/OIDC,不再依赖长期有效的NPM_TOKEN。
2.5.0
v2.5.12026-05-20
[2.5.1] - 2026-05-20
Changes
- Release: publish from GitHub Actions via npm Trusted Publishing/OIDC instead of a long-lived NPM_TOKEN secret.
[2.5.0] - 2026-05-19
Changes
- Dependencies: update core SQLite/config/chunking packages (better-sqlite3, yaml, web-tree-sitter, tree-sitter-go, and tree-sitter-python) while keeping incompatible zod, tsx, and vitest majors pinned.
- Agent skills: add qmd skills list|get|path to serve version-matched runtime skill instructions from the installed CLI, and make qmd skill install write a stable discovery stub so installed agent skills do not go stale after QMD upgrades.
- CLI: add qmd doctor for index/runtime diagnostics, including SQLite/sqlite-vec versions, embedding fingerprint freshness, mixed-fingerprint detection, safe legacy fingerprint adoption, and content-hash sampling.
Fixes
- Launcher: prefer runnable TypeScript source in git checkouts even when ignored dist/ artifacts exist, while packaged installs continue to run dist/.
- GPU: keep node-llama-cpp's documented gpu: "auto" initialization as the primary path, then perform no-build packaged CUDA/Vulkan/Metal probes only if auto falls back to CPU.
- CLI: move GPU/CPU runtime diagnostics out of qmd status; use qmd doctor for device probing and related environment guidance.
- CLI: point unexpected command/setup failures toward qmd doctor so diagnostics are the default next step when QMD behaves incorrectly.
- Doctor: explicitly warn when content_vectors contains multiple non-empty embedding fingerprint names, with the per-fingerprint document/chunk breakdown.
- Embed: make the TTY progress line label byte-based input progress explicitly, show embedded chunks as a count, and shorten the displayed model name.
- Embed: retain per-chunk failure details, retry failed chunks after later successful embeds and again when no other chunks remain, clear recovered errors, and cap retries to avoid endless loops.
- Tests: expand the container smoke harness to cover npm-global, npx-style, and Bun-global install scenarios, always checking auto and QMDFORCECPU=1 doctor modes, with opt-in tiny qmd embed and GPU probe runs for supported container runtimes.
- Embedding: fingerprint vector metadata using the active embedding model and formatting/chunking parameters so stale vectors are treated as pending after search semantics change. Legacy content_vectors columns are migrated lazily on first vector-health/write use to preserve fast QMD startup.
- Skill: expand the packaged QMD skill with retrieval-first workflows, structured query examples, wiki/source collection guidance, and safe fallbacks when model-backed search is unavailable.
- Tests: make bun run test execute the local unit suite under both Node/Vitest and Bun (test:node + test:bun) so runtime-specific regressions are caught before CI.
- Model config: centralize embedding/rerank/generation model resolution so qmd embed, status, query, vsearch, pull, SDK vector search, and bench use the same active .qmd/index.yaml model hints and environment fallbacks.
- GPU/status: qmd status now uses the same embedding model identity as qmd embed when computing pending embeddings, so URI-backed embeddings are not incorrectly reported as pending under the legacy embeddinggemma alias.
- GPU status: qmd status now always shows GPU mode/configuration without unsafe native probing, and CPU-fallback warnings point to QMDSTATUSDEVICE_PROBE=1 qmd status for an actual backend probe. The no-GPU warning is emitted once per process instead of once per LLM instance during benchmarks.
- GPU: add QMDFORCECPU=1 / --no-gpu to bypass CUDA/Vulkan/Metal probing entirely, and route native llama.cpp stdout noise to stderr so JSON output stays parseable during search/query commands.
- Snippet line numbers: qmd_query (MCP), HTTP /query, and qmd query
(CLI JSON output and snippet headers) now return absolute source-file
line numbers instead of chunk-local ones, so the line field can be
passed back to qmd_get as fromLine without a separate lookup.
Snippet selection remains scoped to the best matching chunk
(preserves #149).
- CLI: qmd query --full now emits the full document body in all output
formats (json, csv, md, xml), restoring the documented behavior of the
flag. Previously it returned only the best matching chunk (~3.6KB max
per result). Output payload for --full queries is now proportional
to total document size.
- macOS Metal: qmd query --json now flushes successful JSON output and uses a safe immediate-exit path on Darwin to avoid ggml Metal finalizer aborts; other commands still dispose LLM contexts/models before the llama runtime. #368
- Embedding: require complete chunk coverage before treating a document as
embedded, remove partial vectors when chunk/session failures leave a
document incomplete, and keep qmd status pending counts honest after
interrupted long embed runs. #637 #378
- Embedding: qmd embed -c <collection> now scopes pending-doc selection
to the requested collection instead of embedding global pending work.
Scoped --force clears only collection-owned vectors, preserves shared
hashes referenced by sibling collections, and drops vectors_vec only
when the scoped clear empties all vectors.
- Hybrid search: weight RRF lists by query type so original FTS and original vector evidence get the intended 2x boost, instead of accidentally boosting the first lexical expansion. #591
- MCP: seed llama.cpp/GGML quiet env vars before launching qmd mcp so native logs cannot pollute stdio JSON-RPC framing. #593
- CLI: remove CommonJS require() calls from ESM index path normalization so qmd --index <path> no longer crashes with ERRAMBIGUOUSMODULE_SYNTAX on Node 22+. #634
- Windows CUDA: serialize llama.cpp embedding/reranking contexts by default to avoid intermittent ggml-cuda.cu:98 crashes in qmd query; set QMDEMBEDPARALLELISM to opt back into parallel contexts if your driver is stable. #519
- MCP: make qmd mcp --index <name> use the selected index for both foreground and daemon HTTP servers instead of falling back to the default store. #343
- Embedding: respect QMDEMBEDMODEL consistently for vector indexing and vector-backed search, with default-model fallback when unset.
- Config: use one home-directory resolver for YAML config and the default SQLite cache path, avoiding Windows CLI/MCP split-brain when HOME is unset.
- GPU: respect explicit QMDLLAMAGPU=metal|vulkan|cuda backend overrides instead of always using auto GPU selection. #529
- Fix: preserve original filename case in handelize(). The previous
.toLowerCase() call made indexed paths unreachable on case-sensitive
filesystems (Linux). qmd update automatically migrates legacy
lowercase paths without re-embedding.
- CLI: make qmd status skip native node-llama-cpp device probing by
default so status stays safe on machines with broken or unsupported GPU
drivers. Set QMDSTATUSDEVICE_PROBE=1 to opt in.
- CLI: lazy-load node-llama-cpp so lightweight commands such as
qmd status do not import native ML dependencies or trigger llama.cpp
builds on ARM/no-GPU machines. #491
- Store: keep content rows referenced by inactive documents during orphan
cleanup so qmd update preserves soft-deleted tombstones for removed
files. #585
- Packaging: install AST grammar WASM packages as required dependencies so
Bun global installs include TypeScript/TSX/JavaScript grammars, and add a
smoke:package-grammars verification command. #595
- Launcher: add wrapper smoke coverage for scoped package, npm/npx,
Homebrew/Linuxbrew, Bun global symlink layouts, and $BUN_INSTALL
false-positive runtime selection regressions. #351 #353 #354 #356 #358 #359
v2.1.02026-04-06
2.1.0版带来几项实用改进。代码文件改用tree-sitter按函数、类、导入的边界切分,不再在任意文本位置截断,支持TypeScript/JavaScript、Python、Go和Rust,qmd embed和qmd query新增--chunk-strategy <auto|regex>参数(默认regex),Markdown与未知格式维持原样。index.yml新增models:段落,可为每个collection分别指定embed、rerank和generate模型,解析顺序为配置>环境变量>内置默认。CLI搜索结果在终端里输出OSC 8可点击链接,借助URI模板直接跳到编辑器对应行列,用QMDEDITORURI即可换编辑器。另外新增qmd bench命令,量化BM25、向量、混合及全链路检索的precision@k、recall、MRR和F1;--no-rerank可跳过重排,追求速度或没有GPU时很管用。
修复同样不少:嵌入环节堵住了循环卡死、超长文本触发的GGML崩溃与批量内存膨胀,维度不一致时改为直接报错而非悄悄重建表;BM25修正标题、正文、路径三列的权重计算,连字符与下划线词条也能正确命中;GPU初始化失败会回退到CPU,启动器误判Bun的情况也一并解决。
v2.0.12026-03-11
QMD2.0:SDK升为正式接口,源码按src/cli/与src/mcp/拆分,MCP服务器重写为纯SDK调用方,不再直接触碰内部store。search()成为统一入口,传query自动扩展、传queries则使用预展开的lex/vec/hyde,取代原先query/search/structuredSearch三套写法;另新增getDocumentBody()、getDefaultCollectionNames()与Maintenance类。运行时感知的bin/qmd包装器会自动区分bun与node,规避ABI不匹配;better-sqlite3升至^12.4.5,补齐Node 25支持。2.0.1紧跟着修了三处:qmd skill install可一键把打包的QMD skill装入~/.claude/commands/;修正Qwen3-Embedding GGUF文件名大小写——HuggingFace区分大小写,小写版本会404;npm i -g全局安装时会解析符号链接的启动器路径,qmd命令恢复正常。
v2.0.02026-03-11
QMD 2.0正式发布,核心变化是把SDK确立为稳定的库接口:对外暴露QMDStore,涵盖搜索、检索、集合与上下文管理、索引及生命周期操作。搜索接口同步收敛为统一的search()——传query会自动扩展,传queries则直接使用预先展开的lex/vec/hyde查询,原先query、search、structuredSearch三套写法就此合并。另外新增getDocumentBody()、getDefaultCollectionNames()和Maintenance类。
工程结构上,MCP server重写为纯粹的SDK调用方,不再触碰内部store;CLI与MCP分别归入src/cli/和src/mcp/目录。安装方面,bin/qmd包装脚本会自动识别bun或node运行环境,避免ABI不匹配(#319),better-sqlite3升到^12.4.5以支持Node 25(#257)。同时导出了extractSnippet、addLineNumbers等工具函数,并清理了store.ts里一处遮蔽本地导出的无用resolve导入。
v1.1.62026-03-10
[1.1.6] - 2026-03-09
QMD can now be used as a library. import { createStore } from '@tobilu/qmd'
gives you the full search and indexing API — hybrid query, BM25, structured
search, collection/context management — without shelling out to the CLI.
Changes
- SDK / library mode: createStore({ dbPath, config }) returns a
QMDStore with query(), search(), structuredSearch(), get(),
multiGet(), and collection/context management methods. Supports inline
config (no files needed) or a YAML config path.
- Package exports: package.json now declares main, types, and
exports so bundlers and TypeScript resolve @tobilu/qmd correctly.
[1.1.5] - 2026-03-07
Ambiguous queries like "performance" now produce dramatically better results
when the caller knows what they mean. The new intent parameter steers all
five pipeline stages — expansion, strong-signal bypass, chunk selection,
reranking, and snippet extraction — without searching on its own. Design and
original implementation by Ilya Grigorik (@vyalamar) in #180.
Changes
- Intent parameter: optional intent string disambiguates queries across
the entire search pipeline. Available via CLI (--intent flag or intent:
line in query documents), MCP (intent field on the query tool), and
programmatic API. Adapted from PR #180 (thanks @vyalamar).
- Query expansion: when intent is provided, the expansion LLM prompt
includes Query intent: {intent}, matching the finetune training data
format for better-aligned expansions.
- Reranking: intent is prepended to the rerank query so Qwen3-Reranker
scores with domain context.
- Chunk selection: intent terms scored at 0.5× weight alongside query
terms (1.0×) when selecting the best chunk per document for reranking.
- Snippet extraction: intent terms scored at 0.3× weight to nudge
snippets toward intent-relevant lines without overriding query anchoring.
- Strong-signal bypass disabled with intent: when intent is provided, the
BM25 strong-signal shortcut is skipped — the obvious keyword match may not
be what the caller wants.
- MCP instructions: callers are now guided to provide intent on every
search call for disambiguation.
- Query document syntax: intent: recognized as a line type. At most one
per document, cannot appear alone. Grammar updated in docs/SYNTAX.md.
[1.1.2] - 2026-03-07
13 community PRs merged. GPU initialization replaced with node-llama-cpp's
built-in autoAttempt — deleting ~220 lines of manual fallback code and
fixing GPU issues reported across 10+ PRs in one shot. Reranking is faster
through chunk deduplication and a parallelism cap that prevents VRAM
exhaustion.
Changes
- GPU init: use node-llama-cpp's build: "autoAttempt" instead of manual
GPU backend detection. Automatically tries Metal/CUDA/Vulkan and falls back
gracefully. #310 (thanks @giladgd — the node-llama-cpp author)
- Query --explain: qmd query --explain exposes retrieval score traces
— backend scores, per-list RRF contributions, top-rank bonus, reranker
score, and final blended score. Works in JSON and CLI output. #242
(thanks @vyalamar)
- Collection ignore patterns: ignore: ["Sessions/", ".tmp"] in
collection config to exclude files from indexing. #304 (thanks @sebkouba)
- Multilingual embeddings: QMDEMBEDMODEL env var lets you swap in
models like Qwen3-Embedding for non-English collections. #273 (thanks
@daocoding)
- Configurable expansion context: QMDEXPANDCONTEXT_SIZE env var
(default 2048) — previously used the model's full 40960-token window,
wasting VRAM. #313 (thanks @0xble)
- candidateLimit exposed: -C / --candidate-limit flag and MCP
parameter to tune how many candidates reach the reranker. #255 (thanks
@pandysp)
- MCP multi-session: HTTP transport now supports multiple concurrent
client sessions, each with its own server instance. #286 (thanks @joelev)
Fixes
- Reranking performance: cap parallel rerank contexts at 4 to prevent
VRAM exhaustion on high-core machines. Deduplicate identical chunk texts
before reranking — same content from different files now shares a single
reranker call. Cache scores by content hash instead of file path.
- Deactivate stale docs when all files are removed from a collection and
qmd update is run. #312 (thanks @0xble)
- Handle emoji-only filenames (🐘.md → 1f418.md) instead of crashing.
#308 (thanks @debugerman)
- Skip unreadable files during indexing (e.g. iCloud-evicted files returning
EAGAIN) instead of crashing. #253 (thanks @jimmynail)
- Suppress progress bar escape sequences when stderr is not a TTY. #230
(thanks @dgilperez)
- Emit format-appropriate empty output ([] for JSON, CSV header for CSV,
etc.) instead of plain text "No results." #228 (thanks @amsminn)
- Correct Windows sqlite-vec package name (sqlite-vec-windows-x64) and add
sqlite-vec-linux-arm64. #225 (thanks @ilepn)
- Fix claude plugin setup CLI commands in README. #311 (thanks @gi11es)
[1.1.1] - 2026-03-06
Fixes
- Reranker: truncate documents exceeding the 2048-token context window
instead of silently producing garbage scores. Long chunks (e.g. from
PDF ingestion) now get a fair ranking.
- Nix: add python3 and cctools to build dependencies. #214 (thanks
@pcasaretto)
[1.1.0] - 2026-02-20
QMD now speaks in query documents — structured multi-line queries where every line is typed (lex:, vec:, hyde:), combining keyword precision with semantic recall. A single plain query still works exactly as before (it's treated as an implicit expand: and auto-expanded by the LLM). Lex now supports quoted phrases and negation ("C++ performance" -sports -athlete), making intent-aware disambiguation practical. The formal query grammar is documented in docs/SYNTAX.md.
The npm package now uses the standard #!/usr/bin/env node bin convention, replacing the custom bash wrapper. This fixes native module ABI mismatches when installed via bun and works on any platform with node >= 22 on PATH.
Changes
- Query document format: multi-line queries with typed sub-queries (lex:, vec:, hyde:). Plain queries remain the default (expand: implicit, but not written inside the document). First sub-query gets 2× fusion weight — put your strongest signal first. Formal grammar in docs/SYNTAX.md.
- Lex syntax: full BM25 operator support. "exact phrase" for verbatim matching; -term and -"phrase" for exclusions. Essential for disambiguation when a term is overloaded across domains (e.g. performance -sports -athlete).
- expand: shortcut: send a single plain query (or start the document with expand: on its only line) to auto-expand via the local LLM. Query documents themselves are limited to lex, vec, and hyde lines.
- MCP query tool (renamed from structured_search): rewrote the tool description to fully teach AI agents the query document format, lex syntax, and combination strategy. Includes worked examples with intent-aware lex.
- HTTP /query endpoint (renamed from /search; /search kept as silent alias).
- collections array filter: filter by multiple collections in a single query (collections: ["notes", "brain"]). Removed the single collection string param — array only.
- Collection include/exclude: includeByDefault: false hides a collection from all queries unless explicitly named via collections. CLI: qmd collection exclude <name> / qmd collection include <name>.
- Collection update-cmd: attach a shell command that runs before every qmd update (e.g. git stash && git pull --rebase --ff-only && git stash pop). CLI: qmd collection update-cmd <name> '<cmd>'.
- qmd status tips: shows actionable tips when collections lack context descriptions or update commands.
- qmd collection subcommands: show, update-cmd, include, exclude. Ba
v1.1.52026-03-08
1.1.5 新增intent参数,为"performance"这类含糊查询提供消歧信息。它贯穿查询扩展、强信号旁路、分块选择、重排、摘要截取五个阶段,自身不参与检索;CLI、MCP与程序化API都可传入,查询文档也支持intent:行。给出intent后,重排查询会前置意图,分块与摘要按0.5×、0.3×加权,同时关闭BM25强信号旁路,避免关键词直配盖过真实意图。
1.1.2 合并13个社区PR。GPU初始化改用node-llama-cpp的autoAttempt,自动尝试Metal/CUDA/Vulkan并优雅回退,删掉约220行手写回退代码,一并解决多个GPU问题。新增--explain输出检索打分明细、ignore排除模式、QMDEMBEDMODEL切换多语向量模型、-C控制进入重排的候选数,MCP支持多会话并发;QMDEXPANDCONTEXT_SIZE限制扩展上下文以省显存。重排并行上限设为4并按内容去重,缓解显存耗尽。另修复纯emoji文件名、不可读文件导致的崩溃,以及集合清空后的残留文档。