UNPKG

@copilotkit/runtime

Version:

<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />

44 lines (43 loc) 1.51 kB
import "reflect-metadata"; import { CopilotRuntimeLike } from "../core/runtime.mjs"; import { CopilotRuntimeHooks } from "../core/hooks.mjs"; import { CopilotEndpointCorsConfig } from "./hono.mjs"; import * as hono_types0 from "hono/types"; import * as hono_utils_http_status0 from "hono/utils/http-status"; import * as hono_hono_base0 from "hono/hono-base"; //#region src/v2/runtime/endpoints/hono-single.d.ts interface CopilotSingleEndpointParams { runtime: CopilotRuntimeLike; /** * Absolute path at which to mount the single-route endpoint (e.g. "/api/copilotkit"). */ basePath: string; /** * Optional CORS configuration. When not provided, defaults to allowing all origins without credentials. * To support HTTP-only cookies, provide cors config with credentials: true and explicit origin. */ cors?: CopilotEndpointCorsConfig; /** * Lifecycle hooks for request processing. */ hooks?: CopilotRuntimeHooks; } /** @deprecated Use `createCopilotHonoHandler` with `mode: "single-route"` instead. */ declare function createCopilotEndpointSingleRoute({ runtime, basePath, cors: corsConfig, hooks }: CopilotSingleEndpointParams): hono_hono_base0.HonoBase<hono_types0.BlankEnv, { [x: `${string}/*`]: { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status0.StatusCode; }; }; }, string, `${string}/*`>; //#endregion export { createCopilotEndpointSingleRoute }; //# sourceMappingURL=hono-single.d.mts.map