import type { HookConfig, HookMap, HookPolicy, HookPolicyDiagnostics } from "../core/types.js"; /** * Host compatibility diagnostics for hook configurations loaded from * OpenCode-compatible hooks.yaml files. Some YAML features are unsupported by * the PI-compatible extension API (or behave differently), while tool-name * availability depends on the selected host. */ export type UnsupportedDiagnostics = HookPolicyDiagnostics; export type UnsupportedDiagnosticsHost = "pi" | "omp"; /** * command: actions → hard error. PI has no slash-command API. */ export declare function diagnoseCommandActions(hook: HookConfig): string[]; /** * tool: actions → advisory. They work but are scoped to the current session. */ export declare function diagnoseToolActions(hook: HookConfig): string[]; /** * runIn: main on any non-bash action → hard error. * Only bash actions can currently be routed to the main session on PI. */ export declare function diagnoseRunInMainNonBash(hook: HookConfig): string[]; /** * scope: child → advisory. Only fires in child sessions via parentSession check. */ export declare function diagnoseScopeChild(hook: HookConfig): string[]; /** * tool.before. / tool.after. where is outside the active * host's built-in allow-list (and not the "*" wildcard) → advisory. Custom * tools remain possible, so this is deliberately advisory rather than an error. * * The host is explicit instead of treating OMP's larger tool set as valid on * PI, where those names would never match without a custom tool. */ export declare function diagnoseUnsupportedToolNameEvents(hook: HookConfig, host?: UnsupportedDiagnosticsHost): string[]; /** * Collect compatibility diagnostics across every hook in the given map. * Errors are intended to be appended to ParsedHooksFile.errors (load-blocking). * Advisories are intended to be surfaced via console.info and/or a new * `advisories` field on ParsedHooksFile (load succeeds). * * Importing this module installs PI's policy for the default entry point. OMP's * entry point explicitly selects ompHookPolicy after successful host * registration, keeping OMP-only tool names out of PI's allow-list. */ export declare function createUnsupportedHookPolicy(host: UnsupportedDiagnosticsHost): HookPolicy; export declare const piHookPolicy: HookPolicy; export declare const ompHookPolicy: HookPolicy; export declare function collectUnsupportedDiagnostics(hookMap: HookMap, host?: UnsupportedDiagnosticsHost): UnsupportedDiagnostics;