@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.
- package/CHANGELOG.md +27 -3
- package/__snapshots__/schema/schema.graphql +8 -0
- package/dist/{chunk-L3CCF3GA.mjs → chunk-IEBJELNR.mjs} +2 -2
- package/dist/{chunk-UAHCJ2F4.mjs → chunk-KYP35WVS.mjs} +2 -2
- package/dist/{chunk-2QIJQ6YS.mjs → chunk-QM5B7BZG.mjs} +25 -5
- package/dist/chunk-QM5B7BZG.mjs.map +1 -0
- package/dist/{chunk-6WTF7IML.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-2QIJQ6YS.mjs.map +0 -1
- package/dist/chunk-OKQVDDJ2.mjs.map +0 -1
- /package/dist/{chunk-L3CCF3GA.mjs.map → chunk-IEBJELNR.mjs.map} +0 -0
- /package/dist/{chunk-UAHCJ2F4.mjs.map → chunk-KYP35WVS.mjs.map} +0 -0
- /package/dist/{chunk-6WTF7IML.mjs.map → chunk-WNQJ5JZV.mjs.map} +0 -0
package/dist/lib/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-KYP35WVS.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-IEBJELNR.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-WNQJ5JZV.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
buildSchema,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getCommonConfig,
|
|
21
21
|
langGraphPlatformEndpoint,
|
|
22
22
|
resolveEndpointType
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-QM5B7BZG.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-
|
|
31
|
+
} from "../chunk-ZOC3UIQP.mjs";
|
|
32
32
|
import "../chunk-U3V2BCGI.mjs";
|
|
33
33
|
import "../chunk-B74M7FXG.mjs";
|
|
34
34
|
import "../chunk-D2WLFQS6.mjs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-
|
|
2
|
-
export { h as CommonConfig, b as CopilotRequestContextProperties, g as buildSchema, e as createContext, i as getCommonConfig } from '../../copilot-runtime-
|
|
1
|
+
import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-12e7ac40.js';
|
|
2
|
+
export { h as CommonConfig, b as CopilotRequestContextProperties, g as buildSchema, e as createContext, i as getCommonConfig } from '../../copilot-runtime-12e7ac40.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-
|
|
10
|
-
import '../../index-
|
|
9
|
+
import '../../langserve-f021ab9c.js';
|
|
10
|
+
import '../../index-10b1c870.js';
|
|
11
11
|
import '../../graphql/types/base/index.js';
|
|
12
12
|
import 'rxjs';
|
|
13
13
|
import 'graphql';
|
|
@@ -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",
|
|
@@ -172,6 +172,12 @@ var CopilotRequestType;
|
|
|
172
172
|
CopilotRequestType2["TextareaPopover"] = "TextareaPopover";
|
|
173
173
|
CopilotRequestType2["Suggestion"] = "Suggestion";
|
|
174
174
|
})(CopilotRequestType || (CopilotRequestType = {}));
|
|
175
|
+
var ActionInputAvailability;
|
|
176
|
+
(function(ActionInputAvailability2) {
|
|
177
|
+
ActionInputAvailability2["disabled"] = "disabled";
|
|
178
|
+
ActionInputAvailability2["enabled"] = "enabled";
|
|
179
|
+
ActionInputAvailability2["remote"] = "remote";
|
|
180
|
+
})(ActionInputAvailability || (ActionInputAvailability = {}));
|
|
175
181
|
(0, import_type_graphql.registerEnumType)(MessageRole, {
|
|
176
182
|
name: "MessageRole",
|
|
177
183
|
description: "The role of the message"
|
|
@@ -184,6 +190,10 @@ var CopilotRequestType;
|
|
|
184
190
|
name: "CopilotRequestType",
|
|
185
191
|
description: "The type of Copilot request"
|
|
186
192
|
});
|
|
193
|
+
(0, import_type_graphql.registerEnumType)(ActionInputAvailability, {
|
|
194
|
+
name: "ActionInputAvailability",
|
|
195
|
+
description: "The availability of the frontend action"
|
|
196
|
+
});
|
|
187
197
|
|
|
188
198
|
// src/graphql/types/base/index.ts
|
|
189
199
|
var import_type_graphql2 = require("type-graphql");
|
|
@@ -401,6 +411,7 @@ var ActionInput = class {
|
|
|
401
411
|
name;
|
|
402
412
|
description;
|
|
403
413
|
jsonSchema;
|
|
414
|
+
available;
|
|
404
415
|
};
|
|
405
416
|
__name(ActionInput, "ActionInput");
|
|
406
417
|
_ts_decorate3([
|
|
@@ -415,6 +426,12 @@ _ts_decorate3([
|
|
|
415
426
|
(0, import_type_graphql4.Field)(() => String),
|
|
416
427
|
_ts_metadata3("design:type", String)
|
|
417
428
|
], ActionInput.prototype, "jsonSchema", void 0);
|
|
429
|
+
_ts_decorate3([
|
|
430
|
+
(0, import_type_graphql4.Field)(() => ActionInputAvailability, {
|
|
431
|
+
nullable: true
|
|
432
|
+
}),
|
|
433
|
+
_ts_metadata3("design:type", typeof ActionInputAvailability === "undefined" ? Object : ActionInputAvailability)
|
|
434
|
+
], ActionInput.prototype, "available", void 0);
|
|
418
435
|
ActionInput = _ts_decorate3([
|
|
419
436
|
(0, import_type_graphql4.InputType)()
|
|
420
437
|
], ActionInput);
|
|
@@ -1486,7 +1503,7 @@ var CopilotResolver = class {
|
|
|
1486
1503
|
const { eventSource, threadId = (0, import_shared4.randomId)(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
|
|
1487
1504
|
serviceAdapter,
|
|
1488
1505
|
messages: data.messages,
|
|
1489
|
-
actions: data.frontend.actions,
|
|
1506
|
+
actions: data.frontend.actions.filter((action) => action.available !== ActionInputAvailability.disabled),
|
|
1490
1507
|
threadId: data.threadId,
|
|
1491
1508
|
runId: data.runId,
|
|
1492
1509
|
publicApiKey: void 0,
|