import type { DoneVerdict } from "./done.js"; import type { Verdict } from "./guard.js"; import type { ProseVerdict } from "./prose.js"; import type { RulesVerdict } from "./rules.js"; import type { RunawayVerdict } from "./runaway.js"; import type { Attempt, StuckVerdict } from "./stuck.js"; export type GuardName = "action" | "stuck" | "done" | "prose" | "security" | "context" | "runaway" | "rules" | "subagent"; export interface TraceEntry { at: number; guard: GuardName; /** The widget line for this event. */ line: string; /** Redacted details: what was inspected, what Jev answered, what the agent was told. */ details: string[]; /** Raw tokens for re-rendering in live mode with sentence templates. */ tokens?: Record | undefined; } /** Session memory of guard decisions; the widget shows the latest line per guard, the panel shows the history. */ export declare class Trace { private readonly limit; private readonly items; private readonly listeners; constructor(limit?: number); push(entry: TraceEntry): void; /** Appends a detail line to an entry that is still in the trace, for an outcome that lands after the event. */ amend(entry: TraceEntry, line: string): boolean; entries(): readonly TraceEntry[]; clear(): void; subscribe(listener: () => void): () => void; } export declare function actionDetails(verdict: Verdict, extra?: { mode?: string; told?: string; }): string[]; export declare function stuckDetails(verdict: StuckVerdict, attempts: readonly Attempt[], told?: string): string[]; export declare function doneDetails(verdict: DoneVerdict, finalMessage: string, told?: string): string[]; export declare function runawayDetails(verdict: RunawayVerdict, told: string | undefined, recovering: boolean): string[]; export declare function proseDetails(verdict: ProseVerdict, reply: string, audience: string, told?: string): string[]; export declare function rulesDetails(verdict: RulesVerdict, told?: string): string[];