@hyzyn/dsh-tty 0.27.0 → 0.27.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.
Files changed (3) hide show
  1. package/README.en.md +16 -0
  2. package/README.md +13 -0
  3. package/package.json +3 -3
package/README.en.md CHANGED
@@ -872,6 +872,22 @@ ctx.inject(['ttyTerminal'], (c) => {
872
872
  - The service name `ttyTerminal` is likewise not declared on the `Context` type surface; inject it as an
873
873
  optional dependency; when tty is not installed or is older than 0.14.0 it never fires (dsh-docker degrades
874
874
  to “copy command”).
875
+ - **`ttyTerminal` / WS `spawn` is a command surface with no static capability gate** (added 2026-10-07;
876
+ consumers must not describe it the other way round): this service and the `{t:'spawn'}` frame both accept an
877
+ arbitrary `command` and are **not governed by any `DSH_*_ALLOW_*`** (this plugin’s own static gate covers only
878
+ ProxyCommand, the “a config field drives a local command” tier). That is deliberate — the terminal panel *is*
879
+ the product, and **its permission ceiling rests on the user acting directly**: a human clicks “+” to open a
880
+ tab and types commands inside it. **Note carefully that the tier gate does not reach here**: the tier gate
881
+ above hangs on the `tools/pre-execute` waterfall and filters by the `tty_` / `sftp_` / `tunnel_` **prefixes**
882
+ (`TTY_TIER_PREFIXES`) — i.e. it gates **agent tool calls only**. A browser `spawn` frame or a
883
+ `ttyTerminal.open` call is a **WS / client-service** path and **never passes through it**. So do not treat it
884
+ as this command surface’s gate: it does not block a single byte of it (only the `tty_open` agent path is
885
+ governed).
886
+ **The cost**: no consumer should advertise “the plugin’s own exec switch” as the boundary that keeps you out of
887
+ a container — once tty is installed, an in-page script can use `ttyTerminal.open` or a WS `spawn` frame to get
888
+ an arbitrary command surface strictly stronger than a one-shot exec. See
889
+ [architecture.md § 7](../../docs/architecture.md#7-一条请求经过什么) for the threat-model boundary; docker states
890
+ the same boundary in its own README under “Known limitations”.
875
891
 
876
892
  ### Embedded in-place terminal (`ttyTerminal.mount`, 0.15.0)
877
893
 
package/README.md CHANGED
@@ -791,6 +791,19 @@ ctx.inject(['ttyTerminal'], (c) => {
791
791
  只受工具参数的字符串约束。两条通道的入参规则不同,别把这里当 `tty_open` 的限制。
792
792
  - 服务名 `ttyTerminal` 同样未声明在 `Context` 类型面上,按可选依赖注入;tty 未安装
793
793
  或版本 < 0.14.0 时不会触发(dsh-docker 会退化为「复制命令」)。
794
+ - **`ttyTerminal` / WS `spawn` 是「没有静态能力闸」的命令面**(2026-10-07 补,消费方文案别写反):
795
+ 本服务与 `{t:'spawn'}` 帧都直接接受任意 `command`,**不受任何 `DSH_*_ALLOW_*` 管辖**(本插件的
796
+ 那个静态闸只覆盖 ProxyCommand 这一档「配置字段驱动本机命令」)。这是刻意的——终端面板本身就是
797
+ 产品,**它的权限上界由用户的直接操作承担**:人点「+」开标签、人在里面敲命令。
798
+ **务必看清 tier gate 管不到这里**:上面的 tier gate 挂在 `tools/pre-execute` 瀑布上、只按
799
+ `tty_` / `sftp_` / `tunnel_` **前缀**过滤(`TTY_TIER_PREFIXES`),也就是只闸 **agent 工具调用**;
800
+ 浏览器发来的 `spawn` 帧与 `ttyTerminal.open` 是 **WS / 客户端服务**通道,**完全不经过它**。
801
+ 所以别把它当这条命令面的闸门——它一个字节都不拦(`tty_open` 那条 agent 路径才受它管)。
802
+ **代价**:任何消费方都不该把「配上 tty 之后本插件自己的 exec 开关」宣传成「进不了容器」的
803
+ 边界——装上 tty 后,页内脚本经 `ttyTerminal.open` 或 WS `spawn` 就能拿到比一次性 exec 更强的
804
+ 任意命令面。威胁模型边界见
805
+ [architecture.md § 7](../../docs/architecture.md#7-一条请求经过什么);docker 侧的同一句边界写在
806
+ 它的 README「已知限制」。
794
807
 
795
808
  ### 就地嵌入终端(`ttyTerminal.mount`,0.15.0)
796
809
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyzyn/dsh-tty",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "description": "DSH Web GUI 的终端面板插件:侧边栏「终端」提供 xterm.js + PTY 全交互终端与 ssh2 原生 SSH 远程连接(连接簿、主机指纹 TOFU、跳板机),支持 tmux 会话持久化、SFTP 文件传输、端口转发与服务器状态条,并向其他插件开放 ttyTerminal / ttyPanel / ttyConnbar 扩展点;Windows 宿主同样可用。",
5
5
  "keywords": [
6
6
  "dsh",
@@ -52,8 +52,8 @@
52
52
  "ws": "^8.18.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@deepseek-ai/dsh": "^0.1.7-rc.2 || ^0.2.0-rc.1 || ^0.2.0-rc.2 || ^0.2.1-alpha.1",
56
- "@deepseek-ai/dsh-tools": "^0.1.7-rc.2 || ^0.2.0-rc.1 || ^0.2.0-rc.2 || ^0.2.1-alpha.1"
55
+ "@deepseek-ai/dsh": "^0.1.7-rc.2 || ^0.2.0-rc.1 || ^0.2.0-rc.2 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2",
56
+ "@deepseek-ai/dsh-tools": "^0.1.7-rc.2 || ^0.2.0-rc.1 || ^0.2.0-rc.2 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@deepseek-ai/cordis": "^4.0.4",