Commit Graph

518 Commits

Author SHA1 Message Date
Tobi Lütke
596198c2ba
fix: update nix module hashes 2026-05-18 02:59:20 +00:00
Tobi Lütke
6ea0544e76
chore: update core runtime dependencies 2026-05-18 02:54:03 +00:00
Tobi Lütke
ac6b154f0c
feat: add qmd doctor vector diagnostics 2026-05-18 01:52:05 +00:00
Tobias Lütke
ddbd6bd8be
Merge pull request #656 from tobi/fix/gpu-status-warning
Fix GPU status guidance and benchmark warnings
2026-05-16 19:55:39 -04:00
Tobi Lütke
ad8a371be2
Fix QMD CI test runtime assumptions 2026-05-16 23:52:53 +00:00
Tobi Lütke
028e8fc86f
Improve packaged QMD skill 2026-05-16 23:46:40 +00:00
Tobi Lütke
15a711d729
Run local tests on Node and Bun 2026-05-16 23:46:22 +00:00
Tobi Lütke
da184e58e9
Unify QMD model resolution 2026-05-16 23:46:22 +00:00
Tobi Lütke
1f757379e2
Fix GPU status guidance and benchmark warnings 2026-05-16 23:45:58 +00:00
Tobias Lütke
cdf3bc0712
Merge pull request #657 from tobi/feat/cli-served-skills
Serve QMD skill instructions from the CLI
2026-05-16 19:40:10 -04:00
Tobi Lütke
c18c74a134
Serve QMD skill instructions from CLI 2026-05-16 22:43:33 +00:00
Tobias Lütke
17aa34d753
Merge pull request #655 from tobi/feat/local-qmd-index-bench
feat: support project-local QMD indexes
2026-05-16 14:31:05 -04:00
Tobi Lütke
b2550d273a
Merge remote-tracking branch 'origin/main' into feat/local-qmd-index-bench
# Conflicts:
#	src/cli/qmd.ts
2026-05-16 18:27:49 +00:00
Tobi Lütke
2e0c74310c
feat: support project-local indexes in bench 2026-05-16 18:22:04 +00:00
Tobias Lütke
87520252a5
Merge pull request #654 from tobi/workoff/t_657414dc-dev-review
fix: keep partial embeddings pending
2026-05-16 13:52:49 -04:00
Tobi Lütke
910ca07fd9
fix: keep partial embeddings pending 2026-05-16 17:48:01 +00:00
Tobias Lütke
a35a487af0
Merge pull request #653 from tobi/workoff/t_09301bf8-dev-review
test: cover qmd bin wrapper install layouts
2026-05-16 13:47:44 -04:00
Tobi Lütke
dc49ccff1e
test: cover qmd bin wrapper install layouts 2026-05-16 17:41:43 +00:00
Tobias Lütke
474ac7863d
Merge pull request #652 from tobi/workoff/t_23fce575-dev-review
fix: avoid macOS Metal cleanup abort after JSON query
2026-05-16 13:41:02 -04:00
Tobi Lütke
b59ba6ab1e
test: keep cleanup lifecycle regression portable 2026-05-16 17:35:08 +00:00
Tobias Lütke
9bc316e545
Merge pull request #651 from tobi/workoff/t_0d576ae5-dev-review
fix: keep llama GPU fallback noise off JSON stdout
2026-05-16 13:31:16 -04:00
Tobi Lütke
e4505607f9
Merge remote-tracking branch 'origin/main' into workoff/t_0d576ae5-dev-review
# Conflicts:
#	CHANGELOG.md
2026-05-16 17:26:27 +00:00
Tobi Lütke
60c75cb332
fix: avoid macOS Metal cleanup abort after JSON query 2026-05-16 17:22:46 +00:00
Tobias Lütke
bad20f5565
Merge pull request #644 from Ginja/fix/snippet-absolute-line-numbers
fix: return absolute line numbers from qmd_query
2026-05-16 13:18:35 -04:00
Tobi Lütke
dd5d82d523
fix: keep llama GPU fallback noise off JSON stdout 2026-05-16 17:18:06 +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
Riley Shott
aa1818e181
fix: clamp negative fromLine in get to avoid silent tail content
The query tool description tells agents to compute fromLine = line - 20
for context around a hit. For hits in lines 1 through 20 that yields a
negative fromLine, which propagated unchanged through:

  MCP get handler -> store.getDocumentBody -> Array.prototype.slice

A negative slice start offsets from the end of the array rather than
clamping to the beginning, so a top-of-file hit on a long document
returned an empty string and on a short document returned content from
the wrong region (e.g. lines 11-30 of a 30-line file in response to a
request for the head of the document). The lineNumbers branch was the
same shape: addLineNumbers(text, -19) emitted "-19:", "-18:" prefixes.

Same buggy slice lived in the CLI getDocument path independently.

Fix in three layers, plus the docstring:

- src/mcp/server.ts: clamp parsedFromLine to >= 1 after parsing input
  args and the :line suffix, before it reaches getDocumentBody and
  addLineNumbers. Also tighten the query tool's recommendation to
  `fromLine = max(1, line - 20)` so following the docstring literally
  produces a valid value.
- src/cli/qmd.ts: same clamp on the CLI getDocument fromLine after
  the colon-suffix parse.
- src/store.ts: defensive Math.max(0, ...) on the slice start in
  getDocumentBody so SDK callers and any future entry points are
  protected without relying on every caller remembering to clamp.
- test/store.test.ts: regression test on getDocumentBody with
  fromLine = -19 returns the head of the document, not the tail.
- test/cli.test.ts: regression test on `qmd get --from -19` matches
  the no-flag baseline (head of document).
2026-05-13 23:59:33 -07:00
Riley Shott
1f522cffe2
fix: return absolute line numbers from qmd_query
The MCP `query` tool, HTTP `/query` endpoint, and CLI `qmd query`
all returned chunk-local line numbers in their snippet output, so
the line could not be passed back to `qmd_get` as `fromLine`
without an out-of-band lookup. Pass the full document body plus
`bestChunkPos` to `extractSnippet` instead of the chunk text alone
so it can compute absolute line offsets while still scoping the
keyword scan to the reranker-chosen chunk window (preserves #149).

Also restores documented behavior of `qmd query --full`, which was
emitting the best chunk (~3.6KB max) instead of the full document.

extractSnippet now also falls back to a full-body scan when given a
chunkPos but the chunk window contains no positive matches. The
upstream chunk selector leaves bestIdx=0 as its initialization
default whenever scoring fails to find a winner (e.g. queryTerms
filtered to empty by the length>2 guard, or semantic-only matches
with no lex overlap), so an unconditional chunk-scoped scan would
land on chunk 0 instead of where the actual match lives.

- src/mcp/server.ts: SearchResultItem gains `line: number`; both MCP
  and HTTP `/query` handlers populate it
- src/cli/qmd.ts: OutputRow.body now sources from r.body
- src/store.ts: extractSnippet falls back to full-body scan when
  chunk-scoped pass finds no positive match
- test/mcp.test.ts: new fixture asserts absolute line 301 for a
  marker placed past the first chunk boundary
- test/store.test.ts: regression test for the bestScore<=0 fallback
2026-05-13 23:59:32 -07: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