1
This commit is contained in:
@@ -55,9 +55,13 @@ export type BigFishLevelBlueprintResponse = {
|
||||
level: number;
|
||||
name: string;
|
||||
oneLineFantasy: string;
|
||||
textDescription: string;
|
||||
silhouetteDirection: string;
|
||||
sizeRatio: number;
|
||||
visualDescription: string;
|
||||
visualPromptSeed: string;
|
||||
idleMotionDescription: string;
|
||||
moveMotionDescription: string;
|
||||
motionPromptSeed: string;
|
||||
mergeSourceLevel?: number | null;
|
||||
preyWindow: number[];
|
||||
|
||||
40
packages/shared/src/contracts/rpgCreationResultView.ts
Normal file
40
packages/shared/src/contracts/rpgCreationResultView.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { CustomWorldProfileRecord } from './runtime';
|
||||
import type { RpgAgentSessionSnapshot } from './rpgAgentSession';
|
||||
|
||||
export type RpgCreationResultProfileSource =
|
||||
| 'result_preview'
|
||||
| 'draft_profile'
|
||||
| 'none';
|
||||
|
||||
export type RpgCreationResultTargetStage =
|
||||
| 'agent-workspace'
|
||||
| 'custom-world-generating'
|
||||
| 'custom-world-result';
|
||||
|
||||
export type RpgCreationResultGenerationViewSource =
|
||||
| 'agent-draft-foundation'
|
||||
| null;
|
||||
|
||||
export type RpgCreationResultViewSource = 'agent-draft' | null;
|
||||
|
||||
export type RpgCreationResultRecoveryAction =
|
||||
| 'continue_agent'
|
||||
| 'resume_generation'
|
||||
| 'open_result'
|
||||
| 'missing_session';
|
||||
|
||||
export interface RpgCreationResultView {
|
||||
session: RpgAgentSessionSnapshot;
|
||||
profile: CustomWorldProfileRecord | null;
|
||||
profileSource: RpgCreationResultProfileSource;
|
||||
targetStage: RpgCreationResultTargetStage;
|
||||
generationViewSource: RpgCreationResultGenerationViewSource;
|
||||
resultViewSource: RpgCreationResultViewSource;
|
||||
canAutosaveLibrary: boolean;
|
||||
canSyncResultProfile: boolean;
|
||||
publishReady: boolean;
|
||||
canEnterWorld: boolean;
|
||||
blockerCount: number;
|
||||
recoveryAction: RpgCreationResultRecoveryAction;
|
||||
recoveryReason?: string | null;
|
||||
}
|
||||
@@ -47,11 +47,12 @@ export type CharacterChatReplyRequest<
|
||||
TConversationTurn = unknown,
|
||||
TTargetStatus = unknown,
|
||||
> = {
|
||||
worldType: string;
|
||||
playerCharacter: TCharacter;
|
||||
sessionId?: string;
|
||||
worldType?: string;
|
||||
playerCharacter?: TCharacter;
|
||||
targetCharacter: TCharacter;
|
||||
storyHistory: TStoryMoment[];
|
||||
context: TContext;
|
||||
storyHistory?: TStoryMoment[];
|
||||
context?: TContext;
|
||||
conversationHistory: TConversationTurn[];
|
||||
conversationSummary: string;
|
||||
playerMessage: string;
|
||||
@@ -65,11 +66,12 @@ export type CharacterChatSuggestionsRequest<
|
||||
TConversationTurn = unknown,
|
||||
TTargetStatus = unknown,
|
||||
> = {
|
||||
worldType: string;
|
||||
playerCharacter: TCharacter;
|
||||
sessionId?: string;
|
||||
worldType?: string;
|
||||
playerCharacter?: TCharacter;
|
||||
targetCharacter: TCharacter;
|
||||
storyHistory: TStoryMoment[];
|
||||
context: TContext;
|
||||
storyHistory?: TStoryMoment[];
|
||||
context?: TContext;
|
||||
conversationHistory: TConversationTurn[];
|
||||
conversationSummary: string;
|
||||
targetStatus: TTargetStatus;
|
||||
@@ -82,11 +84,12 @@ export type CharacterChatSummaryRequest<
|
||||
TConversationTurn = unknown,
|
||||
TTargetStatus = unknown,
|
||||
> = {
|
||||
worldType: string;
|
||||
playerCharacter: TCharacter;
|
||||
sessionId?: string;
|
||||
worldType?: string;
|
||||
playerCharacter?: TCharacter;
|
||||
targetCharacter: TCharacter;
|
||||
storyHistory: TStoryMoment[];
|
||||
context: TContext;
|
||||
storyHistory?: TStoryMoment[];
|
||||
context?: TContext;
|
||||
conversationHistory: TConversationTurn[];
|
||||
previousSummary: string;
|
||||
targetStatus: TTargetStatus;
|
||||
@@ -99,12 +102,13 @@ export type NpcChatDialogueRequest<
|
||||
TStoryMoment = unknown,
|
||||
TContext = unknown,
|
||||
> = {
|
||||
worldType: string;
|
||||
character: TCharacter;
|
||||
sessionId?: string;
|
||||
worldType?: string;
|
||||
character?: TCharacter;
|
||||
encounter: TEncounter;
|
||||
monsters: TMonster[];
|
||||
history: TStoryMoment[];
|
||||
context: TContext;
|
||||
monsters?: TMonster[];
|
||||
history?: TStoryMoment[];
|
||||
context?: TContext;
|
||||
topic: string;
|
||||
resultSummary: string;
|
||||
npcInitiatesConversation?: boolean;
|
||||
@@ -123,13 +127,14 @@ export type NpcChatTurnRequest<
|
||||
TQuestOfferEncounter = unknown,
|
||||
TChatDirective = NpcChatTurnDirective,
|
||||
> = {
|
||||
worldType: string;
|
||||
sessionId?: string;
|
||||
worldType?: string;
|
||||
character?: TCharacter;
|
||||
player?: TCharacter;
|
||||
encounter: TEncounter;
|
||||
monsters: TMonster[];
|
||||
history: TStoryMoment[];
|
||||
context: TContext;
|
||||
monsters?: TMonster[];
|
||||
history?: TStoryMoment[];
|
||||
context?: TContext;
|
||||
conversationHistory?: TConversationTurn[];
|
||||
dialogue?: TConversationTurn[];
|
||||
combatContext?: TCombatContext | null;
|
||||
@@ -171,12 +176,13 @@ export type NpcRecruitDialogueRequest<
|
||||
TStoryMoment = unknown,
|
||||
TContext = unknown,
|
||||
> = {
|
||||
worldType: string;
|
||||
character: TCharacter;
|
||||
sessionId?: string;
|
||||
worldType?: string;
|
||||
character?: TCharacter;
|
||||
encounter: TEncounter;
|
||||
monsters: TMonster[];
|
||||
history: TStoryMoment[];
|
||||
context: TContext;
|
||||
monsters?: TMonster[];
|
||||
history?: TStoryMoment[];
|
||||
context?: TContext;
|
||||
invitationText: string;
|
||||
recruitSummary: string;
|
||||
};
|
||||
|
||||
@@ -52,7 +52,98 @@ export type RuntimeStoryStatusViewModel = {
|
||||
inBattle: boolean;
|
||||
npcInteractionActive: boolean;
|
||||
currentNpcBattleMode: 'fight' | 'spar' | null;
|
||||
currentNpcBattleOutcome: 'fight_victory' | 'spar_complete' | null;
|
||||
currentNpcBattleOutcome: 'fight_victory' | 'fight_defeat' | 'spar_complete' | null;
|
||||
};
|
||||
|
||||
export type RuntimeStoryInventoryActionView = {
|
||||
functionId: string;
|
||||
actionText: string;
|
||||
payload?: JsonObject;
|
||||
enabled: boolean;
|
||||
reason?: string | null;
|
||||
};
|
||||
|
||||
export type RuntimeStoryInventoryItemActionsView = {
|
||||
use: RuntimeStoryInventoryActionView;
|
||||
equip: RuntimeStoryInventoryActionView;
|
||||
dismantle: RuntimeStoryInventoryActionView;
|
||||
reforge: RuntimeStoryInventoryActionView;
|
||||
};
|
||||
|
||||
export type RuntimeStoryInventoryItemView = {
|
||||
item: JsonObject;
|
||||
actions: RuntimeStoryInventoryItemActionsView;
|
||||
};
|
||||
|
||||
export type RuntimeStoryEquipmentSlotView = {
|
||||
slotId: string;
|
||||
label: string;
|
||||
item?: JsonObject | null;
|
||||
unequip: RuntimeStoryInventoryActionView;
|
||||
};
|
||||
|
||||
export type RuntimeStoryForgeRequirementView = {
|
||||
id: string;
|
||||
label: string;
|
||||
quantity: number;
|
||||
owned: number;
|
||||
};
|
||||
|
||||
export type RuntimeStoryForgeRecipeView = {
|
||||
id: string;
|
||||
name: string;
|
||||
kind: string;
|
||||
description: string;
|
||||
resultLabel: string;
|
||||
currencyCost: number;
|
||||
currencyText: string;
|
||||
requirements: RuntimeStoryForgeRequirementView[];
|
||||
canCraft: boolean;
|
||||
disabledReason?: string | null;
|
||||
action: RuntimeStoryInventoryActionView;
|
||||
};
|
||||
|
||||
export type RuntimeStoryInventoryViewModel = {
|
||||
playerCurrency: number;
|
||||
currencyText: string;
|
||||
inBattle: boolean;
|
||||
backpackItems: RuntimeStoryInventoryItemView[];
|
||||
equipmentSlots: RuntimeStoryEquipmentSlotView[];
|
||||
forgeRecipes: RuntimeStoryForgeRecipeView[];
|
||||
};
|
||||
|
||||
export type RuntimeNpcTradeMode = 'buy' | 'sell';
|
||||
|
||||
export type RuntimeNpcTradeItemView = {
|
||||
itemId: string;
|
||||
item: JsonObject;
|
||||
mode: RuntimeNpcTradeMode;
|
||||
unitPrice: number;
|
||||
maxQuantity: number;
|
||||
canSubmit: boolean;
|
||||
reason?: string | null;
|
||||
};
|
||||
|
||||
export type RuntimeNpcGiftItemView = {
|
||||
itemId: string;
|
||||
item: JsonObject;
|
||||
affinityGain: number;
|
||||
canSubmit: boolean;
|
||||
reason?: string | null;
|
||||
};
|
||||
|
||||
export type RuntimeNpcInteractionView = {
|
||||
npcId: string;
|
||||
npcName: string;
|
||||
playerCurrency: number;
|
||||
currencyName: string;
|
||||
trade: {
|
||||
buyItems: RuntimeNpcTradeItemView[];
|
||||
sellItems: RuntimeNpcTradeItemView[];
|
||||
};
|
||||
gift: {
|
||||
items: RuntimeNpcGiftItemView[];
|
||||
};
|
||||
};
|
||||
|
||||
export type RuntimeBattlePresentation = {
|
||||
@@ -60,15 +151,17 @@ export type RuntimeBattlePresentation = {
|
||||
targetName?: string;
|
||||
damageDealt?: number;
|
||||
damageTaken?: number;
|
||||
outcome?: 'ongoing' | 'victory' | 'spar_complete' | 'escaped';
|
||||
outcome?: 'ongoing' | 'victory' | 'spar_complete' | 'defeat' | 'escaped';
|
||||
};
|
||||
|
||||
export type RuntimeStoryViewModel = {
|
||||
player: RuntimeStoryPlayerViewModel;
|
||||
encounter: RuntimeStoryEncounterViewModel | null;
|
||||
companions: RuntimeStoryCompanionViewModel[];
|
||||
inventory: RuntimeStoryInventoryViewModel;
|
||||
availableOptions: RuntimeStoryOptionView[];
|
||||
status: RuntimeStoryStatusViewModel;
|
||||
npcInteraction?: RuntimeNpcInteractionView | null;
|
||||
};
|
||||
|
||||
export type RuntimeStoryPresentation = {
|
||||
@@ -98,14 +191,14 @@ export type RuntimeStoryPatch =
|
||||
targetId?: string;
|
||||
damageDealt?: number;
|
||||
damageTaken?: number;
|
||||
outcome: 'ongoing' | 'victory' | 'spar_complete' | 'escaped';
|
||||
outcome: 'ongoing' | 'victory' | 'spar_complete' | 'defeat' | 'escaped';
|
||||
}
|
||||
| {
|
||||
type: 'status_changed';
|
||||
inBattle: boolean;
|
||||
npcInteractionActive: boolean;
|
||||
currentNpcBattleMode: 'fight' | 'spar' | null;
|
||||
currentNpcBattleOutcome: 'fight_victory' | 'spar_complete' | null;
|
||||
currentNpcBattleOutcome: 'fight_victory' | 'fight_defeat' | 'spar_complete' | null;
|
||||
}
|
||||
| {
|
||||
type: 'encounter_changed';
|
||||
@@ -117,6 +210,21 @@ export type RuntimeStoryActionRequest =
|
||||
snapshot?: SavedGameSnapshotInput;
|
||||
};
|
||||
|
||||
export type RuntimeStoryAiRequestOptions = {
|
||||
availableOptions?: JsonObject[];
|
||||
optionCatalog?: JsonObject[];
|
||||
};
|
||||
|
||||
export type RuntimeStoryAiRequest = {
|
||||
sessionId: string;
|
||||
clientVersion?: number;
|
||||
choice?: string;
|
||||
lastFunctionId?: string | null;
|
||||
observeSignsRequested?: boolean;
|
||||
recentActionResult?: string | null;
|
||||
requestOptions?: RuntimeStoryAiRequestOptions;
|
||||
};
|
||||
|
||||
export type RuntimeStoryStateRequest<
|
||||
TSnapshotGameState = JsonObject,
|
||||
TSnapshotCurrentStory = JsonObject,
|
||||
@@ -130,6 +238,30 @@ export type RuntimeStoryStateRequest<
|
||||
>;
|
||||
};
|
||||
|
||||
export type RuntimeStoryBootstrapRequest<
|
||||
TProfile = JsonObject,
|
||||
TCharacter = JsonObject,
|
||||
> = {
|
||||
worldType: string;
|
||||
customWorldProfile?: TProfile | null;
|
||||
character: TCharacter;
|
||||
runtimeMode?: 'play' | 'preview' | 'test';
|
||||
disablePersistence?: boolean;
|
||||
};
|
||||
|
||||
export type RuntimeStoryBootstrapResponse<
|
||||
TSnapshotGameState = JsonObject,
|
||||
TSnapshotCurrentStory = JsonObject,
|
||||
> = {
|
||||
sessionId: string;
|
||||
serverVersion: number;
|
||||
snapshot: SavedGameSnapshot<
|
||||
TSnapshotGameState,
|
||||
string,
|
||||
TSnapshotCurrentStory
|
||||
>;
|
||||
};
|
||||
|
||||
export type RuntimeStoryActionResponse<
|
||||
TSnapshotGameState = JsonObject,
|
||||
TSnapshotCurrentStory = JsonObject,
|
||||
|
||||
@@ -29,6 +29,12 @@ export type SavedGameSnapshotInput<
|
||||
savedAt?: string;
|
||||
};
|
||||
|
||||
export type RuntimeSaveCheckpointInput<TBottomTab extends string = string> = {
|
||||
sessionId: string;
|
||||
bottomTab: TBottomTab;
|
||||
savedAt?: string;
|
||||
};
|
||||
|
||||
export type RuntimeSettings = {
|
||||
musicVolume: number;
|
||||
platformTheme: PlatformTheme;
|
||||
|
||||
@@ -9,6 +9,7 @@ export * from './contracts/rpgAgentDraft';
|
||||
export * from './contracts/rpgAgentSession';
|
||||
export * from './contracts/rpgCreationFixtures';
|
||||
export * from './contracts/rpgCreationPreview';
|
||||
export * from './contracts/rpgCreationResultView';
|
||||
export * from './contracts/rpgCreationWorkSummary';
|
||||
export * from './contracts/puzzleAgentActions';
|
||||
export * from './contracts/puzzleAgentDraft';
|
||||
|
||||
Reference in New Issue
Block a user