import { type HookHandler, type LogicalHookEvent } from "./hook-core.js"; export declare const CONTINUITY_LIMITS: { readonly maxInjectedCharacters: 8000; readonly retentionMs: number; readonly maxSummaryCharacters: 6000; readonly maxActivityEntries: 100; readonly contextWarningActivityCount: 50; readonly maxRecords: 128; }; export declare function createRepositoryProtectionHandler(): HookHandler; export interface ContinuityActivity { atEpochMs: number; event: "after-tool" | "tool-failure"; tool: string; outcome: "ok" | "failed"; durationMs?: number; } export interface ContinuityRecord { version: 1; repositoryId: string; canonicalWorktree: string; harness: string; sessionId: string; updatedAtEpochMs: number; summary: string; activity: ContinuityActivity[]; } export interface ContinuityStore { list(): readonly ContinuityRecord[]; save(record: ContinuityRecord): void; prune(beforeEpochMs: number): void; } export interface FileContinuityStoreOptions { stateRoot: string; canonicalWorktree: string; repositoryId: string; harness: string; maxFileBytes?: number; } /** * Durable JSON state scoped by repository, canonical worktree, and harness. The * caller supplies an existing AIH-owned state root outside the worktree; the * store never discovers or writes project paths. */ export declare function createFileContinuityStore(options: FileContinuityStoreOptions): ContinuityStore; export interface ContinuityHandlerOptions { repositoryId: string; canonicalWorktree: string; harness: string; store: ContinuityStore; now?: () => number; } export declare function createContinuityHandler(options: ContinuityHandlerOptions): HookHandler; export interface McpHealthServer { id: string; fallback: string; reconnect?: boolean; } export interface McpHealthProbeResult { ok: boolean; detail?: string; } export interface McpHealthHandlerOptions { selectedServers: readonly McpHealthServer[]; probe: (id: string, signal: AbortSignal) => Promise; reconnect?: (id: string, signal: AbortSignal) => Promise; now?: () => number; successCacheMs?: number; initialBackoffMs?: number; maxBackoffMs?: number; } export declare function createMcpHealthHandler(options: McpHealthHandlerOptions): HookHandler; export declare const DEFAULT_ECC_HOOK_IDS: readonly ["repository-protection", "mcp-health", "continuity"]; export type DefaultEccHookId = (typeof DEFAULT_ECC_HOOK_IDS)[number]; export declare function defaultEccHookEvents(): Readonly>;