@copilotkit/runtime 1.4.0-pre-1-4-0-alpha.10 → 1.4.0-pre-1-4-0.14
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 +160 -24
- package/dist/{chunk-YUJSVJWS.mjs → chunk-6H45CJUK.mjs} +2 -2
- package/dist/{chunk-SBWLAAB3.mjs → chunk-N4ROMSZN.mjs} +2 -2
- package/dist/{chunk-SVL5LEKB.mjs → chunk-NFMXFL2C.mjs} +2 -2
- package/dist/{chunk-56IQ6PGC.mjs → chunk-WHJ3DAYL.mjs} +56 -213
- package/dist/chunk-WHJ3DAYL.mjs.map +1 -0
- package/dist/{chunk-RDHJQVWH.mjs → chunk-X4FFTYTH.mjs} +49 -92
- package/dist/chunk-X4FFTYTH.mjs.map +1 -0
- package/dist/{copilot-runtime-dbe5fa02.d.ts → copilot-runtime-335a610d.d.ts} +8 -8
- package/dist/{groq-adapter-192d2413.d.ts → groq-adapter-2f8fd767.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +103 -303
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/{langserve-878c62b9.d.ts → langserve-cc06e76e.d.ts} +9 -45
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +97 -282
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +7 -7
- package/dist/lib/integrations/index.d.ts +3 -3
- package/dist/lib/integrations/index.js +6 -14
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +5 -5
- package/dist/lib/integrations/nest/index.d.ts +2 -2
- package/dist/lib/integrations/nest/index.js +6 -14
- 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.d.ts +2 -2
- package/dist/lib/integrations/node-express/index.js +6 -14
- 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.d.ts +2 -2
- package/dist/lib/integrations/node-http/index.js +6 -14
- 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.d.ts +3 -3
- package/dist/service-adapters/index.js +55 -212
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +4 -4
- package/src/agents/langgraph/event-source.ts +2 -14
- package/src/graphql/resolvers/copilot.resolver.ts +2 -28
- package/src/lib/runtime/copilot-runtime.ts +6 -6
- package/src/lib/runtime/remote-action-constructors.ts +7 -7
- package/src/lib/runtime/remote-actions.ts +9 -9
- package/src/lib/runtime/{remote-lg-cloud-action.ts → remote-lg-action.ts} +18 -18
- package/src/lib/telemetry-client.ts +3 -3
- package/src/service-adapters/anthropic/anthropic-adapter.ts +6 -15
- package/src/service-adapters/events.ts +35 -73
- package/src/service-adapters/experimental/ollama/ollama-adapter.ts +3 -7
- package/src/service-adapters/groq/groq-adapter.ts +8 -22
- package/src/service-adapters/langchain/utils.ts +31 -47
- package/src/service-adapters/openai/openai-adapter.ts +9 -21
- package/src/service-adapters/openai/openai-assistant-adapter.ts +8 -21
- package/src/service-adapters/unify/unify-adapter.ts +11 -28
- package/dist/chunk-56IQ6PGC.mjs.map +0 -1
- package/dist/chunk-RDHJQVWH.mjs.map +0 -1
- /package/dist/{chunk-YUJSVJWS.mjs.map → chunk-6H45CJUK.mjs.map} +0 -0
- /package/dist/{chunk-SBWLAAB3.mjs.map → chunk-N4ROMSZN.mjs.map} +0 -0
- /package/dist/{chunk-SVL5LEKB.mjs.map → chunk-NFMXFL2C.mjs.map} +0 -0
package/dist/lib/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-6H45CJUK.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-NFMXFL2C.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-N4ROMSZN.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
buildSchema,
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
createContext,
|
|
19
19
|
flattenToolCallsNoDuplicates,
|
|
20
20
|
getCommonConfig,
|
|
21
|
-
|
|
21
|
+
langGraphPlatformEndpoint,
|
|
22
22
|
resolveEndpointType
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-X4FFTYTH.mjs";
|
|
24
24
|
import {
|
|
25
25
|
GoogleGenerativeAIAdapter,
|
|
26
26
|
GroqAdapter,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
OpenAIAdapter,
|
|
29
29
|
OpenAIAssistantAdapter,
|
|
30
30
|
UnifyAdapter
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-WHJ3DAYL.mjs";
|
|
32
32
|
import "../chunk-U3V2BCGI.mjs";
|
|
33
33
|
import "../chunk-B74M7FXG.mjs";
|
|
34
34
|
import "../chunk-D2WLFQS6.mjs";
|
|
@@ -52,7 +52,7 @@ export {
|
|
|
52
52
|
createContext,
|
|
53
53
|
flattenToolCallsNoDuplicates,
|
|
54
54
|
getCommonConfig,
|
|
55
|
-
|
|
55
|
+
langGraphPlatformEndpoint,
|
|
56
56
|
resolveEndpointType
|
|
57
57
|
};
|
|
58
58
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-
|
|
2
|
-
export { h as CommonConfig, b as CopilotRequestContextProperties, g as buildSchema, e as createContext, i as getCommonConfig } from '../../copilot-runtime-
|
|
1
|
+
import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../copilot-runtime-335a610d.js';
|
|
2
|
+
export { h as CommonConfig, b as CopilotRequestContextProperties, g as buildSchema, e as createContext, i as getCommonConfig } from '../../copilot-runtime-335a610d.js';
|
|
3
3
|
import * as graphql_yoga from 'graphql-yoga';
|
|
4
4
|
import { YogaServerInstance } from 'graphql-yoga';
|
|
5
5
|
export { copilotRuntimeNodeHttpEndpoint } from './node-http/index.js';
|
|
6
6
|
export { copilotRuntimeNodeExpressEndpoint } from './node-express/index.js';
|
|
7
7
|
export { copilotRuntimeNestEndpoint } from './nest/index.js';
|
|
8
8
|
import '@copilotkit/shared';
|
|
9
|
-
import '../../langserve-
|
|
9
|
+
import '../../langserve-cc06e76e.js';
|
|
10
10
|
import '../../index-83ee522f.js';
|
|
11
11
|
import '../../graphql/types/base/index.js';
|
|
12
12
|
import 'rxjs';
|
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.4.0-pre-1-4-0
|
|
47
|
+
version: "1.4.0-pre-1-4-0.14",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -1195,7 +1195,7 @@ var import_shared2 = require("@copilotkit/shared");
|
|
|
1195
1195
|
var EndpointType;
|
|
1196
1196
|
(function(EndpointType2) {
|
|
1197
1197
|
EndpointType2["CopilotKit"] = "copilotKit";
|
|
1198
|
-
EndpointType2["
|
|
1198
|
+
EndpointType2["LangGraphPlatform"] = "langgraph-platform";
|
|
1199
1199
|
})(EndpointType || (EndpointType = {}));
|
|
1200
1200
|
|
|
1201
1201
|
// src/lib/telemetry-client.ts
|
|
@@ -1259,7 +1259,7 @@ var import_rxjs = require("rxjs");
|
|
|
1259
1259
|
function resolveEndpointType(endpoint) {
|
|
1260
1260
|
if (!endpoint.type) {
|
|
1261
1261
|
if ("langsmithApiKey" in endpoint && "deploymentUrl" in endpoint && "agents" in endpoint) {
|
|
1262
|
-
return EndpointType.
|
|
1262
|
+
return EndpointType.LangGraphPlatform;
|
|
1263
1263
|
} else {
|
|
1264
1264
|
return EndpointType.CopilotKit;
|
|
1265
1265
|
}
|
|
@@ -1289,7 +1289,7 @@ function getRuntimeInstanceTelemetryInfo(runtime) {
|
|
|
1289
1289
|
]
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
if (endpointType === EndpointType.
|
|
1292
|
+
if (endpointType === EndpointType.LangGraphPlatform) {
|
|
1293
1293
|
const ep = endpoint;
|
|
1294
1294
|
info = {
|
|
1295
1295
|
...info,
|
|
@@ -1576,9 +1576,7 @@ var CopilotResolver = class {
|
|
|
1576
1576
|
// skip until this message start event
|
|
1577
1577
|
(0, import_rxjs3.skipWhile)((e) => e !== event),
|
|
1578
1578
|
// take until the message end event
|
|
1579
|
-
(0, import_rxjs3.takeWhile)((e) =>
|
|
1580
|
-
// filter out any other message events or message ids
|
|
1581
|
-
(0, import_rxjs3.filter)((e) => e.type == RuntimeEventTypes.TextMessageContent && e.messageId == event.messageId)
|
|
1579
|
+
(0, import_rxjs3.takeWhile)((e) => e.type != RuntimeEventTypes.TextMessageEnd)
|
|
1582
1580
|
);
|
|
1583
1581
|
const streamingTextStatus = new import_rxjs3.Subject();
|
|
1584
1582
|
const messageId = event.messageId;
|
|
@@ -1642,13 +1640,7 @@ var CopilotResolver = class {
|
|
|
1642
1640
|
break;
|
|
1643
1641
|
case RuntimeEventTypes.ActionExecutionStart:
|
|
1644
1642
|
logger2.debug("Action execution start event received");
|
|
1645
|
-
const actionExecutionArgumentStream = eventStream.pipe(
|
|
1646
|
-
(0, import_rxjs3.skipWhile)((e) => e !== event),
|
|
1647
|
-
// take until the action execution end event
|
|
1648
|
-
(0, import_rxjs3.takeWhile)((e) => !(e.type === RuntimeEventTypes.ActionExecutionEnd && e.actionExecutionId == event.actionExecutionId)),
|
|
1649
|
-
// filter out any other action execution events or action execution ids
|
|
1650
|
-
(0, import_rxjs3.filter)((e) => e.type == RuntimeEventTypes.ActionExecutionArgs && e.actionExecutionId == event.actionExecutionId)
|
|
1651
|
-
);
|
|
1643
|
+
const actionExecutionArgumentStream = eventStream.pipe((0, import_rxjs3.skipWhile)((e) => e !== event), (0, import_rxjs3.takeWhile)((e) => e.type != RuntimeEventTypes.ActionExecutionEnd));
|
|
1652
1644
|
const streamingArgumentsStatus = new import_rxjs3.Subject();
|
|
1653
1645
|
pushMessage({
|
|
1654
1646
|
id: event.actionExecutionId,
|