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.
- package/README.md +22 -1
- package/dist/archives.cjs +494 -656
- package/dist/archives.cjs.map +1 -1
- package/dist/archives.d.ts +48 -80
- package/dist/archives.js +431 -585
- package/dist/archives.js.map +1 -1
- package/dist/conversions.cjs +183 -33
- package/dist/conversions.cjs.map +1 -1
- package/dist/conversions.d.ts +8 -1
- package/dist/conversions.js +188 -29
- package/dist/conversions.js.map +1 -1
- package/dist/default-worker.cjs +322 -62
- package/dist/default-worker.cjs.map +1 -1
- package/dist/default-worker.d.ts +1 -0
- package/dist/default-worker.js +336 -60
- package/dist/default-worker.js.map +1 -1
- package/dist/embedding.cjs +2 -1
- package/dist/embedding.cjs.map +1 -1
- package/dist/embedding.d.ts +4 -4
- package/dist/embedding.js +2 -1
- package/dist/embedding.js.map +1 -1
- package/dist/index.cjs +1295 -949
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +58 -24
- package/dist/index.js +1164 -805
- package/dist/index.js.map +1 -1
- package/dist/{jobs-Dd5PMSId.d.ts → jobs-CRK-DZ40.d.ts} +27 -14
- package/dist/local-config.cjs +2 -1
- package/dist/local-config.cjs.map +1 -1
- package/dist/local-config.js +2 -1
- package/dist/local-config.js.map +1 -1
- package/dist/maintenance.cjs +140 -30
- package/dist/maintenance.cjs.map +1 -1
- package/dist/maintenance.d.ts +5 -1
- package/dist/maintenance.js +145 -26
- package/dist/maintenance.js.map +1 -1
- package/dist/runtime-config.cjs +4 -3
- package/dist/runtime-config.cjs.map +1 -1
- package/dist/runtime-config.d.ts +4 -1
- package/dist/runtime-config.js +4 -3
- package/dist/runtime-config.js.map +1 -1
- package/dist/stage-BnWI3Rqt.d.ts +33 -0
- package/dist/stage.cjs +22 -12
- package/dist/stage.cjs.map +1 -1
- package/dist/stage.d.ts +2 -14
- package/dist/stage.js +22 -12
- package/dist/stage.js.map +1 -1
- package/dist/target-CZ7elwmj.d.ts +14 -0
- package/dist/wikispine.cjs +14 -10
- package/dist/wikispine.cjs.map +1 -1
- package/dist/wikispine.js +14 -10
- package/dist/wikispine.js.map +1 -1
- package/dist/worker.cjs +295 -25
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.ts +28 -5
- package/dist/worker.js +313 -28
- package/dist/worker.js.map +1 -1
- 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
|
|