wiki-graph-sdk 0.7.1 → 0.8.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 (58) hide show
  1. package/README.md +22 -1
  2. package/dist/archives.cjs +494 -656
  3. package/dist/archives.cjs.map +1 -1
  4. package/dist/archives.d.ts +48 -80
  5. package/dist/archives.js +431 -585
  6. package/dist/archives.js.map +1 -1
  7. package/dist/conversions.cjs +183 -33
  8. package/dist/conversions.cjs.map +1 -1
  9. package/dist/conversions.d.ts +8 -1
  10. package/dist/conversions.js +188 -29
  11. package/dist/conversions.js.map +1 -1
  12. package/dist/default-worker.cjs +322 -62
  13. package/dist/default-worker.cjs.map +1 -1
  14. package/dist/default-worker.d.ts +1 -0
  15. package/dist/default-worker.js +336 -60
  16. package/dist/default-worker.js.map +1 -1
  17. package/dist/embedding.cjs +2 -1
  18. package/dist/embedding.cjs.map +1 -1
  19. package/dist/embedding.d.ts +4 -4
  20. package/dist/embedding.js +2 -1
  21. package/dist/embedding.js.map +1 -1
  22. package/dist/index.cjs +1295 -949
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.ts +58 -24
  25. package/dist/index.js +1164 -805
  26. package/dist/index.js.map +1 -1
  27. package/dist/{jobs-Dd5PMSId.d.ts → jobs-CRK-DZ40.d.ts} +27 -14
  28. package/dist/local-config.cjs +2 -1
  29. package/dist/local-config.cjs.map +1 -1
  30. package/dist/local-config.js +2 -1
  31. package/dist/local-config.js.map +1 -1
  32. package/dist/maintenance.cjs +140 -30
  33. package/dist/maintenance.cjs.map +1 -1
  34. package/dist/maintenance.d.ts +5 -1
  35. package/dist/maintenance.js +145 -26
  36. package/dist/maintenance.js.map +1 -1
  37. package/dist/runtime-config.cjs +4 -3
  38. package/dist/runtime-config.cjs.map +1 -1
  39. package/dist/runtime-config.d.ts +4 -1
  40. package/dist/runtime-config.js +4 -3
  41. package/dist/runtime-config.js.map +1 -1
  42. package/dist/stage-BnWI3Rqt.d.ts +33 -0
  43. package/dist/stage.cjs +22 -12
  44. package/dist/stage.cjs.map +1 -1
  45. package/dist/stage.d.ts +2 -14
  46. package/dist/stage.js +22 -12
  47. package/dist/stage.js.map +1 -1
  48. package/dist/target-CZ7elwmj.d.ts +14 -0
  49. package/dist/wikispine.cjs +14 -10
  50. package/dist/wikispine.cjs.map +1 -1
  51. package/dist/wikispine.js +14 -10
  52. package/dist/wikispine.js.map +1 -1
  53. package/dist/worker.cjs +295 -25
  54. package/dist/worker.cjs.map +1 -1
  55. package/dist/worker.d.ts +28 -5
  56. package/dist/worker.js +313 -28
  57. package/dist/worker.js.map +1 -1
  58. package/package.json +2 -2
package/README.md CHANGED
@@ -23,6 +23,27 @@ for (const job of jobs) {
23
23
  wikiGraph.close();
24
24
  ```
25
25
 
26
+ Applications may replace the configured LLM and embedding implementations for
27
+ one SDK instance:
28
+
29
+ ```ts
30
+ const wikiGraph = createWikiGraphSDK({
31
+ providers: {
32
+ llm: myStreamingLLMProvider,
33
+ embedding: myEmbeddingProvider,
34
+ },
35
+ });
36
+
37
+ await wikiGraph.jobs.runWorker();
38
+ ```
39
+
40
+ An operation-level `llm` option (the typed SDK equivalent of CLI `--llm`)
41
+ takes precedence over the injected LLM provider. An injected provider takes
42
+ precedence over local database configuration. Injected objects are
43
+ process-local and are not persisted with durable jobs, so a worker in another
44
+ process must create its SDK with the same providers. The standalone default
45
+ worker continues to use local configuration.
46
+
26
47
  Job event subscriptions observe durable work without coupling observation to
27
48
  cancellation. Call `job.cancel()` explicitly to cancel a job; unsubscribing
28
49
  only stops the current listener.
@@ -34,9 +55,9 @@ lazy sequence through the Node delivery boundary without importing Core:
34
55
  import { applyWikiGraphJobArtifacts } from "wiki-graph-sdk/worker";
35
56
 
36
57
  await applyWikiGraphJobArtifacts({
58
+ archive: { kind: "standalone", path: "/tmp/job/archive.wikg" },
37
59
  artifacts,
38
60
  stateDir: "/tmp/job/sdk-state",
39
- wikgPath: "/tmp/job/archive.wikg",
40
61
  });
41
62
  ```
42
63