Close DDD refactor and remove generated asset proxy

This commit is contained in:
kdletters
2026-05-02 00:27:22 +08:00
parent fd08262bf0
commit 9d9913095d
605 changed files with 11811 additions and 10106 deletions

View File

@@ -1,4 +1,5 @@
import type { JsonObject } from './common';
import type { SavedGameSnapshotInput } from './runtime';
/**
* story session 主链共享契约。
@@ -12,12 +13,32 @@ export type BeginStorySessionRequest = {
openingSummary?: string | null;
};
export type BeginStoryRuntimeSessionRequest<
TProfile = JsonObject,
TCharacter = JsonObject,
> = {
worldType: string;
customWorldProfile?: TProfile | null;
character: TCharacter;
runtimeMode?: 'play' | 'preview' | 'test';
disablePersistence?: boolean;
};
export type ContinueStoryRequest = {
storySessionId: string;
narrativeText: string;
choiceFunctionId?: string | null;
};
export type ResolveStoryRuntimeActionRequest = {
storySessionId: string;
clientVersion?: number;
functionId: string;
actionText: string;
targetId?: string | null;
payload?: JsonObject | null;
};
export type StorySessionPayload = {
storySessionId: string;
runtimeSessionId: string;
@@ -52,6 +73,11 @@ export type StorySessionStateResponse = {
storyEvents: StoryEventPayload[];
};
export type StoryRuntimeSnapshotPayload<
TGameState = JsonObject,
TCurrentStory = JsonObject,
> = SavedGameSnapshotInput<TGameState, string, TCurrentStory>;
export type StoryRuntimeProjectionRequest = {
storySessionId: string;
clientVersion?: number;
@@ -94,6 +120,7 @@ export type StoryRuntimeProjectionResponse = {
storySession: StorySessionPayload;
storyEvents: StoryEventPayload[];
serverVersion: number;
gameState: JsonObject;
actor: StoryRuntimeActorProjection;
inventory: StoryRuntimeInventoryProjection;
options: StoryRuntimeOptionProjection[];
@@ -102,3 +129,7 @@ export type StoryRuntimeProjectionResponse = {
actionResultText?: string | null;
toast?: string | null;
};
export type StoryRuntimeMutationResponse = {
projection: StoryRuntimeProjectionResponse;
};