@hraness/wordcell 0.24.0 → 0.25.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 (49) hide show
  1. package/README.md +14 -12
  2. package/dist/authoring.js +2 -1
  3. package/dist/capture.js +2 -2
  4. package/dist/cli.js +12 -11
  5. package/dist/clip/cli.js +2 -2
  6. package/dist/clip/defuddle-worker.js +87 -2
  7. package/dist/clip/jobs.js +5 -1
  8. package/dist/evaluation-builder.js +5 -4
  9. package/dist/evaluation-kb.js +5 -4
  10. package/dist/graph-authority.js +2 -1
  11. package/dist/graph-percolation.js +3 -2
  12. package/dist/{index-44kw9tr8.js → index-1wccy765.js} +18 -12
  13. package/dist/{index-1er88ckw.js → index-3gc2yk4k.js} +10 -5
  14. package/dist/{index-0eacgvpv.js → index-47893rgw.js} +22 -8
  15. package/dist/{index-mvs6f7ne.js → index-59bcxqee.js} +1 -1
  16. package/dist/{index-1w0sp1q7.js → index-7drercgk.js} +1 -1
  17. package/dist/{index-tcaq1c7f.js → index-e26mdwxz.js} +1 -1
  18. package/dist/{index-6jcz0m1c.js → index-hxyjer3x.js} +52 -1
  19. package/dist/{index-f184qyh1.js → index-hz2wyggk.js} +1 -1
  20. package/dist/{index-5d1rd5v9.js → index-mcpppwbq.js} +2 -2
  21. package/dist/index-qkesh4c6.js +7 -0
  22. package/dist/{index-b0khj0h5.js → index-qt2zwza8.js} +6 -1
  23. package/dist/{index-2fmnttca.js → index-t3abkwk4.js} +1 -1
  24. package/dist/index.js +6 -5
  25. package/dist/portfolio.js +5 -4
  26. package/dist/sdk.js +4 -3
  27. package/dist/{support-1yhv6vm6.js → support-adj7bbge.js} +11 -10
  28. package/dist/url-intelligence.js +3 -2
  29. package/dist/workflows/decision-context.js +5 -4
  30. package/dist/workflows/index.js +5 -4
  31. package/package.json +13 -8
  32. package/skills/wordcell/SKILL.md +1 -1
  33. package/skills/wordcell/references/publish.md +2 -1
  34. package/src/authoring-platform.ts +3 -0
  35. package/src/cli-program.ts +3 -3
  36. package/src/clip/jobs.ts +2 -1
  37. package/src/clip/metadata-search-tool/Cargo.lock +12 -0
  38. package/src/clip/metadata-search-tool/Cargo.toml +3 -0
  39. package/src/clip/metadata-search-tool/runner.ts +4 -1
  40. package/src/clip/metadata-search-tool/src/bing.rs +539 -0
  41. package/src/clip/metadata-search-tool/src/duckduckgo.rs +562 -0
  42. package/src/clip/metadata-search-tool/src/main.rs +263 -24
  43. package/src/clip/metadata-search-tool/src/openalex.rs +557 -0
  44. package/src/clip/metadata-search.ts +22 -4
  45. package/src/clip/url-intelligence.ts +54 -1
  46. package/src/clip/url-metadata.ts +2 -1
  47. package/src/directory-sync.ts +9 -0
  48. package/src/graph-authority.ts +5 -2
  49. package/src/url-intelligence.ts +2 -0
@@ -30,6 +30,25 @@ var ARCHIVE_TODAY_HOSTS = Object.freeze([
30
30
  "archive.md",
31
31
  "archive.vn"
32
32
  ]);
