a2acalling 0.6.3 → 0.6.4

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/bin/cli.js +30 -18
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -983,12 +983,21 @@ https://github.com/onthegonow/a2a_calling`;
983
983
  }
984
984
  }
985
985
 
986
- async function externalPingCheck(targetUrl) {
987
- const providers = [
988
- {
989
- name: 'allorigins',
990
- buildUrl: () => {
991
- const u = new URL('https://api.allorigins.win/raw');
986
+ async function externalPingCheck(targetUrl) {
987
+ // Try direct access first. In practice this is the most reliable signal:
988
+ // it avoids flaky third-party proxies and catches obvious scheme/port mistakes.
989
+ try {
990
+ const direct = await fetchUrlText(targetUrl, 2500);
991
+ return { ok: looksLikePong(direct.body), provider: 'direct', statusCode: direct.statusCode };
992
+ } catch (err) {
993
+ // Fall back to remote fetch providers below.
994
+ }
995
+
996
+ const providers = [
997
+ {
998
+ name: 'allorigins',
999
+ buildUrl: () => {
1000
+ const u = new URL('https://api.allorigins.win/raw');
992
1001
  u.searchParams.set('url', targetUrl);
993
1002
  return u.toString();
994
1003
  }
@@ -1352,22 +1361,25 @@ https://github.com/onthegonow/a2a_calling`;
1352
1361
  }
1353
1362
  }
1354
1363
 
1355
- if (inviteLooksLocal) {
1356
- console.log('Skipping external reachability check: invite host looks local/unroutable.');
1357
- } else {
1358
- const extPing = await externalPingCheck(expectedPingUrl);
1359
- if (extPing.ok) {
1360
- console.log(`✅ External ping OK (${extPing.provider})`);
1361
- } else if (!args.flags['skip-verify']) {
1364
+ if (inviteLooksLocal) {
1365
+ console.log('Skipping external reachability check: invite host looks local/unroutable.');
1366
+ } else {
1367
+ const extPing = await externalPingCheck(expectedPingUrl);
1368
+ if (extPing.ok) {
1369
+ console.log(`✅ External ping OK (${extPing.provider})`);
1370
+ } else if (args.flags['skip-verify']) {
1371
+ console.log('⚠️ External ping FAILED (skipped via --skip-verify).');
1372
+ } else if (args.flags['confirm-ingress']) {
1373
+ console.log('⚠️ External ping FAILED (continuing due to --confirm-ingress).');
1374
+ } else {
1362
1375
  console.log('⚠️ External ping FAILED (server may not be publicly reachable yet).');
1363
- console.log('Fix ingress (DNS/reverse proxy/firewall), then rerun with:');
1376
+ console.log('Fix ingress (DNS/reverse proxy/firewall), then rerun. If you want to proceed anyway:');
1364
1377
  console.log(` a2a quickstart --hostname ${inviteHost} --port ${backendPort} --confirm-ingress`);
1378
+ console.log(` a2a quickstart --hostname ${inviteHost} --port ${backendPort} --skip-verify`);
1365
1379
  console.log('');
1366
1380
  return;
1367
- } else {
1368
- console.log('⚠️ External ping FAILED (skipped via --skip-verify).');
1369
- }
1370
- }
1381
+ }
1382
+ }
1371
1383
 
1372
1384
  if (!config.getOnboarding().verify_confirmed) {
1373
1385
  config.setOnboarding({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "a2acalling",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Agent-to-agent calling for OpenClaw - A2A agent communication",
5
5
  "main": "src/index.js",
6
6
  "bin": {