UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

76 lines (75 loc) 3.39 kB
export declare const WORKFLOW_STEP_EXTERNAL_PACKAGES: readonly ["@mongodb-js/zstd", "just-bash", "microsandbox", "node-liblzma"]; /** * Packages that must stay external during the initial workflow builder * pass so `node:*` transitive dependencies do not fail the workflow VM check. * Nitro performs the final bundling/tracing pass for hosted output. */ export declare const WORKFLOW_BUILDER_DEFERRED_PACKAGES: readonly ["@chat-adapter/slack", "chat"]; /** * Builds the environment block every generated Vercel workflow function needs. * * When the build input carries the agent's resolved public route prefix, it * is baked into the function environment under * {@link EVE_PUBLIC_ROUTE_PREFIX_ENV} so callback-URL minting inside the * deployed workflow functions knows the agent's public mount. */ export declare function createWorkflowFunctionEnvironment(input?: { environment?: unknown; publicRoutePrefix?: string; }): Record<string, unknown>; /** * Creates an empty staging directory for one emitted Vercel function. */ export declare function prepareVercelFunctionDirectory(path: string): Promise<void>; /** * Copies a Nitro-bundled Vercel function directory into one standalone * workflow function directory. * * Nitro may emit route functions as symlinks back to `__server.func`. This * helper dereferences the source path first, then copies concrete files so the * generated workflow functions do not rely on symlinks. */ export declare function copyNitroFunctionDirectory(input: { fallbackPath: string; sourcePath: string; targetPath: string; }): Promise<void>; /** * Keeps only eve-owned Vercel function output and rewrites eve route function * symlinks to a shared eve-owned server function. * * Nitro emits generic app routes such as `index.func -> ./__server.func` for * eve's standalone landing page. In a multi-service Next.js deployment those * root aliases collide with Next's own functions. The Next integration only * proxies eve's `/eve/v1/**` transport routes, so Vercel output should expose * those route functions and workflow trigger functions, not eve's root page. * * Nitro also dedupes every route function through `__server.func`. Preserve * that model by copying the shared target once into the eve-owned tree and * repointing eve route aliases at it before pruning the root target. */ export declare function normalizeEveVercelFunctionOutput(outputDir: string, options?: { readonly servicePrefix?: string; }): Promise<void>; /** * Bundles one package-owned workflow handler into a standalone Vercel function * directory without inheriting Nitro's hosted server chunks. */ export declare function emitBundledWorkflowFunctionDirectory(input: { bundlePath: string; pluginPaths?: readonly string[]; publicRoutePrefix?: string; targetPath: string; }): Promise<void>; /** * Rewrites one copied Nitro function directory so its handler always dispatches * to a concrete workflow route path. * * Queue-triggered workflow functions do not guarantee a request URL that * matches Nitro's original route table. This helper keeps Nitro's traced * output intact but swaps the entrypoint with a small URL-rewriting adapter. */ export declare function retargetNitroFunctionDirectoryToWorkflowRoute(input: { functionDirectoryPath: string; workflowRoutePath: string; }): Promise<void>;