/** * dsh-agent-team-console — Client half (browser bundle), snapshot contract v4. * ============================================================================ * Self-registering classic script loaded through window.__ModuleLoader__: * - id MUST equal the package name. * - only require('react') is allowed here; no @deepseek-ai/* imports. * - Registers a sidebar.panellist entry (id 'team-console') and a keyed * main panel (key 'team-console') that polls the Host half at * GET /api/team-console/snapshot (same origin, read-only, 2s cadence). * - Read-only, graph-first design (1.4.0 / contract v4): * header (project filter, live dot, refresh) * -> compact status chip strip (in-progress / running / tokens / blocked / pending) * -> a responsive grid of workspace/team block cards: exactly one team is * expanded into a full-row card at a time (single accordion; default: * first active team). The expanded card keeps the workspace-first header * with the working-vs-idle donut and stats, and its body is a top-down * layered SVG data-flow graph: the Lead at the top (root), teammates in * balanced rows below, downward cubic hand-off edges with a slow dash * flow, curved message chords, and one deterministic pixel-art character * per member with status motion; below it a collapsed task summary line * with in-progress rows on demand. The pure layout/edge geometry lives * in a marked self-contained block below (unit-tested standalone by the * repo check script). * The activity timeline is intentionally not rendered (contract keeps it for * API consumers); stats come from contract v3 `team.stats` / `member.stats`, * edges from contract v4 `team.edges` (with a structural star fallback). * - All copy is bilingual through the Client locale service under the * namespace 'agent-team-console' (zh + en kept key-for-key in sync); the * Chinese dictionary is primary and the English one mirrors it. * - Colors/borders/backgrounds come exclusively from --dsw-* theme tokens; * the single