@copilotkit/runtime 1.9.2-next.14 → 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 +13 -0
  2. package/dist/{chunk-OXUJLGHK.mjs → chunk-4ODT32DV.mjs} +2 -2
  3. package/dist/{chunk-J7IKWG2M.mjs → chunk-7F4BIRQF.mjs} +17 -9
  4. package/dist/chunk-7F4BIRQF.mjs.map +1 -0
  5. package/dist/{chunk-LHHL56Z2.mjs → chunk-BCDAWNNK.mjs} +2 -2
  6. package/dist/{chunk-55VUNE6C.mjs → chunk-R22NGLLV.mjs} +2 -2
  7. package/dist/{chunk-LLFNFIOQ.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-J7IKWG2M.mjs.map +0 -1
  30. /package/dist/{chunk-OXUJLGHK.mjs.map → chunk-4ODT32DV.mjs.map} +0 -0
  31. /package/dist/{chunk-LHHL56Z2.mjs.map → chunk-BCDAWNNK.mjs.map} +0 -0
  32. /package/dist/{chunk-55VUNE6C.mjs.map → chunk-R22NGLLV.mjs.map} +0 -0
  33. /package/dist/{chunk-LLFNFIOQ.mjs.map → chunk-RBG2A675.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  copilotRuntimeNodeHttpEndpoint
3
- } from "../../../chunk-J7IKWG2M.mjs";
3
+ } from "../../../chunk-7F4BIRQF.mjs";
4
4
  import "../../../chunk-SHBDMA63.mjs";
5
5
  import "../../../chunk-JTFQ5GIL.mjs";
6
6
  import "../../../chunk-XWBDEXDA.mjs";
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.9.2-next.14",
12
+ "version": "1.9.2-next.16",
13
13
  "sideEffects": false,
14
14
  "main": "./dist/index.js",
15
15
  "module": "./dist/index.mjs",
@@ -66,7 +66,7 @@
66
66
  "rxjs": "7.8.1",
67
67
  "type-graphql": "2.0.0-rc.1",
68
68
  "zod": "^3.23.3",
69
- "@copilotkit/shared": "1.9.2-next.14"
69
+ "@copilotkit/shared": "1.9.2-next.16"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@ag-ui/client": ">=0.0.28",
@@ -22,12 +22,14 @@ export function constructAGUIRemoteAction({
22
22
  agentStates,
23
23
  agent,
24
24
  metaEvents,
25
+ threadMetadata,
25
26
  }: {
26
27
  logger: Logger;
27
28
  messages: Message[];
28
29
  agentStates?: AgentStateInput[];
29
30
  agent: AbstractAgent;
30
31
  metaEvents?: MetaEventInput[];
32
+ threadMetadata?: Record<string, any>;
31
33
  }) {
32
34
  const action = {
33
35
  name: agent.agentId,
@@ -67,9 +69,10 @@ export function constructAGUIRemoteAction({
67
69
  };
68
70
  });
69
71
 
70
- const forwardedProps = metaEvents.length
71
- ? { command: { resume: metaEvents[0]?.response } }
72
- : undefined;
72
+ const forwardedProps = {
73
+ ...(metaEvents?.length ? { command: { resume: metaEvents[0]?.response } } : {}),
74
+ ...(threadMetadata ? { threadMetadata } : {}),
75
+ };
73
76
 
74
77
  return agent.legacy_to_be_removed_runAgentBridged({
75
78
  tools,
@@ -143,6 +143,8 @@ export async function setupRemoteActions({
143
143
  const logger = graphqlContext.logger.child({ component: "remote-actions.fetchRemoteActions" });
144
144
  logger.debug({ remoteEndpointDefinitions }, "Fetching from remote endpoints");
145
145
 
146
+ const threadMetadata = (graphqlContext.properties?.threadMetadata as Record<string, any>) || {};
147
+
146
148
  // Remove duplicates of remoteEndpointDefinitions.url
147
149
  const filtered = remoteEndpointDefinitions.filter((value, index, self) => {
148
150
  if (value.type === EndpointType.LangGraphPlatform) {
@@ -204,6 +206,7 @@ export async function setupRemoteActions({
204
206
  agentStates,
205
207
  agent: agent,
206
208
  metaEvents,
209
+ threadMetadata,
207
210
  }),
208
211
  );
209
212
  }