@anuma/sdk 9.1.0-next.20261022061528 → 9.1.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/dist/expo/index.cjs +21 -7
- package/dist/expo/index.mjs +21 -7
- package/dist/react/index.cjs +21 -7
- package/dist/react/index.mjs +21 -7
- package/package.json +1 -1
package/dist/expo/index.cjs
CHANGED
|
@@ -23056,6 +23056,9 @@ var RemoteMemoryPartialCreateError = class extends Error {
|
|
|
23056
23056
|
function rejectsInput(error) {
|
|
23057
23057
|
return error instanceof EmbeddingHttpError && error.status !== void 0 && error.status >= 400 && error.status < 500 && error.status !== 429 && !isFatalEmbeddingError(error);
|
|
23058
23058
|
}
|
|
23059
|
+
function rejectsMemoryWrite(error) {
|
|
23060
|
+
return error instanceof RemoteMemoryError && (error.status === 400 || error.status === 422) && (error.code === void 0 || error.code === "unknown_field");
|
|
23061
|
+
}
|
|
23059
23062
|
function warnFailed(failed) {
|
|
23060
23063
|
if (failed.length)
|
|
23061
23064
|
getLogger().warn(
|
|
@@ -23923,7 +23926,7 @@ function createRemoteMemoryStore(options) {
|
|
|
23923
23926
|
}
|
|
23924
23927
|
});
|
|
23925
23928
|
for (const batch of chunks2(writes, MAX_BATCH)) {
|
|
23926
|
-
await serializedAll(
|
|
23929
|
+
const continueRepair = await serializedAll(
|
|
23927
23930
|
batch.map(({ memory }) => memory.memory_id),
|
|
23928
23931
|
async () => {
|
|
23929
23932
|
signal?.throwIfAborted();
|
|
@@ -23938,15 +23941,18 @@ function createRemoteMemoryStore(options) {
|
|
|
23938
23941
|
} catch (error) {
|
|
23939
23942
|
signal?.throwIfAborted();
|
|
23940
23943
|
if (isRemoteWorkLeaseExpired(error)) throw error;
|
|
23941
|
-
if (!(error instanceof RemoteMemoryError && error.code === "version_conflict")) {
|
|
23944
|
+
if (!(error instanceof RemoteMemoryError && error.code === "version_conflict") && !rejectsMemoryWrite(error)) {
|
|
23942
23945
|
result.failed += batch.length;
|
|
23943
|
-
return;
|
|
23946
|
+
return false;
|
|
23944
23947
|
}
|
|
23945
23948
|
if (batch.length === 1) {
|
|
23946
|
-
|
|
23947
|
-
|
|
23949
|
+
if (rejectsMemoryWrite(error)) {
|
|
23950
|
+
unrepairable.add(batch[0].memory.memory_id);
|
|
23951
|
+
result.failed++;
|
|
23952
|
+
} else result.skippedConflict++;
|
|
23953
|
+
return true;
|
|
23948
23954
|
}
|
|
23949
|
-
for (const write of batch) {
|
|
23955
|
+
for (const [index, write] of batch.entries()) {
|
|
23950
23956
|
signal?.throwIfAborted();
|
|
23951
23957
|
try {
|
|
23952
23958
|
await commit([write]);
|
|
@@ -23955,12 +23961,20 @@ function createRemoteMemoryStore(options) {
|
|
|
23955
23961
|
if (isRemoteWorkLeaseExpired(error2)) throw error2;
|
|
23956
23962
|
if (error2 instanceof RemoteMemoryError && error2.code === "version_conflict")
|
|
23957
23963
|
result.skippedConflict++;
|
|
23958
|
-
else
|
|
23964
|
+
else if (rejectsMemoryWrite(error2)) {
|
|
23965
|
+
unrepairable.add(write.memory.memory_id);
|
|
23966
|
+
result.failed++;
|
|
23967
|
+
} else {
|
|
23968
|
+
result.failed += batch.length - index;
|
|
23969
|
+
return false;
|
|
23970
|
+
}
|
|
23959
23971
|
}
|
|
23960
23972
|
}
|
|
23961
23973
|
}
|
|
23974
|
+
return true;
|
|
23962
23975
|
}
|
|
23963
23976
|
);
|
|
23977
|
+
if (!continueRepair) break;
|
|
23964
23978
|
}
|
|
23965
23979
|
return finish();
|
|
23966
23980
|
};
|
package/dist/expo/index.mjs
CHANGED
|
@@ -21380,6 +21380,9 @@ var RemoteMemoryPartialCreateError = class extends Error {
|
|
|
21380
21380
|
function rejectsInput(error) {
|
|
21381
21381
|
return error instanceof EmbeddingHttpError && error.status !== void 0 && error.status >= 400 && error.status < 500 && error.status !== 429 && !isFatalEmbeddingError(error);
|
|
21382
21382
|
}
|
|
21383
|
+
function rejectsMemoryWrite(error) {
|
|
21384
|
+
return error instanceof RemoteMemoryError && (error.status === 400 || error.status === 422) && (error.code === void 0 || error.code === "unknown_field");
|
|
21385
|
+
}
|
|
21383
21386
|
function warnFailed(failed) {
|
|
21384
21387
|
if (failed.length)
|
|
21385
21388
|
getLogger().warn(
|
|
@@ -22247,7 +22250,7 @@ function createRemoteMemoryStore(options) {
|
|
|
22247
22250
|
}
|
|
22248
22251
|
});
|
|
22249
22252
|
for (const batch of chunks2(writes, MAX_BATCH)) {
|
|
22250
|
-
await serializedAll(
|
|
22253
|
+
const continueRepair = await serializedAll(
|
|
22251
22254
|
batch.map(({ memory }) => memory.memory_id),
|
|
22252
22255
|
async () => {
|
|
22253
22256
|
signal?.throwIfAborted();
|
|
@@ -22262,15 +22265,18 @@ function createRemoteMemoryStore(options) {
|
|
|
22262
22265
|
} catch (error) {
|
|
22263
22266
|
signal?.throwIfAborted();
|
|
22264
22267
|
if (isRemoteWorkLeaseExpired(error)) throw error;
|
|
22265
|
-
if (!(error instanceof RemoteMemoryError && error.code === "version_conflict")) {
|
|
22268
|
+
if (!(error instanceof RemoteMemoryError && error.code === "version_conflict") && !rejectsMemoryWrite(error)) {
|
|
22266
22269
|
result.failed += batch.length;
|
|
22267
|
-
return;
|
|
22270
|
+
return false;
|
|
22268
22271
|
}
|
|
22269
22272
|
if (batch.length === 1) {
|
|
22270
|
-
|
|
22271
|
-
|
|
22273
|
+
if (rejectsMemoryWrite(error)) {
|
|
22274
|
+
unrepairable.add(batch[0].memory.memory_id);
|
|
22275
|
+
result.failed++;
|
|
22276
|
+
} else result.skippedConflict++;
|
|
22277
|
+
return true;
|
|
22272
22278
|
}
|
|
22273
|
-
for (const write of batch) {
|
|
22279
|
+
for (const [index, write] of batch.entries()) {
|
|
22274
22280
|
signal?.throwIfAborted();
|
|
22275
22281
|
try {
|
|
22276
22282
|
await commit([write]);
|
|
@@ -22279,12 +22285,20 @@ function createRemoteMemoryStore(options) {
|
|
|
22279
22285
|
if (isRemoteWorkLeaseExpired(error2)) throw error2;
|
|
22280
22286
|
if (error2 instanceof RemoteMemoryError && error2.code === "version_conflict")
|
|
22281
22287
|
result.skippedConflict++;
|
|
22282
|
-
else
|
|
22288
|
+
else if (rejectsMemoryWrite(error2)) {
|
|
22289
|
+
unrepairable.add(write.memory.memory_id);
|
|
22290
|
+
result.failed++;
|
|
22291
|
+
} else {
|
|
22292
|
+
result.failed += batch.length - index;
|
|
22293
|
+
return false;
|
|
22294
|
+
}
|
|
22283
22295
|
}
|
|
22284
22296
|
}
|
|
22285
22297
|
}
|
|
22298
|
+
return true;
|
|
22286
22299
|
}
|
|
22287
22300
|
);
|
|
22301
|
+
if (!continueRepair) break;
|
|
22288
22302
|
}
|
|
22289
22303
|
return finish();
|
|
22290
22304
|
};
|
package/dist/react/index.cjs
CHANGED
|
@@ -25369,6 +25369,9 @@ var RemoteMemoryPartialCreateError = class extends Error {
|
|
|
25369
25369
|
function rejectsInput(error) {
|
|
25370
25370
|
return error instanceof EmbeddingHttpError && error.status !== void 0 && error.status >= 400 && error.status < 500 && error.status !== 429 && !isFatalEmbeddingError(error);
|
|
25371
25371
|
}
|
|
25372
|
+
function rejectsMemoryWrite(error) {
|
|
25373
|
+
return error instanceof RemoteMemoryError && (error.status === 400 || error.status === 422) && (error.code === void 0 || error.code === "unknown_field");
|
|
25374
|
+
}
|
|
25372
25375
|
function warnFailed(failed) {
|
|
25373
25376
|
if (failed.length)
|
|
25374
25377
|
getLogger().warn(
|
|
@@ -26236,7 +26239,7 @@ function createRemoteMemoryStore(options) {
|
|
|
26236
26239
|
}
|
|
26237
26240
|
});
|
|
26238
26241
|
for (const batch of chunks2(writes, MAX_BATCH)) {
|
|
26239
|
-
await serializedAll(
|
|
26242
|
+
const continueRepair = await serializedAll(
|
|
26240
26243
|
batch.map(({ memory }) => memory.memory_id),
|
|
26241
26244
|
async () => {
|
|
26242
26245
|
signal?.throwIfAborted();
|
|
@@ -26251,15 +26254,18 @@ function createRemoteMemoryStore(options) {
|
|
|
26251
26254
|
} catch (error) {
|
|
26252
26255
|
signal?.throwIfAborted();
|
|
26253
26256
|
if (isRemoteWorkLeaseExpired(error)) throw error;
|
|
26254
|
-
if (!(error instanceof RemoteMemoryError && error.code === "version_conflict")) {
|
|
26257
|
+
if (!(error instanceof RemoteMemoryError && error.code === "version_conflict") && !rejectsMemoryWrite(error)) {
|
|
26255
26258
|
result.failed += batch.length;
|
|
26256
|
-
return;
|
|
26259
|
+
return false;
|
|
26257
26260
|
}
|
|
26258
26261
|
if (batch.length === 1) {
|
|
26259
|
-
|
|
26260
|
-
|
|
26262
|
+
if (rejectsMemoryWrite(error)) {
|
|
26263
|
+
unrepairable.add(batch[0].memory.memory_id);
|
|
26264
|
+
result.failed++;
|
|
26265
|
+
} else result.skippedConflict++;
|
|
26266
|
+
return true;
|
|
26261
26267
|
}
|
|
26262
|
-
for (const write of batch) {
|
|
26268
|
+
for (const [index, write] of batch.entries()) {
|
|
26263
26269
|
signal?.throwIfAborted();
|
|
26264
26270
|
try {
|
|
26265
26271
|
await commit([write]);
|
|
@@ -26268,12 +26274,20 @@ function createRemoteMemoryStore(options) {
|
|
|
26268
26274
|
if (isRemoteWorkLeaseExpired(error2)) throw error2;
|
|
26269
26275
|
if (error2 instanceof RemoteMemoryError && error2.code === "version_conflict")
|
|
26270
26276
|
result.skippedConflict++;
|
|
26271
|
-
else
|
|
26277
|
+
else if (rejectsMemoryWrite(error2)) {
|
|
26278
|
+
unrepairable.add(write.memory.memory_id);
|
|
26279
|
+
result.failed++;
|
|
26280
|
+
} else {
|
|
26281
|
+
result.failed += batch.length - index;
|
|
26282
|
+
return false;
|
|
26283
|
+
}
|
|
26272
26284
|
}
|
|
26273
26285
|
}
|
|
26274
26286
|
}
|
|
26287
|
+
return true;
|
|
26275
26288
|
}
|
|
26276
26289
|
);
|
|
26290
|
+
if (!continueRepair) break;
|
|
26277
26291
|
}
|
|
26278
26292
|
return finish();
|
|
26279
26293
|
};
|
package/dist/react/index.mjs
CHANGED
|
@@ -23485,6 +23485,9 @@ var RemoteMemoryPartialCreateError = class extends Error {
|
|
|
23485
23485
|
function rejectsInput(error) {
|
|
23486
23486
|
return error instanceof EmbeddingHttpError && error.status !== void 0 && error.status >= 400 && error.status < 500 && error.status !== 429 && !isFatalEmbeddingError(error);
|
|
23487
23487
|
}
|
|
23488
|
+
function rejectsMemoryWrite(error) {
|
|
23489
|
+
return error instanceof RemoteMemoryError && (error.status === 400 || error.status === 422) && (error.code === void 0 || error.code === "unknown_field");
|
|
23490
|
+
}
|
|
23488
23491
|
function warnFailed(failed) {
|
|
23489
23492
|
if (failed.length)
|
|
23490
23493
|
getLogger().warn(
|
|
@@ -24352,7 +24355,7 @@ function createRemoteMemoryStore(options) {
|
|
|
24352
24355
|
}
|
|
24353
24356
|
});
|
|
24354
24357
|
for (const batch of chunks2(writes, MAX_BATCH)) {
|
|
24355
|
-
await serializedAll(
|
|
24358
|
+
const continueRepair = await serializedAll(
|
|
24356
24359
|
batch.map(({ memory }) => memory.memory_id),
|
|
24357
24360
|
async () => {
|
|
24358
24361
|
signal?.throwIfAborted();
|
|
@@ -24367,15 +24370,18 @@ function createRemoteMemoryStore(options) {
|
|
|
24367
24370
|
} catch (error) {
|
|
24368
24371
|
signal?.throwIfAborted();
|
|
24369
24372
|
if (isRemoteWorkLeaseExpired(error)) throw error;
|
|
24370
|
-
if (!(error instanceof RemoteMemoryError && error.code === "version_conflict")) {
|
|
24373
|
+
if (!(error instanceof RemoteMemoryError && error.code === "version_conflict") && !rejectsMemoryWrite(error)) {
|
|
24371
24374
|
result.failed += batch.length;
|
|
24372
|
-
return;
|
|
24375
|
+
return false;
|
|
24373
24376
|
}
|
|
24374
24377
|
if (batch.length === 1) {
|
|
24375
|
-
|
|
24376
|
-
|
|
24378
|
+
if (rejectsMemoryWrite(error)) {
|
|
24379
|
+
unrepairable.add(batch[0].memory.memory_id);
|
|
24380
|
+
result.failed++;
|
|
24381
|
+
} else result.skippedConflict++;
|
|
24382
|
+
return true;
|
|
24377
24383
|
}
|
|
24378
|
-
for (const write of batch) {
|
|
24384
|
+
for (const [index, write] of batch.entries()) {
|
|
24379
24385
|
signal?.throwIfAborted();
|
|
24380
24386
|
try {
|
|
24381
24387
|
await commit([write]);
|
|
@@ -24384,12 +24390,20 @@ function createRemoteMemoryStore(options) {
|
|
|
24384
24390
|
if (isRemoteWorkLeaseExpired(error2)) throw error2;
|
|
24385
24391
|
if (error2 instanceof RemoteMemoryError && error2.code === "version_conflict")
|
|
24386
24392
|
result.skippedConflict++;
|
|
24387
|
-
else
|
|
24393
|
+
else if (rejectsMemoryWrite(error2)) {
|
|
24394
|
+
unrepairable.add(write.memory.memory_id);
|
|
24395
|
+
result.failed++;
|
|
24396
|
+
} else {
|
|
24397
|
+
result.failed += batch.length - index;
|
|
24398
|
+
return false;
|
|
24399
|
+
}
|
|
24388
24400
|
}
|
|
24389
24401
|
}
|
|
24390
24402
|
}
|
|
24403
|
+
return true;
|
|
24391
24404
|
}
|
|
24392
24405
|
);
|
|
24406
|
+
if (!continueRepair) break;
|
|
24393
24407
|
}
|
|
24394
24408
|
return finish();
|
|
24395
24409
|
};
|