/** * Adapter types — no side-effect imports. */ import type { ChannelManifest } from "./manifest.js"; import type { ChannelTransport } from "./runtime.js"; /** Context passed to an adapter's Events HTTP handler. */ export interface ChannelHttpContext { /** File-derived channel name (route segment). */ name: string; /** Compiled channel manifest. */ manifest: ChannelManifest; /** * Live connector declaration imported from `connectors/{name}` (includes * GitHub `prompt` callbacks). Absent when only the JSON manifest is available. */ definition?: unknown; /** * Pre-read raw body when the HTTP framework may have consumed `request` * (Hono mount passes `await c.req.text()`). */ rawBody?: string | Uint8Array; } /** Runtime plugin surface for a channel provider. */ export interface ChannelProviderAdapter { /** Provider key; must match {@link ChannelManifest.provider}. */ readonly provider: string; /** Handle `POST /channels/{name}/events` (verify + normalize + ACK + work). */ handleEventsRequest(request: Request, ctx: ChannelHttpContext): Promise; /** Build outbound transport for `resolveRuntimeChannel`. */ createTransport(env: NodeJS.ProcessEnv): ChannelTransport | undefined; } //# sourceMappingURL=registry-types.d.ts.map