@copilotkit/runtime 1.5.12-next.0 → 1.5.12-next.2
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 +13 -0
- package/dist/{chunk-4YJIXJLO.mjs → chunk-BETLEV37.mjs} +2 -2
- package/dist/{chunk-4QJA7OT2.mjs → chunk-FA5DJ2TZ.mjs} +61 -19
- package/dist/chunk-FA5DJ2TZ.mjs.map +1 -0
- package/dist/chunk-HNUNXFTW.mjs +129 -0
- package/dist/chunk-HNUNXFTW.mjs.map +1 -0
- package/dist/{chunk-XXYYCH4X.mjs → chunk-SFLMY3ES.mjs} +2 -2
- package/dist/{chunk-7BOVBWKI.mjs → chunk-ZCU6UPCY.mjs} +2 -2
- package/dist/{copilot-runtime-36700e00.d.ts → copilot-runtime-1a224a0f.d.ts} +2 -2
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/graphql/types/converted/index.js +63 -0
- package/dist/graphql/types/converted/index.js.map +1 -1
- package/dist/graphql/types/converted/index.mjs +1 -1
- package/dist/{groq-adapter-696b5d29.d.ts → groq-adapter-c35c5374.d.ts} +1 -1
- package/dist/{index-cc2b17be.d.ts → index-24315d90.d.ts} +16 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +121 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{langserve-9125a12e.d.ts → langserve-a16ef8f4.d.ts} +7 -3
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +121 -16
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +5 -5
- package/dist/lib/integrations/index.d.ts +4 -4
- package/dist/lib/integrations/index.js +64 -1
- 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 +3 -3
- package/dist/lib/integrations/nest/index.js +64 -1
- 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 +3 -3
- package/dist/lib/integrations/node-express/index.js +64 -1
- 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 +3 -3
- package/dist/lib/integrations/node-http/index.js +64 -1
- 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 +4 -4
- package/package.json +2 -2
- package/src/graphql/types/converted/index.ts +66 -0
- package/src/lib/runtime/copilot-runtime.ts +5 -1
- package/src/service-adapters/events.ts +58 -16
- package/dist/chunk-4QJA7OT2.mjs.map +0 -1
- package/dist/chunk-RFF5IIZJ.mjs +0 -66
- package/dist/chunk-RFF5IIZJ.mjs.map +0 -1
- /package/dist/{chunk-4YJIXJLO.mjs.map → chunk-BETLEV37.mjs.map} +0 -0
- /package/dist/{chunk-XXYYCH4X.mjs.map → chunk-SFLMY3ES.mjs.map} +0 -0
- /package/dist/{chunk-7BOVBWKI.mjs.map → chunk-ZCU6UPCY.mjs.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copilotRuntimeNestEndpoint
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-BETLEV37.mjs";
|
|
4
|
+
import "../../../chunk-FA5DJ2TZ.mjs";
|
|
5
5
|
import "../../../chunk-CLGKEUOA.mjs";
|
|
6
6
|
import "../../../chunk-U3V2BCGI.mjs";
|
|
7
|
-
import "../../../chunk-
|
|
7
|
+
import "../../../chunk-HNUNXFTW.mjs";
|
|
8
8
|
import "../../../chunk-D2WLFQS6.mjs";
|
|
9
9
|
import "../../../chunk-44O2JGUY.mjs";
|
|
10
10
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as graphql_yoga from 'graphql-yoga';
|
|
2
|
-
import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../../copilot-runtime-
|
|
2
|
+
import { d as CreateCopilotRuntimeServerOptions, G as GraphQLContext } from '../../../copilot-runtime-1a224a0f.js';
|
|
3
3
|
import '@copilotkit/shared';
|
|
4
|
-
import '../../../langserve-
|
|
5
|
-
import '../../../index-
|
|
4
|
+
import '../../../langserve-a16ef8f4.js';
|
|
5
|
+
import '../../../index-24315d90.js';
|
|
6
6
|
import '../../../graphql/types/base/index.js';
|
|
7
7
|
import 'rxjs';
|
|
8
8
|
import 'graphql';
|
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.5.12-next.
|
|
47
|
+
version: "1.5.12-next.2",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -1290,6 +1290,69 @@ var ResultMessage = class extends Message {
|
|
|
1290
1290
|
actionExecutionId;
|
|
1291
1291
|
actionName;
|
|
1292
1292
|
result;
|
|
1293
|
+
static encodeResult(result, error) {
|
|
1294
|
+
const errorObj = error ? typeof error === "string" ? {
|
|
1295
|
+
code: "ERROR",
|
|
1296
|
+
message: error
|
|
1297
|
+
} : error instanceof Error ? {
|
|
1298
|
+
code: "ERROR",
|
|
1299
|
+
message: error.message
|
|
1300
|
+
} : error : void 0;
|
|
1301
|
+
if (errorObj) {
|
|
1302
|
+
return JSON.stringify({
|
|
1303
|
+
error: errorObj,
|
|
1304
|
+
result: result || ""
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
if (result === void 0) {
|
|
1308
|
+
return "";
|
|
1309
|
+
}
|
|
1310
|
+
return typeof result === "string" ? result : JSON.stringify(result);
|
|
1311
|
+
}
|
|
1312
|
+
static decodeResult(result) {
|
|
1313
|
+
if (!result) {
|
|
1314
|
+
return {
|
|
1315
|
+
result: ""
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
try {
|
|
1319
|
+
const parsed = JSON.parse(result);
|
|
1320
|
+
if (parsed && typeof parsed === "object") {
|
|
1321
|
+
if ("error" in parsed) {
|
|
1322
|
+
return {
|
|
1323
|
+
error: parsed.error,
|
|
1324
|
+
result: parsed.result || ""
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
return {
|
|
1328
|
+
result: JSON.stringify(parsed)
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
return {
|
|
1332
|
+
result
|
|
1333
|
+
};
|
|
1334
|
+
} catch (e) {
|
|
1335
|
+
return {
|
|
1336
|
+
result
|
|
1337
|
+
};
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
hasError() {
|
|
1341
|
+
try {
|
|
1342
|
+
const { error } = ResultMessage.decodeResult(this.result);
|
|
1343
|
+
return !!error;
|
|
1344
|
+
} catch {
|
|
1345
|
+
return false;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
getError() {
|
|
1349
|
+
try {
|
|
1350
|
+
const { error } = ResultMessage.decodeResult(this.result);
|
|
1351
|
+
return error;
|
|
1352
|
+
} catch {
|
|
1353
|
+
return void 0;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1293
1356
|
};
|
|
1294
1357
|
__name(ResultMessage, "ResultMessage");
|
|
1295
1358
|
var AgentStateMessage = class extends Message {
|