33
+ var METADATA_SEARCH_FAILURE_CODES = [
34
+ "timeout",
35
+ "http",
36
+ "http-body",
37
+ "http-status",
38
+ "http-forbidden",
39
+ "http-rate-limited",
40
+ "http-redirect",
41
+ "parse",
42
+ "unverified-empty",
43
+ "challenge",
44
+ "content-type",
45
+ "content-encoding",
46
+ "body-limit",
47
+ "body-encoding",
48
+ "result-limit",
49
+ "unrecognized-html",
50
+ "query-mismatch"
51
+ ];
33
52
  var archiveTodayHosts = new Set(ARCHIVE_TODAY_HOSTS);
34
53
  var tokenCharacter = /^[!#$%&'*+.^_`|~0-9A-Za-z-]$/u;
35
54
  var engineName = /^[a-z0-9][a-z0-9._-]{0,127}$/u;
@@ -140,7 +159,7 @@ function parseMetadataResult(value, index, queried, failed, budget) {
140
159
  }
141
160
  function parseMetadataSearchResponse(value) {
142
161
  const input = record(value, "Metadata search response");
143
- strictKeys(input, ["query", "results", "engines_queried", "engines_failed"], "Metadata search response");
162
+ strictKeys(input, ["query", "results", "engines_queried", "engines_failed", "engine_failures", "engine_usage"], "Metadata search response");
144
163
  const budget = { bytes: 0 };
145
164
  const query = boundedString(input.query, "Metadata search response.query", MAX_METADATA_SEARCH_QUERY_UTF8_BYTES, budget);
146
165
  if (query === "" || query !== query.trim() || hasUnsafeControls(query)) {
@@ -157,12 +176,44 @@ function parseMetadataSearchResponse(value) {
157
176
  fail("Metadata search response.results", `must be an array with at most ${MAX_METADATA_SEARCH_RESULTS} entries.`);
158
177
  }
159
178
  const failed = new Set(enginesFailed);
179
+ let engineFailures;
180
+ if (Object.hasOwn(input, "engine_failures")) {
181
+ if (!Array.isArray(input.engine_failures) || input.engine_failures.length !== enginesFailed.length) {
182
+ fail("Metadata search response.engine_failures", "must cover every failed engine exactly once.");
183
+ }
184
+ const seen = new Set;
185
+ engineFailures = Object.freeze(input.engine_failures.map((value2, index) => {
186
+ const label = `Metadata search response.engine_failures[${index}]`;
187
+ const entry = record(value2, label);
188
+ strictKeys(entry, ["engine", "code"], label);
189
+ if (typeof entry.engine !== "string" || !failed.has(entry.engine) || seen.has(entry.engine)) {
190
+ fail(label, "must name a unique failed, queried engine.");
191
+ }
192
+ if (typeof entry.code !== "string" || !METADATA_SEARCH_FAILURE_CODES.some((code) => code === entry.code)) {
193
+ fail(label, "must contain a known categorical failure code.");
194
+ }
195
+ seen.add(entry.engine);
196
+ return Object.freeze({ engine: entry.engine, code: entry.code });
197
+ }));
198
+ }
160
199
  const results = Object.freeze(input.results.map((result, index) => parseMetadataResult(result, index, queried, failed, budget)));
200
+ let engineUsage;
201
+ if (Object.hasOwn(input, "engine_usage")) {
202
+ if (!Array.isArray(input.engine_usage) || input.engine_usage.length !== 1)
203
+ fail("Metadata search response.engine_usage", "must contain one bounded OpenAlex usage record.");
204
+ const entry = record(input.engine_usage[0], "engine usage");
205
+ strictKeys(entry, ["engine", "reported_cost_usd", "billing_status"], "engine usage");
206
+ if (entry.engine !== "openalex" || !enginesQueried.includes("openalex") || failed.has("openalex") || typeof entry.reported_cost_usd !== "number" || !Number.isFinite(entry.reported_cost_usd) || entry.reported_cost_usd < 0 || entry.reported_cost_usd > 1e6 || entry.billing_status !== "not-established")
207
+ fail("engine usage", "must preserve bounded provider-reported usage without asserting billing.");
208
+ engineUsage = Object.freeze([Object.freeze({ engine: "openalex", reportedCostUsd: entry.reported_cost_usd, billingStatus: "not-established" })]);
209
+ }
161
210
  return Object.freeze({
162
211
  query,
163
212
  results,
164
213
  enginesQueried,
165
214
  enginesFailed,
215
+ ...engineFailures === undefined ? {} : { engineFailures },
216
+ ...engineUsage === undefined ? {} : { engineUsage },
166
217
  engineStatus: enginesFailed.length === 0 ? "complete" : enginesFailed.length === enginesQueried.length ? "unavailable" : "partial"
167
218
  });
168
219
  }
@@ -5,7 +5,7 @@ import {
5
5
  MAX_SEARCH_RESULTS,
6
6
  openKnowledgeBase,
7
7
  validateKnowledgeBaseSearchHistory
8
- } from "./index-5d1rd5v9.js";
8
+ } from "./index-mcpppwbq.js";
9
9
  import {
10
10
  expandSearchRequest,
11
11
  parseSearchRules
@@ -19,10 +19,10 @@ import {
19
19
  } from "./index-j70m75wd.js";
20
20
  import {
21
21
  percolateWithGraph
22
- } from "./index-tcaq1c7f.js";
22
+ } from "./index-e26mdwxz.js";
23
23
  import {
24
24
  openGraphAuthority
25
- } from "./index-1er88ckw.js";
25
+ } from "./index-3gc2yk4k.js";
26
26
  import {
27
27
  validateGraphPercolationOptions,
28
28
  validateGraphQueryRequest
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ // src/directory-sync.ts
3
+ function syncsDirectories(platform = process.platform) {
4
+ return platform !== "win32";
5
+ }
6
+
7
+ export { syncsDirectories };
@@ -2,6 +2,9 @@
2
2
  import {
3
3
  acquireNoteLock
4
4
  } from "./index-3rm7cz6h.js";
5
+ import {
6
+ syncsDirectories
7
+ } from "./index-qkesh4c6.js";
5
8
  import {
6
9
  isCanonicalNoteId,
7
10
  isCanonicalRelationPredicate,
@@ -844,7 +847,9 @@ async function cleanupTemporary(temporaryPath, identity) {
844
847
  throw error;
845
848
  }
846
849
  }
847
- async function fsyncDirectory(path, openDirectory = open) {
850
+ async function fsyncDirectory(path, openDirectory = open, platform = process.platform) {
851
+ if (!syncsDirectories(platform))
852
+ return;
848
853
  const handle = await openDirectory(path, constants.O_RDONLY);
849
854
  try {
850
855
  await handle.sync();
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  acquireArchiveTodaySnapshot,
4
4
  discoverArchiveTodaySnapshot
5
- } from "./index-6jcz0m1c.js";
5
+ } from "./index-hxyjer3x.js";
6
6
  import {
7
7
  canonicalizeUrl,
8
8
  chooseBestExtraction,
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  knowledgeBaseEvaluationRetrieverIds,
38
38
  openKnowledgeBaseEvaluation,
39
39
  verifyFrozenEvaluationSnapshot
40
- } from "./index-mvs6f7ne.js";
40
+ } from "./index-59bcxqee.js";
41
41
  import {
42
42
  DEFAULT_SEARCH_RESULTS,
43
43
  MAX_SEARCH_CANDIDATES,
@@ -50,7 +50,7 @@ import {
50
50
  packUntrustedSearchContext,
51
51
  searchEvidenceRank,
52
52
  validateKnowledgeBaseSearchHistory
53
- } from "./index-5d1rd5v9.js";
53
+ } from "./index-mcpppwbq.js";
54
54
  import"./index-adx6khj5.js";
55
55
  import {
56
56
  MAX_EMBEDDING_MODEL_BYTES,
@@ -94,7 +94,7 @@ import {
94
94
  } from "./index-b88v3vtm.js";
95
95
  import {
96
96
  percolateWithGraph
97
- } from "./index-tcaq1c7f.js";
97
+ } from "./index-e26mdwxz.js";
98
98
  import {
99
99
  DEFAULT_PERCOLATION_LIMIT,
100
100
  DEFAULT_PERCOLATION_MIN_SUPPORT,
@@ -122,7 +122,7 @@ import {
122
122
  queryGraph,
123
123
  rebuildGraph,
124
124
  verifyGraph
125
- } from "./index-1er88ckw.js";
125
+ } from "./index-3gc2yk4k.js";
126
126
  import {
127
127
  GRAPH_LIMITS,
128
128
  GraphAuthorityError,
@@ -297,8 +297,9 @@ import {
297
297
  noteRevision,
298
298
  removeNoteRelation,
299
299
  updateNoteBody
300
- } from "./index-b0khj0h5.js";
300
+ } from "./index-qt2zwza8.js";
301
301
  import"./index-3rm7cz6h.js";
302
+ import"./index-qkesh4c6.js";
302
303
  import {
303
304
  MAX_ANALYZED_NOTES,
304
305
  MAX_CONNECTION_OBSERVATIONS,
package/dist/portfolio.js CHANGED
@@ -20,15 +20,15 @@ import {
20
20
  selectAuthorizedVaults,
21
21
  snapshotPortfolioRegistry,
22
22
  validateResolvedPortfolioVaults
23
- } from "./index-f184qyh1.js";
24
- import"./index-5d1rd5v9.js";
23
+ } from "./index-hz2wyggk.js";
24
+ import"./index-mcpppwbq.js";
25
25
  import"./index-adx6khj5.js";
26
26
  import"./index-fp732bgg.js";
27
27
  import"./index-4j3tt0c3.js";
28
28
  import"./index-j70m75wd.js";
29
- import"./index-tcaq1c7f.js";
29
+ import"./index-e26mdwxz.js";
30
30
  import"./index-bdwcjvr4.js";
31
- import"./index-1er88ckw.js";
31
+ import"./index-3gc2yk4k.js";
32
32
  import"./index-pgtm2nhf.js";
33
33
  import"./index-1gwbassd.js";
34
34
  import"./index-ahyhryb8.js";
@@ -40,6 +40,7 @@ import"./index-06c9ctr6.js";
40
40
  import"./index-5vwpzb5a.js";
41
41
  import"./index-x3fthpsc.js";
42
42
  import"./index-3rm7cz6h.js";
43
+ import"./index-qkesh4c6.js";
43
44
  import {
44
45
  MAX_DOCUMENT_ID_BYTES,
45
46
  MAX_PORTFOLIO_NAME_BYTES,
package/dist/sdk.js CHANGED
@@ -11,14 +11,14 @@ import {
11
11
  packUntrustedSearchContext,
12
12
  searchEvidenceRank,
13
13
  validateKnowledgeBaseSearchHistory
14
- } from "./index-5d1rd5v9.js";
14
+ } from "./index-mcpppwbq.js";
15
15
  import"./index-adx6khj5.js";
16
16
  import"./index-fp732bgg.js";
17
17
  import"./index-4j3tt0c3.js";
18
18
  import"./index-j70m75wd.js";
19
- import"./index-tcaq1c7f.js";
19
+ import"./index-e26mdwxz.js";
20
20
  import"./index-bdwcjvr4.js";
21
- import"./index-1er88ckw.js";
21
+ import"./index-3gc2yk4k.js";
22
22
  import"./index-pgtm2nhf.js";
23
23
  import"./index-1gwbassd.js";
24
24
  import"./index-ahyhryb8.js";
@@ -29,6 +29,7 @@ import"./index-48pz4jpc.js";
29
29
  import"./index-06c9ctr6.js";
30
30
  import"./index-5vwpzb5a.js";
31
31
  import"./index-3rm7cz6h.js";
32
+ import"./index-qkesh4c6.js";
32
33
  import"./index-jvb7w0gg.js";
33
34
  import"./index-z1w83f81.js";
34
35
  export {
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  parseArguments as parseArguments2,
4
4
  parseUrlMetadataArguments
5
- } from "./index-44kw9tr8.js";
6
- import"./index-0eacgvpv.js";
5
+ } from "./index-1wccy765.js";
6
+ import"./index-47893rgw.js";
7
7
  import {
8
8
  parsePdfArguments
9
9
  } from "./index-qfqjfxaa.js";
