@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
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint,
|
|
3
3
|
getRuntimeInstanceTelemetryInfo,
|
|
4
4
|
telemetry_client_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IZAPLBCH.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-FHD4JECV.mjs";
|
|
@@ -22,4 +22,4 @@ __name(copilotRuntimeNestEndpoint, "copilotRuntimeNestEndpoint");
|
|
|
22
22
|
export {
|
|
23
23
|
copilotRuntimeNestEndpoint
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-JH3OA44N.mjs.map
|
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.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",
|
|
@@ -3947,7 +3947,7 @@ var import_shared15 = require("@copilotkit/shared");
|
|
|
3947
3947
|
|
|
3948
3948
|
// src/lib/runtime/agui-action.ts
|
|
3949
3949
|
var import_shared13 = require("@copilotkit/shared");
|
|
3950
|
-
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent }) {
|
|
3950
|
+
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents }) {
|
|
3951
3951
|
const action = {
|
|
3952
3952
|
name: agent.agentId,
|
|
3953
3953
|
description: agent.description,
|
|
@@ -3955,6 +3955,7 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
|
|
|
3955
3955
|
handler: async (_args) => {
|
|
3956
3956
|
},
|
|
3957
3957
|
remoteAgentHandler: async ({ actionInputsWithoutAgents, threadId }) => {
|
|
3958
|
+
var _a;
|
|
3958
3959
|
logger2.debug({
|
|
3959
3960
|
actionName: agent.agentId
|
|
3960
3961
|
}, "Executing remote agent");
|
|
@@ -3981,8 +3982,14 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
|
|
|
3981
3982
|
parameters: JSON.parse(input.jsonSchema)
|
|
3982
3983
|
};
|
|
3983
3984
|
});
|
|
3985
|
+
const forwardedProps = metaEvents.length ? {
|
|
3986
|
+
command: {
|
|
3987
|
+
resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
|
|
3988
|
+
}
|
|
3989
|
+
} : void 0;
|
|
3984
3990
|
return agent.legacy_to_be_removed_runAgentBridged({
|
|
3985
|
-
tools
|
|
3991
|
+
tools,
|
|
3992
|
+
forwardedProps
|
|
3986
3993
|
});
|
|
3987
3994
|
}
|
|
3988
3995
|
};
|
|
@@ -4093,7 +4100,7 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
|
|
|
4093
4100
|
}
|
|
4094
4101
|
}
|
|
4095
4102
|
__name(fetchRemoteInfo, "fetchRemoteInfo");
|
|
4096
|
-
async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents }) {
|
|
4103
|
+
async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents }) {
|
|
4097
4104
|
const logger2 = graphqlContext.logger.child({
|
|
4098
4105
|
component: "remote-actions.fetchRemoteActions"
|
|
4099
4106
|
});
|
|
@@ -4155,7 +4162,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
|
|
|
4155
4162
|
logger: logger2,
|
|
4156
4163
|
messages,
|
|
4157
4164
|
agentStates,
|
|
4158
|
-
agent
|
|
4165
|
+
agent,
|
|
4166
|
+
metaEvents
|
|
4159
4167
|
}));
|
|
4160
4168
|
}
|
|
4161
4169
|
return result.flat();
|
|
@@ -5593,7 +5601,8 @@ please use an LLM adapter instead.`
|
|
|
5593
5601
|
messages: inputMessages,
|
|
5594
5602
|
agentStates,
|
|
5595
5603
|
frontendUrl: url,
|
|
5596
|
-
agents: this.agents
|
|
5604
|
+
agents: this.agents,
|
|
5605
|
+
metaEvents: request.metaEvents
|
|
5597
5606
|
});
|
|
5598
5607
|
const configuredActions = typeof this.actions === "function" ? this.actions({
|
|
5599
5608
|
properties: graphqlContext.properties,
|
|
@@ -6301,6 +6310,16 @@ var CopilotResolver = class {
|
|
|
6301
6310
|
return;
|
|
6302
6311
|
}
|
|
6303
6312
|
switch (event.name) {
|
|
6313
|
+
case LangGraphEventTypes.OnInterrupt:
|
|
6314
|
+
push((0, import_class_transformer3.plainToInstance)(LangGraphInterruptEvent, {
|
|
6315
|
+
// @ts-ignore
|
|
6316
|
+
type: event.type,
|
|
6317
|
+
// @ts-ignore
|
|
6318
|
+
name: RuntimeMetaEventName.LangGraphInterruptEvent,
|
|
6319
|
+
// @ts-ignore
|
|
6320
|
+
value: event.value
|
|
6321
|
+
}));
|
|
6322
|
+
break;
|
|
6304
6323
|
case RuntimeMetaEventName.LangGraphInterruptEvent:
|
|
6305
6324
|
push((0, import_class_transformer3.plainToInstance)(LangGraphInterruptEvent, {
|
|
6306
6325
|
type: event.type,
|