reward-types.ts
Status marker at top: STUB — not yet implemented. Type and interface contracts for the reward-resolve phase orchestrator — progress bars, counter fly-tos, milestones, and presentation hints. No runtime logic except one predicate.
River Styx
Type-only module consumed by the reward orchestrator state machine. Defines the shape of a RewardBatch (the unit handed to the orchestrator from any reward source) and the deltas it carries (CounterDelta for currency fly-tos, ProgressDelta for animated bars, Milestone for post-resolve chips). Phase enum drives the orchestrator FSM (idle → reveal → collect → await_surface → resolve → milestones). One helper: isNoOpBatch for finalizer drop logic.
Acheron
Types
| Name | Kind | Members / shape |
|---|---|---|
ProgressTrack | string union | 'journey' (one bar per track) |
RewardPhase | string union | 'idle' | 'reveal' | 'collect' | 'await_surface' | 'resolve' | 'milestones' |
ProgressSnapshot | interface | xp: number, level: number |
ProgressDelta | interface | track: ProgressTrack, trackId?: string, before: ProgressSnapshot, after: ProgressSnapshot, displayLabel?: string, thresholdsCrossed?: string[] |
CounterDelta | interface | counter: string, before: number, after: number |
Milestone | interface | label: string, importance: 'minor' | 'major' |
PresentationHints | interface | revealMode: 'default' | 'custom' | 'none', collectMode: 'default' | 'custom' | 'none', resolvePolicy: 'immediate' | 'defer_until_hub' |
RewardBatch | interface | batchId: string, source: string, presentation: PresentationHints, counters: CounterDelta[], progress: ProgressDelta[], milestones: Milestone[] |
Functions
| Symbol | Signature | Behavior |
|---|---|---|
isNoOpBatch | (batch: RewardBatch) => boolean | True iff counters.length === 0 && progress.length === 0 && milestones.length === 0. Finalizers silently discard no-op batches. |
Cocytus
ProgressTrackis currently single-valued ('journey'); the type union is the extension point for adding ship-level or weapon-level bars without a refactor.trackIdonProgressDeltais the sub-track identifier (specific ship ID, weapon ID) when onetrackvalue carries multiple parallel bars.thresholdsCrossed: string[]triggers the “pause-and-pop” beat in the resolve phase — the animated bar halts at each threshold and pops a celebration.PresentationHints.resolvePolicy === 'defer_until_hub'lets a batch ship from arena/mid-mission and wait for the hub surface before its bars animate.displayLabelonProgressDeltais the human-readable bar header (e.g."Journey Rank"); when omitted the orchestrator falls back to a derived label.
Lethe
EXTRACT-CANDIDATE — none. Pure type module + one trivial predicate; no magic numbers, no behavior to factor out. The string unions (ProgressTrack, RewardPhase, presentation enums) are intentionally inline — extracting them to a separate reward-enums.ts is premature until a second consumer needs them.