@bulolo/hermes-link 0.3.2 → 0.3.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.
|
@@ -1546,9 +1546,9 @@ async function discoverRouteCandidates(options) {
|
|
|
1546
1546
|
const publicIpv4s = unique(publicIps.publicIpv4s.filter(isUsablePublicIpv4)).slice(0, MAX_PUBLIC_IPV4S);
|
|
1547
1547
|
const publicIpv6s = unique(publicIps.publicIpv6s.filter(isUsablePublicIpv6)).slice(0, MAX_PUBLIC_IPV6S);
|
|
1548
1548
|
const preferredUrls = [
|
|
1549
|
-
...lanIps.map((ip) => buildDirectUrl(ip, options.port)),
|
|
1550
1549
|
...publicIpv4s.map((ip) => buildDirectUrl(ip, options.port)),
|
|
1551
|
-
...publicIpv6s.map((ip) => buildDirectUrl(ip, options.port))
|
|
1550
|
+
...publicIpv6s.map((ip) => buildDirectUrl(ip, options.port)),
|
|
1551
|
+
...lanIps.map((ip) => buildDirectUrl(ip, options.port))
|
|
1552
1552
|
];
|
|
1553
1553
|
return { lanIps, publicIpv4s, publicIpv6s, preferredUrls, environment };
|
|
1554
1554
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
saveConfig,
|
|
22
22
|
startLinkService,
|
|
23
23
|
writeJsonFile
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-ELQBIHDQ.js";
|
|
25
25
|
import "../chunk-NP3Y2NVF.js";
|
|
26
26
|
|
|
27
27
|
// src/cli/index.ts
|
|
@@ -261,7 +261,7 @@ async function runPairingPreflight(options) {
|
|
|
261
261
|
code: token.token,
|
|
262
262
|
preferred_urls: preferredUrls
|
|
263
263
|
};
|
|
264
|
-
const pageUrl = buildLocalPairingPageUrl(options.config.port
|
|
264
|
+
const pageUrl = buildLocalPairingPageUrl(preferredUrls[0] ?? `http://127.0.0.1:${options.config.port}`, sessionId, token.token);
|
|
265
265
|
if (options.openBrowser !== false) {
|
|
266
266
|
await openSystemBrowser(pageUrl).catch(() => void 0);
|
|
267
267
|
}
|
|
@@ -273,9 +273,9 @@ async function runPairingPreflight(options) {
|
|
|
273
273
|
preferredUrls
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
function buildLocalPairingPageUrl(
|
|
276
|
+
function buildLocalPairingPageUrl(baseUrl, sessionId, connectToken) {
|
|
277
277
|
const qs = new URLSearchParams({ session_id: sessionId, connect_token: connectToken });
|
|
278
|
-
return
|
|
278
|
+
return `${baseUrl}/pair?${qs.toString()}`;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
// src/cli/index.ts
|
package/dist/http/app.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bulolo/hermes-link",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Provides full client API, multi-device auth and conversation management for Hermes Agent, with LAN and internet connectivity.",
|
|
5
5
|
"author": "Bulolo",
|
|
6
6
|
"license": "MIT",
|
|
@@ -75,4 +75,4 @@
|
|
|
75
75
|
"typescript": "^5.7.2",
|
|
76
76
|
"vitest": "^2.1.8"
|
|
77
77
|
}
|
|
78
|
-
}
|
|
78
|
+
}
|