@xiaoqiong0v0/opencode-ssh-tool 0.2.7 → 0.3.0
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 +21 -18
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/i18n.d.ts +60 -30
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +60 -30
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +164 -59
- package/dist/index.js.map +1 -1
- package/dist/local-session.d.ts +117 -0
- package/dist/local-session.d.ts.map +1 -0
- package/dist/local-session.js +365 -0
- package/dist/local-session.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +73 -34
- package/dist/server.js.map +1 -1
- package/dist/session-store.d.ts +4 -0
- package/dist/session-store.d.ts.map +1 -1
- package/dist/session-store.js.map +1 -1
- package/dist/utils.d.ts +7 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +13 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# opencode-ssh-tool
|
|
2
2
|
|
|
3
|
-
opencode 插件:让 opencode
|
|
3
|
+
opencode 插件:让 opencode 像人一样操作**长驻交互式终端会话**——远程 SSH(ssh2 PTY)与本地/容器(Bun.Terminal,如 `pwsh`、`docker exec -it`)。连接一次,后续在会话里连续执行命令,保留当前目录、环境变量、交互状态;命令执行同样受 opencode 权限系统管控(类似内置 Bash 工具的审批)。
|
|
4
4
|
|
|
5
5
|
## 特性
|
|
6
6
|
|
|
7
|
-
- **长驻会话**:`ssh_connect` 建立连接后,`
|
|
7
|
+
- **长驻会话**:`ssh_connect` 建立连接后,`term_exec` 在同一会话执行命令,保留 cwd/环境/后台进程/sudo 缓存
|
|
8
8
|
- **PTY 交互**:分配伪终端,可处理 sudo 密码、vi、top 等交互程序
|
|
9
9
|
- **权限管控**:只读白名单直接放行、危险命令黑名单硬拒、其余走 `context.ask()` 用户审批
|
|
10
10
|
- **命令完成判定**:哨兵标记 + 静默窗口 + 超时三重兜底,动画输出(进度条等)自动识别
|
|
@@ -25,13 +25,15 @@ opencode 插件:让 opencode 像人一样操作**长驻交互式 SSH 会话**
|
|
|
25
25
|
|
|
26
26
|
## 工具
|
|
27
27
|
|
|
28
|
-
| 工具 | 入参 | 行为 |
|
|
29
|
-
|---|---|---|
|
|
30
|
-
| `ssh_connect` | `host`, `user`, `port?`, `name?` | 建立长驻 SSH 连接 + 打开 PTY shell;`name` 指定终端名(默认 `default
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
28
|
+
| 工具 | 入参 | 行为 |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `ssh_connect` | `host`, `user`, `port?`, `name?`, `password?` | 建立长驻 SSH 连接 + 打开 PTY shell;`name` 指定终端名(默认 `default`),同名先关旧终端;`password` 支持明文或 `file:<路径>` |
|
|
31
|
+
| `local_connect` | `command`, `name?`, `cwd?` | 启动本地/容器 PTY 终端(如 `pwsh` / `bash` / `docker exec -it <容器> sh`),基于 Bun.Terminal |
|
|
32
|
+
| `term_exec` | `command`, `waitResult?`, `name?` | 在指定终端(SSH/本地/容器)执行命令;默认异步提交立即返回,`waitResult=true` 同步等结果 |
|
|
33
|
+
| `term_read` | `source?`, `lines?`, `direction?`, `limit?`, `includeCommand?`, `name?` | 读指定终端输出:`buffer` 实时未消费 / `history` 已完成对(前/后 N 条) |
|
|
34
|
+
| `term_send` | `text`, `name?` | 发送文本/按键到终端(sudo 密码、确认、Ctrl-C 等交互);转义 `\r` 回车、`\x03` Ctrl-C |
|
|
35
|
+
| `term_status` | `name?` | 指定终端状态(busy/pending/连接);省略则列出全部终端 + HTTP 服务状态 |
|
|
36
|
+
| `term_disconnect` | `name?` | 断开指定终端(默认 `default`);省略则断开全部终端(SSH + 本地) |
|
|
35
37
|
|
|
36
38
|
> 一个 opencode 会话可创建**多个命名终端**(如 `db`、`web`、`prod`),用不同 `name` 并行维护;同名重复创建会先关闭旧的。
|
|
37
39
|
|
|
@@ -94,7 +96,7 @@ opencode 插件:让 opencode 像人一样操作**长驻交互式 SSH 会话**
|
|
|
94
96
|
## 权限管控
|
|
95
97
|
|
|
96
98
|
```text
|
|
97
|
-
|
|
99
|
+
term_exec(command)
|
|
98
100
|
├─ 命中 DENY 黑名单(rm -rf / shutdown reboot mkfs 等) → 直接拒绝
|
|
99
101
|
├─ 命中只读白名单 且 无 shell 元字符 → 直接放行
|
|
100
102
|
└─ 其他 → context.ask() 用户审批(:allow / :deny / :always)
|
|
@@ -106,7 +108,7 @@ ssh_exec(command)
|
|
|
106
108
|
|
|
107
109
|
## HTTP 终端查看
|
|
108
110
|
|
|
109
|
-
服务默认开启(配置 `server.enabled`)。`
|
|
111
|
+
服务默认开启(配置 `server.enabled`)。`term_status` / `term_read`(history 模式)会返回实际地址(端口 0 时自动分配,避免冲突):
|
|
110
112
|
|
|
111
113
|
```
|
|
112
114
|
浏览器访问 http://127.0.0.1:<port> 查看可滚动、每 2s 自动刷新的终端记录
|
|
@@ -149,18 +151,19 @@ npm publish # 只发布 dist/
|
|
|
149
151
|
需真实 SSH 主机(可用 Docker 测试环境,见 `.tmp/ssh-test-docker.ps1`):
|
|
150
152
|
|
|
151
153
|
- [ ] `ssh_connect` → 登录成功,cwd 为登录目录
|
|
152
|
-
- [ ] `
|
|
153
|
-
- [ ] `
|
|
154
|
-
- [ ] 交互场景:`
|
|
154
|
+
- [ ] `term_exec("ls")` 连续多次,确认永不重连(同一会话)
|
|
155
|
+
- [ ] `term_exec("cd /var/log && pwd")` 后 `term_exec("pwd")` = `/var/log`(目录保持)
|
|
156
|
+
- [ ] 交互场景:`term_exec("sudo ...")` 触发密码提示 → `term_read` 配合
|
|
155
157
|
- [ ] 白名单命令不弹审批直接执行;`rm -rf` 被拒绝
|
|
156
158
|
- [ ] 白名单外命令弹 `context.ask()`,`:deny` 拒绝 / `:allow` 放行
|
|
157
|
-
- [ ] 长命令超时:`
|
|
158
|
-
- [ ] `
|
|
159
|
-
- [ ] `
|
|
160
|
-
- [ ] `
|
|
159
|
+
- [ ] 长命令超时:`term_exec("sleep 60")` 30s 超时返回,不挂死会话
|
|
160
|
+
- [ ] `term_read` 取前/后 N 条历史输出(含 `includeCommand`、`source=buffer`)
|
|
161
|
+
- [ ] `term_status` / HTTP 页面浏览器可访问
|
|
162
|
+
- [ ] `term_disconnect` 后连接释放
|
|
161
163
|
|
|
162
164
|
## 文档
|
|
163
165
|
|
|
164
166
|
- `docs/requirements/需求说明.md` — 原始需求
|
|
165
167
|
- `docs/design/方案分析.md` — 技术分析、决策、风险
|
|
166
168
|
- `docs/design/结构设计.md` — 编码依据
|
|
169
|
+
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,kCAAkC;AAClC,eAAO,MAAM,cAAc,QAC0F,CAAA;AAErH,6BAA6B;AAC7B,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,kCAAkC;AAClC,eAAO,MAAM,cAAc,QAC0F,CAAA;AAErH,6BAA6B;AAC7B,eAAO,MAAM,IAAI,QACsmB,CAAA;AAEvnB,qCAAqC;AACrC,eAAO,MAAM,UAAU,QAAgB,CAAA;AAEvC,2BAA2B;AAC3B,eAAO,MAAM,eAAe,QAAS,CAAA;AAErC,+BAA+B;AAC/B,eAAO,MAAM,eAAe,MAAM,CAAA;AAElC,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,OAAQ,CAAA;AAExC,oBAAoB;AACpB,eAAO,MAAM,gBAAgB,QAAS,CAAA;AAEtC,wBAAwB;AACxB,eAAO,MAAM,QAAQ,MAAM,CAAA;AAC3B,eAAO,MAAM,QAAQ,MAAM,CAAA;AAE3B,qBAAqB;AACrB,eAAO,MAAM,cAAc,QAAS,CAAA;AAEpC,gCAAgC;AAChC,eAAO,MAAM,QAAQ,kBAAkB,CAAA;AAEvC,8BAA8B;AAC9B,eAAO,MAAM,SAAS,8CAA8C,CAAA"}
|
package/dist/constants.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** 只读命令白名单(整串匹配,含元字符的命令不适用白名单) */
|
|
3
3
|
export const ALLOW_READONLY = /^(?:ls|cd|cat|grep|tail|head|ps|df|free|pwd|env|echo|curl|wget|git status|whoami|hostname|date|uname|uptime)\b.*$/;
|
|
4
4
|
/** 高危命令黑名单(命中直接拒绝,不进 ask) */
|
|
5
|
-
export const DENY = /(?:rm\s+(?:-[a-z]*[fr][a-z]*(?:\s+-[a-z]*[fr][a-z]*)?\s+)?(?:\/(?:\s|$)|~|\.(?:\.)?|\/(?:etc|var|usr|boot|bin|sbin|lib|lib64|opt|root)(?:\s|$))|shutdown|reboot|halt|poweroff|mkfs|mkswap|fdisk|parted|dd\s|iptables|ufw|firewall-cmd|systemctl|service\s+\w+\s+(?:stop|restart|kill)|kill(?:all)?\s|pkill\s|passwd\s|useradd|userdel|groupadd|groupdel|chown\s+-R|chmod\s+-R\s+777\s+\/|apt\s+remove|apt-get\s+remove|npm\s+(?:uninstall|rm)\b|DROP\s+TABLE|TRUNCATE\s+TABLE|DROP\s+DATABASE|:\(\)\s*\{|>\s*\/etc\/(?:passwd|shadow|sudoers|fstab)|curl\s+.*\|\s*(?:ba)?sh|wget\s+.*\|\s*(?:ba)?sh|base64\s+-d\s*[|>])/;
|
|
5
|
+
export const DENY = /(?:rm\s+(?:-[a-z]*[fr][a-z]*(?:\s+-[a-z]*[fr][a-z]*)?\s+)?(?:\/(?:\s|$)|~|\.(?:\.)?|\/(?:etc|var|usr|boot|bin|sbin|lib|lib64|opt|root)(?:\s|$))|shutdown|reboot|halt|poweroff|mkfs|mkswap|fdisk|parted|dd\s+(?:if|of|bs|count|conv)\s*=|iptables|ufw|firewall-cmd|systemctl|service\s+\w+\s+(?:stop|restart|kill)|kill(?:all)?\s|pkill\s|passwd\s|useradd|userdel|groupadd|groupdel|chown\s+-R|chmod\s+-R\s+777\s+\/|apt\s+remove|apt-get\s+remove|npm\s+(?:uninstall|rm)\b|DROP\s+TABLE|TRUNCATE\s+TABLE|DROP\s+DATABASE|:\(\)\s*\{|>\s*\/etc\/(?:passwd|shadow|sudoers|fstab)|curl\s+.*\|\s*(?:ba)?sh|wget\s+.*\|\s*(?:ba)?sh|base64\s+-d\s*[|>])/;
|
|
6
6
|
/** shell 元字符(出现即降级走 ask,防白名单拼接绕过) */
|
|
7
7
|
export const SHELL_META = /[;|&`$()<>]/;
|
|
8
8
|
/** 单次 ssh_exec 默认超时(毫秒) */
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,kCAAkC;AAClC,MAAM,CAAC,MAAM,cAAc,GACzB,mHAAmH,CAAA;AAErH,6BAA6B;AAC7B,MAAM,CAAC,MAAM,IAAI,GACf,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,kCAAkC;AAClC,MAAM,CAAC,MAAM,cAAc,GACzB,mHAAmH,CAAA;AAErH,6BAA6B;AAC7B,MAAM,CAAC,MAAM,IAAI,GACf,qnBAAqnB,CAAA;AAEvnB,qCAAqC;AACrC,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA;AAEvC,2BAA2B;AAC3B,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAA;AAErC,+BAA+B;AAC/B,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;AAElC,uCAAuC;AACvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAA;AAExC,oBAAoB;AACpB,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAEtC,wBAAwB;AACxB,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAA;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAA;AAE3B,qBAAqB;AACrB,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAA;AAEpC,gCAAgC;AAChC,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAA;AAEvC,8BAA8B;AAC9B,MAAM,CAAC,MAAM,SAAS,GAAG,2CAA2C,CAAA"}
|
package/dist/i18n.d.ts
CHANGED
|
@@ -37,18 +37,18 @@ export declare const T: {
|
|
|
37
37
|
readonly zh: "密码认证密码(可选)。支持明文或 'file:<绝对路径>' 从文件读取(避免暴露在上下文中)。省略时回退到 SSH 私钥 / agent / 环境变量 SSH_PASSWORD。";
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
readonly
|
|
41
|
-
readonly en: "Execute a command in
|
|
42
|
-
readonly zh: "
|
|
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
43
|
};
|
|
44
|
-
readonly
|
|
44
|
+
readonly term_exec_args: {
|
|
45
45
|
readonly command: {
|
|
46
46
|
readonly en: "Shell command to execute";
|
|
47
47
|
readonly zh: "要执行的 shell 命令";
|
|
48
48
|
};
|
|
49
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
|
|
51
|
-
readonly zh: "是否等待命令完成并返回其输出。默认 false:异步提交,立即返回;稍后通过
|
|
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
52
|
};
|
|
53
53
|
readonly name: {
|
|
54
54
|
readonly en: "Target terminal name, default 'default'. Must match a name from ssh_connect.";
|
|
@@ -56,18 +56,18 @@ export declare const T: {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
readonly submitted: {
|
|
59
|
-
readonly en: "Command submitted (async). Running in background: check
|
|
60
|
-
readonly zh: "命令已异步提交,后台执行中:用
|
|
59
|
+
readonly en: "Command submitted (async). Running in background: check term_status for completion, then term_read to read output.";
|
|
60
|
+
readonly zh: "命令已异步提交,后台执行中:用 term_status 查完成状态,再用 term_read 读取输出。";
|
|
61
61
|
};
|
|
62
|
-
readonly
|
|
63
|
-
readonly en: "Read output of
|
|
64
|
-
readonly zh: "
|
|
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
65
|
};
|
|
66
|
-
readonly
|
|
67
|
-
readonly en: "Send text or keystrokes to
|
|
68
|
-
readonly zh: "
|
|
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
69
|
};
|
|
70
|
-
readonly
|
|
70
|
+
readonly term_send_args: {
|
|
71
71
|
readonly text: {
|
|
72
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
73
|
readonly zh: "要发送的文本或按键序列。回车用 \\r 或 \\n,Ctrl-C 用 \\x03,Esc 用 \\x1b。sudo 密码提示时发送密码后跟 \\r。";
|
|
@@ -85,7 +85,7 @@ export declare const T: {
|
|
|
85
85
|
readonly en: "SSH send";
|
|
86
86
|
readonly zh: "SSH 发送";
|
|
87
87
|
};
|
|
88
|
-
readonly
|
|
88
|
+
readonly term_read_args: {
|
|
89
89
|
readonly source: {
|
|
90
90
|
readonly en: "Where to read from: 'buffer' (unconsumed live output) or 'history' (completed pairs, default).";
|
|
91
91
|
readonly zh: "读取来源:'buffer'(实时未消费输出)或 'history'(已完成消息对,默认)。";
|
|
@@ -111,26 +111,56 @@ export declare const T: {
|
|
|
111
111
|
readonly zh: "目标终端名,默认 'default'。";
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
-
readonly
|
|
115
|
-
readonly en: "Check SSH
|
|
116
|
-
readonly zh: "按终端名检查 SSH
|
|
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
117
|
};
|
|
118
|
-
readonly
|
|
118
|
+
readonly term_status_args: {
|
|
119
119
|
readonly name: {
|
|
120
120
|
readonly en: "Terminal name to check; omit to list all terminals.";
|
|
121
121
|
readonly zh: "要检查的终端名;省略则列出全部终端。";
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
|
-
readonly
|
|
125
|
-
readonly en: "Close the
|
|
126
|
-
readonly zh: "
|
|
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
127
|
};
|
|
128
|
-
readonly
|
|
128
|
+
readonly term_disconnect_args: {
|
|
129
129
|
readonly name: {
|
|
130
130
|
readonly en: "Terminal name to disconnect; omit to disconnect all terminals.";
|
|
131
131
|
readonly zh: "要断开的终端名;省略则断开全部终端。";
|
|
132
132
|
};
|
|
133
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
|
+
readonly local_connect_ok: {
|
|
157
|
+
readonly en: "Started: {cmd} (terminal {name})";
|
|
158
|
+
readonly zh: "已启动:{cmd}(终端 {name})";
|
|
159
|
+
};
|
|
160
|
+
readonly local_connect_title_fail: {
|
|
161
|
+
readonly en: "Local terminal start failed";
|
|
162
|
+
readonly zh: "本地终端启动失败";
|
|
163
|
+
};
|
|
134
164
|
readonly denied: {
|
|
135
165
|
readonly en: "Denied by user.";
|
|
136
166
|
readonly zh: "用户已拒绝。";
|
|
@@ -188,12 +218,12 @@ export declare const T: {
|
|
|
188
218
|
readonly zh: "SSH 会话已断开";
|
|
189
219
|
};
|
|
190
220
|
readonly status_busy_hint: {
|
|
191
|
-
readonly en: "\nHint: a command is still running. Wait and retry, or call
|
|
192
|
-
readonly zh: "\n提示:仍有命令在执行,请等待后重试或调用
|
|
221
|
+
readonly en: "\nHint: a command is still running. Wait and retry, or call term_read for partial output.";
|
|
222
|
+
readonly zh: "\n提示:仍有命令在执行,请等待后重试或调用 term_read 获取部分输出。";
|
|
193
223
|
};
|
|
194
224
|
readonly status_idle_hint: {
|
|
195
|
-
readonly en: "\nHint: no command running. You can safely execute a new command or call
|
|
196
|
-
readonly zh: "\n提示:无命令在执行,可安全执行新命令或调用
|
|
225
|
+
readonly en: "\nHint: no command running. You can safely execute a new command or call term_read for remaining output.";
|
|
226
|
+
readonly zh: "\n提示:无命令在执行,可安全执行新命令或调用 term_read 读取剩余输出。";
|
|
197
227
|
};
|
|
198
228
|
readonly status_title: {
|
|
199
229
|
readonly en: "SSH session status";
|
|
@@ -236,8 +266,8 @@ export declare const T: {
|
|
|
236
266
|
readonly zh: "未连接";
|
|
237
267
|
};
|
|
238
268
|
readonly err_busy: {
|
|
239
|
-
readonly en: "Previous command still running, poll with
|
|
240
|
-
readonly zh: "上一条命令仍在执行,请先
|
|
269
|
+
readonly en: "Previous command still running, poll with term_status first";
|
|
270
|
+
readonly zh: "上一条命令仍在执行,请先 term_status 轮询";
|
|
241
271
|
};
|
|
242
272
|
readonly err_shell_open: {
|
|
243
273
|
readonly en: "Shell open failed";
|
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,KAAK,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,CAAA;AAEhH;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,UAAU,GAAE,IAAW,GAAG,IAAI,CAKrD;AAED,kBAAkB;AAClB,eAAO,MAAM,CAAC;aACZ,WAAW;iBACT,EAAE,EAAE,wKAAwK;iBAC5K,EAAE,EAAE,uDAAuD;;aAE7D,gBAAgB;iBACd,IAAI;qBAAI,EAAE,EAAE,mBAAmB;qBAAE,EAAE,EAAE,gBAAgB;;iBACrD,IAAI;qBAAI,EAAE,EAAE,gBAAgB;qBAAE,EAAE,EAAE,OAAO;;iBACzC,IAAI;qBAAI,EAAE,EAAE,kBAAkB;qBAAE,EAAE,EAAE,UAAU;;iBAC9C,IAAI;qBACF,EAAE,EAAE,8JAA8J;qBAClK,EAAE,EAAE,gDAAgD;;iBAEtD,QAAQ;qBACN,EAAE,EAAE,oMAAoM;qBACxM,EAAE,EAAE,4FAA4F;;;aAGpG,
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,IAAI,G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AACjB,wBAAgB,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,CAEnD"}
|
package/dist/i18n.js
CHANGED
|
@@ -32,15 +32,15 @@ export const T = {
|
|
|
32
32
|
zh: "密码认证密码(可选)。支持明文或 'file:<绝对路径>' 从文件读取(避免暴露在上下文中)。省略时回退到 SSH 私钥 / agent / 环境变量 SSH_PASSWORD。",
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
en: "Execute a command in
|
|
37
|
-
zh: "
|
|
35
|
+
term_exec: {
|
|
36
|
+
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.",
|
|
37
|
+
zh: "在 SSH / 本地 / 容器终端(按终端名)执行命令,保留 cwd 与环境变量;白名单外的命令需用户审批。",
|
|
38
38
|
},
|
|
39
|
-
|
|
39
|
+
term_exec_args: {
|
|
40
40
|
command: { en: "Shell command to execute", zh: "要执行的 shell 命令" },
|
|
41
41
|
waitResult: {
|
|
42
|
-
en: "Wait for the command to finish and return its output. Default false: submit async, return immediately; read results later via
|
|
43
|
-
zh: "是否等待命令完成并返回其输出。默认 false:异步提交,立即返回;稍后通过
|
|
42
|
+
en: "Wait for the command to finish and return its output. Default false: submit async, return immediately; read results later via term_read.",
|
|
43
|
+
zh: "是否等待命令完成并返回其输出。默认 false:异步提交,立即返回;稍后通过 term_read 读取结果。",
|
|
44
44
|
},
|
|
45
45
|
name: {
|
|
46
46
|
en: "Target terminal name, default 'default'. Must match a name from ssh_connect.",
|
|
@@ -48,18 +48,18 @@ export const T = {
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
submitted: {
|
|
51
|
-
en: "Command submitted (async). Running in background: check
|
|
52
|
-
zh: "命令已异步提交,后台执行中:用
|
|
51
|
+
en: "Command submitted (async). Running in background: check term_status for completion, then term_read to read output.",
|
|
52
|
+
zh: "命令已异步提交,后台执行中:用 term_status 查完成状态,再用 term_read 读取输出。",
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
en: "Read output of
|
|
56
|
-
zh: "
|
|
54
|
+
term_read: {
|
|
55
|
+
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.",
|
|
56
|
+
zh: "读取 SSH / 本地 / 容器终端输出:缓冲(未消费,交互/轮询用)或历史(已完成的命令+输出对,前 N 条或后 N 条)。HTTP 服务开启时返回浏览器查看完整记录的地址。",
|
|
57
57
|
},
|
|
58
|
-
|
|
59
|
-
en: "Send text or keystrokes to
|
|
60
|
-
zh: "
|
|
58
|
+
term_send: {
|
|
59
|
+
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.",
|
|
60
|
+
zh: "向 SSH / 本地 / 容器终端发送文本或按键,用于交互提示(sudo 密码、确认、中断等)。转义:\\r 或 \\n = 回车,\\x03 = Ctrl-C,\\x04 = Ctrl-D,\\x1a = Ctrl-Z,\\x1b = Esc。发送后用 term_read 读取结果。",
|
|
61
61
|
},
|
|
62
|
-
|
|
62
|
+
term_send_args: {
|
|
63
63
|
text: {
|
|
64
64
|
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.",
|
|
65
65
|
zh: "要发送的文本或按键序列。回车用 \\r 或 \\n,Ctrl-C 用 \\x03,Esc 用 \\x1b。sudo 密码提示时发送密码后跟 \\r。",
|
|
@@ -77,7 +77,7 @@ export const T = {
|
|
|
77
77
|
en: "SSH send",
|
|
78
78
|
zh: "SSH 发送",
|
|
79
79
|
},
|
|
80
|
-
|
|
80
|
+
term_read_args: {
|
|
81
81
|
source: {
|
|
82
82
|
en: "Where to read from: 'buffer' (unconsumed live output) or 'history' (completed pairs, default).",
|
|
83
83
|
zh: "读取来源:'buffer'(实时未消费输出)或 'history'(已完成消息对,默认)。",
|
|
@@ -100,26 +100,56 @@ export const T = {
|
|
|
100
100
|
zh: "目标终端名,默认 'default'。",
|
|
101
101
|
},
|
|
102
102
|
},
|
|
103
|
-
|
|
104
|
-
en: "Check SSH
|
|
105
|
-
zh: "按终端名检查 SSH
|
|
103
|
+
term_status: {
|
|
104
|
+
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.",
|
|
105
|
+
zh: "按终端名检查 SSH / 本地 / 容器终端状态(busy、未消费量、连接;省略则列出全部终端)及 HTTP 服务状态(URL/端口/会话数)。用 busy 轮询完成情况,避免读取动画中间态。",
|
|
106
106
|
},
|
|
107
|
-
|
|
107
|
+
term_status_args: {
|
|
108
108
|
name: {
|
|
109
109
|
en: "Terminal name to check; omit to list all terminals.",
|
|
110
110
|
zh: "要检查的终端名;省略则列出全部终端。",
|
|
111
111
|
},
|
|
112
112
|
},
|
|
113
|
-
|
|
114
|
-
en: "Close the
|
|
115
|
-
zh: "
|
|
113
|
+
term_disconnect: {
|
|
114
|
+
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.",
|
|
115
|
+
zh: "关闭指定名称(默认 'default')的 SSH / 本地 / 容器终端,name 省略则关闭全部终端,并清理会话态。",
|
|
116
116
|
},
|
|
117
|
-
|
|
117
|
+
term_disconnect_args: {
|
|
118
118
|
name: {
|
|
119
119
|
en: "Terminal name to disconnect; omit to disconnect all terminals.",
|
|
120
120
|
zh: "要断开的终端名;省略则断开全部终端。",
|
|
121
121
|
},
|
|
122
122
|
},
|
|
123
|
+
local_connect: {
|
|
124
|
+
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).",
|
|
125
|
+
zh: "在当前会话启动本地/容器 PTY 终端(如 pwsh、bash、docker exec -it <容器> sh);同一会话重复启动会先关闭旧的。基于 Bun.Terminal(opencode Bun 运行时内运行)。",
|
|
126
|
+
},
|
|
127
|
+
local_connect_args: {
|
|
128
|
+
command: {
|
|
129
|
+
en: "Command to launch, e.g. pwsh / bash / docker exec -it <container> sh",
|
|
130
|
+
zh: "要启动的命令,如 pwsh / bash / docker exec -it <容器> sh",
|
|
131
|
+
},
|
|
132
|
+
name: {
|
|
133
|
+
en: "Terminal name within the session, default 'default'. Creating with an existing name closes the old one first.",
|
|
134
|
+
zh: "会话内的终端名,默认 'default'。同名创建会先关闭旧终端。",
|
|
135
|
+
},
|
|
136
|
+
cwd: {
|
|
137
|
+
en: "Working directory, defaults to plugin cwd.",
|
|
138
|
+
zh: "工作目录,默认插件所在目录。",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
local_connect_title_ok: {
|
|
142
|
+
en: "Local terminal started",
|
|
143
|
+
zh: "本地终端已启动",
|
|
144
|
+
},
|
|
145
|
+
local_connect_ok: {
|
|
146
|
+
en: "Started: {cmd} (terminal {name})",
|
|
147
|
+
zh: "已启动:{cmd}(终端 {name})",
|
|
148
|
+
},
|
|
149
|
+
local_connect_title_fail: {
|
|
150
|
+
en: "Local terminal start failed",
|
|
151
|
+
zh: "本地终端启动失败",
|
|
152
|
+
},
|
|
123
153
|
denied: {
|
|
124
154
|
en: "Denied by user.",
|
|
125
155
|
zh: "用户已拒绝。",
|
|
@@ -177,12 +207,12 @@ export const T = {
|
|
|
177
207
|
zh: "SSH 会话已断开",
|
|
178
208
|
},
|
|
179
209
|
status_busy_hint: {
|
|
180
|
-
en: "\nHint: a command is still running. Wait and retry, or call
|
|
181
|
-
zh: "\n提示:仍有命令在执行,请等待后重试或调用
|
|
210
|
+
en: "\nHint: a command is still running. Wait and retry, or call term_read for partial output.",
|
|
211
|
+
zh: "\n提示:仍有命令在执行,请等待后重试或调用 term_read 获取部分输出。",
|
|
182
212
|
},
|
|
183
213
|
status_idle_hint: {
|
|
184
|
-
en: "\nHint: no command running. You can safely execute a new command or call
|
|
185
|
-
zh: "\n提示:无命令在执行,可安全执行新命令或调用
|
|
214
|
+
en: "\nHint: no command running. You can safely execute a new command or call term_read for remaining output.",
|
|
215
|
+
zh: "\n提示:无命令在执行,可安全执行新命令或调用 term_read 读取剩余输出。",
|
|
186
216
|
},
|
|
187
217
|
status_title: {
|
|
188
218
|
en: "SSH session status",
|
|
@@ -225,8 +255,8 @@ export const T = {
|
|
|
225
255
|
zh: "未连接",
|
|
226
256
|
},
|
|
227
257
|
err_busy: {
|
|
228
|
-
en: "Previous command still running, poll with
|
|
229
|
-
zh: "上一条命令仍在执行,请先
|
|
258
|
+
en: "Previous command still running, poll with term_status first",
|
|
259
|
+
zh: "上一条命令仍在执行,请先 term_status 轮询",
|
|
230
260
|
},
|
|
231
261
|
err_shell_open: {
|
|
232
262
|
en: "Shell open failed",
|
package/dist/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAOzC;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,UAAU,GAAS,IAAI;IAC7C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IACjC,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC7B,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC7B,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,kBAAkB;AAClB,MAAM,CAAC,MAAM,CAAC,GAAG;IACf,WAAW,EAAE;QACX,EAAE,EAAE,wKAAwK;QAC5K,EAAE,EAAE,uDAAuD;KAC5D;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,EAAE,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AE;QACX,EAAE,EAAE,sJAAsJ;QAC1J,EAAE,EAAE,gFAAgF;KACrF;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,mBAAmB;KACxB;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,6BAA6B;QACjC,EAAE,EAAE,gBAAgB;KACrB;IACD,aAAa,EAAE;QACb,EAAE,EAAE,wCAAwC;QAC5C,EAAE,EAAE,gCAAgC;KACrC;IACD,kBAAkB,EAAE;QAClB,EAAE,EAAE,yCAAyC;QAC7C,EAAE,EAAE,+BAA+B;KACpC;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iCAAiC;QACrC,EAAE,EAAE,oBAAoB;KACzB;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,8CAA8C;QAClD,EAAE,EAAE,4BAA4B;KACjC;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,eAAe;QACnB,EAAE,EAAE,KAAK;KACV;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,6DAA6D;QACjE,EAAE,EAAE,6BAA6B;KAClC;IACD,cAAc,EAAE;QACd,EAAE,EAAE,mBAAmB;QACvB,EAAE,EAAE,YAAY;KACjB;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,mCAAmC;QACvC,EAAE,EAAE,WAAW;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,yCAAyC;QAC7C,EAAE,EAAE,sBAAsB;KAC3B;CACO,CAAA;AAEV,iBAAiB;AACjB,MAAM,UAAU,EAAE,CAAC,GAAY,EAAE,IAAU;IACzC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;AACrB,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAA;AA+LvD,eAAO,MAAM,eAAe,EAAE,MA8X7B,CAAA;eAGc,eAAe"}
|