Compare commits

...
Author SHA1 Message Date
weichen 37b96fd94f Add the Surface snapshot types to the TS contract authority
Why: U4 needs the frontend to render saved surfaces; the Go contract
(Core #25) gains its TypeScript mirror in the single authority so make
contracts regenerates the frontend and UI copies.

Evidence: Mirror regeneration and combined make test in the Dev
workspace after re-pinning.

Impact: Type-only additive change.

Refs: Core PR #25; Dev task feature/generative-ui-u4
2026-10-11 11:32:43 +00:00
weichen 7a98a7e7fe Merge pull request 'Add the optional node id/source fields to the TS contract authority' (#26) from feature/generative-ui-u2-ts-nodeids into main 2026-10-11 08:44:13 +00:00
+42
View File
@@ -354,3 +354,45 @@ export interface UploadInfo {
artifactId: ID; filename: string; mime?: string; size: number; artifactId: ID; filename: string; mime?: string; size: number;
parsed?: ParsedDocument; 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;
}