@copilotkit/runtime 1.4.0-pre-1-4-0-alpha.10 → 1.4.0-pre-1-4-0.14

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 (60) hide show
  1. package/CHANGELOG.md +160 -24
  2. package/dist/{chunk-YUJSVJWS.mjs → chunk-6H45CJUK.mjs} +2 -2
  3. package/dist/{chunk-SBWLAAB3.mjs → chunk-N4ROMSZN.mjs} +2 -2
  4. package/dist/{chunk-SVL5LEKB.mjs → chunk-NFMXFL2C.mjs} +2 -2
  5. package/dist/{chunk-56IQ6PGC.mjs → chunk-WHJ3DAYL.mjs} +56 -213
  6. package/dist/chunk-WHJ3DAYL.mjs.map +1 -0
  7. package/dist/{chunk-RDHJQVWH.mjs → chunk-X4FFTYTH.mjs} +49 -92
  8. package/dist/chunk-X4FFTYTH.mjs.map +1 -0
  9. package/dist/{copilot-runtime-dbe5fa02.d.ts → copilot-runtime-335a610d.d.ts} +8 -8
  10. package/dist/{groq-adapter-192d2413.d.ts → groq-adapter-2f8fd767.d.ts} +1 -1
  11. package/dist/index.d.ts +3 -3
  12. package/dist/index.js +103 -303
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +7 -7
  15. package/dist/{langserve-878c62b9.d.ts → langserve-cc06e76e.d.ts} +9 -45
  16. package/dist/lib/index.d.ts +3 -3
  17. package/dist/lib/index.js +97 -282
  18. package/dist/lib/index.js.map +1 -1
  19. package/dist/lib/index.mjs +7 -7
  20. package/dist/lib/integrations/index.d.ts +3 -3
  21. package/dist/lib/integrations/index.js +6 -14
  22. package/dist/lib/integrations/index.js.map +1 -1
  23. package/dist/lib/integrations/index.mjs +5 -5
  24. package/dist/lib/integrations/nest/index.d.ts +2 -2
  25. package/dist/lib/integrations/nest/index.js +6 -14
  26. package/dist/lib/integrations/nest/index.js.map +1 -1
  27. package/dist/lib/integrations/nest/index.mjs +3 -3
  28. package/dist/lib/integrations/node-express/index.d.ts +2 -2
  29. package/dist/lib/integrations/node-express/index.js +6 -14
  30. package/dist/lib/integrations/node-express/index.js.map +1 -1
  31. package/dist/lib/integrations/node-express/index.mjs +3 -3
  32. package/dist/lib/integrations/node-http/index.d.ts +2 -2
  33. package/dist/lib/integrations/node-http/index.js +6 -14
  34. package/dist/lib/integrations/node-http/index.js.map +1 -1
  35. package/dist/lib/integrations/node-http/index.mjs +2 -2
  36. package/dist/service-adapters/index.d.ts +3 -3
  37. package/dist/service-adapters/index.js +55 -212
  38. package/dist/service-adapters/index.js.map +1 -1
  39. package/dist/service-adapters/index.mjs +1 -1
  40. package/package.json +4 -4
  41. package/src/agents/langgraph/event-source.ts +2 -14
  42. package/src/graphql/resolvers/copilot.resolver.ts +2 -28
  43. package/src/lib/runtime/copilot-runtime.ts +6 -6
  44. package/src/lib/runtime/remote-action-constructors.ts +7 -7
  45. package/src/lib/runtime/remote-actions.ts +9 -9
  46. package/src/lib/runtime/{remote-lg-cloud-action.ts → remote-lg-action.ts} +18 -18
  47. package/src/lib/telemetry-client.ts +3 -3
  48. package/src/service-adapters/anthropic/anthropic-adapter.ts +6 -15
  49. package/src/service-adapters/events.ts +35 -73
  50. package/src/service-adapters/experimental/ollama/ollama-adapter.ts +3 -7
  51. package/src/service-adapters/groq/groq-adapter.ts +8 -22
  52. package/src/service-adapters/langchain/utils.ts +31 -47
  53. package/src/service-adapters/openai/openai-adapter.ts +9 -21
  54. package/src/service-adapters/openai/openai-assistant-adapter.ts +8 -21
  55. package/src/service-adapters/unify/unify-adapter.ts +11 -28
  56. package/dist/chunk-56IQ6PGC.mjs.map +0 -1
  57. package/dist/chunk-RDHJQVWH.mjs.map +0 -1
  58. /package/dist/{chunk-YUJSVJWS.mjs.map → chunk-6H45CJUK.mjs.map} +0 -0
  59. /package/dist/{chunk-SBWLAAB3.mjs.map → chunk-N4ROMSZN.mjs.map} +0 -0
  60. /package/dist/{chunk-SVL5LEKB.mjs.map → chunk-NFMXFL2C.mjs.map} +0 -0
