import type { NeedSet } from "../sim/needs.js"; /** One need's say in the mood score; weights are relative, so they need no fixed total. */ export interface MoodWeight { /** Declared need id on the agent's need set; unknown ids are ignored. */ readonly need: string; readonly weight: number; } /** One labelled band of the 0-100 mood score. */ export interface MoodTier { readonly id: string; readonly label: string; /** Lowest score that reads as this tier. */ readonly at: number; } /** What the agent feels right now, on the caller's own tier labels. */ export interface Mood { /** 0 (nothing satisfied) . 100 (everything satisfied), plus any live source. */ readonly score: number; readonly tier: string; readonly label: string; } /** * Five bands a park guest, a household being or a soldier can share. A game overrides them when its * own tone needs different words; the numeric bands are what HUD counters and tests read. */ export declare const DEFAULT_MOOD_TIERS: readonly MoodTier[]; /** Serializable mood state: the game-raised biases that sit on top of need satisfaction. */ export interface MoodSnapshot { sources: Record; } /** * The band a score reads as, from tiers sorted by `at` descending. Unknown or unsorted tiers fall * back to the lowest declared band rather than throwing, because a HUD reads this every frame. * * @capability mood a mood derived from how satisfied an agent's needs are */ export declare function moodTierOf(score: number, tiers?: readonly MoodTier[]): MoodTier; /** * A mood read from a need set: each declared need contributes its `0..1` satisfaction times its * weight, normalized by the total weight, so an agent with four needs and one with six read on the * same 0-100 scale. Pure and allocation-light - the per-frame read a HUD and a thought bubble share. * * @capability mood a mood derived from how satisfied an agent's needs are */ export declare function readMood(needs: Pick, weights: readonly MoodWeight[], tiers?: readonly MoodTier[], sources?: Readonly>): Mood; /** A mood reader that keeps the game-raised biases, so a queue or a litter patch moves mood too. */ export interface MoodReader { /** Current mood: need satisfaction plus every live source. */ read(): Mood; /** Raise (or lower, with a negative) one named bias; calling again replaces that source. */ setSource(id: string, value: number): void; /** Drop one bias - the queue emptied, the litter was cleaned. */ clearSource(id: string): void; /** Every live bias, for a debug line or a panel. */ sources(): Readonly>; /** Replace the weights and tiers in play, keeping the biases. */ retune(patch: { readonly weights?: readonly MoodWeight[]; readonly tiers?: readonly MoodTier[]; }): void; snapshot(): MoodSnapshot; restore(next: MoodSnapshot): void; } /** * Create the mood an agent carries. Needs are the agent's own (shared with its utility brain), and * every bias is named data the game can remove again - there is no decaying hidden penalty. * * @capability mood a mood derived from how satisfied an agent's needs are */ export declare function createMoodReader(config: { readonly needs: Pick; readonly weights?: readonly MoodWeight[]; readonly tiers?: readonly MoodTier[]; }): MoodReader;