a2acalling 0.6.0 → 0.6.1
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/package.json
CHANGED
|
@@ -494,10 +494,6 @@ function readExistingConfiguredInviteHost() {
|
|
|
494
494
|
if (!parsed.hostname || isLocalOrUnroutableHost(parsed.hostname)) {
|
|
495
495
|
return '';
|
|
496
496
|
}
|
|
497
|
-
// Legacy: Cloudflare quick tunnels are ephemeral and no longer supported.
|
|
498
|
-
if (String(parsed.hostname).toLowerCase().endsWith('.trycloudflare.com')) {
|
|
499
|
-
return '';
|
|
500
|
-
}
|
|
501
497
|
return existing;
|
|
502
498
|
} catch (err) {
|
|
503
499
|
return '';
|
package/src/lib/invite-host.js
CHANGED
|
@@ -124,14 +124,6 @@ function isPublicIpHostname(hostname) {
|
|
|
124
124
|
return false;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
function isLegacyTunnelHostname(hostname) {
|
|
128
|
-
const host = String(hostname || '').trim().toLowerCase();
|
|
129
|
-
if (!host) return false;
|
|
130
|
-
// Legacy: Cloudflare Quick Tunnel hostnames were ephemeral and are now unsupported.
|
|
131
|
-
if (host.endsWith('.trycloudflare.com')) return true;
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
127
|
async function resolveInviteHost(options = {}) {
|
|
136
128
|
const config = options.config || null;
|
|
137
129
|
|
|
@@ -155,8 +147,7 @@ async function resolveInviteHost(options = {}) {
|
|
|
155
147
|
: 'default';
|
|
156
148
|
|
|
157
149
|
const parsed = splitHostPort(candidate);
|
|
158
|
-
const
|
|
159
|
-
const desiredPort = (candidateIsLegacyTunnel ? null : parsed.port) ||
|
|
150
|
+
const desiredPort = parsed.port ||
|
|
160
151
|
Number.parseInt(String(options.defaultPort || ''), 10) ||
|
|
161
152
|
readIntEnv('PORT') ||
|
|
162
153
|
readIntEnv('A2A_PORT') ||
|
|
@@ -170,17 +161,8 @@ async function resolveInviteHost(options = {}) {
|
|
|
170
161
|
? options.externalIpTtlMs
|
|
171
162
|
: undefined;
|
|
172
163
|
|
|
173
|
-
// If a previous run persisted a legacy Cloudflare Quick Tunnel hostname into config (e.g. trycloudflare),
|
|
174
|
-
// treat it like "unroutable" so we don't emit stale/unsupported invite endpoints.
|
|
175
|
-
if (candidateIsLegacyTunnel) {
|
|
176
|
-
warnings.push(
|
|
177
|
-
`Detected legacy Quick Tunnel hostname "${candidateHostWithPort}". Quick Tunnel support was removed. ` +
|
|
178
|
-
`Set A2A_HOSTNAME="your-public-host:port" (or wire a reverse proxy) to enable internet-facing invites.`
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
164
|
const shouldReplaceWithExternalIp = isLocalOrUnroutableHost(parsed.hostname) ||
|
|
183
|
-
|
|
165
|
+
(
|
|
184
166
|
options.refreshExternalIp && isPublicIpHostname(parsed.hostname)
|
|
185
167
|
);
|
|
186
168
|
|