agentroam 0.2.0-preview.11 → 0.2.0-preview.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/README.md CHANGED
@@ -20,20 +20,20 @@ npx agentroam@preview
20
20
  Or install from tarball:
21
21
 
22
22
  ```bash
23
- npm install ./agentroam-cloudflared-darwin-arm64-0.2.0-preview.11.tgz \
24
- ./agentroam-runtime-darwin-arm64-0.2.0-preview.11.tgz \
25
- ./agentroam-tui-darwin-arm64-0.2.0-preview.11.tgz \
26
- ./agentroam-0.2.0-preview.11.tgz
23
+ npm install ./agentroam-cloudflared-darwin-arm64-0.2.0-preview.12.tgz \
24
+ ./agentroam-runtime-darwin-arm64-0.2.0-preview.12.tgz \
25
+ ./agentroam-tui-darwin-arm64-0.2.0-preview.12.tgz \
26
+ ./agentroam-0.2.0-preview.12.tgz
27
27
  npx agentroam
28
28
  ```
29
29
 
30
30
  Windows PowerShell:
31
31
 
32
32
  ```powershell
33
- npm install ./agentroam-cloudflared-win32-x64-0.2.0-preview.11.tgz `
34
- ./agentroam-runtime-win32-x64-0.2.0-preview.11.tgz `
35
- ./caoqu-agentroam-tui-win32-x64-0.2.0-preview.11.tgz `
36
- ./agentroam-0.2.0-preview.11.tgz
33
+ npm install ./agentroam-cloudflared-win32-x64-0.2.0-preview.12.tgz `
34
+ ./agentroam-runtime-win32-x64-0.2.0-preview.12.tgz `
35
+ ./caoqu-agentroam-tui-win32-x64-0.2.0-preview.12.tgz `
36
+ ./agentroam-0.2.0-preview.12.tgz
37
37
  npx agentroam
38
38
  ```
39
39
 
@@ -7,7 +7,7 @@ import { promisify } from "node:util";
7
7
 
8
8
  const execFileAsync = promisify(execFile);
9
9
  const MANAGED_NODE_VERSION = "22.22.0";
10
- const RELEASE_VERSION = "0.2.0-preview.11";
10
+ const RELEASE_VERSION = "0.2.0-preview.12";
11
11
  const RELEASE_BASE_URL = `https://gitee.com/caoqu/team-agent/releases/download/v${RELEASE_VERSION}`;
12
12
  const FORWARDED_SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
13
13
 
@@ -2,6 +2,7 @@ import { mkdtemp, writeFile } from "node:fs/promises";
2
2
  import { tmpdir } from "node:os";
3
3
  import { resolve } from "node:path";
4
4
  import { describe, expect, it } from "vitest";
5
+ import { AGENTROAM_VERSION } from "../platform-packages.js";
5
6
  import { resolveBundledCloudflared } from "./bundled-asset.js";
