@copilotkit/runtime 1.4.1-pre.2 → 1.4.1-pre.5

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 (54) hide show
  1. package/CHANGELOG.md +27 -3
  2. package/__snapshots__/schema/schema.graphql +8 -0
  3. package/dist/{chunk-L3CCF3GA.mjs → chunk-IEBJELNR.mjs} +2 -2
  4. package/dist/{chunk-UAHCJ2F4.mjs → chunk-KYP35WVS.mjs} +2 -2
  5. package/dist/{chunk-2QIJQ6YS.mjs → chunk-QM5B7BZG.mjs} +25 -5
  6. package/dist/chunk-QM5B7BZG.mjs.map +1 -0
  7. package/dist/{chunk-6WTF7IML.mjs → chunk-WNQJ5JZV.mjs} +2 -2
  8. package/dist/{chunk-OKQVDDJ2.mjs → chunk-ZOC3UIQP.mjs} +30 -2
  9. package/dist/chunk-ZOC3UIQP.mjs.map +1 -0
  10. package/dist/{copilot-runtime-335a610d.d.ts → copilot-runtime-12e7ac40.d.ts} +2 -2
  11. package/dist/graphql/types/converted/index.d.ts +1 -1
  12. package/dist/{groq-adapter-b6c2b7ec.d.ts → groq-adapter-24abe931.d.ts} +1 -1
  13. package/dist/{index-83ee522f.d.ts → index-10b1c870.d.ts} +6 -1
  14. package/dist/index.d.ts +4 -4
  15. package/dist/index.js +52 -4
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +5 -5
  18. package/dist/{langserve-cc06e76e.d.ts → langserve-f021ab9c.d.ts} +2 -1
  19. package/dist/lib/index.d.ts +4 -4
  20. package/dist/lib/index.js +52 -4
  21. package/dist/lib/index.js.map +1 -1
  22. package/dist/lib/index.mjs +5 -5
  23. package/dist/lib/integrations/index.d.ts +4 -4
  24. package/dist/lib/integrations/index.js +19 -2
  25. package/dist/lib/integrations/index.js.map +1 -1
  26. package/dist/lib/integrations/index.mjs +5 -5
  27. package/dist/lib/integrations/nest/index.d.ts +3 -3
  28. package/dist/lib/integrations/nest/index.js +19 -2
  29. package/dist/lib/integrations/nest/index.js.map +1 -1
  30. package/dist/lib/integrations/nest/index.mjs +3 -3
  31. package/dist/lib/integrations/node-express/index.d.ts +3 -3
  32. package/dist/lib/integrations/node-express/index.js +19 -2
  33. package/dist/lib/integrations/node-express/index.js.map +1 -1
  34. package/dist/lib/integrations/node-express/index.mjs +3 -3
  35. package/dist/lib/integrations/node-http/index.d.ts +3 -3
  36. package/dist/lib/integrations/node-http/index.js +19 -2
  37. package/dist/lib/integrations/node-http/index.js.map +1 -1
  38. package/dist/lib/integrations/node-http/index.mjs +2 -2
  39. package/dist/service-adapters/index.d.ts +4 -4
  40. package/dist/service-adapters/index.js +29 -1
  41. package/dist/service-adapters/index.js.map +1 -1
  42. package/dist/service-adapters/index.mjs +1 -1
  43. package/package.json +4 -4
  44. package/src/graphql/inputs/action.input.ts +4 -1
  45. package/src/graphql/resolvers/copilot.resolver.ts +4 -2
  46. package/src/graphql/types/enums.ts +11 -0
  47. package/src/lib/runtime/copilot-runtime.ts +5 -1
  48. package/src/service-adapters/langchain/utils.test.ts +169 -0
  49. package/src/service-adapters/langchain/utils.ts +33 -1
  50. package/dist/chunk-2QIJQ6YS.mjs.map +0 -1
  51. package/dist/chunk-OKQVDDJ2.mjs.map +0 -1
  52. /package/dist/{chunk-L3CCF3GA.mjs.map → chunk-IEBJELNR.mjs.map} +0 -0
  53. /package/dist/{chunk-UAHCJ2F4.mjs.map → chunk-KYP35WVS.mjs.map} +0 -0
  54. /package/dist/{chunk-6WTF7IML.mjs.map → chunk-WNQJ5JZV.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,10 +1,34 @@
1
1
  # @copilotkit/runtime
2
2
 
3
+ ## 1.4.1-pre.5
4
+
5
+ ### Patch Changes
6
+
7
+ - bump
8
+ - Updated dependencies
9
+ - @copilotkit/shared@1.4.1-pre.5
10
+
11
+ ## 1.4.1-pre.4
12
+
13
+ ### Patch Changes
14
+
15
+ - bump
16
+ - Updated dependencies
17
+ - @copilotkit/shared@1.4.1-pre.4
18
+
19
+ ## 1.4.1-pre.3
20
+
21
+ ### Patch Changes
22
+
23
+ - bump
24
+ - Updated dependencies
25
+ - @copilotkit/shared@1.4.1-pre.3
26
+
3
27
  ## 1.4.1-pre.2
4
28
 
5
29
  ### Patch Changes
6
30
 
7
- - Add convertActionsToDynamicStructuredTools to sdk-js
31
+ - bump
8
32
  - Updated dependencies
9
33
  - @copilotkit/shared@1.4.1-pre.2
10
34
 
@@ -12,7 +36,7 @@
12
36
 
13
37
  ### Patch Changes
14
38
 
15
- - add zod conversion
39
+ - bump
16
40
  - Updated dependencies
17
41
  - @copilotkit/shared@1.4.1-pre.1
18
42
 
@@ -20,7 +44,7 @@
20
44
 
21
45
  ### Patch Changes
22
46
 
23
- - lower case copilotkit property
47
+ - New prerelease
24
48
  - Updated dependencies
25
49
  - @copilotkit/shared@1.4.1-pre.0
26
50
 
@@ -26,11 +26,19 @@ enum ActionExecutionScope {
26
26
  }
27
27
 
28
28
  input ActionInput {
29
+ available: ActionInputAvailability
29
30
  description: String!
30
31
  jsonSchema: String!
31
32
  name: String!
32
33
  }
33
34
 
35
+ """The availability of the frontend action"""
36
+ enum ActionInputAvailability {
37
+ disabled
38
+ enabled
39
+ remote
40
+ }
41
+
34
42
  input AgentSessionInput {
35
43
  agentName: String!
36
44
  nodeName: String
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-2QIJQ6YS.mjs";
5
+ } from "./chunk-QM5B7BZG.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-44O2JGUY.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
22
22
  export {
23
23
  copilotRuntimeNestEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-L3CCF3GA.mjs.map
25
+ //# sourceMappingURL=chunk-IEBJELNR.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  getCommonConfig,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-2QIJQ6YS.mjs";
5
+ } from "./chunk-QM5B7BZG.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-UAHCJ2F4.mjs.map
80
+ //# sourceMappingURL=chunk-KYP35WVS.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RemoteChain,
3
3
  streamLangChainResponse
4
- } from "./chunk-OKQVDDJ2.mjs";
4
+ } from "./chunk-ZOC3UIQP.mjs";
5
5
  import {
6
6
  GuardrailsValidationFailureResponse,
7
7
  MessageStreamInterruptedResponse,
@@ -37,7 +37,7 @@ var require_package = __commonJS({
37
37
  publishConfig: {
38
38
  access: "public"
39
39
  },
40
- version: "1.4.1-pre.2",
40
+ version: "1.4.1-pre.5",
41
41
  sideEffects: false,
42
42
  main: "./dist/index.js",
43
43
  module: "./dist/index.mjs",
@@ -153,6 +153,12 @@ var CopilotRequestType;
153
153
  CopilotRequestType2["TextareaPopover"] = "TextareaPopover";
154
154
  CopilotRequestType2["Suggestion"] = "Suggestion";
155
155
  })(CopilotRequestType || (CopilotRequestType = {}));
156
+ var ActionInputAvailability;
157
+ (function(ActionInputAvailability2) {
158
+ ActionInputAvailability2["disabled"] = "disabled";
159
+ ActionInputAvailability2["enabled"] = "enabled";
160
+ ActionInputAvailability2["remote"] = "remote";
161
+ })(ActionInputAvailability || (ActionInputAvailability = {}));
156
162
  registerEnumType(MessageRole, {
157
163
  name: "MessageRole",
158
164
  description: "The role of the message"
@@ -165,6 +171,10 @@ registerEnumType(CopilotRequestType, {
165
171
  name: "CopilotRequestType",
166
172
  description: "The type of Copilot request"
167
173
  });
174
+ registerEnumType(ActionInputAvailability, {
175
+ name: "ActionInputAvailability",
176
+ description: "The availability of the frontend action"
177
+ });
168
178
 
169
179
  // src/graphql/inputs/message.input.ts
170
180
  function _ts_decorate(decorators, target, key, desc) {
@@ -347,6 +357,7 @@ var ActionInput = class {
347
357
  name;
348
358
  description;
349
359
  jsonSchema;
360
+ available;
350
361
  };
351
362
  __name(ActionInput, "ActionInput");
352
363
  _ts_decorate2([
@@ -361,6 +372,12 @@ _ts_decorate2([
361
372
  Field2(() => String),
362
373
  _ts_metadata2("design:type", String)
363
374
  ], ActionInput.prototype, "jsonSchema", void 0);
375
+ _ts_decorate2([
376
+ Field2(() => ActionInputAvailability, {
377
+ nullable: true
378
+ }),
379
+ _ts_metadata2("design:type", typeof ActionInputAvailability === "undefined" ? Object : ActionInputAvailability)
380
+ ], ActionInput.prototype, "available", void 0);
364
381
  ActionInput = _ts_decorate2([
365
382
  InputType2()
366
383
  ], ActionInput);
@@ -2119,7 +2136,10 @@ var CopilotRuntime = class {
2119
2136
  }));
2120
2137
  const actionInputs = flattenToolCallsNoDuplicates([
2121
2138
  ...serverSideActionsInput,
2122
- ...clientSideActionsInput
2139
+ ...clientSideActionsInput.filter(
2140
+ // Filter remote actions from CopilotKit core loop
2141
+ (action) => action.available !== ActionInputAvailability.remote
2142
+ )
2123
2143
  ]);
2124
2144
  await ((_a = this.onBeforeRequest) == null ? void 0 : _a.call(this, {
2125
2145
  threadId,
@@ -2675,7 +2695,7 @@ var CopilotResolver = class {
2675
2695
  const { eventSource, threadId = randomId4(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
2676
2696
  serviceAdapter,
2677
2697
  messages: data.messages,
2678
- actions: data.frontend.actions,
2698
+ actions: data.frontend.actions.filter((action) => action.available !== ActionInputAvailability.disabled),
2679
2699
  threadId: data.threadId,
2680
2700
  runId: data.runId,
2681
2701
  publicApiKey: void 0,
@@ -3124,4 +3144,4 @@ export {
3124
3144
  getCommonConfig,
3125
3145
  copilotRuntimeNodeHttpEndpoint
3126
3146
  };
3127
- //# sourceMappingURL=chunk-2QIJQ6YS.mjs.map
3147
+ //# sourceMappingURL=chunk-QM5B7BZG.mjs.map