diff --git a/ts/types.ts b/ts/types.ts index 6149691..dd4ecd6 100644 --- a/ts/types.ts +++ b/ts/types.ts @@ -355,3 +355,45 @@ export interface UploadInfo { artifactId: ID; filename: string; mime?: string; size: number; parsed?: ParsedDocument; } + +// ---- Generative UI Surface(提案 U2/U4;与 Go surface.go 同步)---- + +export interface SurfaceCompat { + schemaVersion: number; + catalogVersion: string; + pluginVersion?: string; +} + +export interface SurfaceIdentity { + surfaceId: ID; + owner: string; + projectId?: ID; + conversationId?: ID; + sourceRunId?: ID; + pluginId: string; +} + +export interface SurfaceSpec { + title: string; + nodes: UINode[]; +} + +export interface SurfaceSnapshot { + identity: SurfaceIdentity; + compat: SurfaceCompat; + revision: number; + baseRevision?: number; + contextVersion?: string; + activationEpoch: number; + spec: SurfaceSpec; + semanticText?: string; +} + +export interface SurfaceMeta { + surfaceId: ID; + title: string; + pluginId: string; + revision: number; + conversationId?: ID; + updatedAt: string; +}