Post-run data contract. The engine builds a MissionResult at mission end (death or objective complete) and hands it off to the results screen, progression system, and economy. Companion output shape to run-config (the engine’s input contract). Every field is required — no optional data.
Matches archive buildMissionResult() v2.2 from 07g-mission.js.
Cocytus — Contract metadata
Field
Value
__version
'2.2' (literal)
__contract
'MissionResult' (literal)
Both are literal-string type tags. Cross-version readers must check __version before reading other fields.
Lethe — Top-level shape
MissionResult has eight required nested blocks:
Block
What it carries
identity
Which node was played (id, heat, type, ship, seed)
outcome
Win/loss, cause of death, end-phase, boss multiplier, revive/daily/rare flags
performance
0-100 score, reward tier, objectives, timer, time bonus, death-defiance
Kills by type, total kills, boss id, damage dealt/taken, ability uses, per-weapon stats
economy
Coins collected, final multiplier state (damage/hp/shield)
exploration
Distance, max distance from genesis, POIs visited, sub-zone entered
Phlegethon — Field reference
identity
Field
Type
Meaning
nodeId
string
Galaxy node played
heat
number
Heat tier of the node
missionType
string
Mission type (e.g. boss, objective, survival)
shipId
string
Ship loadout used
seed
number
RNG seed (reproducibility)
outcome
Field
Type
Meaning
survived
boolean
True if the player lived to end-state
bossKilled
boolean
True if mission boss died
causeOfDeath
string | null
Source string when dead, null when alive
missionPhaseAtEnd
string
Phase label when the run ended (default 'playing')
bossDifficultyMult
number
Multiplier applied to the boss; default 1.0
reviveTokenUsed
boolean
Player consumed a revive token
dailyBonusActive
boolean
Daily bonus was applied to this run
wasRareSignal
boolean
Node was a rare-signal variant
performance
Field
Type
Meaning
score
number
Aggregate 0-100 score
rewardTier
string
'bronze' | 'silver' | 'gold' | 'diamond'
objectivesCompleted
number
Primary objectives cleared
objectivesTotal
number
Total primary objectives
bonusObjectives
number
Bonus objectives cleared
timeElapsedSeconds
number
Wall-clock time alive
timerRemainingSeconds
number
Time left on mission timer
timeBonusEarned
boolean
Time bonus condition met
deathDefianceUsed
boolean
Death-defiance trigger fired
progression
Field
Type
Meaning
levelReached
number
Final player level
tierReached
number
Highest mission difficulty tier (4-min escalation counter, starts at 1, increments each time the timer expires and difficulty ramps)
artifactsCollected
number
Artifacts picked up
weaponsFound
number
Weapons obtained
weaponsAtEnd
Array<{ id: string; level: number }>
Loadout snapshot at end
highestWeaponLevel
number
Max level any weapon hit
upgradesChosen
number
Level-up upgrades selected
eventsCompleted
number
World events finished
newlyUnlockedArtifactIds
string[]
Artifacts that hit legendary tier this run for the first time — were not already unlocked as starting-artifact options. Drives the run-stats “ALIEN ARTIFACTS UNLOCKED” reveal
artifactBestTierThisRun
Record<string, number>
Highest runtime tier (0-4) reached for each artifact this run. Flushed into artifactUnlocksStore.bestTier so the picker can show tier history for not-yet-legendary artifacts
combat
Field
Type
Meaning
enemiesKilledByType
Record<string, number>
Kill counts keyed by enemy type id
totalKills
number
Sum across all enemy types
bossId
string
Boss id (empty string if no boss)
damageDealt
number
Total damage out
damageTaken
number
Total damage in
abilityUses
number
Ability activation count
weaponStats
Array<{ id: string; dmg: number; shots: number; hits: number }>
Returns a fully-zeroed MissionResult. Identity fields filled from args; everything else gets neutral defaults (false / 0 / null / 'playing' / 'bronze' / 1 / 1.0 / [] / {} / ''). Engine mutates the result during the run and at mission end
Economy — credits coinsCollected after meta-multipliers.
Cocytus — Companion contracts
Input contract: run-config — what the engine receives.
Output contract: this file (mission-result) — what the engine returns.
Together they fully bracket a run: shell hands in a RunConfig, engine hands back a MissionResult.
EXTRACT-CANDIDATE: The 'bronze' | 'silver' | 'gold' | 'diamond' reward-tier set is encoded as a free-form string on performance.rewardTier (comment-only). Promoting to a string-literal union (or shared enum/type) would let TypeScript reject typos at boss/results boundaries and would make the tier list one canonical declaration instead of a doc comment.