/** * SuperBased hook handlers for OpenCode lifecycle events. * * The plugin keeps lifecycle interception minimal — the heavy lifting happens * in the SuperBased MCP server (configured separately in opencode.json under * `mcp.superbased`). These hooks add ergonomic value-add on top: * * - tool.execute.before — pre-flight safety: warn if a destructive * SuperBased GUI action runs without `confirm: true` (the server enforces * this anyway, but surfacing it client-side gives a better UX). * - tool.execute.after — post-flight telemetry: log durations of expensive * SuperBased calls (recording, narrate, scroll_capture) so users notice * when they're paying the cost. * - permission.asked — when permission is being asked for a SuperBased * tool, surface the audit-log location once per session so users know * where actions are being recorded. */ export interface ToolHookInput { tool?: string; args?: Record; } export interface ToolHookOutput { args?: Record; warnings?: string[]; } export declare const startTimes: Map; export declare function onToolExecuteBefore(input: ToolHookInput, output: ToolHookOutput): void; export declare function onToolExecuteAfter(input: ToolHookInput, _output: ToolHookOutput): void; export interface PermissionHookInput { tool?: string; sessionId?: string; session?: object; } export declare function onPermissionAsked(input: PermissionHookInput): void; //# sourceMappingURL=hooks.d.ts.map