/** * Programmatic integration API. * * Spec section 19.2. */ import type { UnifiedHookEvent } from './types/event'; import type { AdapterCapabilities } from './types/adapter'; import type { HookPlanEntry } from './types/plan'; import { type MergedExecutionResult } from './merge-engine'; /** * Implementation callbacks provided by an adapter. */ export interface AdapterImpl { /** Normalize raw input into a UnifiedHookEvent. */ normalize(rawInput: unknown): UnifiedHookEvent; /** Render a merged result into harness-native output. */ renderOutput?(mergedResult: MergedExecutionResult): unknown; } /** * A registered adapter with capabilities and implementation. */ export interface RegisteredAdapter { name: string; capabilities: AdapterCapabilities; impl: AdapterImpl; } /** * Register a new adapter with its capabilities and implementation. */ export declare function createAdapter(name: string, capabilities: AdapterCapabilities, impl: AdapterImpl): RegisteredAdapter; /** * Register a handler in the global plan. */ export declare function registerHandler(planEntry: HookPlanEntry): void; /** * Run the full normalized pipeline: execute all matching handlers for * the event's phase and return the merged result. */ export declare function runNormalized(event: UnifiedHookEvent): Promise; /** * Get a registered adapter by name. */ export declare function getAdapter(name: string): RegisteredAdapter | undefined; /** * Clear all registrations (useful for testing). */ export declare function clearRegistries(): void; //# sourceMappingURL=api.d.ts.map