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/dist/archives.d.ts
CHANGED
|
@@ -1,79 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { W as WikiGraphJobRuntime } from './jobs-
|
|
3
|
-
import {
|
|
1
|
+
import { ChapterEntry, IndexArtifactKind, ReadonlyDocument, WikiGraphProgressCallback, SearchIndexQueryMode, QueryIndexScope, ArchiveFindOptions, ArchiveFindResult, ArchiveCollectionOptions, ArchiveCollectionResult, ArchiveSourceLocatorResult, readSearchIndexCapabilityStatus, rebuildArchiveSearchIndex, ChapterDetails, ChapterStage, setChapterSource, setChapterTitle, ChapterTree, applyChapterTree, ChapterTreeApplyResult, ArchivePage, ArchiveRelatedResult, ArchiveEvidence, ArchivePack, BookMeta } from 'wiki-graph-core';
|
|
2
|
+
import { W as WikiGraphJobRuntime } from './jobs-CRK-DZ40.js';
|
|
3
|
+
import { W as WikiGraphArchiveTarget } from './target-CZ7elwmj.js';
|
|
4
|
+
export { a as WikiGraphArchiveOwnershipError } from './target-CZ7elwmj.js';
|
|
5
|
+
import './default-worker.js';
|
|
6
|
+
import './runtime-config.js';
|
|
7
|
+
import 'zod';
|
|
4
8
|
|
|
5
|
-
interface
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly recommendation: string;
|
|
11
|
-
readonly task?: BuildJobTarget;
|
|
12
|
-
readonly title: string;
|
|
13
|
-
}
|
|
14
|
-
interface WikiGraphArchiveInspectCoverage {
|
|
15
|
-
readonly coveredChapters: number;
|
|
16
|
-
readonly coveredWords: number;
|
|
17
|
-
readonly percent: string;
|
|
18
|
-
readonly totalChapters: number;
|
|
19
|
-
readonly totalWords: number;
|
|
20
|
-
}
|
|
21
|
-
interface WikiGraphArchiveInspectChapterReference {
|
|
22
|
-
readonly chapterId: number;
|
|
23
|
-
readonly locatedUri: string;
|
|
24
|
-
readonly title: string | null;
|
|
25
|
-
readonly uri: string;
|
|
9
|
+
interface WikiGraphArchiveIndexArtifactInspection {
|
|
10
|
+
readonly current: boolean;
|
|
11
|
+
readonly exists: boolean;
|
|
12
|
+
readonly kind: IndexArtifactKind;
|
|
13
|
+
readonly sourceRevision?: number;
|
|
26
14
|
}
|
|
27
|
-
interface
|
|
28
|
-
readonly
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
readonly
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
37
|
-
readonly planned: number;
|
|
38
|
-
readonly total: number;
|
|
15
|
+
interface WikiGraphArchiveChapterInspection {
|
|
16
|
+
readonly capabilities: {
|
|
17
|
+
readonly knowledgeGraph: {
|
|
18
|
+
readonly completed: boolean;
|
|
19
|
+
};
|
|
20
|
+
readonly readingGraph: {
|
|
21
|
+
readonly completed: boolean;
|
|
22
|
+
};
|
|
23
|
+
readonly readingSummary: {
|
|
24
|
+
readonly completed: boolean;
|
|
39
25
|
};
|
|
40
|
-
readonly sourceWords: number;
|
|
41
|
-
readonly summaryWords: number;
|
|
42
26
|
};
|
|
27
|
+
readonly chapter: ChapterEntry;
|
|
28
|
+
readonly indexes: {
|
|
29
|
+
readonly fts: WikiGraphArchiveIndexArtifactInspection;
|
|
30
|
+
readonly sourceEmbedding: WikiGraphArchiveIndexArtifactInspection;
|
|
31
|
+
readonly summaryEmbedding: WikiGraphArchiveIndexArtifactInspection;
|
|
32
|
+
};
|
|
33
|
+
readonly revision: number;
|
|
34
|
+
readonly summaryWords: number;
|
|
35
|
+
}
|
|
36
|
+
interface WikiGraphArchiveInspection {
|
|
37
|
+
readonly archiveUri: string;
|
|
38
|
+
readonly chapters: readonly WikiGraphArchiveChapterInspection[];
|
|
43
39
|
readonly localIndexCache: {
|
|
44
|
-
readonly blockedBy?: "missing-search-artifacts";
|
|
45
40
|
readonly current: boolean;
|
|
46
|
-
readonly impact?: string;
|
|
47
|
-
readonly resource?: string;
|
|
48
|
-
readonly status: "blocked" | "current" | "missing-or-outdated";
|
|
49
|
-
readonly syncAvailable: boolean;
|
|
50
|
-
};
|
|
51
|
-
readonly coverage: {
|
|
52
|
-
readonly ftsIndexArtifact: WikiGraphArchiveInspectCoverage;
|
|
53
|
-
readonly knowledgeGraph: WikiGraphArchiveInspectCoverage;
|
|
54
|
-
readonly readingGraph: WikiGraphArchiveInspectCoverage;
|
|
55
|
-
readonly summary: WikiGraphArchiveInspectCoverage;
|
|
56
|
-
readonly summaryEmbeddingIndexArtifact: WikiGraphArchiveInspectCoverage;
|
|
57
|
-
readonly sourceEmbeddingIndexArtifact: WikiGraphArchiveInspectCoverage;
|
|
58
|
-
};
|
|
59
|
-
readonly query: {
|
|
60
|
-
readonly ready: boolean;
|
|
61
41
|
};
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly resource?: string;
|
|
66
|
-
readonly status: "incomplete" | "ready";
|
|
42
|
+
readonly scope: {
|
|
43
|
+
readonly chapterId?: number;
|
|
44
|
+
readonly type: "archive" | "chapter";
|
|
67
45
|
};
|
|
68
|
-
readonly
|
|
69
|
-
readonly improvements: readonly WikiGraphArchiveInspectImprovement[];
|
|
70
|
-
readonly performanceHints: readonly GenerationPerformanceHint[];
|
|
71
|
-
readonly summaryCoverageNote: string;
|
|
46
|
+
readonly uri: string;
|
|
72
47
|
}
|
|
73
|
-
declare function
|
|
48
|
+
declare function inspectWikiGraphArchive(document: ReadonlyDocument, options: {
|
|
74
49
|
readonly archiveUri: string;
|
|
75
50
|
readonly chapterId?: number;
|
|
76
|
-
}): Promise<
|
|
51
|
+
}): Promise<WikiGraphArchiveInspection>;
|
|
77
52
|
|
|
78
53
|
interface WikiGraphOperationOptions {
|
|
79
54
|
readonly signal?: AbortSignal;
|
|
@@ -83,16 +58,6 @@ type SearchIndexProgressEvent = Parameters<NonNullable<Parameters<typeof rebuild
|
|
|
83
58
|
type WikiGraphChapterResetStage = Exclude<ChapterStage, "summarized">;
|
|
84
59
|
type WikiGraphChapterSourceOptions = NonNullable<Parameters<typeof setChapterSource>[3]>;
|
|
85
60
|
type WikiGraphChapterTreeInput = Parameters<typeof applyChapterTree>[1];
|
|
86
|
-
interface WikiGraphArchiveLocation {
|
|
87
|
-
readonly archiveFile: File;
|
|
88
|
-
readonly archiveKey: string;
|
|
89
|
-
readonly archivePath: string;
|
|
90
|
-
readonly indexScope: QueryIndexScope;
|
|
91
|
-
readonly libraryArchiveTarget?: ParsedWikiGraphLibraryUri;
|
|
92
|
-
readonly libraryDirtyTarget?: ParsedWikiGraphLibraryUri;
|
|
93
|
-
readonly locatedUri: string;
|
|
94
|
-
readonly publicArchiveUri?: string;
|
|
95
|
-
}
|
|
96
61
|
interface WikiGraphArchiveCreateOptions extends WikiGraphOperationOptions {
|
|
97
62
|
readonly importPath?: string;
|
|
98
63
|
readonly onProgress?: WikiGraphProgressCallback;
|
|
@@ -166,6 +131,7 @@ interface WikiGraphArchiveRelatedOptions extends WikiGraphOperationOptions {
|
|
|
166
131
|
readonly limit?: number;
|
|
167
132
|
readonly order?: "doc-asc" | "doc-desc";
|
|
168
133
|
readonly query?: string;
|
|
134
|
+
readonly queryMode?: SearchIndexQueryMode;
|
|
169
135
|
readonly role?: "any" | "object" | "self" | "subject";
|
|
170
136
|
readonly skipUnindexed?: boolean;
|
|
171
137
|
readonly sourceContext?: number;
|
|
@@ -175,6 +141,7 @@ interface WikiGraphArchiveEvidenceOptions extends WikiGraphOperationOptions {
|
|
|
175
141
|
readonly limit?: number;
|
|
176
142
|
readonly order?: "doc-asc" | "doc-desc";
|
|
177
143
|
readonly query?: string;
|
|
144
|
+
readonly queryMode?: SearchIndexQueryMode;
|
|
178
145
|
readonly skipUnindexed?: boolean;
|
|
179
146
|
readonly sourceContext?: number;
|
|
180
147
|
}
|
|
@@ -186,19 +153,20 @@ declare class WikiGraphArchiveManager {
|
|
|
186
153
|
#private;
|
|
187
154
|
constructor(runtime: WikiGraphJobRuntime);
|
|
188
155
|
create(options: WikiGraphArchiveCreateOptions): Promise<WikiGraphArchiveCreateResult>;
|
|
189
|
-
open(
|
|
156
|
+
open(target: WikiGraphArchiveTarget, options?: WikiGraphOperationOptions): Promise<WikiGraphArchiveHandle>;
|
|
190
157
|
}
|
|
191
158
|
declare class WikiGraphArchiveHandle {
|
|
192
159
|
#private;
|
|
193
|
-
constructor(runtime: WikiGraphJobRuntime, location:
|
|
160
|
+
constructor(runtime: WikiGraphJobRuntime, location: unknown);
|
|
194
161
|
get archiveKey(): string;
|
|
195
162
|
get indexScope(): QueryIndexScope;
|
|
196
163
|
get locatedUri(): string;
|
|
197
164
|
get objectUri(): string;
|
|
198
165
|
get path(): string;
|
|
166
|
+
get target(): WikiGraphArchiveTarget;
|
|
199
167
|
inspect(options?: WikiGraphOperationOptions & {
|
|
200
168
|
readonly chapterId?: number;
|
|
201
|
-
}): Promise<
|
|
169
|
+
}): Promise<WikiGraphArchiveInspection>;
|
|
202
170
|
search(query: string, options?: WikiGraphArchiveSearchOptions): Promise<ArchiveFindResult>;
|
|
203
171
|
list(options?: WikiGraphArchiveListOptions): Promise<ArchiveCollectionResult | ArchiveSourceLocatorResult>;
|
|
204
172
|
ensureSearchIndex(options?: WikiGraphArchiveScopeOptions & WikiGraphOperationOptions): Promise<void>;
|
|
@@ -237,6 +205,7 @@ declare class WikiGraphArchiveHandle {
|
|
|
237
205
|
getMetadata(objectPath: string, options?: WikiGraphOperationOptions): Promise<Readonly<Record<string, unknown>>>;
|
|
238
206
|
readBookMeta(options?: WikiGraphOperationOptions): Promise<BookMeta | undefined>;
|
|
239
207
|
replaceBookMeta(meta: BookMeta, options?: WikiGraphArchiveWriteOptions): Promise<BookMeta>;
|
|
208
|
+
setArchiveTitle(title: string | null, options?: WikiGraphArchiveWriteOptions): Promise<string | null>;
|
|
240
209
|
readCover(options?: WikiGraphOperationOptions): Promise<WikiGraphArchiveCover | undefined>;
|
|
241
210
|
replaceMetadata(objectPath: string, value: Readonly<Record<string, unknown>>, options?: WikiGraphArchiveWriteOptions): Promise<Readonly<Record<string, unknown>>>;
|
|
242
211
|
putMetadata(objectPath: string, key: string, value: unknown, options?: WikiGraphArchiveWriteOptions): Promise<Readonly<Record<string, unknown>>>;
|
|
@@ -244,6 +213,5 @@ declare class WikiGraphArchiveHandle {
|
|
|
244
213
|
clearMetadata(objectPath: string, options?: WikiGraphArchiveWriteOptions): Promise<Readonly<Record<string, unknown>>>;
|
|
245
214
|
resolveScope(options?: WikiGraphArchiveScopeOptions & WikiGraphOperationOptions): Promise<WikiGraphArchiveScope | undefined>;
|
|
246
215
|
}
|
|
247
|
-
declare function resolveWikiGraphArchiveLocation(uriOrPath: string): Promise<WikiGraphArchiveLocation>;
|
|
248
216
|
|
|
249
|
-
export { type WikiGraphArchiveCover, type WikiGraphArchiveCreateOptions, type WikiGraphArchiveCreateResult, type WikiGraphArchiveEvidenceOptions, WikiGraphArchiveExistsError, WikiGraphArchiveHandle, type
|
|
217
|
+
export { type WikiGraphArchiveChapterInspection, type WikiGraphArchiveCover, type WikiGraphArchiveCreateOptions, type WikiGraphArchiveCreateResult, type WikiGraphArchiveEvidenceOptions, WikiGraphArchiveExistsError, WikiGraphArchiveHandle, type WikiGraphArchiveIndexArtifactInspection, type WikiGraphArchiveIndexStatus, type WikiGraphArchiveIndexSyncOptions, type WikiGraphArchiveInspection, type WikiGraphArchiveListOptions, WikiGraphArchiveManager, type WikiGraphArchivePageOptions, type WikiGraphArchiveRelatedOptions, type WikiGraphArchiveScope, type WikiGraphArchiveScopeOptions, type WikiGraphArchiveSearchOptions, WikiGraphArchiveTarget, type WikiGraphArchiveWriteOptions, type WikiGraphChapterArtifactStatus, type WikiGraphChapterMoveOptions, type WikiGraphChapterResetStage, type WikiGraphChapterSourceOptions, type WikiGraphChapterTreeInput, type WikiGraphOperationOptions, inspectWikiGraphArchive };
|