@xiaoqiong0v0/opencode-ssh-tool 0.4.0 → 0.5.1
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/README.md +22 -22
- package/dist/base-session.d.ts +128 -0
- package/dist/base-session.d.ts.map +1 -0
- package/dist/base-session.js +414 -0
- package/dist/base-session.js.map +1 -0
- package/dist/constants.d.ts +27 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +28 -3
- package/dist/constants.js.map +1 -1
- package/dist/history.d.ts +14 -5
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +25 -9
- package/dist/history.js.map +1 -1
- package/dist/i18n.d.ts +75 -227
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +65 -211
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -31
- package/dist/index.js.map +1 -1
- package/dist/last-match.d.ts +17 -0
- package/dist/last-match.d.ts.map +1 -0
- package/dist/last-match.js +63 -0
- package/dist/last-match.js.map +1 -0
- package/dist/local-session.d.ts +9 -91
- package/dist/local-session.d.ts.map +1 -1
- package/dist/local-session.js +46 -308
- package/dist/local-session.js.map +1 -1
- package/dist/log.d.ts +3 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +5 -0
- package/dist/log.js.map +1 -0
- package/dist/server.d.ts +32 -5
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +417 -349
- package/dist/server.js.map +1 -1
- package/dist/session.d.ts +15 -108
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +69 -361
- package/dist/session.js.map +1 -1
- package/dist/shell-adapter.d.ts +20 -0
- package/dist/shell-adapter.d.ts.map +1 -0
- package/dist/shell-adapter.js +70 -0
- package/dist/shell-adapter.js.map +1 -0
- package/dist/ssh-auth.d.ts.map +1 -1
- package/dist/ssh-auth.js +1 -2
- package/dist/ssh-auth.js.map +1 -1
- package/dist/utils.d.ts +25 -24
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +279 -45
- package/dist/utils.js.map +1 -1
- package/dist/web/app.css +43 -0
- package/dist/web/app.js +2 -0
- package/dist/web/fonts/CaskaydiaCoveNerdFontMono-Regular.ttf +0 -0
- package/dist/web/index.html +28 -0
- package/package.json +6 -3
package/dist/i18n.d.ts
CHANGED
|
@@ -11,148 +11,14 @@ export type FlatKey = {
|
|
|
11
11
|
export declare function getLang(configured?: Lang): Lang;
|
|
12
12
|
/** 工具描述与参数说明字典 */
|
|
13
13
|
export declare const T: {
|
|
14
|
-
readonly ssh_connect: {
|
|
15
|
-
readonly en: "Open a long-lived SSH connection with a PTY shell in the current session. Reconnecting the same session closes the previous connection first. Returns a connection id.";
|
|
16
|
-
readonly zh: "在当前会话建立长驻 SSH 连接并打开 PTY shell;同一会话重复连接会先关闭旧连接。返回连接标识。";
|
|
17
|
-
};
|
|
18
|
-
readonly ssh_connect_args: {
|
|
19
|
-
readonly host: {
|
|
20
|
-
readonly en: "Target host or IP";
|
|
21
|
-
readonly zh: "目标主机 host / IP";
|
|
22
|
-
};
|
|
23
|
-
readonly user: {
|
|
24
|
-
readonly en: "Login username";
|
|
25
|
-
readonly zh: "登录用户名";
|
|
26
|
-
};
|
|
27
|
-
readonly port: {
|
|
28
|
-
readonly en: "Port, default 22";
|
|
29
|
-
readonly zh: "端口,默认 22";
|
|
30
|
-
};
|
|
31
|
-
readonly name: {
|
|
32
|
-
readonly en: "Terminal name within the session, default 'default'. Creating with an existing name closes the old one first. Use distinct names to keep multiple terminals.";
|
|
33
|
-
readonly zh: "会话内的终端名,默认 'default'。同名创建会先关闭旧终端。用不同名称可保持多个终端。";
|
|
34
|
-
};
|
|
35
|
-
readonly password: {
|
|
36
|
-
readonly en: "Password for password auth (optional). Supports plain text or 'file:<abs path>' to read from a file (avoids exposing it in context). If omitted, falls back to SSH key / agent / SSH_PASSWORD env.";
|
|
37
|
-
readonly zh: "密码认证密码(可选)。支持明文或 'file:<绝对路径>' 从文件读取(避免暴露在上下文中)。省略时回退到 SSH 私钥 / agent / 环境变量 SSH_PASSWORD。";
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
readonly term_exec: {
|
|
41
|
-
readonly en: "Execute a command in an SSH, local or container terminal (by terminal name), preserving cwd and environment. Commands outside the read-only allowlist require user approval.";
|
|
42
|
-
readonly zh: "在 SSH / 本地 / 容器终端(按终端名)执行命令,保留 cwd 与环境变量;白名单外的命令需用户审批。";
|
|
43
|
-
};
|
|
44
|
-
readonly term_exec_args: {
|
|
45
|
-
readonly command: {
|
|
46
|
-
readonly en: "Shell command to execute";
|
|
47
|
-
readonly zh: "要执行的 shell 命令";
|
|
48
|
-
};
|
|
49
|
-
readonly waitResult: {
|
|
50
|
-
readonly en: "Wait for the command to finish and return its output. Default false: submit async, return immediately; read results later via term_read.";
|
|
51
|
-
readonly zh: "是否等待命令完成并返回其输出。默认 false:异步提交,立即返回;稍后通过 term_read 读取结果。";
|
|
52
|
-
};
|
|
53
|
-
readonly name: {
|
|
54
|
-
readonly en: "Target terminal name, default 'default'. Must match a name from ssh_connect.";
|
|
55
|
-
readonly zh: "目标终端名,默认 'default'。需与 ssh_connect 创建的名称一致。";
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
14
|
readonly submitted: {
|
|
59
|
-
readonly en: "Command submitted (async). Running in background: check
|
|
60
|
-
readonly zh: "命令已异步提交,后台执行中:用
|
|
61
|
-
};
|
|
62
|
-
readonly term_read: {
|
|
63
|
-
readonly en: "Read output of an SSH, local or container terminal: buffered (unconsumed, for interactive/polling) or history (completed command+output pairs, first N or last N). Returns browser URL for the full scrollable viewer when the HTTP server is on.";
|
|
64
|
-
readonly zh: "读取 SSH / 本地 / 容器终端输出:缓冲(未消费,交互/轮询用)或历史(已完成的命令+输出对,前 N 条或后 N 条)。HTTP 服务开启时返回浏览器查看完整记录的地址。";
|
|
65
|
-
};
|
|
66
|
-
readonly term_send: {
|
|
67
|
-
readonly en: "Send text or keystrokes to an SSH, local or container terminal for interactive prompts (sudo password, confirmations, interrupts). Escapes: \\r or \\n = Enter, \\x03 = Ctrl-C, \\x04 = Ctrl-D, \\x1a = Ctrl-Z, \\x1b = Esc. After sending, read the result with term_read.";
|
|
68
|
-
readonly zh: "向 SSH / 本地 / 容器终端发送文本或按键,用于交互提示(sudo 密码、确认、中断等)。转义:\\r 或 \\n = 回车,\\x03 = Ctrl-C,\\x04 = Ctrl-D,\\x1a = Ctrl-Z,\\x1b = Esc。发送后用 term_read 读取结果。";
|
|
69
|
-
};
|
|
70
|
-
readonly term_send_args: {
|
|
71
|
-
readonly text: {
|
|
72
|
-
readonly en: "Text or key sequence to send. Use \\r or \\n for Enter, \\x03 for Ctrl-C, \\x1b for Esc. For sudo password prompts send the password followed by \\r.";
|
|
73
|
-
readonly zh: "要发送的文本或按键序列。回车用 \\r 或 \\n,Ctrl-C 用 \\x03,Esc 用 \\x1b。sudo 密码提示时发送密码后跟 \\r。";
|
|
74
|
-
};
|
|
75
|
-
readonly name: {
|
|
76
|
-
readonly en: "Target terminal name, default 'default'.";
|
|
77
|
-
readonly zh: "目标终端名,默认 'default'。";
|
|
78
|
-
};
|
|
15
|
+
readonly en: "Command submitted (async). Running in background: check term_cli status for completion, then term_cli read to read output.";
|
|
16
|
+
readonly zh: "命令已异步提交,后台执行中:用 term_cli status 查完成状态,再用 term_cli read 读取输出。";
|
|
79
17
|
};
|
|
80
18
|
readonly send_ok: {
|
|
81
19
|
readonly en: "Sent: {text}";
|
|
82
20
|
readonly zh: "已发送:{text}";
|
|
83
21
|
};
|
|
84
|
-
readonly send_title: {
|
|
85
|
-
readonly en: "SSH send";
|
|
86
|
-
readonly zh: "SSH 发送";
|
|
87
|
-
};
|
|
88
|
-
readonly term_read_args: {
|
|
89
|
-
readonly source: {
|
|
90
|
-
readonly en: "Where to read from: 'buffer' (unconsumed live output) or 'history' (completed pairs, default).";
|
|
91
|
-
readonly zh: "读取来源:'buffer'(实时未消费输出)或 'history'(已完成消息对,默认)。";
|
|
92
|
-
};
|
|
93
|
-
readonly lines: {
|
|
94
|
-
readonly en: "Max lines to read from buffer, all if omitted";
|
|
95
|
-
readonly zh: "读取缓冲行数上限,默认全部";
|
|
96
|
-
};
|
|
97
|
-
readonly direction: {
|
|
98
|
-
readonly en: "Which end to take (history): 'tail' (last N, default) or 'head' (first N). At most N pairs.";
|
|
99
|
-
readonly zh: "取哪一端(history):'tail'(最后 N 条,默认)或 'head'(前 N 条)。最多 N 条。";
|
|
100
|
-
};
|
|
101
|
-
readonly limit: {
|
|
102
|
-
readonly en: "Number of pairs to return (history, default 10). Capped at total pairs.";
|
|
103
|
-
readonly zh: "返回的对数(history,默认 10)。不超过总对数。";
|
|
104
|
-
};
|
|
105
|
-
readonly includeCommand: {
|
|
106
|
-
readonly en: "Whether to include the command line in history output. Default false (output only).";
|
|
107
|
-
readonly zh: "是否在 history 结果中包含命令行。默认 false(只返回输出)。";
|
|
108
|
-
};
|
|
109
|
-
readonly name: {
|
|
110
|
-
readonly en: "Target terminal name, default 'default'.";
|
|
111
|
-
readonly zh: "目标终端名,默认 'default'。";
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
readonly term_status: {
|
|
115
|
-
readonly en: "Check SSH/local/container terminal state (busy, pending, connection) by terminal name (all terminals if omitted) and the HTTP server state (URL/port/session count). Use busy to poll completion instead of reading animated output.";
|
|
116
|
-
readonly zh: "按终端名检查 SSH / 本地 / 容器终端状态(busy、未消费量、连接;省略则列出全部终端)及 HTTP 服务状态(URL/端口/会话数)。用 busy 轮询完成情况,避免读取动画中间态。";
|
|
117
|
-
};
|
|
118
|
-
readonly term_status_args: {
|
|
119
|
-
readonly name: {
|
|
120
|
-
readonly en: "Terminal name to check; omit to list all terminals.";
|
|
121
|
-
readonly zh: "要检查的终端名;省略则列出全部终端。";
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
readonly term_disconnect: {
|
|
125
|
-
readonly en: "Close the terminal of a name (default 'default') for an SSH, local or container session, or all terminals when name is omitted, and clean up session state.";
|
|
126
|
-
readonly zh: "关闭指定名称(默认 'default')的 SSH / 本地 / 容器终端,name 省略则关闭全部终端,并清理会话态。";
|
|
127
|
-
};
|
|
128
|
-
readonly term_disconnect_args: {
|
|
129
|
-
readonly name: {
|
|
130
|
-
readonly en: "Terminal name to disconnect; omit to disconnect all terminals.";
|
|
131
|
-
readonly zh: "要断开的终端名;省略则断开全部终端。";
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
readonly local_connect: {
|
|
135
|
-
readonly en: "Start a local/container PTY terminal (e.g. pwsh, bash, docker exec -it <container> sh) in the current session. Same-session reconnect closes the previous one. Uses Bun.Terminal (runs in the opencode Bun runtime).";
|
|
136
|
-
readonly zh: "在当前会话启动本地/容器 PTY 终端(如 pwsh、bash、docker exec -it <容器> sh);同一会话重复启动会先关闭旧的。基于 Bun.Terminal(opencode Bun 运行时内运行)。";
|
|
137
|
-
};
|
|
138
|
-
readonly local_connect_args: {
|
|
139
|
-
readonly command: {
|
|
140
|
-
readonly en: "Command to launch, e.g. pwsh / bash / docker exec -it <container> sh";
|
|
141
|
-
readonly zh: "要启动的命令,如 pwsh / bash / docker exec -it <容器> sh";
|
|
142
|
-
};
|
|
143
|
-
readonly name: {
|
|
144
|
-
readonly en: "Terminal name within the session, default 'default'. Creating with an existing name closes the old one first.";
|
|
145
|
-
readonly zh: "会话内的终端名,默认 'default'。同名创建会先关闭旧终端。";
|
|
146
|
-
};
|
|
147
|
-
readonly cwd: {
|
|
148
|
-
readonly en: "Working directory, defaults to plugin cwd.";
|
|
149
|
-
readonly zh: "工作目录,默认插件所在目录。";
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
readonly local_connect_title_ok: {
|
|
153
|
-
readonly en: "Local terminal started";
|
|
154
|
-
readonly zh: "本地终端已启动";
|
|
155
|
-
};
|
|
156
22
|
readonly local_connect_ok: {
|
|
157
23
|
readonly en: "Started: {cmd} (terminal {name})";
|
|
158
24
|
readonly zh: "已启动:{cmd}(终端 {name})";
|
|
@@ -161,18 +27,19 @@ export declare const T: {
|
|
|
161
27
|
readonly en: "Local terminal start failed";
|
|
162
28
|
readonly zh: "本地终端启动失败";
|
|
163
29
|
};
|
|
164
|
-
readonly
|
|
165
|
-
readonly en: "Unified CLI
|
|
166
|
-
readonly zh: "
|
|
30
|
+
readonly term_cli: {
|
|
31
|
+
readonly en: "Unified terminal CLI: SSH (remote) / local shell (wsl, pwsh, bash) / container (docker exec) sessions. For ANY terminal you already have or can start locally — WSL, Docker containers, or local shells — use the 'local' subcommand INSTEAD of running commands via bash. Subcommands: connect / local / exec / read / send / status / disconnect / help. Use 'help' for full usage.";
|
|
32
|
+
readonly zh: "统一终端命令行工具:SSH(远程)/ 本地 shell(wsl、pwsh、bash)/ 容器(docker exec)会话。对任何本地可启动的终端——WSL、Docker 容器或本地 shell——应使用 'local' 子命令,而不是用 bash 直接执行。子命令: connect / local / exec / read / send / status / disconnect / help。用 'help' 查看完整用法。";
|
|
167
33
|
};
|
|
168
|
-
readonly
|
|
169
|
-
readonly en: "Full command line string, e.g. 'exec \"ls -la\" -w'
|
|
170
|
-
readonly zh: "完整命令行字符串,如 'exec \"ls -la\" -w'
|
|
34
|
+
readonly term_cli_args: {
|
|
35
|
+
readonly en: "Full command line string, e.g. 'local \"wsl bash\"' / 'exec \"ls -la\" -w' / 'connect user@host'; defaults to 'help' when empty.";
|
|
36
|
+
readonly zh: "完整命令行字符串,如 'local \"wsl bash\"' / 'exec \"ls -la\" -w' / 'connect user@host';空时默认 'help'。";
|
|
171
37
|
};
|
|
172
|
-
readonly
|
|
173
|
-
readonly en: `
|
|
38
|
+
readonly term_cli_help: {
|
|
39
|
+
readonly en: `term_cli unified CLI tool: manage SSH / local (wsl, pwsh, bash) / container (docker exec) terminal sessions.
|
|
40
|
+
Use 'local' for any terminal started on this machine (WSL, Docker containers, local shells).
|
|
174
41
|
|
|
175
|
-
Usage:
|
|
42
|
+
Usage: term_cli <subcommand> [args]
|
|
176
43
|
|
|
177
44
|
Subcommands:
|
|
178
45
|
connect <target> [-u user] [-n name] [-p password|file:path]
|
|
@@ -183,7 +50,7 @@ Subcommands:
|
|
|
183
50
|
exec "<command>" [-n name] [-w]
|
|
184
51
|
run a command in the terminal (default: submit async and return immediately; -w waits for result)
|
|
185
52
|
read [-n name] [-s buffer|history] [-l limit] [--head] [--include-command]
|
|
186
|
-
read terminal output: buffer (
|
|
53
|
+
read terminal output: buffer (current snapshot, consumed) / history (default tail last N)
|
|
187
54
|
send "<text>" [-n name]
|
|
188
55
|
send text/keystrokes (\\r Enter, \\x03 Ctrl-C, \\x04 Ctrl-D, \\x1a Ctrl-Z, \\x1b Esc)
|
|
189
56
|
status [-n name]
|
|
@@ -194,19 +61,20 @@ Subcommands:
|
|
|
194
61
|
show this help
|
|
195
62
|
|
|
196
63
|
Examples:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
64
|
+
term_cli connect root@192.168.1.10
|
|
65
|
+
term_cli connect user@host -p file:C:\\secrets\\pw.txt
|
|
66
|
+
term_cli local "docker exec -it myctr bash" -n db
|
|
67
|
+
term_cli exec "ls -la" -w
|
|
68
|
+
term_cli exec "cd /var/log && tail -50 syslog"
|
|
69
|
+
term_cli send "mypass\\r" -n default
|
|
70
|
+
term_cli read -n db -s buffer
|
|
71
|
+
term_cli status
|
|
72
|
+
term_cli disconnect -n db
|
|
206
73
|
`;
|
|
207
|
-
readonly zh: `
|
|
74
|
+
readonly zh: `term_cli 统一命令行工具:管理 SSH / 本地(wsl、pwsh、bash)/ 容器(docker exec)终端会话。
|
|
75
|
+
本机可启动的终端(WSL、Docker 容器、本地 shell)一律用 'local' 子命令。
|
|
208
76
|
|
|
209
|
-
用法:
|
|
77
|
+
用法: term_cli <子命令> [参数]
|
|
210
78
|
|
|
211
79
|
子命令:
|
|
212
80
|
connect <target> [-u user] [-n name] [-p password|file:path]
|
|
@@ -217,7 +85,7 @@ Examples:
|
|
|
217
85
|
exec "<command>" [-n name] [-w]
|
|
218
86
|
在指定终端执行命令(默认异步提交立即返回;-w 同步等待结果)
|
|
219
87
|
read [-n name] [-s buffer|history] [-l limit] [--head] [--include-command]
|
|
220
|
-
读终端输出:buffer
|
|
88
|
+
读终端输出:buffer 实时快照(读取后清空)/ history 历史快照(默认 tail 后 N 条)
|
|
221
89
|
send "<text>" [-n name]
|
|
222
90
|
发送文本/按键(\\r 回车、\\x03 Ctrl-C、\\x04 Ctrl-D、\\x1a Ctrl-Z、\\x1b Esc)
|
|
223
91
|
status [-n name]
|
|
@@ -228,15 +96,15 @@ Examples:
|
|
|
228
96
|
显示本帮助
|
|
229
97
|
|
|
230
98
|
示例:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
99
|
+
term_cli connect root@192.168.1.10
|
|
100
|
+
term_cli connect user@host -p file:C:\\secrets\\pw.txt
|
|
101
|
+
term_cli local "docker exec -it myctr bash" -n db
|
|
102
|
+
term_cli exec "ls -la" -w
|
|
103
|
+
term_cli exec "cd /var/log && tail -50 syslog"
|
|
104
|
+
term_cli send "mypass\\r" -n default
|
|
105
|
+
term_cli read -n db -s buffer
|
|
106
|
+
term_cli status
|
|
107
|
+
term_cli disconnect -n db
|
|
240
108
|
`;
|
|
241
109
|
};
|
|
242
110
|
readonly denied: {
|
|
@@ -336,8 +204,8 @@ Examples:
|
|
|
336
204
|
readonly zh: "危险命令,已拒绝执行。";
|
|
337
205
|
};
|
|
338
206
|
readonly not_connected: {
|
|
339
|
-
readonly en: "No
|
|
340
|
-
readonly zh: "
|
|
207
|
+
readonly en: "No active terminal. Use term_cli connect (SSH) or term_cli local first.";
|
|
208
|
+
readonly zh: "无活动终端。请先用 term_cli connect(SSH)或 term_cli local 建立。";
|
|
341
209
|
};
|
|
342
210
|
readonly rejected_connect: {
|
|
343
211
|
readonly en: "Connection rejected.";
|
|
@@ -348,12 +216,8 @@ Examples:
|
|
|
348
216
|
readonly zh: "终端名非法。仅允许字母、数字、下划线、中划线、点(最多 64 字符),不得含路径分隔符。";
|
|
349
217
|
};
|
|
350
218
|
readonly no_sessions: {
|
|
351
|
-
readonly en: "No active
|
|
352
|
-
readonly zh: "
|
|
353
|
-
};
|
|
354
|
-
readonly connect_title_ok: {
|
|
355
|
-
readonly en: "SSH connected";
|
|
356
|
-
readonly zh: "SSH 已连接";
|
|
219
|
+
readonly en: "No active terminals.";
|
|
220
|
+
readonly zh: "当前没有活动的终端会话。";
|
|
357
221
|
};
|
|
358
222
|
readonly connect_ok: {
|
|
359
223
|
readonly en: "Connected: {user}@{host}:{port} (session {sid}, terminal {name})";
|
|
@@ -367,41 +231,21 @@ Examples:
|
|
|
367
231
|
readonly en: "Unknown error";
|
|
368
232
|
readonly zh: "未知错误";
|
|
369
233
|
};
|
|
370
|
-
readonly exec_title: {
|
|
371
|
-
readonly en: "SSH exec: {cmd}";
|
|
372
|
-
readonly zh: "SSH 执行: {cmd}";
|
|
373
|
-
};
|
|
374
234
|
readonly exec_failed: {
|
|
375
235
|
readonly en: "Execution failed";
|
|
376
236
|
readonly zh: "执行失败";
|
|
377
237
|
};
|
|
378
|
-
readonly session_output_title: {
|
|
379
|
-
readonly en: "SSH session output";
|
|
380
|
-
readonly zh: "SSH 会话输出";
|
|
381
|
-
};
|
|
382
238
|
readonly session_disconnected: {
|
|
383
|
-
readonly en: "
|
|
384
|
-
readonly zh: "
|
|
239
|
+
readonly en: "Terminal disconnected";
|
|
240
|
+
readonly zh: "终端已断开";
|
|
385
241
|
};
|
|
386
242
|
readonly status_busy_hint: {
|
|
387
|
-
readonly en: "\nHint: a command is still running. Wait and retry, or call
|
|
388
|
-
readonly zh: "\n提示:仍有命令在执行,请等待后重试或调用
|
|
243
|
+
readonly en: "\nHint: a command is still running. Wait and retry, or call term_cli read for partial output.";
|
|
244
|
+
readonly zh: "\n提示:仍有命令在执行,请等待后重试或调用 term_cli read 获取部分输出。";
|
|
389
245
|
};
|
|
390
246
|
readonly status_idle_hint: {
|
|
391
|
-
readonly en: "\nHint: no command running. You can safely execute a new command or call
|
|
392
|
-
readonly zh: "\n提示:无命令在执行,可安全执行新命令或调用
|
|
393
|
-
};
|
|
394
|
-
readonly status_title: {
|
|
395
|
-
readonly en: "SSH session status";
|
|
396
|
-
readonly zh: "SSH 会话状态";
|
|
397
|
-
};
|
|
398
|
-
readonly server_title: {
|
|
399
|
-
readonly en: "SSH HTTP server";
|
|
400
|
-
readonly zh: "SSH HTTP 服务";
|
|
401
|
-
};
|
|
402
|
-
readonly server_info: {
|
|
403
|
-
readonly en: "HTTP server enabled\nurl: {url}\nport: {port}\nactive sessions: {n}\nOpen {url} in a browser to view terminal records (scrollable, auto-refreshing).";
|
|
404
|
-
readonly zh: "HTTP 服务已启用\nurl: {url}\nport: {port}\n活跃会话: {n}\n浏览器访问 {url} 查看终端记录(可滚动、自动刷新)。";
|
|
247
|
+
readonly en: "\nHint: no command running. You can safely execute a new command or call term_cli read for remaining output.";
|
|
248
|
+
readonly zh: "\n提示:无命令在执行,可安全执行新命令或调用 term_cli read 读取剩余输出。";
|
|
405
249
|
};
|
|
406
250
|
readonly browser_full_record: {
|
|
407
251
|
readonly en: "\nBrowser full record: {url}";
|
|
@@ -412,12 +256,12 @@ Examples:
|
|
|
412
256
|
readonly zh: "\n(HTTP 服务未启用)";
|
|
413
257
|
};
|
|
414
258
|
readonly history_title: {
|
|
415
|
-
readonly en: "
|
|
416
|
-
readonly zh: "
|
|
259
|
+
readonly en: "Terminal history (last {n} / total {total})";
|
|
260
|
+
readonly zh: "终端历史(最后 {n} 条 / 共 {total} 条)";
|
|
417
261
|
};
|
|
418
262
|
readonly history_title_head: {
|
|
419
|
-
readonly en: "
|
|
420
|
-
readonly zh: "
|
|
263
|
+
readonly en: "Terminal history (first {n} / total {total})";
|
|
264
|
+
readonly zh: "终端历史(前 {n} 条 / 共 {total} 条)";
|
|
421
265
|
};
|
|
422
266
|
readonly web_title: {
|
|
423
267
|
readonly en: "Terminal Records";
|
|
@@ -456,8 +300,8 @@ Examples:
|
|
|
456
300
|
readonly zh: "每 2s 自动刷新";
|
|
457
301
|
};
|
|
458
302
|
readonly web_no_session: {
|
|
459
|
-
readonly en: "No
|
|
460
|
-
readonly zh: "
|
|
303
|
+
readonly en: "No terminal. Use term_cli connect (SSH) or term_cli local first.";
|
|
304
|
+
readonly zh: "无终端会话,请先用 term_cli connect(SSH)或 term_cli local 建立。";
|
|
461
305
|
};
|
|
462
306
|
readonly web_running: {
|
|
463
307
|
readonly en: "[running] ";
|
|
@@ -467,34 +311,38 @@ Examples:
|
|
|
467
311
|
readonly en: "↓ New messages";
|
|
468
312
|
readonly zh: "↓ 新消息";
|
|
469
313
|
};
|
|
314
|
+
readonly web_delete_terminal: {
|
|
315
|
+
readonly en: "Delete disconnected terminal";
|
|
316
|
+
readonly zh: "删除已断开终端";
|
|
317
|
+
};
|
|
318
|
+
readonly web_cmd_placeholder: {
|
|
319
|
+
readonly en: "Enter command (Shift+Enter new line)";
|
|
320
|
+
readonly zh: "输入命令(Shift+Enter 换行)";
|
|
321
|
+
};
|
|
322
|
+
readonly web_send_ctrlc: {
|
|
323
|
+
readonly en: "Keystroke";
|
|
324
|
+
readonly zh: "快捷键";
|
|
325
|
+
};
|
|
470
326
|
readonly disconnected_ok: {
|
|
471
|
-
readonly en: "
|
|
472
|
-
readonly zh: "
|
|
327
|
+
readonly en: "Terminal closed ({host}).";
|
|
328
|
+
readonly zh: "终端已断开({host})。";
|
|
329
|
+
};
|
|
330
|
+
readonly disconnected_ok_local: {
|
|
331
|
+
readonly en: "Terminal closed ({program}).";
|
|
332
|
+
readonly zh: "终端已断开({program})。";
|
|
473
333
|
};
|
|
474
334
|
readonly disconnected_all_ok: {
|
|
475
|
-
readonly en: "All
|
|
476
|
-
readonly zh: "
|
|
335
|
+
readonly en: "All terminals closed (last host {host}).";
|
|
336
|
+
readonly zh: "已断开全部终端(最后主机 {host})。";
|
|
337
|
+
};
|
|
338
|
+
readonly disconnected_all_ok_local: {
|
|
339
|
+
readonly en: "All terminals closed (last program {program}).";
|
|
340
|
+
readonly zh: "已断开全部终端(最后程序 {program})。";
|
|
477
341
|
};
|
|
478
342
|
readonly err_not_connected: {
|
|
479
343
|
readonly en: "Not connected";
|
|
480
344
|
readonly zh: "未连接";
|
|
481
345
|
};
|
|
482
|
-
readonly err_busy: {
|
|
483
|
-
readonly en: "Previous command still running, poll with term_status first";
|
|
484
|
-
readonly zh: "上一条命令仍在执行,请先 term_status 轮询";
|
|
485
|
-
};
|
|
486
|
-
readonly err_shell_open: {
|
|
487
|
-
readonly en: "Shell open failed";
|
|
488
|
-
readonly zh: "shell 打开失败";
|
|
489
|
-
};
|
|
490
|
-
readonly err_no_such_session: {
|
|
491
|
-
readonly en: "Session not found or disconnected";
|
|
492
|
-
readonly zh: "会话不存在或已断开";
|
|
493
|
-
};
|
|
494
|
-
readonly truncated: {
|
|
495
|
-
readonly en: "... [output truncated, {n} chars total]";
|
|
496
|
-
readonly zh: "... [输出已截断,共 {n} 字符]";
|
|
497
|
-
};
|
|
498
346
|
};
|
|
499
347
|
/** 取某语言下的一条文案 */
|
|
500
348
|
export declare function tr(key: FlatKey, lang: Lang): string;
|
package/dist/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE9B,4CAA4C;AAC5C,MAAM,MAAM,OAAO,GAAG;KAAG,CAAC,IAAI,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK;CAAE,CAAC,MAAM,OAAO,CAAC,CAAC,C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