@copilotkit/runtime 1.4.1-pre.2 → 1.4.1-pre.6
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 +41 -3
- package/__snapshots__/schema/schema.graphql +8 -0
- package/dist/{chunk-2QIJQ6YS.mjs → chunk-SFC4IZY3.mjs} +24 -4
- package/dist/chunk-SFC4IZY3.mjs.map +1 -0
- package/dist/{chunk-L3CCF3GA.mjs → chunk-TIWN7W7O.mjs} +2 -2
- package/dist/{chunk-UAHCJ2F4.mjs → chunk-WCQG2CHA.mjs} +2 -2
- package/dist/{chunk-6WTF7IML.mjs → chunk-WWJRLGPB.mjs} +2 -2
- 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 +23 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- 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 +23 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -4
- 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 +4 -4
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/service-adapters/index.d.ts +4 -4
- 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/dist/chunk-2QIJQ6YS.mjs.map +0 -1
- /package/dist/{chunk-L3CCF3GA.mjs.map → chunk-TIWN7W7O.mjs.map} +0 -0
- /package/dist/{chunk-UAHCJ2F4.mjs.map → chunk-WCQG2CHA.mjs.map} +0 -0
- /package/dist/{chunk-6WTF7IML.mjs.map → chunk-WWJRLGPB.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.1-pre.
|
|
47
|
+
version: "1.4.1-pre.6",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -1583,6 +1583,12 @@ var CopilotRequestType;
|
|
|
1583
1583
|
CopilotRequestType2["TextareaPopover"] = "TextareaPopover";
|
|
1584
1584
|
CopilotRequestType2["Suggestion"] = "Suggestion";
|
|
1585
1585
|
})(CopilotRequestType || (CopilotRequestType = {}));
|
|
1586
|
+
var ActionInputAvailability;
|
|
1587
|
+
(function(ActionInputAvailability2) {
|
|
1588
|
+
ActionInputAvailability2["disabled"] = "disabled";
|
|
1589
|
+
ActionInputAvailability2["enabled"] = "enabled";
|
|
1590
|
+
ActionInputAvailability2["remote"] = "remote";
|
|
1591
|
+
})(ActionInputAvailability || (ActionInputAvailability = {}));
|
|
1586
1592
|
(0, import_type_graphql.registerEnumType)(MessageRole, {
|
|
1587
1593
|
name: "MessageRole",
|
|
1588
1594
|
description: "The role of the message"
|
|
@@ -1595,6 +1601,10 @@ var CopilotRequestType;
|
|
|
1595
1601
|
name: "CopilotRequestType",
|
|
1596
1602
|
description: "The type of Copilot request"
|
|
1597
1603
|
});
|
|
1604
|
+
(0, import_type_graphql.registerEnumType)(ActionInputAvailability, {
|
|
1605
|
+
name: "ActionInputAvailability",
|
|
1606
|
+
description: "The availability of the frontend action"
|
|
1607
|
+
});
|
|
1598
1608
|
|
|
1599
1609
|
// src/lib/runtime/remote-lg-action.ts
|
|
1600
1610
|
async function execute(args) {
|
|
@@ -2772,7 +2782,10 @@ var CopilotRuntime = class {
|
|
|
2772
2782
|
}));
|
|
2773
2783
|
const actionInputs = flattenToolCallsNoDuplicates([
|
|
2774
2784
|
...serverSideActionsInput,
|
|
2775
|
-
...clientSideActionsInput
|
|
2785
|
+
...clientSideActionsInput.filter(
|
|
2786
|
+
// Filter remote actions from CopilotKit core loop
|
|
2787
|
+
(action) => action.available !== ActionInputAvailability.remote
|
|
2788
|
+
)
|
|
2776
2789
|
]);
|
|
2777
2790
|
await ((_a = this.onBeforeRequest) == null ? void 0 : _a.call(this, {
|
|
2778
2791
|
threadId,
|
|
@@ -3151,6 +3164,7 @@ var ActionInput = class {
|
|
|
3151
3164
|
name;
|
|
3152
3165
|
description;
|
|
3153
3166
|
jsonSchema;
|
|
3167
|
+
available;
|
|
3154
3168
|
};
|
|
3155
3169
|
__name(ActionInput, "ActionInput");
|
|
3156
3170
|
_ts_decorate3([
|
|
@@ -3165,6 +3179,12 @@ _ts_decorate3([
|
|
|
3165
3179
|
(0, import_type_graphql4.Field)(() => String),
|
|
3166
3180
|
_ts_metadata3("design:type", String)
|
|
3167
3181
|
], ActionInput.prototype, "jsonSchema", void 0);
|
|
3182
|
+
_ts_decorate3([
|
|
3183
|
+
(0, import_type_graphql4.Field)(() => ActionInputAvailability, {
|
|
3184
|
+
nullable: true
|
|
3185
|
+
}),
|
|
3186
|
+
_ts_metadata3("design:type", typeof ActionInputAvailability === "undefined" ? Object : ActionInputAvailability)
|
|
3187
|
+
], ActionInput.prototype, "available", void 0);
|
|
3168
3188
|
ActionInput = _ts_decorate3([
|
|
3169
3189
|
(0, import_type_graphql4.InputType)()
|
|
3170
3190
|
], ActionInput);
|
|
@@ -4091,7 +4111,7 @@ var CopilotResolver = class {
|
|
|
4091
4111
|
const { eventSource, threadId = (0, import_shared11.randomId)(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
|
|
4092
4112
|
serviceAdapter,
|
|
4093
4113
|
messages: data.messages,
|
|
4094
|
-
actions: data.frontend.actions,
|
|
4114
|
+
actions: data.frontend.actions.filter((action) => action.available !== ActionInputAvailability.disabled),
|
|
4095
4115
|
threadId: data.threadId,
|
|
4096
4116
|
runId: data.runId,
|
|
4097
4117
|
publicApiKey: void 0,
|