10
- import"./index-f184qyh1.js";
10
+ import"./index-hz2wyggk.js";
11
11
  import"./index-j4zgmzjr.js";
12
- import"./index-2fmnttca.js";
13
- import"./index-6jcz0m1c.js";
12
+ import"./index-t3abkwk4.js";
13
+ import"./index-hxyjer3x.js";
14
14
  import"./index-k86wepd8.js";
15
15
  import"./index-nwrehke7.js";
16
16
  import"./index-5n05se68.js";
@@ -28,16 +28,16 @@ import"./index-mxxxytys.js";
28
28
  import"./index-23z4zxgg.js";
29
29
  import"./index-pj501bh1.js";
30
30
  import"./index-9rf81m0p.js";
31
- import"./index-mvs6f7ne.js";
32
- import"./index-5d1rd5v9.js";
31
+ import"./index-59bcxqee.js";
32
+ import"./index-mcpppwbq.js";
33
33
  import"./index-adx6khj5.js";
34
34
  import"./index-fp732bgg.js";
35
35
  import"./index-4j3tt0c3.js";
36
36
  import"./index-j70m75wd.js";
37
37
  import"./index-b88v3vtm.js";
38
- import"./index-tcaq1c7f.js";
38
+ import"./index-e26mdwxz.js";
39
39
  import"./index-bdwcjvr4.js";
