import type { Adapter } from "../adapter.js"; export declare const HOOK_HEALTH_EVENT: "agent_hook.completed"; export declare const HOOK_HEALTH_RECEIPT_VERSION: 1; export declare const HOOK_HEALTH_ERROR_PHASE_LIMIT = 8; export type HookHealthOutcome = "completed" | "skipped" | "degraded" | "faulted"; export interface HookHealthState { readonly started_at_ms: number; readonly started_rss_bytes: number; readonly event_name: string | null; readonly adapter: Adapter | null; readonly payload_bytes: number; coord_root: string | null; owner_id?: string; skipped_reason?: string; v3_state?: string; error_phases: string[]; } export interface HookHealthReceipt { receipt_version: typeof HOOK_HEALTH_RECEIPT_VERSION; hook_name: string; adapter: Adapter | "unknown"; outcome: HookHealthOutcome; exit_contract: "always-zero"; exit_code: 0; duration_ms: number; payload_bytes: number; pid: number; rss_start_bytes: number; rss_end_bytes: number; rss_delta_bytes: number; retry_worker: boolean; error_count: number; error_phases: readonly string[]; owner_id?: string; skipped_reason?: string; v3_state?: string; } export declare function beginHookHealth(input: { started_at_ms: number; started_rss_bytes: number; event_name: string | null; adapter: Adapter | null; payload_bytes: number; }): HookHealthState; export declare function observeHookDebug(state: HookHealthState | undefined, entry: Readonly>): void; export declare function observeHookError(state: HookHealthState | undefined, phase: unknown): void; export declare function finalizeHookHealth(state: HookHealthState, input: { finished_at_ms: number; finished_rss_bytes: number; pid: number; faulted?: boolean; }): HookHealthReceipt; export declare function writeHookHealthCompletion(state: HookHealthState | undefined, input: { finished_at_ms: number; finished_rss_bytes: number; pid: number; faulted?: boolean; }): HookHealthReceipt | undefined; //# sourceMappingURL=health.d.ts.map