import type { ChannelAdapter } from "#channel/adapter.js"; import type { UserContent } from "ai"; import type { ChannelReceiveContext } from "#channel/channel-operations.js"; import type { NormalizedChannelCorsOptions } from "#channel/cors.js"; import type { TypedReceiveTarget } from "#channel/receive-target.js"; import type { RouteDefinition } 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"; /** Structural identity shared by public authored channels and compiled channels. */ export interface ChannelReference> extends TypedReceiveTarget { readonly __kind: typeof CHANNEL_SENTINEL; } export interface CompiledChannel, TMetadata extends Record = Record> extends ChannelReference { readonly routes: readonly RouteDefinition[]; readonly adapter: ChannelAdapter; readonly cors?: NormalizedChannelCorsOptions; readonly __metadata?: TMetadata; readonly receive?: (input: { readonly message: string | UserContent; readonly target: Readonly; readonly auth: SessionAuthContext | null; }, ctx: ChannelReceiveContext) => Promise; } 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;