@copilotkit/runtime 1.9.3 → 1.10.0-next.1

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 (34) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{chunk-YKUWJR33.mjs → chunk-5OSQ6CM5.mjs} +2 -2
  3. package/dist/{chunk-TPT4AKCH.mjs → chunk-7WC4OMOL.mjs} +2 -2
  4. package/dist/{chunk-27ICMTNV.mjs → chunk-NV4PTNDU.mjs} +2 -2
  5. package/dist/{chunk-DC55PN5M.mjs → chunk-VOCP3OKE.mjs} +2 -2
  6. package/dist/{chunk-IWD3ZNTV.mjs → chunk-YBAPVMN4.mjs} +9 -5
  7. package/dist/chunk-YBAPVMN4.mjs.map +1 -0
  8. package/dist/index.js +8 -4
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +5 -5
  11. package/dist/lib/index.js +8 -4
  12. package/dist/lib/index.js.map +1 -1
  13. package/dist/lib/index.mjs +5 -5
  14. package/dist/lib/integrations/index.js +1 -1
  15. package/dist/lib/integrations/index.js.map +1 -1
  16. package/dist/lib/integrations/index.mjs +4 -4
  17. package/dist/lib/integrations/nest/index.js +1 -1
  18. package/dist/lib/integrations/nest/index.js.map +1 -1
  19. package/dist/lib/integrations/nest/index.mjs +2 -2
  20. package/dist/lib/integrations/node-express/index.js +1 -1
  21. package/dist/lib/integrations/node-express/index.js.map +1 -1
  22. package/dist/lib/integrations/node-express/index.mjs +2 -2
  23. package/dist/lib/integrations/node-http/index.js +1 -1
  24. package/dist/lib/integrations/node-http/index.js.map +1 -1
  25. package/dist/lib/integrations/node-http/index.mjs +1 -1
  26. package/package.json +4 -4
  27. package/src/lib/runtime/agui-action.ts +5 -0
  28. package/src/lib/runtime/remote-actions.ts +1 -0
  29. package/src/lib/streaming.ts +1 -0
  30. package/dist/chunk-IWD3ZNTV.mjs.map +0 -1
  31. /package/dist/{chunk-YKUWJR33.mjs.map → chunk-5OSQ6CM5.mjs.map} +0 -0
  32. /package/dist/{chunk-TPT4AKCH.mjs.map → chunk-7WC4OMOL.mjs.map} +0 -0
  33. /package/dist/{chunk-27ICMTNV.mjs.map → chunk-NV4PTNDU.mjs.map} +0 -0
  34. /package/dist/{chunk-DC55PN5M.mjs.map → chunk-VOCP3OKE.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.10.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1abcecf: - fix: add graphqlContext to constructAGUIRemoteAction for enhanced agent properties
8
+
9
+ - Updated constructAGUIRemoteAction to accept graphqlContext, allowing forwarding of properties like Authorization token to the agent.
10
+ - Modified setupRemoteActions to include graphqlContext in the parameters.
11
+ - @copilotkit/shared@1.10.0-next.1
12
+
13
+ ## 1.10.0-next.0
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [8674da1]
18
+ - @copilotkit/shared@1.10.0-next.0
19
+
3
20
  ## 1.9.3
4
21
 
5
22
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LangGraphEventTypes
3
- } from "./chunk-IWD3ZNTV.mjs";
3
+ } from "./chunk-YBAPVMN4.mjs";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-FHD4JECV.mjs";
@@ -156,4 +156,4 @@ export {
156
156
  CustomEventNames,
157
157
  LangGraphAgent
158
158
  };
159
- //# sourceMappingURL=chunk-YKUWJR33.mjs.map
159
+ //# sourceMappingURL=chunk-5OSQ6CM5.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  getCommonConfig,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-IWD3ZNTV.mjs";
5
+ } from "./chunk-YBAPVMN4.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -77,4 +77,4 @@ export {
77
77
  config,
78
78
  copilotRuntimeNextJSPagesRouterEndpoint
79
79
  };
