@copilotkit/runtime 0.0.0-fix-runtime-openai-api-key-passthrough-20260115015318 → 0.0.0-fix-shared-agent-state-20260123211820

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/CHANGELOG.md CHANGED
@@ -1,14 +1,86 @@
1
1
  # @copilotkit/runtime
2
2
 
3
- ## 0.0.0-fix-runtime-openai-api-key-passthrough-20260115015318
3
+ ## 0.0.0-fix-shared-agent-state-20260123211820
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 1e62c11: fix: add apiKey parameter to BuiltInAgentConfiguration
8
- - Updated dependencies [1e62c11]
9
- - @copilotkitnext/agent@0.0.0-fix-runtime-openai-api-key-passthrough-20260115015318
10
- - @copilotkit/shared@0.0.0-fix-runtime-openai-api-key-passthrough-20260115015318
11
- - @copilotkitnext/runtime@0.0.0-fix-runtime-openai-api-key-passthrough-20260115015318
7
+ - d655e75: fix: update ag-ui dependencies
8
+ - d268c49: fix: add apiKey parameter to BuiltInAgentConfiguration
9
+ - Updated dependencies [d655e75]
10
+ - Updated dependencies [d268c49]
11
+ - Updated dependencies [29d70a5]
12
+ - @copilotkit/shared@0.0.0-fix-shared-agent-state-20260123211820
13
+ - @copilotkitnext/agent@0.0.0-fix-shared-agent-state-20260123211820
14
+ - @copilotkitnext/runtime@0.0.0-fix-shared-agent-state-20260123211820
15
+
16
+ ## 1.51.3-next.3
17
+
18
+ ### Patch Changes
19
+
20
+ - d655e75: fix: update ag-ui dependencies
21
+ - Updated dependencies [d655e75]
22
+ - @copilotkit/shared@1.51.3-next.3
23
+ - @copilotkitnext/agent@1.51.3-next.3
24
+ - @copilotkitnext/runtime@1.51.3-next.3
25
+
26
+ ## 1.51.3-next.2
27
+
28
+ ### Patch Changes
29
+
30
+ - @copilotkit/shared@1.51.3-next.2
31
+ - @copilotkitnext/agent@1.51.3-next.2
32
+ - @copilotkitnext/runtime@1.51.3-next.2
33
+
34
+ ## 1.51.3-next.1
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [29d70a5]
39
+ - @copilotkitnext/agent@1.51.3-next.1
40
+ - @copilotkit/shared@1.51.3-next.1
41
+ - @copilotkitnext/runtime@1.51.3-next.1
42
+
43
+ ## 1.51.3-next.0
44
+
45
+ ### Patch Changes
46
+
47
+ - d268c49: fix: add apiKey parameter to BuiltInAgentConfiguration
48
+ - Updated dependencies [d268c49]
49
+ - @copilotkitnext/agent@1.51.3-next.0
50
+ - @copilotkit/shared@1.51.3-next.0
51
+ - @copilotkitnext/runtime@1.51.3-next.0
52
+
53
+ ## 1.51.2
54
+
55
+ ### Patch Changes
56
+
57
+ - e59d23f: Use deps instead of peerdeps
58
+ - e59d23f: Move in-repo deps from peerdeps to actual deps
59
+ - Updated dependencies [e59d23f]
60
+ - Updated dependencies [f36b6b1]
61
+ - @copilotkitnext/runtime@1.51.2
62
+ - @copilotkitnext/agent@1.51.2
63
+ - @copilotkit/shared@1.51.2
64
+
65
+ ## 1.51.2-next.1
66
+
67
+ ### Patch Changes
68
+
69
+ - e59d23f: Use deps instead of peerdeps
70
+ - e59d23f: Move in-repo deps from peerdeps to actual deps
71
+ - Updated dependencies [e59d23f]
72
+ - @copilotkitnext/runtime@1.51.2-next.1
73
+ - @copilotkitnext/agent@1.51.2-next.1
74
+ - @copilotkit/shared@1.51.2-next.1
75
+
76
+ ## 1.51.2-next.0
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [f36b6b1]
81
+ - @copilotkitnext/agent@1.51.2-next.0
82
+ - @copilotkit/shared@1.51.2-next.0
83
+ - @copilotkitnext/runtime@1.51.2-next.0
12
84
 
13
85
  ## 1.51.1
14
86
 
package/dist/index.d.ts CHANGED
@@ -1304,6 +1304,20 @@ declare function createLogger(options?: {
1304
1304
  component?: string;
1305
1305
  }): createPinoLogger__default.Logger<never, boolean>;
1306
1306
 
