@copilotkit/runtime 1.4.0-pre-1-4-0.12 → 1.4.0-pre-1-4-0.13

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 (42) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/{chunk-JFLWUR62.mjs → chunk-AQBZWBJD.mjs} +2 -2
  3. package/dist/{chunk-JFIBAURX.mjs → chunk-CBZV4PPM.mjs} +2 -2
  4. package/dist/{chunk-YZ3VKKSM.mjs → chunk-NKGWZWKJ.mjs} +18 -18
  5. package/dist/chunk-NKGWZWKJ.mjs.map +1 -0
  6. package/dist/{chunk-TZ7RGXQ6.mjs → chunk-P4EZLCB6.mjs} +2 -2
  7. package/dist/{copilot-runtime-dbe5fa02.d.ts → copilot-runtime-d9ef5d8c.d.ts} +7 -7
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.js +19 -19
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +6 -6
  12. package/dist/lib/index.d.ts +1 -1
  13. package/dist/lib/index.js +19 -19
  14. package/dist/lib/index.js.map +1 -1
  15. package/dist/lib/index.mjs +6 -6
  16. package/dist/lib/integrations/index.d.ts +2 -2
  17. package/dist/lib/integrations/index.js +4 -4
  18. package/dist/lib/integrations/index.js.map +1 -1
  19. package/dist/lib/integrations/index.mjs +4 -4
  20. package/dist/lib/integrations/nest/index.d.ts +1 -1
  21. package/dist/lib/integrations/nest/index.js +4 -4
  22. package/dist/lib/integrations/nest/index.js.map +1 -1
  23. package/dist/lib/integrations/nest/index.mjs +2 -2
  24. package/dist/lib/integrations/node-express/index.d.ts +1 -1
  25. package/dist/lib/integrations/node-express/index.js +4 -4
  26. package/dist/lib/integrations/node-express/index.js.map +1 -1
  27. package/dist/lib/integrations/node-express/index.mjs +2 -2
  28. package/dist/lib/integrations/node-http/index.d.ts +1 -1
  29. package/dist/lib/integrations/node-http/index.js +4 -4
  30. package/dist/lib/integrations/node-http/index.js.map +1 -1
  31. package/dist/lib/integrations/node-http/index.mjs +1 -1
  32. package/package.json +4 -4
  33. package/src/agents/langgraph/event-source.ts +2 -2
  34. package/src/lib/runtime/copilot-runtime.ts +6 -6
  35. package/src/lib/runtime/remote-action-constructors.ts +7 -7
  36. package/src/lib/runtime/remote-actions.ts +9 -9
  37. package/src/lib/runtime/{remote-lg-cloud-action.ts → remote-lg-action.ts} +18 -18
  38. package/src/lib/telemetry-client.ts +3 -3
  39. package/dist/chunk-YZ3VKKSM.mjs.map +0 -1
  40. /package/dist/{chunk-JFLWUR62.mjs.map → chunk-AQBZWBJD.mjs.map} +0 -0
  41. /package/dist/{chunk-JFIBAURX.mjs.map → chunk-CBZV4PPM.mjs.map} +0 -0
  42. /package/dist/{chunk-TZ7RGXQ6.mjs.map → chunk-P4EZLCB6.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.4.0-pre-1-4-0.13
4
+
5
+ ### Minor Changes
6
+
7
+ - lgc & lgjs alpha
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @copilotkit/shared@1.4.0-pre-1-4-0.13
13
+
3
14
  ## 1.4.0-pre-1-4-0.12
4
15
 
5
16
  ### Minor Changes
@@ -2,7 +2,7 @@ import {
2
2
  getCommonConfig,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-YZ3VKKSM.mjs";
5
+ } from "./chunk-NKGWZWKJ.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-44O2JGUY.mjs";
@@ -77,4 +77,4 @@ export {
77
77
  config,
78
78
  copilotRuntimeNextJSPagesRouterEndpoint
79
79
  };
80
- //# sourceMappingURL=chunk-JFLWUR62.mjs.map
80
+ //# sourceMappingURL=chunk-AQBZWBJD.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-YZ3VKKSM.mjs";
5
+ } from "./chunk-NKGWZWKJ.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-44O2JGUY.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-JFIBAURX.mjs.map
25
+ //# sourceMappingURL=chunk-CBZV4PPM.mjs.map
@@ -37,7 +37,7 @@ var require_package = __commonJS({
37
37
  publishConfig: {
38
38
  access: "public"
39
39
  },
40
- version: "1.4.0-pre-1-4-0.12",
40
+ version: "1.4.0-pre-1-4-0.13",
41
41
  sideEffects: false,
42
42
  main: "./dist/index.js",
43
43
  module: "./dist/index.mjs",
@@ -1087,7 +1087,7 @@ var RemoteLangGraphEventSource = class {
1087
1087
  acc.content = null;
1088
1088
  }
1089
1089
  const toolCallChunks = (
1090
- // @ts-expect-error -- LangGraph Cloud implementation stores data outside of kwargs
1090
+ // @ts-expect-error -- LangGraph Platform implementation stores data outside of kwargs
1091
1091
  ((_h = (_g = (_f = event.data) == null ? void 0 : _f.chunk) == null ? void 0 : _g.kwargs) == null ? void 0 : _h.tool_call_chunks) ?? ((_j = (_i = event.data) == null ? void 0 : _i.chunk) == null ? void 0 : _j.tool_call_chunks)
1092
1092
  );
1093
1093
  const toolCallMessageId = ((_m = (_l = (_k = event.data) == null ? void 0 : _k.chunk) == null ? void 0 : _l.kwargs) == null ? void 0 : _m.id) ?? ((_o = (_n = event.data) == null ? void 0 : _n.chunk) == null ? void 0 : _o.id);
@@ -1277,7 +1277,7 @@ var RemoteLangGraphEventSource = class {
1277
1277
  };
1278
1278
  __name(RemoteLangGraphEventSource, "RemoteLangGraphEventSource");
1279
1279
 
1280
- // src/lib/runtime/remote-lg-cloud-action.ts
1280
+ // src/lib/runtime/remote-lg-action.ts
1281
1281
  import { Client } from "@langchain/langgraph-sdk";
1282
1282
  import { createHash, randomUUID } from "crypto";
1283
1283
  import { parse as parsePartialJson } from "partial-json";
@@ -1344,7 +1344,7 @@ async function streamEvents(controller, args) {
1344
1344
  if (!assistantId) {
1345
1345
  console.error(`
1346
1346
  No agent found for the agent name specified in CopilotKit provider
1347
- Please check your available agents or provide an agent ID in the LangGraph Cloud endpoint definition.
1347
+ Please check your available agents or provide an agent ID in the LangGraph Platform endpoint definition.
1348
1348
 
1349
1349
 
1350
1350
  These are the available agents: [${assistants.map((a) => `${a.name} (ID: ${a.assistant_id})`).join(", ")}]
@@ -1716,10 +1716,10 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
1716
1716
  var _a;
1717
1717
  logger2.debug({
1718
1718
  actionName: agent.name
1719
- }, "Executing LangGraph Cloud agent");
1719
+ }, "Executing LangGraph Platform agent");
1720
1720
  telemetry_client_default.capture("oss.runtime.remote_action_executed", {
1721
1721
  agentExecution: true,
1722
- type: "langgraph-cloud",
1722
+ type: "langgraph-platform",
1723
1723
  agentsAmount: endpoint.agents.length,
1724
1724
  hashedLgcKey: createHash2("sha256").update(endpoint.langsmithApiKey).digest("hex")
1725
1725
  });
@@ -1755,8 +1755,8 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
1755
1755
  url: endpoint.deploymentUrl,
1756
1756
  status: 500,
1757
1757
  body: error.message
1758
- }, "Failed to execute LangGraph Cloud agent");
1759
- throw new Error("Failed to execute LangGraph Cloud agent");
1758
+ }, "Failed to execute LangGraph Platform agent");
1759
+ throw new Error("Failed to execute LangGraph Platform agent");
1760
1760
  }
1761
1761
  }
1762
1762
  }));
@@ -1938,7 +1938,7 @@ __name(createHeaders, "createHeaders");
1938
1938
  var EndpointType;
1939
1939
  (function(EndpointType2) {
1940
1940
  EndpointType2["CopilotKit"] = "copilotKit";
1941
- EndpointType2["LangGraphCloud"] = "langgraph-cloud";
1941
+ EndpointType2["LangGraphPlatform"] = "langgraph-platform";
1942
1942
  })(EndpointType || (EndpointType = {}));
1943
1943
  function isLangGraphAgentAction(action) {
1944
1944
  if (!action) {
@@ -1996,13 +1996,13 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
1996
1996
  remoteEndpointDefinitions
1997
1997
  }, "Fetching from remote endpoints");
1998
1998
  const filtered = remoteEndpointDefinitions.filter((value, index, self) => {
1999
- if (value.type === "langgraph-cloud") {
1999
+ if (value.type === "langgraph-platform") {
2000
2000
  return value;
2001
2001
  }
2002
2002
  return index === self.findIndex((t) => t.url === value.url);
2003
2003
  });
2004
2004
  const result = await Promise.all(filtered.map(async (endpoint) => {
2005
- if (endpoint.type === "langgraph-cloud") {
2005
+ if (endpoint.type === "langgraph-platform") {
2006
2006
  return constructLGCRemoteAction({
2007
2007
  endpoint,
2008
2008
  messages,
@@ -2299,17 +2299,17 @@ function copilotKitEndpoint(config) {
2299
2299
  };
2300
2300
  }
2301
2301
  __name(copilotKitEndpoint, "copilotKitEndpoint");
2302
- function langGraphCloudEndpoint(config) {
2302
+ function langGraphPlatformEndpoint(config) {
2303
2303
  return {
2304
2304
  ...config,
2305
- type: EndpointType.LangGraphCloud
2305
+ type: EndpointType.LangGraphPlatform
2306
2306
  };
2307
2307
  }
2308
- __name(langGraphCloudEndpoint, "langGraphCloudEndpoint");
2308
+ __name(langGraphPlatformEndpoint, "langGraphPlatformEndpoint");
2309
2309
  function resolveEndpointType(endpoint) {
2310
2310
  if (!endpoint.type) {
2311
2311
  if ("langsmithApiKey" in endpoint && "deploymentUrl" in endpoint && "agents" in endpoint) {
2312
- return EndpointType.LangGraphCloud;
2312
+ return EndpointType.LangGraphPlatform;
2313
2313
  } else {
2314
2314
  return EndpointType.CopilotKit;
2315
2315
  }
@@ -2339,7 +2339,7 @@ function getRuntimeInstanceTelemetryInfo(runtime) {
2339
2339
  ]
2340
2340
  };
2341
2341
  }
2342
- if (endpointType === EndpointType.LangGraphCloud) {
2342
+ if (endpointType === EndpointType.LangGraphPlatform) {
2343
2343
  const ep = endpoint;
2344
2344
  info = {
2345
2345
  ...info,
@@ -3160,11 +3160,11 @@ export {
3160
3160
  CopilotRuntime,
3161
3161
  flattenToolCallsNoDuplicates,
3162
3162
  copilotKitEndpoint,
3163
- langGraphCloudEndpoint,
3163
+ langGraphPlatformEndpoint,
3164
3164
  resolveEndpointType,
3165
3165
  createContext,
3166
3166
  buildSchema,
3167
3167
  getCommonConfig,
3168
3168
  copilotRuntimeNodeHttpEndpoint
3169
3169
  };
3170
- //# sourceMappingURL=chunk-YZ3VKKSM.mjs.map
3170
+ //# sourceMappingURL=chunk-NKGWZWKJ.mjs.map