@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.mjs CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  config,
4
4
  copilotRuntimeNextJSAppRouterEndpoint,
5
5
  copilotRuntimeNextJSPagesRouterEndpoint
6
- } from "./chunk-JFLWUR62.mjs";
6
+ } from "./chunk-AQBZWBJD.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "./chunk-TZ7RGXQ6.mjs";
9
+ } from "./chunk-P4EZLCB6.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "./chunk-JFIBAURX.mjs";
12
+ } from "./chunk-CBZV4PPM.mjs";
13
13
  import {
14
14
  CopilotRuntime,
15
15
  buildSchema,
@@ -18,9 +18,9 @@ import {
18
18
  createContext,
19
19
  flattenToolCallsNoDuplicates,
20
20
  getCommonConfig,
21
- langGraphCloudEndpoint,
21
+ langGraphPlatformEndpoint,
22
22
  resolveEndpointType
23
- } from "./chunk-YZ3VKKSM.mjs";
23
+ } from "./chunk-NKGWZWKJ.mjs";
24
24
  import {
25
25
  AnthropicAdapter,
26
26
  GoogleGenerativeAIAdapter,
@@ -66,7 +66,7 @@ export {
66
66
  createContext,
67
67
  flattenToolCallsNoDuplicates,
68
68
  getCommonConfig,
69
- langGraphCloudEndpoint,
69
+ langGraphPlatformEndpoint,
70
70
  resolveEndpointType
71
71
  };
72
72
  //# sourceMappingURL=index.mjs.map
@@ -1,4 +1,4 @@
1
- export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphCloudEndpoint, r as resolveEndpointType } from '../copilot-runtime-dbe5fa02.js';
1
+ export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from '../copilot-runtime-d9ef5d8c.js';
2
2
  export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from '../groq-adapter-192d2413.js';
3
3
  export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './integrations/index.js';
4
4
  export { copilotRuntimeNodeHttpEndpoint } from './integrations/node-http/index.js';
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.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",
@@ -142,7 +142,7 @@ __export(lib_exports, {
142
142
  createContext: () => createContext,
143
143
  flattenToolCallsNoDuplicates: () => flattenToolCallsNoDuplicates,
144
144
  getCommonConfig: () => getCommonConfig,
145
- langGraphCloudEndpoint: () => langGraphCloudEndpoint,
145
+ langGraphPlatformEndpoint: () => langGraphPlatformEndpoint,
146
146
  resolveEndpointType: () => resolveEndpointType
147
147
  });
148
148
  module.exports = __toCommonJS(lib_exports);
@@ -1277,7 +1277,7 @@ var RemoteLangGraphEventSource = class {
1277
1277
  acc.content = null;
1278
1278
  }
1279
1279
  const toolCallChunks = (
1280
- // @ts-expect-error -- LangGraph Cloud implementation stores data outside of kwargs
1280
+ // @ts-expect-error -- LangGraph Platform implementation stores data outside of kwargs
1281
1281
  ((_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)
1282
1282
  );
1283
1283
  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);
@@ -1467,7 +1467,7 @@ var RemoteLangGraphEventSource = class {
1467
1467
  };
1468
1468
  __name(RemoteLangGraphEventSource, "RemoteLangGraphEventSource");
1469
1469
 
1470
- // src/lib/runtime/remote-lg-cloud-action.ts
1470
+ // src/lib/runtime/remote-lg-action.ts
1471
1471
  var import_langgraph_sdk = require("@langchain/langgraph-sdk");
1472
1472
  var import_node_crypto = require("crypto");
1473
1473
  var import_partial_json = require("partial-json");
@@ -1508,7 +1508,7 @@ var CopilotRequestType;
1508
1508
  description: "The type of Copilot request"
1509
1509
  });
1510
1510
 
