@warmhub/sdk-ts 0.74.0 → 0.75.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/dist/index.d.ts
CHANGED
|
@@ -1361,9 +1361,11 @@ type StreamFailureCause = {
|
|
|
1361
1361
|
* Error raised when a streamed commit submission fails after an ambiguous or
|
|
1362
1362
|
* partial append.
|
|
1363
1363
|
*
|
|
1364
|
-
* The `completedOperations` field contains
|
|
1365
|
-
*
|
|
1366
|
-
*
|
|
1364
|
+
* The `completedOperations` field contains returned rows the SDK knows
|
|
1365
|
+
* completed. `acknowledgedOperationCount` also records progress when an append
|
|
1366
|
+
* response contains sparse or empty result rows. Before retrying manually,
|
|
1367
|
+
* inspect repository state because the failed append may have committed
|
|
1368
|
+
* additional operations that were not reflected locally.
|
|
1367
1369
|
*
|
|
1368
1370
|
* @see https://docs.warmhub.ai/sdk/transient-retry/#partial-submissions
|
|
1369
1371
|
*/
|
|
@@ -1379,6 +1381,13 @@ declare class PartialStreamSubmissionError extends Error {
|
|
|
1379
1381
|
* @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#completedoperations
|
|
1380
1382
|
*/
|
|
1381
1383
|
readonly completedOperations: SubmittedStreamResult['operations'];
|
|
1384
|
+
/**
|
|
1385
|
+
* Number of operations covered by append responses the SDK received before
|
|
1386
|
+
* the failure. This can exceed `completedOperations.length` when the backend
|
|
1387
|
+
* returns sparse or empty result rows.
|
|
1388
|
+
* @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#acknowledgedoperationcount
|
|
1389
|
+
*/
|
|
1390
|
+
readonly acknowledgedOperationCount: number;
|
|
1382
1391
|
/**
|
|
1383
1392
|
* Underlying error that triggered the partial submission, preserved for
|
|
1384
1393
|
* diagnostics. Inspect via `isWarmHubError(err.cause)` / `err.cause.kind`.
|
|
@@ -1388,6 +1397,7 @@ declare class PartialStreamSubmissionError extends Error {
|
|
|
1388
1397
|
constructor(input: {
|
|
1389
1398
|
cause: unknown;
|
|
1390
1399
|
completedOperations: SubmittedStreamResult['operations'];
|
|
1400
|
+
acknowledgedOperationCount?: number;
|
|
1391
1401
|
});
|
|
1392
1402
|
}
|
|
1393
1403
|
/**
|
|
@@ -1420,9 +1430,9 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
1420
1430
|
* Multi-op chunks bypass retry entirely because the backend applies
|
|
1421
1431
|
* operations one-at-a-time in their own transactions, so a mid-chunk
|
|
1422
1432
|
* transport failure on attempt 1 may have committed an arbitrary
|
|
1423
|
-
* prefix. Multi-chunk mid-flight failures (`
|
|
1424
|
-
* also bypass retry. Both surface `PartialStreamSubmissionError
|
|
1425
|
-
*
|
|
1433
|
+
* prefix. Multi-chunk mid-flight failures (`acknowledgedOperationCount > 0`)
|
|
1434
|
+
* also bypass retry. Both surface `PartialStreamSubmissionError`; callers must
|
|
1435
|
+
* inspect repository state and resume only operations known not to have landed.
|
|
1426
1436
|
*
|
|
1427
1437
|
* Definite client rejections (`UNAUTHENTICATED`, `VALIDATION_ERROR`,
|
|
1428
1438
|
* `CONFLICT`, `RATE_LIMITED`, `ALREADY_RETRACTED`, …) on the first chunk
|
|
@@ -1837,7 +1847,9 @@ type ReviseInput = Omit<ReviseOp, 'operation'> | ReviseOp;
|
|
|
1837
1847
|
* The builder is not a promise — there is no `build()` method, and `await cb`
|
|
1838
1848
|
* alone will not submit anything. Finalize the batch by calling
|
|
1839
1849
|
* `await cb.commit({ client, orgName, repoName, ... })`, which validates,
|
|
1840
|
-
* submits, and seals the builder in one step.
|
|
1850
|
+
* submits, and seals the builder in one step. A partial submission also seals
|
|
1851
|
+
* the builder because some operations may have landed. Reusing a sealed
|
|
1852
|
+
* builder throws.
|
|
1841
1853
|
*
|
|
1842
1854
|
* @example
|
|
1843
1855
|
* ```ts
|
|
@@ -1937,7 +1949,7 @@ declare class OperationBuilder {
|
|
|
1937
1949
|
/**
|
|
1938
1950
|
* Validate, submit, and seal the builder.
|
|
1939
1951
|
*
|
|
1940
|
-
* A successful call submits operations through the same stream path as `client.commit.apply` and makes the builder single-use. Validation failures throw before any server request is made.
|
|
1952
|
+
* A successful call submits operations through the same stream path as `client.commit.apply` and makes the builder single-use. A `PartialStreamSubmissionError` also seals the builder to prevent blind replay. Validation failures throw before any server request is made. Deterministic all-failed batches surface as `AllStreamOperationsFailedError` with per-op failure data.
|
|
1941
1953
|
*
|
|
1942
1954
|
* @param params.client WarmHub client or compatible stream client used for submission.
|
|
1943
1955
|
* @param params.message Optional commit message.
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-
|
|
1
|
+
export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-QQTES2LQ.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WarmHubClient } from './chunk-
|
|
2
|
-
export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-
|
|
1
|
+
import { WarmHubClient } from './chunk-QQTES2LQ.js';
|
|
2
|
+
export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-QQTES2LQ.js';
|
|
3
3
|
import { createContext, useMemo, useState, useEffect, useContext } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
package/package.json
CHANGED