import type { RouteHandlerArgs } from "#channel/routes.js"; import type { SkillFileSource } from "#channel/skill-files.js"; import type { RunHandle, RunInput } from "#channel/types.js"; type AgentInfoRouteResponse = () => Promise; interface HomeRouteMetadata { readonly agentName: string; } /** * Creates one session from a route handler. `continuationToken` is * channel-local (the dispatcher prepends the channel name), so ownership * established here is visible to `resolveSession` on the same channel. */ export type RouteSessionCreator = (input: Omit) => Promise; export type RemoteAgentStreamHeadersResolver = (input: { readonly name: string; readonly resolverId?: string; readonly url: string; }) => Promise>; export declare function attachRouteChannelName(args: TArgs, channelName: string): TArgs; export declare function readRouteChannelName(args: RouteHandlerArgs): string | undefined; export declare function attachAgentInfoRouteResponse(args: TArgs, respond: AgentInfoRouteResponse): TArgs; export declare function readAgentInfoRouteResponse(args: RouteHandlerArgs): AgentInfoRouteResponse | undefined; export declare function attachHomeRouteMetadata(args: TArgs, metadata: HomeRouteMetadata): TArgs; export declare function readHomeRouteMetadata(args: RouteHandlerArgs): HomeRouteMetadata | undefined; export declare function attachRouteSessionCreator(args: TArgs, createSession: RouteSessionCreator): TArgs; export declare function readRouteSessionCreator(args: RouteHandlerArgs): RouteSessionCreator | undefined; export declare function attachRemoteAgentStreamHeadersResolver(args: TArgs, resolve: RemoteAgentStreamHeadersResolver): TArgs; export declare function readRemoteAgentStreamHeadersResolver(args: RouteHandlerArgs): RemoteAgentStreamHeadersResolver | undefined; /** The agent's skill files behind `readSkill`, for channels that serve files they already listed. */ export declare function attachSkillFileSource(args: TArgs, files: SkillFileSource): TArgs; export declare function readSkillFileSource(args: RouteHandlerArgs): SkillFileSource | undefined; export {};