import type { HookPointContract } from './contracts.js'; import type { HookChain, HookDefinition, HookType } from './types.js'; import type { HookAuthoringAction, HookConfigInspection, HookSimulationResult } from './workbench.js'; export interface HookContractRecord extends HookPointContract { } export interface HookWorkbenchApi { getFilePath(): string; listManagedHooks(): Array<{ pattern: string; hook: HookDefinition; }>; listManagedChains(): HookChain[]; listRecentActions(limit?: number): HookAuthoringAction[]; load(path?: string): void; reload(path?: string): Promise; scaffoldHook(name: string, match: string, type: HookType): Promise; scaffoldChain(name: string, matches: readonly string[]): Promise; remove(name: string): Promise; toggle(name: string, enabled: boolean): Promise; simulate(eventPath: string, payload?: Record): HookSimulationResult; inspect(path: string): HookConfigInspection; export(path: string): Promise; import(path: string, strategy?: 'merge' | 'replace'): Promise; } export interface HookApiDispatcher { listHooks(): Array<{ pattern: string; hook: HookDefinition; }>; listChains(): HookChain[]; } export interface HookApiWorkbenchRuntime { getHooksFilePath(): string; listManagedHooks(): Array<{ pattern: string; hook: HookDefinition; }>; listManagedChains(): HookChain[]; listRecentActions(limit?: number): HookAuthoringAction[]; loadManagedConfig(path?: string): void; loadAndApplyManagedHooks(path?: string): Promise; scaffoldHook(name: string, match: string, type: HookType): HookDefinition; scaffoldChain(name: string, matches: readonly string[]): HookChain; removeManagedEntry(name: string): boolean; toggleManagedHook(name: string, enabled: boolean): boolean; simulate(eventPath: string, payload?: Record): HookSimulationResult; inspectManagedConfig(path: string): HookConfigInspection; exportManagedConfig(path: string): Promise; importManagedConfig(path: string, strategy?: 'merge' | 'replace'): void; saveManagedConfig(path?: string): Promise; } export interface HookContractSource { listContracts(): readonly HookPointContract[]; } export interface HookApi { contracts(filter?: string): readonly HookContractRecord[]; dispatcher: { listHooks(): Array<{ pattern: string; hook: HookDefinition; }>; listChains(): HookChain[]; }; workbench: HookWorkbenchApi; } export interface CreateHookApiOptions { readonly dispatcher: HookApiDispatcher; readonly workbench: HookApiWorkbenchRuntime; readonly listContracts: HookContractSource['listContracts']; } export declare function createHookApi(options: CreateHookApiOptions): HookApi; //# sourceMappingURL=hook-api.d.ts.map