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

NameKindMembers / shape
ProgressTrackstring union'journey' (one bar per track)
RewardPhasestring union'idle' | 'reveal' | 'collect' | 'await_surface' | 'resolve' | 'milestones'
ProgressSnapshotinterfacexp: number, level: number
ProgressDeltainterfacetrack: ProgressTrack, trackId?: string, before: ProgressSnapshot, after: ProgressSnapshot, displayLabel?: string, thresholdsCrossed?: string[]
CounterDeltainterfacecounter: string, before: number, after: number
Milestoneinterfacelabel: string, importance: 'minor' | 'major'
PresentationHintsinterfacerevealMode: 'default' | 'custom' | 'none', collectMode: 'default' | 'custom' | 'none', resolvePolicy: 'immediate' | 'defer_until_hub'
RewardBatchinterfacebatchId: string, source: string, presentation: PresentationHints, counters: CounterDelta[], progress: ProgressDelta[], milestones: Milestone[]

Functions

SymbolSignatureBehavior
isNoOpBatch(batch: RewardBatch) => booleanTrue iff counters.length === 0 && progress.length === 0 && milestones.length === 0. Finalizers silently discard no-op batches.

Cocytus

  • ProgressTrack is currently single-valued ('journey'); the type union is the extension point for adding ship-level or weapon-level bars without a refactor.
  • trackId on ProgressDelta is the sub-track identifier (specific ship ID, weapon ID) when one track value 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.
  • displayLabel on ProgressDelta is 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.