@copilotkit/runtime 1.5.16-next.0 → 1.5.16-next.2

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{chunk-D2WLFQS6.mjs → chunk-2OZAGFV3.mjs} +2 -2
  3. package/dist/{chunk-U3V2BCGI.mjs → chunk-5BIEM2UU.mjs} +2 -2
  4. package/dist/chunk-FHD4JECV.mjs +33 -0
  5. package/dist/{chunk-4TED7LNT.mjs → chunk-ISPCKW3E.mjs} +3 -3
  6. package/dist/{chunk-S3KKBII4.mjs → chunk-OS5YD32G.mjs} +2 -2
  7. package/dist/{chunk-HNUNXFTW.mjs → chunk-RTFJTJMA.mjs} +3 -3
  8. package/dist/{chunk-COJRNPCX.mjs → chunk-TBPOHFA4.mjs} +3 -3
  9. package/dist/{chunk-P5J3JGOI.mjs → chunk-U5OA7VEB.mjs} +35 -18
  10. package/dist/chunk-U5OA7VEB.mjs.map +1 -0
  11. package/dist/{chunk-PIUZJXE7.mjs → chunk-UHUC2NVB.mjs} +3 -3
  12. package/dist/{copilot-runtime-3e7f1c7b.d.ts → copilot-runtime-084fb9c7.d.ts} +6 -1
  13. package/dist/graphql/types/base/index.mjs +2 -2
  14. package/dist/graphql/types/converted/index.mjs +3 -3
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +28 -11
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +11 -9
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/lib/index.d.ts +1 -1
  21. package/dist/lib/index.js +28 -11
  22. package/dist/lib/index.js.map +1 -1
  23. package/dist/lib/index.mjs +11 -9
  24. package/dist/lib/integrations/index.d.ts +2 -2
  25. package/dist/lib/integrations/index.js +15 -6
  26. package/dist/lib/integrations/index.js.map +1 -1
  27. package/dist/lib/integrations/index.mjs +11 -9
  28. package/dist/lib/integrations/nest/index.d.ts +1 -1
  29. package/dist/lib/integrations/nest/index.js +13 -6
  30. package/dist/lib/integrations/nest/index.js.map +1 -1
  31. package/dist/lib/integrations/nest/index.mjs +7 -7
  32. package/dist/lib/integrations/node-express/index.d.ts +1 -1
  33. package/dist/lib/integrations/node-express/index.js +13 -6
  34. package/dist/lib/integrations/node-express/index.js.map +1 -1
  35. package/dist/lib/integrations/node-express/index.mjs +7 -7
  36. package/dist/lib/integrations/node-http/index.d.ts +1 -1
  37. package/dist/lib/integrations/node-http/index.js +13 -6
  38. package/dist/lib/integrations/node-http/index.js.map +1 -1
  39. package/dist/lib/integrations/node-http/index.mjs +6 -6
  40. package/dist/service-adapters/index.mjs +2 -2
  41. package/dist/utils/index.mjs +2 -2
  42. package/package.json +5 -5
  43. package/src/graphql/resolvers/copilot.resolver.ts +1 -4
  44. package/src/lib/integrations/shared.ts +9 -1
  45. package/src/lib/runtime/remote-lg-action.ts +13 -3
  46. package/tsconfig.json +1 -0
  47. package/dist/chunk-44O2JGUY.mjs +0 -12
  48. package/dist/chunk-P5J3JGOI.mjs.map +0 -1
  49. /package/dist/{chunk-D2WLFQS6.mjs.map → chunk-2OZAGFV3.mjs.map} +0 -0
  50. /package/dist/{chunk-U3V2BCGI.mjs.map → chunk-5BIEM2UU.mjs.map} +0 -0
  51. /package/dist/{chunk-44O2JGUY.mjs.map → chunk-FHD4JECV.mjs.map} +0 -0
  52. /package/dist/{chunk-4TED7LNT.mjs.map → chunk-ISPCKW3E.mjs.map} +0 -0
  53. /package/dist/{chunk-S3KKBII4.mjs.map → chunk-OS5YD32G.mjs.map} +0 -0
  54. /package/dist/{chunk-HNUNXFTW.mjs.map → chunk-RTFJTJMA.mjs.map} +0 -0
  55. /package/dist/{chunk-COJRNPCX.mjs.map → chunk-TBPOHFA4.mjs.map} +0 -0
  56. /package/dist/{chunk-PIUZJXE7.mjs.map → chunk-UHUC2NVB.mjs.map} +0 -0
