/**
 * UltraSessionCapMonitor — §8 of docs/specs/FABLE-MODEL-ESCALATION-SPEC.md,
 * the mid-run daily-cap monitor for LAUNCHED ultra sessions.
 *
 * A spawned escalated run is launch-time-only — its model cannot be
 * down-swapped mid-run (§3.5: routing never blocks). So `dailyUltraTokenCap`
 * is admission control for NEW escalations (EscalationGovernor) AND this
 * monitor watches RUNNING escalated sessions for a cap crossing. On a
 * crossing it raises a **HIGH Attention item** for the operator to decide
 * (continue / stop), **dedup-keyed per (session-instance, UTC day)** so it
 * fires once, not once per tick (round-3 Adversarial-NEW-7 — HIGH items are
 * never coalesced by the topic-flood guard, so the dedup key is mandatory).
 *
 * Honest caveat carried from the spec (round-3 Adversarial-NEW-6): this
 * guarantees **visibility, not bounded spend** — ultra spend continues until
 * the operator acts. A multi-day run exceeding the cap is operator-visible,
 * never silent.
 *
 * NO OWN POLLER (round-3 Integration-NEW-2): this rides BurnDetector's
 * existing 60s tick — the build adds (a) per-session-instance ultra-token
 * attribution (TokenLedger.sessionActivitySince keyed by the session's
 * Claude transcript id) and (b) an absolute-cap-crossing predicate, on top
 * of BurnDetector's share/rate infrastructure.
 */
import type { Session } from '../core/types.js';
import { type TierEscalationConfig } from '../core/ModelTierEscalation.js';
export interface UltraCapAttentionItem {
    id: string;
    title: string;
    summary: string;
    category: string;
    priority: 'URGENT' | 'HIGH' | 'NORMAL' | 'LOW';
}
export interface UltraSessionCapMonitorDeps {
    /** Per-session token attribution (TokenLedger). Null ⇒ monitor no-ops
     *  (visibility degrades; admission control still bounds new escalations). */
    ledger: {
        sessionActivitySince(sessionId: string, sinceMs: number): {
            tokens: number;
        };
    } | null;
    listRunningSessions: () => Session[];
    getConfig: () => TierEscalationConfig;
    /** Raise an Attention item (TelegramAdapter.createAttentionItem — dedups
     *  by id, which carries the (instance, day) key). */
    attention?: (item: UltraCapAttentionItem) => unknown;
    now?: () => number;
}
export declare function startOfUtcDayMs(nowMs: number): number;
export declare class UltraSessionCapMonitor {
    private readonly deps;
    private readonly now;
    /** In-memory (instance, day) dedup — backstopped by the Attention surface's
     *  own id-dedup, so a restart cannot re-alert more than once. */
    private readonly alerted;
    constructor(deps: UltraSessionCapMonitorDeps);
    /** Invoked from BurnDetector.tick() — must never throw. */
    tick(): void;
    private run;
}
//# sourceMappingURL=UltraSessionCapMonitor.d.ts.map