UNPKG

@glyphtek/unspecd

Version:

A declarative UI framework for building internal tools and dashboards with TypeScript. Create interactive tables, forms, and dashboards using simple specifications.

73 lines 2.32 kB
import { type DiscoveryConfig } from './discovery.js'; declare global { var __UNSPECD_TOOLS_DATA__: { tools: Array<{ id: string; title: string; inputs: any; content: any; functionNames: string[]; filePath?: string; }>; toolCount: number; focusMode: boolean; title?: string; } | undefined; var __UNSPECD_APP_INSTANCE__: any | undefined; var __UNSPECD_STREAMING_FUNCTIONS__: Record<string, any> | undefined; } export type { DiscoveryConfig } from './discovery.js'; /** * Configuration for discovery-based server startup */ export interface DiscoveryServerConfig { /** Discovery configuration for auto-finding tools */ discovery: DiscoveryConfig; /** The port to run the server on (defaults to 3000) */ port?: number; /** Whether to allow external network access (defaults to true) */ host?: boolean; } /** * Configuration for direct entry point server startup */ export interface DirectServerConfig { /** The entry point file path for the application */ entryPoint: string; /** The port to run the server on (defaults to 3000) */ port?: number; /** Whether to allow external network access (defaults to true) */ host?: boolean; } /** * Combined server configuration that supports both discovery and direct entry point modes */ export type ServerConfig = DiscoveryServerConfig | DirectServerConfig; /** * Starts a Vite development server with the specified configuration. * * This function supports two modes: * 1. Discovery Mode: Automatically discovers tools and generates a temporary entry point * 2. Direct Mode: Uses a provided entry point file directly * * @param config - Configuration object for server startup * * @returns Promise that resolves when the server has started successfully * * @example * ```typescript * // Discovery Mode: Auto-discover tools from unspecd.config.ts * await startDevServer({ * discovery: { cwd: './' }, * port: 3000 * }); * * // Direct Mode: Use specific entry point * await startDevServer({ * entryPoint: 'examples/index.ts', * port: 3000 * }); * ``` */ export declare function startDevServer(config: ServerConfig): Promise<void>; //# sourceMappingURL=server.d.ts.map