import type { PluginInput } from '@opencode-ai/plugin'; import type { PluginConfig } from '../config'; /** * Creates a preset manager for the /preset slash command. * * Stores the requested runtime preset in plugin memory and updates the * plugin-facing TUI snapshot. It deliberately does not call OpenCode's * client.config.update() or instance.dispose() from command hooks because * OpenCode continues the same command into the prompt loop after * command.execute.before, which can break the active conversation while * the agent registry is changing. */ export declare function createPresetManager(ctx: PluginInput, config: PluginConfig): { handleCommandExecuteBefore: (input: { command: string; sessionID: string; arguments: string; }, output: { parts: Array<{ type: string; text?: string; }>; }) => Promise; registerCommand: (opencodeConfig: Record) => void; }; export type PresetManager = ReturnType;