40
- import"./index-1er88ckw.js";
40
+ import"./index-3gc2yk4k.js";
41
41
  import"./index-pgtm2nhf.js";
42
42
  import"./index-1gwbassd.js";
43
43
  import"./index-ahyhryb8.js";
@@ -53,8 +53,9 @@ import"./index-23m6bbjt.js";
53
53
  import"./index-hya40gb2.js";
54
54
  import"./index-5vwpzb5a.js";
55
55
  import"./index-x3fthpsc.js";
56
- import"./index-b0khj0h5.js";
56
+ import"./index-qt2zwza8.js";
57
57
  import"./index-3rm7cz6h.js";
58
+ import"./index-qkesh4c6.js";
58
59
  import"./index-jvb7w0gg.js";
59
60
  import"./index-z1w83f81.js";
60
61
 
@@ -10,7 +10,7 @@ import {
10
10
  readUrlMetadataDocument,
11
11
  renderUrlMetadataDocument,
12
12
  writeUrlMetadataDocument
13
- } from "./index-0eacgvpv.js";
13
+ } from "./index-47893rgw.js";
14
14
  import {
15
15
  ARCHIVE_TODAY_HOSTS,
16
16
  ArchiveTodayFailure,
@@ -23,11 +23,12 @@ import {
23
23
  parseMetadataSearchResponse,
24
24
  rankMetadataSearchResults,
25
25
  selectNewestArchiveTodayMemento
26
- } from "./index-6jcz0m1c.js";
26
+ } from "./index-hxyjer3x.js";
27
27
  import"./index-e5fbsywq.js";
