@copilotkit/runtime 1.4.1-pre.1 → 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.
- package/CHANGELOG.md +34 -2
- package/__snapshots__/schema/schema.graphql +8 -0
- package/dist/{chunk-U3SBKRZR.mjs → chunk-IEBJELNR.mjs} +2 -2
- package/dist/{chunk-G5X7YZNG.mjs → chunk-KYP35WVS.mjs} +2 -2
- package/dist/{chunk-IJAXWREA.mjs → chunk-QM5B7BZG.mjs} +25 -5
- package/dist/chunk-QM5B7BZG.mjs.map +1 -0
- package/dist/{chunk-YLEXEC6R.mjs → chunk-WNQJ5JZV.mjs} +2 -2
- package/dist/{chunk-OKQVDDJ2.mjs → chunk-ZOC3UIQP.mjs} +30 -2
- package/dist/chunk-ZOC3UIQP.mjs.map +1 -0
- package/dist/{copilot-runtime-335a610d.d.ts → copilot-runtime-12e7ac40.d.ts} +2 -2
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/{groq-adapter-b6c2b7ec.d.ts → groq-adapter-24abe931.d.ts} +1 -1
- package/dist/{index-83ee522f.d.ts → index-10b1c870.d.ts} +6 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +52 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{langserve-cc06e76e.d.ts → langserve-f021ab9c.d.ts} +2 -1
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +52 -4
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +5 -5
- package/dist/lib/integrations/index.d.ts +4 -4
- package/dist/lib/integrations/index.js +19 -2
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +5 -5
- package/dist/lib/integrations/nest/index.d.ts +3 -3
- package/dist/lib/integrations/nest/index.js +19 -2
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +3 -3
- package/dist/lib/integrations/node-express/index.d.ts +3 -3
- package/dist/lib/integrations/node-express/index.js +19 -2
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +3 -3
- package/dist/lib/integrations/node-http/index.d.ts +3 -3
- package/dist/lib/integrations/node-http/index.js +19 -2
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +2 -2
- package/dist/service-adapters/index.d.ts +4 -4
- package/dist/service-adapters/index.js +29 -1
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +4 -4
- package/src/graphql/inputs/action.input.ts +4 -1
- package/src/graphql/resolvers/copilot.resolver.ts +4 -2
- package/src/graphql/types/enums.ts +11 -0
- package/src/lib/runtime/copilot-runtime.ts +5 -1
- package/src/service-adapters/langchain/utils.test.ts +169 -0
- package/src/service-adapters/langchain/utils.ts +33 -1
- package/dist/chunk-IJAXWREA.mjs.map +0 -1
- package/dist/chunk-OKQVDDJ2.mjs.map +0 -1
- /package/dist/{chunk-U3SBKRZR.mjs.map → chunk-IEBJELNR.mjs.map} +0 -0
- /package/dist/{chunk-G5X7YZNG.mjs.map → chunk-KYP35WVS.mjs.map} +0 -0
- /package/dist/{chunk-YLEXEC6R.mjs.map → chunk-WNQJ5JZV.mjs.map} +0 -0
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.4.1-pre.
|
|
47
|
+
version: "1.4.1-pre.5",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -167,6 +167,12 @@ var CopilotRequestType;
|
|
|
167
167
|
CopilotRequestType2["TextareaPopover"] = "TextareaPopover";
|
|
168
168
|
CopilotRequestType2["Suggestion"] = "Suggestion";
|
|
169
169
|
})(CopilotRequestType || (CopilotRequestType = {}));
|
|
170
|
+
var ActionInputAvailability;
|
|
171
|
+
(function(ActionInputAvailability2) {
|
|
172
|
+
ActionInputAvailability2["disabled"] = "disabled";
|
|
173
|
+
ActionInputAvailability2["enabled"] = "enabled";
|
|
174
|
+
ActionInputAvailability2["remote"] = "remote";
|
|
175
|
+
})(ActionInputAvailability || (ActionInputAvailability = {}));
|
|
170
176
|
(0, import_type_graphql.registerEnumType)(MessageRole, {
|
|
171
177
|
name: "MessageRole",
|
|
172
178
|
description: "The role of the message"
|
|
@@ -179,6 +185,10 @@ var CopilotRequestType;
|
|
|
179
185
|
name: "CopilotRequestType",
|
|
180
186
|
description: "The type of Copilot request"
|
|
181
187
|
});
|
|
188
|
+
(0, import_type_graphql.registerEnumType)(ActionInputAvailability, {
|
|
189
|
+
name: "ActionInputAvailability",
|
|
190
|
+
description: "The availability of the frontend action"
|
|
191
|
+
});
|
|
182
192
|
|
|
183
193
|
// src/graphql/types/base/index.ts
|
|
184
194
|
var import_type_graphql2 = require("type-graphql");
|
|
@@ -396,6 +406,7 @@ var ActionInput = class {
|
|
|
396
406
|
name;
|
|
397
407
|
description;
|
|
398
408
|
jsonSchema;
|
|
409
|
+
available;
|
|
399
410
|
};
|
|
400
411
|
__name(ActionInput, "ActionInput");
|
|
401
412
|
_ts_decorate3([
|
|
@@ -410,6 +421,12 @@ _ts_decorate3([
|
|
|
410
421
|
(0, import_type_graphql4.Field)(() => String),
|
|
411
422
|
_ts_metadata3("design:type", String)
|
|
412
423
|
], ActionInput.prototype, "jsonSchema", void 0);
|
|
424
|
+
_ts_decorate3([
|
|
425
|
+
(0, import_type_graphql4.Field)(() => ActionInputAvailability, {
|
|
426
|
+
nullable: true
|
|
427
|
+
}),
|
|
428
|
+
_ts_metadata3("design:type", typeof ActionInputAvailability === "undefined" ? Object : ActionInputAvailability)
|
|
429
|
+
], ActionInput.prototype, "available", void 0);
|
|
413
430
|
ActionInput = _ts_decorate3([
|
|
414
431
|
(0, import_type_graphql4.InputType)()
|
|
415
432
|
], ActionInput);
|
|
@@ -1481,7 +1498,7 @@ var CopilotResolver = class {
|
|
|
1481
1498
|
const { eventSource, threadId = (0, import_shared4.randomId)(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
|
|
1482
1499
|
serviceAdapter,
|
|
1483
1500
|
messages: data.messages,
|
|
1484
|
-
actions: data.frontend.actions,
|
|
1501
|
+
actions: data.frontend.actions.filter((action) => action.available !== ActionInputAvailability.disabled),
|
|
1485
1502
|
threadId: data.threadId,
|
|
1486
1503
|
runId: data.runId,
|
|
1487
1504
|
publicApiKey: void 0,
|