80
- //# sourceMappingURL=chunk-TPT4AKCH.mjs.map
80
+ //# sourceMappingURL=chunk-7WC4OMOL.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-IWD3ZNTV.mjs";
5
+ } from "./chunk-YBAPVMN4.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-27ICMTNV.mjs.map
25
+ //# sourceMappingURL=chunk-NV4PTNDU.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-IWD3ZNTV.mjs";
5
+ } from "./chunk-YBAPVMN4.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
22
22
  export {
23
23
  copilotRuntimeNestEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-DC55PN5M.mjs.map
25
+ //# sourceMappingURL=chunk-VOCP3OKE.mjs.map
@@ -40,7 +40,7 @@ var require_package = __commonJS({
40
40
  publishConfig: {
41
41
  access: "public"
42
42
  },
43
- version: "1.9.3",
43
+ version: "1.10.0-next.1",
44
44
  sideEffects: false,
45
45
  main: "./dist/index.js",
46
46
  module: "./dist/index.mjs",
@@ -1859,6 +1859,7 @@ function convertStreamingErrorToStructured(error) {
1859
1859
  var _a, _b, _c, _d, _e, _f, _g;
1860
1860
  let helpfulMessage = generateHelpfulErrorMessage(error);
1861
1861
  if (((_a = error == null ? void 0 : error.message) == null ? void 0 : _a.includes("fetch failed")) || ((_b = error == null ? void 0 : error.message) == null ? void 0 : _b.includes("ECONNREFUSED")) || ((_c = error == null ? void 0 : error.message) == null ? void 0 : _c.includes("ENOTFOUND")) || ((_d = error == null ? void 0 : error.message) == null ? void 0 : _d.includes("ETIMEDOUT")) || ((_e = error == null ? void 0 : error.message) == null ? void 0 : _e.includes("terminated")) || ((_f = error == null ? void 0 : error.cause) == null ? void 0 : _f.code) === "UND_ERR_SOCKET" || ((_g = error == null ? void 0 : error.message) == null ? void 0 : _g.includes("other side closed")) || (error == null ? void 0 : error.code) === "UND_ERR_SOCKET") {
1862
+ console.log("error", error);
1862
1863
  return new CopilotKitLowLevelError({
1863
1864
  error: error instanceof Error ? error : new Error(String(error)),
1864
1865
  url: "streaming connection",
@@ -4371,7 +4372,7 @@ import { CopilotKitLowLevelError as CopilotKitLowLevelError6, ResolvedCopilotKit
4371
4372
 
4372
4373
  // src/lib/runtime/agui-action.ts
4373
4374
  import { parseJson as parseJson3 } from "@copilotkit/shared";
4374
- function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents, threadMetadata, nodeName }) {
4375
+ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents, threadMetadata, nodeName, graphqlContext }) {
4375
4376
  const action = {
4376
4377
  name: agent.agentId,
4377
4378
  description: agent.description,
@@ -4417,7 +4418,9 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
4417
4418
  } : {},
4418
4419
  ...nodeName ? {
4419
4420
  nodeName
4420
- } : {}
4421
+ } : {},
4422
+ // Forward properties from the graphql context to the agent, e.g Authorization token
4423
+ ...graphqlContext.properties
4421
4424
  };
4422
4425
  return agent.legacy_to_be_removed_runAgentBridged({
4423
4426
  tools,
@@ -4599,7 +4602,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
4599
4602
  agent,
4600
4603
  metaEvents,
4601
4604
  threadMetadata,
4602
- nodeName
4605
+ nodeName,
4606
+ graphqlContext
4603
4607
  }));
4604
4608
  }
4605
4609
  return result.flat();
@@ -5918,4 +5922,4 @@ export {
5918
5922
  getCommonConfig,
5919
5923
  copilotRuntimeNodeHttpEndpoint
5920
5924
  };
5921
- //# sourceMappingURL=chunk-IWD3ZNTV.mjs.map
5925
+ //# sourceMappingURL=chunk-YBAPVMN4.mjs.map