28
28
  import"./index-gh719d91.js";
29
29
  import"./index-mxxxytys.js";
30
30
  import"./index-1xxnjn0d.js";
31
+ import"./index-qkesh4c6.js";
31
32
  import"./index-z1w83f81.js";
32
33
 
33
34
  // src/url-intelligence.ts
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  decisionContextWorkflow
4
- } from "../index-1w0sp1q7.js";
4
+ } from "../index-7drercgk.js";
5
5
  import"../index-h170byqw.js";
6
- import"../index-5d1rd5v9.js";
6
+ import"../index-mcpppwbq.js";
7
7
  import"../index-adx6khj5.js";
8
8
  import"../index-fp732bgg.js";
9
9
  import"../index-4j3tt0c3.js";
10
10
  import"../index-j70m75wd.js";
11
- import"../index-tcaq1c7f.js";
11
+ import"../index-e26mdwxz.js";
12
12
  import"../index-bdwcjvr4.js";
13
- import"../index-1er88ckw.js";
13
+ import"../index-3gc2yk4k.js";
14
14
  import"../index-pgtm2nhf.js";
15
15
  import"../index-1gwbassd.js";
16
16
  import"../index-ahyhryb8.js";
@@ -21,6 +21,7 @@ import"../index-48pz4jpc.js";
21
21
  import"../index-06c9ctr6.js";