@@ -3,13 +3,13 @@ import {
3
3
  config,
4
4
  copilotRuntimeNextJSAppRouterEndpoint,
5
5
  copilotRuntimeNextJSPagesRouterEndpoint
6
- } from "../chunk-YUJSVJWS.mjs";
6
+ } from "../chunk-6H45CJUK.mjs";
7
7
  import {
8
8
  copilotRuntimeNestEndpoint
9
- } from "../chunk-SVL5LEKB.mjs";
9
+ } from "../chunk-NFMXFL2C.mjs";
10
10
  import {
11
11
  copilotRuntimeNodeExpressEndpoint
12
- } from "../chunk-SBWLAAB3.mjs";
12
+ } from "../chunk-N4ROMSZN.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-RDHJQVWH.mjs";
23
+ } from "../chunk-X4FFTYTH.mjs";
24
24
  import {
25
25
  GoogleGenerativeAIAdapter,
26
26
  GroqAdapter,
@@ -28,7 +28,7 @@ import {
28
28
  OpenAIAdapter,
29
29
  OpenAIAssistantAdapter,
30
30
  UnifyAdapter
31
- } from "../chunk-56IQ6PGC.mjs";
31
+ } from "../chunk-WHJ3DAYL.mjs";
32
32
  import "../chunk-U3V2BCGI.mjs";
33
33
  import "../chunk-B74M7FXG.mjs";
34
34
  import "../chunk-D2WLFQS6.mjs";
@@ -52,7 +52,7 @@ export {
52
52
  createContext,
53
53
  flattenToolCallsNoDuplicates,
54
54
  getCommonConfig,
55
- langGraphCloudEndpoint,
55
+ langGraphPlatformEndpoint,
56
56
  resolveEndpointType
57
57
  };
58
58
  //# sourceMappingURL=index.mjs.map
@@ -1,12 +1,12 @@
1
- import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-dbe5fa02.js';
2
- export { h as CommonConfig, b as CopilotRequestContextProperties, g as buildSchema, e as createContext, i as getCommonConfig } from '../../copilot-runtime-dbe5fa02.js';
1
+ import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-335a610d.js';
2
+ export { h as CommonConfig, b as CopilotRequestContextProperties, g as buildSchema, e as createContext, i as getCommonConfig } from '../../copilot-runtime-335a610d.js';
3
3
  import * as graphql_yoga from 'graphql-yoga';
4
4
  import { YogaServerInstance } from 'graphql-yoga';
5
5
  export { copilotRuntimeNodeHttpEndpoint } from './node-http/index.js';
6
6
  export { copilotRuntimeNodeExpressEndpoint } from './node-express/index.js';
7
7
  export { copilotRuntimeNestEndpoint } from './nest/index.js';
8
8
  import '@copilotkit/shared';
9
- import '../../langserve-878c62b9.js';
9
+ import '../../langserve-cc06e76e.js';
10
10
  import '../../index-83ee522f.js';
