Commit Graph

492 Commits

Author SHA1 Message Date
Tobi Lütke
2e0c74310c
feat: support project-local indexes in bench 2026-05-16 18:22:04 +00:00
Tobias Lütke
d0bcdf0cfb
Merge pull request #635 from erlebach/fix/ls-absolute-path-collections
fix(ls): handle collections whose names are absolute paths
2026-05-16 13:13:15 -04:00
Tobi Lütke
2dc8634ac7
fix(ls): preserve qmd:/// collection aliases 2026-05-16 17:12:38 +00:00
Tobias Lütke
7a7c6ed9e2
Merge pull request #643 from woodenriver05/fix-candidate-limit-forwarding
Forward candidateLimit through search APIs
2026-05-16 13:10:44 -04:00
Tobias Lütke
bbd09ff84d
Merge pull request #648 from rubycerebra/mcp/terse-collection-catalogue
perf(mcp): emit terse collection summary in serverInstructions
2026-05-16 13:09:23 -04:00
James Cherry
9cecdc8703 perf(mcp): emit terse collection summary in serverInstructions
Previously buildInstructions emitted one line per collection with name,
doc count, and description, which can run to ~1.5 KB for a dozen
collections and is injected into every session's system prompt at
MCP initialize. Most agents never query qmd in a given session, so the
catalogue lines are a recurring token cost for static info that the
existing 'status' tool already exposes on demand.

Now emit a single comma-joined names line plus a hint that 'status'
returns the rest. listContexts() lookup is dropped since the per-
collection descriptions are no longer rendered.

