@proagentstore/cli 0.4.69 → 0.4.70
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/dist/index.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1517,7 +1517,8 @@ async function connectViaRelay(instanceIds, localUrl, runnerToken, opts, force =
|
|
|
1517
1517
|
await registerRuntime(openedId, reconnect ? false : force);
|
|
1518
1518
|
reportRegistration();
|
|
1519
1519
|
},
|
|
1520
|
-
answerControl
|
|
1520
|
+
answerControl,
|
|
1521
|
+
runnerNode
|
|
1521
1522
|
)
|
|
1522
1523
|
);
|
|
1523
1524
|
if (label) writeLine(`Attached agent: ${label}`);
|
|
@@ -1622,7 +1623,7 @@ async function connectViaRelay(instanceIds, localUrl, runnerToken, opts, force =
|
|
|
1622
1623
|
tick();
|
|
1623
1624
|
}
|
|
1624
1625
|
}
|
|
1625
|
-
function openRelaySocket(instanceId, wsBase, mintToken, localUrl, runnerToken, force = false, onConflict, onOpen, onControl) {
|
|
1626
|
+
function openRelaySocket(instanceId, wsBase, mintToken, localUrl, runnerToken, force = false, onConflict, onOpen, onControl, runnerNode = hostname3()) {
|
|
1626
1627
|
let backoffMs = 1e3;
|
|
1627
1628
|
let reconnecting = false;
|
|
1628
1629
|
let closed = false;
|
|
@@ -1648,7 +1649,7 @@ function openRelaySocket(instanceId, wsBase, mintToken, localUrl, runnerToken, f
|
|
|
1648
1649
|
backoffMs = Math.min(backoffMs * 2, 3e4);
|
|
1649
1650
|
return;
|
|
1650
1651
|
}
|
|
1651
|
-
const params = new URLSearchParams({ token: relayToken, node:
|
|
1652
|
+
const params = new URLSearchParams({ token: relayToken, node: runnerNode });
|
|
1652
1653
|
if (force) params.set("force", "1");
|
|
1653
1654
|
const url = `${wsBase}/v1/relay/${encodeURIComponent(instanceId)}/connect?${params.toString()}`;
|
|
1654
1655
|
const ws = new WebSocket(url);
|