@copilotkit/runtime 1.9.2-next.15 → 1.9.2-next.16

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 (33) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-SBSDOLSI.mjs → chunk-4ODT32DV.mjs} +2 -2
  3. package/dist/{chunk-SLTWS4D3.mjs → chunk-7F4BIRQF.mjs} +17 -9
  4. package/dist/chunk-7F4BIRQF.mjs.map +1 -0
  5. package/dist/{chunk-7ZBTD5PN.mjs → chunk-BCDAWNNK.mjs} +2 -2
  6. package/dist/{chunk-XJBX2ZN2.mjs → chunk-R22NGLLV.mjs} +2 -2
  7. package/dist/{chunk-WRTZZ52D.mjs → chunk-RBG2A675.mjs} +2 -2
  8. package/dist/index.js +16 -8
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +5 -5
  11. package/dist/lib/index.js +16 -8
  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 +2 -2
  27. package/src/lib/runtime/agui-action.ts +6 -3
  28. package/src/lib/runtime/remote-actions.ts +3 -0
  29. package/dist/chunk-SLTWS4D3.mjs.map +0 -1
  30. /package/dist/{chunk-SBSDOLSI.mjs.map → chunk-4ODT32DV.mjs.map} +0 -0
  31. /package/dist/{chunk-7ZBTD5PN.mjs.map → chunk-BCDAWNNK.mjs.map} +0 -0
  32. /package/dist/{chunk-XJBX2ZN2.mjs.map → chunk-R22NGLLV.mjs.map} +0 -0
  33. /package/dist/{chunk-WRTZZ52D.mjs.map → chunk-RBG2A675.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  CustomEventNames,
3
3
  LangGraphAgent
4
- } from "./chunk-XJBX2ZN2.mjs";
4
+ } from "./chunk-R22NGLLV.mjs";
5
5
  import {
6
6
  config,
7
7
  copilotRuntimeNextJSAppRouterEndpoint,
8
8
  copilotRuntimeNextJSPagesRouterEndpoint
9
- } from "./chunk-WRTZZ52D.mjs";
9
+ } from "./chunk-RBG2A675.mjs";
10
10
  import {
11
11
  copilotRuntimeNestEndpoint
12
- } from "./chunk-7ZBTD5PN.mjs";
12
+ } from "./chunk-BCDAWNNK.mjs";
13
13
  import {
14
14
  copilotRuntimeNodeExpressEndpoint
15
- } from "./chunk-SBSDOLSI.mjs";
15
+ } from "./chunk-4ODT32DV.mjs";
16
16
  import {
17
17
  CopilotRuntime,
18
18
  addCustomHeaderPlugin,
@@ -28,7 +28,7 @@ import {
28
28
  getCommonConfig,
29
29
  langGraphPlatformEndpoint,
30
30
  resolveEndpointType
31
- } from "./chunk-SLTWS4D3.mjs";
31
+ } from "./chunk-7F4BIRQF.mjs";
32
32
  import "./chunk-SHBDMA63.mjs";
33
33
  import {
34
34
  AnthropicAdapter,
package/dist/lib/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.9.2-next.15",
47
+ version: "1.9.2-next.16",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -5818,7 +5818,7 @@ var import_shared23 = require("@copilotkit/shared");
5818
5818
 
5819
5819
  // src/lib/runtime/agui-action.ts
5820
5820
  var import_shared21 = require("@copilotkit/shared");
5821
- function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents }) {
5821
+ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents, threadMetadata }) {
5822
5822
  const action = {
5823
5823
  name: agent.agentId,
5824
5824
  description: agent.description,
@@ -5853,11 +5853,16 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
5853
5853
  parameters: JSON.parse(input.jsonSchema)
5854
5854
  };
5855
5855
  });
5856
- const forwardedProps = metaEvents.length ? {
5857
- command: {
5858
- resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
5859
- }
5860
- } : void 0;
5856
+ const forwardedProps = {
5857
+ ...(metaEvents == null ? void 0 : metaEvents.length) ? {
5858
+ command: {
5859
+ resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
5860
+ }
5861
+ } : {},
5862
+ ...threadMetadata ? {
5863
+ threadMetadata
5864
+ } : {}
5865
+ };
5861
5866
  return agent.legacy_to_be_removed_runAgentBridged({
5862
5867
  tools,
5863
5868
  forwardedProps
@@ -5972,12 +5977,14 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
5972
5977
  }
5973
5978
  __name(fetchRemoteInfo, "fetchRemoteInfo");
5974
5979
  async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents }) {
5980
+ var _a;
5975
5981
  const logger2 = graphqlContext.logger.child({
5976
5982
  component: "remote-actions.fetchRemoteActions"
5977
5983
  });
5978
5984
  logger2.debug({
5979
5985
  remoteEndpointDefinitions
5980
5986
  }, "Fetching from remote endpoints");
5987
+ const threadMetadata = ((_a = graphqlContext.properties) == null ? void 0 : _a.threadMetadata) || {};
5981
5988
  const filtered = remoteEndpointDefinitions.filter((value, index, self) => {
5982
5989
  if (value.type === "langgraph-platform") {
5983
5990
  return value;
@@ -6034,7 +6041,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
6034
6041
  messages,
6035
6042
  agentStates,
6036
6043
  agent,
6037
- metaEvents
6044
+ metaEvents,
6045
+ threadMetadata
6038
6046
  }));
6039
6047
  }
6040
6048
  return result.flat();