/** * Vite Plugin: Agent Auto-Registration * * Provides the `virtual:smrt-agent-registrations` virtual module. * When imported, this module registers each agent's manifest with * AgentUIRegistry and imports the agent's `./admin` entry (if it exists) * for side-effect component registration. * * Agent packages are discovered from smrt.config.js's `agents` array, * or from the `agents` option passed directly to the plugin. * * @example * ```ts * // vite.config.ts * import { vitePluginAgentRoutes } from '@happyvertical/smrt-agents/vite'; * * export default defineConfig({ * plugins: [ * sveltekit(), * vitePluginAgentRoutes({ * agents: [ * { packageName: '@happyvertical/praeco', agentClass: 'Praeco' }, * ], * }), * ], * }); * ``` * * ```ts * // In your app: * import 'virtual:smrt-agent-registrations'; * ``` */ export interface AgentRoutesPluginOptions { /** Path to smrt.config.js (default: /smrt.config.js) */ configPath?: string; /** * Agent packages to register. Falls back to reading smrt.config.js `agents` array * if not provided. When provided, `agentClass` is used as a hint but the plugin * still reads each package's manifest to discover the actual agent class. */ agents?: Array<{ packageName: string; agentClass: string; }>; } /** * Vite plugin that auto-registers agent manifests and admin components. * * Provides `virtual:smrt-agent-registrations` — import it to register * all agents declared in smrt.config.js. */ export declare function vitePluginAgentRoutes(options?: AgentRoutesPluginOptions): { name: string; resolveId: (id: string) => string | undefined; load: (id: string) => string | undefined; configResolved?: (config: { root: string; }) => void; }; //# sourceMappingURL=vite-plugin.d.ts.map