
import { CopilotRuntimeLike } from "../core/runtime.cjs";
import { CopilotRuntimeHooks } from "../core/hooks.cjs";
import { Router } from "express";

//#region src/v2/runtime/endpoints/express-single.d.ts
interface CopilotSingleRouteExpressParams {
  runtime: CopilotRuntimeLike;
  basePath: string;
  /**
   * Lifecycle hooks for request processing.
   */
  hooks?: CopilotRuntimeHooks;
}
/**
 * Creates an Express router that serves the CopilotKit runtime as a single
 * POST endpoint. Clients send a JSON envelope with `{ method, params, body }`
 * to dispatch to the appropriate handler.
 *
 * This is a convenience wrapper around {@link createCopilotExpressHandler}
 * with `mode: "single-route"` and `cors: true`.
 *
 * @example
 * ```typescript
 * import express from "express";
 * import { CopilotRuntime } from "@copilotkit/runtime/v2";
 * import { createCopilotEndpointSingleRouteExpress } from "@copilotkit/runtime/v2/express";
 *
 * const runtime = new CopilotRuntime({
 *   agents: { default: new BuiltInAgent({ model: "openai/gpt-4o-mini" }) },
 * });
 *
 * const app = express();
 * app.use(createCopilotEndpointSingleRouteExpress({
 *   runtime,
 *   basePath: "/api/copilotkit",
 * }));
 * app.listen(4000);
 * ```
 */
/** @deprecated Use `createCopilotExpressHandler` with `mode: "single-route"` instead. */
declare function createCopilotEndpointSingleRouteExpress({
  runtime,
  basePath,
  hooks
}: CopilotSingleRouteExpressParams): Router;
//#endregion
export { createCopilotEndpointSingleRouteExpress };
//# sourceMappingURL=express-single.d.cts.map