/** * Minimal VMZ runtime — `#server` invoke + RPC/REST HTTP + optional static/SSR. * * Browser-safe: no static `node:*` imports. Node builtins are loaded only inside * Node/SSR request handlers so client bundles can `import { callServer }`. */ import type { Route, ServerModuleResolver } from '../shared/server.types.js'; /** * Map `#server/foo` �?filesystem / URL the host can `import`. * Only set this in Node/SSR hosts �?browser bundles must omit it so RPC goes HTTP. */ export declare function setServerModuleResolver(fn: ServerModuleResolver): void; export declare function setRoutes(next: Route[]): void; export declare function callServer(moduleId: string, method: string, args?: unknown[]): Promise; export declare function handleRpc(body: any): Promise; /** * Match REST route from `vmz-routes.json`. */ export declare function matchRoute(verb: any, pathname: any): Route; /** * Web Standards Fetch entry for ServerArtifact hosts (Node adapter, worker/edge parity). * Handles RPC + public ServerRoute only; static/SSR stay on Node host options. */ export declare function handleFetchRequest(request: any): Promise; /** * Node `http.createServer` listener: RPC + REST + optional static / SSR index. * RPC/REST go through {@link handleFetchRequest} so Node and Fetch hosts share one core. */ export declare function handleNodeRequest(req: any, res: any, opts?: any): Promise;