export { defineChannel, GET, POST, PUT, PATCH, DELETE, WS, type AttachSessionFn, type CancelTurnResult, type ClearSessionResult, type CompactSessionResult, type ResetSessionResult, type Channel, type ChannelFrom, type ChannelReceiveContext, type ChannelResolveSession, type ChannelRespondOptions, type ChannelSendOptions, type ChannelSource, type ChannelCors, type ChannelCorsOptions, type ChannelDefinition, type ChannelContinuationOps, type ChannelEvents, type InferChannelMetadata, type Session, type SessionCallback, type SessionHandle, type SessionRespondOptions, type SessionSendOptions, type RouteDefinition, type RouteHandlerArgs, type HttpRouteDefinition, type WebSocketMessage, type WebSocketPeer, type WebSocketRouteDefinition, type WebSocketRouteHandler, type WebSocketRouteHooks, type WebSocketUpgradeRequest, type WebSocketUpgradeResult, } from "#public/definitions/channel.js"; export { createWebSocketUpgradeServer, type WebSocketUpgradeServerBridge, } from "#channel/websocket-upgrade-server.js"; import type { Channel, InferChannelMetadata } from "#public/definitions/channel.js"; /** * Base channel metadata shape used by framework channel kinds. */ export type InstrumentationChannelMetadata = Readonly>; /** * Kind discriminator exposed to instrumentation and dynamic resolvers. */ export type InstrumentationChannelKind = "http" | "schedule" | "subagent" | "unknown" | `channel:${string}`; /** * Instrumentation projection for one channel kind. */ export interface InstrumentationChannelForKind { readonly kind: K; readonly metadata: InstrumentationChannelMetadata; } /** * Channel shape received by instrumentation callbacks and dynamic resolvers. * Use {@link isChannel} with a channel definition to narrow authored metadata. */ export type InstrumentationChannel = InstrumentationChannelForKind; /** * Instrumentation channel narrowed to the metadata projected by `TChannel`. */ export type InstrumentationChannelForChannel> = Omit, "metadata"> & { readonly metadata: InferChannelMetadata; }; /** * Narrows a channel by comparing it to an app-owned channel value imported * from `agent/channels/*`. * * Works with both instrumentation resolver inputs (`input.channel`) and * dynamic resolver inputs (`ctx.channel`). The comparison uses the * compiler's path-derived `channel:` identity. Metadata is inferred * directly from the target channel definition. */ export declare function isChannel>(channel: InstrumentationChannel | { readonly kind?: string; }, target: TChannel): channel is InstrumentationChannelForChannel;