22
22
  import"../index-5vwpzb5a.js";
23
23
  import"../index-3rm7cz6h.js";
24
+ import"../index-qkesh4c6.js";
24
25
  import"../index-jvb7w0gg.js";
25
26
  import"../index-z1w83f81.js";
26
27
  export {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  decisionContextWorkflow
4
- } from "../index-1w0sp1q7.js";
4
+ } from "../index-7drercgk.js";
5
5
  import {
6
6
  explainChangeWorkflow
7
7
  } from "../index-e4fagfjz.js";
@@ -9,14 +9,14 @@ import {
9
9
  planRadarWorkflow
10
10
  } from "../index-rdd5f7jj.js";
11
11
  import"../index-h170byqw.js";
12
- import"../index-5d1rd5v9.js";
12
+ import"../index-mcpppwbq.js";
13
13
  import"../index-adx6khj5.js";
14
14
  import"../index-fp732bgg.js";
15
15
  import"../index-4j3tt0c3.js";
16
16
  import"../index-j70m75wd.js";
17
- import"../index-tcaq1c7f.js";
17
+ import"../index-e26mdwxz.js";
18
18
  import"../index-bdwcjvr4.js";
19
- import"../index-1er88ckw.js";
19
+ import"../index-3gc2yk4k.js";
20
20
  import"../index-pgtm2nhf.js";
21
21
  import"../index-1gwbassd.js";
22
22
  import"../index-ahyhryb8.js";
@@ -27,6 +27,7 @@ import"../index-48pz4jpc.js";
27
27
  import"../index-06c9ctr6.js";
28
28
  import"../index-5vwpzb5a.js";
29
29
  import"../index-3rm7cz6h.js";
30
+ import"../index-qkesh4c6.js";
30
31
  import"../index-jvb7w0gg.js";
31
32
  import"../index-z1w83f81.js";
32
33
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hraness/wordcell",
3
- "version": "0.24.0",
3
+ "version": "0.25.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",
@@ -368,6 +368,9 @@
368
368
  "src/clip/metadata-search-tool/Cargo.lock",
369
369
  "src/clip/metadata-search-tool/runner.ts",
370
370
  "src/clip/metadata-search-tool/src/main.rs",
371
+ "src/clip/metadata-search-tool/src/duckduckgo.rs",
372
+ "src/clip/metadata-search-tool/src/bing.rs",
373
+ "src/clip/metadata-search-tool/src/openalex.rs",
371
374
  "src/git.ts",
372
375
  "src/evaluation-analysis-v2.ts",
373
376
  "src/evaluation-builder.ts",
@@ -468,13 +471,14 @@
468
471
  "src/oh/validation.ts",
469
472
  "assets/agent-skill.svg",
470
473
  "src/support.ts",
471
- "src/support-profile.ts"
474
+ "src/support-profile.ts",
475
+ "src/directory-sync.ts"
472
476
  ],
