@copilotkit/runtime 0.0.0-max-changeset-20260109200053 → 0.0.0-max-umd-20260122170341

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.mjs CHANGED
@@ -65,7 +65,7 @@ var require_package = __commonJS({
65
65
  publishConfig: {
66
66
  access: "public"
67
67
  },
68
- version: "1.50.2-next.0",
68
+ version: "1.51.3-next.2",
69
69
  sideEffects: false,
70
70
  main: "./dist/index.js",
71
71
  module: "./dist/index.mjs",
@@ -73,23 +73,28 @@ var require_package = __commonJS({
73
73
  ".": {
74
74
  import: "./dist/index.mjs",
75
75
  require: "./dist/index.js",
76
- types: "./dist/index.d.ts"
76
+ types: "./dist/index.d.ts",
77
+ umd: "./dist/index.umd.js"
77
78
  },
78
79
  "./v2": {
79
80
  import: "./dist/v2/index.mjs",
80
81
  require: "./dist/v2/index.js",
81
- types: "./dist/v2/index.d.ts"
82
+ types: "./dist/v2/index.d.ts",
83
+ umd: "./dist/v2/index.umd.js"
82
84
  },
83
85
  "./langgraph": {
84
86
  import: "./dist/langgraph.mjs",
85
87
  require: "./dist/langgraph.js",
86
- types: "./dist/langgraph.d.ts"
88
+ types: "./dist/langgraph.d.ts",
89
+ umd: "./dist/langgraph.umd.js"
87
90
  }
88
91
  },
92
+ unpkg: "./dist/index.umd.js",
93
+ jsdelivr: "./dist/index.umd.js",
89
94
  types: "./dist/index.d.ts",
90
95
  license: "MIT",
91
96
  scripts: {
92
- build: "pnpm run generate-graphql-schema && tsup",
97
+ build: "pnpm run generate-graphql-schema && tsup && rollup -c rollup.config.mjs",
93
98
  dev: 'tsup --watch --onSuccess "pnpm run generate-graphql-schema"',
94
99
  test: "jest --passWithNoTests",
95
100
  "check-types": "tsc --noEmit",
@@ -99,9 +104,6 @@ var require_package = __commonJS({
99
104
  "unlink:global": "pnpm unlink --global"
100
105
  },
101
106
  devDependencies: {
102
- "@copilotkit/shared": "workspace:*",
103
- "@copilotkitnext/agent": "workspace:*",
104
- "@copilotkitnext/runtime": "workspace:*",
105
107
  "@jest/globals": "^29.7.0",
106
108
  "@swc/core": "1.5.28",
107
109
  "@types/jest": "^29.5.12",
@@ -119,6 +121,12 @@ var require_package = __commonJS({
119
121
  vitest: "^3.2.4"
120
122
  },
121
123
  dependencies: {
124
+ "@ag-ui/client": "^0.0.42",
125
+ "@ag-ui/core": "^0.0.42",
126
+ "@ag-ui/langgraph": "^0.0.20",
127
+ "@copilotkit/shared": "workspace:*",
128
+ "@copilotkitnext/agent": "workspace:*",
129
+ "@copilotkitnext/runtime": "workspace:*",
122
130
  "@graphql-yoga/plugin-defer-stream": "^3.3.1",
123
131
  "@hono/node-server": "^1.13.5",
124
132
  "@scarf/scarf": "^1.3.0",
@@ -127,7 +135,7 @@ var require_package = __commonJS({
127
135
  graphql: "^16.8.1",
128
136
  "graphql-scalars": "^1.23.0",
129
137
  "graphql-yoga": "^5.3.1",
130
- hono: "^4.10.3",
138
+ hono: "^4.11.4",
131
139
  openai: "^4.85.1",
132
140
  "partial-json": "^0.1.7",
133
141
  pino: "^9.2.0",
@@ -138,9 +146,6 @@ var require_package = __commonJS({
138
146
  zod: "^3.23.3"
139
147
  },
140
148
  peerDependencies: {
141
- "@ag-ui/client": "^0.0.42",
142
- "@ag-ui/core": "^0.0.42",
143
- "@ag-ui/langgraph": "^0.0.20",
144
149
  "@anthropic-ai/sdk": "^0.57.0",
145
150
  "@copilotkit/shared": "workspace:*",
146
151
  "@copilotkitnext/agent": "workspace:*",
@@ -3584,7 +3589,7 @@ var CopilotRuntime = class {
3584
3589
  } : {},
3585
3590
  "cloud.base_url": cloudBaseUrl
3586
3591
  });
3587
- (_c = params == null ? void 0 : params.beforeRequestMiddleware) == null ? void 0 : _c.call(params, hookParams);
3592
+ const middlewareResult = await ((_c = params == null ? void 0 : params.beforeRequestMiddleware) == null ? void 0 : _c.call(params, hookParams));
3588
3593
  if ((_d = params == null ? void 0 : params.middleware) == null ? void 0 : _d.onBeforeRequest) {
3589
3594
  const { request: request2, runtime, path } = hookParams;
3590
3595
  const gqlMessages = aguiToGQL(body.messages).reduce((acc, msg) => {
@@ -3607,6 +3612,7 @@ var CopilotRuntime = class {
3607
3612
  url: request2.url
3608
3613
  });
3609
3614
  }
3615
+ return middlewareResult;
3610
3616
  };
3611
3617
  }
3612
3618
  createOnAfterRequestHandler(params) {
@@ -4725,7 +4731,10 @@ function copilotRuntimeNextJSAppRouterEndpoint(options) {
4725
4731
  }
4726
4732
  const copilotRoute = createCopilotEndpointSingleRoute({
4727
4733
  runtime: options.runtime.instance,
4728
- basePath: options.baseUrl ?? options.endpoint
4734
+ basePath: options.baseUrl ?? options.endpoint,
4735
+ ...options.cors && {
4736
+ cors: options.cors
4737
+ }
4729
4738
  });
4730
4739
  const handleRequest = handle(copilotRoute);
4731
4740
  return {
@@ -4847,7 +4856,10 @@ function copilotRuntimeNodeHttpEndpoint(options) {
4847
4856
  }
4848
4857
  const honoApp = createCopilotEndpointSingleRoute({
4849
4858
  runtime: options.runtime.instance,
4850
- basePath: options.baseUrl ?? options.endpoint
4859
+ basePath: options.baseUrl ?? options.endpoint,
4860
+ ...options.cors && {
4861
+ cors: options.cors
4862
+ }
4851
4863
  });
4852
4864
  const handle2 = /* @__PURE__ */ __name(async function handler(req, res) {
4853
4865
  const url = getFullUrl(req);