@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
37 lines • 1.75 kB
TypeScript
import type { SandboxKitComponentDoc } from '../sandbox-kit.js';
import type { SandboxKitFiles } from './files.js';
/** What a kit build produced. */
export interface SandboxKitBundle {
/** The IIFE (its CSS, if the components import any, rides along as `window.__GENUI_KIT_CSS__`). */
code: string;
/** A short content hash — what a client caches it by. */
hash: string;
/** The component names the bundle exports (what the docs fall back to without TypeScript). */
exports: string[];
/** Every module of the app the bundle read — what to watch for a rebuild. */
modules: string[];
}
export interface BuildSandboxKitOptions {
root: string;
files: SandboxKitFiles;
/** `resolve` from the app's Vite config (aliases, dedupe, conditions). */
resolve?: Record<string, unknown>;
/** `css` from the app's Vite config (for CSS the components import). */
css?: Record<string, unknown>;
/** Extra Vite plugins for the kit build (e.g. one the components need to compile). */
plugins?: unknown[];
inlineAssetLimit?: number;
inlineAssetBudget?: number;
warn?: (message: string) => void;
/** Default true. */
minify?: boolean;
}
/** Build the kit bundle with the app's Vite. */
export declare function buildSandboxKitBundle(options: BuildSandboxKitOptions): Promise<SandboxKitBundle>;
/**
* The kit's components as a JavaScript project can document them, without TypeScript: run the
* bundle in a bare context (no DOM) and read each PascalCase export's `propTypes` keys and
* `defaultProps`. `[]` when the bundle does not run outside a browser.
*/
export declare function kitDocsFromBundle(code: string): SandboxKitComponentDoc[];
//# sourceMappingURL=bundle.d.ts.map