抓大鹅F3实现
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-30 21:01:36 +08:00
parent 22f6e6f4e7
commit 08815d98bc
39 changed files with 5891 additions and 18 deletions

View File

@@ -0,0 +1,119 @@
export type Match3DCreationStage =
| 'collecting_config'
| 'draft_ready'
| '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;
}
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;
}
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;
}
export interface Match3DResultDraft {
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[];
}
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;

View File

@@ -0,0 +1,125 @@
export type Match3DRunStatus =
| 'running'
| 'won'
| 'failed'
| 'stopped'
| 'Running'
| 'Won'
| 'Failed'
| 'Stopped'
| string;
export type Match3DItemState =
| 'in_board'
| 'in_tray'
| 'cleared'
| 'InBoard'
| 'Flying'
| 'InTray'
| 'Cleared'
| string;
export type Match3DFailureReason =
| 'time_up'
| 'tray_full'
| 'TimeUp'
| 'TrayFull'
| string;
export type Match3DClickRejectReason =
| 'run_not_active'
| 'snapshot_version_mismatch'
| 'item_not_found'
| 'item_not_in_board'
| 'item_not_clickable'
| 'tray_full'
| string;
export type Match3DClickConfirmStatus =
| 'Accepted'
| 'RejectedNotClickable'
| 'RejectedAlreadyMoved'
| 'RejectedTrayFull'
| 'VersionConflict'
| 'RunFinished';
export interface StartMatch3DRunRequest {
profileId: string;
}
export interface Match3DClickItemRequest {
runId?: string;
itemInstanceId: string;
clientActionId?: string;
snapshotVersion?: number;
clientSnapshotVersion: number;
clientEventId: string;
clickedAtMs: number;
}
export type ClickMatch3DItemRequest = Match3DClickItemRequest;
export interface StopMatch3DRunRequest {
clientActionId: string;
}
export interface Match3DItemSnapshot {
itemInstanceId: string;
itemTypeId: string;
visualKey: string;
x: number;
y: number;
radius: number;
layer: number;
state: Match3DItemState;
clickable: boolean;
traySlotIndex?: number | null;
}
export interface Match3DTraySlot {
slotIndex: number;
itemInstanceId?: string | null;
itemTypeId?: string | null;
visualKey?: string | null;
}
export interface Match3DRunSnapshot {
runId: string;
profileId: string;
ownerUserId?: string;
status: Match3DRunStatus;
snapshotVersion: number;
startedAtMs: number;
durationLimitMs: number;
serverNowMs?: number;
remainingMs: number;
clearCount: number;
totalItemCount: number;
clearedItemCount: number;
boardVersion?: number;
items: Match3DItemSnapshot[];
traySlots: Match3DTraySlot[];
failureReason?: Match3DFailureReason | null;
lastConfirmedActionId?: string | null;
}
export interface Match3DClickConfirmation {
accepted: boolean;
rejectReason?: Match3DClickRejectReason | null;
enteredSlotIndex?: number | null;
clearedItemInstanceIds: string[];
run: Match3DRunSnapshot;
}
export interface Match3DClickItemResult {
status: Match3DClickConfirmStatus;
run: Match3DRunSnapshot;
acceptedItemInstanceId?: string;
clearedItemInstanceIds: string[];
failureReason?: Match3DFailureReason | null;
}
export interface Match3DRunResponse {
run: Match3DRunSnapshot;
}
export interface Match3DClickResponse {
confirmation: Match3DClickConfirmation;
}

View File

@@ -0,0 +1,45 @@
export type Match3DWorkPublicationStatus = 'draft' | 'published' | string;
export interface PutMatch3DWorkRequest {
gameName: string;
summary: string;
tags: string[];
coverImageSrc?: string | null;
referenceImageSrc?: string | null;
clearCount: number;
difficulty: number;
}
export interface Match3DWorkSummary {
workId: string;
profileId: string;
ownerUserId: string;
sourceSessionId?: string | null;
gameName: string;
themeText: string;
summary: string;
tags: string[];
coverImageSrc?: string | null;
referenceImageSrc?: string | null;
clearCount: number;
difficulty: number;
publicationStatus: Match3DWorkPublicationStatus;
playCount: number;
updatedAt: string;
publishedAt?: string | null;
publishReady: boolean;
}
export interface Match3DWorkProfile extends Match3DWorkSummary {}
export interface Match3DWorksResponse {
items: Match3DWorkSummary[];
}
export interface Match3DWorkDetailResponse {
item: Match3DWorkProfile;
}
export interface Match3DWorkMutationResponse {
item: Match3DWorkProfile;
}

View File

@@ -11,6 +11,9 @@ export * from './contracts/rpgCreationFixtures';
export * from './contracts/rpgCreationPreview';
export * from './contracts/rpgCreationResultView';
export * from './contracts/rpgCreationWorkSummary';
export * from './contracts/match3dAgent';
export * from './contracts/match3dRuntime';
export * from './contracts/match3dWorks';
export * from './contracts/puzzleAgentActions';
export * from './contracts/puzzleAgentDraft';
export * from './contracts/puzzleAgentSession';