1511
- // src/lib/runtime/remote-lg-cloud-action.ts
1511
+ // src/lib/runtime/remote-lg-action.ts
1512
1512
  async function execute(args) {
1513
1513
  return new ReadableStream({
1514
1514
  async start(controller) {
@@ -1572,7 +1572,7 @@ async function streamEvents(controller, args) {
1572
1572
  if (!assistantId) {
1573
1573
  console.error(`
1574
1574
  No agent found for the agent name specified in CopilotKit provider
1575
- Please check your available agents or provide an agent ID in the LangGraph Cloud endpoint definition.
1575
+ Please check your available agents or provide an agent ID in the LangGraph Platform endpoint definition.
1576
1576
 
1577
1577
 
1578
1578
  These are the available agents: [${assistants.map((a) => `${a.name} (ID: ${a.assistant_id})`).join(", ")}]
@@ -1944,10 +1944,10 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
1944
1944
  var _a;
1945
1945
  logger2.debug({
1946
1946
  actionName: agent.name
1947
- }, "Executing LangGraph Cloud agent");
1947
+ }, "Executing LangGraph Platform agent");
1948
1948
  telemetry_client_default.capture("oss.runtime.remote_action_executed", {
1949
1949
  agentExecution: true,
1950
- type: "langgraph-cloud",
1950
+ type: "langgraph-platform",
1951
1951
  agentsAmount: endpoint.agents.length,
1952
1952
  hashedLgcKey: (0, import_node_crypto2.createHash)("sha256").update(endpoint.langsmithApiKey).digest("hex")
1953
1953
  });
@@ -1983,8 +1983,8 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
1983
1983
  url: endpoint.deploymentUrl,
1984
1984
  status: 500,
1985
1985
  body: error.message
1986
- }, "Failed to execute LangGraph Cloud agent");
1987
- throw new Error("Failed to execute LangGraph Cloud agent");
1986
+ }, "Failed to execute LangGraph Platform agent");
1987
+ throw new Error("Failed to execute LangGraph Platform agent");
1988
1988
  }
1989
1989
  }
1990
1990
  }));
@@ -2166,7 +2166,7 @@ __name(createHeaders, "createHeaders");
2166
2166
  var EndpointType;
2167
2167
  (function(EndpointType2) {
2168
2168
  EndpointType2["CopilotKit"] = "copilotKit";
2169
- EndpointType2["LangGraphCloud"] = "langgraph-cloud";
2169
+ EndpointType2["LangGraphPlatform"] = "langgraph-platform";
2170
2170
  })(EndpointType || (EndpointType = {}));
2171
2171
  function isLangGraphAgentAction(action) {
2172
2172
  if (!action) {
@@ -2224,13 +2224,13 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
2224
2224
  remoteEndpointDefinitions
2225
2225
  }, "Fetching from remote endpoints");
2226
2226
  const filtered = remoteEndpointDefinitions.filter((value, index, self) => {
2227
- if (value.type === "langgraph-cloud") {
2227
+ if (value.type === "langgraph-platform") {
2228
2228
  return value;
2229
2229
  }
2230
2230
  return index === self.findIndex((t) => t.url === value.url);
2231
2231
  });
2232
2232
  const result = await Promise.all(filtered.map(async (endpoint) => {
2233
- if (endpoint.type === "langgraph-cloud") {
2233
+ if (endpoint.type === "langgraph-platform") {
2234
2234
  return constructLGCRemoteAction({
2235
2235
  endpoint,
2236
2236
  messages,
@@ -2291,7 +2291,7 @@ function getRuntimeInstanceTelemetryInfo(runtime) {
2291
2291
  ]
2292
2292
  };
2293
2293
  }
2294
- if (endpointType === EndpointType.LangGraphCloud) {
2294
+ if (endpointType === EndpointType.LangGraphPlatform) {
2295
2295
  const ep = endpoint;
2296
2296
  info = {
2297
2297
  ...info,
@@ -2875,17 +2875,17 @@ function copilotKitEndpoint(config2) {
2875
2875
  };
2876
2876
  }
2877
2877
  __name(copilotKitEndpoint, "copilotKitEndpoint");
2878
- function langGraphCloudEndpoint(config2) {
2878
+ function langGraphPlatformEndpoint(config2) {
2879
2879
  return {
2880
2880
  ...config2,
2881
- type: EndpointType.LangGraphCloud
2881
+ type: EndpointType.LangGraphPlatform
2882
2882
  };
2883
2883
  }
2884
- __name(langGraphCloudEndpoint, "langGraphCloudEndpoint");
2884
+ __name(langGraphPlatformEndpoint, "langGraphPlatformEndpoint");
2885
2885
  function resolveEndpointType(endpoint) {
2886
2886
  if (!endpoint.type) {
2887
2887
  if ("langsmithApiKey" in endpoint && "deploymentUrl" in endpoint && "agents" in endpoint) {
2888
- return EndpointType.LangGraphCloud;
2888
+ return EndpointType.LangGraphPlatform;
2889
2889
  } else {
2890
2890
  return EndpointType.CopilotKit;
2891
2891
  }
@@ -4579,7 +4579,7 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
4579
4579
  createContext,
4580
4580
  flattenToolCallsNoDuplicates,
4581
4581
  getCommonConfig,
4582
- langGraphCloudEndpoint,
4582
+ langGraphPlatformEndpoint,
4583
4583
  resolveEndpointType
4584
4584
  });
4585
4585
  //# sourceMappingURL=index.js.map