wiki-graph-sdk 0.7.0 → 0.8.0

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.
@@ -1,79 +1,51 @@
1
- import { BuildJobTarget, ReadonlyDocument, WikiGraphProgressCallback, File, QueryIndexScope, ParsedWikiGraphLibraryUri, ArchiveFindOptions, ArchiveFindResult, ArchiveCollectionOptions, ArchiveCollectionResult, ArchiveSourceLocatorResult, readSearchIndexCapabilityStatus, rebuildArchiveSearchIndex, ChapterEntry, ChapterDetails, IndexArtifactKind, ChapterStage, setChapterSource, setChapterTitle, ChapterTree, applyChapterTree, ChapterTreeApplyResult, ArchivePage, ArchiveRelatedResult, ArchiveEvidence, ArchivePack, BookMeta } from 'wiki-graph-core';
2
- import { W as WikiGraphJobRuntime } from './jobs-Dd5PMSId.js';
3
- import { GenerationPlanningCost, GenerationPerformanceHint } from './planning.js';
1
+ import { ChapterEntry, IndexArtifactKind, ReadonlyDocument, WikiGraphProgressCallback, 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-xIm_kshM.js';
3
+ import { W as WikiGraphArchiveTarget } from './target-CZ7elwmj.js';
4
+ export { a as WikiGraphArchiveOwnershipError } from './target-CZ7elwmj.js';
4
5
 
5
- interface WikiGraphArchiveInspectImprovement {
6
- readonly kind: "add-source" | "build" | "sync-index";
7
- readonly missingChapters?: number;
8
- readonly missingWords?: number;
9
- readonly planning?: GenerationPlanningCost;
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;
6
+ interface WikiGraphArchiveIndexArtifactInspection {
7
+ readonly current: boolean;
8
+ readonly exists: boolean;
9
+ readonly kind: IndexArtifactKind;
10
+ readonly sourceRevision?: number;
26
11
  }
27
- interface WikiGraphArchiveInspectReport {
28
- readonly archiveUri: string;
29
- readonly uri: string;
30
- readonly scope: {
31
- readonly chapterId?: number;
32
- readonly type: "archive" | "chapter";
33
- };
34
- readonly content: {
35
- readonly chapters: {
36
- readonly content: number;
37
- readonly planned: number;
38
- readonly total: number;
12
+ interface WikiGraphArchiveChapterInspection {
13
+ readonly capabilities: {
14
+ readonly knowledgeGraph: {
15
+ readonly completed: boolean;
16
+ };
17
+ readonly readingGraph: {
18
+ readonly completed: boolean;
19
+ };
20
+ readonly readingSummary: {
21
+ readonly completed: boolean;
39
22
  };
40
- readonly sourceWords: number;
41
- readonly summaryWords: number;
42
23
  };
24
+ readonly chapter: ChapterEntry;
25
+ readonly indexes: {
26
+ readonly fts: WikiGraphArchiveIndexArtifactInspection;
27
+ readonly sourceEmbedding: WikiGraphArchiveIndexArtifactInspection;
28
+ readonly summaryEmbedding: WikiGraphArchiveIndexArtifactInspection;
29
+ };
30
+ readonly revision: number;
31
+ readonly summaryWords: number;
32
+ }
33
+ interface WikiGraphArchiveInspection {
34
+ readonly archiveUri: string;
35
+ readonly chapters: readonly WikiGraphArchiveChapterInspection[];
43
36
  readonly localIndexCache: {
44
- readonly blockedBy?: "missing-search-artifacts";
45
37
  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
38
  };
62
- readonly searchArtifacts: {
63
- readonly blockedChapters: readonly WikiGraphArchiveInspectChapterReference[];
64
- readonly ready: boolean;
65
- readonly resource?: string;
66
- readonly status: "incomplete" | "ready";
39
+ readonly scope: {
40
+ readonly chapterId?: number;
41
+ readonly type: "archive" | "chapter";
67
42
  };
68
- readonly retrievalGuidance: readonly string[];
69
- readonly improvements: readonly WikiGraphArchiveInspectImprovement[];
70
- readonly performanceHints: readonly GenerationPerformanceHint[];
71
- readonly summaryCoverageNote: string;
43
+ readonly uri: string;
72
44
  }
73
- declare function createWikiGraphArchiveInspectReport(document: ReadonlyDocument, options: {
45
+ declare function inspectWikiGraphArchive(document: ReadonlyDocument, options: {
74
46
  readonly archiveUri: string;
75
47
  readonly chapterId?: number;
76
- }): Promise<WikiGraphArchiveInspectReport>;
48
+ }): Promise<WikiGraphArchiveInspection>;
77
49
 
78
50
  interface WikiGraphOperationOptions {
79
51
  readonly signal?: AbortSignal;
@@ -83,16 +55,6 @@ type SearchIndexProgressEvent = Parameters<NonNullable<Parameters<typeof rebuild
83
55
  type WikiGraphChapterResetStage = Exclude<ChapterStage, "summarized">;
84
56
  type WikiGraphChapterSourceOptions = NonNullable<Parameters<typeof setChapterSource>[3]>;
85
57
  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
58
  interface WikiGraphArchiveCreateOptions extends WikiGraphOperationOptions {
97
59
  readonly importPath?: string;
98
60
  readonly onProgress?: WikiGraphProgressCallback;
@@ -186,19 +148,20 @@ declare class WikiGraphArchiveManager {
186
148
  #private;
187
149
  constructor(runtime: WikiGraphJobRuntime);
188
150
  create(options: WikiGraphArchiveCreateOptions): Promise<WikiGraphArchiveCreateResult>;
189
- open(uriOrPath: string, options?: WikiGraphOperationOptions): Promise<WikiGraphArchiveHandle>;
151
+ open(target: WikiGraphArchiveTarget, options?: WikiGraphOperationOptions): Promise<WikiGraphArchiveHandle>;
190
152
  }
191
153
  declare class WikiGraphArchiveHandle {
192
154
  #private;
193
- constructor(runtime: WikiGraphJobRuntime, location: WikiGraphArchiveLocation);
155
+ constructor(runtime: WikiGraphJobRuntime, location: unknown);
194
156
  get archiveKey(): string;
195
157
  get indexScope(): QueryIndexScope;
196
158
  get locatedUri(): string;
197
159
  get objectUri(): string;
198
160
  get path(): string;
161
+ get target(): WikiGraphArchiveTarget;
199
162
  inspect(options?: WikiGraphOperationOptions & {
200
163
  readonly chapterId?: number;
201
- }): Promise<WikiGraphArchiveInspectReport>;
164
+ }): Promise<WikiGraphArchiveInspection>;
202
165
  search(query: string, options?: WikiGraphArchiveSearchOptions): Promise<ArchiveFindResult>;
203
166
  list(options?: WikiGraphArchiveListOptions): Promise<ArchiveCollectionResult | ArchiveSourceLocatorResult>;
204
167
  ensureSearchIndex(options?: WikiGraphArchiveScopeOptions & WikiGraphOperationOptions): Promise<void>;
@@ -244,6 +207,5 @@ declare class WikiGraphArchiveHandle {
244
207
  clearMetadata(objectPath: string, options?: WikiGraphArchiveWriteOptions): Promise<Readonly<Record<string, unknown>>>;
245
208
  resolveScope(options?: WikiGraphArchiveScopeOptions & WikiGraphOperationOptions): Promise<WikiGraphArchiveScope | undefined>;
246
209
  }
247
- declare function resolveWikiGraphArchiveLocation(uriOrPath: string): Promise<WikiGraphArchiveLocation>;
248
210
 
249
- export { type WikiGraphArchiveCover, type WikiGraphArchiveCreateOptions, type WikiGraphArchiveCreateResult, type WikiGraphArchiveEvidenceOptions, WikiGraphArchiveExistsError, WikiGraphArchiveHandle, type WikiGraphArchiveIndexStatus, type WikiGraphArchiveIndexSyncOptions, type WikiGraphArchiveInspectChapterReference, type WikiGraphArchiveInspectCoverage, type WikiGraphArchiveInspectImprovement, type WikiGraphArchiveInspectReport, type WikiGraphArchiveListOptions, type WikiGraphArchiveLocation, WikiGraphArchiveManager, type WikiGraphArchivePageOptions, type WikiGraphArchiveRelatedOptions, type WikiGraphArchiveScope, type WikiGraphArchiveScopeOptions, type WikiGraphArchiveSearchOptions, type WikiGraphArchiveWriteOptions, type WikiGraphChapterArtifactStatus, type WikiGraphChapterMoveOptions, type WikiGraphChapterResetStage, type WikiGraphChapterSourceOptions, type WikiGraphChapterTreeInput, type WikiGraphOperationOptions, createWikiGraphArchiveInspectReport, resolveWikiGraphArchiveLocation };
211
+ 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 };