feat: add AI-assisted ISAC authoring
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
import type {
|
||||
AiMechanicQuestion,
|
||||
AiMechanicResponseMeta
|
||||
} from './mechanic-authoring';
|
||||
|
||||
export const AI_CALCULATION_STAGE_OPERATORS = [
|
||||
'base_damage',
|
||||
'flat_add',
|
||||
'additive_percent',
|
||||
'multiplicative_percent',
|
||||
'expected_critical',
|
||||
'expected_headshot',
|
||||
'rate_of_fire',
|
||||
'magazine_size',
|
||||
'reload_speed',
|
||||
'firing_cycle'
|
||||
] as const;
|
||||
|
||||
export const AI_SKILL_CALCULATION_STAGES = [
|
||||
'engineering',
|
||||
'flat_damage',
|
||||
'skill_damage',
|
||||
'final_damage',
|
||||
'critical_chance',
|
||||
'critical_damage',
|
||||
'multishot_chance',
|
||||
'multishot_damage',
|
||||
'cooldown_recovery',
|
||||
'duration'
|
||||
] as const;
|
||||
|
||||
export type AiCalculationStageDraft = {
|
||||
stageKey: string;
|
||||
label: string;
|
||||
operator: (typeof AI_CALCULATION_STAGE_OPERATORS)[number];
|
||||
displayOrder: number;
|
||||
lockedPosition: 'first' | 'last' | null;
|
||||
};
|
||||
|
||||
export type AiCalculationProfileDraft = {
|
||||
statAttributeId: string;
|
||||
stageKey: string;
|
||||
weight: number;
|
||||
softCap: number | null;
|
||||
hardCap: number | null;
|
||||
curveType: 'none' | 'power' | 'smoothstep';
|
||||
curveParameter: number | null;
|
||||
weaponCategory: string;
|
||||
};
|
||||
|
||||
export type AiSkillCalculationProfileDraft = {
|
||||
statAttributeId: string;
|
||||
stageKey: (typeof AI_SKILL_CALCULATION_STAGES)[number];
|
||||
operator: 'add' | 'multiply';
|
||||
weight: number;
|
||||
};
|
||||
|
||||
export type AiCalculationRevisionDraft = {
|
||||
name: string;
|
||||
notes: string;
|
||||
stages: AiCalculationStageDraft[];
|
||||
profiles: AiCalculationProfileDraft[];
|
||||
skillProfiles: AiSkillCalculationProfileDraft[];
|
||||
};
|
||||
|
||||
export type AiCalculationTranscriptEntry = {
|
||||
questionId: string;
|
||||
question: string;
|
||||
answer: string;
|
||||
};
|
||||
|
||||
export type AiCalculationAuthoringRequest = {
|
||||
instructions: string;
|
||||
baseRevisionId: string | null;
|
||||
currentDraft: AiCalculationRevisionDraft;
|
||||
transcript: AiCalculationTranscriptEntry[];
|
||||
};
|
||||
|
||||
export type AiCalculationQuestion = AiMechanicQuestion;
|
||||
|
||||
export type AiCalculationCapabilityGap = {
|
||||
area: 'stage_operator' | 'curve' | 'skill_stage' | 'attribute' | 'runtime';
|
||||
requiredBehavior: string;
|
||||
whyUnsupported: string;
|
||||
developerChange: string;
|
||||
workaround: string | null;
|
||||
};
|
||||
|
||||
export type AiCalculationClarificationResponse = {
|
||||
status: 'clarification_required';
|
||||
summary: string;
|
||||
assumptions: string[];
|
||||
warnings: string[];
|
||||
questions: AiCalculationQuestion[];
|
||||
meta: AiMechanicResponseMeta;
|
||||
};
|
||||
|
||||
export type AiCalculationDraftResponse = {
|
||||
status: 'draft_ready';
|
||||
draft: AiCalculationRevisionDraft;
|
||||
summary: string;
|
||||
assumptions: string[];
|
||||
warnings: string[];
|
||||
pseudoScript: string;
|
||||
meta: AiMechanicResponseMeta;
|
||||
};
|
||||
|
||||
export type AiCalculationCapabilityGapResponse = {
|
||||
status: 'capability_gap';
|
||||
summary: string;
|
||||
assumptions: string[];
|
||||
warnings: string[];
|
||||
gaps: AiCalculationCapabilityGap[];
|
||||
meta: AiMechanicResponseMeta;
|
||||
};
|
||||
|
||||
export type AiCalculationAuthoringResponse =
|
||||
| AiCalculationClarificationResponse
|
||||
| AiCalculationDraftResponse
|
||||
| AiCalculationCapabilityGapResponse;
|
||||
Reference in New Issue
Block a user