/** * Source capability vocabulary for the Design Studio. * * Every source (inline, localhost, fusion) advertises an explicit capability * set. The UI gates controls on this — never on `sourceType` alone. The * agent reads the same map and never claims a write the source cannot perform. * * Relation to `source-mode.ts`: * - `DesignBridgeOperation` ("select" | "resolveNodeToFile" | "readFile" | * "applyEdit" | "writeFile" | "captureSnapshot" | "captureState" | * "listFiles") describes * the low-level bridge RPC surface. * - `DesignCapabilityName` below is the *higher-level* capability vocabulary * that UI panels and agent actions read. Several capabilities build on one * or more bridge operations; others (e.g. `previewMotion`, `writeTokens`) are * implemented above the bridge layer and have no direct bridge op. * - `DesignBridgeOperationStatus` ("available" | "planned" | "disabled") is * reused here as `CapabilityStatus`. */ import type { DesignBridgeOperationStatus } from "./source-mode"; // ─── Capability name vocabulary ────────────────────────────────────────────── /** * The full set of named capabilities a design source can advertise. * * - **readFile / writeFile / applyEdit** — low-level file I/O; bridge-backed. * - **resolveNodeToFile** — resolve a DOM node → source file + span. * - **previewPatch / diffPatch** — preview or diff a proposed source edit * without committing it. * - **captureSnapshot / captureState** — snapshot the rendered iframe or * capture running-app route+data state. * - **indexComponents** — static AST or runtime parse of React/TS components. * - **indexTokens** — parse CSS vars / Tailwind config / theme JSON for tokens. * - **writeTokens** — write token changes back to the real source files. * - **previewMotion** — scrub/play keyframe animations without writing to DB. * - **writeMotion** — commit a motion timeline (managed `