@copilotkit/runtime 1.8.14-next.1 → 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 +14 -0
- package/dist/{chunk-F4NU7EVL.mjs → chunk-6P6VMQLZ.mjs} +28 -14
- package/dist/chunk-6P6VMQLZ.mjs.map +1 -0
- package/dist/{chunk-KTTUYDBP.mjs → chunk-BMA7V5T7.mjs} +2 -2
- package/dist/{chunk-WUBMXNOG.mjs → chunk-C7XHY7LW.mjs} +2 -2
- package/dist/{chunk-JJBN24EK.mjs → chunk-T2RKWYXN.mjs} +2 -2
- package/dist/index.js +27 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/lib/index.js +27 -13
- 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/{agentwire-action.ts → agui-action.ts} +13 -8
- package/src/lib/runtime/copilot-runtime.ts +11 -2
- package/src/lib/runtime/remote-actions.ts +5 -2
- package/dist/chunk-F4NU7EVL.mjs.map +0 -1
- /package/dist/{chunk-KTTUYDBP.mjs.map → chunk-BMA7V5T7.mjs.map} +0 -0
- /package/dist/{chunk-WUBMXNOG.mjs.map → chunk-C7XHY7LW.mjs.map} +0 -0
- /package/dist/{chunk-JJBN24EK.mjs.map → chunk-T2RKWYXN.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @copilotkit/runtime
|
|
2
2
|
|
|
3
|
+
## 1.8.14-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9d33836: - fix: prepare cpk agui wiring for ag-ui langgraph support
|
|
8
|
+
- @copilotkit/shared@1.8.14-next.3
|
|
9
|
+
|
|
10
|
+
## 1.8.14-next.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 1af7333: - docs: updates ag-ui agent interface
|
|
15
|
+
- @copilotkit/shared@1.8.14-next.2
|
|
16
|
+
|
|
3
17
|
## 1.8.14-next.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -40,7 +40,7 @@ var require_package = __commonJS({
|
|
|
40
40
|
publishConfig: {
|
|
41
41
|
access: "public"
|
|
42
42
|
},
|
|
43
|
-
version: "1.8.14-next.
|
|
43
|
+
version: "1.8.14-next.3",
|
|
44
44
|
sideEffects: false,
|
|
45
45
|
main: "./dist/index.js",
|
|
46
46
|
module: "./dist/index.mjs",
|
|
@@ -2696,9 +2696,9 @@ __name(createHeaders, "createHeaders");
|
|
|
2696
2696
|
// src/lib/runtime/remote-actions.ts
|
|
2697
2697
|
import { CopilotKitLowLevelError as CopilotKitLowLevelError2, ResolvedCopilotKitError as ResolvedCopilotKitError2, CopilotKitError as CopilotKitError2 } from "@copilotkit/shared";
|
|
2698
2698
|
|
|
2699
|
-
// src/lib/runtime/
|
|
2699
|
+
// src/lib/runtime/agui-action.ts
|
|
2700
2700
|
import { parseJson as parseJson3 } from "@copilotkit/shared";
|
|
2701
|
-
function
|
|
2701
|
+
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents }) {
|
|
2702
2702
|
const action = {
|
|
2703
2703
|
name: agent.agentId,
|
|
2704
2704
|
description: agent.description,
|
|
@@ -2706,10 +2706,11 @@ function constructAgentWireRemoteAction({ logger: logger2, messages, agentStates
|
|
|
2706
2706
|
handler: async (_args) => {
|
|
2707
2707
|
},
|
|
2708
2708
|
remoteAgentHandler: async ({ actionInputsWithoutAgents, threadId }) => {
|
|
2709
|
+
var _a;
|
|
2709
2710
|
logger2.debug({
|
|
2710
2711
|
actionName: agent.agentId
|
|
2711
2712
|
}, "Executing remote agent");
|
|
2712
|
-
const agentWireMessages =
|
|
2713
|
+
const agentWireMessages = convertMessagesToAGUIMessage(messages);
|
|
2713
2714
|
agent.messages = agentWireMessages;
|
|
2714
2715
|
agent.threadId = threadId;
|
|
2715
2716
|
telemetry_client_default.capture("oss.runtime.remote_action_executed", {
|
|
@@ -2733,7 +2734,9 @@ function constructAgentWireRemoteAction({ logger: logger2, messages, agentStates
|
|
|
2733
2734
|
};
|
|
2734
2735
|
});
|
|
2735
2736
|
return agent.legacy_to_be_removed_runAgentBridged({
|
|
2736
|
-
tools
|
|
2737
|
+
tools,
|
|
2738
|
+
// @ts-ignore
|
|
2739
|
+
resume: (_a = metaEvents[0]) == null ? void 0 : _a.response
|
|
2737
2740
|
});
|
|
2738
2741
|
}
|
|
2739
2742
|
};
|
|
@@ -2741,8 +2744,8 @@ function constructAgentWireRemoteAction({ logger: logger2, messages, agentStates
|
|
|
2741
2744
|
action
|
|
2742
2745
|
];
|
|
2743
2746
|
}
|
|
2744
|
-
__name(
|
|
2745
|
-
function
|
|
2747
|
+
__name(constructAGUIRemoteAction, "constructAGUIRemoteAction");
|
|
2748
|
+
function convertMessagesToAGUIMessage(messages) {
|
|
2746
2749
|
const result = [];
|
|
2747
2750
|
for (const message of messages) {
|
|
2748
2751
|
if (message.isTextMessage()) {
|
|
@@ -2786,7 +2789,7 @@ function convertMessagesToAgentWire(messages) {
|
|
|
2786
2789
|
}
|
|
2787
2790
|
return result;
|
|
2788
2791
|
}
|
|
2789
|
-
__name(
|
|
2792
|
+
__name(convertMessagesToAGUIMessage, "convertMessagesToAGUIMessage");
|
|
2790
2793
|
|
|
2791
2794
|
// src/lib/runtime/remote-actions.ts
|
|
2792
2795
|
var EndpointType;
|
|
@@ -2844,7 +2847,7 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
|
|
|
2844
2847
|
}
|
|
2845
2848
|
}
|
|
2846
2849
|
__name(fetchRemoteInfo, "fetchRemoteInfo");
|
|
2847
|
-
async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents }) {
|
|
2850
|
+
async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents }) {
|
|
2848
2851
|
const logger2 = graphqlContext.logger.child({
|
|
2849
2852
|
component: "remote-actions.fetchRemoteActions"
|
|
2850
2853
|
});
|
|
@@ -2902,11 +2905,12 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
|
|
|
2902
2905
|
} else if (agent.agentId === void 0) {
|
|
2903
2906
|
agent.agentId = key;
|
|
2904
2907
|
}
|
|
2905
|
-
result.push(
|
|
2908
|
+
result.push(constructAGUIRemoteAction({
|
|
2906
2909
|
logger: logger2,
|
|
2907
2910
|
messages,
|
|
2908
2911
|
agentStates,
|
|
2909
|
-
agent
|
|
2912
|
+
agent,
|
|
2913
|
+
metaEvents
|
|
2910
2914
|
}));
|
|
2911
2915
|
}
|
|
2912
2916
|
return result.flat();
|
|
@@ -3186,7 +3190,6 @@ var CopilotRuntime = class {
|
|
|
3186
3190
|
}
|
|
3187
3191
|
return newMessages;
|
|
3188
3192
|
}
|
|
3189
|
-
// --- MCP Instruction Injection Method ---
|
|
3190
3193
|
async processRuntimeRequest(request) {
|
|
3191
3194
|
var _a, _b, _c, _d, _e;
|
|
3192
3195
|
const { serviceAdapter, messages: rawMessages, actions: clientSideActionsInput, threadId, runId, outputMessagesPromise, graphqlContext, forwardedParameters, url, extensions, agentSession, agentStates, publicApiKey } = request;
|
|
@@ -3756,7 +3759,8 @@ please use an LLM adapter instead.`
|
|
|
3756
3759
|
messages: inputMessages,
|
|
3757
3760
|
agentStates,
|
|
3758
3761
|
frontendUrl: url,
|
|
3759
|
-
agents: this.agents
|
|
3762
|
+
agents: this.agents,
|
|
3763
|
+
metaEvents: request.metaEvents
|
|
3760
3764
|
});
|
|
3761
3765
|
const configuredActions = typeof this.actions === "function" ? this.actions({
|
|
3762
3766
|
properties: graphqlContext.properties,
|
|
@@ -4429,6 +4433,16 @@ var CopilotResolver = class {
|
|
|
4429
4433
|
return;
|
|
4430
4434
|
}
|
|
4431
4435
|
switch (event.name) {
|
|
4436
|
+
case LangGraphEventTypes.OnInterrupt:
|
|
4437
|
+
push(plainToInstance3(LangGraphInterruptEvent, {
|
|
4438
|
+
// @ts-ignore
|
|
4439
|
+
type: event.type,
|
|
4440
|
+
// @ts-ignore
|
|
4441
|
+
name: RuntimeMetaEventName.LangGraphInterruptEvent,
|
|
4442
|
+
// @ts-ignore
|
|
4443
|
+
value: event.value
|
|
4444
|
+
}));
|
|
4445
|
+
break;
|
|
4432
4446
|
case RuntimeMetaEventName.LangGraphInterruptEvent:
|
|
4433
4447
|
push(plainToInstance3(LangGraphInterruptEvent, {
|
|
4434
4448
|
type: event.type,
|
|
@@ -5080,4 +5094,4 @@ export {
|
|
|
5080
5094
|
getCommonConfig,
|
|
5081
5095
|
copilotRuntimeNodeHttpEndpoint
|
|
5082
5096
|
};
|
|
5083
|
-
//# sourceMappingURL=chunk-
|
|
5097
|
+
//# sourceMappingURL=chunk-6P6VMQLZ.mjs.map
|