/** * 抓大鹅 Match3D 创作 Agent 共享契约。 * 字段按 HTTP facade 的 camelCase DTO 命名,后端领域层 snake_case 字段由 facade 映射。 */ import type { Match3DGeneratedBackgroundAsset, Match3DGeneratedItemAsset, } from './match3dWorks'; export type Match3DCreationStage = | 'collecting' | 'collecting_config' | 'ready_to_compile' | 'draft_ready' | 'draft_compiled' | 'ready_to_publish' | 'published' | string; export type Match3DAgentMessageRole = 'user' | 'assistant' | 'system' | string; export type Match3DAgentMessageKind = | 'chat' | 'summary' | 'action_result' | 'warning' | string; export type Match3DAnchorStatus = 'confirmed' | 'missing' | 'inferred' | 'locked' | string; export interface CreateMatch3DAgentSessionRequest { seedText?: string; themeText?: string; referenceImageSrc?: string | null; clearCount?: number; difficulty?: number; assetStyleId?: string | null; assetStyleLabel?: string | null; assetStylePrompt?: string | null; generateClickSound?: boolean; } export type CreateMatch3DSessionRequest = CreateMatch3DAgentSessionRequest; export interface SendMatch3DAgentMessageRequest { clientMessageId: string; text: string; quickFillRequested?: boolean; referenceImageSrc?: string | null; } export type SendMatch3DMessageRequest = SendMatch3DAgentMessageRequest; export interface ExecuteMatch3DAgentActionRequest { action: string; gameName?: string; summary?: string; tags?: string[]; coverImageSrc?: string | null; clearCount?: number; difficulty?: number; generateClickSound?: boolean; } export type ExecuteMatch3DActionRequest = ExecuteMatch3DAgentActionRequest; export interface Match3DAnchorItemResponse { key: string; label: string; value: string; status: Match3DAnchorStatus; } export interface Match3DAnchorPackResponse { theme: Match3DAnchorItemResponse; clearCount: Match3DAnchorItemResponse; difficulty: Match3DAnchorItemResponse; } export interface Match3DCreatorConfig { themeText: string; referenceImageSrc?: string | null; clearCount: number; difficulty: number; assetStyleId?: string | null; assetStyleLabel?: string | null; assetStylePrompt?: string | null; generateClickSound?: boolean; } export interface Match3DResultDraft { profileId: string; gameName: string; themeText: string; summaryText?: string; summary?: string; tags: string[]; coverImageSrc?: string | null; referenceImageSrc?: string | null; clearCount: number; difficulty: number; totalItemCount?: number; publishReady?: boolean; blockers?: string[]; backgroundPrompt?: string | null; backgroundImageSrc?: string | null; backgroundImageObjectKey?: string | null; generatedBackgroundAsset?: Match3DGeneratedBackgroundAsset | null; generatedItemAssets?: Match3DGeneratedItemAsset[]; } export interface Match3DAgentMessage { id: string; role: Match3DAgentMessageRole; kind: Match3DAgentMessageKind; text: string; createdAt: string; } export type Match3DAgentMessageResponse = Match3DAgentMessage; export interface Match3DAgentSessionSnapshot { sessionId: string; currentTurn: number; progressPercent: number; stage: Match3DCreationStage; anchorPack: Match3DAnchorPackResponse; config?: Match3DCreatorConfig | null; draft?: Match3DResultDraft | null; messages: Match3DAgentMessage[]; lastAssistantReply?: string | null; publishedProfileId?: string | null; updatedAt: string; } export interface Match3DAgentSessionResponse { session: Match3DAgentSessionSnapshot; } export type Match3DSessionResponse = Match3DAgentSessionResponse; export interface Match3DAgentActionResponse { session: Match3DAgentSessionSnapshot; } export type Match3DActionResponse = Match3DAgentActionResponse;