import { Ref } from 'vue'; import { PluginInfo } from '@opentiny/tiny-robot'; import { McpServerConfig } from '@opentiny/next-sdk'; /** * 插件管理 Composable * 统一管理插件的增删改查逻辑 */ export declare function usePlugin(agent: any, enabledTools: Ref | undefined>, defaultPluginSrc: string): { installedPlugins: Ref<{ id: string; name: string; icon: string; description: string; enabled: boolean; expanded?: boolean | undefined; tools: { id: string; name: string; description: string; enabled: boolean; }[]; addState?: import('@opentiny/tiny-robot').PluginAddState | undefined; category?: string | undefined; }[], PluginInfo[] | { id: string; name: string; icon: string; description: string; enabled: boolean; expanded?: boolean | undefined; tools: { id: string; name: string; description: string; enabled: boolean; }[]; addState?: import('@opentiny/tiny-robot').PluginAddState | undefined; category?: string | undefined; }[]>; marketPlugins: Ref<{ id: string; name: string; icon: string; description: string; enabled: boolean; expanded?: boolean | undefined; tools: { id: string; name: string; description: string; enabled: boolean; }[]; addState?: import('@opentiny/tiny-robot').PluginAddState | undefined; category?: string | undefined; }[], PluginInfo[] | { id: string; name: string; icon: string; description: string; enabled: boolean; expanded?: boolean | undefined; tools: { id: string; name: string; description: string; enabled: boolean; }[]; addState?: import('@opentiny/tiny-robot').PluginAddState | undefined; category?: string | undefined; }[]>; pluginVisible: Ref; loadMcpServerToPlugin: (serverName: string, mcpServer: McpServerConfig) => Promise; togglePlugin: (plugin: PluginInfo, enabled: boolean) => void; toggleTool: (plugin: PluginInfo, toolId: string, enabled: boolean) => void; deletePlugin: (plugin: PluginInfo) => Promise; addPluginCore: (config: { pluginId: string; name: string; description: string; icon?: string; mcpServer: McpServerConfig; }) => Promise; addPluginFromMarket: (plugin: PluginInfo) => Promise; addPluginFromScan: (sessionId: string, agentRoot: string) => Promise; handleClientDisconnected: (serverName: string) => Promise<{ id: string; name: string; icon: string; description: string; enabled: boolean; expanded?: boolean | undefined; tools: { id: string; name: string; description: string; enabled: boolean; }[]; addState?: import('@opentiny/tiny-robot').PluginAddState | undefined; category?: string | undefined; } | null>; searchPlugin: (query: string, item: PluginInfo) => boolean; syncInstalledPluginTools: () => void; };