@copilotkitnext/runtime 0.0.13-alpha.1 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ module.exports = __toCommonJS(index_exports);
42
42
  // package.json
43
43
  var package_default = {
44
44
  name: "@copilotkitnext/runtime",
45
- version: "0.0.13-alpha.1",
45
+ version: "0.0.14",
46
46
  description: "Server-side runtime package for CopilotKit2",
47
47
  main: "dist/index.js",
48
48
  types: "dist/index.d.ts",
@@ -506,6 +506,7 @@ var CopilotRuntime = class {
506
506
 
507
507
  // src/endpoint.ts
508
508
  var import_hono = require("hono");
509
+ var import_cors = require("hono/cors");
509
510
 
510
511
  // src/handlers/handle-run.ts
511
512
  var import_client3 = require("@ag-ui/client");
@@ -1066,7 +1067,14 @@ function createCopilotEndpoint({
1066
1067
  basePath
1067
1068
  }) {
1068
1069
  const app = new import_hono.Hono();
1069
- return app.basePath(basePath).use("*", async (c, next) => {
1070
+ return app.basePath(basePath).use(
1071
+ "*",
1072
+ (0, import_cors.cors)({
1073
+ origin: "*",
1074
+ allowMethods: ["GET", "HEAD", "PUT", "POST", "DELETE", "PATCH", "OPTIONS"],
1075
+ allowHeaders: ["*"]
1076
+ })
1077
+ ).use("*", async (c, next) => {
1070
1078
  const request = c.req.raw;
1071
1079
  const path = c.req.path;
1072
1080
  try {