@hraness/wordcell 0.24.0 → 0.24.1

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 (39) hide show
  1. package/README.md +14 -12
  2. package/dist/authoring.js +2 -1
  3. package/dist/cli.js +10 -9
  4. package/dist/clip/jobs.js +5 -1
  5. package/dist/evaluation-builder.js +5 -4
  6. package/dist/evaluation-kb.js +5 -4
  7. package/dist/graph-authority.js +2 -1
  8. package/dist/graph-percolation.js +3 -2
  9. package/dist/{index-1er88ckw.js → index-3gc2yk4k.js} +10 -5
  10. package/dist/{index-mvs6f7ne.js → index-59bcxqee.js} +1 -1
  11. package/dist/{index-1w0sp1q7.js → index-7drercgk.js} +1 -1
  12. package/dist/{index-tcaq1c7f.js → index-e26mdwxz.js} +1 -1
  13. package/dist/{index-f184qyh1.js → index-hz2wyggk.js} +1 -1
  14. package/dist/{index-44kw9tr8.js → index-jqkkb4fr.js} +14 -8
  15. package/dist/{index-5d1rd5v9.js → index-mcpppwbq.js} +2 -2
  16. package/dist/index-qkesh4c6.js +7 -0
  17. package/dist/{index-b0khj0h5.js → index-qt2zwza8.js} +6 -1
  18. package/dist/{index-0eacgvpv.js → index-t0fh8a1q.js} +7 -3
  19. package/dist/index.js +6 -5
  20. package/dist/portfolio.js +5 -4
  21. package/dist/sdk.js +4 -3
  22. package/dist/{support-1yhv6vm6.js → support-07jpt1z4.js} +9 -8
  23. package/dist/url-intelligence.js +2 -1
  24. package/dist/workflows/decision-context.js +5 -4
  25. package/dist/workflows/index.js +5 -4
  26. package/package.json +9 -6
  27. package/skills/wordcell/SKILL.md +1 -1
  28. package/skills/wordcell/references/publish.md +2 -1
  29. package/src/authoring-platform.ts +3 -0
  30. package/src/clip/jobs.ts +2 -1
  31. package/src/clip/metadata-search-tool/Cargo.lock +2 -0
  32. package/src/clip/metadata-search-tool/Cargo.toml +2 -0
  33. package/src/clip/metadata-search-tool/runner.ts +4 -1
  34. package/src/clip/metadata-search-tool/src/duckduckgo.rs +534 -0
  35. package/src/clip/metadata-search-tool/src/main.rs +31 -18
  36. package/src/clip/metadata-search.ts +4 -2
  37. package/src/clip/url-metadata.ts +2 -1
  38. package/src/directory-sync.ts +9 -0
  39. package/src/graph-authority.ts +5 -2
@@ -10,7 +10,7 @@ import {
10
10
  readUrlMetadataDocument,
11
11
  renderUrlMetadataDocument,
12
12
  writeUrlMetadataDocument
13
- } from "./index-0eacgvpv.js";
13
+ } from "./index-t0fh8a1q.js";
14
14
  import {
15
15
  ARCHIVE_TODAY_HOSTS,
16
16
  ArchiveTodayFailure,
@@ -28,6 +28,7 @@ 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.24.1",
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,7 @@
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",
371
372
  "src/git.ts",
372
373
  "src/evaluation-analysis-v2.ts",
373
374
  "src/evaluation-builder.ts",
@@ -468,13 +469,14 @@
468
469
  "src/oh/validation.ts",
469
470
  "assets/agent-skill.svg",
470
471
  "src/support.ts",
471
- "src/support-profile.ts"
472
+ "src/support-profile.ts",
473
+ "src/directory-sync.ts"
472
474
  ],
473
475
  "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",
476
+ "kb:refresh": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell refresh --root kb",
477
+ "kb:check:lane": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell check --root kb --no-catalog",
478
+ "kb:check": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell check --root kb && bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell agents check --root kb --repo .",
479
+ "kb:catalog": "bunx --bun --package https://github.com/hraness/wordcell/releases/download/v0.24.0/hraness-wordcell-0.24.0.tgz wordcell catalog --root kb",
478
480
  "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
481
  "check:workflows": "bun ./scripts/check-workflow-yaml.ts",
480
482
  "check:installed-command-docs": "bun ./scripts/check-installed-command-docs.ts",
@@ -485,6 +487,7 @@
485
487
  "url-metadata:tool:build": "bun ./dist/cli.js url-metadata tool build",
486
488
  "url-metadata:tool:check": "bun ./dist/cli.js url-metadata tool check",
487
489
  "test:package": "bun run ./scripts/package-smoke.ts",
490
+ "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
491
  "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
492
  "prepack": "bun run check",
490
493
  "check:effect": "bun run scripts/check-effect-policy.ts",
@@ -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.24.1/hraness-wordcell-0.24.1.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();
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
  }
@@ -897,9 +897,11 @@ dependencies = [
897
897
  "libc",
898
898
  "metadata-search-engine-rs",
899
899
  "reqwest",
900
+ "scraper",
900
901
  "serde",
901
902
  "serde_json",
902
903
  "tokio",
904
+ "url",
903
905
  ]
904
906
 
905
907
  [[package]]
@@ -8,6 +8,8 @@ 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
+ url = "=2.5.8"
11
13
  serde = { version = "1", features = ["derive"] }
12
14
  serde_json = "1"
13
15
  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;