@tinycloud/replica 0.3.0-beta.4 → 0.3.0-beta.6

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.
@@ -617,7 +617,7 @@ var ErrorCodes = {
617
617
  PERMISSION_DENIED: "PERMISSION_DENIED",
618
618
  // Node retry signals (tinycloud-node #347). `meta.retryable` says whether a
619
619
  // retry is safe; `meta.retryAfterMs` carries the node's Retry-After.
620
- /** HTTP 503 `sql_busy:<stage>` / `unavailable_retryable`: nothing was applied; retry after `meta.retryAfterMs`. */
620
+ /** HTTP 503 `sql_busy:<stage>` / `unavailable_retryable`/`read_audit_busy`: nothing was applied; retry after `meta.retryAfterMs`. */
621
621
  NODE_BUSY: "NODE_BUSY",
622
622
  /** HTTP 503 `request_timeout`: the node's deadline passed before any write began; nothing was applied. */
623
623
  REQUEST_TIMEOUT: "REQUEST_TIMEOUT",
@@ -658,11 +658,12 @@ var ErrorCodes = {
658
658
  DUCKDB_READONLY_VIOLATION: "DUCKDB_READONLY_VIOLATION"
659
659
  };
660
660
  var defaultRetryPolicy = {
661
- maxAttempts: 3,
661
+ maxAttempts: 4,
662
662
  backoff: "exponential",
663
- baseDelayMs: 1e3,
664
- maxDelayMs: 1e4,
665
- retryableErrors: [ErrorCodes.NETWORK_ERROR, ErrorCodes.TIMEOUT]
663
+ baseDelayMs: 250,
664
+ maxDelayMs: 4e3,
665
+ retryableErrors: [ErrorCodes.NODE_BUSY, ErrorCodes.REQUEST_TIMEOUT],
666
+ maxTotalMs: 12e3
666
667
  };
667
668
  var grantableActions = new Set(
668
669
  CAPABILITY_REGISTRY.map(({ urn }) => urn).filter((urn) => !urn.endsWith("/*"))
@@ -2130,7 +2131,7 @@ function spawn(source) {
2130
2131
  if (source instanceof URL || typeof source === "string") return new Worker(source, { type: "module" });
2131
2132
  if (typeof source === "function") return source();
2132
2133
  }
2133
- return new Worker(new URL("./kv-storage.worker.618d3a20b6f3f54ed78b68f1dc244dddc3daba46e91e9ae2b577685cc9339315.js", import.meta.url), { type: "module" });
2134
+ return new Worker(new URL("./kv-storage.worker.f9311d47e8d4d08d5413987b5f8aa5e3cd180708f3e4debed3b0a3d938156fcd.js", import.meta.url), { type: "module" });
2134
2135
  }
2135
2136
  var WorkerConnection = class {
2136
2137
  ready;