"use client"; // Live Pane tab body for missions running on a fleet node via Herdr. // Attaches xterm.js to the node's Herdr TUI (WebRTC direct → WS-relay // fallback). Rendered inline in MissionCanvas when // mission.runtime_kind='local_herdr' and tab='pane'. import { useEffect, useState } from "react"; import { nodeHerdrConnector, useResilientTerminal, type TermMode, } from "@/components/computer/apps/terminal/core"; import "@xterm/xterm/css/xterm.css"; const mono = "ui-monospace, SFMono-Regular, SF Mono, Menlo, Monaco, Consolas, monospace"; export function MissionLivePane({ nodeId, visible, }: { nodeId: string | null; visible: boolean; }) { if (!nodeId) { return (