import type { EvaluationResult, Operation } from "@iota-policy/core"; export type Resolution = "allowed" | "blocked" | "asked_user_allowed" | "asked_user_denied" | "denied_non_interactive" | "ungoverned"; export interface DecisionEntry { ts: string; /** Extension build that made the decision — spot stale builds in mixed logs. */ v: string; toolName: string; toolCallId: string; operation: Operation | null; verdict?: EvaluationResult["verdict"]; rule?: string; reason: string; bestEffort: boolean; resolution: Resolution; durationMs: number; } export type DecisionSink = (entry: DecisionEntry) => void; /** * Sink appending JSONL to a file. Failures to write must never break the * agent loop — they surface once via the optional onError and are then * swallowed (a broken logger must not become a denial-of-service on the * user's session; it also must not silently *allow* anything, since logging * happens after enforcement). */ export declare function createJsonlSink(filePath: string, onError?: (e: Error) => void): DecisionSink; /** In-memory sink for tests and programmatic inspection. */ export declare function createMemorySink(): { sink: DecisionSink; entries: DecisionEntry[]; };