@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/dist/index.js CHANGED
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.4.0-pre-1-4-0.12",
47
+ version: "1.4.0-pre-1-4-0.13",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -147,7 +147,7 @@ __export(src_exports, {
147
147
  createContext: () => createContext,
148
148
  flattenToolCallsNoDuplicates: () => flattenToolCallsNoDuplicates,
149
149
  getCommonConfig: () => getCommonConfig,
150
- langGraphCloudEndpoint: () => langGraphCloudEndpoint,
150
+ langGraphPlatformEndpoint: () => langGraphPlatformEndpoint,
151
151
  resolveEndpointType: () => resolveEndpointType
152
152
  });
153
153
  module.exports = __toCommonJS(src_exports);
@@ -1562,7 +1562,7 @@ var RemoteLangGraphEventSource = class {
1562
1562
  acc.content = null;
1563
1563
  }
1564
1564
  const toolCallChunks = (
1565
- // @ts-expect-error -- LangGraph Cloud implementation stores data outside of kwargs
1565
+ // @ts-expect-error -- LangGraph Platform implementation stores data outside of kwargs
1566
1566
  ((_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)
1567
1567
  );
1568
1568
  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);
@@ -1752,7 +1752,7 @@ var RemoteLangGraphEventSource = class {
1752
1752
  };
1753
1753
  __name(RemoteLangGraphEventSource, "RemoteLangGraphEventSource");
1754
1754
 
1755
- // src/lib/runtime/remote-lg-cloud-action.ts
1755
+ // src/lib/runtime/remote-lg-action.ts
1756
1756
  var import_langgraph_sdk = require("@langchain/langgraph-sdk");
1757
1757
  var import_node_crypto = require("crypto");
1758
1758
  var import_partial_json = require("partial-json");
@@ -1793,7 +1793,7 @@ var CopilotRequestType;
1793
1793
  description: "The type of Copilot request"
1794
1794
  });
1795
1795
 
1796
- // src/lib/runtime/remote-lg-cloud-action.ts
1796
+ // src/lib/runtime/remote-lg-action.ts
1797
1797
  async function execute(args) {
1798
1798
  return new ReadableStream({
1799
1799
  async start(controller) {
@@ -1857,7 +1857,7 @@ async function streamEvents(controller, args) {
1857
1857
  if (!assistantId) {
1858
1858
  console.error(`
1859
1859
  No agent found for the agent name specified in CopilotKit provider
1860
- Please check your available agents or provide an agent ID in the LangGraph Cloud endpoint definition.
1860
+ Please check your available agents or provide an agent ID in the LangGraph Platform endpoint definition.
1861
1861
 
1862
1862
 
1863
1863
  These are the available agents: [${assistants.map((a) => `${a.name} (ID: ${a.assistant_id})`).join(", ")}]
@@ -2229,10 +2229,10 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
2229
2229
  var _a;
2230
2230
  logger2.debug({
2231
2231
  actionName: agent.name
2232
- }, "Executing LangGraph Cloud agent");
2232
+ }, "Executing LangGraph Platform agent");
2233
2233
  telemetry_client_default.capture("oss.runtime.remote_action_executed", {
2234
2234
  agentExecution: true,
2235
- type: "langgraph-cloud",
2235
+ type: "langgraph-platform",
2236
2236
  agentsAmount: endpoint.agents.length,
2237
2237
  hashedLgcKey: (0, import_node_crypto2.createHash)("sha256").update(endpoint.langsmithApiKey).digest("hex")
2238
2238
  });
@@ -2268,8 +2268,8 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
2268
2268
  url: endpoint.deploymentUrl,
2269
2269
  status: 500,
2270
2270
  body: error.message
2271
- }, "Failed to execute LangGraph Cloud agent");
2272
- throw new Error("Failed to execute LangGraph Cloud agent");
2271
+ }, "Failed to execute LangGraph Platform agent");
2272
+ throw new Error("Failed to execute LangGraph Platform agent");
2273
2273
  }
2274
2274
  }
2275
2275
  }));
@@ -2451,7 +2451,7 @@ __name(createHeaders, "createHeaders");
2451
2451
  var EndpointType;
2452
2452
  (function(EndpointType2) {
2453
2453
  EndpointType2["CopilotKit"] = "copilotKit";
2454
- EndpointType2["LangGraphCloud"] = "langgraph-cloud";
2454
+ EndpointType2["LangGraphPlatform"] = "langgraph-platform";
2455
2455
  })(EndpointType || (EndpointType = {}));
2456
2456
  function isLangGraphAgentAction(action) {
2457
2457
  if (!action) {
@@ -2509,13 +2509,13 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
2509
2509
  remoteEndpointDefinitions
2510
2510
  }, "Fetching from remote endpoints");
2511
2511
  const filtered = remoteEndpointDefinitions.filter((value, index, self) => {
2512
- if (value.type === "langgraph-cloud") {
2512
+ if (value.type === "langgraph-platform") {
2513
2513
  return value;
2514
2514
  }
2515
2515
  return index === self.findIndex((t) => t.url === value.url);
2516
2516
  });
2517
2517
  const result = await Promise.all(filtered.map(async (endpoint) => {
2518
- if (endpoint.type === "langgraph-cloud") {
2518
+ if (endpoint.type === "langgraph-platform") {
2519
2519
  return constructLGCRemoteAction({
2520
2520
  endpoint,
2521
2521
  messages,
@@ -2576,7 +2576,7 @@ function getRuntimeInstanceTelemetryInfo(runtime) {
2576
2576
  ]
2577
2577
  };
2578
2578
  }
2579
- if (endpointType === EndpointType.LangGraphCloud) {
2579
+ if (endpointType === EndpointType.LangGraphPlatform) {
2580
2580
  const ep = endpoint;
2581
2581
  info = {
2582
2582
  ...info,
@@ -3160,17 +3160,17 @@ function copilotKitEndpoint(config2) {
3160
3160
  };
3161
3161
  }
3162
3162
  __name(copilotKitEndpoint, "copilotKitEndpoint");
3163
- function langGraphCloudEndpoint(config2) {
3163
+ function langGraphPlatformEndpoint(config2) {
3164
3164
  return {
3165
3165
  ...config2,
3166
- type: EndpointType.LangGraphCloud
3166
+ type: EndpointType.LangGraphPlatform
3167
3167
  };
3168
3168
  }
3169
- __name(langGraphCloudEndpoint, "langGraphCloudEndpoint");
3169
+ __name(langGraphPlatformEndpoint, "langGraphPlatformEndpoint");
3170
3170
  function resolveEndpointType(endpoint) {
3171
3171
  if (!endpoint.type) {
3172
3172
  if ("langsmithApiKey" in endpoint && "deploymentUrl" in endpoint && "agents" in endpoint) {
3173
- return EndpointType.LangGraphCloud;
3173
+ return EndpointType.LangGraphPlatform;
3174
3174
  } else {
3175
3175
  return EndpointType.CopilotKit;
3176
3176
  }
@@ -4869,7 +4869,7 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
4869
4869
  createContext,
4870
4870
  flattenToolCallsNoDuplicates,
4871
4871
  getCommonConfig,
4872
- langGraphCloudEndpoint,
4872
+ langGraphPlatformEndpoint,
4873
4873
  resolveEndpointType
4874
4874
  });
4875
4875
  //# sourceMappingURL=index.js.map