@@ -3,15 +3,16 @@ import {
3
3
  config,
4
4
  copilotRuntimeNextJSAppRouterEndpoint,
5
5
  copilotRuntimeNextJSPagesRouterEndpoint
6
- } from "../chunk-PIUZJXE7.mjs";
6
+ } from "../chunk-UHUC2NVB.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "../chunk-4TED7LNT.mjs";
9
+ } from "../chunk-ISPCKW3E.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "../chunk-COJRNPCX.mjs";
12
+ } from "../chunk-TBPOHFA4.mjs";
13
13
  import {
14
14
  CopilotRuntime,
15
+ addCustomHeaderPlugin,
15
16
  buildSchema,
16
17
  copilotKitEndpoint,
17
18
  copilotRuntimeNodeHttpEndpoint,
@@ -20,7 +21,7 @@ import {
20
21
  getCommonConfig,
21
22
  langGraphPlatformEndpoint,
22
23
  resolveEndpointType
23
- } from "../chunk-P5J3JGOI.mjs";
24
+ } from "../chunk-U5OA7VEB.mjs";
24
25
  import {
25
26
  GoogleGenerativeAIAdapter,
26
27
  GroqAdapter,
@@ -28,11 +29,11 @@ import {
28
29
  OpenAIAdapter,
29
30
  OpenAIAssistantAdapter,
30
31
  UnifyAdapter
31
- } from "../chunk-S3KKBII4.mjs";
32
- import "../chunk-U3V2BCGI.mjs";
33
- import "../chunk-HNUNXFTW.mjs";
34
- import "../chunk-D2WLFQS6.mjs";
35
- import "../chunk-44O2JGUY.mjs";
32
+ } from "../chunk-OS5YD32G.mjs";
33
+ import "../chunk-5BIEM2UU.mjs";
34
+ import "../chunk-RTFJTJMA.mjs";
35
+ import "../chunk-2OZAGFV3.mjs";
36
+ import "../chunk-FHD4JECV.mjs";
36
37
  export {
37
38
  CopilotRuntime,
38
39
  GoogleGenerativeAIAdapter,
@@ -41,6 +42,7 @@ export {
41
42
  OpenAIAdapter,
42
43
  OpenAIAssistantAdapter,
43
44
  UnifyAdapter,
45
+ addCustomHeaderPlugin,
44
46
  buildSchema,
45
47
  config,
46
48
  copilotKitEndpoint,
@@ -1,5 +1,5 @@
1
- import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-3e7f1c7b.js';
2
- export { h as CommonConfig, b as CopilotRequestContextProperties, g as buildSchema, e as createContext, i as getCommonConfig } from '../../copilot-runtime-3e7f1c7b.js';
1
+ import { e as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-084fb9c7.js';
2
+ export { i as CommonConfig, d as CopilotRequestContextProperties, b as addCustomHeaderPlugin, h as buildSchema, g as createContext, j as getCommonConfig } from '../../copilot-runtime-084fb9c7.js';
3
3
  import * as graphql_yoga from 'graphql-yoga';
4
4
  import { YogaServerInstance } from 'graphql-yoga';
5
5
  export { copilotRuntimeNodeHttpEndpoint } from './node-http/index.js';
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.5.16-next.0",
47
+ version: "1.5.16-next.2",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -84,11 +84,11 @@ var require_package = __commonJS({
84
84
  "@anthropic-ai/sdk": "^0.27.3",
85
85
  "@copilotkit/shared": "workspace:*",
86
86
  "@graphql-yoga/plugin-defer-stream": "^3.3.1",
87
- "@langchain/community": "^0.0.53",
88
- "@langchain/core": "^0.3.13",
87
+ "@langchain/community": "^0.3.29",
88
+ "@langchain/core": "^0.3.38",
89
89
  "@langchain/google-gauth": "^0.1.0",
90
90
  "@langchain/langgraph-sdk": "^0.0.36",
91
- "@langchain/openai": "^0.0.28",
91
+ "@langchain/openai": "^0.4.2",
92
92
  "class-transformer": "^0.5.1",
93
93
  express: "^4.19.2",
94
94
  graphql: "^16.8.1",
@@ -124,6 +124,7 @@ var require_package = __commonJS({
124
124
  // src/lib/integrations/index.ts
125
125
  var integrations_exports = {};
126
126
  __export(integrations_exports, {
127
+ addCustomHeaderPlugin: () => addCustomHeaderPlugin,
127
128
  buildSchema: () => buildSchema,
128
129
  config: () => config,
129
130
  copilotRuntimeNestEndpoint: () => copilotRuntimeNestEndpoint,
@@ -2050,7 +2051,7 @@ var CopilotResolver = class {
2050
2051
  type: event.type,
2051
2052
  name: event.name,
2052
2053
  data: {
2053
- value: typeof event.data.value === "string" ? event.data.value : JSON.stringify(event.data.value),
2054
+ value: event.data.value,
2054
2055
  messages: event.data.messages.map((message) => {
2055
2056
  if (message.type === "TextMessage" || "content" in message && "role" in message) {
2056
2057
  return (0, import_class_transformer2.plainToInstance)(TextMessage, {
@@ -2561,7 +2562,13 @@ StateResolver = _ts_decorate22([
2561
2562
  ], StateResolver);
2562
2563
 
2563
2564
  // src/lib/integrations/shared.ts
2565
+ var packageJson2 = __toESM(require_package());
2564
2566
  var logger = createLogger();
2567
+ var addCustomHeaderPlugin = {
2568
+ onResponse({ response }) {
2569
+ response.headers.set("X-CopilotKit-Runtime-Version", packageJson2.version);
2570
+ }
2571
+ };
2565
2572
  async function createContext(initialContext, copilotKitContext, contextLogger, properties = {}) {
2566
2573
  logger.debug({
2567
2574
  copilotKitContext
@@ -2627,7 +2634,8 @@ function getCommonConfig(options) {
2627
2634
  }),
2628
2635
  schema: buildSchema(),
2629
2636
  plugins: [
2630
- (0, import_plugin_defer_stream.useDeferStream)()
2637
+ (0, import_plugin_defer_stream.useDeferStream)(),
2638
+ addCustomHeaderPlugin
2631
2639
  ],
2632
2640
  context: (ctx) => createContext(ctx, options, contextLogger, options.properties)
2633
2641
  };
@@ -2750,6 +2758,7 @@ function copilotRuntimeNestEndpoint(options) {
2750
2758
  __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
2751
2759
  // Annotate the CommonJS export names for ESM import in node:
2752
2760
  0 && (module.exports = {
2761
+ addCustomHeaderPlugin,
2753
2762
  buildSchema,
2754
2763
  config,
2755
2764
  copilotRuntimeNestEndpoint,