@copilotkit/runtime 1.8.14-next.2 → 1.8.14-next.4
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 +14 -0
- package/dist/{chunk-MZSUT6FW.mjs → chunk-BV7WYSOF.mjs} +2 -2
- package/dist/{chunk-5FDI6FH6.mjs → chunk-EQX4WXGG.mjs} +2 -2
- package/dist/{chunk-YLRGZOEQ.mjs → chunk-IZAPLBCH.mjs} +26 -7
- package/dist/chunk-IZAPLBCH.mjs.map +1 -0
- package/dist/{chunk-RM7LK6G2.mjs → chunk-JH3OA44N.mjs} +2 -2
- package/dist/index.js +25 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/index.js +25 -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 +8 -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-BV7WYSOF.mjs.map} +0 -0
- /package/dist/{chunk-5FDI6FH6.mjs.map → chunk-EQX4WXGG.mjs.map} +0 -0
- /package/dist/{chunk-RM7LK6G2.mjs.map → chunk-JH3OA44N.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EQX4WXGG.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JH3OA44N.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BV7WYSOF.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
addCustomHeaderPlugin,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
getCommonConfig,
|
|
26
26
|
langGraphPlatformEndpoint,
|
|
27
27
|
resolveEndpointType
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-IZAPLBCH.mjs";
|
|
29
29
|
import {
|
|
30
30
|
AnthropicAdapter,
|
|
31
31
|
EmptyAdapter,
|
package/dist/lib/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.8.14-next.
|
|
47
|
+
version: "1.8.14-next.4",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -3938,7 +3938,7 @@ var import_shared15 = require("@copilotkit/shared");
|
|
|
3938
3938
|
|
|
3939
3939
|
// src/lib/runtime/agui-action.ts
|
|
3940
3940
|
var import_shared13 = require("@copilotkit/shared");
|
|
3941
|
-
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent }) {
|
|
3941
|
+
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents }) {
|
|
3942
3942
|
const action = {
|
|
3943
3943
|
name: agent.agentId,
|
|
3944
3944
|
description: agent.description,
|
|
@@ -3946,6 +3946,7 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
|
|
|
3946
3946
|
handler: async (_args) => {
|
|
3947
3947
|
},
|
|
3948
3948
|
remoteAgentHandler: async ({ actionInputsWithoutAgents, threadId }) => {
|
|
3949
|
+
var _a;
|
|
3949
3950
|
logger2.debug({
|
|
3950
3951
|
actionName: agent.agentId
|
|
3951
3952
|
}, "Executing remote agent");
|
|
@@ -3972,8 +3973,14 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
|
|
|
3972
3973
|
parameters: JSON.parse(input.jsonSchema)
|
|
3973
3974
|
};
|
|
3974
3975
|
});
|
|
3976
|
+
const forwardedProps = metaEvents.length ? {
|
|
3977
|
+
command: {
|
|
3978
|
+
resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
|
|
3979
|
+
}
|
|
3980
|
+
} : void 0;
|
|
3975
3981
|
return agent.legacy_to_be_removed_runAgentBridged({
|
|
3976
|
-
tools
|
|
3982
|
+
tools,
|
|
3983
|
+
forwardedProps
|
|
3977
3984
|
});
|
|
3978
3985
|
}
|
|
3979
3986
|
};
|
|
@@ -4084,7 +4091,7 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
|
|
|
4084
4091
|
}
|
|
4085
4092
|
}
|
|
4086
4093
|
__name(fetchRemoteInfo, "fetchRemoteInfo");
|
|
4087
|
-
async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents }) {
|
|
4094
|
+
async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents }) {
|
|
4088
4095
|
const logger2 = graphqlContext.logger.child({
|
|
4089
4096
|
component: "remote-actions.fetchRemoteActions"
|
|
4090
4097
|
});
|
|
@@ -4146,7 +4153,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
|
|
|
4146
4153
|
logger: logger2,
|
|
4147
4154
|
messages,
|
|
4148
4155
|
agentStates,
|
|
4149
|
-
agent
|
|
4156
|
+
agent,
|
|
4157
|
+
metaEvents
|
|
4150
4158
|
}));
|
|
4151
4159
|
}
|
|
4152
4160
|
return result.flat();
|
|
@@ -5209,7 +5217,8 @@ please use an LLM adapter instead.`
|
|
|
5209
5217
|
messages: inputMessages,
|
|
5210
5218
|
agentStates,
|
|
5211
5219
|
frontendUrl: url,
|
|
5212
|
-
agents: this.agents
|
|
5220
|
+
agents: this.agents,
|
|
5221
|
+
metaEvents: request.metaEvents
|
|
5213
5222
|
});
|
|
5214
5223
|
const configuredActions = typeof this.actions === "function" ? this.actions({
|
|
5215
5224
|
properties: graphqlContext.properties,
|
|
@@ -5917,6 +5926,16 @@ var CopilotResolver = class {
|
|
|
5917
5926
|
return;
|
|
5918
5927
|
}
|
|
5919
5928
|
switch (event.name) {
|
|
5929
|
+
case LangGraphEventTypes.OnInterrupt:
|
|
5930
|
+
push((0, import_class_transformer3.plainToInstance)(LangGraphInterruptEvent, {
|
|
5931
|
+
// @ts-ignore
|
|
5932
|
+
type: event.type,
|
|
5933
|
+
// @ts-ignore
|
|
5934
|
+
name: RuntimeMetaEventName.LangGraphInterruptEvent,
|
|
5935
|
+
// @ts-ignore
|
|
5936
|
+
value: event.value
|
|
5937
|
+
}));
|
|
5938
|
+
break;
|
|
5920
5939
|
case RuntimeMetaEventName.LangGraphInterruptEvent:
|
|
5921
5940
|
push((0, import_class_transformer3.plainToInstance)(LangGraphInterruptEvent, {
|
|
5922
5941
|
type: event.type,
|