pikelet-wasm 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,534 @@ Through 0.6.0 these were published as `pancake-wasm` and
8
8
  packages are pre-1.0: a minor bump may carry breaking changes, and each entry lists them
9
9
  first.
10
10
 
11
+ ## pikelet-wasm 0.16.0 / pikelet 0.16.0 — 2026-11-30
12
+
13
+ Pikelet narrows to the `.pikelet` toolchain. The Cloudflare Worker
14
+ scaffold (`pikelet create`, `rebuild`, Workers AI and student builds),
15
+ the Docusaurus plugin and the retired `.pikelet-range` format leave both
16
+ packages; packs built by earlier releases still open and serve. BGE-small
17
+ becomes a built-in encoder (`compile --encoder-model
18
+ BAAI/bge-small-en-v1.5`), and the reader fuses keyword and vector results
19
+ with a weight chosen for the pack's encoder, which raises BGE packs'
20
+ scores on the larger BEIR sets and leaves MiniLM packs' rankings
21
+ unchanged. Queries on large packs get faster: rerank rows are verified in
22
+ one batch, and mid-sized packs use the WASM SIMD scan (FiQA's median
23
+ hybrid query from 88.9 to 14.1 ms). The journal gains standing notes,
24
+ crawls check robots.txt on every redirect, and ingestion no longer stalls
25
+ on long runs of spaces or brackets. MiniLM packs compile to the same
26
+ bytes as under 0.15.0. Both packages move to 0.16.0 together, and
27
+ `pikelet` requires `pikelet-wasm` ^0.16.0.
28
+
29
+ ### Compatibility
30
+
31
+ 0.16 narrows Pikelet to the `.pikelet` toolchain: `compile`, `query` and `mcp`, the
32
+ layered-pack commands (`append`, `compact`, `rebase`), `journal` and
33
+ `doctor`, plus the `pikelet-wasm` reader, builder and engine. The older
34
+ workflows below are removed. Packs built by earlier releases, including
35
+ Workers AI and student-encoder packs from the scaffold, still open,
36
+ verify and serve.
37
+
38
+ - **`pikelet create` and `pikelet rebuild` are removed**, with the
39
+ Cloudflare Worker scaffold they generated: the Worker, UI and
40
+ reindex-workflow templates, the `pikelet.config.json` format and its
41
+ schema, the Workers AI and student-encoder build modes, and the
42
+ student trainer (`tools/train_student.py`). Their flags (`--yes`,
43
+ `--no-deploy`, `--skip-abstention`, `--runtime`, `--mode`, `--artifact`,
44
+ `--model`, `--epochs`, `--student-model`, `--student-vectors`,
45
+ `--student-abstention`) are now unknown flags. A project scaffolded
46
+ by an earlier release keeps building with the `pikelet` 0.15 it pins. `pikelet` with
47
+ flags but no command used to start the scaffold; it now fails with
48
+ "No command given" and the command overview. To serve a corpus, compile
49
+ it (`pikelet compile`) and mount the file: over MCP, with `pikelet
50
+ query`, or from any static host through `pikelet-wasm/complete`.
51
+ - **The Docusaurus plugin is removed** (`pikelet/docusaurus`, the
52
+ package's only export besides `package.json`). A Docusaurus site can
53
+ compile its docs folder with `pikelet compile` and serve the pack with
54
+ the `pikelet-wasm/complete` reader. Docusaurus folders remain a
55
+ supported compile source (route mapping, `{#custom-id}` anchors).
56
+ - **The `.pikelet-range` format is retired from `pikelet-wasm`.** It was
57
+ deprecated in favour of the sketch index every `.pikelet` carries. Gone:
58
+ the `pikelet-wasm/artifact` export subpath, `Pikelet.RangeArtifact` on
59
+ every entry point, and on Node `Pikelet.buildRangeArtifact`,
60
+ `buildRangeArtifactFile` and `openRangeArtifactFile`, with their types
61
+ (`PikeletRangeArtifact`, `RangeArtifact*`). The engine API (`create`,
62
+ `add`, `search`, `export`, `restore`, ...) and the sketch artifact API
63
+ (`Pikelet.SketchArtifact`, `buildSketchArtifact*`,
64
+ `openSketchArtifactFile`, `createSketchScanner`) are unchanged.
65
+ Builders that imported the sketch helpers from the subpath get
66
+ `buildSketchArtifactBytes`, `exportSketchArtifact` and
67
+ `MAX_RECOMMENDED_RERANK` from `pikelet-wasm/complete/builder`, whose
68
+ `measureRecommendedRerank` no longer needs an `artifactModule`.
69
+ - **Hybrid results from BGE-small packs are ordered differently.** Packs
70
+ whose encoder is `BAAI/bge-small-en-v1.5` now fuse with lexical weight
71
+ 0.25 instead of 0.5 (see Added). MiniLM packs, including every pack
72
+ `compile` builds by default, rank exactly as before. Pass
73
+ `query(text, { fusion: { lexicalWeight: 0.5 } })` for the old order.
74
+
75
+ ### Added
76
+
77
+ - **`compile --encoder-model BAAI/bge-small-en-v1.5` builds a BGE-small
78
+ pack with no other flags.** The pinned u8 weights (36 MiB, MIT) download
79
+ into the model cache on first use and are checked against their digest
80
+ on every compile (`PIKELET_BGE_WEIGHTS_URL` names a mirror); the pack
81
+ declares BGE's 12-layer kernel layout and licence; queries get BGE's
82
+ retrieval prefix unless `--encoder-query-prefix` is given, and `""`
83
+ turns it off. Before, `--encoder-model` required `--encoder-weights`,
84
+ and even with them the declaration described MiniLM's 6-layer shape, so
85
+ the kernel refused the pack. BGE-small scores higher than MiniLM on the
86
+ larger BEIR sets: hybrid nDCG@10 0.744 against 0.546 on TREC-COVID,
87
+ 0.400 against 0.374 on FiQA (at the fusion defaults below). Any other model still needs
88
+ `--encoder-weights`, and the error lists the built-in encoders.
89
+ - **Fusion defaults follow the pack's encoder.** BM25 compensates less
90
+ for a stronger encoder: with BGE-small, lexical weight 0.25 beat 0.5 on
91
+ FiQA (nDCG@10 +0.010) and on TREC-COVID's judged documents (+0.023), and
92
+ was never worse on SciFact, NFCorpus or ArguAna, while MiniLM lost 0.039
93
+ on TREC-COVID at 0.25. The reader picks the defaults from the encoder
94
+ model the pack declares (a chain from its base), before a deferred
95
+ encoder loads, so existing BGE packs need no rebuild.
96
+ `pikelet-wasm/complete` exports `ENCODER_FUSION_DEFAULTS` and
97
+ `fusionDefaultsFor(model)`; `query()` takes an optional `fusion` object
98
+ (`rrfK`, `lexicalWeight`, `guardMargin`) merged over the defaults, and
99
+ `info().fusion` reports the defaults in force.
100
+
101
+ - **Standing notes in the agent journal.** `write_note` takes
102
+ `standing: true` for a note that binds all later work until it is
103
+ changed (a ground rule, constraint or convention), and
104
+ `supersedes: [ids]` (at most 20) for the earlier notes a note replaces.
105
+ A standing note stays in force until a later note lists it in
106
+ `supersedes`. An unfiltered `latest` now leads with a `standing` list:
107
+ every standing note in force, newest first, as its id, title, date and
108
+ the first 120 characters of its text (at most 200, with a
109
+ `standingWarning` when more are in force). The newest notes follow
110
+ under `notes` as before, minus any already listed as standing, so
111
+ `notes` can hold fewer than `limit` entries. `latest` with
112
+ `standing: true` lists only the standing notes, in full; a call
113
+ filtered by `kind` or `tag` leaves the section out. Before this, rules
114
+ written at a project's start dropped out of `latest` once a page of
115
+ newer notes came after them. Each note's `preview` is now cut at a
116
+ word boundary with an ellipsis instead of mid-word at 300 characters.
117
+
118
+ ### Changed
119
+
120
+ - **`pikelet query` no longer prints distances unless asked.** Results
121
+ are in hybrid order, which weighs keyword matches as well as vector
122
+ distance, so the printed distances were not always ascending and read
123
+ as a ranking error. The numbered order is the ranking; `--verbose`
124
+ adds each result's distance. `--json` and the MCP `search` response
125
+ are unchanged and still carry `distance` on every result.
126
+ - **Verified rerank rows are hashed in one batch per query.** A format-2
127
+ sketch checks every row it fetches for reranking against its SHA-256
128
+ digest page. Each row was hashed with its own awaited
129
+ `crypto.subtle.digest`, one after another, about 0.1 ms each, so a
130
+ query's first read of a few hundred rows spent tens of milliseconds
131
+ hashing. The pages and rows a query fetches are now hashed together:
132
+ with `node:crypto` in Node, or with concurrent `crypto.subtle` calls in
133
+ browsers. Every page and row is still checked before any is returned or
134
+ cached, and a mismatch fails the query as before. On the Simple English
135
+ Wikipedia pack (456k rows), vector retrieval on first-read rows went
136
+ from p50 37.7 / p99 64.1 ms to 19.4 / 27.1 ms. Results are unchanged.
137
+ - **Mid-sized packs use the WASM SIMD sketch scan.** In Node the
138
+ complete reader stages the engine's scan kernel in the background once
139
+ a sketch holds at least 1 Mi cells (rows × sketch dims), down from 16
140
+ Mi: about 5,500 rows for 384-dim embeddings (192-dim sketches), where
141
+ it was about 87,000. The JS scan costs about 6 ms per million cells
142
+ against about 0.6 ms for the kernel. Staging loads the engine once per
143
+ process (about 0.2 s and 12 MiB) while the JS scan keeps serving, so
144
+ the switch pays for itself after a few dozen queries. Hybrid queries
145
+ on BEIR FiQA (57,638 documents) went from a median of 88.9 ms to 14.1
146
+ ms, and on ArguAna (8,674) from 16.7 ms to 8.3 ms, with identical
147
+ rankings. `pikelet query`, which runs one query and exits, does not
148
+ stage it: the reader waits for staging at close, so a single query
149
+ would pay the engine load and never earn it back. Browser bundles are
150
+ unaffected: they inject a scanner through `options.sketchScanner`, and
151
+ `sketchScanner: false` still forces the JS scan.
152
+ - **The MCP server describes the ranking accurately.** The `search` tool
153
+ description and the server instructions said results were "ranked by
154
+ closeness of meaning"; they now say results come best first, ranked by
155
+ meaning and keyword match together, and that `distance` is vector
156
+ similarity only.
157
+
158
+ ### Fixed
159
+
160
+ - **The range-proof server stays inside its folder and survives bad
161
+ requests** (`benchmarks/range-proof/dumb-server.mjs`, a benchmark tool,
162
+ not part of either package). Its containment check compared paths
163
+ without a trailing separator, so an encoded slash
164
+ (`/..%2Froot-secret/file`) could read a sibling folder whose name began
165
+ with the served folder's name; it now requires the path to be the
166
+ folder or under `folder/`, and answers 403 otherwise. A malformed
167
+ percent-escape (`/%E0%A4%A`) made `decodeURIComponent` throw and the
168
+ server exit; it now answers 400. A request for a directory, the root
169
+ included, crashed it with EISDIR; it now answers 404.
170
+ - **A seed URL's redirects are checked against robots.txt before they are
171
+ fetched.** `compile --source <url>` (and `append --source <url>`)
172
+ follows the seed through up to five redirects, HTTP or meta refresh,
173
+ before crawling. Each hop was requested without a robots.txt check:
174
+ only the typed URL was checked first, and the final URL afterwards.
175
+ So a seed that redirected to another host had its page fetched before
176
+ that host's robots.txt was read, and a redirect onto a path the site's
177
+ own robots.txt disallows was fetched before the crawl refused it.
178
+ Every hop is now checked against its own origin's robots.txt, and that
179
+ origin's Crawl-delay applies, before it is requested. A seed that
180
+ redirects to a URL that is not HTTP(S) is refused with an error saying
181
+ so, where it failed with "Could not read null/robots.txt".
182
+ - **Ingestion no longer stalls on long runs of spaces, brackets or `<`.**
183
+ Several of the regular expressions that strip Markdown, read headings
184
+ and titles, flatten HTML and parse robots.txt restarted at every
185
+ character of a long run that was not followed by what they needed, so
186
+ their time grew with the square of the run: 40 KB of spaces in a
187
+ heading line took 14 s, and a crawled page or a document with a few
188
+ hundred KB of such text could hold `compile` for many minutes. They are
189
+ now linear scans (`packages/pikelet/src/text-scan.mjs`) that return
190
+ exactly what the expressions returned, so records, titles, anchors and
191
+ pack identities are unchanged. The same change covers route and
192
+ repository path trimming, the scaffold's project name, the Docusaurus
193
+ client's result links, and `clean_title` in the student trainer.
194
+
195
+ ## pikelet-wasm 0.15.0 / pikelet 0.15.0 — 2026-11-19
196
+
197
+ `pikelet mcp` and `pikelet query` stop reporting a relevance verdict, and
198
+ `compile` stops fitting one. Measured on a 1,377-article Wikipedia pack,
199
+ the verdict called 278 of 512 unanswerable questions `strong`, and agents
200
+ answered no better with it than without it. What remains is each result's
201
+ distance and `grounding`, which every pack now returns: the question's
202
+ words the best-matching passage lacks. `pikelet query` searches a pack
203
+ from the terminal. `pikelet mcp` no longer stalls: requests run
204
+ concurrently, packs are served as they mount, and a host that stops
205
+ sending times out after 30 s instead of hanging every pack. Crawls stay
206
+ under the seed's path and follow robots.txt, journals are private,
207
+ packs and journal writes are atomic and durable, and remote reads are
208
+ bounded. Packs compiled by earlier releases still verify and serve, and
209
+ the `pikelet-wasm` library still reports their verdicts. Compiling the
210
+ same inputs gives a new identity (no calibration is written, and no
211
+ build time unless `SOURCE_DATE_EPOCH` is set), and a folder source may
212
+ also get new record ids. Both packages move to 0.15.0 together, and `pikelet` requires
213
+ `pikelet-wasm` ^0.15.0.
214
+
215
+ ### Compatibility
216
+
217
+ - **`compile` no longer fits a calibration, and `compact` no longer
218
+ refits one.** New and compacted packs are `unscored` in the
219
+ `pikelet-wasm` library, and their evaluation segment carries no
220
+ `calibration` figures. `compile` still embeds up to 24 golden queries:
221
+ title and content-word questions generated from the corpus, each kept
222
+ only when the finished pack retrieves its source in the top 10, as
223
+ before. `--calibration-queries` is now `--golden-queries` (the old name
224
+ still works; giving both is refused), `--skip-calibration` and `compact
225
+ --no-refit` are accepted, change nothing and are no longer in the
226
+ help, and `--calibration <file>` still embeds a prebuilt asset. Builds skip the 20 to 30 seconds the fit
227
+ took; a 21-chunk corpus now compiles in 9 s. Recompiling a pack changes its
228
+ identity. `append` checks drift only on a chain whose base was
229
+ calibrated by an earlier build; on a base without a fit it no longer
230
+ refuses past 20% of the base's records, needs no `--allow-drift`, and
231
+ prints no drift figures.
232
+ - **`pikelet mcp` and `pikelet query` no longer report a relevance
233
+ verdict.** Search results drop `matchQuality` and `confidence`, the
234
+ response drops its `note` and `unscoredWarning`, and the `search` tool no
235
+ longer takes `showAbstained` (a client that still sends it is not
236
+ refused). Results always ship, including from packs calibrated by
237
+ earlier builds, which carry on unchanged in the `pikelet-wasm` library.
238
+ Each result keeps its `distance` and each section its `grounding`; the
239
+ tool description and server instructions now tell the model to cite only
240
+ a passage that states the answer and to check `grounding.uncovered`.
241
+ `verify_pack` drops `abstentionProbes`, its `calibration` figures and
242
+ the chain's calibration fields, and passes or fails on the golden
243
+ queries alone; `list_packs` drops a chain's `calibrationStatus`. `pikelet
244
+ query` prints each result's distance instead of a verdict line, and
245
+ both describe `grounding.uncovered` as the words the best-matching
246
+ passage lacks, which is what it computes (they said no top
247
+ passage contains them; counting a word as covered when any of the top
248
+ five has it separated unanswerable from answerable questions worse, AUC
249
+ 0.626 against 0.744 on the questions below). The
250
+ reason: on a 1,377-article Wikipedia pack the verdict called 278 of 512
251
+ unanswerable questions `strong`, and Sonnet and Haiku agents answered no
252
+ better with it than without it (`docs/calibration.md`).
253
+ - **Every pack returns `grounding`, and it grades short tokens like
254
+ "v8".** The reader computed `grounding` (which query words the
255
+ best-matching top passage contains and which it lacks) only inside a
256
+ fitted calibrator,
257
+ so an uncalibrated pack or chain returned none. It now grades the top
258
+ five fused passages for every pack, calibrated or not. Tokens holding a
259
+ digit count whatever their length ("v8", "3d"), where three letters
260
+ was the minimum, so "how many cylinders does a v8 engine have" now
261
+ reports `v8` uncovered when the best passage does not mention it. Every word weighs
262
+ the same: the calibrated coverage term discounts corpus-common words,
263
+ and on a calibrated pack `coverage` and the chosen passage can differ
264
+ from before. `matchQuality` and `confidence` are unchanged, since the
265
+ calibrated verdict keeps its own coverage term.
266
+ - **A calibration asset may carry a distance-only `gate`.** When present,
267
+ the library lets it alone decide `matchQuality: "none"`, and the main
268
+ model only separates `strong` from `weak`; a gate that is present but
269
+ malformed makes the pack `unscored`, and readers that predate it ignore
270
+ it. No pack built by a release carries one, and `compile` no longer
271
+ writes calibration, so this matters only for an asset passed with
272
+ `--calibration <file>`. Measurements are in `docs/calibration.md`.
273
+ - **A pack records no build time unless `SOURCE_DATE_EPOCH` is set.**
274
+ `compile` stamped the wall-clock time into the evaluation segment's
275
+ `generatedAt`, so two builds of the same inputs had different
276
+ identities unless `SOURCE_DATE_EPOCH` pinned it. Unpinned, the field is
277
+ now left out, and the same inputs give the same identity by default.
278
+ Builds with `SOURCE_DATE_EPOCH` set are byte-identical to 0.14.0's.
279
+ `evaluation().generatedAt` is absent on unpinned packs.
280
+ - **`pikelet mcp` may answer requests out of order.** Requests are now
281
+ handled concurrently, so a quick call is answered while a slow one is
282
+ still running, and replies can arrive in a different order from the
283
+ requests. JSON-RPC allows this, and clients match replies by id.
284
+ - **Packs that mount late may be named in arrival order.** `pikelet
285
+ mcp` now serves each pack as soon as it mounts. Packs that mount within
286
+ the 2 s grace period are still registered in the order given, so their
287
+ names and collision suffixes are unchanged. A pack that mounts later is
288
+ registered when it arrives: if it shares a manifest or file name with
289
+ another pack, whichever arrived first keeps the plain name (`docs`)
290
+ and the other gets the suffix (`docs-2`), which can differ between
291
+ runs. A shelf entry's `name` stays reserved while its pack is mounting,
292
+ so shelf-named packs keep their names.
293
+ - **A pack whose manifest name is not a plain identifier gets another
294
+ name.** `pikelet mcp` serves a pack under a name made of letters,
295
+ digits, `.`, `_` and `-` (at most 64 characters), the rule journal names
296
+ already follow. A shelf or manifest name outside it is skipped for the
297
+ file name, then `pack`. Such a pack's `pack` argument changes;
298
+ `list_packs` reports the declared name as `declaredName`.
299
+ - **A bare `pikelet` prints the commands instead of starting `create`.**
300
+ The interactive scaffold is `pikelet create`; `pikelet` with flags but
301
+ no command still scaffolds, as the old `npm create` flow did.
302
+ - **A folder source may get new record ids and a new identity.** Files
303
+ are now ingested in a fixed order, sorted by their `/`-separated path
304
+ under the source root by UTF-16 code unit, instead of the
305
+ filesystem's readdir order. Rebuilding a folder on a filesystem whose
306
+ order differed (ext4's is hash order) assigns different ids even with
307
+ no content change, so identities, goldens and ids pinned from an
308
+ earlier build will not match. Layers appended to an existing pack are
309
+ unaffected.
310
+ - **Malformed numeric flags are refused.** `compile --max-pages 12abc`
311
+ or `1.5` (and `--epochs`, `--sentence-windows`) used to truncate to 12
312
+ or 1; `append --max-depth abc` switched the depth limit off; `append
313
+ --max-pages 0` meant 500; a `--reader-drift-limit` outside 0..1 was
314
+ passed on. Each now fails with an error naming the flag and value.
315
+ - **`pikelet mcp` runs no request sent without an id.** A frame like
316
+ `{"method":"tools/call"}` with no id used to run the tool unanswered,
317
+ including `write_note`. Only `notifications/` methods now run without
318
+ an id; a frame with an id and no method gets `invalid request`, and a
319
+ client's own response gets no answer.
320
+ - **A remote read fails when the file's ETag changes.** A 206 whose ETag
321
+ differs (weakly compared) from the one pinned at HEAD or by an earlier
322
+ read, or a 200 without an ETag once one is pinned, throws
323
+ `ARTIFACT_CHANGED` instead of returning bytes that may mix two
324
+ versions of the file.
325
+ - **Crawls with shared navigation reach `--max-pages`.** A link repeated
326
+ on every page took a budget slot from each page; a 60-page crawl of a
327
+ site with a 20-link nav stopped at 26 documents. The same command now
328
+ fetches up to the limit, so it can produce a larger pack.
329
+ - **A chain query on a base that defers its encoder downloads it once.**
330
+ The first `query()` on such a chain now loads the query-interp
331
+ segment (about 25 MiB for MiniLM packs) to verify the calibration it
332
+ scores with, even when the caller supplies the vector.
333
+ - **A `compact()` that cannot rebuild throws `INVALID_VECTOR`**, not
334
+ `INTERNAL_INVARIANT`, and leaves the index searchable (see Fixed).
335
+ - **A crawl stays under the seed's path and follows robots.txt.**
336
+ `--source https://example.com/docs/` followed every same-origin link,
337
+ so it read the blog and marketing pages up to the 500-page cap; it now
338
+ reads `/docs/` and below (seed at the site root for the whole site).
339
+ The crawler reads robots.txt first and follows it (RFC 9309, plus
340
+ `Crawl-delay`): a disallowed seed is refused, disallowed pages are
341
+ skipped, and a robots.txt that answers with a server error stops the
342
+ crawl. Requests are 250 ms apart, and the User-Agent is
343
+ `pikelet/<version> (+https://github.com/mcn92/pikelet)` instead of
344
+ `pikelet/0.1.0`. The same applies to `append --source <url>`. A crawl
345
+ that used to wander may now produce a smaller pack, and takes longer.
346
+ - **Unknown commands and single-dash options are errors.** An
347
+ unrecognised command (`pikelet query` before it existed, `pikelet
348
+ compil`, `pikelet -v`) fell through to `create` and stopped at its
349
+ "Project name:" prompt; it now exits with an error, suggests the
350
+ nearest command, and prints the overview. A single-dash option other
351
+ than `-h` and `-v` was taken as a stray argument and ignored, so
352
+ `compile -o x.pikelet` wrote `search.pikelet`; it is now refused. Flags
353
+ given with no command still start `create`, as before.
354
+ - **`compile` prints less, and labels sizes MiB.** The lexical index size, the rerank sweep, the encoder
355
+ verification vectors and the golden replay now print only with
356
+ `--verbose`. Sizes are computed
357
+ in MiB and were labelled MB, here and in `compact`. When stdout is not
358
+ a terminal (CI, a piped log), the `Embedded N/M chunks` progress line
359
+ prints at most every 30 seconds plus the final count, instead of every
360
+ 16 chunks. Scripts that read compile's output should expect the new
361
+ lines.
362
+
363
+ ### Changed
364
+
365
+ - **`pikelet query <pack> "<question>"`** searches a pack from the
366
+ terminal and prints what the MCP `search` tool returns for the same
367
+ question: each result's title, source, distance and text, then the
368
+ question words the best passage lacks. `--json` prints the tool's response unchanged and `--limit` sets
369
+ the number of results. It takes a file, a URL, a `#<sha256>` pin or a
370
+ layer, like `mcp --pack`. `compile` now ends by naming this command and
371
+ `mcp install` as next steps.
372
+ - **A single file is a source.** `compile --source ./docs/install.md`
373
+ (or `.mdx`, `.html`, `.txt`) compiles that one file; it failed with a
374
+ raw ENOTDIR. The pack is named after the file without its extension.
375
+ - **`mcp install` checks the pack and writes a portable path.** It wrote
376
+ an entry for a pack file that did not exist and exited 0; a missing
377
+ local pack or shelf is now refused and nothing is written. For Claude
378
+ Code, a pack inside the project is written relative to the project, so
379
+ a committed `.mcp.json` works on another checkout; packs outside it,
380
+ and every path in Claude Desktop's config, stay absolute. The server
381
+ resolves relative `--pack`, `--shelf` and `--journal` paths against
382
+ `CLAUDE_PROJECT_DIR`, which Claude Code sets to the project root for
383
+ the servers it spawns, so they mount wherever the server starts; without
384
+ it they resolve against the working directory as before.
385
+ - **`pikelet --version`** (or `-v`) prints the version, `--flag=value`
386
+ works for every flag that takes a value, and `compile ./docs` is
387
+ `compile --source ./docs`.
388
+ - **The unsupported-Node warning is one line**, naming the version and the
389
+ supported range.
390
+ - **Shorter help.** `pikelet --help` is a one-screen overview that leads
391
+ with `compile` and `mcp install`. Each command has its own:
392
+ `pikelet <command> --help`, `-h`, or `pikelet help <command>`. `mcp
393
+ --help` used to fail with "mcp requires at least one --pack", and every
394
+ command's `--help` printed all 176 lines. `compile --help` now also
395
+ lists `--license`, `--calibration` and `--golden-queries`.
396
+ - **NOTICE credits the encoder every pack carries:** the
397
+ all-MiniLM-L6-v2 weights (quantized) and the bert-base-uncased WordPiece
398
+ vocabulary, both Apache-2.0. It named only Pikelet before. Both npm
399
+ packages ship it.
400
+ - **`pikelet-wasm` ships `FORMAT.md`,** the guide to the `.pikelet`
401
+ format (binary structure, embedded encoder, indexes, integrity,
402
+ versioning, compatibility and limits), next to its README and
403
+ CHANGELOG.
404
+
405
+ ### Fixed
406
+
407
+ - **A stalled host no longer hangs a read, or the MCP server.** Neither
408
+ `nodeFetch` nor `httpRangeSource` set a timeout, so a host that accepted
409
+ a request and then sent nothing left the read, and the query behind it,
410
+ pending with no error. Under `pikelet mcp` that stopped everything:
411
+ packs mounted one after another and tool calls ran one at a time inside
412
+ the stdin loop, so one stuck URL blocked every pack, local ones
413
+ included, and the client's `notifications/cancelled` could not be read.
414
+ - `nodeFetch` fails a request whose connection sits idle for
415
+ `idleTimeoutMs` (default 30 s; 0 disables), whether waiting for
416
+ headers or mid-body. A slow body that keeps arriving is not cut off.
417
+ - `httpRangeSource` keeps its own clock over every wait on the host
418
+ (HEAD, response headers, each body chunk), with the same option and
419
+ default, so a browser fetch or an injected transport cannot hang a
420
+ read either. It aborts the request through its signal. Retry sleeps
421
+ are not on the clock.
422
+ - `pikelet mcp` mounts packs concurrently and handles each request
423
+ without blocking the next. A cancelled request gets no reply. A
424
+ journal chain replaced by a write is closed only after calls already
425
+ reading it finish. The per-session limit of 100 notes is now checked
426
+ inside the write queue, so concurrent writes cannot overshoot it.
427
+ - **A slow pack no longer holds up the packs that mounted.** `pikelet
428
+ mcp` answered no tool call until every mount had settled, so one URL
429
+ pack on a stalled host held local packs, and the journal, for up to the
430
+ 30 s idle timeout. Each pack is now served as soon as it mounts, and a
431
+ tool call waits at most the 2 s grace period before serving the packs
432
+ that are ready (longer only while none is). A search across all packs
433
+ names the ones still mounting under `mounting`, with a note that they
434
+ were not searched; `list_packs` lists them under `mounting` too. A call
435
+ that names a pack not yet served waits for the mounts to settle rather
436
+ than reporting it unknown, and so do `get_record` and `verify_pack`
437
+ without `pack` while another pack might still appear. Journal tools
438
+ wait for the journal alone.
439
+ - **`verify_pack` says whether a large pack's lexical index was checked,
440
+ and can check it.** A lexical segment over 8 MiB (the Wikipedia pack's
441
+ is 69 MiB) opens lazily, and its reads are not checked against the
442
+ pack's digest one by one. `verify_pack` left that out and described
443
+ itself as proving the artifact intact. It now reports `lexicalIntegrity`
444
+ and `lexicalVerified`, and with `full: true` streams every lexical
445
+ segment against its digest first (636 ms for the local Wikipedia pack;
446
+ a remote pack downloads the segment); a mismatch is a tool error. The
447
+ reader gains `verifyLexical()`, `info().lexical.verified`, and a
448
+ `lazyLexicalBytes` open option (default 8 MiB; `Infinity` reads every
449
+ segment whole at open). A chain reports both per member and overall,
450
+ and its `verifyLexical()` names the member that fails.
451
+ - **Walking a chain to its base checks each parent's header first.**
452
+ `readMemberManifest`, which reads each hop's manifest when a chain is
453
+ mounted from its head, skipped the header checks the full open makes.
454
+ A manifest length up to the 256 MiB read budget was fetched and
455
+ hashed, a source whose size disagreed with its header was accepted,
456
+ and a manifest that was not JSON failed with a bare parser error. It
457
+ now applies the same 16 MiB cap, plausibility and size checks, and
458
+ reports a malformed manifest as one. It also takes `expectedIdentity`:
459
+ the walk passes the identity each child names for its parent, so a
460
+ located file that is not that parent is refused after its 64-byte
461
+ header, not after its manifest has been downloaded and hashed.
462
+ - **A pack's name can no longer put text into MCP tool descriptions.** The
463
+ name a pack is served under came from its manifest unchecked and was
464
+ written into the `search` tool's description, which clients hand to the
465
+ model as trusted instructions. A pack compiled with a name like
466
+ `docs). SYSTEM NOTE TO ASSISTANT: …` put that text in `tools/list`.
467
+ Names are now held to the identifier rule above.
468
+ - **A journal is private to its owner.** `journal init`, `write_note` and
469
+ `journal compact` created the journal under the process umask, so under
470
+ the usual 022 the directory was 0755 and its notes, `journal.json` and
471
+ chain files 0644: readable by every local user, although the journal is
472
+ documented as private and can hold conversation-derived notes. The
473
+ directory is now 0700 and its files 0600 whatever the umask. Each write
474
+ re-applies the modes before and after it runs, so a journal created by
475
+ an earlier release is closed off by its next note. On a filesystem that
476
+ keeps the old mode after chmod (FAT, a Windows drive mounted in WSL),
477
+ `pikelet` warns once instead of failing. Windows is unchanged.
478
+ - **`compile` downloads the encoder weights to the user cache.** An
479
+ installed `pikelet` fetched the 24 MiB MiniLM blob into its own package
480
+ directory. Under `npx` that is a cache npm purges, and under a global
481
+ install with a root-owned prefix the write failed with only "the download
482
+ failed". The blob now goes to `~/.cache/pikelet/models/all-MiniLM-L6-v2/`
483
+ (`$PIKELET_MODEL_CACHE` or `$XDG_CACHE_HOME` moves it), next to `create`'s
484
+ build encoder. A repo checkout still uses the copy in
485
+ `src/inline-encoder/`.
486
+ - **`pikelet mcp` survives a `null` message.** A line of valid JSON that is
487
+ not a request object (`null`, a number, an array) ended the server's
488
+ read loop, so nothing after it was answered. It now gets an `invalid
489
+ request` error and the server carries on.
490
+ - **A NUL byte in a source document can no longer corrupt record text.**
491
+ Markdown stripping marks protected code with NUL-delimited indexes, so a
492
+ document containing that pattern could pull code from elsewhere into
493
+ the record. NULs are now dropped from the input first. The markers are
494
+ written as `\u0000` escapes rather than raw bytes, so `ingest.mjs` no
495
+ longer reads as a binary file to git, grep and editors.
496
+ - **`append` asks for `--assert-ingest` only once per chain.** On a chain
497
+ whose base predates `corpus.ingest`, the depth-1 layer records the
498
+ operator's assertion and every later layer repeats it (6.1), but each
499
+ later `append` still refused without `--assert-ingest`. It now uses
500
+ the chain's declaration, and refuses an `--assert-ingest` that differs
501
+ from it, since a later layer may not change it.
502
+ - **Packs are written atomically, and `--out` cannot name an input.** The
503
+ writer truncated the output before writing, so a crash or full disk
504
+ left a broken file where a valid pack had been. It now writes a temp
505
+ file, fsyncs it and renames it into place, which needs room for a
506
+ second copy until the rename. `append`, `compact` and `rebase` refuse
507
+ an `--out` that resolves to one of their own input packs, even with
508
+ `--force`; before, it truncated the input while the chain was still
509
+ reading it.
510
+ - **A deferred base's calibration is verified before a chain query uses
511
+ it.** A chain query never embeds, so on a base whose encoder was
512
+ deferred it scored `matchQuality`, the union bloom and the drift
513
+ envelope from calibration bytes not yet checked against the pack's
514
+ identity. An altered calibration region answered normally; it now
515
+ fails hash verification.
516
+ - **Remote reads are bounded and share one fallback download.**
517
+ `httpRangeSource` streams a 206 and cancels it at the first byte past
518
+ its `Content-Range`, instead of buffering whatever the host sent.
519
+ When a host ignores Range, the reads in flight share one full download
520
+ instead of each starting its own (up to 32 at once). A 429 or 503
521
+ without `Retry-After` now backs off (250 ms doubling) instead of
522
+ retrying three times at once. Responses the reader does not consume
523
+ are cancelled, so their connections are freed.
524
+ - **`--supersede` paths resolve against the file that produced each
525
+ record.** With two `--source` roots holding the same relative path,
526
+ a target naming one file was refused as ambiguous. A target naming a
527
+ file under the working directory no longer lands on another root's
528
+ record with the same relative path when that file produced no record.
529
+ - **A failed `compact()` keeps the index usable.** When the engine could
530
+ not rebuild the graph (a zero-norm row in an imported cosine
531
+ snapshot), the wrapper cleared every id mapping, so each later search
532
+ failed with "missing external ID mapping". The mappings are now kept.
533
+ The row still blocks compaction until it is deleted.
534
+ - **Journal writes are durable.** `journal.json` is fsynced before its
535
+ rename, and the journal directory after each rename, so a power loss
536
+ cannot leave an empty `journal.json` or one naming chain files that
537
+ compaction already removed. Each write waits for these flushes.
538
+
11
539
  ## pikelet-wasm 0.14.0 / pikelet 0.14.0 — 2026-11-04
12
540
 
13
541
  Asking a URL pack a question an earlier process already asked is now