@proagentstore/cli 0.1.11 → 0.1.12
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 +22 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -848,8 +848,9 @@ function createRunnerCommand() {
|
|
|
848
848
|
setTimeout(() => reject(new Error("timed out waiting for cloudflared tunnel URL")), 45e3).unref();
|
|
849
849
|
});
|
|
850
850
|
writeLine(`Tunnel ready: ${tunnelUrl}`);
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
writeLine("Waiting for tunnel DNS to propagate (up to 60s)...");
|
|
852
|
+
await waitForLocalRunner({ url: tunnelUrl, token: runnerToken, instanceId }, 6e4);
|
|
853
|
+
writeLine("Tunnel health check passed \u2713");
|
|
853
854
|
const capabilities = await requestRunner("GET", "/capabilities", {
|
|
854
855
|
url: tunnelUrl,
|
|
855
856
|
token: runnerToken,
|
|
@@ -862,16 +863,27 @@ function createRunnerCommand() {
|
|
|
862
863
|
capabilities: Array.isArray(capabilities.capabilities) ? capabilities.capabilities.filter((item) => typeof item === "string") : [],
|
|
863
864
|
runnerVersion: clean(opts.runnerVersion) || ""
|
|
864
865
|
});
|
|
865
|
-
writeLine(
|
|
866
|
+
writeLine("Runtime registered with PAGS \u2713");
|
|
866
867
|
if (!opts.skipProbe) {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
868
|
+
try {
|
|
869
|
+
await requestPags(
|
|
870
|
+
"GET",
|
|
871
|
+
`/v1/instances/${apiPathSegment(instanceId)}/runtime/status`,
|
|
872
|
+
opts
|
|
873
|
+
);
|
|
874
|
+
writeLine("PAGS can reach your runtime \u2713");
|
|
875
|
+
} catch {
|
|
876
|
+
writeLine("\u26A0\uFE0F PAGS probe failed \u2014 the tunnel may need more time");
|
|
877
|
+
}
|
|
873
878
|
}
|
|
874
|
-
writeLine("
|
|
879
|
+
writeLine("");
|
|
880
|
+
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");
|
|
881
|
+
writeLine(" \u2705 CONNECTED \u2014 Browser runner is live");
|
|
882
|
+
writeLine(` Instance: ${instanceId.slice(0, 8)}...`);
|
|
883
|
+
writeLine(` Tunnel: ${tunnelUrl}`);
|
|
884
|
+
writeLine(" The agent can now submit applications via browser.");
|
|
885
|
+
writeLine(" Keep this terminal open. Press Ctrl+C to disconnect.");
|
|
886
|
+
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");
|
|
875
887
|
await new Promise((resolvePromise) => {
|
|
876
888
|
runner.on("exit", () => resolvePromise());
|
|
877
889
|
tunnel?.on("exit", () => resolvePromise());
|