473
477
  "scripts": {
474
- "kb:refresh": "bunx --bun github:hraness/kb#v0.15.1 refresh --root kb",
475
- "kb:check:lane": "bunx --bun github:hraness/kb#v0.15.1 check --root kb --no-catalog",
476
- "kb:check": "bunx --bun github:hraness/kb#v0.15.1 check --root kb && bunx --bun github:hraness/kb#v0.15.1 agents check --root kb --repo .",
477
- "kb:catalog": "bunx --bun github:hraness/kb#v0.15.1 catalog --root kb",
478
+ "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",
479
+ "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",
480
+ "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 .",
481
+ "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",
478
482
  "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/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",
479
483
  "check:workflows": "bun ./scripts/check-workflow-yaml.ts",
480
484
  "check:installed-command-docs": "bun ./scripts/check-installed-command-docs.ts",
@@ -485,11 +489,12 @@
485
489
  "url-metadata:tool:build": "bun ./dist/cli.js url-metadata tool build",
486
490
  "url-metadata:tool:check": "bun ./dist/cli.js url-metadata tool check",
487
491
  "test:package": "bun run ./scripts/package-smoke.ts",
492
+ "check:fast": "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",
488
493
  "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",
489
494
  "prepack": "bun run check",
490
495
  "check:effect": "bun run scripts/check-effect-policy.ts",
491
- "kb:search": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell search --root kb --mode exact --selected-passage --rerank typesafe --rerank-limit 25",
492
- "kb:search:local": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell search --root kb --mode exact --selected-passage",
496
+ "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 --rerank typesafe --rerank-limit 25",
497
+ "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",
493
498
  "check:worker": "tsc -p worker/tsconfig.json --noEmit"
494
499
  },
495
500
  "dependencies": {
@@ -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.24.0/hraness-wordcell-0.24.0.tgz
61
+ bun add --global --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.25.0/hraness-wordcell-0.25.0.tgz
62
62
  }
63
63
  wordcell --help
64
64
  ```
@@ -96,7 +96,8 @@ The full artifact contract and hosting options are in
96
96
 
97
97
  Agents on platforms without a filesystem or Bun runtime can publish the same
98
98
  `hraness.wordcell.site.v1` artifact through the hosted surface. It runs the
99
- identical projection server-side; published sites are public.
99
+ identical projection server-side; published sites are public, and search
100
+ engines may index them unless the publish request sets `"noindex": true`.
100
101
 
101
102
  ```sh
102
103
  # Self-serve capability token (IP-limited; shown once — store it).
@@ -1,4 +1,5 @@
1
1
  import { acquireNoteLock } from "./note-lock.js";
2
+ import { syncsDirectories } from "./directory-sync.js";
2
3
  import { rename } from "node:fs/promises";
3
4
  import { randomUUID } from "node:crypto";
4
5
  import { constants } from "node:fs";
