agentroam 0.2.0-preview.54 → 0.2.0-preview.56
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.
|
@@ -19,6 +19,15 @@ async function requestAuthorization(dataDir, body, signal) {
|
|
|
19
19
|
function recoveryHint(log) {
|
|
20
20
|
log("稍后重新授权:agentroam desktop authorize;也可在本机浏览器的“远程授权”面板中操作。");
|
|
21
21
|
}
|
|
22
|
+
function reportComponent(status, log) {
|
|
23
|
+
if (!status.component)
|
|
24
|
+
return;
|
|
25
|
+
const component = status.component;
|
|
26
|
+
log(`远控组件:${terminalText(component.version === 'legacy' ? '旧版(未记录版本)' : component.version)}`);
|
|
27
|
+
log(`授权应用位置:${terminalText(component.path)}`);
|
|
28
|
+
if (component.updatePending)
|
|
29
|
+
log('旧版远控组件仍在使用;结束其他 AgentRoam 的桌面共享后,重新授权即可更新。');
|
|
30
|
+
}
|
|
22
31
|
function complete(status) {
|
|
23
32
|
return status.enabled && status.screen && status.accessibility && !status.error;
|
|
24
33
|
}
|
|
@@ -35,7 +44,16 @@ export async function authorizeRemoteDesktop(dataDir, context = {}) {
|
|
|
35
44
|
const prompt = new DesktopAuthorizationPrompt({ input, ownsInput: context.input === undefined && input !== process.stdin,
|
|
36
45
|
signal: context.signal, timeoutMs: context.timeoutMs ?? 60_000, log });
|
|
37
46
|
const run = (operation) => withAuthorizationSignal(operation, prompt.signal);
|
|
38
|
-
|
|
47
|
+
let reportedComponent = '';
|
|
48
|
+
const check = async (body) => {
|
|
49
|
+
const status = await run(() => request(dataDir, body, prompt.signal));
|
|
50
|
+
const identity = JSON.stringify(status.component) ?? '';
|
|
51
|
+
if (identity !== reportedComponent) {
|
|
52
|
+
reportComponent(status, log);
|
|
53
|
+
reportedComponent = identity;
|
|
54
|
+
}
|
|
55
|
+
return status;
|
|
56
|
+
};
|
|
39
57
|
log("远程桌面授权可选;输入 s 后回车或按 Ctrl+C 可跳过,稍后可重新授权。");
|
|
40
58
|
try {
|
|
41
59
|
let status = await withCliProgress("正在检查本机远程桌面权限", () => check());
|
|
@@ -129,6 +147,7 @@ export async function runDesktopCommand(options, context = {}) {
|
|
|
129
147
|
}
|
|
130
148
|
if (status.supported && status.installed)
|
|
131
149
|
status = await request(options.dataDir, { action: "recheck" });
|
|
150
|
+
reportComponent(status, log);
|
|
132
151
|
log(`远程桌面:${status.supported ? "支持" : "不支持"};共享:${status.enabled ? "已开启" : "未开启"};屏幕录制:${status.screen ? "已授权" : "未授权或桌面不可用"};辅助功能:${status.accessibility ? "已授权" : "未授权"}`);
|
|
133
152
|
if (status.error)
|
|
134
153
|
log(`状态提示:${terminalText(status.error)}`);
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"windows-amd64": {
|
|
10
10
|
"fileName": "install-agentroam.ps1",
|
|
11
|
-
"sha256": "
|
|
12
|
-
"size":
|
|
11
|
+
"sha256": "766f1c59d436f762ae5b874175a5fe117da1a6dfdc2bc3442a599dff851b73fe",
|
|
12
|
+
"size": 19124
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentroam",
|
|
3
|
-
"version": "0.2.0-preview.
|
|
3
|
+
"version": "0.2.0-preview.56",
|
|
4
4
|
"description": "Zero-install mobile remote terminal and file console",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"ws": "^8.21.3"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"agentroam-runtime-darwin-arm64": "0.2.0-preview.
|
|
31
|
-
"agentroam-runtime-win32-x64": "0.2.0-preview.
|
|
32
|
-
"agentroam-cloudflared-darwin-arm64": "0.2.0-preview.
|
|
33
|
-
"agentroam-cloudflared-win32-x64": "0.2.0-preview.
|
|
34
|
-
"agentroam-tui-darwin-arm64": "0.2.0-preview.
|
|
35
|
-
"@caoqu/agentroam-tui-win32-x64": "0.2.0-preview.
|
|
30
|
+
"agentroam-runtime-darwin-arm64": "0.2.0-preview.56",
|
|
31
|
+
"agentroam-runtime-win32-x64": "0.2.0-preview.56",
|
|
32
|
+
"agentroam-cloudflared-darwin-arm64": "0.2.0-preview.55",
|
|
33
|
+
"agentroam-cloudflared-win32-x64": "0.2.0-preview.55",
|
|
34
|
+
"agentroam-tui-darwin-arm64": "0.2.0-preview.55",
|
|
35
|
+
"@caoqu/agentroam-tui-win32-x64": "0.2.0-preview.55"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.0.0",
|