@proagentstore/cli 0.1.10 → 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.
Files changed (2) hide show
  1. package/dist/index.js +24 -19
  2. 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
- await waitForLocalRunner({ url: tunnelUrl, token: runnerToken, instanceId }, 3e4);
852
- writeLine("Tunnel health check passed");
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(JSON.stringify(result, null, 2));
866
+ writeLine("Runtime registered with PAGS \u2713");
866
867
  if (!opts.skipProbe) {
867
- const status = await requestPags(
868
- "GET",
869
- `/v1/instances/${apiPathSegment(instanceId)}/runtime/status`,
870
- opts
871
- );
872
- writeLine(JSON.stringify(status, null, 2));
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("Connected. Keep this process running while the agent uses your FAGS browser runtime.");
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());
@@ -1022,18 +1034,11 @@ var upCommand = new Command7("up").description("Start the browser runner for all
1022
1034
  Connecting runner to: ${target.name || target.id.slice(0, 8)}...`);
1023
1035
  const { spawn: spawn3 } = await import("child_process");
1024
1036
  const cliPath = process.argv[1];
1025
- const args = [
1026
- cliPath,
1027
- "runner",
1028
- "connect",
1029
- target.id,
1030
- "--pags-token",
1031
- session.token
1032
- ];
1037
+ const args = [cliPath, "runner", "connect", target.id];
1033
1038
  if (opts.headless) args.push("--headless");
1034
1039
  const child = spawn3(process.execPath, args, {
1035
1040
  stdio: "inherit",
1036
- env: process.env
1041
+ env: { ...process.env, PAGS_TOKEN: session.token }
1037
1042
  });
1038
1043
  child.on("exit", (code) => {
1039
1044
  process.exit(code || 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proagentstore/cli",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "CLI for creating, publishing, and running ProAgentStore agents",
5
5
  "license": "MIT",
6
6
  "type": "module",