export type WebArtifactKind = "markdown" | "mermaid" | "svg" | "png" | "json" | "text" | "log" | "drawio" | "erd" | "tsx-source" | "tsx-canvas" | "unsupported"; export interface WebArtifactGroup { workspace: string; taskId: string; runId: string; type: WebArtifactKind; } export interface WebCanvasContract { version: 1; width: number; height: number; title?: string; nodes: WebCanvasNode[]; edges?: WebCanvasEdge[]; } export interface WebCanvasNode { id: string; label: string; x: number; y: number; width?: number; height?: number; color?: string; } export interface WebCanvasEdge { from: string; to: string; label?: string; } export interface WebErdContract { title?: string; tables: WebErdTable[]; relationships: WebErdRelationship[]; } export interface WebErdTable { name: string; fields: WebErdField[]; } export interface WebErdField { name: string; type?: string; key?: "primary" | "foreign" | "unique" | "index"; references?: string; } export interface WebErdRelationship { fromTable: string; fromField?: string; toTable: string; toField?: string; label?: string; } export interface WebArtifactSummary { path: string; type: WebArtifactKind; workspace: string; group: WebArtifactGroup; taskId?: string; runId?: string; phase?: string; sizeBytes: number; updatedAt: string; renderable: boolean; safePreview: boolean; sourceAvailable: boolean; unsupportedReason?: string; url?: string; } export interface WebArtifactPreview extends WebArtifactSummary { content?: string; parseError?: string; canvas?: WebCanvasContract; erd?: WebErdContract; } export interface WebArtifactCanvasReport { artifacts: WebArtifactSummary[]; }