@copilotkit/runtime 1.10.6-next.4 → 1.10.6-next.6
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-F7IANE7Z.mjs → chunk-27JKTS6P.mjs} +8 -2
- package/dist/chunk-27JKTS6P.mjs.map +1 -0
- package/dist/{chunk-IDGTM3MH.mjs → chunk-3E7IQ6TR.mjs} +2 -2
- package/dist/{chunk-K3NXT234.mjs → chunk-BC7SRXHH.mjs} +10 -8
- package/dist/chunk-BC7SRXHH.mjs.map +1 -0
- package/dist/{chunk-MESW37CD.mjs → chunk-MTFW77DQ.mjs} +2 -2
- package/dist/{chunk-RA6S32TD.mjs → chunk-O7WFHCR2.mjs} +2 -2
- package/dist/{chunk-LPILCDAF.mjs → chunk-VCGA7OLG.mjs} +2 -2
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/lib/index.d.ts +8 -0
- package/dist/lib/index.js +15 -7
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +6 -6
- package/dist/lib/integrations/index.js +2 -2
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +5 -5
- package/dist/lib/integrations/nest/index.js +2 -2
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +3 -3
- package/dist/lib/integrations/node-express/index.js +2 -2
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +3 -3
- package/dist/lib/integrations/node-http/index.js +2 -2
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +2 -2
- package/dist/service-adapters/index.js +7 -1
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +3 -3
- package/src/lib/runtime/agui-action.ts +8 -4
- package/src/lib/runtime/copilot-runtime.ts +2 -1
- package/src/lib/runtime/remote-actions.ts +2 -8
- package/src/service-adapters/events.ts +1 -0
- package/src/service-adapters/langchain/utils.ts +8 -1
- package/dist/chunk-F7IANE7Z.mjs.map +0 -1
- package/dist/chunk-K3NXT234.mjs.map +0 -1
- /package/dist/{chunk-IDGTM3MH.mjs.map → chunk-3E7IQ6TR.mjs.map} +0 -0
- /package/dist/{chunk-MESW37CD.mjs.map → chunk-MTFW77DQ.mjs.map} +0 -0
- /package/dist/{chunk-RA6S32TD.mjs.map → chunk-O7WFHCR2.mjs.map} +0 -0
- /package/dist/{chunk-LPILCDAF.mjs.map → chunk-VCGA7OLG.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
CustomEventNames,
|
|
3
3
|
LangGraphAgent,
|
|
4
4
|
LangGraphHttpAgent
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MTFW77DQ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
config,
|
|
8
8
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
9
9
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3E7IQ6TR.mjs";
|
|
11
11
|
import {
|
|
12
12
|
copilotRuntimeNestEndpoint
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-O7WFHCR2.mjs";
|
|
14
14
|
import {
|
|
15
15
|
copilotRuntimeNodeExpressEndpoint
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VCGA7OLG.mjs";
|
|
17
17
|
import {
|
|
18
18
|
CopilotRuntime,
|
|
19
19
|
addCustomHeaderPlugin,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
getCommonConfig,
|
|
30
30
|
langGraphPlatformEndpoint,
|
|
31
31
|
resolveEndpointType
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-BC7SRXHH.mjs";
|
|
33
33
|
import "./chunk-SHBDMA63.mjs";
|
|
34
34
|
import {
|
|
35
35
|
AnthropicAdapter,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
OpenAIAssistantAdapter,
|
|
45
45
|
RemoteChain,
|
|
46
46
|
UnifyAdapter
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-27JKTS6P.mjs";
|
|
48
48
|
import {
|
|
49
49
|
GuardrailsValidationFailureResponse,
|
|
50
50
|
MessageStreamInterruptedResponse,
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -93,6 +93,14 @@ declare class LangGraphAgent extends LangGraphAgent$1 {
|
|
|
93
93
|
type: EventType.THINKING_TEXT_MESSAGE_END;
|
|
94
94
|
timestamp?: number | undefined;
|
|
95
95
|
rawEvent?: any;
|
|
96
|
+
} | {
|
|
97
|
+
type: EventType.TOOL_CALL_RESULT;
|
|
98
|
+
content: string;
|
|
99
|
+
toolCallId: string;
|
|
100
|
+
messageId: string;
|
|
101
|
+
role?: "tool" | undefined;
|
|
102
|
+
timestamp?: number | undefined;
|
|
103
|
+
rawEvent?: any;
|
|
96
104
|
} | {
|
|
97
105
|
type: EventType.THINKING_START;
|
|
98
106
|
timestamp?: number | undefined;
|
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.10.6-next.
|
|
47
|
+
version: "1.10.6-next.6",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -113,7 +113,7 @@ var require_package = __commonJS({
|
|
|
113
113
|
"@ag-ui/client": ">=0.0.39",
|
|
114
114
|
"@ag-ui/core": ">=0.0.39",
|
|
115
115
|
"@ag-ui/encoder": ">=0.0.39",
|
|
116
|
-
"@ag-ui/langgraph": ">=0.0.
|
|
116
|
+
"@ag-ui/langgraph": ">=0.0.18",
|
|
117
117
|
"@ag-ui/proto": ">=0.0.39"
|
|
118
118
|
},
|
|
119
119
|
keywords: [
|
|
@@ -583,6 +583,7 @@ function convertMessageToLangChainMessage(message) {
|
|
|
583
583
|
__name(convertMessageToLangChainMessage, "convertMessageToLangChainMessage");
|
|
584
584
|
function convertActionInputToLangChainTool(actionInput) {
|
|
585
585
|
return new import_tools.DynamicStructuredTool({
|
|
586
|
+
...actionInput,
|
|
586
587
|
name: actionInput.name,
|
|
587
588
|
description: actionInput.description,
|
|
588
589
|
schema: (0, import_shared5.convertJsonSchemaToZodSchema)(JSON.parse(actionInput.jsonSchema), true),
|
|
@@ -617,7 +618,12 @@ __name(maybeSendActionExecutionResultIsMessage, "maybeSendActionExecutionResultI
|
|
|
617
618
|
async function streamLangChainResponse({ result, eventStream$, actionExecution }) {
|
|
618
619
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
619
620
|
if (typeof result === "string") {
|
|
620
|
-
if (!actionExecution) {
|
|
621
|
+
if (!actionExecution || (actionExecution == null ? void 0 : actionExecution.returnDirect)) {
|
|
622
|
+
eventStream$.sendActionExecutionResult({
|
|
623
|
+
actionExecutionId: actionExecution.id,
|
|
624
|
+
actionName: actionExecution.name,
|
|
625
|
+
result
|
|
626
|
+
});
|
|
621
627
|
eventStream$.sendTextMessage((0, import_shared5.randomId)(), result);
|
|
622
628
|
} else {
|
|
623
629
|
eventStream$.sendActionExecutionResult({
|
|
@@ -4524,7 +4530,8 @@ please use an LLM adapter instead.`
|
|
|
4524
4530
|
const serverSideActionsInput = serverSideActions.map((action) => ({
|
|
4525
4531
|
name: action.name,
|
|
4526
4532
|
description: action.description,
|
|
4527
|
-
jsonSchema: JSON.stringify((0, import_shared15.actionParametersToJsonSchema)(action.parameters))
|
|
4533
|
+
jsonSchema: JSON.stringify((0, import_shared15.actionParametersToJsonSchema)(action.parameters)),
|
|
4534
|
+
additionalConfig: action.additionalConfig
|
|
4528
4535
|
}));
|
|
4529
4536
|
const actionInputs = flattenToolCallsNoDuplicates([
|
|
4530
4537
|
...serverSideActionsInput,
|
|
@@ -5958,7 +5965,7 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
|
|
|
5958
5965
|
name: agent.agentId,
|
|
5959
5966
|
description: agent.description,
|
|
5960
5967
|
parameters: [],
|
|
5961
|
-
handler: async (
|
|
5968
|
+
handler: async () => {
|
|
5962
5969
|
},
|
|
5963
5970
|
remoteAgentHandler: async ({ actionInputsWithoutAgents, threadId }) => {
|
|
5964
5971
|
var _a;
|
|
@@ -6435,7 +6442,7 @@ var RuntimeEventSource = class {
|
|
|
6435
6442
|
};
|
|
6436
6443
|
__name(RuntimeEventSource, "RuntimeEventSource");
|
|
6437
6444
|
async function executeAction(eventStream$, guardrailsResult$, action, actionArguments, actionExecutionParentMessageId, actionExecutionId, actionInputsWithoutAgents, threadId) {
|
|
6438
|
-
var _a;
|
|
6445
|
+
var _a, _b;
|
|
6439
6446
|
if (guardrailsResult$) {
|
|
6440
6447
|
const { status } = await (0, import_rxjs4.firstValueFrom)(guardrailsResult$);
|
|
6441
6448
|
if (status === "denied") {
|
|
@@ -6516,7 +6523,8 @@ async function executeAction(eventStream$, guardrailsResult$, action, actionArgu
|
|
|
6516
6523
|
eventStream$,
|
|
6517
6524
|
actionExecution: {
|
|
6518
6525
|
name: action.name,
|
|
6519
|
-
id: actionExecutionId
|
|
6526
|
+
id: actionExecutionId,
|
|
6527
|
+
returnDirect: (_b = action.additionalConfig) == null ? void 0 : _b.returnDirect
|
|
6520
6528
|
}
|
|
6521
6529
|
});
|
|
6522
6530
|
} catch (e) {
|