6
7
  describe("resolveBundledCloudflared", () => {
7
8
  it("resolves a valid platform package manifest and archive", async () => {
@@ -10,7 +11,7 @@ describe("resolveBundledCloudflared", () => {
10
11
  const archivePath = resolve(root, "cloudflared.tgz");
11
12
  await writeFile(archivePath, "archive");
12
13
  await writeFile(manifestPath, JSON.stringify({
13
- packageVersion: "0.2.0-preview.11",
14
+ packageVersion: AGENTROAM_VERSION,
14
15
  upstreamVersion: "2026.8.2",
15
16
  target: "darwin-arm64",
16
17
  assetFormat: "tgz",
@@ -51,7 +52,7 @@ describe("resolveBundledCloudflared", () => {
51
52
  const assetPath = resolve(root, "cloudflared.exe");
52
53
  await writeFile(assetPath, "binary");
53
54
  await writeFile(manifestPath, JSON.stringify({
54
- packageVersion: "0.2.0-preview.11",
55
+ packageVersion: AGENTROAM_VERSION,
55
56
  upstreamVersion: "2026.8.2",
56
57
  target: "windows-amd64",
57
58
  assetFormat: "executable",
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { createRequire } from "node:module";
3
3
  import { dirname } from "node:path";
4
- export const AGENTROAM_VERSION = "0.2.0-preview.11";
4
+ export const AGENTROAM_VERSION = "0.2.0-preview.12";
5
5
  export const PLATFORM_PACKAGES = {
6
6
  "darwin-arm64": {
7
7
  runtime: "agentroam-runtime-darwin-arm64",
@@ -1,11 +1,20 @@
1
1
  import { delimiter, dirname, isAbsolute, resolve, win32 } from "node:path";
2
2
  import { resolveCodexRuntime } from "../codex-runtime-manager.js";
3
3
  import { detectPlatform } from "../platform.js";
4
+ import { renderQr } from "../qr.js";
4
5
  import { MacLaunchAgent } from "./macos-launch-agent.js";
5
6
  import { WindowsTaskService } from "./windows-task-service.js";
6
7
  export async function runServiceCommand(options, context) {
7
8
  const platform = context.platform ?? process.platform;
8
9
  const log = context.log ?? console.log;
10
+ const stdoutIsTTY = context.isTTY ?? process.stdout.isTTY === true;
11
+ const logAccessUrl = async (accessUrl) => {
12
+ log(`Open: ${accessUrl}`);
13
+ if (!options.qr || !stdoutIsTTY)
14
+ return;
15
+ log("");
16
+ log(await renderQr(accessUrl));
17
+ };
9
18
  const controller = context.controller ?? context.launchAgent ?? createController(platform, context.homeDir);
10
19
  switch (options.serviceAction) {
11
20
  case "install": {
@@ -49,7 +58,7 @@ export async function runServiceCommand(options, context) {
49
58
  const { definition, state } = await controller.install(config);
50
59
  log(`✓ AgentRoam service installed: ${definition}`);
51
60
  if (state?.status === "ready" && state.accessUrl)
52
- log(`Open: ${state.accessUrl}`);
61
+ await logAccessUrl(state.accessUrl);
53
62
  else
54
63
  log("Service is starting. Run `agentroam service url` shortly.");
55
64
  return;
@@ -58,7 +67,7 @@ export async function runServiceCommand(options, context) {
58
67
  const state = await controller.start();
59
68
  log("✓ AgentRoam service started");
60
69
  if (state?.status === "ready" && state.accessUrl)
61
- log(`Open: ${state.accessUrl}`);
70
+ await logAccessUrl(state.accessUrl);
62
71
  return;
63
72
  }
64
73
  case "stop":
@@ -77,7 +86,7 @@ export async function runServiceCommand(options, context) {
77
86
  log(`Root: ${status.config.roots.join(", ")}`);
78
87
  }
79
88
  if (status.running && status.state?.status === "ready" && status.state.accessUrl) {
80
- log(`Open: ${status.state.accessUrl}`);
89
+ await logAccessUrl(status.state.accessUrl);
81
90
  }
82
91
  return;
83
92
  }
@@ -98,7 +107,7 @@ export async function runServiceCommand(options, context) {
98
107
  const state = await controller.restart();
99
108
  log("✓ AgentRoam service restarted");
100
109
  if (state?.status === "ready" && state.accessUrl)
101
- log(`Open: ${state.accessUrl}`);
110
+ await logAccessUrl(state.accessUrl);
102
111
  return;
103
112
  }
104
113
  case "uninstall": {
@@ -33,6 +33,48 @@ describe("runServiceCommand", () => {
33
33
  }));
34
34
  expect(log).toHaveBeenCalledWith("Open: https://ready.example/web");
35
35
  });
36
+ it("prints a scannable QR code after the URL on interactive terminals", async () => {
37
+ const log = vi.fn();
38
+ await runServiceCommand({ ...options("start"), qr: true }, {
39
+ platform: "darwin",
40
+ nodePath: "/node",
41
+ cliPath: "/agentroam.mjs",
42
+ version: "test",
43
+ isTTY: true,
44
+ log,
45
+ controller: controller({ start: vi.fn(async () => ({ status: "ready", accessUrl: "https://ready.example/web" })) }),
46
+ });
47
+ const openIndex = log.mock.calls.findIndex(([line]) => line === "Open: https://ready.example/web");
48
+ expect(openIndex).toBeGreaterThanOrEqual(0);
49
+ const qr = log.mock.calls[openIndex + 2]?.[0];
50
+ expect(qr).toMatch(/[▀▄█]/);
51
+ expect(qr).toContain("\n");
52
+ });
53
+ it("keeps service output QR-free when piped or when --no-qr is set", async () => {
54
+ const log = vi.fn();
55
+ const start = vi.fn(async () => ({ status: "ready", accessUrl: "https://ready.example/web" }));
56
+ await runServiceCommand({ ...options("start"), qr: true }, {
57
+ platform: "darwin",
58
+ nodePath: "/node",
59
+ cliPath: "/agentroam.mjs",
60
+ version: "test",
61
+ isTTY: false,
62
+ log,
63
+ controller: controller({ start }),
64
+ });
65
+ await runServiceCommand(options("start"), {
66
+ platform: "darwin",
67
+ nodePath: "/node",
68
+ cliPath: "/agentroam.mjs",
69
+ version: "test",
70
+ isTTY: true,
71
+ log,
72
+ controller: controller({ start }),
73
+ });
74
+ const lines = log.mock.calls.map(([line]) => line);
75
+ expect(lines).toContain("Open: https://ready.example/web");
76
+ expect(lines.some((line) => /[▀▄█]/.test(String(line)))).toBe(false);
77
+ });
36
78
  it("pins the selected Node directory ahead of the inherited service PATH", () => {
37
79
  expect(buildServiceEnvironmentPath("/Users/test/.nvm/versions/node/v22.22.2/bin/node", "/usr/bin:/Users/test/.nvm/versions/node/v22.22.2/bin", "darwin")).toBe("/Users/test/.nvm/versions/node/v22.22.2/bin:/usr/bin:/bin:/usr/sbin:/sbin");
38
80
  });
@@ -22,7 +22,7 @@ export async function waitForPublicReadiness(publicUrl, options = {}) {
22
22
  try {
23
23
  const response = await fetchImpl(endpoint, {
24
24
  cache: "no-store",
25
- headers: { "user-agent": "agentroam-readiness/0.2.0-preview.11" },
25
+ headers: { "user-agent": "agentroam-readiness/0.2.0-preview.12" },
26
26
  signal: options.signal,
27
27
  });
28
28
  if (response.ok) {
package/install/README.md CHANGED
@@ -5,7 +5,7 @@ These versioned installers support macOS Apple Silicon and Windows x64. They reu
5
5
  ## macOS Apple Silicon
6
6
 
7
7
  ```sh
8
- curl -fsSL https://gitee.com/caoqu/team-agent/releases/download/v0.2.0-preview.11/install-agentroam.sh | sh
8
+ curl -fsSL https://gitee.com/caoqu/team-agent/releases/download/v0.2.0-preview.12/install-agentroam.sh | sh
9
9
  ```
10
10
 
11
11
  The command installs the wrapper at `~/.local/bin/agentroam`. If that directory is not already in `PATH`, the installer prints the required shell setting without editing shell profiles.
@@ -13,7 +13,7 @@ The command installs the wrapper at `~/.local/bin/agentroam`. If that directory
13
13
  ## Windows x64
14
14
 
15
15
  ```powershell
16
- irm https://gitee.com/caoqu/team-agent/releases/download/v0.2.0-preview.11/install-agentroam.ps1 | iex
16
+ irm https://gitee.com/caoqu/team-agent/releases/download/v0.2.0-preview.12/install-agentroam.ps1 | iex
17
17
  ```
18
18
 
19
19
  The command installs `%USERPROFILE%\.agentroam\bin\agentroam.cmd` and adds only that user directory to the user-level `PATH`. It does not require administrator access or change the machine-level `PATH`.
@@ -24,6 +24,8 @@ Run the installer from the project directory AgentRoam should expose, or set `AG
24
24
 
25
25
  The installer registers and starts the service after Node, CLI, and `doctor` validation. When a previous AgentRoam user service is installed, the new CLI stops it, waits for its process and platform registration to exit, removes only the old service registration, and then registers the replacement. Session data, pairing state, managed runtimes, and logs remain in the data directory. While foreground AgentRoam or the service is running, it prevents idle system sleep but still allows the display to dim and turn off. Lid close, explicit sleep, hibernation, shutdown, and low-battery forced sleep remain controlled by the operating system.
26
26
 
27
+ On interactive terminals, `service install`, `start`, `status`, and `restart` print a scannable QR code beside the `Open:` URL. Piped or redirected output stays plain text, and `agentroam service install --no-qr` suppresses the code. `service url` always prints only the raw URL for scripting.
28
+
27
29
  Use the installer for first installation, upgrades, and repair. Use these commands for routine control:
28
30
 
29
31
  ```text
@@ -38,7 +40,7 @@ agentroam service uninstall
38
40
 
39
41
  ## Data and updates
40
42
 
41
- Set `AGENTROAM_DATA_DIR` before running either installer to override the default `~/.agentroam` data directory. Node is stored at `<data-dir>/runtimes/node/22.22.0`, and the launcher is stored at `<data-dir>/launcher/0.2.0-preview.11`.
43
+ Set `AGENTROAM_DATA_DIR` before running either installer to override the default `~/.agentroam` data directory. Node is stored at `<data-dir>/runtimes/node/22.22.0`, and the launcher is stored at `<data-dir>/launcher/0.2.0-preview.12`.
42
44
 
43
45
  Each AgentRoam release pins its own Node patch and installer assets. Updates happen only by running a newer versioned installer or installing a newer AgentRoam release; startup never follows a moving Node.js release channel.
44
46
 
@@ -2,7 +2,7 @@ $ErrorActionPreference = "Stop"
2
2
  $ProgressPreference = "SilentlyContinue"
3
3
 
4
4
  $NodeVersion = "22.22.0"
5
- $AgentRoamVersion = "0.2.0-preview.11"
5
+ $AgentRoamVersion = "0.2.0-preview.12"
6
6
  $NodeArchive = "node-v22.22.0-win-x64.zip"
7
7
  $NodeSha256 = "c97fa376d2becdc8863fcd3ca2dd9a83a9f3468ee7ccf7a6d076ec66a645c77a"
8
8
  $NodeUrl = "https://nodejs.org/dist/v22.22.0/$NodeArchive"
@@ -2,7 +2,7 @@
2
2
  set -eu
3
3
 
4
4
  NODE_VERSION="22.22.0"
5
- AGENTROAM_VERSION="0.2.0-preview.11"
5
+ AGENTROAM_VERSION="0.2.0-preview.12"
6
6
  NODE_ARCHIVE="node-v22.22.0-darwin-arm64.tar.xz"
7
7
  NODE_SHA256="2bd596bbfc4a275ceb8721a5954ee97daea5ebe673e96a185ebd732f6fb023ac"
8
8
  NODE_URL="https://nodejs.org/dist/v22.22.0/$NODE_ARCHIVE"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentroam",
3
- "version": "0.2.0-preview.11",
3
+ "version": "0.2.0-preview.12",
4
4
  "description": "Zero-install mobile remote terminal and file console",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,12 +26,12 @@
26
26
  "undici": "^6.25.0"
27
27
  },
28
28
  "optionalDependencies": {
29
- "agentroam-runtime-darwin-arm64": "0.2.0-preview.11",
30
- "agentroam-runtime-win32-x64": "0.2.0-preview.11",
31
- "agentroam-cloudflared-darwin-arm64": "0.2.0-preview.11",
32
- "agentroam-cloudflared-win32-x64": "0.2.0-preview.11",
33
- "agentroam-tui-darwin-arm64": "0.2.0-preview.11",
34
- "@caoqu/agentroam-tui-win32-x64": "0.2.0-preview.11"
29
+ "agentroam-runtime-darwin-arm64": "0.2.0-preview.12",
30
+ "agentroam-runtime-win32-x64": "0.2.0-preview.12",
31
+ "agentroam-cloudflared-darwin-arm64": "0.2.0-preview.12",
32
+ "agentroam-cloudflared-win32-x64": "0.2.0-preview.12",
33
+ "agentroam-tui-darwin-arm64": "0.2.0-preview.12",
34
+ "@caoqu/agentroam-tui-win32-x64": "0.2.0-preview.12"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^22.0.0",