run402 4.75.1 → 4.75.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "surface_version": "4.75.1",
2
+ "surface_version": "4.75.2",
3
3
  "verbs": [
4
4
  "repos create",
5
5
  "repos list",
@@ -472,11 +472,19 @@ export function isPublicAddress(address) {
472
472
  }
473
473
 
474
474
  export function pinnedLookup(record, expectedHostname) {
475
- return (hostname, _options, callback) => {
475
+ return (hostname, options, callback) => {
476
476
  if (hostname !== expectedHostname) {
477
477
  callback(new Error("relay_hostname_changed"));
478
478
  return;
479
479
  }
480
+ // Node 20+ sockets (autoSelectFamily) ask with `{ all: true }` and expect
481
+ // an array of records; answering in the single-address form there makes
482
+ // the connect fail with "Invalid IP address: undefined" — i.e. every relay
483
+ // looked unreachable from a current Node.
484
+ if (options && typeof options === "object" && options.all) {
485
+ callback(null, [{ address: record.address, family: record.family }]);
486
+ return;
487
+ }
480
488
  callback(null, record.address, record.family);
481
489
  };
482
490
  }
@@ -270,6 +270,9 @@ describe("Buzz doctor bounded zero-mutation runner", () => {
270
270
  assert.deepEqual(callbackResults[0], { error: null, address: "93.184.216.34", family: 4 });
271
271
  assert.equal(callbackResults[1].error.message, "relay_hostname_changed");
272
272
  assert.equal(callbackResults[1].address, undefined);
273
+ // Node 20+ sockets ask with `{ all: true }` and take an array of records.
274
+ lookup("community.example", { all: true, family: 0 }, (error, addresses) => callbackResults.push({ error, addresses }));
275
+ assert.deepEqual(callbackResults[2], { error: null, addresses: [{ address: "93.184.216.34", family: 4 }] });
273
276
 
274
277
  const contractCodes = Object.values(BUZZ_DOCTOR_CONTRACT.codes_by_check).flat().sort();
275
278
  assert.deepEqual(Object.keys(BUZZ_DOCTOR_REPAIR_MATRIX).sort(), contractCodes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "4.75.1",
3
+ "version": "4.75.2",
4
4
  "description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
5
5
  "type": "module",
6
6
  "bin": {