eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
39 lines (38 loc) • 1.54 kB
TypeScript
import type { Nitro } from "nitro/types";
import type { ChannelRouteMethod } from "#public/definitions/channel.js";
import type { NitroArtifactsConfigInput } from "#internal/nitro/host/artifacts-config.js";
import type { PreparedApplicationHost } from "#internal/nitro/host/types.js";
interface ChannelRouteNitro {
options: Pick<Nitro["options"], "handlers" | "virtual">;
routing: {
sync(): void;
};
}
/**
* One Nitro route registration for an eve channel.
*/
export interface NitroChannelRouteRegistration {
readonly method: ChannelRouteMethod;
readonly route: string;
}
/**
* Computes the merged set of channel routes the Nitro host should mount.
*/
export declare function computeChannelRouteRegistrations(preparedHost: PreparedApplicationHost): readonly NitroChannelRouteRegistration[];
/**
* Registers virtual Nitro handlers for the provided eve channel routes.
*/
export declare function registerChannelVirtualHandlers(nitro: Pick<ChannelRouteNitro, "options">, input: {
readonly artifactsConfig: NitroArtifactsConfigInput;
readonly registrations: readonly NitroChannelRouteRegistration[];
}): void;
/**
* Replaces the currently-mounted eve channel virtual handlers when the route
* set changes.
*/
export declare function syncChannelVirtualHandlers(nitro: ChannelRouteNitro, input: {
readonly artifactsConfig: NitroArtifactsConfigInput;
readonly next: readonly NitroChannelRouteRegistration[];
readonly previous: readonly NitroChannelRouteRegistration[];
}): boolean;
export {};