UNPKG

eve

Version:

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

50 lines (49 loc) 2.06 kB
import type { NormalizedChannelCorsOptions } from "#channel/cors.js"; import type { CompiledAgentManifest } from "#compiler/manifest.js"; import type { ChannelRouteMethod } from "#public/definitions/channel.js"; export interface ApplicationChannelRouteRegistration { readonly method: ChannelRouteMethod; readonly route: string; readonly cors?: NormalizedChannelCorsOptions; } export interface ApplicationChannelRoute { readonly kind: "channel"; readonly method: ChannelRouteMethod; readonly path: string; readonly cors?: NormalizedChannelCorsOptions; } export interface ApplicationChannelPreflightRoute { readonly kind: "channel-preflight"; readonly method: "OPTIONS"; readonly path: string; readonly cors: NormalizedChannelCorsOptions; } export type ApplicationRouteRegistration = ApplicationChannelPreflightRoute | ApplicationChannelRoute | { readonly kind: "development-artifacts"; readonly method: "GET"; readonly path: string; } | { readonly kind: "development-schedule"; readonly method: "POST"; readonly path: string; } | { readonly kind: "workflow"; readonly method: "ALL"; readonly path: string; }; export interface ApplicationRouteRegistry { readonly channelRegistrations: readonly ApplicationChannelRouteRegistration[]; readonly channelRoutes: readonly (ApplicationChannelPreflightRoute | ApplicationChannelRoute)[]; readonly routes: readonly ApplicationRouteRegistration[]; } interface ApplicationRouteRegistryHost { readonly compileResult: { readonly manifest: Pick<CompiledAgentManifest, "channelRoutes">; }; } /** Projects the compiler-owned route plan into Nitro registration records. */ export declare function createApplicationRouteRegistry(preparedHost: ApplicationRouteRegistryHost, options?: { readonly development?: boolean; }): ApplicationRouteRegistry; export declare function computeApplicationChannelRouteRegistrations(preparedHost: ApplicationRouteRegistryHost): readonly ApplicationChannelRouteRegistration[]; export {};