@ontos-ai/knowhere-sdk 2.6.0-beta.20261026180803 → 2.6.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.
@@ -858,7 +858,9 @@ async function syncRemoteResultArchive(params) {
858
858
  const signal = params.signal ? AbortSignal.any([params.signal, controller.signal]) : controller.signal;
859
859
  const transferParams = { ...params, signal };
860
860
  const previous = await params.storage.readSyncProgress(params);
861
- const source = await openArchive(transferParams, previous);
861
+ const openedSource = await openArchive(transferParams, previous);
862
+ const source = !openedSource.canSkipEntries && previous?.archiveIdentity && previous.archiveDownloadIdentity === openedSource.downloadIdentity ? { ...openedSource, identity: previous.archiveIdentity } : openedSource;
863
+ const archiveDownloadIdentity = source.isCached ? source.downloadIdentity : previous?.archiveDownloadIdentity;
862
864
  const concurrency = source.canSkipEntries ? params.limits?.maxConcurrentFiles ?? 1 : 1;
863
865
  const nextEntry = previous?.status === "completed" ? 0 : previous?.nextArchiveEntry ?? 0;
864
866
  const entryHashes = [];
@@ -885,6 +887,7 @@ async function syncRemoteResultArchive(params) {
885
887
  revisionKey: params.revisionKey,
886
888
  pinnedRevisionKey: params.revisionKey,
887
889
  archiveIdentity: source.identity,
890
+ archiveDownloadIdentity,
888
891
  archiveCacheBypassed,
889
892
  archiveEntryHashes: entryHashes.slice(0, contiguousEntry),
890
893
  nextArchiveEntry: contiguousEntry,
@@ -978,6 +981,7 @@ async function syncRemoteResultArchive(params) {
978
981
  revisionKey: params.revisionKey,
979
982
  pinnedRevisionKey: params.revisionKey,
980
983
  archiveIdentity: source.identity,
984
+ archiveDownloadIdentity,
981
985
  archiveCacheBypassed,
982
986
  archiveEntryHashes: entryHashes,
983
987
  nextArchiveEntry: entryIndex,
@@ -1012,6 +1016,7 @@ async function syncRemoteResultArchive(params) {
1012
1016
  revisionKey: params.revisionKey,
1013
1017
  pinnedRevisionKey: params.revisionKey,
1014
1018
  archiveIdentity: source.identity,
1019
+ archiveDownloadIdentity,
1015
1020
  archiveEntryHashes: entryHashes.slice(0, checkpointEntry),
1016
1021
  nextArchiveEntry: checkpointEntry,
1017
1022
  status: "running",
@@ -1099,6 +1104,7 @@ async function persistArchiveCacheBypass(params, previous) {
1099
1104
  documentId: params.documentId,
1100
1105
  revisionKey: params.revisionKey,
1101
1106
  pinnedRevisionKey: params.revisionKey,
1107
+ archiveDownloadIdentity: previous?.archiveDownloadIdentity,
1102
1108
  archiveCacheBypassed: true,
1103
1109
  status: "running",
1104
1110
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
@@ -1122,7 +1128,7 @@ async function openArchiveTransport(params, previous, prepared) {
1122
1128
  const supportsRange = probe.status === 206 && probe.headers.has("content-range");
1123
1129
  await probe.body?.cancel();
1124
1130
  if (!supportsRange) {
1125
- const { openSequentialArchive } = await import("./sequential-parsed-document-archive-K5SKHBAN.mjs");
1131
+ const { openSequentialArchive } = await import("./sequential-parsed-document-archive-STRFJHEB.mjs");
1126
1132
  const source = await openSequentialArchive(
1127
1133
  { ...params, resultUrl },
1128
1134
  identity,
package/dist/index.d.mts CHANGED
@@ -467,6 +467,8 @@ interface ParsedDocumentSyncProgress {
467
467
  readonly nextChunkPage?: number;
468
468
  readonly pinnedRevisionKey?: string;
469
469
  readonly archiveIdentity?: string;
470
+ /** Strong canonical origin identity retained when a cached archive resumes sequentially. */
471
+ readonly archiveDownloadIdentity?: string;
470
472
  /** Once true, later segments use the origin rather than retrying optional archive caching. */
471
473
  readonly archiveCacheBypassed?: boolean;
472
474
  readonly nextArchiveEntry?: number;
package/dist/index.d.ts CHANGED
@@ -467,6 +467,8 @@ interface ParsedDocumentSyncProgress {
467
467
  readonly nextChunkPage?: number;
468
468
  readonly pinnedRevisionKey?: string;
469
469
  readonly archiveIdentity?: string;
470
+ /** Strong canonical origin identity retained when a cached archive resumes sequentially. */
471
+ readonly archiveDownloadIdentity?: string;
470
472
  /** Once true, later segments use the origin rather than retrying optional archive caching. */
471
473
  readonly archiveCacheBypassed?: boolean;
472
474
  readonly nextArchiveEntry?: number;
package/dist/index.js CHANGED
@@ -1101,7 +1101,9 @@ async function syncRemoteResultArchive(params) {
1101
1101
  const signal = params.signal ? AbortSignal.any([params.signal, controller.signal]) : controller.signal;
1102
1102
  const transferParams = { ...params, signal };
1103
1103
  const previous = await params.storage.readSyncProgress(params);
1104
- const source = await openArchive(transferParams, previous);
1104
+ const openedSource = await openArchive(transferParams, previous);
1105
+ const source = !openedSource.canSkipEntries && previous?.archiveIdentity && previous.archiveDownloadIdentity === openedSource.downloadIdentity ? { ...openedSource, identity: previous.archiveIdentity } : openedSource;
1106
+ const archiveDownloadIdentity = source.isCached ? source.downloadIdentity : previous?.archiveDownloadIdentity;
1105
1107
  const concurrency = source.canSkipEntries ? params.limits?.maxConcurrentFiles ?? 1 : 1;
1106
1108
  const nextEntry = previous?.status === "completed" ? 0 : previous?.nextArchiveEntry ?? 0;
1107
1109
  const entryHashes = [];
@@ -1128,6 +1130,7 @@ async function syncRemoteResultArchive(params) {
1128
1130
  revisionKey: params.revisionKey,
1129
1131
  pinnedRevisionKey: params.revisionKey,
1130
1132
  archiveIdentity: source.identity,
1133
+ archiveDownloadIdentity,
1131
1134
  archiveCacheBypassed,
1132
1135
  archiveEntryHashes: entryHashes.slice(0, contiguousEntry),
1133
1136
  nextArchiveEntry: contiguousEntry,
@@ -1221,6 +1224,7 @@ async function syncRemoteResultArchive(params) {
1221
1224
  revisionKey: params.revisionKey,
1222
1225
  pinnedRevisionKey: params.revisionKey,
1223
1226
  archiveIdentity: source.identity,
1227
+ archiveDownloadIdentity,
1224
1228
  archiveCacheBypassed,
1225
1229
  archiveEntryHashes: entryHashes,
1226
1230
  nextArchiveEntry: entryIndex,
@@ -1255,6 +1259,7 @@ async function syncRemoteResultArchive(params) {
1255
1259
  revisionKey: params.revisionKey,
1256
1260
  pinnedRevisionKey: params.revisionKey,
1257
1261
  archiveIdentity: source.identity,
1262
+ archiveDownloadIdentity,
1258
1263
  archiveEntryHashes: entryHashes.slice(0, checkpointEntry),
1259
1264
  nextArchiveEntry: checkpointEntry,
1260
1265
  status: "running",
@@ -1342,6 +1347,7 @@ async function persistArchiveCacheBypass(params, previous) {
1342
1347
  documentId: params.documentId,
1343
1348
  revisionKey: params.revisionKey,
1344
1349
  pinnedRevisionKey: params.revisionKey,
1350
+ archiveDownloadIdentity: previous?.archiveDownloadIdentity,
1345
1351
  archiveCacheBypassed: true,
1346
1352
  status: "running",
1347
1353
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
package/dist/index.mjs CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  syncParseResultToParsedDocumentStorage,
48
48
  syncRemoteResultArchive,
49
49
  validateArchiveSyncLimits
50
- } from "./chunk-YBE2Z37Q.mjs";
50
+ } from "./chunk-R2NKBUNB.mjs";
51
51
 
52
52
  // src/client.ts
53
53
  import path2 from "path";
@@ -3,7 +3,7 @@ import {
3
3
  createDownloadIdentity,
4
4
  isSnapshotPath,
5
5
  normalizeResultPath
6
- } from "./chunk-YBE2Z37Q.mjs";
6
+ } from "./chunk-R2NKBUNB.mjs";
7
7
 
8
8
  // src/storage/sequential-parsed-document-archive.ts
9
9
  import { Readable, Transform } from "stream";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ontos-ai/knowhere-sdk",
3
- "version": "2.6.0-beta.20261026180803",
3
+ "version": "2.6.0",
4
4
  "description": "Official Node.js SDK for Knowhere document parsing API",
5
5
  "keywords": [
6
6
  "knowhere",