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.
- package/README.md +16 -0
- package/dist/archives.cjs +470 -642
- package/dist/archives.cjs.map +1 -1
- package/dist/archives.d.ts +42 -80
- package/dist/archives.js +405 -570
- package/dist/archives.js.map +1 -1
- package/dist/conversions.cjs +223 -27
- package/dist/conversions.cjs.map +1 -1
- package/dist/conversions.d.ts +16 -4
- package/dist/conversions.js +228 -23
- package/dist/conversions.js.map +1 -1
- package/dist/default-worker.cjs +293 -55
- package/dist/default-worker.cjs.map +1 -1
- package/dist/default-worker.js +309 -54
- package/dist/default-worker.js.map +1 -1
- package/dist/index.cjs +1044 -923
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +36 -19
- package/dist/index.js +915 -780
- package/dist/index.js.map +1 -1
- package/dist/{jobs-Dd5PMSId.d.ts → jobs-xIm_kshM.d.ts} +22 -14
- package/dist/maintenance.cjs +138 -29
- package/dist/maintenance.cjs.map +1 -1
- package/dist/maintenance.d.ts +2 -1
- package/dist/maintenance.js +143 -25
- package/dist/maintenance.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 +328 -22
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.d.ts +43 -4
- package/dist/worker.js +348 -27
- package/dist/worker.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { WikiGraphArchiveManager } from './archives.js';
|
|
2
|
-
export { WikiGraphArchiveCover, WikiGraphArchiveCreateOptions, WikiGraphArchiveCreateResult, WikiGraphArchiveEvidenceOptions, WikiGraphArchiveExistsError, WikiGraphArchiveHandle, WikiGraphArchiveIndexStatus, WikiGraphArchiveIndexSyncOptions,
|
|
2
|
+
export { WikiGraphArchiveChapterInspection, WikiGraphArchiveCover, WikiGraphArchiveCreateOptions, WikiGraphArchiveCreateResult, WikiGraphArchiveEvidenceOptions, WikiGraphArchiveExistsError, WikiGraphArchiveHandle, WikiGraphArchiveIndexArtifactInspection, WikiGraphArchiveIndexStatus, WikiGraphArchiveIndexSyncOptions, WikiGraphArchiveInspection, WikiGraphArchiveListOptions, WikiGraphArchivePageOptions, WikiGraphArchiveRelatedOptions, WikiGraphArchiveScope, WikiGraphArchiveScopeOptions, WikiGraphArchiveSearchOptions, WikiGraphArchiveWriteOptions, WikiGraphChapterArtifactStatus, WikiGraphChapterMoveOptions, WikiGraphChapterResetStage, WikiGraphChapterSourceOptions, WikiGraphChapterTreeInput, WikiGraphOperationOptions, inspectWikiGraphArchive } from './archives.js';
|
|
3
|
+
import { W as WikiGraphArchiveTarget } from './target-CZ7elwmj.js';
|
|
4
|
+
export { a as WikiGraphArchiveOwnershipError } from './target-CZ7elwmj.js';
|
|
3
5
|
import { LocalConfigSection, LocalConfigObject } from './local-config.js';
|
|
4
6
|
export { LOCAL_CONFIG_SECTIONS, clearLocalConfigSection, deleteLocalConfigValue, maskLocalConfigSection, normalizeLocalConfigKey, parseLocalConfigSection, putLocalConfigValue, readLocalConfigSection, replaceLocalConfigSection, validateLocalConfigSection } from './local-config.js';
|
|
5
|
-
import { W as WikiGraphJobRuntime, a as WikiGraphJobManager } from './jobs-
|
|
6
|
-
export { b as WikiGraphJob, c as WikiGraphJobBackend, d as WikiGraphJobChapterReference, e as WikiGraphJobCreateOptions, f as WikiGraphJobEnqueueOptions, g as WikiGraphJobEnqueuePlan, h as WikiGraphJobEnqueueResult, i as WikiGraphJobEventListener, j as WikiGraphJobEventsOptions, k as WikiGraphJobListOptions, l as WikiGraphJobSubscriptionOptions } from './jobs-
|
|
7
|
-
import { ContinuationCursor, QueryIndexScope, ArchiveSourceLocatorResult, ArchiveCollectionResult, ArchiveFindResult, ArchiveEvidence, ArchiveRelatedResult, WikiGraphLibraryRecord, WikiGraphLibraryArchiveRecord,
|
|
8
|
-
export { ArchiveBacklinkBucket, ArchiveBacklinks, ArchiveCollectionOptions, ArchiveCollectionResult, ArchiveEvidence, ArchiveEvidenceItem, ArchiveFindEvidencePreview, ArchiveFindHit, ArchiveFindOptions, ArchiveFindResult, ArchiveListItem, ArchivePack, ArchivePage, ArchiveRelatedResult, ArchiveSourceLocator, ArchiveSourceLocatorResult, ArchiveTriplePattern, BookMeta,
|
|
7
|
+
import { W as WikiGraphJobRuntime, a as WikiGraphJobManager } from './jobs-xIm_kshM.js';
|
|
8
|
+
export { b as WikiGraphJob, c as WikiGraphJobBackend, d as WikiGraphJobChapterReference, e as WikiGraphJobCreateOptions, f as WikiGraphJobEnqueueOptions, g as WikiGraphJobEnqueuePlan, h as WikiGraphJobEnqueueResult, i as WikiGraphJobEventListener, j as WikiGraphJobEventsOptions, k as WikiGraphJobListOptions, l as WikiGraphJobSnapshot, m as WikiGraphJobSubscriptionOptions } from './jobs-xIm_kshM.js';
|
|
9
|
+
import { ContinuationCursor, QueryIndexScope, ArchiveSourceLocatorResult, ArchiveCollectionResult, ArchiveFindResult, ArchiveEvidence, ArchiveRelatedResult, WikiGraphLibraryRecord, WikiGraphLibraryArchiveRecord, ParsedWikiGraphLibraryUri, WikiGraphLibraryIndexState, rebuildWikiGraphLibraryIndex, ArchiveFindOptions, ArchiveCollectionOptions, readWikiGraphLibraryPage, ArchivePage, listRelatedWikiGraphLibraryObjects, listWikiGraphLibraryEvidence, ArchivePack } from 'wiki-graph-core';
|
|
10
|
+
export { ArchiveBacklinkBucket, ArchiveBacklinks, ArchiveCollectionOptions, ArchiveCollectionResult, ArchiveEvidence, ArchiveEvidenceItem, ArchiveFindEvidencePreview, ArchiveFindHit, ArchiveFindOptions, ArchiveFindResult, ArchiveListItem, ArchivePack, ArchivePage, ArchiveRelatedResult, ArchiveSourceLocator, ArchiveSourceLocatorResult, ArchiveTriplePattern, BookMeta, BuildJobEvent, BuildJobProgressCounter, BuildJobTarget, ChapterDetails, ChapterEntry, ChapterStage, ChapterTree, ChapterTreeApplyResult, ContinuationCursor, DEFAULT_EXTRACTION_PROMPT, DEFAULT_KNOWLEDGE_GRAPH_RECALL_PROMPT, IndexArtifactKind, LLMPaymentRequiredError, LocatedWikiGraphUri, ParsedWikiGraphLibraryUri, QueryIndexScope, SearchIndexEmbeddingProvider, SourceArtifactInput, WIKI_GRAPH_URI_PREFIX, WikiGraphError, WikiGraphLLMOptions, WikiGraphLibraryIndexState, WikiGraphMaintenanceUpgradeResult, WikiGraphProgressCallback, WikiGraphProgressEvent, WikispineProvider, formatError, formatLocatedChapterResourceUri, formatLocatedChapterSourceCollectionUri, formatLocatedChapterUri, formatLocatedWikiGraphUri, formatWikiGraphCommandUri, formatWikiGraphLibraryUri, isSourceLocatorScopeUri, isWikiGraphLibraryUri, parseChapterPath, parseChapterTreeInput, parseChapterUriPath, parseLocatedWikiGraphUri, parseSourceTextJsonl, parseWikiGraphLibraryUri, parseWikiGraphUriSyntax, resolveExtractionPrompt, resolveKnowledgeGraphRecallPrompt } from 'wiki-graph-core';
|
|
9
11
|
import { WikiGraphConversionManager } from './conversions.js';
|
|
10
12
|
export { WikiGraphConversionFormat, WikiGraphConversionInput, WikiGraphConversionOptions, WikiGraphConversionResult, WikiGraphSourceFormat } from './conversions.js';
|
|
11
13
|
export { WikiGraphQueueWorkerOptions, requireKnowledgeGraphWikispineConfig, runWikiGraphQueueWorker } from './default-worker.js';
|
|
@@ -55,7 +57,7 @@ declare class WikiGraphConfigManager {
|
|
|
55
57
|
|
|
56
58
|
interface WikiGraphContinuationOptions {
|
|
57
59
|
/** Optional archive locator used to verify that the cursor belongs to it. */
|
|
58
|
-
readonly archive?:
|
|
60
|
+
readonly archive?: WikiGraphArchiveTarget;
|
|
59
61
|
readonly cursor: string;
|
|
60
62
|
readonly format?: ContinuationCursor["format"];
|
|
61
63
|
readonly limit?: number;
|
|
@@ -125,7 +127,9 @@ declare class WikiGraphContinuationManager {
|
|
|
125
127
|
|
|
126
128
|
type WikiGraphLibraryTarget = ParsedWikiGraphLibraryUri | string;
|
|
127
129
|
type WikiGraphLibrarySearchOptions = Omit<ArchiveFindOptions, "embeddingProvider">;
|
|
128
|
-
type WikiGraphLibraryPageOptions = Omit<Parameters<typeof readWikiGraphLibraryPage>[2], "wikimediaResolver"
|
|
130
|
+
type WikiGraphLibraryPageOptions = Omit<Parameters<typeof readWikiGraphLibraryPage>[2], "wikimediaResolver"> & {
|
|
131
|
+
readonly signal?: AbortSignal;
|
|
132
|
+
};
|
|
129
133
|
interface WikiGraphLibraryAddArchiveOptions {
|
|
130
134
|
readonly inputPath: string;
|
|
131
135
|
readonly target: WikiGraphLibraryTarget;
|
|
@@ -135,19 +139,32 @@ interface WikiGraphLibraryMoveArchiveOptions {
|
|
|
135
139
|
readonly target: WikiGraphLibraryTarget;
|
|
136
140
|
readonly to: string;
|
|
137
141
|
}
|
|
142
|
+
interface WikiGraphLibraryReplaceArchiveOptions {
|
|
143
|
+
readonly inputPath: string;
|
|
144
|
+
readonly target: WikiGraphLibraryTarget;
|
|
145
|
+
}
|
|
146
|
+
interface WikiGraphLibrarySnapshot extends Omit<WikiGraphLibraryRecord, "folder" | "staging"> {
|
|
147
|
+
readonly folderPath: string;
|
|
148
|
+
}
|
|
149
|
+
type WikiGraphLibraryArchiveSnapshot = Omit<WikiGraphLibraryArchiveRecord, "file">;
|
|
150
|
+
interface WikiGraphLibraryScanSnapshot {
|
|
151
|
+
readonly archives: readonly WikiGraphLibraryArchiveSnapshot[];
|
|
152
|
+
readonly library?: WikiGraphLibrarySnapshot;
|
|
153
|
+
}
|
|
138
154
|
declare class WikiGraphLibraryManager {
|
|
139
155
|
#private;
|
|
140
156
|
constructor(runtime: WikiGraphJobRuntime);
|
|
141
157
|
create(folder: string): Promise<WikiGraphLibrary>;
|
|
142
158
|
get(uri?: string): Promise<WikiGraphLibrary>;
|
|
143
|
-
addArchive(options: WikiGraphLibraryAddArchiveOptions): Promise<
|
|
159
|
+
addArchive(options: WikiGraphLibraryAddArchiveOptions): Promise<WikiGraphLibraryArchiveSnapshot>;
|
|
144
160
|
assertCurrent(target: WikiGraphLibraryTarget): Promise<void>;
|
|
145
|
-
rebind(target: WikiGraphLibraryTarget, folder: string): Promise<
|
|
146
|
-
remove(target: WikiGraphLibraryTarget): Promise<
|
|
147
|
-
scan(target: WikiGraphLibraryTarget): Promise<
|
|
148
|
-
getArchive(target: WikiGraphLibraryTarget): Promise<
|
|
149
|
-
moveArchive(options: WikiGraphLibraryMoveArchiveOptions): Promise<
|
|
150
|
-
removeArchive(target: WikiGraphLibraryTarget): Promise<
|
|
161
|
+
rebind(target: WikiGraphLibraryTarget, folder: string): Promise<WikiGraphLibraryScanSnapshot>;
|
|
162
|
+
remove(target: WikiGraphLibraryTarget): Promise<WikiGraphLibrarySnapshot>;
|
|
163
|
+
scan(target: WikiGraphLibraryTarget): Promise<WikiGraphLibraryScanSnapshot>;
|
|
164
|
+
getArchive(target: WikiGraphLibraryTarget): Promise<WikiGraphLibraryArchiveSnapshot>;
|
|
165
|
+
moveArchive(options: WikiGraphLibraryMoveArchiveOptions): Promise<WikiGraphLibraryArchiveSnapshot>;
|
|
166
|
+
removeArchive(target: WikiGraphLibraryTarget): Promise<WikiGraphLibraryArchiveSnapshot>;
|
|
167
|
+
replaceArchive(options: WikiGraphLibraryReplaceArchiveOptions): Promise<WikiGraphLibraryArchiveSnapshot>;
|
|
151
168
|
indexState(target: WikiGraphLibraryTarget): Promise<WikiGraphLibraryIndexState>;
|
|
152
169
|
rebuildIndex(target: WikiGraphLibraryTarget, onProgress?: Parameters<typeof rebuildWikiGraphLibraryIndex>[1]): Promise<WikiGraphLibraryIndexState>;
|
|
153
170
|
cleanIndex(target: WikiGraphLibraryTarget): Promise<WikiGraphLibraryIndexState>;
|
|
@@ -169,11 +186,11 @@ declare class WikiGraphLibraryManager {
|
|
|
169
186
|
declare class WikiGraphLibrary {
|
|
170
187
|
#private;
|
|
171
188
|
constructor(runtime: WikiGraphJobRuntime, record: WikiGraphLibraryRecord);
|
|
172
|
-
get snapshot():
|
|
189
|
+
get snapshot(): WikiGraphLibrarySnapshot;
|
|
173
190
|
get uri(): string;
|
|
174
|
-
archives(): Promise<readonly
|
|
175
|
-
scan(): Promise<
|
|
176
|
-
remove(): Promise<
|
|
191
|
+
archives(): Promise<readonly WikiGraphLibraryArchiveSnapshot[]>;
|
|
192
|
+
scan(): Promise<WikiGraphLibraryScanSnapshot>;
|
|
193
|
+
remove(): Promise<WikiGraphLibrarySnapshot>;
|
|
177
194
|
}
|
|
178
195
|
|
|
179
196
|
type WikiGraphSDKEnvPolicy = "development" | "production";
|
|
@@ -210,4 +227,4 @@ declare class WikiGraphSDK implements WikiGraphJobRuntime {
|
|
|
210
227
|
}
|
|
211
228
|
declare function createWikiGraphSDK(options?: WikiGraphSDKOptions): WikiGraphSDK;
|
|
212
229
|
|
|
213
|
-
export { LocalConfigObject, LocalConfigSection, WikiGraphArchiveManager, WikiGraphConfigManager, type WikiGraphContinuationContext, WikiGraphContinuationManager, type WikiGraphContinuationOptions, type WikiGraphContinuationPage, WikiGraphConversionManager, WikiGraphJobManager, WikiGraphJobRuntime, WikiGraphLibrary, type WikiGraphLibraryAddArchiveOptions, WikiGraphLibraryManager, type WikiGraphLibraryMoveArchiveOptions, type WikiGraphLibraryPageOptions, type WikiGraphLibrarySearchOptions, type WikiGraphLibraryTarget, WikiGraphMaintenanceManager, type WikiGraphProviderTestResult, WikiGraphSDK, type WikiGraphSDKEnvPolicy, type WikiGraphSDKOptions, type WikiGraphSDKRuntimeContext, createWikiGraphSDK, getWikiGraphSDKRuntimeContext, getWikiGraphSDKStateDir, withWikiGraphSDKRuntimeContext };
|
|
230
|
+
export { LocalConfigObject, LocalConfigSection, WikiGraphArchiveManager, WikiGraphArchiveTarget, WikiGraphConfigManager, type WikiGraphContinuationContext, WikiGraphContinuationManager, type WikiGraphContinuationOptions, type WikiGraphContinuationPage, WikiGraphConversionManager, WikiGraphJobManager, WikiGraphJobRuntime, WikiGraphLibrary, type WikiGraphLibraryAddArchiveOptions, type WikiGraphLibraryArchiveSnapshot, WikiGraphLibraryManager, type WikiGraphLibraryMoveArchiveOptions, type WikiGraphLibraryPageOptions, type WikiGraphLibraryReplaceArchiveOptions, type WikiGraphLibraryScanSnapshot, type WikiGraphLibrarySearchOptions, type WikiGraphLibrarySnapshot, type WikiGraphLibraryTarget, WikiGraphMaintenanceManager, type WikiGraphProviderTestResult, WikiGraphSDK, type WikiGraphSDKEnvPolicy, type WikiGraphSDKOptions, type WikiGraphSDKRuntimeContext, createWikiGraphSDK, getWikiGraphSDKRuntimeContext, getWikiGraphSDKStateDir, withWikiGraphSDKRuntimeContext };
|