import type { AutomationFailure } from "./automation-outcome.js"; /** * Pauses and automatic resumes as events, so "how many automations did the * framework stop, and for what" is a query. Both are rare by construction (a * pause needs a streak of identical failures, a resume needs a recovery), so * they are tracked one by one rather than aggregated. * * The automation is identified by a hash of its name, never the name: the name * is user-authored text. `automation_hash` is the first 12 hex characters of * sha256("|"); the failure capture carries the plain name in * `extra.failureContext.automationName`, so a hash seen in a chart is matched * by hashing the names an app lists. */ export declare const AUTOMATION_EVENTS: { readonly paused: "automation_paused"; readonly resumed: "automation_resumed"; }; export declare function automationHash(name: string): string; export declare function trackAutomationPaused(input: { name: string; failure: AutomationFailure; consecutiveFailures: number; surface: "scheduler" | "trigger" | "preflight"; }): void; export declare function trackAutomationResumed(input: { name: string; via: "credential_recovered" | "successful_run"; }): void; /** * A failure whose code is a credential state reached the automation's owner * (the run could not authenticate). Counted per window, not per run. */ export declare function countAutomationCredentialState(code: string): void;