@copilotkit/runtime 1.3.7 → 1.3.8
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 +8 -0
- package/dist/{chunk-HKURA7H3.mjs → chunk-73ZKFMNP.mjs} +2 -2
- package/dist/{chunk-TXVG65YE.mjs → chunk-BAVB62FW.mjs} +7 -4
- package/dist/chunk-BAVB62FW.mjs.map +1 -0
- package/dist/{chunk-IL7POK7R.mjs → chunk-ISVFINMD.mjs} +2 -2
- package/dist/{chunk-V6JSDIHG.mjs → chunk-IZJFHNAB.mjs} +3 -3
- package/dist/{chunk-V6JSDIHG.mjs.map → chunk-IZJFHNAB.mjs.map} +1 -1
- package/dist/{chunk-DC7DLTU6.mjs → chunk-J3XK2PKQ.mjs} +3 -3
- package/dist/{chunk-3BSPBSR7.mjs → chunk-UAWTV7LL.mjs} +3 -3
- package/dist/{chunk-3BSPBSR7.mjs.map → chunk-UAWTV7LL.mjs.map} +1 -1
- package/dist/{chunk-JUNGFQE7.mjs → chunk-UCGUATSD.mjs} +2 -2
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/lib/index.js +7 -4
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +7 -7
- 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 +3 -3
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +2 -2
- package/package.json +4 -4
- package/src/agents/langgraph/event-source.ts +3 -0
- package/src/graphql/resolvers/copilot.resolver.ts +1 -1
- package/src/service-adapters/anthropic/anthropic-adapter.ts +1 -1
- package/src/service-adapters/langchain/utils.ts +3 -1
- package/dist/chunk-TXVG65YE.mjs.map +0 -1
- /package/dist/{chunk-HKURA7H3.mjs.map → chunk-73ZKFMNP.mjs.map} +0 -0
- /package/dist/{chunk-IL7POK7R.mjs.map → chunk-ISVFINMD.mjs.map} +0 -0
- /package/dist/{chunk-DC7DLTU6.mjs.map → chunk-J3XK2PKQ.mjs.map} +0 -0
- /package/dist/{chunk-JUNGFQE7.mjs.map → chunk-UCGUATSD.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotRuntime,
|
|
3
3
|
flattenToolCallsNoDuplicates
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-J3XK2PKQ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
AnthropicAdapter,
|
|
7
7
|
GoogleGenerativeAIAdapter,
|
|
@@ -11,25 +11,25 @@ import {
|
|
|
11
11
|
OpenAIAssistantAdapter,
|
|
12
12
|
RemoteChain,
|
|
13
13
|
UnifyAdapter
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UAWTV7LL.mjs";
|
|
15
15
|
import {
|
|
16
16
|
config,
|
|
17
17
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
18
18
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UCGUATSD.mjs";
|
|
20
20
|
import {
|
|
21
21
|
copilotRuntimeNestEndpoint
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-73ZKFMNP.mjs";
|
|
23
23
|
import {
|
|
24
24
|
copilotRuntimeNodeExpressEndpoint
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ISVFINMD.mjs";
|
|
26
26
|
import {
|
|
27
27
|
buildSchema,
|
|
28
28
|
copilotRuntimeNodeHttpEndpoint,
|
|
29
29
|
createContext,
|
|
30
30
|
getCommonConfig
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-BAVB62FW.mjs";
|
|
32
|
+
import "./chunk-IZJFHNAB.mjs";
|
|
33
33
|
import {
|
|
34
34
|
GuardrailsValidationFailureResponse,
|
|
35
35
|
MessageStreamInterruptedResponse,
|
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.3.
|
|
47
|
+
version: "1.3.8",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -551,7 +551,7 @@ function maybeSendActionExecutionResultIsMessage(eventStream$, actionExecution)
|
|
|
551
551
|
}
|
|
552
552
|
__name(maybeSendActionExecutionResultIsMessage, "maybeSendActionExecutionResultIsMessage");
|
|
553
553
|
async function streamLangChainResponse({ result, eventStream$, actionExecution }) {
|
|
554
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
554
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
555
555
|
if (typeof result === "string") {
|
|
556
556
|
if (!actionExecution) {
|
|
557
557
|
eventStream$.sendTextMessage((0, import_shared2.randomId)(), result);
|
|
@@ -621,7 +621,7 @@ async function streamLangChainResponse({ result, eventStream$, actionExecution }
|
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
if (mode === "message" && content) {
|
|
624
|
-
eventStream$.sendTextMessageContent(content);
|
|
624
|
+
eventStream$.sendTextMessageContent(Array.isArray(content) ? ((_i = content[0]) == null ? void 0 : _i.text) ?? "" : content);
|
|
625
625
|
} else if (mode === "function" && toolCallArgs) {
|
|
626
626
|
eventStream$.sendActionExecutionArgs(toolCallArgs);
|
|
627
627
|
}
|
|
@@ -1151,6 +1151,9 @@ var RemoteLangGraphEventSource = class {
|
|
|
1151
1151
|
} else if (acc.content && acc.content != "") {
|
|
1152
1152
|
acc.prevMessageId = acc.messageId;
|
|
1153
1153
|
acc.messageId = (_q = (_p = (_o = event.data) == null ? void 0 : _o.chunk) == null ? void 0 : _p.kwargs) == null ? void 0 : _q.id;
|
|
1154
|
+
} else {
|
|
1155
|
+
acc.prevToolCallMessageId = acc.toolCallMessageId;
|
|
1156
|
+
acc.prevMessageId = acc.messageId;
|
|
1154
1157
|
}
|
|
1155
1158
|
} else {
|
|
1156
1159
|
acc.prevToolCallMessageId = acc.toolCallMessageId;
|
|
@@ -3271,7 +3274,7 @@ var CopilotResolver = class {
|
|
|
3271
3274
|
(0, import_rxjs4.takeWhile)((e) => e.type != RuntimeEventTypes.TextMessageEnd)
|
|
3272
3275
|
);
|
|
3273
3276
|
const streamingTextStatus = new import_rxjs4.Subject();
|
|
3274
|
-
const messageId = (0, import_shared9.randomId)();
|
|
3277
|
+
const messageId = event.messageId ?? (0, import_shared9.randomId)();
|
|
3275
3278
|
pushMessage({
|
|
3276
3279
|
id: messageId,
|
|
3277
3280
|
status: (0, import_rxjs4.firstValueFrom)(streamingTextStatus),
|