@rynx-ai/cli 0.1.11-beta.7 → 0.1.11-beta.8
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 +27 -2
- package/package.json +6 -6
package/dist/commands/setup.js
CHANGED
|
@@ -3,7 +3,7 @@ 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, prepareBundledPlugins, } from "@rynx-ai/daemon/setup-service";
|
|
6
|
+
import { ensureSystemDependencies, inspectDaemonDiagnostics, inspectSystemDependencies, prepareBundledPlugins, } from "@rynx-ai/daemon/setup-service";
|
|
7
7
|
import { fail } from "./errors.js";
|
|
8
8
|
export async function runSetupCommand(args) {
|
|
9
9
|
const options = parseSetupOptions(args);
|
|
@@ -48,6 +48,9 @@ export async function runSetupCommand(args) {
|
|
|
48
48
|
plugins: {
|
|
49
49
|
status: "ready",
|
|
50
50
|
},
|
|
51
|
+
systemDependencies: {
|
|
52
|
+
tmux: { installed: false },
|
|
53
|
+
},
|
|
51
54
|
};
|
|
52
55
|
let failed = false;
|
|
53
56
|
try {
|
|
@@ -64,6 +67,19 @@ export async function runSetupCommand(args) {
|
|
|
64
67
|
detail: errorMessage(error),
|
|
65
68
|
};
|
|
66
69
|
}
|
|
70
|
+
try {
|
|
71
|
+
result.systemDependencies = await ensureSystemDependencies({
|
|
72
|
+
onProgress: (message) => console.error(message),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
failed = true;
|
|
77
|
+
const detail = errorMessage(error);
|
|
78
|
+
result.systemDependencies = {
|
|
79
|
+
tmux: { installed: false, detail },
|
|
80
|
+
};
|
|
81
|
+
console.error(`tmux: ${detail}`);
|
|
82
|
+
}
|
|
67
83
|
const diagnostics = await inspectDaemonDiagnostics();
|
|
68
84
|
if (!diagnostics.browser.supported) {
|
|
69
85
|
result.browser = { action: options.browser, status: "unsupported" };
|
|
@@ -108,10 +124,14 @@ export async function runSetupCommand(args) {
|
|
|
108
124
|
else if (result.browser.status === "error") {
|
|
109
125
|
prompts.log.warn(`Session Browser: ${result.browser.detail}`);
|
|
110
126
|
}
|
|
127
|
+
if (result.systemDependencies.tmux.installed) {
|
|
128
|
+
prompts.log.success("tmux ready");
|
|
129
|
+
}
|
|
111
130
|
prompts.outro(failed ? "初始化完成,但存在失败项" : "配置完成");
|
|
112
131
|
}
|
|
113
132
|
else {
|
|
114
133
|
console.log(`Initialized ${result.configPath}`);
|
|
134
|
+
console.log(`tmux: ${result.systemDependencies.tmux.installed ? "installed" : "not installed"}`);
|
|
115
135
|
if (result.browser.status === "ready") {
|
|
116
136
|
console.log(`Browser ready${result.browser.version ? `: ${result.browser.version}` : ""}`);
|
|
117
137
|
}
|
|
@@ -140,13 +160,17 @@ export async function runDoctorCommand(args) {
|
|
|
140
160
|
return { id, installed: !probe.error && probe.status === 0 };
|
|
141
161
|
});
|
|
142
162
|
const daemon = await inspectDaemonDiagnostics();
|
|
163
|
+
const systemDependencies = await inspectSystemDependencies();
|
|
143
164
|
const result = {
|
|
144
|
-
ok: configError === undefined &&
|
|
165
|
+
ok: configError === undefined &&
|
|
166
|
+
runtimes.some((runtime) => runtime.installed) &&
|
|
167
|
+
systemDependencies.tmux.installed,
|
|
145
168
|
configPath: rynxConfigFile(),
|
|
146
169
|
config,
|
|
147
170
|
configError,
|
|
148
171
|
runtimes,
|
|
149
172
|
daemon,
|
|
173
|
+
systemDependencies,
|
|
150
174
|
};
|
|
151
175
|
if (json)
|
|
152
176
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -159,6 +183,7 @@ export async function runDoctorCommand(args) {
|
|
|
159
183
|
for (const runtime of runtimes) {
|
|
160
184
|
console.log(`${runtime.id}: ${runtime.installed ? "installed" : "not installed"}`);
|
|
161
185
|
}
|
|
186
|
+
console.log(`tmux: ${systemDependencies.tmux.installed ? "installed" : "not installed"}`);
|
|
162
187
|
if (daemon.browser.supported) {
|
|
163
188
|
console.log(`browser: ${daemon.browser.installedVersion ?? daemon.browser.error ?? "not installed"}`);
|
|
164
189
|
}
|
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.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/rynx-ai/rynx.git",
|
|
@@ -51,11 +51,11 @@
|
|
|
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.
|
|
55
|
-
"@rynx-ai/
|
|
56
|
-
"@rynx-ai/
|
|
57
|
-
"@rynx-ai/
|
|
58
|
-
"@rynx-ai/
|
|
54
|
+
"@rynx-ai/browser-cdp": "0.1.11-beta.8",
|
|
55
|
+
"@rynx-ai/core": "0.1.11-beta.8",
|
|
56
|
+
"@rynx-ai/daemon": "0.1.11-beta.8",
|
|
57
|
+
"@rynx-ai/emulator": "0.1.11-beta.8",
|
|
58
|
+
"@rynx-ai/protocol": "0.1.11-beta.8"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/ws": "^8.18.1"
|