@ynhcj/xiaoyi-channel 0.0.92-beta → 0.0.93-beta

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.
@@ -23,12 +23,13 @@ function isRetryableProviderError(message) {
23
23
  return true;
24
24
  return false;
25
25
  }
26
- /** Compute retry delay in ms for the given 1-based attempt. */
26
+ /** Compute retry delay in ms for the given 1-based attempt, with up to 10s jitter. */
27
27
  function getRetryDelayMs(attempt) {
28
- // attempt 1→10s, 2→20s, 3→40s, 4+→60s
29
- if (attempt <= RETRY_DELAYS_MS.length)
30
- return RETRY_DELAYS_MS[attempt - 1];
31
- return RETRY_DELAYS_MS[RETRY_DELAYS_MS.length - 1]; // 60s cap
28
+ const base = attempt <= RETRY_DELAYS_MS.length
29
+ ? RETRY_DELAYS_MS[attempt - 1]
30
+ : RETRY_DELAYS_MS[RETRY_DELAYS_MS.length - 1];
31
+ const jitter = Math.floor(Math.random() * 10_000);
32
+ return base + jitter;
32
33
  }
33
34
  function sleep(ms) {
34
35
  return new Promise((resolve) => setTimeout(resolve, ms));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.92-beta",
3
+ "version": "0.0.93-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",