@persistica/flux-agent 0.0.40 → 0.0.41

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.
Files changed (2) hide show
  1. package/index.js +4 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1383,6 +1383,7 @@ var EndpointNotFoundError = class extends Error {
1383
1383
  };
1384
1384
  var isRetryableConnectionError = (error) => error instanceof RetryableError;
1385
1385
  var isRetryableAuthStatus = (status) => status >= 500 || status === 429;
1386
+ var AUTH_FETCH_TIMEOUT_MS = 6e4;
1386
1387
  var asConnectionError = (error, origin) => new ConnectionError(
1387
1388
  `Failed to reach mesh server at ${origin}: ${error instanceof Error ? error.message : "Unknown connection error"}`
1388
1389
  );
@@ -1453,7 +1454,9 @@ var authenticateAgentOrThrow = async (networkId, domain, unknownIdentificationPa
1453
1454
  "x-flux-content-type": typeof unknownIdentificationPayload === "string" ? "text/plain" : "application/json",
1454
1455
  "Accept": "text/plain"
1455
1456
  },
1456
- body: customPayload
1457
+ body: customPayload,
1458
+ // A timeout rejects like any transport failure, so the caller retries it (#541).
1459
+ signal: AbortSignal.timeout(AUTH_FETCH_TIMEOUT_MS)
1457
1460
  });
1458
1461
  if (!response.ok) {
1459
1462
  const textResponse = await response.text();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@persistica/flux-agent",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "Persistica Flux Agent",
5
5
  "type": "module",
6
6
  "keywords": [],