FigJam Plugin Development Architecture Two-thread model: - - Main thread (Figma API, renderer) - NO browser APIs (window, document, fetch) - Access to figma. API - Renders nodes/edges to FigJam canvas - - UI iframe (WebSocket client) - Browser APIs available - Manages WebSocket connection to CLI - Handles connection UI Communication Flow JSON Import (UI) - Accepts DSL JSON (nodes as array) or IR JSON (nodes as object) - Validates with and normalizes to IR before posting to main thread - Validation errors are surfaced in the UI alert with path/message details Build Output: (code.js, ui.html) I…