import { type HookHealthOutcome } from "../hooks/health.js"; import type { HarneryLogRecordV1 } from "../storage/jsonl.js"; import type { SupervisorLogFeed } from "./contract.js"; export declare const SUPERVISOR_HOOK_HEALTH_SCHEMA_VERSION: 1; export declare const SUPERVISOR_HOOK_HEALTH_RECENT_LIMIT = 50; export declare const SUPERVISOR_HOOK_HEALTH_AGGREGATE_LIMIT = 40; export declare const SUPERVISOR_SLOW_COMPLETED_HOOK_MS = 30000; export declare const SUPERVISOR_HIGH_COMPLETED_HOOK_RSS_BYTES: number; export declare const SUPERVISOR_HOOK_RETRY_CLUSTER_COUNT = 3; export declare const SUPERVISOR_HOOK_RETRY_CLUSTER_WINDOW_MS: number; export interface CompletedHookHealth { id: string; observed_at: string; hook_name: string; adapter: "claude-code" | "codex" | "cursor" | "unknown"; outcome: HookHealthOutcome; duration_ms: number; rss_start_bytes: number; rss_end_bytes: number; rss_delta_bytes: number; retry_worker: boolean; error_count: number; error_phases: readonly string[]; payload_bytes: number; pid: number; owner_id?: string; skipped_reason?: string; v3_state?: string; } export interface HookHealthAggregate { key: string; hook_name: string; adapter: CompletedHookHealth["adapter"]; invocation_count: number; completed_count: number; skipped_count: number; degraded_count: number; faulted_count: number; retry_count: number; duration_p50_ms: number; duration_p95_ms: number; duration_max_ms: number; rss_end_max_bytes: number; rss_delta_max_bytes: number; latest_observed_at: string; owner_ids: readonly string[]; } export interface SupervisorHookHealth { schema_version: typeof SUPERVISOR_HOOK_HEALTH_SCHEMA_VERSION; captured_at: string; capability: { source_kind: "hook.terminal-log"; state: "supported" | "partial" | "unavailable"; reason?: string; }; source_record_count: number; malformed_record_count: number; truncated: boolean; summary: { invocation_count: number; degraded_count: number; faulted_count: number; slow_count: number; high_memory_count: number; retry_count: number; }; aggregates: readonly HookHealthAggregate[]; recent: readonly CompletedHookHealth[]; } export declare function projectHookHealth(feed: SupervisorLogFeed, now?: Date): SupervisorHookHealth; export declare function parseCompletedHookHealth(record: HarneryLogRecordV1): CompletedHookHealth | undefined; //# sourceMappingURL=hook-health.d.ts.map