import type { HookPointContract } from '@pellux/goodvibes-sdk/platform/hooks/contracts';
import type { HookChain, HookDefinition, HookType } from '@pellux/goodvibes-sdk/platform/hooks/types';
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<void>;
    scaffoldHook(name: string, match: string, type: HookType): Promise<HookDefinition>;
    scaffoldChain(name: string, matches: readonly string[]): Promise<HookChain>;
    remove(name: string): Promise<boolean>;
    toggle(name: string, enabled: boolean): Promise<boolean>;
    simulate(eventPath: string, payload?: Record<string, unknown>): HookSimulationResult;
    inspect(path: string): HookConfigInspection;
    export(path: string): Promise<string>;
    import(path: string, strategy?: 'merge' | 'replace'): Promise<void>;
}
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<void>;
    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<string, unknown>): HookSimulationResult;
    inspectManagedConfig(path: string): HookConfigInspection;
    exportManagedConfig(path: string): Promise<string>;
    importManagedConfig(path: string, strategy?: 'merge' | 'replace'): void;
    saveManagedConfig(path?: string): Promise<void>;
}
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