This commit is contained in:
279
packages/shared/src/contracts/rpgAgentDraft.ts
Normal file
279
packages/shared/src/contracts/rpgAgentDraft.ts
Normal file
@@ -0,0 +1,279 @@
|
||||
/**
|
||||
* RPG Agent 草稿与资产覆盖率契约。
|
||||
* 这一层只描述 foundation draft、草稿卡片与资产状态,不包含会话编排语义。
|
||||
*/
|
||||
|
||||
export type RpgAgentDraftCardKind =
|
||||
| 'world'
|
||||
| 'camp'
|
||||
| 'faction'
|
||||
| 'character'
|
||||
| 'landmark'
|
||||
| 'thread'
|
||||
| 'chapter'
|
||||
| 'scene_chapter'
|
||||
| 'carrier'
|
||||
| 'sidequest_seed';
|
||||
|
||||
export type RpgAgentDraftCardStatus =
|
||||
| 'suggested'
|
||||
| 'confirmed'
|
||||
| 'locked'
|
||||
| 'warning';
|
||||
|
||||
export interface RpgAgentDraftCardSummary {
|
||||
id: string;
|
||||
kind: RpgAgentDraftCardKind;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
summary: string;
|
||||
status: RpgAgentDraftCardStatus;
|
||||
linkedIds: string[];
|
||||
warningCount: number;
|
||||
assetStatus?: RpgAgentRoleAssetStatus | null;
|
||||
assetStatusLabel?: string | null;
|
||||
}
|
||||
|
||||
export interface RpgAgentDraftCardDetailSection {
|
||||
id: string;
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftFaction {
|
||||
id: string;
|
||||
name: string;
|
||||
title?: string;
|
||||
subtitle?: string;
|
||||
publicGoal: string;
|
||||
relatedConflict: string;
|
||||
tension?: string;
|
||||
playerRelation: string;
|
||||
summary: string;
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftCharacter {
|
||||
id: string;
|
||||
name: string;
|
||||
title: string;
|
||||
role: string;
|
||||
publicIdentity: string;
|
||||
publicMask?: string;
|
||||
currentPressure: string;
|
||||
hiddenHook?: string;
|
||||
relationToPlayer: string;
|
||||
threadIds: string[];
|
||||
summary: string;
|
||||
skills?: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
actionPreviewConfig?: Record<string, unknown> | null;
|
||||
}>;
|
||||
imageSrc?: string | null;
|
||||
generatedVisualAssetId?: string | null;
|
||||
generatedAnimationSetId?: string | null;
|
||||
animationMap?: Record<string, unknown> | null;
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftLandmark {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
purpose: string;
|
||||
mood: string;
|
||||
importance: string;
|
||||
secret?: string;
|
||||
imageSrc?: string | null;
|
||||
generatedSceneAssetId?: string | null;
|
||||
generatedScenePrompt?: string | null;
|
||||
generatedSceneModel?: string | null;
|
||||
characterIds: string[];
|
||||
threadIds: string[];
|
||||
summary: string;
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftThread {
|
||||
id: string;
|
||||
title: string;
|
||||
type: 'main' | 'hidden';
|
||||
conflictType?: string;
|
||||
conflict: string;
|
||||
stakes?: string;
|
||||
characterIds: string[];
|
||||
landmarkIds: string[];
|
||||
summary: string;
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftChapter {
|
||||
id: string;
|
||||
title: string;
|
||||
openingEvent: string;
|
||||
playerGoal: string;
|
||||
characterIds: string[];
|
||||
landmarkIds: string[];
|
||||
understandingShift: string;
|
||||
summary: string;
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftCamp {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
mood: string;
|
||||
imageSrc?: string | null;
|
||||
generatedSceneAssetId?: string | null;
|
||||
generatedScenePrompt?: string | null;
|
||||
generatedSceneModel?: string | null;
|
||||
summary: string;
|
||||
}
|
||||
|
||||
export interface RpgAgentWorldAttributeSlot {
|
||||
slotId: 'axis_a' | 'axis_b' | 'axis_c' | 'axis_d' | 'axis_e' | 'axis_f';
|
||||
name: string;
|
||||
definition: string;
|
||||
positiveSignals: string[];
|
||||
negativeSignals: string[];
|
||||
combatUseText: string;
|
||||
socialUseText: string;
|
||||
explorationUseText: string;
|
||||
}
|
||||
|
||||
export interface RpgAgentWorldAttributeSchema {
|
||||
id: string;
|
||||
worldId: string;
|
||||
schemaVersion: number;
|
||||
generatedFrom: {
|
||||
worldType: 'CUSTOM' | 'WUXIA' | 'XIANXIA';
|
||||
worldName: string;
|
||||
settingSummary: string;
|
||||
tone: string;
|
||||
conflictCore: string;
|
||||
};
|
||||
schemaName?: string;
|
||||
slots: RpgAgentWorldAttributeSlot[];
|
||||
}
|
||||
|
||||
export type RpgAgentSceneActStage =
|
||||
| 'opening'
|
||||
| 'expansion'
|
||||
| 'turning_point'
|
||||
| 'climax'
|
||||
| 'aftermath';
|
||||
|
||||
export type RpgAgentSceneActAdvanceRule =
|
||||
| 'after_primary_contact'
|
||||
| 'after_active_step_complete'
|
||||
| 'after_chapter_resolution';
|
||||
|
||||
export interface RpgAgentFoundationDraftSceneAct {
|
||||
id: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
stageCoverage: RpgAgentSceneActStage[];
|
||||
backgroundImageSrc?: string | null;
|
||||
backgroundAssetId?: string | null;
|
||||
encounterNpcIds: string[];
|
||||
primaryNpcId: string;
|
||||
oppositeNpcId: string;
|
||||
eventDescription: string;
|
||||
linkedThreadIds: string[];
|
||||
actGoal: string;
|
||||
transitionHook: string;
|
||||
advanceRule: RpgAgentSceneActAdvanceRule;
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftSceneChapter {
|
||||
id: string;
|
||||
sceneId: string;
|
||||
sceneName: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
sceneTaskDescription: string;
|
||||
linkedThreadIds: string[];
|
||||
linkedLandmarkIds: string[];
|
||||
acts: RpgAgentFoundationDraftSceneAct[];
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftProfile {
|
||||
name: string;
|
||||
subtitle: string;
|
||||
summary: string;
|
||||
tone: string;
|
||||
playerGoal: string;
|
||||
majorFactions: string[];
|
||||
coreConflicts: string[];
|
||||
playableNpcs: RpgAgentFoundationDraftCharacter[];
|
||||
storyNpcs: RpgAgentFoundationDraftCharacter[];
|
||||
landmarks: RpgAgentFoundationDraftLandmark[];
|
||||
camp?: RpgAgentFoundationDraftCamp | null;
|
||||
themePack?: Record<string, unknown> | null;
|
||||
storyGraph?: Record<string, unknown> | null;
|
||||
attributeSchema: RpgAgentWorldAttributeSchema;
|
||||
factions: RpgAgentFoundationDraftFaction[];
|
||||
threads: RpgAgentFoundationDraftThread[];
|
||||
chapters: RpgAgentFoundationDraftChapter[];
|
||||
sceneChapters: RpgAgentFoundationDraftSceneChapter[];
|
||||
worldHook: string;
|
||||
playerPremise: string;
|
||||
openingSituation: string;
|
||||
iconicElements: string[];
|
||||
sourceAnchorSummary: string;
|
||||
}
|
||||
|
||||
export interface RpgAgentFoundationDraftResult {
|
||||
draftProfile: RpgAgentFoundationDraftProfile;
|
||||
draftCards: RpgAgentDraftCardSummary[];
|
||||
}
|
||||
|
||||
export interface RpgAgentDraftCardDetail {
|
||||
id: string;
|
||||
kind: RpgAgentDraftCardKind;
|
||||
title: string;
|
||||
sections: RpgAgentDraftCardDetailSection[];
|
||||
linkedIds: string[];
|
||||
locked: false;
|
||||
editable: boolean;
|
||||
editableSectionIds: string[];
|
||||
warningMessages: string[];
|
||||
assetStatus?: RpgAgentRoleAssetStatus | null;
|
||||
assetStatusLabel?: string | null;
|
||||
}
|
||||
|
||||
export type RpgAgentAssetPriorityTier = 'hero' | 'featured' | 'supporting';
|
||||
|
||||
export type RpgAgentRoleAssetStatus =
|
||||
| 'missing'
|
||||
| 'visual_ready'
|
||||
| 'animations_ready'
|
||||
| 'complete';
|
||||
|
||||
export interface RpgAgentRoleAssetSummary {
|
||||
roleId: string;
|
||||
roleName: string;
|
||||
roleKind: 'playable' | 'story';
|
||||
priorityTier: RpgAgentAssetPriorityTier;
|
||||
portraitPath?: string | null;
|
||||
generatedVisualAssetId?: string | null;
|
||||
generatedAnimationSetId?: string | null;
|
||||
status: RpgAgentRoleAssetStatus;
|
||||
missingAnimations: string[];
|
||||
nextPointCost: number;
|
||||
}
|
||||
|
||||
export interface RpgAgentSceneAssetSummary {
|
||||
sceneId: string;
|
||||
sceneName: string;
|
||||
actId?: string | null;
|
||||
actTitle?: string | null;
|
||||
imageSrc?: string | null;
|
||||
assetId?: string | null;
|
||||
status: 'missing' | 'ready';
|
||||
nextPointCost: number;
|
||||
}
|
||||
|
||||
export interface RpgAgentAssetCoverageSummary {
|
||||
roleAssets: RpgAgentRoleAssetSummary[];
|
||||
sceneAssets: RpgAgentSceneAssetSummary[];
|
||||
allRoleAssetsReady: boolean;
|
||||
allSceneAssetsReady: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user