9a27338222d46054512ec20a55b9591c4e848494
- TmuxController 重构为 pane-per-surface:TmuxPaneSurface(session+state+gate/pane) + TmuxWindow(panes 字典/visibleLayout 渲染/fullLayout diff) + surfaceByPane O(1) 路由 - 尺寸走路线 b:attach 发 refresh-client -C WxH 让 tmux 布局,pane surface 尺寸取 layout rect(%output 按 tmux pane 宽高排版,一致才不换行/清屏错乱);surface resize 只断言不反向驱动 - applyLayout reconcile(增删留、复用不重建);新 pane capture-pane %end 前丢弃 %output - 输入绑 pane→send-keys -t %self;tap→select-pane;ContentView 按 rect 绝对定位分屏 + 焦点边框 - 前置修复:tmux 网关字节改 TmuxByteChannel(AsyncStream 单消费者)保序,防多 pane 打碎协议 - 验证(192.168.9.199 直连 tmux -CC attach):左右 pane 各渲染 LEFT/RIGHT 输出、实时、无错乱 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
terminalX
原生苹果生态终端运维 / vibe coding 工具。平台优先级:iPadOS > iOS > macOS(Apple Silicon)。
核心选型:libghostty(终端引擎) · mosh · Tailscale (tsnet 用户态) · tmux control mode hook。
设计与决策见
docs/(若缺失,参见会话记忆 / 架构蓝图)。当前处于 M0(骨架 + 引擎 + libssh2 直连),走 SSH-first 路线。
仓库结构
packages/ 纯 Swift SPM 包(源码构建,依赖只向下)
TXCore 零依赖:模型 / 状态机 / 协议 / 纯算法(含 tmux control-mode 解析器)
TXTransport SSH(libssh2) 引导 · mosh 驱动 · UDP relay · 连接编排 [M1+]
TXTailnet tsnet 多节点 · DialerRouter · fd 桥 [M1+]
TXTerminal GhosttyKit 包装:Metal 渲染 · 键盘 · IME [M0]
TXSecurity Keychain / Secure Enclave / known_hosts [M4]
TXPTY 本地 PTY(仅 macOS) [M4]
TXUI SwiftUI 界面层 [M0+]
apps/ Xcode app targets(XcodeGen 生成,iOS/iPadOS 合一 + macOS 独立)
vendor/ 非 Swift 语言源(zig/go/c++),CI 产出 xcframework [M1+]
artifacts/ 预编译 xcframework 落地(gitignore)
开发
# M0:纯逻辑包,命令行即可测,无需 Xcode 工程
cd packages/TXCore && swift test
工具链要求
- Xcode 26+ / Swift 6.x(M0)
- Go + gomobile(M1,tsnet)
- CMake + Ninja + zig(M1/M2,vendor 构建)
Description
Languages
C
84.7%
Swift
14.9%
Objective-C
0.4%