- frontend/.../terminal/core.ts: `useResilientTerminal` owns the xterm lifecycle (init, fit, debounced resize, reconnect, refit-on-visible) with a pluggable transport. Two connectors: `wsConnector` (agent terminal → container PTY over WS) and `nodeWebrtcConnector` (node terminal → host PTY, direct WebRTC DataChannel with WS-relay fallback, input buffered during the race). The agent terminal now gets the node terminal's robust reconnect for free; both share one xterm setup. - TerminalApp (agent) + NodeTerminalApp (node) reduced to thin wrappers over the core — net ~330 lines of duplicated transport/reconnect/xterm code removed. - scripts/deploy.sh: the deploys were manual, so the locally-built agent images (agent-base/browser/terminal — not in any registry) were never shipped and 404'd on provision. The script always (re)builds + loads them onto gw-04 AND every fleet node, with a skip-if-identical guard so unchanged images aren't re-transferred. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>