import { type Plugin } from "vite"; /** * Options for the eval runner, wired in through the `evals` plugin option and * consumed by `@skybridge/test`. Defined here so the runtime package can * import the shape while this package keeps no dependency on it. */ export interface EvalsOptions { temperature?: number; systemPrompt?: string; maxSteps?: number; /** * Per-scenario timeout in milliseconds. Defaults to two minutes, because * every turn in a scenario is a live model call and vitest's own 5s default * expires mid-conversation. */ timeout?: number; } /** Options for the {@link skybridge} Vite plugin. */ export interface SkybridgePluginOptions { /** Directory scanned for view modules. Defaults to `"src/views"`. */ viewsDir?: string; /** * Package names to leave unbundled when `skybridge build` bundles the server * for deployment. Use it for dependencies esbuild can't resolve or load — * typically optional native modules pulled in by a transitive dependency. */ serverExternal?: string[]; /** * Registers the `expect.chat` matchers and, optionally, the defaults every * conversation starts from (`temperature`, `systemPrompt`, `maxSteps`). * Point vitest at this config to run the scenarios. Requires * `@skybridge/test` as a dev dependency. * * Scenarios always run the app in-process via `start({ app })`, so * `evals: {}` is enough to wire the matchers up. */ evals?: EvalsOptions; } /** * Vite plugin that wires a Skybridge project's view files into Vite. * * For each `.tsx` / `.jsx` file in `viewsDir` with a default export, the * plugin: * - exposes a virtual entry that calls {@link mountView} with the view's * default export, * - generates `.skybridge/views.d.ts` to augment {@link ViewNameRegistry} so * {@link ViewName} narrows to the actual view names, * - rewrites `` JSX so the host can extract its content, * - warns in dev if a view file is missing a default export. * * Add it to your `vite.config.ts` alongside `@vitejs/plugin-react`. * * @example * ```ts * // vite.config.ts * import { defineConfig } from "vite"; * import react from "@vitejs/plugin-react"; * import { skybridge } from "@skybridge/vite-plugin"; * * export default defineConfig({ * plugins: [react(), skybridge({ viewsDir: "src/views" })], * }); * ``` */ export declare function skybridge(options?: SkybridgePluginOptions): Plugin; //# sourceMappingURL=plugin.d.ts.map