/**
 * SessionClock — pure, deterministic computation of a time-boxed session's
 * elapsed / remaining clock. Tier0 (no LLM, no I/O): given the canonical record
 * fields and a `now`, it returns the numbers the rest of the time-awareness
 * system injects and serves.
 *
 * Spec: docs/specs/ROBUST-SESSION-TIME-AWARENESS-SPEC.md (Component 0 label
 * derivation, Component 1 compute). Built for the 2026-06-02 time-blindness fix:
 * an agent must never compute or guess elapsed/remaining — this module is the
 * single source of that math (the bash hooks only render what this produces).
 */
export type SessionKind = 'autonomous' | 'loop' | 'commitment';
export type SessionClockStatus = 'active' | 'expired' | 'not-started' | 'unbounded' | 'unparseable';
export interface SessionClockInput {
    /** Short human label for the session. DERIVE it via deriveLabel(goal). */
    label: string;
    kind: SessionKind;
    /** ISO-8601 timestamp (e.g. "2026-06-02T05:42:40Z"). */
    startedAt: string;
    /** Seconds the box is meant to run, or null/undefined for an unbounded run. */
    durationSeconds: number | null;
}
export interface SessionClock {
    label: string;
    kind: SessionKind;
    startedAt: string;
    durationSeconds: number | null;
    /** Derived ISO end (startedAt + durationSeconds), or null when unbounded/unparseable. */
    endsAt: string | null;
    elapsedSeconds: number;
    /** null when unbounded or unparseable. */
    remainingSeconds: number | null;
    elapsedHuman: string;
    remainingHuman: string | null;
    /** 0-100, or null when unbounded/unparseable. */
    percentElapsed: number | null;
    status: SessionClockStatus;
}
/** Max chars for an injected/served label (matches the stop-hook goal_snippet cap). */
export declare const LABEL_MAX = 80;
/**
 * Derive a safe, bounded label from a free-text `goal`. The ONLY task-descriptor
 * text that may ever enter a prompt or the /session/clock response. Strips all
 * control characters and newlines (so a multi-line fake-directive cannot survive)
 * and angle brackets (so a <promise>-style tag cannot be reconstructed), collapses
 * whitespace, and caps length.
 */
export declare function deriveLabel(goal: string | null | undefined): string;
/** Format a non-negative duration in seconds as "Xh Ym" / "Ym" / "Xs". */
export declare function humanizeDuration(totalSeconds: number): string;
/**
 * Compute the clock for a session record against `nowMs` (epoch ms).
 * Pure + total: every malformed input maps to a defined, clamped result —
 * never a negative, NaN, or throwing path.
 */
export declare function computeSessionClock(input: SessionClockInput, nowMs: number): SessionClock;
//# sourceMappingURL=SessionClock.d.ts.map