@proagentstore/cli 0.4.52 → 0.4.53
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 +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1217,6 +1217,9 @@ function diffMembership(attached, eligible, thisNode, blocked = /* @__PURE__ */
|
|
|
1217
1217
|
function shouldRegisterOnOpen(reconnect, alreadyRegistered) {
|
|
1218
1218
|
return reconnect || !alreadyRegistered;
|
|
1219
1219
|
}
|
|
1220
|
+
function pendingRegistrations(attached, registered) {
|
|
1221
|
+
return [...attached].filter((id) => !registered.has(id));
|
|
1222
|
+
}
|
|
1220
1223
|
function instanceLabel(inst) {
|
|
1221
1224
|
const short = `${inst.id.slice(0, 8)}\u2026`;
|
|
1222
1225
|
return inst.name ? `${inst.name} (${short})` : short;
|
|
@@ -1336,7 +1339,7 @@ async function connectViaRelay(instanceIds, localUrl, runnerToken, opts, force =
|
|
|
1336
1339
|
};
|
|
1337
1340
|
for (const id of instanceIds) attach(id, "");
|
|
1338
1341
|
reportRegistration();
|
|
1339
|
-
writeLine(registered.size === instanceIds.length ? `Runtime registered with PAGS \u2713 (${registered.size}/${instanceIds.length} agents)` : `Runtime registration incomplete: ${registered.size}/${instanceIds.length} agents \u2014 retried on each relay (re)connect.`);
|
|
1342
|
+
writeLine(registered.size === instanceIds.length ? `Runtime registered with PAGS \u2713 (${registered.size}/${instanceIds.length} agents)` : `Runtime registration incomplete: ${registered.size}/${instanceIds.length} agents \u2014 retried on each relay (re)connect${watchInstances ? " and every 20s while this runs" : ""}.`);
|
|
1340
1343
|
writeLine("");
|
|
1341
1344
|
writeLine("\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550");
|
|
1342
1345
|
writeLine(` \u2705 CONNECTED \u2014 WebSocket relay \xB7 ${hostname3()}`);
|
|
@@ -1406,6 +1409,11 @@ async function connectViaRelay(instanceIds, localUrl, runnerToken, opts, force =
|
|
|
1406
1409
|
attach(inst.id, instanceLabel(inst));
|
|
1407
1410
|
}
|
|
1408
1411
|
for (const id of toDetach) detach(id);
|
|
1412
|
+
const pending = pendingRegistrations(attached.keys(), registered);
|
|
1413
|
+
if (pending.length) {
|
|
1414
|
+
for (const id of pending) await registerRuntime(id);
|
|
1415
|
+
reportRegistration();
|
|
1416
|
+
}
|
|
1409
1417
|
} catch {
|
|
1410
1418
|
}
|
|
1411
1419
|
tick();
|