wiki-graph-sdk 0.8.1 → 0.8.2
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 +25 -0
- package/dist/archives.cjs +7 -0
- package/dist/archives.cjs.map +1 -1
- package/dist/archives.d.ts +2 -0
- package/dist/archives.js +8 -0
- package/dist/archives.js.map +1 -1
- package/dist/conversions.cjs.map +1 -1
- package/dist/conversions.js +1 -0
- package/dist/conversions.js.map +1 -1
- package/dist/default-worker.cjs +50 -10
- package/dist/default-worker.cjs.map +1 -1
- package/dist/default-worker.js +54 -10
- package/dist/default-worker.js.map +1 -1
- package/dist/embedding.cjs.map +1 -1
- package/dist/embedding.js +1 -0
- package/dist/embedding.js.map +1 -1
- package/dist/gc.cjs +52 -10
- package/dist/gc.cjs.map +1 -1
- package/dist/gc.d.ts +3 -0
- package/dist/gc.js +56 -10
- package/dist/gc.js.map +1 -1
- package/dist/host-pQiVAKEY.d.ts +10 -0
- package/dist/index.cjs +86 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +90 -12
- package/dist/index.js.map +1 -1
- package/dist/local-config.cjs.map +1 -1
- package/dist/local-config.js +1 -0
- package/dist/local-config.js.map +1 -1
- package/dist/maintenance.cjs.map +1 -1
- package/dist/maintenance.js +1 -0
- package/dist/maintenance.js.map +1 -1
- package/dist/node-platform.cjs +18 -4
- package/dist/node-platform.cjs.map +1 -1
- package/dist/node-platform.d.ts +12 -3
- package/dist/node-platform.js +18 -4
- package/dist/node-platform.js.map +1 -1
- package/dist/runtime-config.cjs.map +1 -1
- package/dist/runtime-config.js +1 -0
- package/dist/runtime-config.js.map +1 -1
- package/dist/stage.cjs.map +1 -1
- package/dist/stage.js +1 -0
- package/dist/stage.js.map +1 -1
- package/dist/worker.cjs +81 -42
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.ts +7 -2
- package/dist/worker.js +85 -42
- package/dist/worker.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -23,6 +23,31 @@ for (const job of jobs) {
|
|
|
23
23
|
wikiGraph.close();
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
Electron and other Node hosts may provide their own lifecycle identity and
|
|
27
|
+
storage layout without importing `wiki-graph-core`:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
createNodeWikiGraphPlatform,
|
|
32
|
+
createNodeWikiGraphStorage,
|
|
33
|
+
createWikiGraphSDK,
|
|
34
|
+
} from "wiki-graph-sdk";
|
|
35
|
+
|
|
36
|
+
const wikiGraph = createWikiGraphSDK({
|
|
37
|
+
host: {
|
|
38
|
+
platform: createNodeWikiGraphPlatform({ lifecycle }),
|
|
39
|
+
storage: createNodeWikiGraphStorage({
|
|
40
|
+
libraryRoot: "/path/to/home",
|
|
41
|
+
documentStoreRoot: "/path/to/documents",
|
|
42
|
+
}),
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Storage is scoped to the SDK instance. Platform services, including lifecycle,
|
|
48
|
+
are process-wide; SDK instances in one process must use one compatible
|
|
49
|
+
platform. `host.storage` and `stateDir` cannot be supplied together.
|
|
50
|
+
|
|
26
51
|
Applications may replace the configured LLM and embedding implementations for
|
|
27
52
|
one SDK instance:
|
|
28
53
|
|
package/dist/archives.cjs
CHANGED
|
@@ -2114,6 +2114,13 @@ var WikiGraphArchiveHandle = class {
|
|
|
2114
2114
|
);
|
|
2115
2115
|
return status;
|
|
2116
2116
|
}
|
|
2117
|
+
/** Clear cached search sessions without changing the archive index. */
|
|
2118
|
+
async clearSearchSessions(options = {}) {
|
|
2119
|
+
await this.#runtime.run(
|
|
2120
|
+
async () => await (0, import_wiki_graph_core7.deleteArchiveSearchSessions)(this.path),
|
|
2121
|
+
options.signal
|
|
2122
|
+
);
|
|
2123
|
+
}
|
|
2117
2124
|
async listChapters(options = {}) {
|
|
2118
2125
|
return await this.#readDocument(
|
|
2119
2126
|
async (document) => await (0, import_wiki_graph_core7.listChapters)(document),
|