@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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.9.2-next.16
4
+
5
+ ### Patch Changes
6
+
7
+ - fe9009c: - feat(langgraph): new thread metadata
8
+ - @copilotkit/shared@1.9.2-next.16
9
+
3
10
  ## 1.9.2-next.15
4
11
 
5
12
  ### Patch Changes
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-SLTWS4D3.mjs";
5
+ } from "./chunk-7F4BIRQF.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-SBSDOLSI.mjs.map
25
+ //# sourceMappingURL=chunk-4ODT32DV.mjs.map
@@ -40,7 +40,7 @@ var require_package = __commonJS({
40
40
  publishConfig: {
41
41
  access: "public"
42
42
  },
43
- version: "1.9.2-next.15",
43
+ version: "1.9.2-next.16",
44
44
  sideEffects: false,
45
45
  main: "./dist/index.js",
46
46
  module: "./dist/index.mjs",
@@ -4302,7 +4302,7 @@ import { CopilotKitLowLevelError as CopilotKitLowLevelError6, ResolvedCopilotKit
4302
4302
 
4303
4303
  // src/lib/runtime/agui-action.ts
4304
4304
  import { parseJson as parseJson3 } from "@copilotkit/shared";
4305
- function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents }) {
4305
+ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents, threadMetadata }) {
4306
4306
  const action = {
4307
4307
  name: agent.agentId,
4308
4308
  description: agent.description,
@@ -4337,11 +4337,16 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
4337
4337
  parameters: JSON.parse(input.jsonSchema)
4338
4338
  };
4339
4339
  });
4340
- const forwardedProps = metaEvents.length ? {
4341
- command: {
4342
- resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
4343
- }
4344
- } : void 0;
4340
+ const forwardedProps = {
4341
+ ...(metaEvents == null ? void 0 : metaEvents.length) ? {
4342
+ command: {
4343
+ resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
4344
+ }
4345
+ } : {},
4346
+ ...threadMetadata ? {
4347
+ threadMetadata
4348
+ } : {}
4349
+ };
4345
4350
  return agent.legacy_to_be_removed_runAgentBridged({
4346
4351
  tools,
4347
4352
  forwardedProps
@@ -4456,12 +4461,14 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
4456
4461
  }
4457
4462
  __name(fetchRemoteInfo, "fetchRemoteInfo");
4458
4463
  async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents }) {
4464
+ var _a;
4459
4465
  const logger2 = graphqlContext.logger.child({
4460
4466
  component: "remote-actions.fetchRemoteActions"
4461
4467
  });
4462
4468
  logger2.debug({
4463
4469
  remoteEndpointDefinitions
4464
4470
  }, "Fetching from remote endpoints");
4471
+ const threadMetadata = ((_a = graphqlContext.properties) == null ? void 0 : _a.threadMetadata) || {};
4465
4472
  const filtered = remoteEndpointDefinitions.filter((value, index, self) => {
4466
4473
  if (value.type === "langgraph-platform") {
4467
4474
  return value;
@@ -4518,7 +4525,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
4518
4525
  messages,
4519
4526
  agentStates,
4520
4527
  agent,
4521
- metaEvents
4528
+ metaEvents,
4529
+ threadMetadata
4522
4530
  }));
4523
4531
  }
4524
4532
  return result.flat();
@@ -5811,4 +5819,4 @@ export {
5811
5819
  getCommonConfig,
5812
5820
  copilotRuntimeNodeHttpEndpoint
5813
5821
  };
5814
- //# sourceMappingURL=chunk-SLTWS4D3.mjs.map
5822
+ //# sourceMappingURL=chunk-7F4BIRQF.mjs.map