import { type ReputationTier } from "../faction/reputation.js"; /** One standing track: a faction, a district, a licence board — whatever an authored outcome moves. */ export interface StandingTrackDef { id: string; label?: string; /** Tiers this track crosses, ascending by `min`; defaults to the shared reputation ladder. */ tiers?: readonly ReputationTier[]; /** Standing every actor starts at (default `0`). */ initial?: number; /** Floor and ceiling; omitted means unbounded. */ min?: number; max?: number; } /** One outcome a game can report, and the standing it moves on each track. */ export interface StandingOutcomeDef { id: string; label?: string; /** Track id → signed standing. A negative number is the fall. */ impacts: Readonly>; } /** Authored standing content: the tracks an actor stands with, and the outcomes that move them. */ export interface StandingConfig { tracks: readonly StandingTrackDef[]; outcomes?: readonly StandingOutcomeDef[]; } /** One track's movement, with the tier on both sides so a caller can announce a crossing. */ export interface StandingChange { trackId: string; before: number; after: number; delta: number; previousTier: string; tier: string; } /** A threshold on one track, as an unlock or an upgrade reads it. */ export interface StandingRequirement { trackId: string; /** Smallest standing that passes; omitted means no floor. */ min?: number; /** Largest standing that passes; omitted means no ceiling. */ max?: number; } /** Plain JSON state of a {@link Standing}; tracks left at their authored `initial` are absent. */ export interface StandingState { records: Record>; } /** * Live standing over authored tracks, moved by named outcomes or direct adjustments, with the * tier on each track and a serializable snapshot. */ export interface Standing { tracks(): readonly StandingTrackDef[]; hasTrack(trackId: string): boolean; hasOutcome(outcomeId: string): boolean; standing(actorId: string, trackId: string): number; tier(actorId: string, trackId: string): ReputationTier; /** Every track's standing for one actor, authored tracks included at their initial value. */ standings(actorId: string): Record; /** Apply an authored outcome; returns each track it moved. Throws on an unknown outcome id. */ apply(actorId: string, outcomeId: string): readonly StandingChange[]; /** Move one track directly; returns the change. Throws on an unknown track id. */ adjust(actorId: string, trackId: string, delta: number): StandingChange; meets(actorId: string, requirement: StandingRequirement): boolean; snapshot(): StandingState; restore(next: StandingState): void; } /** Check authored standing content before use; throws `RangeError` naming the offending field. */ export declare function assertStandingConfig(config: StandingConfig): void; /** * Per-faction or per-district standing that rises and falls from named outcomes, over authored * tracks. Numbers live in the shared reputation ledger (`faction/reputation`); this adds the * authored outcome table, tier-per-track and the one snapshot a save stores. An outcome id or * track id that resolves to nothing throws at the call, so authored content fails loudly. * * @capability standing per-track standing moved by authored outcomes, with tiers and one snapshot */ export declare function createStanding(config: StandingConfig): Standing;