Files
pikasTech-unidesk/docs/reference/webterm.md
T

19 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Webterm 配置与受控部署
- 唯一配置来源:
- `config/platform-infra/webterm.yaml` 是端口、自动标签、启动模式、浏览器历史和输出聚合策略的 owning YAML
- `build/docker-compose.<port>.yaml` 是受控 CLI 渲染产物,禁止手工维护或在部署后恢复旧内容。
- 受控入口:
- 预览使用 `bun scripts/cli.ts platform-infra webterm plan --target <target>`
- 部署使用 `bun scripts/cli.ts platform-infra webterm apply --target <target> --confirm`
- 收口使用同一入口的 `status``validate`
- 浏览器历史策略:
- `browserTerminalHistory.desktopScrollbackLines` 控制桌面端 xterm 历史行数;
- `browserTerminalHistory.mobileScrollbackLines` 控制移动端 xterm 历史行数;
- `browserTerminalHistory.mobileMaxWidthPx` 与粗指针特征共同决定移动端策略;
- 视口类型变化后,已有终端必须同步新上限并截断超出上限的旧行。
- 输出聚合策略:
- `browserOutputPolicy.maxFramesPerSecond` 是每个浏览器连接、每个终端的最大输出消息频率;
- `browserOutputPolicy.maxFrameBytes` 是单条聚合输出消息的字节上限;
- 后端必须按终端独立排队,小数据在频率窗口内合并,积压数据按窗口顺序发送,禁止用字节阈值绕过频率上限。