@hraness/wordcell 0.26.2 → 0.27.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.
Files changed (79) hide show
  1. package/README.md +36 -21
  2. package/dist/capture.js +15 -7
  3. package/dist/cli-bin.js +2 -2
  4. package/dist/cli.js +21 -19
  5. package/dist/clip/acquire.js +4 -3
  6. package/dist/clip/bundle-reader.js +3 -2
  7. package/dist/clip/cli.js +8 -7
  8. package/dist/clip/defuddle-worker.js +4 -1
  9. package/dist/clip/doctor.js +5 -4
  10. package/dist/clip/jobs.js +2 -1
  11. package/dist/clip/persist.js +2 -1
  12. package/dist/clip/refresh.js +4 -3
  13. package/dist/evaluation-builder-bin.js +2 -2
  14. package/dist/evaluation-builder.js +3 -3
  15. package/dist/evaluation-kb.js +3 -3
  16. package/dist/{index-mp5y3ty3.js → index-30v9w4cy.js} +36 -20
  17. package/dist/{index-9paxge84.js → index-3hts6yy9.js} +1 -1
  18. package/dist/{index-h9vyd03z.js → index-58azscg5.js} +7 -6
  19. package/dist/{index-9zkba8hr.js → index-7bqwzjba.js} +7 -6
  20. package/dist/{index-j4zgmzjr.js → index-8djdwjjd.js} +1 -1
  21. package/dist/{index-5h5awwh4.js → index-b40e2dkx.js} +2 -2
  22. package/dist/index-e2wstc7t.js +323 -0
  23. package/dist/{index-hacpnaew.js → index-fd8j527z.js} +1 -1
  24. package/dist/{index-mxxxytys.js → index-g63d3937.js} +4 -0
  25. package/dist/{index-k86wepd8.js → index-h2w7syy2.js} +5 -1
  26. package/dist/{index-9fywek7g.js → index-ht14xne3.js} +1 -1
  27. package/dist/{index-82r6g4py.js → index-k9yzc4vn.js} +1 -1
  28. package/dist/{index-m9p2a4mj.js → index-my50xsa3.js} +221 -36
  29. package/dist/{index-ncwzmsge.js → index-nwdzhj1h.js} +2 -2
  30. package/dist/{index-9rf81m0p.js → index-pbz3qw1s.js} +35 -20
  31. package/dist/index-pn14a2m5.js +59 -0
  32. package/dist/{index-nd8v7r0z.js → index-sp43012q.js} +1 -1
  33. package/dist/{index-8pabwzqg.js → index-t4hjm1kk.js} +2 -1
  34. package/dist/{index-npg9z1a4.js → index-xn5q4kne.js} +5 -1
  35. package/dist/{index-j2jt49gr.js → index-yatn62qq.js} +1 -1
  36. package/dist/index.js +14 -4
  37. package/dist/pdf.js +438 -4
  38. package/dist/portfolio.js +3 -3
  39. package/dist/rerank-clef.js +16 -0
  40. package/dist/rerank-typesafe.js +3 -1
  41. package/dist/sdk.js +2 -2
  42. package/dist/{support-9qdr4hb8.js → support-s059eytv.js} +20 -18
  43. package/dist/url-intelligence.js +4 -3
  44. package/dist/workflows/decision-context.js +3 -3
  45. package/dist/workflows/index.js +3 -3
  46. package/package.json +23 -9
  47. package/skills/wordcell/SKILL.md +1 -1
  48. package/skills/wordcell/references/query.md +11 -6
  49. package/src/capture.ts +5 -0
  50. package/src/cli-help.ts +2 -1
  51. package/src/cli-program.ts +23 -8
  52. package/src/clip/browser-profiles.ts +1 -1
  53. package/src/clip/bundle-reader.ts +3 -0
  54. package/src/clip/capture.ts +1 -0
  55. package/src/clip/extract.ts +2 -0
  56. package/src/clip/lib.ts +3 -0
  57. package/src/clip/metadata-search-tool/Cargo.lock +6 -6
  58. package/src/clip/metadata-search.ts +1 -1
  59. package/src/clip/metadata.ts +232 -0
  60. package/src/clip/persist.ts +3 -0
  61. package/src/index.ts +2 -1
  62. package/src/pdf/bundle-reader.ts +457 -0
  63. package/src/pdf/capture.ts +6 -2
  64. package/src/pdf/cli.ts +2 -1
  65. package/src/pdf/errors.ts +11 -0
  66. package/src/pdf/extract.ts +16 -13
  67. package/src/pdf/layout.ts +136 -3
  68. package/src/pdf/markdown.ts +7 -1
  69. package/src/pdf/model.ts +9 -0
  70. package/src/pdf/persist.ts +8 -2
  71. package/src/pdf/source.ts +5 -4
  72. package/src/pdf/tools.ts +8 -6
  73. package/src/pdf.ts +10 -0
  74. package/src/rerank-clef.ts +52 -0
  75. package/src/rerank-credentials.ts +11 -2
  76. package/src/rerank-typesafe.ts +44 -20
  77. package/src/rerank.ts +1 -1
  78. package/src/sdk.ts +4 -2
  79. /package/dist/{index-cd75vky9.js → index-jbtyp6q5.js} +0 -0
