@copilotkit/runtime 1.5.16-next.0 → 1.5.16-next.2
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 +15 -0
- package/dist/{chunk-D2WLFQS6.mjs → chunk-2OZAGFV3.mjs} +2 -2
- package/dist/{chunk-U3V2BCGI.mjs → chunk-5BIEM2UU.mjs} +2 -2
- package/dist/chunk-FHD4JECV.mjs +33 -0
- package/dist/{chunk-4TED7LNT.mjs → chunk-ISPCKW3E.mjs} +3 -3
- package/dist/{chunk-S3KKBII4.mjs → chunk-OS5YD32G.mjs} +2 -2
- package/dist/{chunk-HNUNXFTW.mjs → chunk-RTFJTJMA.mjs} +3 -3
- package/dist/{chunk-COJRNPCX.mjs → chunk-TBPOHFA4.mjs} +3 -3
- package/dist/{chunk-P5J3JGOI.mjs → chunk-U5OA7VEB.mjs} +35 -18
- package/dist/chunk-U5OA7VEB.mjs.map +1 -0
- package/dist/{chunk-PIUZJXE7.mjs → chunk-UHUC2NVB.mjs} +3 -3
- package/dist/{copilot-runtime-3e7f1c7b.d.ts → copilot-runtime-084fb9c7.d.ts} +6 -1
- package/dist/graphql/types/base/index.mjs +2 -2
- package/dist/graphql/types/converted/index.mjs +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -9
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +28 -11
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +11 -9
- package/dist/lib/integrations/index.d.ts +2 -2
- package/dist/lib/integrations/index.js +15 -6
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +11 -9
- package/dist/lib/integrations/nest/index.d.ts +1 -1
- package/dist/lib/integrations/nest/index.js +13 -6
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +7 -7
- package/dist/lib/integrations/node-express/index.d.ts +1 -1
- package/dist/lib/integrations/node-express/index.js +13 -6
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +7 -7
- package/dist/lib/integrations/node-http/index.d.ts +1 -1
- package/dist/lib/integrations/node-http/index.js +13 -6
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +6 -6
- package/dist/service-adapters/index.mjs +2 -2
- package/dist/utils/index.mjs +2 -2
- package/package.json +5 -5
- package/src/graphql/resolvers/copilot.resolver.ts +1 -4
- package/src/lib/integrations/shared.ts +9 -1
- package/src/lib/runtime/remote-lg-action.ts +13 -3
- package/tsconfig.json +1 -0
- package/dist/chunk-44O2JGUY.mjs +0 -12
- package/dist/chunk-P5J3JGOI.mjs.map +0 -1
- /package/dist/{chunk-D2WLFQS6.mjs.map → chunk-2OZAGFV3.mjs.map} +0 -0
- /package/dist/{chunk-U3V2BCGI.mjs.map → chunk-5BIEM2UU.mjs.map} +0 -0
- /package/dist/{chunk-44O2JGUY.mjs.map → chunk-FHD4JECV.mjs.map} +0 -0
- /package/dist/{chunk-4TED7LNT.mjs.map → chunk-ISPCKW3E.mjs.map} +0 -0
- /package/dist/{chunk-S3KKBII4.mjs.map → chunk-OS5YD32G.mjs.map} +0 -0
- /package/dist/{chunk-HNUNXFTW.mjs.map → chunk-RTFJTJMA.mjs.map} +0 -0
- /package/dist/{chunk-COJRNPCX.mjs.map → chunk-TBPOHFA4.mjs.map} +0 -0
- /package/dist/{chunk-PIUZJXE7.mjs.map → chunk-UHUC2NVB.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @copilotkit/runtime
|
|
2
2
|
|
|
3
|
+
## 1.5.16-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9be85f1: - fix: use latest langchain packages
|
|
8
|
+
- @copilotkit/shared@1.5.16-next.2
|
|
9
|
+
|
|
10
|
+
## 1.5.16-next.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 48b7c7b: - fix: detect and alert on version mismatch
|
|
15
|
+
- Updated dependencies [48b7c7b]
|
|
16
|
+
- @copilotkit/shared@1.5.16-next.1
|
|
17
|
+
|
|
3
18
|
## 1.5.16-next.0
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__name
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FHD4JECV.mjs";
|
|
4
4
|
|
|
5
5
|
// src/graphql/types/base/index.ts
|
|
6
6
|
import { Field, InputType } from "type-graphql";
|
|
@@ -40,4 +40,4 @@ BaseMessageInput = _ts_decorate([
|
|
|
40
40
|
export {
|
|
41
41
|
BaseMessageInput
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-2OZAGFV3.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__name
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FHD4JECV.mjs";
|
|
4
4
|
|
|
5
5
|
// src/graphql/types/response-status.type.ts
|
|
6
6
|
import { GraphQLJSON } from "graphql-scalars";
|
|
@@ -149,4 +149,4 @@ export {
|
|
|
149
149
|
MessageStreamInterruptedResponse,
|
|
150
150
|
UnknownErrorResponse
|
|
151
151
|
};
|
|
152
|
-
//# sourceMappingURL=chunk-
|
|
152
|
+
//# sourceMappingURL=chunk-5BIEM2UU.mjs.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
__name,
|
|
30
|
+
__commonJS,
|
|
31
|
+
__toESM
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=chunk-FHD4JECV.mjs.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U5OA7VEB.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FHD4JECV.mjs";
|
|
9
9
|
|
|
10
10
|
// src/lib/integrations/nest/index.ts
|
|
11
11
|
function copilotRuntimeNestEndpoint(options) {
|
|
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
|
|
|
22
22
|
export {
|
|
23
23
|
copilotRuntimeNestEndpoint
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-ISPCKW3E.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__name
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FHD4JECV.mjs";
|
|
4
4
|
|
|
5
5
|
// src/service-adapters/langchain/langserve.ts
|
|
6
6
|
import { RemoteRunnable } from "langchain/runnables/remote";
|
|
@@ -1419,4 +1419,4 @@ export {
|
|
|
1419
1419
|
EmptyAdapter,
|
|
1420
1420
|
ExperimentalEmptyAdapter
|
|
1421
1421
|
};
|
|
1422
|
-
//# sourceMappingURL=chunk-
|
|
1422
|
+
//# sourceMappingURL=chunk-OS5YD32G.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseMessageInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2OZAGFV3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__name
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FHD4JECV.mjs";
|
|
7
7
|
|
|
8
8
|
// src/graphql/types/converted/index.ts
|
|
9
9
|
var Message = class extends BaseMessageInput {
|
|
@@ -126,4 +126,4 @@ export {
|
|
|
126
126
|
ResultMessage,
|
|
127
127
|
AgentStateMessage
|
|
128
128
|
};
|
|
129
|
-
//# sourceMappingURL=chunk-
|
|
129
|
+
//# sourceMappingURL=chunk-RTFJTJMA.mjs.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U5OA7VEB.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FHD4JECV.mjs";
|
|
9
9
|
|
|
10
10
|
// src/lib/integrations/node-express/index.ts
|
|
11
11
|
function copilotRuntimeNodeExpressEndpoint(options) {
|
|
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
|
|
|
22
22
|
export {
|
|
23
23
|
copilotRuntimeNodeExpressEndpoint
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-TBPOHFA4.mjs.map
|
|
@@ -2,27 +2,28 @@ import {
|
|
|
2
2
|
EmptyAdapter,
|
|
3
3
|
RemoteChain,
|
|
4
4
|
streamLangChainResponse
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OS5YD32G.mjs";
|
|
6
6
|
import {
|
|
7
7
|
GuardrailsValidationFailureResponse,
|
|
8
8
|
MessageStreamInterruptedResponse,
|
|
9
9
|
ResponseStatusUnion,
|
|
10
10
|
SuccessResponseStatus,
|
|
11
11
|
UnknownErrorResponse
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5BIEM2UU.mjs";
|
|
13
13
|
import {
|
|
14
14
|
ActionExecutionMessage,
|
|
15
15
|
AgentStateMessage,
|
|
16
16
|
ResultMessage,
|
|
17
17
|
TextMessage
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RTFJTJMA.mjs";
|
|
19
19
|
import {
|
|
20
20
|
BaseMessageInput
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2OZAGFV3.mjs";
|
|
22
22
|
import {
|
|
23
23
|
__commonJS,
|
|
24
|
-
__name
|
|
25
|
-
|
|
24
|
+
__name,
|
|
25
|
+
__toESM
|
|
26
|
+
} from "./chunk-FHD4JECV.mjs";
|
|
26
27
|
|
|
27
28
|
// package.json
|
|
28
29
|
var require_package = __commonJS({
|
|
@@ -38,7 +39,7 @@ var require_package = __commonJS({
|
|
|
38
39
|
publishConfig: {
|
|
39
40
|
access: "public"
|
|
40
41
|
},
|
|
41
|
-
version: "1.5.16-next.
|
|
42
|
+
version: "1.5.16-next.2",
|
|
42
43
|
sideEffects: false,
|
|
43
44
|
main: "./dist/index.js",
|
|
44
45
|
module: "./dist/index.mjs",
|
|
@@ -78,11 +79,11 @@ var require_package = __commonJS({
|
|
|
78
79
|
"@anthropic-ai/sdk": "^0.27.3",
|
|
79
80
|
"@copilotkit/shared": "workspace:*",
|
|
80
81
|
"@graphql-yoga/plugin-defer-stream": "^3.3.1",
|
|
81
|
-
"@langchain/community": "^0.
|
|
82
|
-
"@langchain/core": "^0.3.
|
|
82
|
+
"@langchain/community": "^0.3.29",
|
|
83
|
+
"@langchain/core": "^0.3.38",
|
|
83
84
|
"@langchain/google-gauth": "^0.1.0",
|
|
84
85
|
"@langchain/langgraph-sdk": "^0.0.36",
|
|
85
|
-
"@langchain/openai": "^0.
|
|
86
|
+
"@langchain/openai": "^0.4.2",
|
|
86
87
|
"class-transformer": "^0.5.1",
|
|
87
88
|
express: "^4.19.2",
|
|
88
89
|
graphql: "^16.8.1",
|
|
@@ -1747,9 +1748,16 @@ async function streamEvents(controller, args) {
|
|
|
1747
1748
|
};
|
|
1748
1749
|
}
|
|
1749
1750
|
if (lgInterruptMetaEvent == null ? void 0 : lgInterruptMetaEvent.response) {
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1751
|
+
let response = lgInterruptMetaEvent.response;
|
|
1752
|
+
try {
|
|
1753
|
+
payload.command = {
|
|
1754
|
+
resume: JSON.parse(response)
|
|
1755
|
+
};
|
|
1756
|
+
} catch (e) {
|
|
1757
|
+
payload.command = {
|
|
1758
|
+
resume: response
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1753
1761
|
}
|
|
1754
1762
|
if (mode === "continue" && !activeInterruptEvent) {
|
|
1755
1763
|
await client.threads.updateState(threadId, {
|
|
@@ -1809,17 +1817,18 @@ async function streamEvents(controller, args) {
|
|
|
1809
1817
|
activeInterruptEvent = true;
|
|
1810
1818
|
const interruptValue = interruptEvents == null ? void 0 : interruptEvents[0].value;
|
|
1811
1819
|
if (typeof interruptValue != "string" && "__copilotkit_interrupt_value__" in interruptValue) {
|
|
1820
|
+
const evValue = interruptValue.__copilotkit_interrupt_value__;
|
|
1812
1821
|
emit(JSON.stringify({
|
|
1813
1822
|
event: LangGraphEventTypes.OnCopilotKitInterrupt,
|
|
1814
1823
|
data: {
|
|
1815
|
-
value:
|
|
1824
|
+
value: typeof evValue === "string" ? evValue : JSON.stringify(evValue),
|
|
1816
1825
|
messages: langchainMessagesToCopilotKit(interruptValue.__copilotkit_messages__)
|
|
1817
1826
|
}
|
|
1818
1827
|
}) + "\n");
|
|
1819
1828
|
} else {
|
|
1820
1829
|
emit(JSON.stringify({
|
|
1821
1830
|
event: LangGraphEventTypes.OnInterrupt,
|
|
1822
|
-
value: interruptValue
|
|
1831
|
+
value: typeof interruptValue === "string" ? interruptValue : JSON.stringify(interruptValue)
|
|
1823
1832
|
}) + "\n");
|
|
1824
1833
|
}
|
|
1825
1834
|
continue;
|
|
@@ -3554,7 +3563,7 @@ var CopilotResolver = class {
|
|
|
3554
3563
|
type: event.type,
|
|
3555
3564
|
name: event.name,
|
|
3556
3565
|
data: {
|
|
3557
|
-
value:
|
|
3566
|
+
value: event.data.value,
|
|
3558
3567
|
messages: event.data.messages.map((message) => {
|
|
3559
3568
|
if (message.type === "TextMessage" || "content" in message && "role" in message) {
|
|
3560
3569
|
return plainToInstance3(TextMessage, {
|
|
@@ -4065,7 +4074,13 @@ StateResolver = _ts_decorate20([
|
|
|
4065
4074
|
], StateResolver);
|
|
4066
4075
|
|
|
4067
4076
|
// src/lib/integrations/shared.ts
|
|
4077
|
+
var packageJson2 = __toESM(require_package());
|
|
4068
4078
|
var logger = createLogger();
|
|
4079
|
+
var addCustomHeaderPlugin = {
|
|
4080
|
+
onResponse({ response }) {
|
|
4081
|
+
response.headers.set("X-CopilotKit-Runtime-Version", packageJson2.version);
|
|
4082
|
+
}
|
|
4083
|
+
};
|
|
4069
4084
|
async function createContext(initialContext, copilotKitContext, contextLogger, properties = {}) {
|
|
4070
4085
|
logger.debug({
|
|
4071
4086
|
copilotKitContext
|
|
@@ -4131,7 +4146,8 @@ function getCommonConfig(options) {
|
|
|
4131
4146
|
}),
|
|
4132
4147
|
schema: buildSchema(),
|
|
4133
4148
|
plugins: [
|
|
4134
|
-
useDeferStream()
|
|
4149
|
+
useDeferStream(),
|
|
4150
|
+
addCustomHeaderPlugin
|
|
4135
4151
|
],
|
|
4136
4152
|
context: (ctx) => createContext(ctx, options, contextLogger, options.properties)
|
|
4137
4153
|
};
|
|
@@ -4171,9 +4187,10 @@ export {
|
|
|
4171
4187
|
copilotKitEndpoint,
|
|
4172
4188
|
langGraphPlatformEndpoint,
|
|
4173
4189
|
resolveEndpointType,
|
|
4190
|
+
addCustomHeaderPlugin,
|
|
4174
4191
|
createContext,
|
|
4175
4192
|
buildSchema,
|
|
4176
4193
|
getCommonConfig,
|
|
4177
4194
|
copilotRuntimeNodeHttpEndpoint
|
|
4178
4195
|
};
|
|
4179
|
-
//# sourceMappingURL=chunk-
|
|
4196
|
+
//# sourceMappingURL=chunk-U5OA7VEB.mjs.map
|