@voidly/session 1.2.1 → 1.2.2

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/README.md CHANGED
@@ -21,7 +21,7 @@ is not in this package.
21
21
  ## Install
22
22
 
23
23
  ```bash
24
- npm install --ignore-scripts --save-exact @voidly/session@1.2.1
24
+ npm install --ignore-scripts --save-exact @voidly/session@1.2.2
25
25
  ```
26
26
 
27
27
  The package name is public. Check the exact version's registry metadata and its
@@ -38,8 +38,8 @@ explicitly execute after installation.
38
38
  > **Building from a checkout instead?** Pack it yourself:
39
39
  >
40
40
  > ```bash
41
- > npm run build && npm pack # → voidly-session-1.2.1.tgz
42
- > npm install --ignore-scripts --save-exact /path/to/voidly-session-1.2.1.tgz
41
+ > npm run build && npm pack # → voidly-session-1.2.2.tgz
42
+ > npm install --ignore-scripts --save-exact /path/to/voidly-session-1.2.2.tgz
43
43
  > ```
44
44
  >
45
45
  > `npm run gate` inspects the actual packed bytes. A local build is not registry
@@ -435,7 +435,8 @@ async function requestJson(kind, handoff, body, fetchImpl) {
435
435
  }), new AutomaticProofError("completion_unavailable");
436
436
  return value2;
437
437
  });
438
- response = await Promise.race([fetched, deadline]), requireCondition2(performance.now() < deadlineAt, "completion_unavailable"), requireCondition2(!response.redirected && response.type !== "opaqueredirect" && (response.url === "" || response.url === url) && response.status !== 0 && !(response.status >= 300 && response.status < 400), "response_invalid"), requireCondition2(/^application\/json(?:\s*;|$)/i.test(response.headers.get("content-type") ?? "") && response.body, "response_invalid");
438
+ if (response = await Promise.race([fetched, deadline]), requireCondition2(performance.now() < deadlineAt, "completion_unavailable"), requireCondition2(!response.redirected && response.type !== "opaqueredirect" && (response.url === "" || response.url === url) && response.status !== 0 && !(response.status >= 300 && response.status < 400), "response_invalid"), response.status >= 500) throw new AutomaticHttpError("completion_unavailable", response.status);
439
+ requireCondition2(/^application\/json(?:\s*;|$)/i.test(response.headers.get("content-type") ?? "") && response.body, "response_invalid");
439
440
  let length = response.headers.get("content-length");
440
441
  requireCondition2(length === null || /^\d+$/.test(length) && Number(length) <= MAX_RESPONSE_BYTES, "response_invalid"), reader = response.body.getReader();
441
442
  let chunks = [], size = 0, reads = 0, emptyReads = 0;
@@ -436,7 +436,8 @@ async function requestJson(kind, handoff, body, fetchImpl) {
436
436
  }), new AutomaticProofError("completion_unavailable");
437
437
  return value2;
438
438
  });
439
- response = await Promise.race([fetched, deadline]), requireCondition2(performance.now() < deadlineAt, "completion_unavailable"), requireCondition2(!response.redirected && response.type !== "opaqueredirect" && (response.url === "" || response.url === url) && response.status !== 0 && !(response.status >= 300 && response.status < 400), "response_invalid"), requireCondition2(/^application\/json(?:\s*;|$)/i.test(response.headers.get("content-type") ?? "") && response.body, "response_invalid");
439
+ if (response = await Promise.race([fetched, deadline]), requireCondition2(performance.now() < deadlineAt, "completion_unavailable"), requireCondition2(!response.redirected && response.type !== "opaqueredirect" && (response.url === "" || response.url === url) && response.status !== 0 && !(response.status >= 300 && response.status < 400), "response_invalid"), response.status >= 500) throw new AutomaticHttpError("completion_unavailable", response.status);
440
+ requireCondition2(/^application\/json(?:\s*;|$)/i.test(response.headers.get("content-type") ?? "") && response.body, "response_invalid");
440
441
  let length = response.headers.get("content-length");
441
442
  requireCondition2(length === null || /^\d+$/.test(length) && Number(length) <= MAX_RESPONSE_BYTES, "response_invalid"), reader = response.body.getReader();
442
443
  let chunks = [], size = 0, reads = 0, emptyReads = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidly/session",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "The voidpay session client. Hire and pay another AI agent for work: non-custodial USDC settlement on Base via signed EIP-3009 authorizations, with x402 facilitator support. The rail never holds, custodies or submits funds — it only verifies.",
5
5
  "keywords": [
6
6
  "agent-payments",