@copilotkit/runtime 1.5.12-next.0 → 1.5.12-next.1
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 +7 -0
- package/dist/{chunk-4YJIXJLO.mjs → chunk-GOA7HNXW.mjs} +2 -2
- package/dist/chunk-HNUNXFTW.mjs +129 -0
- package/dist/chunk-HNUNXFTW.mjs.map +1 -0
- package/dist/{chunk-7BOVBWKI.mjs → chunk-NTSKJEJQ.mjs} +2 -2
- package/dist/{chunk-4QJA7OT2.mjs → chunk-P34QEPO5.mjs} +61 -19
- package/dist/chunk-P34QEPO5.mjs.map +1 -0
- package/dist/{chunk-XXYYCH4X.mjs → chunk-ZF34MJL7.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-GOA7HNXW.mjs.map} +0 -0
- /package/dist/{chunk-7BOVBWKI.mjs.map → chunk-NTSKJEJQ.mjs.map} +0 -0
- /package/dist/{chunk-XXYYCH4X.mjs.map → chunk-ZF34MJL7.mjs.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copilotRuntimeNodeExpressEndpoint
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-NTSKJEJQ.mjs";
|
|
4
|
+
import "../../../chunk-P34QEPO5.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.1",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -1288,6 +1288,69 @@ var ResultMessage = class extends Message {
|
|
|
1288
1288
|
actionExecutionId;
|
|
1289
1289
|
actionName;
|
|
1290
1290
|
result;
|
|
1291
|
+
static encodeResult(result, error) {
|
|
1292
|
+
const errorObj = error ? typeof error === "string" ? {
|
|
1293
|
+
code: "ERROR",
|
|
1294
|
+
message: error
|
|
1295
|
+
} : error instanceof Error ? {
|
|
1296
|
+
code: "ERROR",
|
|
1297
|
+
message: error.message
|
|
1298
|
+
} : error : void 0;
|
|
1299
|
+
if (errorObj) {
|
|
1300
|
+
return JSON.stringify({
|
|
1301
|
+
error: errorObj,
|
|
1302
|
+
result: result || ""
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
if (result === void 0) {
|
|
1306
|
+
return "";
|
|
1307
|
+
}
|
|
1308
|
+
return typeof result === "string" ? result : JSON.stringify(result);
|
|
1309
|
+
}
|
|
1310
|
+
static decodeResult(result) {
|
|
1311
|
+
if (!result) {
|
|
1312
|
+
return {
|
|
1313
|
+
result: ""
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
try {
|
|
1317
|
+
const parsed = JSON.parse(result);
|
|
1318
|
+
if (parsed && typeof parsed === "object") {
|
|
1319
|
+
if ("error" in parsed) {
|
|
1320
|
+
return {
|
|
1321
|
+
error: parsed.error,
|
|
1322
|
+
result: parsed.result || ""
|
|
1323
|
+
};
|
|
1324
|
+
}
|
|
1325
|
+
return {
|
|
1326
|
+
result: JSON.stringify(parsed)
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
return {
|
|
1330
|
+
result
|
|
1331
|
+
};
|
|
1332
|
+
} catch (e) {
|
|
1333
|
+
return {
|
|
1334
|
+
result
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
hasError() {
|
|
1339
|
+
try {
|
|
1340
|
+
const { error } = ResultMessage.decodeResult(this.result);
|
|
1341
|
+
return !!error;
|
|
1342
|
+
} catch {
|
|
1343
|
+
return false;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
getError() {
|
|
1347
|
+
try {
|
|
1348
|
+
const { error } = ResultMessage.decodeResult(this.result);
|
|
1349
|
+
return error;
|
|
1350
|
+
} catch {
|
|
1351
|
+
return void 0;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1291
1354
|
};
|
|
1292
1355
|
__name(ResultMessage, "ResultMessage");
|
|
1293
1356
|
var AgentStateMessage = class extends Message {
|