@rynx-ai/cli 0.1.11-beta.16 → 0.1.11-beta.18

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.
@@ -3,9 +3,9 @@ import { chmodSync, existsSync, mkdirSync, openSync, closeSync, readFileSync, re
3
3
  import path from "node:path";
4
4
  import * as prompts from "@clack/prompts";
5
5
  import { AGENT_RUNTIME_IDS, getRuntimeProfile, loadConfig, rynxConfigFile, } from "@rynx-ai/core";
6
- import { inspectDaemonDiagnostics, inspectSystemDependencies, prepareBundledPlugins, verifySystemDependencies, } from "@rynx-ai/daemon/setup-service";
6
+ import { inspectDaemonDiagnostics, inspectSystemDependencies, prepareBundledPlugins, } from "@rynx-ai/daemon/setup-service";
7
+ import { BUNDLED_TMUX_UNAVAILABLE_MESSAGE, resolveBundledTmux, } from "@rynx-ai/tmux";
7
8
  import { createProgressDisplay } from "../progress-display.js";
8
- import { BUNDLED_TMUX_UNAVAILABLE_MESSAGE, resolveTmuxExecutable, } from "../bundled-tmux.js";
9
9
  import { fail } from "./errors.js";
10
10
  export async function runSetupCommand(args) {
11
11
  const options = parseSetupOptions(args);
@@ -51,9 +51,6 @@ export async function runSetupCommand(args) {
51
51
  plugins: {
52
52
  status: "ready",
53
53
  },
54
- systemDependencies: {
55
- tmux: { installed: false },
56
- },
57
54
  };
58
55
  let failed = false;
59
56
  progress?.start("正在准备 Rynx 内置插件");
@@ -75,24 +72,6 @@ export async function runSetupCommand(args) {
75
72
  };
76
73
  console.error(`Rynx 内置插件准备失败:${detail}`);
77
74
  }
78
- progress?.start("正在检查 tmux");
79
- try {
80
- const tmuxBin = resolveTmuxExecutable();
81
- if (!tmuxBin) {
82
- throw new Error(BUNDLED_TMUX_UNAVAILABLE_MESSAGE);
83
- }
84
- result.systemDependencies = await verifySystemDependencies({ tmuxBin });
85
- progress?.succeed("tmux 已就绪");
86
- }
87
- catch (error) {
88
- failed = true;
89
- progress?.clear();
90
- const detail = errorMessage(error);
91
- result.systemDependencies = {
92
- tmux: { installed: false, detail },
93
- };
94
- console.error(`tmux 准备失败:${detail}`);
95
- }
96
75
  progress?.start("正在检查 Rynx Browser");
97
76
  const diagnostics = await inspectDaemonDiagnostics();
98
77
  if (!diagnostics.browser.supported) {
@@ -149,14 +128,10 @@ export async function runSetupCommand(args) {
149
128
  else if (result.browser.status === "error") {
150
129
  prompts.log.warn(`Session Browser: ${result.browser.detail}`);
151
130
  }
152
- if (result.systemDependencies.tmux.installed) {
153
- prompts.log.success("tmux ready");
154
- }
155
131
  prompts.outro(failed ? "初始化完成,但存在失败项" : "配置完成");
156
132
  }
157
133
  else {
158
134
  console.log(`Initialized ${result.configPath}`);
159
- console.log(`tmux: ${result.systemDependencies.tmux.installed ? "installed" : "not installed"}`);
160
135
  if (result.browser.status === "ready") {
161
136
  console.log(`Browser ready${result.browser.version ? `: ${result.browser.version}` : ""}`);
162
137
  }
@@ -185,7 +160,7 @@ export async function runDoctorCommand(args) {
185
160
  return { id, installed: !probe.error && probe.status === 0 };
186
161
  });
187
162
  const daemon = await inspectDaemonDiagnostics();
188
- const tmuxBin = resolveTmuxExecutable();
163
+ const tmuxBin = resolveBundledTmux();
189
164
  const systemDependencies = tmuxBin
190
165
  ? await inspectSystemDependencies({ tmuxBin })
191
166
  : {
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
+ import { resolveBundledTmux } from "@rynx-ai/tmux";
3
4
  import { installedVersion } from "./version.js";
4
- import { BUNDLED_TMUX_UNAVAILABLE_MESSAGE, resolveTmuxExecutable, } from "./bundled-tmux.js";
5
5
  import { ensureDaemonControlEndpoint, resolveDaemonControlEndpoint, } from "./control-endpoint.js";
6
6
  /** Resolve the canonical Builtin Skill directory shipped by this exact CLI. */
7
7
  export function standaloneBuiltinSkillsDirectory(moduleUrl = import.meta.url) {
@@ -9,9 +9,7 @@ export function standaloneBuiltinSkillsDirectory(moduleUrl = import.meta.url) {
9
9
  }
10
10
  export async function startStandaloneDaemon(options = {}) {
11
11
  const cliVersion = installedVersion();
12
- const tmuxBin = resolveTmuxExecutable();
13
- if (!tmuxBin)
14
- throw new Error(BUNDLED_TMUX_UNAVAILABLE_MESSAGE);
12
+ const tmuxBin = resolveBundledTmux();
15
13
  const { startDaemon } = await import("@rynx-ai/daemon/lifecycle");
16
14
  return startDaemon({
17
15
  force: options.restart ?? false,
@@ -20,7 +18,7 @@ export async function startStandaloneDaemon(options = {}) {
20
18
  builtinSkillsDir: standaloneBuiltinSkillsDirectory(),
21
19
  cliVersion,
22
20
  productVersion: cliVersion,
23
- tmuxBin,
21
+ ...(tmuxBin ? { tmuxBin } : {}),
24
22
  },
25
23
  });
26
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynx-ai/cli",
3
- "version": "0.1.11-beta.16",
3
+ "version": "0.1.11-beta.18",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/rynx-ai/rynx.git",
@@ -51,17 +51,12 @@
51
51
  "dependencies": {
52
52
  "@clack/prompts": "^1.6.0",
53
53
  "ws": "^8.21.0",
54
- "@rynx-ai/browser-cdp": "0.1.11-beta.16",
55
- "@rynx-ai/core": "0.1.11-beta.16",
56
- "@rynx-ai/daemon": "0.1.11-beta.16",
57
- "@rynx-ai/emulator": "0.1.11-beta.16",
58
- "@rynx-ai/protocol": "0.1.11-beta.16"
59
- },
60
- "optionalDependencies": {
61
- "@rynx-ai/tmux-darwin-arm64": "0.1.11-beta.16",
62
- "@rynx-ai/tmux-linux-arm64": "0.1.11-beta.16",
63
- "@rynx-ai/tmux-darwin-x64": "0.1.11-beta.16",
64
- "@rynx-ai/tmux-linux-x64": "0.1.11-beta.16"
54
+ "@rynx-ai/core": "0.1.11-beta.18",
55
+ "@rynx-ai/daemon": "0.1.11-beta.18",
56
+ "@rynx-ai/browser-cdp": "0.1.11-beta.18",
57
+ "@rynx-ai/emulator": "0.1.11-beta.18",
58
+ "@rynx-ai/protocol": "0.1.11-beta.18",
59
+ "@rynx-ai/tmux": "0.1.11-beta.18"
65
60
  },
66
61
  "devDependencies": {
67
62
  "@types/ws": "^8.18.1"
@@ -1,10 +0,0 @@
1
- export declare const BUNDLED_TMUX_UNAVAILABLE_MESSAGE = "Rynx bundled tmux is unavailable; reinstall @rynx-ai/cli without omitting optional dependencies";
2
- export interface BundledTmuxResolutionOptions {
3
- platform?: string;
4
- arch?: string;
5
- resolve?: (specifier: string) => string;
6
- }
7
- /** Resolve the executable shipped for this CLI's exact OS/architecture. */
8
- export declare function resolveBundledTmux(options?: BundledTmuxResolutionOptions): string | undefined;
9
- /** An explicit operator override wins; otherwise prefer the CLI-bundled binary. */
10
- export declare function resolveTmuxExecutable(env?: NodeJS.ProcessEnv, options?: BundledTmuxResolutionOptions): string | undefined;
@@ -1,32 +0,0 @@
1
- import { accessSync, constants } from "node:fs";
2
- import { createRequire } from "node:module";
3
- const require = createRequire(import.meta.url);
4
- export const BUNDLED_TMUX_UNAVAILABLE_MESSAGE = "Rynx bundled tmux is unavailable; reinstall @rynx-ai/cli without omitting optional dependencies";
5
- const BUNDLED_TMUX_PACKAGES = {
6
- "darwin-arm64": "@rynx-ai/tmux-darwin-arm64/bin/tmux",
7
- "darwin-x64": "@rynx-ai/tmux-darwin-x64/bin/tmux",
8
- "linux-arm64": "@rynx-ai/tmux-linux-arm64/bin/tmux",
9
- "linux-x64": "@rynx-ai/tmux-linux-x64/bin/tmux",
10
- };
11
- /** Resolve the executable shipped for this CLI's exact OS/architecture. */
12
- export function resolveBundledTmux(options = {}) {
13
- const platform = options.platform ?? process.platform;
14
- const arch = options.arch ?? process.arch;
15
- const specifier = BUNDLED_TMUX_PACKAGES[`${platform}-${arch}`];
16
- if (!specifier)
17
- return undefined;
18
- let executable;
19
- try {
20
- executable = (options.resolve ?? require.resolve)(specifier);
21
- accessSync(executable, constants.X_OK);
22
- }
23
- catch {
24
- return undefined;
25
- }
26
- return executable;
27
- }
28
- /** An explicit operator override wins; otherwise prefer the CLI-bundled binary. */
29
- export function resolveTmuxExecutable(env = process.env, options = {}) {
30
- const override = env.RYNX_TMUX_BIN?.trim();
31
- return override || resolveBundledTmux(options);
32
- }