@copilotkit/runtime 1.8.14-next.2 → 1.8.14-next.3
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 +7 -0
- package/dist/{chunk-YLRGZOEQ.mjs → chunk-6P6VMQLZ.mjs} +22 -7
- package/dist/chunk-6P6VMQLZ.mjs.map +1 -0
- package/dist/{chunk-MZSUT6FW.mjs → chunk-BMA7V5T7.mjs} +2 -2
- package/dist/{chunk-RM7LK6G2.mjs → chunk-C7XHY7LW.mjs} +2 -2
- package/dist/{chunk-5FDI6FH6.mjs → chunk-T2RKWYXN.mjs} +2 -2
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/index.js +21 -6
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -4
- package/dist/lib/integrations/index.js +44 -1
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +4 -4
- package/dist/lib/integrations/nest/index.js +44 -1
- 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.js +44 -1
- 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.js +44 -1
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +1 -1
- package/package.json +2 -2
- package/src/graphql/resolvers/copilot.resolver.ts +14 -0
- package/src/lib/runtime/agui-action.ts +5 -0
- package/src/lib/runtime/copilot-runtime.ts +1 -0
- package/src/lib/runtime/remote-actions.ts +3 -0
- package/dist/chunk-YLRGZOEQ.mjs.map +0 -1
- /package/dist/{chunk-MZSUT6FW.mjs.map → chunk-BMA7V5T7.mjs.map} +0 -0
- /package/dist/{chunk-RM7LK6G2.mjs.map → chunk-C7XHY7LW.mjs.map} +0 -0
- /package/dist/{chunk-5FDI6FH6.mjs.map → chunk-T2RKWYXN.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.8.14-next.
|
|
12
|
+
"version": "1.8.14-next.3",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"main": "./dist/index.js",
|
|
15
15
|
"module": "./dist/index.mjs",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"rxjs": "^7.8.1",
|
|
65
65
|
"type-graphql": "2.0.0-rc.1",
|
|
66
66
|
"zod": "^3.23.3",
|
|
67
|
-
"@copilotkit/shared": "1.8.14-next.
|
|
67
|
+
"@copilotkit/shared": "1.8.14-next.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@ag-ui/client": ">=0.0.28",
|
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
import telemetry from "../../lib/telemetry-client";
|
|
54
54
|
import { randomId } from "@copilotkit/shared";
|
|
55
55
|
import { AgentsResponse } from "../types/agents-response.type";
|
|
56
|
+
import { LangGraphEventTypes } from "../../agents/langgraph/events";
|
|
56
57
|
|
|
57
58
|
const invokeGuardrails = async ({
|
|
58
59
|
baseUrl,
|
|
@@ -263,6 +264,19 @@ export class CopilotResolver {
|
|
|
263
264
|
return;
|
|
264
265
|
}
|
|
265
266
|
switch (event.name) {
|
|
267
|
+
// @ts-ignore
|
|
268
|
+
case LangGraphEventTypes.OnInterrupt:
|
|
269
|
+
push(
|
|
270
|
+
plainToInstance(LangGraphInterruptEvent, {
|
|
271
|
+
// @ts-ignore
|
|
272
|
+
type: event.type,
|
|
273
|
+
// @ts-ignore
|
|
274
|
+
name: RuntimeMetaEventName.LangGraphInterruptEvent,
|
|
275
|
+
// @ts-ignore
|
|
276
|
+
value: event.value,
|
|
277
|
+
}),
|
|
278
|
+
);
|
|
279
|
+
break;
|
|
266
280
|
case RuntimeMetaEventName.LangGraphInterruptEvent:
|
|
267
281
|
push(
|
|
268
282
|
plainToInstance(LangGraphInterruptEvent, {
|
|
@@ -14,17 +14,20 @@ import {
|
|
|
14
14
|
|
|
15
15
|
import { AbstractAgent } from "@ag-ui/client";
|
|
16
16
|
import { parseJson } from "@copilotkit/shared";
|
|
17
|
+
import { MetaEventInput } from "../../graphql/inputs/meta-event.input";
|
|
17
18
|
|
|
18
19
|
export function constructAGUIRemoteAction({
|
|
19
20
|
logger,
|
|
20
21
|
messages,
|
|
21
22
|
agentStates,
|
|
22
23
|
agent,
|
|
24
|
+
metaEvents,
|
|
23
25
|
}: {
|
|
24
26
|
logger: Logger;
|
|
25
27
|
messages: Message[];
|
|
26
28
|
agentStates?: AgentStateInput[];
|
|
27
29
|
agent: AbstractAgent;
|
|
30
|
+
metaEvents?: MetaEventInput[];
|
|
28
31
|
}) {
|
|
29
32
|
const action = {
|
|
30
33
|
name: agent.agentId,
|
|
@@ -66,6 +69,8 @@ export function constructAGUIRemoteAction({
|
|
|
66
69
|
|
|
67
70
|
return agent.legacy_to_be_removed_runAgentBridged({
|
|
68
71
|
tools,
|
|
72
|
+
// @ts-ignore
|
|
73
|
+
resume: metaEvents[0]?.response,
|
|
69
74
|
}) as Observable<RuntimeEvent>;
|
|
70
75
|
},
|
|
71
76
|
};
|
|
@@ -130,6 +130,7 @@ export async function setupRemoteActions({
|
|
|
130
130
|
agentStates,
|
|
131
131
|
frontendUrl,
|
|
132
132
|
agents,
|
|
133
|
+
metaEvents,
|
|
133
134
|
}: {
|
|
134
135
|
remoteEndpointDefinitions: EndpointDefinition[];
|
|
135
136
|
graphqlContext: GraphQLContext;
|
|
@@ -137,6 +138,7 @@ export async function setupRemoteActions({
|
|
|
137
138
|
agentStates?: AgentStateInput[];
|
|
138
139
|
frontendUrl?: string;
|
|
139
140
|
agents: Record<string, AbstractAgent>;
|
|
141
|
+
metaEvents?: MetaEventInput[];
|
|
140
142
|
}): Promise<Action[]> {
|
|
141
143
|
const logger = graphqlContext.logger.child({ component: "remote-actions.fetchRemoteActions" });
|
|
142
144
|
logger.debug({ remoteEndpointDefinitions }, "Fetching from remote endpoints");
|
|
@@ -201,6 +203,7 @@ export async function setupRemoteActions({
|
|
|
201
203
|
messages,
|
|
202
204
|
agentStates,
|
|
203
205
|
agent: agent,
|
|
206
|
+
metaEvents,
|
|
204
207
|
}),
|
|
205
208
|
);
|
|
206
209
|
}
|