agentroam 0.2.0-preview.18 → 0.2.0-preview.19

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.
@@ -1,3 +1,4 @@
1
+ import { readFileSync } from "node:fs";
1
2
  import { createHash } from 'node:crypto';
2
3
  import { createWriteStream } from 'node:fs';
3
4
  import { mkdir, mkdtemp, rename, rm } from 'node:fs/promises';
@@ -23,6 +24,8 @@ export function desktopAsset(manifest, version, platform, arch) {
23
24
  }
24
25
 
25
26
  export async function downloadDesktop(version, { platform = process.platform, arch = process.arch, directory = join(homedir(), 'Downloads'), fetchImpl = fetch } = {}) {
27
+ const launcher = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
28
+ if (version === launcher.version) version = launcher.optionalDependencies["agentroam-runtime-darwin-arm64"];
26
29
  // Validate coordinates before making any request.
27
30
  if (!/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-preview\.(0|[1-9]\d*))?$/.test(version)) throw new Error('Invalid AgentRoam version');
28
31
  const response = await fetchImpl(`${RELEASE_BASE}/v${version}/release-manifest.json`, { signal: AbortSignal.timeout(30_000) });
@@ -1,6 +1,6 @@
1
- import { AGENTROAM_VERSION, requirePlatformPackages } from "../platform-packages.js";
1
+ import { PLATFORM_DEPENDENCY_VERSIONS, requirePlatformPackages } from "../platform-packages.js";
2
2
  export const CLOUDFLARED_VERSION = "2026.8.2";
3
- export const CLOUDFLARED_PACKAGE_VERSION = AGENTROAM_VERSION;
3
+ export const CLOUDFLARED_PACKAGE_VERSION = PLATFORM_DEPENDENCY_VERSIONS[requirePlatformPackages("darwin-arm64").cloudflared];
4
4
  export const CLOUDFLARED_PACKAGES = {
5
5
  "darwin-arm64": requirePlatformPackages("darwin-arm64").cloudflared,
6
6
  "windows-amd64": requirePlatformPackages("windows-amd64").cloudflared,
@@ -2,7 +2,9 @@ import { readFileSync } from "node:fs";
2
2
  import { createRequire } from "node:module";
3
3
  import { dirname } from "node:path";
4
4
  import { MINIMUM_NODE_VERSION, assertSupportedNodeVersion } from "../bin/runtime-policy.mjs";
5
- export const AGENTROAM_VERSION = "0.2.0-preview.18";
5
+ const launcherManifest = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
6
+ export const AGENTROAM_VERSION = launcherManifest.version;
7
+ export const PLATFORM_DEPENDENCY_VERSIONS = launcherManifest.optionalDependencies;
6
8
  export const PLATFORM_PACKAGES = {
7
9
  "darwin-arm64": {
8
10
  runtime: "agentroam-runtime-darwin-arm64",
@@ -36,7 +38,7 @@ export function resolvePlatformRuntime(target, requireFromCli = createRequire(im
36
38
  throw error;
37
39
  }
38
40
  const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
39
- if (manifest.packageVersion !== AGENTROAM_VERSION
41
+ if (manifest.packageVersion !== PLATFORM_DEPENDENCY_VERSIONS[packageName]
40
42
  || manifest.target !== target
41
43
  || manifest.schemaVersion !== 2
42
44
  || manifest.minimumNodeVersion !== MINIMUM_NODE_VERSION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentroam",
3
- "version": "0.2.0-preview.18",
3
+ "version": "0.2.0-preview.19",
4
4
  "description": "Zero-install mobile remote terminal and file console",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,8 +30,8 @@
30
30
  "agentroam-runtime-win32-x64": "0.2.0-preview.18",
31
31
  "agentroam-cloudflared-darwin-arm64": "0.2.0-preview.18",
32
32
  "agentroam-cloudflared-win32-x64": "0.2.0-preview.18",
33
- "agentroam-tui-darwin-arm64": "0.2.0-preview.18",
34
- "@caoqu/agentroam-tui-win32-x64": "0.2.0-preview.18"
33
+ "agentroam-tui-darwin-arm64": "0.2.0-preview.19",
34
+ "@caoqu/agentroam-tui-win32-x64": "0.2.0-preview.19"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^22.0.0",