import type { MarkdownAnalysisReport } from "../integrations/markdown-corpus.js"; import type { StudioEventType, StudioFigmaActionRequest, StudioFigmaActionResult, StudioFigmaOpenRequest, StudioFigmaOpenResult, StudioFigmaStatus } from "./types.js"; type StudioFigmaBridgeStatus = Omit & Partial>; export interface StudioFigmaBridgeLike { isConnected: boolean; connect(preferredPort?: number): Promise; disconnect(): Promise; getStatus(): StudioFigmaBridgeStatus; getSelection(): Promise; extractDesignSystem(): Promise<{ tokens?: unknown[]; components?: unknown[]; styles?: unknown[]; }>; extractStickies(): Promise; getPageTree(depth?: number): Promise; getWidgetSnapshot(timeoutMs?: number): Promise; captureScreenshot(nodeId?: string, format?: "PNG" | "SVG", scale?: number): Promise; createNode(params: Record): Promise; updateNode(nodeId: string, properties: Record, expectedVersion?: string): Promise; deleteNode(nodeId: string): Promise; setSelection(nodeIds: string[]): Promise; navigateTo(nodeId: string): Promise; pushTokens(tokens: NonNullable, options?: { createMissing?: boolean; collectionName?: string; }): Promise; execute?(code: string, timeout?: number): Promise; } export interface StudioFigmaControllerEvent { type: StudioEventType; message: string; timestamp: string; data?: unknown; } interface StudioFigmaControllerOptions { projectRoot: string; bridge?: StudioFigmaBridgeLike; bridgeFactory?: () => StudioFigmaBridgeLike; openApp?: (target: string) => Promise; onEvent?: (event: StudioFigmaControllerEvent) => void; } export declare class StudioFigmaController { private readonly projectRoot; private readonly onEvent?; private readonly bridgeFactory; private readonly openApp; private bridge; constructor(options: StudioFigmaControllerOptions); connect(input?: { preferredPort?: number | null; }): Promise; disconnect(): Promise; status(): Promise; openFigma(input?: StudioFigmaOpenRequest): Promise; runAction(request: StudioFigmaActionRequest): Promise; private dispatchAction; private ensureBridge; private ensureConnectedBridge; private persistArtifact; syncMarkdownToFigJam(report: MarkdownAnalysisReport): Promise<{ bridgeState: "connected"; createdNodeCount: number; artifactPath: string | null; diagnostics: string[]; }>; private emit; } export {};