@@ -202,7 +203,9 @@ export async function cleanupTemporary(
202
203
  export async function fsyncDirectory(
203
204
  path: string,
204
205
  openDirectory: typeof open = open,
206
+ platform: NodeJS.Platform = process.platform,
205
207
  ): Promise<void> {
208
+ if (!syncsDirectories(platform)) return;
206
209
  const handle = await openDirectory(path, constants.O_RDONLY);
207
210
  try {
208
211
  await handle.sync();
@@ -4500,17 +4500,17 @@ export async function main(
4500
4500
  }
4501
4501
  try {
4502
4502
  if (command.kind === "clip") {
4503
- return await (dependencies.runClipCommand ?? runClipCommand)(command.arguments, process.env, output);
4503
+ return await (dependencies.runClipCommand ?? runClipCommand)(command.arguments, terminal.env, output);
4504
4504
  }
4505
4505
  if (command.kind === "capture-bundle") return await runCaptureBundle(command, output, dependencies);
4506
4506
  if (command.kind === "capture-diff") return await runCaptureDiff(command, output, dependencies);
4507
4507
  if (command.kind === "portfolio-search") return await runPortfolioSearch(command, output, dependencies);
4508
4508
  if (command.kind === "portfolio-audit") return await runPortfolioAudit(command, output, dependencies);
4509
4509
  if (command.kind === "url-metadata") {
4510
- return await (dependencies.runUrlMetadataCommand ?? runUrlMetadataCommand)(command.arguments, process.env, output);
4510
+ return await (dependencies.runUrlMetadataCommand ?? runUrlMetadataCommand)(command.arguments, terminal.env, output);
4511
4511
  }
4512
4512
  if (command.kind === "pdf") {
4513
- return await (dependencies.runPdfCommand ?? runPdfCommand)(command.arguments, process.env, output);
4513
+ return await (dependencies.runPdfCommand ?? runPdfCommand)(command.arguments, terminal.env, output);
4514
4514
  }
4515
4515
  if (command.kind === "init") {
4516
4516
  return await runInit(command, output, dependencies.initVault ?? initVault, dependencies.terminal ?? processTerminal());
package/src/clip/jobs.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Buffer } from "node:buffer";
2
+ import { syncsDirectories } from "../directory-sync.js";
2
3
  import { randomUUID } from "node:crypto";
3
4
  import { constants } from "node:fs";
4
5
  import {
@@ -500,7 +501,7 @@ async function fsyncStore(store: CaptureJobStore): Promise<void> {
500
501
  if (!stat.isDirectory() || !sameIdentity(stat, expected)) {
501
502
  throw new CaptureJobSafetyError("Capture job store changed before synchronization.");
502
503
  }
503
- await handle.sync();
504
+ if (syncsDirectories()) await handle.sync();
504
505
  } finally {
505
506
  await handle.close();
506
507
  }
@@ -896,10 +896,13 @@ version = "0.1.0"
896
896
  dependencies = [
897
897
  "libc",
898
898
  "metadata-search-engine-rs",
899
+ "quick-xml",
899
900
  "reqwest",
901
+ "scraper",
900
902
  "serde",
901
903
  "serde_json",
902
904
  "tokio",
905
+ "url",
903
906
  ]
904
907
 
905
908
  [[package]]
@@ -1309,6 +1312,15 @@ dependencies = [
1309
1312
  "psl-types",
1310
1313
  ]
1311
1314
 
1315
+ [[package]]
1316
+ name = "quick-xml"
1317
+ version = "0.42.0"
1318
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1319
+ checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b"
1320
+ dependencies = [
1321
+ "memchr",
1322
+ ]
1323
+
1312
1324
  [[package]]
1313
1325
  name = "quote"
1314
1326
  version = "1.0.47"
@@ -8,6 +8,9 @@ publish = false
8
8
  metadata-search-engine-rs = { git = "https://github.com/MikeLuu99/searxng-rust", rev = "f40a00ea67a857ee996e1caba1ebab3ee7a14a47" }
9
9
  libc = "=0.2.189"
10
10
  reqwest = { version = "=0.12.28", features = ["brotli", "cookies", "gzip"] }
11
+ scraper = "=0.20.0"
12
+ quick-xml = "=0.42.0"
13
+ url = "=2.5.8"
11
14
  serde = { version = "1", features = ["derive"] }
12
15
  serde_json = "1"
13
16
  tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
@@ -1,4 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
2
+ import { syncsDirectories } from "../../directory-sync.js";
2
3
  import {
3
4
  closeSync,
4
5
  constants,
@@ -387,7 +388,9 @@ export function installMetadataSearchExecutable(input: {
387
388
  const stagingPath = join(toolDirectory, stagingName);
388
389
  const backupPath = join(toolDirectory, backupName);
389
390
  const syncDirectory = input.syncDirectory
390
- ?? ((descriptor: number) => fsyncSync(descriptor));
391
+ ?? ((descriptor: number) => {
392
+ if (syncsDirectories()) fsyncSync(descriptor);
393
+ });
391
394
 
392
395
  const toolBinding = openBoundDirectory(toolDirectory, "metadata-search tool directory");
393
396
  let targetBinding: DirectoryBinding | null = null;