@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.
- package/README.md +36 -21
- package/dist/capture.js +15 -7
- package/dist/cli-bin.js +2 -2
- package/dist/cli.js +21 -19
- package/dist/clip/acquire.js +4 -3
- package/dist/clip/bundle-reader.js +3 -2
- package/dist/clip/cli.js +8 -7
- package/dist/clip/defuddle-worker.js +4 -1
- package/dist/clip/doctor.js +5 -4
- package/dist/clip/jobs.js +2 -1
- package/dist/clip/persist.js +2 -1
- package/dist/clip/refresh.js +4 -3
- package/dist/evaluation-builder-bin.js +2 -2
- package/dist/evaluation-builder.js +3 -3
- package/dist/evaluation-kb.js +3 -3
- package/dist/{index-mp5y3ty3.js → index-30v9w4cy.js} +36 -20
- package/dist/{index-9paxge84.js → index-3hts6yy9.js} +1 -1
- package/dist/{index-h9vyd03z.js → index-58azscg5.js} +7 -6
- package/dist/{index-9zkba8hr.js → index-7bqwzjba.js} +7 -6
- package/dist/{index-j4zgmzjr.js → index-8djdwjjd.js} +1 -1
- package/dist/{index-5h5awwh4.js → index-b40e2dkx.js} +2 -2
- package/dist/index-e2wstc7t.js +323 -0
- package/dist/{index-hacpnaew.js → index-fd8j527z.js} +1 -1
- package/dist/{index-mxxxytys.js → index-g63d3937.js} +4 -0
- package/dist/{index-k86wepd8.js → index-h2w7syy2.js} +5 -1
- package/dist/{index-9fywek7g.js → index-ht14xne3.js} +1 -1
- package/dist/{index-82r6g4py.js → index-k9yzc4vn.js} +1 -1
- package/dist/{index-m9p2a4mj.js → index-my50xsa3.js} +221 -36
- package/dist/{index-ncwzmsge.js → index-nwdzhj1h.js} +2 -2
- package/dist/{index-9rf81m0p.js → index-pbz3qw1s.js} +35 -20
- package/dist/index-pn14a2m5.js +59 -0
- package/dist/{index-nd8v7r0z.js → index-sp43012q.js} +1 -1
- package/dist/{index-8pabwzqg.js → index-t4hjm1kk.js} +2 -1
- package/dist/{index-npg9z1a4.js → index-xn5q4kne.js} +5 -1
- package/dist/{index-j2jt49gr.js → index-yatn62qq.js} +1 -1
- package/dist/index.js +14 -4
- package/dist/pdf.js +438 -4
- package/dist/portfolio.js +3 -3
- package/dist/rerank-clef.js +16 -0
- package/dist/rerank-typesafe.js +3 -1
- package/dist/sdk.js +2 -2
- package/dist/{support-9qdr4hb8.js → support-s059eytv.js} +20 -18
- package/dist/url-intelligence.js +4 -3
- package/dist/workflows/decision-context.js +3 -3
- package/dist/workflows/index.js +3 -3
- package/package.json +23 -9
- package/skills/wordcell/SKILL.md +1 -1
- package/skills/wordcell/references/query.md +11 -6
- package/src/capture.ts +5 -0
- package/src/cli-help.ts +2 -1
- package/src/cli-program.ts +23 -8
- package/src/clip/browser-profiles.ts +1 -1
- package/src/clip/bundle-reader.ts +3 -0
- package/src/clip/capture.ts +1 -0
- package/src/clip/extract.ts +2 -0
- package/src/clip/lib.ts +3 -0
- package/src/clip/metadata-search-tool/Cargo.lock +6 -6
- package/src/clip/metadata-search.ts +1 -1
- package/src/clip/metadata.ts +232 -0
- package/src/clip/persist.ts +3 -0
- package/src/index.ts +2 -1
- package/src/pdf/bundle-reader.ts +457 -0
- package/src/pdf/capture.ts +6 -2
- package/src/pdf/cli.ts +2 -1
- package/src/pdf/errors.ts +11 -0
- package/src/pdf/extract.ts +16 -13
- package/src/pdf/layout.ts +136 -3
- package/src/pdf/markdown.ts +7 -1
- package/src/pdf/model.ts +9 -0
- package/src/pdf/persist.ts +8 -2
- package/src/pdf/source.ts +5 -4
- package/src/pdf/tools.ts +8 -6
- package/src/pdf.ts +10 -0
- package/src/rerank-clef.ts +52 -0
- package/src/rerank-credentials.ts +11 -2
- package/src/rerank-typesafe.ts +44 -20
- package/src/rerank.ts +1 -1
- package/src/sdk.ts +4 -2
- /package/dist/{index-cd75vky9.js → index-jbtyp6q5.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CLEF_MODELS,
|
|
4
|
+
DEFAULT_CLEF_MODEL,
|
|
5
|
+
clefEndpoint,
|
|
6
|
+
createClefReranker
|
|
7
|
+
} from "./index-pn14a2m5.js";
|
|
8
|
+
import"./index-pbz3qw1s.js";
|
|
9
|
+
import"./index-j70m75wd.js";
|
|
10
|
+
import"./index-z1w83f81.js";
|
|
11
|
+
export {
|
|
12
|
+
createClefReranker,
|
|
13
|
+
clefEndpoint,
|
|
14
|
+
DEFAULT_CLEF_MODEL,
|
|
15
|
+
CLEF_MODELS
|
|
16
|
+
};
|
package/dist/rerank-typesafe.js
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
DEFAULT_SYSTEMONE_ENDPOINT,
|
|
4
4
|
DEFAULT_SYSTEMONE_MODEL,
|
|
5
|
+
createHostedReranker,
|
|
5
6
|
createTypeSafeReranker
|
|
6
|
-
} from "./index-
|
|
7
|
+
} from "./index-pbz3qw1s.js";
|
|
7
8
|
import"./index-j70m75wd.js";
|
|
8
9
|
import"./index-z1w83f81.js";
|
|
9
10
|
export {
|
|
10
11
|
createTypeSafeReranker,
|
|
12
|
+
createHostedReranker,
|
|
11
13
|
DEFAULT_SYSTEMONE_MODEL,
|
|
12
14
|
DEFAULT_SYSTEMONE_ENDPOINT
|
|
13
15
|
};
|
package/dist/sdk.js
CHANGED
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
packUntrustedSearchContext,
|
|
12
12
|
searchEvidenceRank,
|
|
13
13
|
validateKnowledgeBaseSearchHistory
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-7bqwzjba.js";
|
|
15
|
+
import"./index-4j3tt0c3.js";
|
|
15
16
|
import"./index-adx6khj5.js";
|
|
16
17
|
import"./index-fp732bgg.js";
|
|
17
|
-
import"./index-4j3tt0c3.js";
|
|
18
18
|
import"./index-wqx1x32f.js";
|
|
19
19
|
import"./index-3gc2yk4k.js";
|
|
20
20
|
import"./index-pgtm2nhf.js";
|
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
import {
|
|
3
3
|
parseArguments as parseArguments2,
|
|
4
4
|
parseUrlMetadataArguments
|
|
5
|
-
} from "./index-
|
|
6
|
-
import"./index-
|
|
5
|
+
} from "./index-30v9w4cy.js";
|
|
6
|
+
import"./index-b40e2dkx.js";
|
|
7
7
|
import {
|
|
8
8
|
parsePdfArguments
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
9
|
+
} from "./index-my50xsa3.js";
|
|
10
|
+
import"./index-3hts6yy9.js";
|
|
11
|
+
import"./index-8djdwjjd.js";
|
|
12
|
+
import"./index-xn5q4kne.js";
|
|
13
|
+
import"./index-58azscg5.js";
|
|
14
|
+
import"./index-fd8j527z.js";
|
|
15
|
+
import"./index-h2w7syy2.js";
|
|
16
|
+
import"./index-sp43012q.js";
|
|
17
17
|
import"./index-hnvx7m1j.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
18
|
+
import"./index-t4hjm1kk.js";
|
|
19
|
+
import"./index-nwdzhj1h.js";
|
|
20
|
+
import"./index-jbtyp6q5.js";
|
|
21
21
|
import"./index-2gv8y733.js";
|
|
22
|
-
import"./index-
|
|
22
|
+
import"./index-g63d3937.js";
|
|
23
|
+
import"./index-e2wstc7t.js";
|
|
23
24
|
import"./index-w2zc0vwa.js";
|
|
24
25
|
import"./index-e5fbsywq.js";
|
|
25
26
|
import"./index-gh719d91.js";
|
|
@@ -27,13 +28,14 @@ import {
|
|
|
27
28
|
parseArguments
|
|
28
29
|
} from "./index-byz4kzww.js";
|
|
29
30
|
import"./index-23z4zxgg.js";
|
|
30
|
-
import"./index-
|
|
31
|
+
import"./index-pn14a2m5.js";
|
|
32
|
+
import"./index-pbz3qw1s.js";
|
|
31
33
|
import"./index-pj501bh1.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
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";
|
package/dist/url-intelligence.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
readUrlMetadataDocument,
|
|
11
11
|
renderUrlMetadataDocument,
|
|
12
12
|
writeUrlMetadataDocument
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-b40e2dkx.js";
|
|
14
14
|
import {
|
|
15
15
|
ARCHIVE_TODAY_HOSTS,
|
|
16
16
|
ArchiveTodayFailure,
|
|
@@ -23,8 +23,9 @@ import {
|
|
|
23
23
|
parseMetadataSearchResponse,
|
|
24
24
|
rankMetadataSearchResults,
|
|
25
25
|
selectNewestArchiveTodayMemento
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-fd8j527z.js";
|
|
27
|
+
import"./index-g63d3937.js";
|
|
28
|
+
import"./index-e2wstc7t.js";
|
|
28
29
|
import"./index-e5fbsywq.js";
|
|
29
30
|
import"./index-gh719d91.js";
|
|
30
31
|
import"./index-1xxnjn0d.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
decisionContextWorkflow
|
|
4
|
-
} from "../index-
|
|
4
|
+
} from "../index-ht14xne3.js";
|
|
5
5
|
import"../index-h170byqw.js";
|
|
6
|
-
import"../index-
|
|
6
|
+
import"../index-7bqwzjba.js";
|
|
7
|
+
import"../index-4j3tt0c3.js";
|
|
7
8
|
import"../index-adx6khj5.js";
|
|
8
9
|
import"../index-fp732bgg.js";
|
|
9
|
-
import"../index-4j3tt0c3.js";
|
|
10
10
|
import"../index-wqx1x32f.js";
|
|
11
11
|
import"../index-3gc2yk4k.js";
|
|
12
12
|
import"../index-pgtm2nhf.js";
|
package/dist/workflows/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
decisionContextWorkflow
|
|
4
|
-
} from "../index-
|
|
4
|
+
} from "../index-ht14xne3.js";
|
|
5
5
|
import {
|
|
6
6
|
explainChangeWorkflow
|
|
7
7
|
} from "../index-e4fagfjz.js";
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
planRadarWorkflow
|
|
10
10
|
} from "../index-rdd5f7jj.js";
|
|
11
11
|
import"../index-h170byqw.js";
|
|
12
|
-
import"../index-
|
|
12
|
+
import"../index-7bqwzjba.js";
|
|
13
|
+
import"../index-4j3tt0c3.js";
|
|
13
14
|
import"../index-adx6khj5.js";
|
|
14
15
|
import"../index-fp732bgg.js";
|
|
15
|
-
import"../index-4j3tt0c3.js";
|
|
16
16
|
import"../index-wqx1x32f.js";
|
|
17
17
|
import"../index-3gc2yk4k.js";
|
|
18
18
|
import"../index-pgtm2nhf.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hraness/wordcell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Wordcell keeps decisions, plans, and sources as Markdown beside your code, so coding agents can find them from the file they are about to change.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"./src/query.ts",
|
|
56
56
|
"./src/rerank.ts",
|
|
57
57
|
"./src/rerank-typesafe.ts",
|
|
58
|
+
"./src/rerank-clef.ts",
|
|
58
59
|
"./src/repository-memory.ts",
|
|
59
60
|
"./src/sdk.ts",
|
|
60
61
|
"./src/search.ts",
|
|
@@ -249,6 +250,10 @@
|
|
|
249
250
|
"types": "./src/rerank-typesafe.ts",
|
|
250
251
|
"import": "./dist/rerank-typesafe.js"
|
|
251
252
|
},
|
|
253
|
+
"./rerank-clef": {
|
|
254
|
+
"types": "./src/rerank-clef.ts",
|
|
255
|
+
"import": "./dist/rerank-clef.js"
|
|
256
|
+
},
|
|
252
257
|
"./repository-memory": {
|
|
253
258
|
"types": "./src/repository-memory.ts",
|
|
254
259
|
"import": "./dist/repository-memory.js"
|
|
@@ -432,6 +437,7 @@
|
|
|
432
437
|
"src/query.ts",
|
|
433
438
|
"src/rerank.ts",
|
|
434
439
|
"src/rerank-typesafe.ts",
|
|
440
|
+
"src/rerank-clef.ts",
|
|
435
441
|
"src/rerank-credentials.ts",
|
|
436
442
|
"src/repository-memory.ts",
|
|
437
443
|
"src/search.ts",
|
|
@@ -478,14 +484,17 @@
|
|
|
478
484
|
"src/cli-update.ts",
|
|
479
485
|
"src/cli-release.ts",
|
|
480
486
|
"src/evaluation-builder-bin.ts",
|
|
481
|
-
"src/evaluation-builder-cli-args.ts"
|
|
487
|
+
"src/evaluation-builder-cli-args.ts",
|
|
488
|
+
"src/clip/metadata.ts",
|
|
489
|
+
"src/pdf/bundle-reader.ts",
|
|
490
|
+
"src/pdf/errors.ts"
|
|
482
491
|
],
|
|
483
492
|
"scripts": {
|
|
484
493
|
"kb:refresh": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.1/hraness-wordcell-0.24.1.tgz wordcell refresh --root kb",
|
|
485
494
|
"kb:check:lane": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.1/hraness-wordcell-0.24.1.tgz wordcell check --root kb --no-catalog",
|
|
486
495
|
"kb:check": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.1/hraness-wordcell-0.24.1.tgz wordcell check --root kb && bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.1/hraness-wordcell-0.24.1.tgz wordcell agents check --root kb --repo .",
|
|
487
496
|
"kb:catalog": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.1/hraness-wordcell-0.24.1.tgz wordcell catalog --root kb",
|
|
488
|
-
"build": "bun -e 'await (await import(\"node:fs/promises\")).rm(\"./dist\", { recursive: true, force: true })' && bun build ./src/index.ts ./src/publish.ts ./src/publish-model.ts ./src/publish-search.ts ./src/agent-context.ts ./src/agent-guide-audit.ts ./src/attachments.ts ./src/authoring.ts ./src/benchmark.ts ./src/clip/browser-profiles.ts ./src/capture.ts ./src/cli.ts ./src/cli-bin.ts ./src/evaluation-builder-bin.ts ./src/clip/acquire.ts ./src/clip/args.ts ./src/clip/bounded-byte-buffer.ts ./src/clip/bundle-reader.ts ./src/clip/cli.ts ./src/clip/cookies.ts ./src/clip/doctor.ts ./src/clip/jobs.ts ./src/clip/network.ts ./src/clip/network-proxy.ts ./src/clip/persist.ts ./src/clip/refresh.ts ./src/clip/terminal.ts ./src/evaluation.ts ./src/evaluation-builder.ts ./src/evaluation-kb.ts ./src/git.ts ./src/graph.ts ./src/graph-percolation.ts ./src/graph-authority.ts ./src/navigation.ts ./src/pdf.ts ./src/percolate.ts ./src/portfolio.ts ./src/query.ts ./src/rerank.ts ./src/rerank-typesafe.ts ./src/repository-memory.ts ./src/sdk.ts ./src/search.ts ./src/search-rules.ts ./src/semantic.ts ./src/source-inbox.ts ./src/untrusted-content.ts ./src/url-intelligence.ts ./src/workflow.ts ./src/workflows/index.ts ./src/workflows/decision-context.ts ./src/workflows/explain-change.ts ./src/workflows/plan-radar.ts ./src/clip/defuddle-worker.ts --outdir ./dist --root ./src --target bun --format esm --splitting --packages external && bun build ./src/publish-reader/reader.ts --outfile ./dist/publish-reader/reader.js --target browser --format esm && bun build ./src/publish-reader/theme.ts --outfile ./dist/publish-reader/theme.js --target browser --format iife && cp ./src/publish-reader/reader.css ./dist/publish-reader/reader.css",
|
|
497
|
+
"build": "bun -e 'await (await import(\"node:fs/promises\")).rm(\"./dist\", { recursive: true, force: true })' && bun build ./src/index.ts ./src/publish.ts ./src/publish-model.ts ./src/publish-search.ts ./src/agent-context.ts ./src/agent-guide-audit.ts ./src/attachments.ts ./src/authoring.ts ./src/benchmark.ts ./src/clip/browser-profiles.ts ./src/capture.ts ./src/cli.ts ./src/cli-bin.ts ./src/evaluation-builder-bin.ts ./src/clip/acquire.ts ./src/clip/args.ts ./src/clip/bounded-byte-buffer.ts ./src/clip/bundle-reader.ts ./src/clip/cli.ts ./src/clip/cookies.ts ./src/clip/doctor.ts ./src/clip/jobs.ts ./src/clip/network.ts ./src/clip/network-proxy.ts ./src/clip/persist.ts ./src/clip/refresh.ts ./src/clip/terminal.ts ./src/evaluation.ts ./src/evaluation-builder.ts ./src/evaluation-kb.ts ./src/git.ts ./src/graph.ts ./src/graph-percolation.ts ./src/graph-authority.ts ./src/navigation.ts ./src/pdf.ts ./src/percolate.ts ./src/portfolio.ts ./src/query.ts ./src/rerank.ts ./src/rerank-typesafe.ts ./src/rerank-clef.ts ./src/repository-memory.ts ./src/sdk.ts ./src/search.ts ./src/search-rules.ts ./src/semantic.ts ./src/source-inbox.ts ./src/untrusted-content.ts ./src/url-intelligence.ts ./src/workflow.ts ./src/workflows/index.ts ./src/workflows/decision-context.ts ./src/workflows/explain-change.ts ./src/workflows/plan-radar.ts ./src/clip/defuddle-worker.ts --outdir ./dist --root ./src --target bun --format esm --splitting --packages external && bun build ./src/publish-reader/reader.ts --outfile ./dist/publish-reader/reader.js --target browser --format esm && bun build ./src/publish-reader/theme.ts --outfile ./dist/publish-reader/theme.js --target browser --format iife && cp ./src/publish-reader/reader.css ./dist/publish-reader/reader.css",
|
|
489
498
|
"check:workflows": "bun ./scripts/check-workflow-yaml.ts",
|
|
490
499
|
"check:installed-command-docs": "bun ./scripts/check-installed-command-docs.ts",
|
|
491
500
|
"check:portfolio-inventory": "bun ./scripts/check-portfolio-inventory.ts",
|
|
@@ -499,21 +508,23 @@
|
|
|
499
508
|
"check": "bun run check:worker && bun run check:effect && bun run check:workflows && bun run check:portfolio-inventory && bun run check:installed-command-docs && bun run typecheck && bun run build && bun run test:package && bun run test && bun run url-metadata:tool:check",
|
|
500
509
|
"prepack": "bun run check",
|
|
501
510
|
"check:effect": "bun run scripts/check-effect-policy.ts",
|
|
502
|
-
"kb:search": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.1/hraness-wordcell-0.24.1.tgz wordcell search --root kb --mode exact --selected-passage
|
|
511
|
+
"kb:search": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.1/hraness-wordcell-0.24.1.tgz wordcell search --root kb --mode exact --selected-passage",
|
|
512
|
+
"kb:search:clef": "bun ./dist/cli.js search --root kb --mode exact --selected-passage --rerank clef --rerank-limit 25",
|
|
503
513
|
"kb:search:local": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.1/hraness-wordcell-0.24.1.tgz wordcell search --root kb --mode exact --selected-passage",
|
|
504
514
|
"check:worker": "tsc -p worker/tsconfig.json --noEmit"
|
|
505
515
|
},
|
|
506
516
|
"dependencies": {
|
|
517
|
+
"@hraness/cli-update": "https://github.com/hraness/cli-update/releases/download/v0.1.0/hraness-cli-update-0.1.0.tgz",
|
|
507
518
|
"@hraness/oh": "https://github.com/hraness/oh/releases/download/v0.12.0/hraness-oh-0.12.0.tgz",
|
|
519
|
+
"@hraness/support-foundation": "git+https://github.com/hraness/support-foundation.git#b32c1c81bb2444f50509ed54388758ecfab1f1c0",
|
|
508
520
|
"@steipete/sweet-cookie": "0.4.3",
|
|
509
|
-
"@tobilu/qmd": "
|
|
521
|
+
"@tobilu/qmd": "https://github.com/hraness/qmd/releases/download/v2.8.3-hraness.1/hraness-qmd-2.8.3-hraness.1.tgz",
|
|
510
522
|
"agent-browser": "0.32.3",
|
|
511
523
|
"defuddle": "0.19.1",
|
|
512
|
-
"yaml": "^2.9.0",
|
|
513
|
-
"zod": "^4.4.3",
|
|
514
524
|
"effect": "3.22.1",
|
|
515
|
-
"
|
|
516
|
-
"
|
|
525
|
+
"entities": "7.0.1",
|
|
526
|
+
"yaml": "^2.9.0",
|
|
527
|
+
"zod": "^4.4.3"
|
|
517
528
|
},
|
|
518
529
|
"devDependencies": {
|
|
519
530
|
"@hraness/build-governance": "github:hraness/build-governance#v0.1.0",
|
|
@@ -524,5 +535,8 @@
|
|
|
524
535
|
"publishConfig": {
|
|
525
536
|
"access": "public",
|
|
526
537
|
"registry": "https://registry.npmjs.org"
|
|
538
|
+
},
|
|
539
|
+
"overrides": {
|
|
540
|
+
"simple-git": "^4.0.2"
|
|
527
541
|
}
|
|
528
542
|
}
|
package/skills/wordcell/SKILL.md
CHANGED
|
@@ -58,7 +58,7 @@ missing:
|
|
|
58
58
|
```sh
|
|
59
59
|
command -v wordcell >/dev/null 2>&1 || {
|
|
60
60
|
command -v bun >/dev/null 2>&1 || exit 1
|
|
61
|
-
bun add --global --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.
|
|
61
|
+
bun add --global --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.27.0/hraness-wordcell-0.27.0.tgz
|
|
62
62
|
}
|
|
63
63
|
wordcell --help
|
|
64
64
|
```
|
|
@@ -189,17 +189,22 @@ form. Graph neighbors and Git history remain separate from primary
|
|
|
189
189
|
text rank. They explain and expand candidates without becoming authored facts,
|
|
190
190
|
links, or recency boosts.
|
|
191
191
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
Clef support is in the current source tree. The skill's pinned release does not
|
|
193
|
+
include it; do not pass Clef flags to that installed CLI. In an explicitly
|
|
194
|
+
selected source checkout, use `bun ./src/cli.ts` instead of `wordcell` for Clef
|
|
195
|
+
commands. Source selection does not authorize hosted processing.
|
|
196
|
+
|
|
197
|
+
Reranking is opt-in through `--rerank clef`. It uses Cloudflare's `clef` model
|
|
198
|
+
(or `--rerank-model clef-flash`) and sends the query plus each candidate's
|
|
199
|
+
identifier, title, vault-relative path, and at most 512 UTF-8 bytes of snippet
|
|
200
|
+
text to Cloudflare. Enable it only for vaults
|
|
195
201
|
approved for external processing and provider input-token charges. Use
|
|
196
202
|
`--rerank-limit 25` to bound the window (2–25 candidates); four requests run
|
|
197
203
|
concurrently under one eight-second deadline with no retries. Exact identities
|
|
198
204
|
remain first. Results retain their original scores and retrieval evidence.
|
|
199
205
|
|
|
200
|
-
The CLI
|
|
201
|
-
|
|
202
|
-
`XDG_CONFIG_HOME`). Keep credentials outside the repository. A missing key or
|
|
206
|
+
The CLI requires `CLOUDFLARE_ACCOUNT_ID` and reads `CLOUDFLARE_API_TOKEN`
|
|
207
|
+
(`CLOUDFLARE_AUTH_TOKEN` is an alias) from the environment only. Keep credentials outside the repository. A missing token or
|
|
203
208
|
provider failure retains baseline ordering and marks the rerank lane
|
|
204
209
|
unavailable or degraded. Inspect its structured `rerank` receipt for attempted
|
|
205
210
|
requests, known usage, elapsed time, and whether usage is complete; an unknown
|
package/src/capture.ts
CHANGED
|
@@ -66,3 +66,8 @@ export type {
|
|
|
66
66
|
MediaMode,
|
|
67
67
|
ParseArgumentsResult,
|
|
68
68
|
};
|
|
69
|
+
|
|
70
|
+
import { extractArticleMetadata as extractArticleMetadataImplementation, parseArticleMetadata as parseArticleMetadataImplementation } from "./clip/metadata.js";
|
|
71
|
+
export const extractArticleMetadata: typeof extractArticleMetadataImplementation = (...arguments_) => extractArticleMetadataImplementation(...arguments_);
|
|
72
|
+
export const parseArticleMetadata: typeof parseArticleMetadataImplementation = (...arguments_) => parseArticleMetadataImplementation(...arguments_);
|
|
73
|
+
export type { ArticleMetadata, ArticleMetadataClaim, MetadataSource, MetadataValue } from "./clip/metadata.js";
|
package/src/cli-help.ts
CHANGED
|
@@ -112,7 +112,8 @@ export const commandHelp: readonly CommandHelp[] = [
|
|
|
112
112
|
PRIORITY,
|
|
113
113
|
["--candidate-limit <count>", "How many candidates to rank before trimming"],
|
|
114
114
|
["--min-score <score>", "Drop results scoring below this (0 to 1)"],
|
|
115
|
-
["--rerank <typesafe>", "
|
|
115
|
+
["--rerank <clef|typesafe>", "Send query and snippets to Clef (typesafe is deprecated)"],
|
|
116
|
+
["--rerank-model <clef|clef-flash>", "Clef model to use (default: clef)"],
|
|
116
117
|
["--rerank-limit <2..25>", "How many results the reranker sees"],
|
|
117
118
|
["--selected-passage", "Add a local source excerpt to each result"],
|
|
118
119
|
JSON_OPTION,
|
package/src/cli-program.ts
CHANGED
|
@@ -176,7 +176,8 @@ import {
|
|
|
176
176
|
type KnowledgeBaseSearchResult,
|
|
177
177
|
} from "./sdk.js";
|
|
178
178
|
import { MAX_RERANK_CANDIDATES, type SearchReranker } from "./rerank.js";
|
|
179
|
-
import { createCliTypeSafeReranker } from "./rerank-credentials.js";
|
|
179
|
+
import { createCliClefReranker, createCliTypeSafeReranker } from "./rerank-credentials.js";
|
|
180
|
+
import type { ClefModel } from "./rerank-clef.js";
|
|
180
181
|
import {
|
|
181
182
|
refreshVault,
|
|
182
183
|
refreshVaultComplete,
|
|
@@ -382,7 +383,8 @@ type ParsedCommand =
|
|
|
382
383
|
readonly limit?: number;
|
|
383
384
|
readonly candidateLimit?: number;
|
|
384
385
|
readonly minScore?: number;
|
|
385
|
-
readonly rerank?: "typesafe";
|
|
386
|
+
readonly rerank?: "clef" | "typesafe";
|
|
387
|
+
readonly rerankModel?: ClefModel;
|
|
386
388
|
readonly rerankLimit?: number;
|
|
387
389
|
readonly selectedPassage?: boolean;
|
|
388
390
|
readonly query: string;
|
|
@@ -1272,7 +1274,8 @@ function parseSemanticCommand(command: "index" | "search", arguments_: readonly
|
|
|
1272
1274
|
let limit: number | undefined;
|
|
1273
1275
|
let candidateLimit: number | undefined;
|
|
1274
1276
|
let minScore: number | undefined;
|
|
1275
|
-
let rerank: "typesafe" | undefined;
|
|
1277
|
+
let rerank: "clef" | "typesafe" | undefined;
|
|
1278
|
+
let rerankModel: ClefModel | undefined;
|
|
1276
1279
|
let rerankLimit: number | undefined;
|
|
1277
1280
|
let selectedPassage = false;
|
|
1278
1281
|
let graphDepth: number | undefined;
|
|
@@ -1341,6 +1344,7 @@ function parseSemanticCommand(command: "index" | "search", arguments_: readonly
|
|
|
1341
1344
|
|| argument === "--candidate-limit"
|
|
1342
1345
|
|| argument === "--min-score"
|
|
1343
1346
|
|| argument === "--rerank"
|
|
1347
|
+
|| argument === "--rerank-model"
|
|
1344
1348
|
|| argument === "--rerank-limit"
|
|
1345
1349
|
|| argument === "--where"
|
|
1346
1350
|
|| argument === "--has"
|
|
@@ -1358,10 +1362,15 @@ function parseSemanticCommand(command: "index" | "search", arguments_: readonly
|
|
|
1358
1362
|
}
|
|
1359
1363
|
mode = value;
|
|
1360
1364
|
} else if (argument === "--rerank") {
|
|
1361
|
-
if (value !== "typesafe") {
|
|
1362
|
-
return { ok: false, message: "--rerank must be typesafe" };
|
|
1365
|
+
if (value !== "clef" && value !== "typesafe") {
|
|
1366
|
+
return { ok: false, message: "--rerank must be clef or legacy typesafe" };
|
|
1363
1367
|
}
|
|
1364
1368
|
rerank = value;
|
|
1369
|
+
} else if (argument === "--rerank-model") {
|
|
1370
|
+
if (value !== "clef" && value !== "clef-flash") {
|
|
1371
|
+
return { ok: false, message: "--rerank-model must be clef or clef-flash" };
|
|
1372
|
+
}
|
|
1373
|
+
rerankModel = value;
|
|
1365
1374
|
} else if (argument === "--rerank-limit") {
|
|
1366
1375
|
const parsed = Number(value);
|
|
1367
1376
|
if (!Number.isSafeInteger(parsed) || parsed < 2 || parsed > MAX_RERANK_CANDIDATES) {
|
|
@@ -1498,7 +1507,10 @@ function parseSemanticCommand(command: "index" | "search", arguments_: readonly
|
|
|
1498
1507
|
};
|
|
1499
1508
|
}
|
|
1500
1509
|
if (rerankLimit !== undefined && rerank === undefined) {
|
|
1501
|
-
return { ok: false, message: "--rerank-limit requires --rerank typesafe" };
|
|
1510
|
+
return { ok: false, message: "--rerank-limit requires --rerank clef or legacy typesafe" };
|
|
1511
|
+
}
|
|
1512
|
+
if (rerankModel !== undefined && rerank !== "clef") {
|
|
1513
|
+
return { ok: false, message: "--rerank-model requires --rerank clef" };
|
|
1502
1514
|
}
|
|
1503
1515
|
if (priority && rulesPath === undefined) {
|
|
1504
1516
|
return { ok: false, message: "--priority requires --rules" };
|
|
@@ -1539,6 +1551,7 @@ function parseSemanticCommand(command: "index" | "search", arguments_: readonly
|
|
|
1539
1551
|
...(candidateLimit === undefined ? {} : { candidateLimit }),
|
|
1540
1552
|
...(minScore === undefined ? {} : { minScore }),
|
|
1541
1553
|
...(rerank === undefined ? {} : { rerank }),
|
|
1554
|
+
...(rerankModel === undefined ? {} : { rerankModel }),
|
|
1542
1555
|
...(rerankLimit === undefined ? {} : { rerankLimit }),
|
|
1543
1556
|
...(selectedPassage ? { selectedPassage: true } : {}),
|
|
1544
1557
|
query,
|
|
@@ -2394,7 +2407,7 @@ function renderKnowledgeBaseSearch(result: KnowledgeBaseSearchResult): string {
|
|
|
2394
2407
|
const rerankLane = result.diagnostics.lanes.find(({ lane }) => lane === "rerank");
|
|
2395
2408
|
if (rerankLane !== undefined) {
|
|
2396
2409
|
lines.push(
|
|
2397
|
-
` Rerank:
|
|
2410
|
+
` Rerank: ${safe(rerankLane.engine ?? "hosted")} over ${rerankLane.results} candidates (${rerankLane.status})`
|
|
2398
2411
|
+ (rerankLane.message === undefined ? "" : ` — ${safe(rerankLane.message)}`),
|
|
2399
2412
|
);
|
|
2400
2413
|
const receipt = rerankLane.rerank;
|
|
@@ -2488,7 +2501,9 @@ async function runSemantic(
|
|
|
2488
2501
|
},
|
|
2489
2502
|
...(command.rerank === undefined
|
|
2490
2503
|
? []
|
|
2491
|
-
: [{ rerankers: dependencies.rerankers ?? [
|
|
2504
|
+
: [{ rerankers: dependencies.rerankers ?? [command.rerank === "clef"
|
|
2505
|
+
? await createCliClefReranker(process.env, undefined, command.rerankModel)
|
|
2506
|
+
: await createCliTypeSafeReranker()] }]),
|
|
2492
2507
|
);
|
|
2493
2508
|
try {
|
|
2494
2509
|
const result = await kb.search({
|
|
@@ -257,7 +257,7 @@ socket.setTimeout(500, () => { socket.destroy(); process.exit(1); });
|
|
|
257
257
|
socket.once("connect", () => { socket.destroy(); process.exit(1); });
|
|
258
258
|
socket.once("error", error => process.exit(error.code === "ENOENT" || error.code === "ECONNREFUSED" ? 0 : 1));`;
|
|
259
259
|
const result = spawnSync(process.execPath, ["--no-env-file", "--no-install", "--no-macros", "--no-addons", "--eval", script], {
|
|
260
|
-
input: path, cwd: tmpdir(), env: {}, timeout: 2000, maxBuffer: 1024, stdio: ["pipe", "pipe", "pipe"],
|
|
260
|
+
input: path, cwd: tmpdir(), env: {} as NodeJS.ProcessEnv, timeout: 2000, maxBuffer: 1024, stdio: ["pipe", "pipe", "pipe"],
|
|
261
261
|
});
|
|
262
262
|
if (result.error || result.status !== 0) throw new BrowserProfileSnapshotError(activeProfileMessage);
|
|
263
263
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseArticleMetadata, type ArticleMetadata } from "./metadata.js";
|
|
1
2
|
import { createHash } from "node:crypto";
|
|
2
3
|
import { constants as fsConstants, type BigIntStats } from "node:fs";
|
|
3
4
|
import { lstat, open, opendir, realpath, type FileHandle } from "node:fs/promises";
|
|
@@ -27,6 +28,7 @@ const SHA256_PATTERN = /^[0-9a-f]{64}$/u;
|
|
|
27
28
|
export type CaptureBundleIntegrity = "mismatch" | "unavailable" | "verified";
|
|
28
29
|
|
|
29
30
|
export type CaptureBundleInspection = {
|
|
31
|
+
readonly metadata?: ArticleMetadata;
|
|
30
32
|
readonly root: string;
|
|
31
33
|
readonly schemaVersion: 1 | 2 | 3 | 4;
|
|
32
34
|
readonly sourceUrl: string;
|
|
@@ -556,6 +558,7 @@ export async function readCaptureBundle(
|
|
|
556
558
|
|
|
557
559
|
await assertBundleRoot(root);
|
|
558
560
|
return Object.freeze({
|
|
561
|
+
...(manifest.metadata === undefined ? {} : { metadata: parseArticleMetadata(manifest.metadata) }),
|
|
559
562
|
root: root.path,
|
|
560
563
|
schemaVersion,
|
|
561
564
|
sourceUrl: manifest.sourceUrl,
|
package/src/clip/capture.ts
CHANGED
|
@@ -965,6 +965,7 @@ export async function runCapture(
|
|
|
965
965
|
const finalWarnings = finalizedWarnings(combinedWarnings, redactedMarkdown.count);
|
|
966
966
|
const includeSource = options.evidence === "source" || options.evidence === "all";
|
|
967
967
|
const manifestInput: CaptureManifestInput = {
|
|
968
|
+
...(article.metadata === undefined ? {} : { metadata: article.metadata }),
|
|
968
969
|
sourceUrl,
|
|
969
970
|
canonicalUrl: best.canonicalUrl.href,
|
|
970
971
|
capturedAt,
|
package/src/clip/extract.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { parseArticleMetadata } from "./metadata.js";
|
|
1
2
|
import type { CaptureScope } from "./args.js";
|
|
2
3
|
import type { AcquiredPage } from "./acquire.js";
|
|
3
4
|
import {
|
|
@@ -719,6 +720,7 @@ export async function extractPage(
|
|
|
719
720
|
content: retainDefuddleMedia(restoredContent, response, acquisition.finalUrl),
|
|
720
721
|
title: boundedMetadata(response.title, articleMetadataLimits.title)
|
|
721
722
|
?? boundedMetadata(acquisition.browserTitle, articleMetadataLimits.title),
|
|
723
|
+
...(response.metadata === undefined ? {} : { metadata: parseArticleMetadata(response.metadata) }),
|
|
722
724
|
author: boundedMetadata(response.author, articleMetadataLimits.author),
|
|
723
725
|
published: boundedMetadata(response.published, articleMetadataLimits.published),
|
|
724
726
|
description,
|
package/src/clip/lib.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { parseArticleMetadata, type ArticleMetadata } from "./metadata.js";
|
|
1
2
|
import { sanitizeTerminalText } from "./terminal.js";
|
|
2
3
|
|
|
3
4
|
/** Defuddle fields consumed after narrowing its JSON output. */
|
|
4
5
|
export type Article = {
|
|
6
|
+
metadata?: ArticleMetadata;
|
|
5
7
|
content: string;
|
|
6
8
|
title: string | null;
|
|
7
9
|
author: string | null;
|
|
@@ -46,6 +48,7 @@ export function parseArticle(parsed: unknown): Article | null {
|
|
|
46
48
|
if (content === null) return null;
|
|
47
49
|
return {
|
|
48
50
|
content,
|
|
51
|
+
...(parsed.metadata === undefined ? {} : { metadata: parseArticleMetadata(parsed.metadata) }),
|
|
49
52
|
title: nonEmptyString(parsed.title, articleMetadataLimits.title),
|
|
50
53
|
author: nonEmptyString(parsed.author, articleMetadataLimits.author),
|
|
51
54
|
published: nonEmptyString(parsed.published, articleMetadataLimits.published),
|
|
@@ -594,9 +594,9 @@ dependencies = [
|
|
|
594
594
|
|
|
595
595
|
[[package]]
|
|
596
596
|
name = "h2"
|
|
597
|
-
version = "0.4.
|
|
597
|
+
version = "0.4.16"
|
|
598
598
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
599
|
-
checksum = "
|
|
599
|
+
checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27"
|
|
600
600
|
dependencies = [
|
|
601
601
|
"atomic-waker",
|
|
602
602
|
"bytes",
|
|
@@ -1469,9 +1469,9 @@ dependencies = [
|
|
|
1469
1469
|
|
|
1470
1470
|
[[package]]
|
|
1471
1471
|
name = "rustls"
|
|
1472
|
-
version = "0.23.
|
|
1472
|
+
version = "0.23.45"
|
|
1473
1473
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1474
|
-
checksum = "
|
|
1474
|
+
checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634"
|
|
1475
1475
|
dependencies = [
|
|
1476
1476
|
"once_cell",
|
|
1477
1477
|
"rustls-pki-types",
|
|
@@ -1491,9 +1491,9 @@ dependencies = [
|
|
|
1491
1491
|
|
|
1492
1492
|
[[package]]
|
|
1493
1493
|
name = "rustls-webpki"
|
|
1494
|
-
version = "0.103.
|
|
1494
|
+
version = "0.103.15"
|
|
1495
1495
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1496
|
-
checksum = "
|
|
1496
|
+
checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"
|
|
1497
1497
|
dependencies = [
|
|
1498
1498
|
"ring",
|
|
1499
1499
|
"rustls-pki-types",
|
|
@@ -417,7 +417,7 @@ async function runProcess(options: {
|
|
|
417
417
|
try {
|
|
418
418
|
child = spawn(options.binaryPath, [], {
|
|
419
419
|
cwd: options.cwd,
|
|
420
|
-
env: options.environment,
|
|
420
|
+
env: options.environment as NodeJS.ProcessEnv,
|
|
421
421
|
shell: false,
|
|
422
422
|
stdio: ["pipe", "pipe", "pipe"],
|
|
423
423
|
windowsHide: true,
|