11
11
  import '../../graphql/types/base/index.js';
12
12
  import 'rxjs';
@@ -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-alpha.10",
47
+ version: "1.4.0-pre-1-4-0.14",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -1195,7 +1195,7 @@ var import_shared2 = require("@copilotkit/shared");
1195
1195
  var EndpointType;
1196
1196
  (function(EndpointType2) {
1197
1197
  EndpointType2["CopilotKit"] = "copilotKit";
1198
- EndpointType2["LangGraphCloud"] = "langgraph-cloud";
1198
+ EndpointType2["LangGraphPlatform"] = "langgraph-platform";
1199
1199
  })(EndpointType || (EndpointType = {}));
1200
1200
 
1201
1201
  // src/lib/telemetry-client.ts
@@ -1259,7 +1259,7 @@ var import_rxjs = require("rxjs");
1259
1259
  function resolveEndpointType(endpoint) {
1260
1260
  if (!endpoint.type) {
1261
1261
  if ("langsmithApiKey" in endpoint && "deploymentUrl" in endpoint && "agents" in endpoint) {
1262
- return EndpointType.LangGraphCloud;
1262
+ return EndpointType.LangGraphPlatform;
1263
1263
  } else {
1264
1264
  return EndpointType.CopilotKit;
1265
1265
  }
@@ -1289,7 +1289,7 @@ function getRuntimeInstanceTelemetryInfo(runtime) {
1289
1289
  ]
1290
1290
  };
1291
1291
  }
1292
- if (endpointType === EndpointType.LangGraphCloud) {
1292
+ if (endpointType === EndpointType.LangGraphPlatform) {
1293
1293
  const ep = endpoint;
1294
1294
  info = {
1295
1295
  ...info,
@@ -1576,9 +1576,7 @@ var CopilotResolver = class {
1576
1576
  // skip until this message start event
1577
1577
  (0, import_rxjs3.skipWhile)((e) => e !== event),
1578
1578
  // take until the message end event
1579
- (0, import_rxjs3.takeWhile)((e) => !(e.type === RuntimeEventTypes.TextMessageEnd && e.messageId == event.messageId)),
1580
- // filter out any other message events or message ids
1581
- (0, import_rxjs3.filter)((e) => e.type == RuntimeEventTypes.TextMessageContent && e.messageId == event.messageId)
1579
+ (0, import_rxjs3.takeWhile)((e) => e.type != RuntimeEventTypes.TextMessageEnd)
1582
1580
  );
1583
1581
  const streamingTextStatus = new import_rxjs3.Subject();
1584
1582
  const messageId = event.messageId;
@@ -1642,13 +1640,7 @@ var CopilotResolver = class {
1642
1640
  break;
1643
1641
  case RuntimeEventTypes.ActionExecutionStart:
1644
1642
  logger2.debug("Action execution start event received");
1645
- const actionExecutionArgumentStream = eventStream.pipe(
1646
- (0, import_rxjs3.skipWhile)((e) => e !== event),
1647
- // take until the action execution end event
1648
- (0, import_rxjs3.takeWhile)((e) => !(e.type === RuntimeEventTypes.ActionExecutionEnd && e.actionExecutionId == event.actionExecutionId)),
1649
- // filter out any other action execution events or action execution ids
1650
- (0, import_rxjs3.filter)((e) => e.type == RuntimeEventTypes.ActionExecutionArgs && e.actionExecutionId == event.actionExecutionId)
1651
- );
1643
+ const actionExecutionArgumentStream = eventStream.pipe((0, import_rxjs3.skipWhile)((e) => e !== event), (0, import_rxjs3.takeWhile)((e) => e.type != RuntimeEventTypes.ActionExecutionEnd));
1652
1644
  const streamingArgumentsStatus = new import_rxjs3.Subject();
1653
1645
  pushMessage({
1654
1646
  id: event.actionExecutionId,