@rynx-ai/cli 0.1.11-beta.15 → 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.
- package/dist/commands/setup.js +11 -25
- package/dist/standalone.js +3 -0
- package/package.json +7 -6
package/dist/commands/setup.js
CHANGED
|
@@ -3,7 +3,8 @@ 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 {
|
|
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
9
|
import { fail } from "./errors.js";
|
|
9
10
|
export async function runSetupCommand(args) {
|
|
@@ -50,9 +51,6 @@ export async function runSetupCommand(args) {
|
|
|
50
51
|
plugins: {
|
|
51
52
|
status: "ready",
|
|
52
53
|
},
|
|
53
|
-
systemDependencies: {
|
|
54
|
-
tmux: { installed: false },
|
|
55
|
-
},
|
|
56
54
|
};
|
|
57
55
|
let failed = false;
|
|
58
56
|
progress?.start("正在准备 Rynx 内置插件");
|
|
@@ -74,22 +72,6 @@ export async function runSetupCommand(args) {
|
|
|
74
72
|
};
|
|
75
73
|
console.error(`Rynx 内置插件准备失败:${detail}`);
|
|
76
74
|
}
|
|
77
|
-
progress?.start("正在检查 tmux");
|
|
78
|
-
try {
|
|
79
|
-
result.systemDependencies = await ensureSystemDependencies({
|
|
80
|
-
...(progress ? { onProgress: (message) => progress.update(message) } : {}),
|
|
81
|
-
});
|
|
82
|
-
progress?.succeed("tmux 已就绪");
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
failed = true;
|
|
86
|
-
progress?.clear();
|
|
87
|
-
const detail = errorMessage(error);
|
|
88
|
-
result.systemDependencies = {
|
|
89
|
-
tmux: { installed: false, detail },
|
|
90
|
-
};
|
|
91
|
-
console.error(`tmux 准备失败:${detail}`);
|
|
92
|
-
}
|
|
93
75
|
progress?.start("正在检查 Rynx Browser");
|
|
94
76
|
const diagnostics = await inspectDaemonDiagnostics();
|
|
95
77
|
if (!diagnostics.browser.supported) {
|
|
@@ -146,14 +128,10 @@ export async function runSetupCommand(args) {
|
|
|
146
128
|
else if (result.browser.status === "error") {
|
|
147
129
|
prompts.log.warn(`Session Browser: ${result.browser.detail}`);
|
|
148
130
|
}
|
|
149
|
-
if (result.systemDependencies.tmux.installed) {
|
|
150
|
-
prompts.log.success("tmux ready");
|
|
151
|
-
}
|
|
152
131
|
prompts.outro(failed ? "初始化完成,但存在失败项" : "配置完成");
|
|
153
132
|
}
|
|
154
133
|
else {
|
|
155
134
|
console.log(`Initialized ${result.configPath}`);
|
|
156
|
-
console.log(`tmux: ${result.systemDependencies.tmux.installed ? "installed" : "not installed"}`);
|
|
157
135
|
if (result.browser.status === "ready") {
|
|
158
136
|
console.log(`Browser ready${result.browser.version ? `: ${result.browser.version}` : ""}`);
|
|
159
137
|
}
|
|
@@ -182,7 +160,15 @@ export async function runDoctorCommand(args) {
|
|
|
182
160
|
return { id, installed: !probe.error && probe.status === 0 };
|
|
183
161
|
});
|
|
184
162
|
const daemon = await inspectDaemonDiagnostics();
|
|
185
|
-
const
|
|
163
|
+
const tmuxBin = resolveBundledTmux();
|
|
164
|
+
const systemDependencies = tmuxBin
|
|
165
|
+
? await inspectSystemDependencies({ tmuxBin })
|
|
166
|
+
: {
|
|
167
|
+
tmux: {
|
|
168
|
+
installed: false,
|
|
169
|
+
detail: BUNDLED_TMUX_UNAVAILABLE_MESSAGE,
|
|
170
|
+
},
|
|
171
|
+
};
|
|
186
172
|
const result = {
|
|
187
173
|
ok: configError === undefined &&
|
|
188
174
|
runtimes.some((runtime) => runtime.installed) &&
|
package/dist/standalone.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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
5
|
import { ensureDaemonControlEndpoint, resolveDaemonControlEndpoint, } from "./control-endpoint.js";
|
|
5
6
|
/** Resolve the canonical Builtin Skill directory shipped by this exact CLI. */
|
|
@@ -8,6 +9,7 @@ export function standaloneBuiltinSkillsDirectory(moduleUrl = import.meta.url) {
|
|
|
8
9
|
}
|
|
9
10
|
export async function startStandaloneDaemon(options = {}) {
|
|
10
11
|
const cliVersion = installedVersion();
|
|
12
|
+
const tmuxBin = resolveBundledTmux();
|
|
11
13
|
const { startDaemon } = await import("@rynx-ai/daemon/lifecycle");
|
|
12
14
|
return startDaemon({
|
|
13
15
|
force: options.restart ?? false,
|
|
@@ -16,6 +18,7 @@ export async function startStandaloneDaemon(options = {}) {
|
|
|
16
18
|
builtinSkillsDir: standaloneBuiltinSkillsDirectory(),
|
|
17
19
|
cliVersion,
|
|
18
20
|
productVersion: cliVersion,
|
|
21
|
+
...(tmuxBin ? { tmuxBin } : {}),
|
|
19
22
|
},
|
|
20
23
|
});
|
|
21
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rynx-ai/cli",
|
|
3
|
-
"version": "0.1.11-beta.
|
|
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,11 +51,12 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@clack/prompts": "^1.6.0",
|
|
53
53
|
"ws": "^8.21.0",
|
|
54
|
-
"@rynx-ai/
|
|
55
|
-
"@rynx-ai/
|
|
56
|
-
"@rynx-ai/
|
|
57
|
-
"@rynx-ai/emulator": "0.1.11-beta.
|
|
58
|
-
"@rynx-ai/protocol": "0.1.11-beta.
|
|
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"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"@types/ws": "^8.18.1"
|