package/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  <!-- hraness:wordcell-landing:start -->
2
2
  # Wordcell
3
3
 
4
+ > 🧠 Wordcell hands the next agent session what this one learned. Decisions,
5
+ > plans, and sources live as Markdown files beside your code. Tie a note to the
6
+ > paths it explains, and an agent about to change that code gets the note
7
+ > first. Search matches exact words or meaning, with an optional local model,
8
+ > and every index rebuilds from files you can read in any editor.
9
+ >
10
+ > Ask your agent to set it up: https://wordcell.io
11
+
4
12
  [![Agent Skill](https://raw.githubusercontent.com/hraness/wordcell/main/assets/agent-skill.svg)](https://github.com/hraness/wordcell/tree/main/skills/wordcell)
5
13
 
6
14
  Wordcell is a Markdown knowledge base and local MCP memory server for coding
@@ -66,14 +74,14 @@ Wordcell keeps the record in Markdown files you own, rebuilds every index from t
66
74
  The CLI and TypeScript SDK run with Bun. Install the versioned GitHub archive:
67
75
 
68
76
  ```sh
69
- bun add --global --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.26.2/hraness-wordcell-0.26.2.tgz
77
+ bun add --global --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.27.0/hraness-wordcell-0.27.0.tgz
70
78
  wordcell --help
71
79
  ```
72
80
 
73
81
  Prefer npm? The same release is [mirrored there](https://www.npmjs.com/package/@hraness/wordcell):
74
82
 
75
83
  ```sh
76
- npm install --global --ignore-scripts @hraness/wordcell@0.26.2
84
+ npm install --global --ignore-scripts @hraness/wordcell@0.27.0
77
85
  wordcell --help
78
86
  ```
79
87
 
@@ -137,7 +145,7 @@ After trying the CLI, install the public Agent Skill into a compatible agent,
137
145
  such as Claude Code, Codex, Cursor, or GitHub Copilot:
138
146
 
139
147
  ```sh
140
- bunx skills add hraness/wordcell#v0.26.2 --skill wordcell
148
+ bunx skills add hraness/wordcell#v0.27.0 --skill wordcell
141
149
  ```
142
150
 
143
151
  Then ask:
@@ -194,15 +202,20 @@ Open the returned Markdown and guides before acting on them.
194
202
 
195
203
  ## Rerank a search window
196
204
 
205
+ Cloudflare Clef support is in the current source tree. The versioned release
206
+ listed above does not include it. From a source checkout, run:
207
+
197
208
  ```sh
198
- wordcell search "why releases use immutable archives" --root kb --mode exact \
199
- --rerank typesafe --rerank-limit 25 --limit 5 --json
209
+ bun ./src/cli.ts search "why releases use immutable archives" --root kb --mode exact \
210
+ --rerank clef --rerank-limit 25 --limit 5 --json
200
211
  ```
201
212
 
202
- This optional hosted lane uses TypeSafe's pinned `jev-1.13.0` model. It sends
203
- bounded query and note snippets to the provider, needs a private local
204
- credential, and incurs provider charges. Exact identities remain first; a
205
- provider failure retains the baseline order with a diagnostic. See the
213
+ This optional hosted reranker uses Cloudflare Clef (`clef` by default, or
214
+ `--rerank-model clef-flash`). It sends the query and candidate note identifiers,
215
+ titles, paths, and snippets to Cloudflare, needs `CLOUDFLARE_ACCOUNT_ID` and
216
+ `CLOUDFLARE_API_TOKEN`, and incurs provider charges. Enable it only for vaults you
217
+ approve for external processing; credentials alone never enable it. Exact
218
+ identities remain first; a provider failure retains the baseline order with a diagnostic. See the
206
219
  [setup, SDK examples, measured results, and limits](https://github.com/hraness/wordcell/blob/main/docs/reranking.md).
207
220
 
208
221
  ## What you can do
@@ -266,7 +279,7 @@ redaction. [Selection recipes and hosting guide](https://github.com/hraness/word
266
279
  Code, Claude Desktop, Cursor, or Codex, over standard input and output. The
267
280
  client can search, list, and read notes, follow links, create notes, update a
268
281
  note body at a known revision, and add typed relations. `--read-only` removes
269
- the write tools. [Connect a client](https://github.com/hraness/wordcell/blob/main/docs/reference.md#connect-a-client)
282
+ the write tools. [Connect Wordcell to your coding agent](https://github.com/hraness/wordcell/blob/main/docs/agent-handoffs.md)
270
283
  shows the setup for each host.
271
284
 
272
285
  With the Agent Skill, ask your agent to save the session. It writes a dated
@@ -283,10 +296,10 @@ keeps one vault current on several machines.
283
296
 
284
297
  ## Evidence and comparisons
285
298
 
286
- On the public SciFact dataset of scientific abstracts, optional hosted Jev
299
+ In the September 19, 2026 SciFact study of scientific abstracts, hosted Jev
287
300
  reranking placed a relevant result first for **161 of 300 queries**, versus
288
- **101** with Wordcell exact search alone. Hosted reranking is optional and uses
289
- a paid provider. [Results and method](https://github.com/hraness/wordcell/blob/main/docs/reranking.md#evidence-and-limits).
301
+ **101** with Wordcell exact search alone. These historical measurements do not
302
+ evaluate Cloudflare Clef or Clef Flash. [Results and method](https://github.com/hraness/wordcell/blob/main/docs/reranking.md#evidence-and-limits).
290
303
 
291
304
  [The comparison guide](https://wordcell.io/docs/comparisons)
292
305
  covers Markdown alone, QMD, Basic Memory, Obsidian, static publishing tools,
@@ -335,7 +348,7 @@ Backlinks and typed relationships come from authored links. Percolation
335
348
  suggests connections for review and does not add inferred edges to notes.
336
349
 
337
350
  Wordcell search combines its own exact matching with optional QMD local search
338
- and optional hosted Jev reranking. Oh also offers memory retrieval for applications;
351
+ and optional hosted Cloudflare Clef reranking. Oh also offers memory retrieval for applications;
339
352
  its conversation-memory benchmark scores measure that separate path. They do not
340
353
  establish Wordcell's retrieval or answer quality. [How the integration works](https://github.com/hraness/wordcell/blob/main/docs/graph-authority.md#how-wordcell-and-oh-fit-together).
341
354
 
@@ -348,7 +361,7 @@ exist. [Graph queries and proof limits](https://github.com/hraness/wordcell/blob
348
361
  Add the same immutable release to a Bun project:
349
362
 
350
363
  ```sh
351
- bun add --exact --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.26.2/hraness-wordcell-0.26.2.tgz
364
+ bun add --exact --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.27.0/hraness-wordcell-0.27.0.tgz
352
365
  ```
353
366
 
354
367
  The SDK provides read-only vault sessions, metadata queries, search, graph
@@ -359,8 +372,8 @@ show the public imports and lifecycle.
359
372
  ## Privacy and boundaries
360
373
 
361
374
  - Structural queries and exact search read local files. Optional semantic
362
- search downloads its model on first use and runs locally. Optional Jev
363
- reranking sends the query and bounded candidate context to a remote provider;
375
+ search downloads its model on first use and runs locally. Optional Cloudflare
376
+ Clef reranking sends the query and candidate context to Cloudflare;
364
377
  it is off by default.
365
378
  - URL capture contacts the requested source. Signed-in capture uses only
366
379
  explicitly selected browser state. Review the [security policy](https://github.com/hraness/wordcell/blob/main/SECURITY.md)
@@ -372,15 +385,17 @@ show the public imports and lifecycle.
372
385
 
373
386
  ## Documentation
374
387
 
375
- The documentation follows the Diataxis split: a tutorial to learn the loop,
376
- how-to guides for tasks, reference for exact interfaces, and explanation for
377
- the design. Browse it on the [documentation index](https://wordcell.io/docs).
388
+ Start with the task you want to complete. Browse all guides on the
389
+ [documentation index](https://wordcell.io/docs).
378
390
 
379
391
  | Read next | Purpose |
380
392
  | --- | --- |
381
393
  | [Get started](https://github.com/hraness/wordcell/blob/main/docs/getting-started.md) | Learn the full loop on a first vault: save, find, connect, and publish one note. |
382
394
  | [Agent workflow](https://github.com/hraness/wordcell/blob/main/docs/agent-workflow.md) | Set up, query, maintain, and revise repository memory. |
383
- | [Local MCP server](https://github.com/hraness/wordcell/blob/main/docs/reference.md#local-mcp-server) | Connect Claude Code, Claude Desktop, Cursor, or Codex to a vault and review the write tools. |
395
+ | [Search an existing Obsidian or Markdown vault](https://github.com/hraness/wordcell/blob/main/docs/getting-started.md#search-an-existing-markdown-or-obsidian-vault) | Find a saved note without initialization or a model download. |
396
+ | [Use an existing Obsidian vault](https://github.com/hraness/wordcell/blob/main/docs/obsidian.md) | See which Obsidian links, tags, and attachments Wordcell reads, and serve the vault to an agent read-only. |
397
+ | [Connect a coding agent over MCP](https://github.com/hraness/wordcell/blob/main/docs/agent-handoffs.md) | Configure Claude Code, Codex, Cursor, or Claude Desktop, then verify a note read. |
398
+ | [Troubleshoot MCP](https://github.com/hraness/wordcell/blob/main/docs/agent-handoffs.md#troubleshoot-the-connection) | Diagnose executable paths, partial search results, missing tools, and oversized responses. |
384
399
  | [Installation and command reference](https://github.com/hraness/wordcell/blob/main/docs/reference.md) | Exact interfaces, SDK imports, optional adapters, and troubleshooting prerequisites. |
385
400
  | [Web capture](https://github.com/hraness/wordcell/blob/main/docs/capture.md) and [PDF capture](https://github.com/hraness/wordcell/blob/main/docs/pdf.md) | Save sources with provenance, assets, and explicit completeness limits. |
386
401
  | [Publish selected notes](https://github.com/hraness/wordcell/blob/main/docs/publish.md) | Preview a slice, build a static site, and choose how to host it. |
package/dist/capture.js CHANGED
@@ -5,19 +5,23 @@ import {
5
5
  captureSummary,
6
6
  main,
7
7
  runCapture
8
- } from "./index-h9vyd03z.js";
9
- import"./index-hacpnaew.js";
10
- import"./index-k86wepd8.js";
8
+ } from "./index-58azscg5.js";
9
+ import"./index-fd8j527z.js";
10
+ import"./index-h2w7syy2.js";
11
11
  import {
12
12
  adapterCapabilities,
13
13
  inspectClipEnvironment,
14
14
  renderDoctorReport
15
- } from "./index-nd8v7r0z.js";
15
+ } from "./index-sp43012q.js";
16
16
  import"./index-hnvx7m1j.js";
17
- import"./index-ncwzmsge.js";
18
- import"./index-cd75vky9.js";
17
+ import"./index-nwdzhj1h.js";
18
+ import"./index-jbtyp6q5.js";
19
19
  import"./index-2gv8y733.js";
20
- import"./index-mxxxytys.js";
20
+ import"./index-g63d3937.js";
21
+ import {
22
+ extractArticleMetadata,
23
+ parseArticleMetadata
24
+ } from "./index-e2wstc7t.js";
21
25
  import"./index-w2zc0vwa.js";
22
26
  import"./index-e5fbsywq.js";
23
27
  import"./index-gh719d91.js";
@@ -38,11 +42,15 @@ var inspectClipEnvironment2 = (...arguments_) => inspectClipEnvironment(...argum
38
42
  var parseCaptureArguments = (...arguments_) => parseArguments(...arguments_);
39
43
  var renderDoctorReport2 = (...arguments_) => renderDoctorReport(...arguments_);
40
44
  var runCapture2 = (...arguments_) => runCapture(...arguments_);
45
+ var extractArticleMetadata2 = (...arguments_) => extractArticleMetadata(...arguments_);
46
+ var parseArticleMetadata2 = (...arguments_) => parseArticleMetadata(...arguments_);
41
47
  export {
42
48
  runCapture2 as runCapture,
43
49
  renderDoctorReport2 as renderDoctorReport,
44
50
  parseCaptureArguments,
51
+ parseArticleMetadata2 as parseArticleMetadata,
45
52
  inspectClipEnvironment2 as inspectClipEnvironment,
53
+ extractArticleMetadata2 as extractArticleMetadata,
46
54
  clipMain,
47
55
  captureSummary2 as captureSummary,
48
56
  captureSucceeded2 as captureSucceeded,
package/dist/cli-bin.js CHANGED
@@ -2,9 +2,9 @@
2
2
  // @bun
3
3
  import {
4
4
  runWordcellBin
5
- } from "./index-82r6g4py.js";
5
+ } from "./index-k9yzc4vn.js";
6
6
  import"./index-3t0v457d.js";
7
- import"./index-8pabwzqg.js";
7
+ import"./index-t4hjm1kk.js";
8
8
  import"./index-4knsp9qj.js";
9
9
  import"./index-z1w83f81.js";
10
10
 
package/dist/cli.js CHANGED
@@ -6,34 +6,36 @@ import {
6
6
  parseArguments,
7
7
  runExecutable,
8
8
  usage
9
- } from "./index-mp5y3ty3.js";
10
- import"./index-5h5awwh4.js";
11
- import"./index-m9p2a4mj.js";
12
- import"./index-9paxge84.js";
13
- import"./index-j4zgmzjr.js";
14
- import"./index-npg9z1a4.js";
15
- import"./index-h9vyd03z.js";
16
- import"./index-hacpnaew.js";
17
- import"./index-k86wepd8.js";
18
- import"./index-nd8v7r0z.js";
9
+ } from "./index-30v9w4cy.js";
10
+ import"./index-b40e2dkx.js";
11
+ import"./index-my50xsa3.js";
12
+ import"./index-3hts6yy9.js";
13
+ import"./index-8djdwjjd.js";
14
+ import"./index-xn5q4kne.js";
15
+ import"./index-58azscg5.js";
16
+ import"./index-fd8j527z.js";
17
+ import"./index-h2w7syy2.js";
18
+ import"./index-sp43012q.js";
19
19
  import"./index-hnvx7m1j.js";
20
- import"./index-8pabwzqg.js";
21
- import"./index-ncwzmsge.js";
22
- import"./index-cd75vky9.js";
20
+ import"./index-t4hjm1kk.js";
21
+ import"./index-nwdzhj1h.js";
22
+ import"./index-jbtyp6q5.js";
23
23
  import"./index-2gv8y733.js";
24
- import"./index-mxxxytys.js";
24
+ import"./index-g63d3937.js";
25
+ import"./index-e2wstc7t.js";
25
26
  import"./index-w2zc0vwa.js";
26
27
  import"./index-e5fbsywq.js";
27
28
  import"./index-gh719d91.js";
28
29
  import"./index-byz4kzww.js";
29
30
  import"./index-23z4zxgg.js";
30
- import"./index-9rf81m0p.js";
31
+ import"./index-pn14a2m5.js";
32
+ import"./index-pbz3qw1s.js";
31
33
  import"./index-pj501bh1.js";
32
- import"./index-j2jt49gr.js";
33
- import"./index-9zkba8hr.js";
34
+ import"./index-yatn62qq.js";
35
+ import"./index-7bqwzjba.js";
36
+ import"./index-4j3tt0c3.js";
34
37
  import"./index-adx6khj5.js";
35
38
  import"./index-fp732bgg.js";
36
- import"./index-4j3tt0c3.js";
37
39
  import"./index-wqx1x32f.js";
38
40
  import"./index-3gc2yk4k.js";
39
41
  import"./index-pgtm2nhf.js";
@@ -64,7 +66,7 @@ import {
64
66
 
65
67
  // src/cli.ts
66
68
  async function runStandaloneCli(args = process.argv.slice(2)) {
67
- const { standaloneSupportEnvironment, isUsefulSupportResult, runProductSupportCommand, showProductSupportInvitation } = await import("./support-9qdr4hb8.js");
69
+ const { standaloneSupportEnvironment, isUsefulSupportResult, runProductSupportCommand, showProductSupportInvitation } = await import("./support-s059eytv.js");
68
70
  const env = standaloneSupportEnvironment();
69
71
  if (args[0] === "support") {
70
72
  return await runProductSupportCommand(args.slice(1), { env });
@@ -22,10 +22,11 @@ import {
22
22
  mergeRenderedTextSnapshots,
23
23
  readBrowserExpansionTelemetry,
24
24
  seedOwnedBrowserCookies
25
- } from "../index-ncwzmsge.js";
26
- import"../index-cd75vky9.js";
25
+ } from "../index-nwdzhj1h.js";
26
+ import"../index-jbtyp6q5.js";
27
27
  import"../index-2gv8y733.js";
28
- import"../index-mxxxytys.js";
28
+ import"../index-g63d3937.js";
29
+ import"../index-e2wstc7t.js";
29
30
  import"../index-w2zc0vwa.js";
30
31
  import"../index-e5fbsywq.js";
31
32
  import"../index-gh719d91.js";
@@ -2,8 +2,9 @@
2
2
  import {
3
3
  readCaptureBundle,
4
4
  verifyCaptureBundle
5
- } from "../index-npg9z1a4.js";
6
- import"../index-mxxxytys.js";
5
+ } from "../index-xn5q4kne.js";
6
+ import"../index-g63d3937.js";
7
+ import"../index-e2wstc7t.js";
7
8
  import"../index-1xxnjn0d.js";
8
9
  import"../index-z1w83f81.js";
9
10
  export {
package/dist/clip/cli.js CHANGED
@@ -5,15 +5,16 @@ import {
5
5
  captureSucceeded,
6
6
  captureSummary,
7
7
  main
8
- } from "../index-h9vyd03z.js";
9
- import"../index-hacpnaew.js";
10
- import"../index-k86wepd8.js";
11
- import"../index-nd8v7r0z.js";
8
+ } from "../index-58azscg5.js";
9
+ import"../index-fd8j527z.js";
10
+ import"../index-h2w7syy2.js";
11
+ import"../index-sp43012q.js";
12
12
  import"../index-hnvx7m1j.js";
13
- import"../index-ncwzmsge.js";
14
- import"../index-cd75vky9.js";
13
+ import"../index-nwdzhj1h.js";
14
+ import"../index-jbtyp6q5.js";
15
15
  import"../index-2gv8y733.js";
16
- import"../index-mxxxytys.js";
16
+ import"../index-g63d3937.js";
17
+ import"../index-e2wstc7t.js";
17
18
  import"../index-w2zc0vwa.js";
18
19
  import"../index-e5fbsywq.js";
19
20
  import"../index-gh719d91.js";
@@ -1,4 +1,7 @@
1
1
  // @bun
2
+ import {
3
+ extractArticleMetadata
4
+ } from "../index-e2wstc7t.js";
2
5
  import"../index-z1w83f81.js";
3
6
 
4
7
  // src/clip/defuddle-worker.ts
@@ -161,7 +164,7 @@ workerGlobal.onmessage = async (event) => {
161
164
  useAsync: false,
162
165
  removeImages: false
163
166
  });
164
- const enriched = typeof value === "object" && value !== null && !Array.isArray(value) ? { ...value, captureVideoPosters: videoPosters } : value;
167
+ const enriched = typeof value === "object" && value !== null && !Array.isArray(value) ? { ...value, captureVideoPosters: videoPosters, metadata: await extractArticleMetadata(request.html, request.url, value) } : value;
165
168
  workerGlobal.postMessage({ ok: true, value: enriched });
166
169
  } catch {
167
170
  workerGlobal.postMessage({ ok: false, message: "Defuddle could not parse this acquisition." });
@@ -9,11 +9,12 @@ import {
9
9
  renderAdapterCapabilities,
10
10
  renderDoctorReport,
11
11
  runDiagnosticCommand
12
- } from "../index-nd8v7r0z.js";
13
- import"../index-ncwzmsge.js";
14
- import"../index-cd75vky9.js";
12
+ } from "../index-sp43012q.js";
13
+ import"../index-nwdzhj1h.js";
14
+ import"../index-jbtyp6q5.js";
15
15
  import"../index-2gv8y733.js";
16
- import"../index-mxxxytys.js";
16
+ import"../index-g63d3937.js";
17
+ import"../index-e2wstc7t.js";
17
18
  import"../index-w2zc0vwa.js";
18
19
  import"../index-e5fbsywq.js";
19
20
  import"../index-gh719d91.js";
package/dist/clip/jobs.js CHANGED
@@ -1,7 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  redactSensitiveText
4
- } from "../index-mxxxytys.js";
4
+ } from "../index-g63d3937.js";
5
+ import"../index-e2wstc7t.js";
5
6
  import {
6
7
  sanitizeTerminalLine,
7
8
  sanitizeTerminalText
@@ -12,7 +12,8 @@ import {
12
12
  sanitizeArtifactUrl,
13
13
  sanitizeSourceHtml,
14
14
  writeCaptureBundle
15
- } from "../index-mxxxytys.js";
15
+ } from "../index-g63d3937.js";
16
+ import"../index-e2wstc7t.js";
16
17
  import"../index-1xxnjn0d.js";
17
18
  import"../index-z1w83f81.js";
18
19
  export {
@@ -1,9 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  diffCaptureBundle
4
- } from "../index-j4zgmzjr.js";
5
- import"../index-npg9z1a4.js";
6
- import"../index-mxxxytys.js";
4
+ } from "../index-8djdwjjd.js";
5
+ import"../index-xn5q4kne.js";
6
+ import"../index-g63d3937.js";
7
+ import"../index-e2wstc7t.js";
7
8
  import"../index-1gwbassd.js";
8
9
  import"../index-1xxnjn0d.js";
9
10
  import"../index-z1w83f81.js";
@@ -2,9 +2,9 @@
2
2
  // @bun
3
3
  import {
4
4
  runWordcellBin
5
- } from "./index-82r6g4py.js";
5
+ } from "./index-k9yzc4vn.js";
6
6
  import"./index-3t0v457d.js";
7
- import"./index-8pabwzqg.js";
7
+ import"./index-t4hjm1kk.js";
8
8
  import"./index-4knsp9qj.js";
9
9
  import"./index-z1w83f81.js";
10
10
 
@@ -9,15 +9,15 @@ import {
9
9
  knowledgeBaseEvaluationRetrieverIds,
10
10
  openKnowledgeBaseEvaluation,
11
11
  verifyFrozenEvaluationSnapshot
12
- } from "./index-j2jt49gr.js";
13
- import"./index-9zkba8hr.js";
12
+ } from "./index-yatn62qq.js";
13
+ import"./index-7bqwzjba.js";
14
+ import"./index-4j3tt0c3.js";
14
15
  import"./index-adx6khj5.js";
15
16
  import {
16
17
  indexSemanticVault,
17
18
  recommendedEmbeddingModel,
18
19
  recommendedEmbeddingModelSha256
19
20
  } from "./index-fp732bgg.js";
20
- import"./index-4j3tt0c3.js";
21
21
  import"./index-wqx1x32f.js";
22
22
  import"./index-3gc2yk4k.js";
23
23
  import"./index-pgtm2nhf.js";
@@ -4,11 +4,11 @@ import {
4
4
  knowledgeBaseEvaluationRetrieverIds,
5
5
  openKnowledgeBaseEvaluation,
6
6
  verifyFrozenEvaluationSnapshot
7
- } from "./index-j2jt49gr.js";
8
- import"./index-9zkba8hr.js";
7
+ } from "./index-yatn62qq.js";
8
+ import"./index-7bqwzjba.js";
9
+ import"./index-4j3tt0c3.js";
9
10
  import"./index-adx6khj5.js";
10
11
  import"./index-fp732bgg.js";
11
- import"./index-4j3tt0c3.js";
12
12
  import"./index-wqx1x32f.js";
13
13
  import"./index-3gc2yk4k.js";
14
14
  import"./index-pgtm2nhf.js";
@@ -3,26 +3,26 @@ import {
3
3
  backfillSavedUrlMetadata,
4
4
  createRustMetadataSearchProvider,
5
5
  savedSourceProblem
6
- } from "./index-5h5awwh4.js";
6
+ } from "./index-b40e2dkx.js";
7
7
  import {
8
8
  main as main2
9
- } from "./index-m9p2a4mj.js";
9
+ } from "./index-my50xsa3.js";
10
10
  import {
11
11
  MAX_AUTHORIZED_VAULTS,
12
12
  auditKnowledgePortfolio,
13
13
  loadPortfolioRegistry,
14
14
  openKnowledgePortfolio,
15
15
  snapshotPortfolioRegistry
16
- } from "./index-9paxge84.js";
16
+ } from "./index-3hts6yy9.js";
17
17
  import {
18
18
  diffCaptureBundle
19
- } from "./index-j4zgmzjr.js";
19
+ } from "./index-8djdwjjd.js";
20
20
  import {
21
21
  verifyCaptureBundle
22
- } from "./index-npg9z1a4.js";
22
+ } from "./index-xn5q4kne.js";
23
23
  import {
24
24
  main
25
- } from "./index-h9vyd03z.js";
25
+ } from "./index-58azscg5.js";
26
26
  import {
27
27
  advancedHelp,
28
28
  closestMatch,
@@ -33,7 +33,7 @@ import {
33
33
  resolveCommandId,
34
34
  rootHelp,
35
35
  startHelp
36
- } from "./index-8pabwzqg.js";
36
+ } from "./index-t4hjm1kk.js";
37
37
  import {
38
38
  detectAudience,
39
39
  renderFailure,
@@ -43,17 +43,20 @@ import {
43
43
  symbol,
44
44
  terminalOutput,
45
45
  terminalStyle
46
- } from "./index-cd75vky9.js";
46
+ } from "./index-jbtyp6q5.js";
47
47
  import {
48
48
  redactSensitiveText,
49
49
  sanitizeArtifactUrl
50
- } from "./index-mxxxytys.js";
50
+ } from "./index-g63d3937.js";
51
51
  import {
52
52
  initVault
53
53
  } from "./index-23z4zxgg.js";
54
+ import {
55
+ createClefReranker
56
+ } from "./index-pn14a2m5.js";
54
57
  import {
55
58
  createTypeSafeReranker
56
- } from "./index-9rf81m0p.js";
59
+ } from "./index-pbz3qw1s.js";
57
60
  import {
58
61
  MAX_SOURCE_INBOX_PREFIXES,
59
62
  MAX_SOURCE_INBOX_RESULTS,
@@ -62,7 +65,7 @@ import {
62
65
  import {
63
66
  knowledgeBaseEvaluationRetrieverIds,
64
67
  openKnowledgeBaseEvaluation
65
- } from "./index-j2jt49gr.js";
68
+ } from "./index-yatn62qq.js";
66
69
  import {
67
70
  DEFAULT_SEARCH_RESULTS,
68
71
  MAX_SEARCH_CANDIDATES,
@@ -71,7 +74,7 @@ import {
71
74
  MAX_SEARCH_RESULTS,
72
75
  openKnowledgeBase,
73
76
  searchEvidenceRank
74
- } from "./index-9zkba8hr.js";
77
+ } from "./index-7bqwzjba.js";
75
78
  import {
76
79
  MAX_SEARCH_RULE_CONFIG_BYTES,
77
80
  parseSearchRules
@@ -3548,8 +3551,8 @@ import { constants as constants2 } from "fs";
3548
3551
  import { open as open2 } from "fs/promises";
3549
3552
  import { homedir } from "os";
3550
3553
  import { isAbsolute as isAbsolute2, join as join4 } from "path";
3551
- function unavailable(message) {
3552
- return { id: "typesafe", rerank: async () => ({ status: "unavailable", message }) };
3554
+ function unavailable(message, id = "typesafe") {
3555
+ return { id, rerank: async () => ({ status: "unavailable", message }) };
3553
3556
  }
3554
3557
  async function createCliTypeSafeReranker(environment = process.env, homeDirectory = homedir()) {
3555
3558
  if (Object.hasOwn(environment, "TYPESAFE_API_KEY")) {
@@ -3582,6 +3585,9 @@ async function createCliTypeSafeReranker(environment = process.env, homeDirector
3582
3585
  await handle?.close();
3583
3586
  }
3584
3587
  }
3588
+ async function createCliClefReranker(environment = process.env, _homeDirectory = homedir(), model = "clef") {
3589
+ return createClefReranker({ environment, model });
3590
+ }
3585
3591
 
3586
3592
  // src/cli-program.ts
3587
3593
  var defaultOutput2 = terminalOutput({
@@ -4360,6 +4366,7 @@ function parseSemanticCommand(command, arguments_) {
4360
4366
  let candidateLimit;
4361
4367
  let minScore;
4362
4368
  let rerank;
4369
+ let rerankModel;
4363
4370
  let rerankLimit;
4364
4371
  let selectedPassage = false;
4365
4372
  let graphDepth;
@@ -4423,7 +4430,7 @@ function parseSemanticCommand(command, arguments_) {
4423
4430
  cursor += 1;
4424
4431
  continue;
4425
4432
  }
4426
- if (command === "search" && (argument === "--mode" || argument === "--limit" || argument === "--candidate-limit" || argument === "--min-score" || argument === "--rerank" || argument === "--rerank-limit" || argument === "--where" || argument === "--has" || argument === "--tag" || argument === "--scope" || argument === "--repository-scope" || argument === "--related" || argument === "--graph-depth")) {
4433
+ if (command === "search" && (argument === "--mode" || argument === "--limit" || argument === "--candidate-limit" || argument === "--min-score" || argument === "--rerank" || argument === "--rerank-model" || argument === "--rerank-limit" || argument === "--where" || argument === "--has" || argument === "--tag" || argument === "--scope" || argument === "--repository-scope" || argument === "--related" || argument === "--graph-depth")) {
4427
4434
  const value = readValue(arguments_, cursor);
4428
4435
  if (value === null)
4429
4436
  return { ok: false, message: `${argument} requires a value` };
@@ -4433,10 +4440,15 @@ function parseSemanticCommand(command, arguments_) {
4433
4440
  }
4434
4441
  mode = value;
4435
4442
  } else if (argument === "--rerank") {
4436
- if (value !== "typesafe") {
4437
- return { ok: false, message: "--rerank must be typesafe" };
4443
+ if (value !== "clef" && value !== "typesafe") {
4444
+ return { ok: false, message: "--rerank must be clef or legacy typesafe" };
4438
4445
  }
4439
4446
  rerank = value;
4447
+ } else if (argument === "--rerank-model") {
4448
+ if (value !== "clef" && value !== "clef-flash") {
4449
+ return { ok: false, message: "--rerank-model must be clef or clef-flash" };
4450
+ }
4451
+ rerankModel = value;
4440
4452
  } else if (argument === "--rerank-limit") {
4441
4453
  const parsed = Number(value);
4442
4454
  if (!Number.isSafeInteger(parsed) || parsed < 2 || parsed > MAX_RERANK_CANDIDATES) {
@@ -4576,7 +4588,10 @@ function parseSemanticCommand(command, arguments_) {
4576
4588
  };
4577
4589
  }
4578
4590
  if (rerankLimit !== undefined && rerank === undefined) {
4579
- return { ok: false, message: "--rerank-limit requires --rerank typesafe" };
4591
+ return { ok: false, message: "--rerank-limit requires --rerank clef or legacy typesafe" };
4592
+ }
4593
+ if (rerankModel !== undefined && rerank !== "clef") {
4594
+ return { ok: false, message: "--rerank-model requires --rerank clef" };
4580
4595
  }
4581
4596
  if (priority && rulesPath === undefined) {
4582
4597
  return { ok: false, message: "--priority requires --rules" };
@@ -4616,6 +4631,7 @@ function parseSemanticCommand(command, arguments_) {
4616
4631
  ...candidateLimit === undefined ? {} : { candidateLimit },
4617
4632
  ...minScore === undefined ? {} : { minScore },
4618
4633
  ...rerank === undefined ? {} : { rerank },
4634
+ ...rerankModel === undefined ? {} : { rerankModel },
4619
4635
  ...rerankLimit === undefined ? {} : { rerankLimit },
4620
4636
  ...selectedPassage ? { selectedPassage: true } : {},
4621
4637
  query,
@@ -5477,7 +5493,7 @@ function renderKnowledgeBaseSearch(result) {
5477
5493
  ];
5478
5494
  const rerankLane = result.diagnostics.lanes.find(({ lane }) => lane === "rerank");
5479
5495
  if (rerankLane !== undefined) {
5480
- lines.push(` Rerank: typesafe over ${rerankLane.results} candidates (${rerankLane.status})` + (rerankLane.message === undefined ? "" : ` \u2014 ${safe(rerankLane.message)}`));
5496
+ lines.push(` Rerank: ${safe(rerankLane.engine ?? "hosted")} over ${rerankLane.results} candidates (${rerankLane.status})` + (rerankLane.message === undefined ? "" : ` \u2014 ${safe(rerankLane.message)}`));
5481
5497
  const receipt = rerankLane.rerank;
5482
5498
  if (receipt?.accounting !== undefined) {
5483
5499
  const { attempted, candidates, completed, elapsedMs, usageComplete } = receipt.accounting;
@@ -5546,7 +5562,7 @@ async function runSemantic(command, output, dependencies) {
5546
5562
  repository: command.repository,
5547
5563
  ...command.database === undefined ? {} : { database: command.database },
5548
5564
  ...searchRules === undefined ? {} : { searchRules }
5549
- }, ...command.rerank === undefined ? [] : [{ rerankers: dependencies.rerankers ?? [await createCliTypeSafeReranker()] }]);
5565
+ }, ...command.rerank === undefined ? [] : [{ rerankers: dependencies.rerankers ?? [command.rerank === "clef" ? await createCliClefReranker(process.env, undefined, command.rerankModel) : await createCliTypeSafeReranker()] }]);
5550
5566
  try {
5551
5567
  const result = await kb.search({
5552
5568
  query: command.query,
@@ -5,7 +5,7 @@ import {
5
5
  MAX_SEARCH_RESULTS,
6
6
  openKnowledgeBase,
7
7
  validateKnowledgeBaseSearchHistory
8
- } from "./index-9zkba8hr.js";
8
+ } from "./index-7bqwzjba.js";
9
9
  import {
10
10
  expandSearchRequest,
11
11
  parseSearchRules