/** * Hooks Engine Operations — business logic layer. * * Contains all hook domain EngineResult wrappers migrated from * `packages/cleo/src/dispatch/engines/hooks-engine.ts` (ENG-MIG-12 / T1579). * * Queries providers by hook event support and analyzes hook capabilities * across the CAAMP provider ecosystem. * * Importable from `@cleocode/core/internal` so the CLI dispatch layer can * call them without any intermediate engine file. * * @module hooks/engine-ops * @task T1579 — ENG-MIG-12 * @epic T1566 */ import { type EngineResult } from '../engine-result.js'; import { type HookEvent } from './types.js'; /** Coverage summary for a single provider in the hook matrix. */ export interface ProviderMatrixEntry { /** CAAMP provider identifier (e.g. "claude-code"). */ providerId: string; /** Number of canonical events this provider supports. */ supportedCount: number; /** Total canonical events in the taxonomy. */ totalCanonical: number; /** Coverage percentage (0-100, integer). */ coverage: number; /** Canonical events supported by this provider. */ supported: string[]; /** Canonical events not supported by this provider. */ unsupported: string[]; } /** Full hook matrix result. */ export interface HookMatrixResult { /** CAAMP hook mappings version. */ caampVersion: string; /** All canonical event names (rows). */ events: string[]; /** Provider IDs included in the matrix (columns). */ providers: string[]; /** * Two-dimensional matrix: event name → provider ID → support flag. * `true` means the provider natively supports the canonical event. */ matrix: Record>; /** Per-provider summary with coverage stats. */ summary: ProviderMatrixEntry[]; /** Provider ID detected as the current runtime, or null. */ detectedProvider: string | null; } /** Provider hook capability information (internal). */ interface ProviderHookInfo { id: string; name?: string; supportedHooks: string[]; } /** * Query providers that support a specific hook event. * * Returns detailed provider information including which hooks each provider * supports, enabling intelligent routing and filtering of hook handlers. * * @param event - The hook event to query providers for * @returns Engine result with provider hook capability data * @task T1579 — ENG-MIG-12 */ export declare function queryHookProviders(event: HookEvent): Promise>; /** * Get hook events common to specified providers. * * Analyzes which hook events are supported by all providers in the given list, * useful for determining the intersection of hook capabilities. * * @param providerIds - Optional array of provider IDs to analyze (uses all active if omitted) * @returns Engine result with common hook events * @task T1579 — ENG-MIG-12 */ export declare function queryCommonHooks(providerIds?: string[]): Promise>; /** * Build a cross-provider hook support matrix using CAAMP APIs. * * Calls `buildHookMatrix()` to assemble the two-dimensional grid, then * augments each provider row with `getProviderSummary()` coverage stats. * Optionally runs `detectAllProviders()` to surface the active runtime. * * @param params - Optional filter/detection options * @returns Engine result with the full hook matrix * @task T1579 — ENG-MIG-12 */ export declare function systemHooksMatrix(params?: { providerIds?: string[]; detectProvider?: boolean; }): Promise>; export {}; //# sourceMappingURL=engine-ops.d.ts.map