@anthonyhaussman/opencode-agy-auth 1.0.15-alpha.0 → 1.0.16

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.js CHANGED
@@ -170,7 +170,7 @@ function createAgyActivityRequestId() {
170
170
  import os from "os";
171
171
 
172
172
  // src/sdk/agy-cli-version.ts
173
- var AGY_CLI_VERSION = "1.0.14";
173
+ var AGY_CLI_VERSION = "1.0.16";
174
174
 
175
175
  // src/sdk/user-agent.ts
176
176
  var cachedUserAgent = null;
@@ -15613,17 +15613,24 @@ import * as os2 from "os";
15613
15613
  var MAX_SEND_ATTEMPTS = 2;
15614
15614
  async function sendWithRetry(label, url2, init) {
15615
15615
  for (let attempt = 0; attempt < MAX_SEND_ATTEMPTS; attempt++) {
15616
- const response = await agyFetch(url2, init);
15617
- if (response.ok) return;
15618
- if (!isRetryableStatus(response.status) || attempt === MAX_SEND_ATTEMPTS - 1) {
15619
- if (response.status >= 500 && response.status < 600) {
15620
- console.debug(`[Agy] ${label} failed: ${response.status} (transient, suppressed)`);
15621
- } else {
15622
- console.warn(`[Agy] ${label} failed: ${response.status}`);
15616
+ try {
15617
+ const response = await agyFetch(url2, init);
15618
+ if (response.ok) return;
15619
+ if (!isRetryableStatus(response.status) || attempt === MAX_SEND_ATTEMPTS - 1) {
15620
+ if (response.status >= 500 && response.status < 600) {
15621
+ console.debug(`[Agy] ${label} failed: ${response.status} (transient, suppressed)`);
15622
+ } else {
15623
+ console.warn(`[Agy] ${label} failed: ${response.status}`);
15624
+ }
15625
+ return;
15626
+ }
15627
+ } catch (error45) {
15628
+ if (attempt === MAX_SEND_ATTEMPTS - 1) {
15629
+ console.debug(`[Agy] ${label} failed with network error: ${error45} (suppressed)`);
15630
+ return;
15623
15631
  }
15624
- return;
15625
15632
  }
15626
- await wait2(getExponentialDelayWithJitter(attempt));
15633
+ await wait2(getExponentialDelayWithJitter(attempt + 1));
15627
15634
  }
15628
15635
  }
15629
15636
  var lastTrafficTime = 0;