UNPKG

eve

Version:

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

24 lines (23 loc) 1.28 kB
import type { ChannelAdapter } from "#channel/adapter.js"; import type { NormalizedChannelCorsOptions } from "#channel/cors.js"; import type { RouteDefinition, SendFn } from "#channel/routes.js"; import type { Session } from "#channel/session.js"; import type { SessionAuthContext } from "#channel/types.js"; export declare const CHANNEL_SENTINEL: "eve:channel"; export interface CompiledChannel<TState = undefined, TReceiveTarget = Record<string, unknown>, TMetadata extends Record<string, unknown> = Record<string, unknown>> { readonly __kind: typeof CHANNEL_SENTINEL; readonly routes: readonly RouteDefinition<TState>[]; readonly adapter: ChannelAdapter<any>; readonly cors?: NormalizedChannelCorsOptions; readonly __metadata?: TMetadata; readonly receive?: (input: { readonly message: string; readonly target: Readonly<TReceiveTarget>; readonly auth: SessionAuthContext | null; }, args: { send: SendFn<TState>; }) => Promise<Session>; } export declare function isCompiledChannel(value: unknown): value is CompiledChannel; export declare function getChannelInstrumentationKind(value: unknown): string | undefined; export declare function setChannelInstrumentationKind(channel: CompiledChannel, kind: string): void;