Refs #647
2026-05-15 23:44:16 +01:00
woodenriver05
3b7e065024 fix: forward candidateLimit through search APIs 2026-05-11 20:25:34 -10:00
Tobias Lütke
746beedb48
Merge pull request #636 from tobi/stack/qmd-kanban-fixes-2026-05-09
Integrate QMD fix stack
2026-05-09 16:22:07 -04:00
Tobi Lütke
e36ab96567
fix: allow HTTP query rerank control 2026-05-09 19:03:17 +00:00
Tobi Lütke
669e234d1e
test: index MCP HTTP fixture before query 2026-05-09 18:56:06 +00:00
Tobi Lütke
b32ee4e660
test: make CI fixture invocations portable 2026-05-09 18:45:56 +00:00
Tobi Lütke
4505d8132e
ci(nix): update node module hashes
Refresh fixed-output hashes after moving AST grammar packages into runtime dependencies so Nix CI builds the current locked dependency graph.
2026-05-09 18:31:26 +00:00
Tobi Lütke
e627ca7de6
test: allow slow CPU rerank fixture 2026-05-09 18:20:26 +00:00
Tobi Lütke
ddc969a5f4
fix embed model and qmd home resolution 2026-05-09 18:17:10 +00:00
Tobi Lütke
b775592230
fix mcp --index store selection 2026-05-09 18:16:02 +00:00
Tobi Lütke
e8229d8bfb
Fix Windows CUDA context parallelism 2026-05-09 18:15:39 +00:00
Tobi Lütke
dff6513693
Preserve document IDs across case-only renames 2026-05-09 18:15:15 +00:00
Tobi Lütke
656707c6b4
Fix Node ESM index path normalization 2026-05-09 18:14:33 +00:00
Tobi Lütke
3653f6015c
Fix MCP stdio native log pollution 2026-05-09 18:14:15 +00:00
Tobi Lütke
3f055e705d
Fix AST grammar packaging for Bun installs 2026-05-09 18:13:58 +00:00
Tobi Lütke
004714af48
Fix hybrid RRF weighting by query type 2026-05-09 18:13:38 +00:00
Tobi Lütke
92aaded36e
fix(store): preserve inactive docs during orphan cleanup 2026-05-09 18:13:01 +00:00
Tobi Lütke
5b9f472849
fix(embed): honor collection filter 2026-05-09 18:12:45 +00:00
Tobi Lütke
d045a8bab6
fix(search): support CJK FTS queries 2026-05-09 18:12:45 +00:00
Tobi Lütke
3d991b2a47
fix(cli): keep status from importing llama 2026-05-09 18:12:45 +00:00
erlebach
8fdc4815c5 auto: update src/cli/qmd.ts 2026-05-09 13:35:34 -04:00
Tobias Lütke
d58fedf4b5
Merge pull request #579 from lukeboyett/fix/db-transaction-type
fix(db): declare transaction() on local Database interface
2026-05-02 20:16:33 -04:00
Tobias Lütke
06218b1cc5
Merge pull request #384 from rymalia/fix/semantic-query-hyphen-validation
fix: allow hyphenated words in vec/hyde queries (#383)
2026-05-02 20:16:30 -04:00
Tobias Lütke
a2fcac8225
Merge pull request #602 from fxstein/fix/mcp-production-mode-test-leak
fix(mcp): do not enable production mode at module import time
2026-05-02 20:16:27 -04:00
Pi
a0c460333b fix(cli): do not enable production mode at module import time
src/cli/qmd.ts has the same module-scope enableProductionMode() call that
src/mcp/server.ts had — and the same test-isolation leak. test/cli.test.ts
imports buildEditorUri and termLink from this module, which executes the
top-level enableProductionMode() as a side effect of import, flipping the
global _productionMode flag for every later test file in the Bun process.

This is the actual driver of the Store Creation > createStore throws
without explicit path in test mode failure — test/cli.test.ts runs
alphabetically before test/store.test.ts, so the flag is already true by
the time store.test.ts checks it.

Mirror the fix applied to src/mcp/server.ts in the previous commit: move
enableProductionMode() from module scope into the if (isMain) guard so
the flag is only flipped when qmd is actually invoked as the CLI
entrypoint, not when the module is imported for its exports.
2026-04-23 17:41:10 +00:00
Pi
54262f566c fix(mcp): do not enable production mode at module import time
The top-level enableProductionMode() call added in #537 fixed a real issue
(MCP server resolving the wrong database path at startup) but introduced
test-isolation breakage as a side effect: merely importing src/mcp/server.ts
flipped the global _productionMode flag, which then broke unrelated tests
that depend on the default (development) database path resolution.

This shows up concretely as "Store Creation > createStore throws without
explicit path in test mode" failing on Bun (ubuntu-latest) in CI, because
test/mcp.test.ts imports startMcpHttpServer from this module.

Move the enableProductionMode() call from module scope into the two server
entry points (startMcpServer and startMcpHttpServer). The fix originally
intended by #537 — ensuring production mode is active before getDefaultDbPath
runs — is preserved because both call sites still flip the flag before
createStore / getDefaultDbPath. Importing the module for its exports no longer
mutates global state.

Verified locally against current main: CI failure on Bun (ubuntu-latest)
reproduces on unmodified upstream main (14+ consecutive failed runs since
#537 merged on 2026-04-09) and is resolved by this change.

Refs: #537
2026-04-23 15:57:02 +00:00
Tobias Lütke
e8de7cab02 fix(cli): make status device probe opt-in 2026-04-21 21:45:52 -04:00
Luke Boyett
d231b64617 fix(db): declare transaction() on local Database interface
The narrow cross-runtime Database interface in src/db.ts defines the
subset of better-sqlite3 / bun:sqlite methods used throughout QMD.
Commit fee576b ("fix: migrate legacy lowercase paths on reindex")
introduced a db.transaction(...) call in src/store.ts but did not
extend the interface, breaking `tsc -p tsconfig.build.json`:

  src/store.ts(2142,22): error TS2339: Property 'transaction' does
  not exist on type 'Database'.

Both underlying engines expose transaction(fn), so this just makes
the type reflect reality.
2026-04-14 08:34:20 -04:00
Tobi Lütke
cfd640ed34
fix(test): resolve LLM test timeouts by disabling file parallelism
Parallel test files each cold-load their own LLM model, competing for
CPU and causing timeouts even at 120s. Sequential execution eliminates
contention — tests that timed out at 30s now complete in 1-15s.

Made-with: Cursor
2026-04-11 01:21:22 +00:00
Tobi Lütke
3023ab3c99
fix: bump transitive deps to resolve security alerts
npm: vite 7.3.1→7.3.2, hono 4.12.10→4.12.12,
@hono/node-server 1.19.12→1.19.13

pypi: add uv constraint-dependencies for authlib>=1.6.9,
aiohttp>=3.13.4, cryptography>=46.0.7

Made-with: Cursor
2026-04-11 01:07:09 +00:00
Tobias Lütke
525b9970cd
Merge pull request #546 from junmo-kim/fix/handelize-preserve-case
fix: preserve original case in handelize()
2026-04-10 20:48:24 -04:00
Tobias Lütke
3295294be3
Merge pull request #532 from kuishou68/fix-qmd-uri-index-query
fix: include custom index in qmd:// links
2026-04-10 20:47:55 -04:00
Tobias Lütke
46c4dfdaac
Merge pull request #545 from kuishou68/fix-sqlite-vec-actionable-guidance
fix(store): surface actionable sqlite-vec guidance
2026-04-10 20:47:16 -04:00
Tobias Lütke
89df31142d
Merge pull request #548 from kevinburkesegment/fix-gguf-magic-error
fix: detect and explain non-GGUF model files after download
2026-04-10 20:46:59 -04:00
Tobias Lütke
b1dc848086
Merge pull request #554 from bek91/codex/harden-embedding-overflow
fix: Harden embedding overflow handling
2026-04-10 20:46:40 -04:00
Tobias Lütke
b2ffd10cb8
Merge pull request #555 from max0n232/fix/windows-home-fallback
fix: add USERPROFILE fallback for Windows HOME resolution
2026-04-10 20:45:55 -04:00
max0n232
77e71d09f2 fix: add USERPROFILE fallback for Windows HOME resolution
On Windows, `HOME` is not a standard environment variable — the
equivalent is `USERPROFILE`. When MCP clients (e.g. Claude Code)
spawn the QMD server as a subprocess, they pass `USERPROFILE` but
not `HOME`. This causes QMD to fall back to `/tmp`, opening an
empty database instead of the user's actual index.

Fix: check `USERPROFILE` before falling back to `/tmp`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 00:20:07 +03:00
Bek
e4990e470e Harden embedding overflow handling 2026-04-10 16:02:46 -04:00
Kevin Burke
f53ee26213
fix: detect and explain non-GGUF model files after download
When a proxy or firewall intercepts HuggingFace downloads, the cached
file is an HTML page instead of a GGUF model. Previously this surfaced
as an opaque "Invalid GGUF magic" error from node-llama-cpp.

Now we validate the GGUF magic bytes right after download, detect HTML
pages specifically, delete the bad file, and show an actionable error
message with workarounds (HF_ENDPOINT mirror, manual download path).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 13:27:46 -07:00
Kim Junmo
bb5becaf81 Merge remote-tracking branch 'origin/main' into fix/handelize-preserve-case
# Conflicts:
#	CHANGELOG.md
2026-04-09 18:27:16 +09:00
kuishou68
0adbdeb337 fix(store): surface actionable sqlite-vec guidance 2026-04-09 10:13:40 +08:00
Tobias Lütke
171e9e3e65
Merge pull request #530 from kuishou68/fix-status-no-build-probe 2026-04-08 21:19:56 -04:00
Tobias Lütke
414fee520b
Merge pull request #533 from rymalia/fix/json-line-field 2026-04-08 21:19:42 -04:00
Tobias Lütke
9990ca01b4
Merge pull request #534 from erskingardner/fix-529-qmd-llama-gpu-override 2026-04-08 21:19:23 -04:00
Tobias Lütke
33bdf9a308
Merge pull request #537 from fenrire/fix/mcp-production-mode 2026-04-08 21:18:50 -04:00