1307
+ /**
1308
+ * CORS configuration for CopilotKit endpoints.
1309
+ */
1310
+ interface CopilotEndpointCorsConfig {
1311
+ /**
1312
+ * Allowed origin(s). Can be a string, array of strings, or a function that returns the origin.
1313
+ */
1314
+ origin: string | string[] | ((origin: string, c: any) => string | undefined | null);
1315
+ /**
1316
+ * Whether to include credentials (cookies, authorization headers) in CORS requests.
1317
+ * When true, origin cannot be "*" - must be an explicit origin.
1318
+ */
1319
+ credentials?: boolean;
1320
+ }
1307
1321
  declare const logger: createPinoLogger.Logger<never, boolean>;
1308
1322
  declare const addCustomHeaderPlugin: {
1309
1323
  onResponse({ response }: {
@@ -1325,6 +1339,11 @@ interface CreateCopilotRuntimeServerOptions {
1325
1339
  cloud?: CopilotCloudOptions;
1326
1340
  properties?: CopilotRequestContextProperties;
1327
1341
  logLevel?: LogLevel;
1342
+ /**
1343
+ * Optional CORS configuration. When not provided, defaults to allowing all origins without credentials.
1344
+ * To support HTTP-only cookies, provide cors config with credentials: true and explicit origin.
1345
+ */
1346
+ cors?: CopilotEndpointCorsConfig;
1328
1347
  }
1329
1348
  declare function createContext(initialContext: YogaInitialContext, copilotKitContext: CreateCopilotRuntimeServerOptions, contextLogger: typeof logger, properties?: CopilotRequestContextProperties): Promise<Partial<GraphQLContext>>;
1330
1349
  declare function buildSchema(options?: {
@@ -1492,4 +1511,4 @@ declare class UnknownErrorResponse extends FailedResponseStatus {
1492
1511
  });
1493
1512
  }
1494
1513
 
1495
- export { AnthropicAdapter, AnthropicAdapterParams, AnthropicPromptCachingConfig, BedrockAdapter, BedrockAdapterParams, CommonConfig, CopilotRequestContextProperties, CopilotRuntime, CopilotRuntimeChatCompletionRequest, CopilotRuntimeChatCompletionResponse, CopilotRuntimeConstructorParams_BASE, CopilotRuntimeLogger, CopilotServiceAdapter, CreateCopilotRuntimeServerOptions, CustomEventNames, EmptyAdapter, ExperimentalEmptyAdapter, ExperimentalOllamaAdapter, GoogleGenerativeAIAdapter, GraphQLContext, GroqAdapter, GroqAdapterParams, GuardrailsValidationFailureResponse, LangChainAdapter, LangGraphAgent, LangGraphHttpAgent, LogLevel, MCPClient, MCPEndpointConfig, MCPTool, MessageStreamInterruptedResponse, OpenAIAdapter, OpenAIAdapterParams, OpenAIAssistantAdapter, OpenAIAssistantAdapterParams, PredictStateTool, RemoteChain, RemoteChainParameters, TelemetryAgentRunner, TelemetryAgentRunnerConfig, TextMessageEvents, ToolCallEvents, UnifyAdapter, UnifyAdapterParams, UnknownErrorResponse, addCustomHeaderPlugin, buildSchema, config, convertMCPToolsToActions, convertServiceAdapterError, copilotKitEndpoint, copilotRuntimeNestEndpoint, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint, copilotRuntimeNodeExpressEndpoint, copilotRuntimeNodeHttpEndpoint, createContext, createLogger, extractParametersFromSchema, generateMcpToolInstructions, getCommonConfig, langGraphPlatformEndpoint, resolveEndpointType };
1514
+ export { AnthropicAdapter, AnthropicAdapterParams, AnthropicPromptCachingConfig, BedrockAdapter, BedrockAdapterParams, CommonConfig, CopilotEndpointCorsConfig, CopilotRequestContextProperties, CopilotRuntime, CopilotRuntimeChatCompletionRequest, CopilotRuntimeChatCompletionResponse, CopilotRuntimeConstructorParams_BASE, CopilotRuntimeLogger, CopilotServiceAdapter, CreateCopilotRuntimeServerOptions, CustomEventNames, EmptyAdapter, ExperimentalEmptyAdapter, ExperimentalOllamaAdapter, GoogleGenerativeAIAdapter, GraphQLContext, GroqAdapter, GroqAdapterParams, GuardrailsValidationFailureResponse, LangChainAdapter, LangGraphAgent, LangGraphHttpAgent, LogLevel, MCPClient, MCPEndpointConfig, MCPTool, MessageStreamInterruptedResponse, OpenAIAdapter, OpenAIAdapterParams, OpenAIAssistantAdapter, OpenAIAssistantAdapterParams, PredictStateTool, RemoteChain, RemoteChainParameters, TelemetryAgentRunner, TelemetryAgentRunnerConfig, TextMessageEvents, ToolCallEvents, UnifyAdapter, UnifyAdapterParams, UnknownErrorResponse, addCustomHeaderPlugin, buildSchema, config, convertMCPToolsToActions, convertServiceAdapterError, copilotKitEndpoint, copilotRuntimeNestEndpoint, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint, copilotRuntimeNodeExpressEndpoint, copilotRuntimeNodeHttpEndpoint, createContext, createLogger, extractParametersFromSchema, generateMcpToolInstructions, getCommonConfig, langGraphPlatformEndpoint, resolveEndpointType };
package/dist/index.js CHANGED
@@ -72,7 +72,7 @@ var require_package = __commonJS({
72
72
  publishConfig: {
73
73
  access: "public"
74
74
  },
75
- version: "1.51.1",
75
+ version: "1.51.3-next.3",
76
76
  sideEffects: false,
77
77
  main: "./dist/index.js",
78
78
  module: "./dist/index.mjs",
@@ -106,9 +106,6 @@ var require_package = __commonJS({
106
106
  "unlink:global": "pnpm unlink --global"
107
107
  },
108
108
  devDependencies: {
109
- "@copilotkit/shared": "workspace:*",
110
- "@copilotkitnext/agent": "workspace:*",
111
- "@copilotkitnext/runtime": "workspace:*",
112
109
  "@jest/globals": "^29.7.0",
113
110
  "@swc/core": "1.5.28",
114
111
  "@types/jest": "^29.5.12",
@@ -126,6 +123,12 @@ var require_package = __commonJS({
126
123
  vitest: "^3.2.4"
127
124
  },
128
125
  dependencies: {
126
+ "@ag-ui/client": "^0.0.43",
127
+ "@ag-ui/core": "^0.0.43",
128
+ "@ag-ui/langgraph": "^0.0.22",
129
+ "@copilotkit/shared": "workspace:*",
130
+ "@copilotkitnext/agent": "workspace:*",
131
+ "@copilotkitnext/runtime": "workspace:*",
129
132
  "@graphql-yoga/plugin-defer-stream": "^3.3.1",
130
133
  "@hono/node-server": "^1.13.5",
131
134
  "@scarf/scarf": "^1.3.0",
@@ -134,7 +137,7 @@ var require_package = __commonJS({
134
137
  graphql: "^16.8.1",
135
138
  "graphql-scalars": "^1.23.0",
136
139
  "graphql-yoga": "^5.3.1",
137
- hono: "^4.10.3",
140
+ hono: "^4.11.4",
138
141
  openai: "^4.85.1",
139
142
  "partial-json": "^0.1.7",
140
143
  pino: "^9.2.0",
@@ -145,9 +148,6 @@ var require_package = __commonJS({
145
148
  zod: "^3.23.3"
146
149
  },
147
150
  peerDependencies: {
148
- "@ag-ui/client": "^0.0.42",
149
- "@ag-ui/core": "^0.0.42",
150
- "@ag-ui/langgraph": "^0.0.20",
151
151
  "@anthropic-ai/sdk": "^0.57.0",
152
152
  "@copilotkit/shared": "workspace:*",
153
153
  "@copilotkitnext/agent": "workspace:*",
@@ -4733,7 +4733,10 @@ function copilotRuntimeNextJSAppRouterEndpoint(options) {
4733
4733
  }
4734
4734
  const copilotRoute = runtime.createCopilotEndpointSingleRoute({
4735
4735
  runtime: options.runtime.instance,
4736
- basePath: options.baseUrl ?? options.endpoint
4736
+ basePath: options.baseUrl ?? options.endpoint,
4737
+ ...options.cors && {
4738
+ cors: options.cors
4739
+ }
4737
4740
  });
4738
4741
  const handleRequest = vercel.handle(copilotRoute);
4739
4742
  return {
@@ -4855,7 +4858,10 @@ function copilotRuntimeNodeHttpEndpoint(options) {
4855
4858
  }
4856
4859
  const honoApp = runtime.createCopilotEndpointSingleRoute({
4857
4860
  runtime: options.runtime.instance,
4858
- basePath: options.baseUrl ?? options.endpoint
4861
+ basePath: options.baseUrl ?? options.endpoint,
4862
+ ...options.cors && {
4863
+ cors: options.cors
4864
+ }
4859
4865
  });
4860
4866
  const handle2 = /* @__PURE__ */ __name(async function handler(req, res) {
4861
4867
  const url = getFullUrl(req);