@copilotkit/runtime 1.10.4 → 1.10.5-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 +13 -0
- package/__snapshots__/schema/schema.graphql +6 -0
- package/dist/{chunk-HV5H6LOK.mjs → chunk-C56AVUZI.mjs} +2 -2
- package/dist/{chunk-HHMKB5P4.mjs → chunk-CX4GADTM.mjs} +2 -2
- package/dist/{chunk-XAA5PFCY.mjs → chunk-FOXQPOXW.mjs} +184 -136
- package/dist/chunk-FOXQPOXW.mjs.map +1 -0
- package/dist/{chunk-XGVZS3FD.mjs → chunk-H6QUY5ZQ.mjs} +16 -6
- package/dist/chunk-H6QUY5ZQ.mjs.map +1 -0
- package/dist/{chunk-CNG7I5M5.mjs → chunk-T4NLPBCY.mjs} +2 -2
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/{groq-adapter-4ba7b2f0.d.ts → groq-adapter-c8aec5c5.d.ts} +1 -1
- package/dist/{index-d4614f9b.d.ts → index-96b330da.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +216 -158
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{langserve-3f99bf2e.d.ts → langserve-0c6100e3.d.ts} +1 -1
- package/dist/lib/index.d.ts +12 -6
- package/dist/lib/index.js +216 -158
- 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 +188 -143
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +4 -4
- package/dist/lib/integrations/nest/index.d.ts +3 -3
- package/dist/lib/integrations/nest/index.js +188 -143
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +2 -2
- package/dist/lib/integrations/node-express/index.d.ts +3 -3
- package/dist/lib/integrations/node-express/index.js +188 -143
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +2 -2
- package/dist/lib/integrations/node-http/index.d.ts +3 -3
- package/dist/lib/integrations/node-http/index.js +188 -143
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +1 -1
- package/dist/service-adapters/index.d.ts +5 -5
- package/dist/{shared-26958730.d.ts → shared-35015e40.d.ts} +9 -2
- package/package.json +3 -3
- package/src/graphql/inputs/copilot-context.input.ts +10 -0
- package/src/graphql/inputs/generate-copilot-response.input.ts +4 -0
- package/src/graphql/resolvers/copilot.resolver.ts +1 -0
- package/src/lib/runtime/agui-action.ts +4 -0
- package/src/lib/runtime/copilot-runtime.ts +5 -0
- package/src/lib/runtime/langgraph/langgraph-agent.ts +27 -7
- package/src/lib/runtime/remote-actions.ts +4 -0
- package/dist/chunk-XAA5PFCY.mjs.map +0 -1
- package/dist/chunk-XGVZS3FD.mjs.map +0 -1
- /package/dist/{chunk-HV5H6LOK.mjs.map → chunk-C56AVUZI.mjs.map} +0 -0
- /package/dist/{chunk-HHMKB5P4.mjs.map → chunk-CX4GADTM.mjs.map} +0 -0
- /package/dist/{chunk-CNG7I5M5.mjs.map → chunk-T4NLPBCY.mjs.map} +0 -0
|
@@ -40,7 +40,7 @@ var require_package = __commonJS({
|
|
|
40
40
|
publishConfig: {
|
|
41
41
|
access: "public"
|
|
42
42
|
},
|
|
43
|
-
version: "1.10.
|
|
43
|
+
version: "1.10.5-next.1",
|
|
44
44
|
sideEffects: false,
|
|
45
45
|
main: "./dist/index.js",
|
|
46
46
|
module: "./dist/index.mjs",
|
|
@@ -81,7 +81,7 @@ var require_package = __commonJS({
|
|
|
81
81
|
"@ag-ui/client": "^0.0.37",
|
|
82
82
|
"@ag-ui/core": "^0.0.37",
|
|
83
83
|
"@ag-ui/encoder": "^0.0.37",
|
|
84
|
-
"@ag-ui/langgraph": "^0.0.
|
|
84
|
+
"@ag-ui/langgraph": "^0.0.13",
|
|
85
85
|
"@ag-ui/proto": "^0.0.37",
|
|
86
86
|
"@anthropic-ai/sdk": "^0.57.0",
|
|
87
87
|
"@copilotkit/shared": "workspace:*",
|
|
@@ -143,7 +143,7 @@ import { Arg, Ctx, Mutation, Query, Resolver } from "type-graphql";
|
|
|
143
143
|
import { ReplaySubject as ReplaySubject3, Subject, filter, finalize, firstValueFrom as firstValueFrom2, shareReplay, skipWhile, take, takeWhile, tap } from "rxjs";
|
|
144
144
|
|
|
145
145
|
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
146
|
-
import { Field as
|
|
146
|
+
import { Field as Field16, InputType as InputType12 } from "type-graphql";
|
|
147
147
|
|
|
148
148
|
// src/graphql/inputs/message.input.ts
|
|
149
149
|
import { Field, InputType } from "type-graphql";
|
|
@@ -1359,7 +1359,8 @@ MetaEventInput = _ts_decorate14([
|
|
|
1359
1359
|
InputType10()
|
|
1360
1360
|
], MetaEventInput);
|
|
1361
1361
|
|
|
1362
|
-
// src/graphql/inputs/
|
|
1362
|
+
// src/graphql/inputs/copilot-context.input.ts
|
|
1363
|
+
import { Field as Field15, InputType as InputType11 } from "type-graphql";
|
|
1363
1364
|
function _ts_decorate15(decorators, target, key, desc) {
|
|
1364
1365
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1365
1366
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -1376,18 +1377,52 @@ function _ts_metadata15(k, v) {
|
|
|
1376
1377
|
return Reflect.metadata(k, v);
|
|
1377
1378
|
}
|
|
1378
1379
|
__name(_ts_metadata15, "_ts_metadata");
|
|
1380
|
+
var CopilotContextInput = class {
|
|
1381
|
+
description;
|
|
1382
|
+
value;
|
|
1383
|
+
};
|
|
1384
|
+
__name(CopilotContextInput, "CopilotContextInput");
|
|
1385
|
+
_ts_decorate15([
|
|
1386
|
+
Field15(() => String),
|
|
1387
|
+
_ts_metadata15("design:type", String)
|
|
1388
|
+
], CopilotContextInput.prototype, "description", void 0);
|
|
1389
|
+
_ts_decorate15([
|
|
1390
|
+
Field15(() => String),
|
|
1391
|
+
_ts_metadata15("design:type", String)
|
|
1392
|
+
], CopilotContextInput.prototype, "value", void 0);
|
|
1393
|
+
CopilotContextInput = _ts_decorate15([
|
|
1394
|
+
InputType11()
|
|
1395
|
+
], CopilotContextInput);
|
|
1396
|
+
|
|
1397
|
+
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
1398
|
+
function _ts_decorate16(decorators, target, key, desc) {
|
|
1399
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1400
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1401
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1402
|
+
else
|
|
1403
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
1404
|
+
if (d = decorators[i])
|
|
1405
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1406
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1407
|
+
}
|
|
1408
|
+
__name(_ts_decorate16, "_ts_decorate");
|
|
1409
|
+
function _ts_metadata16(k, v) {
|
|
1410
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1411
|
+
return Reflect.metadata(k, v);
|
|
1412
|
+
}
|
|
1413
|
+
__name(_ts_metadata16, "_ts_metadata");
|
|
1379
1414
|
var GenerateCopilotResponseMetadataInput = class {
|
|
1380
1415
|
requestType;
|
|
1381
1416
|
};
|
|
1382
1417
|
__name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
|
|
1383
|
-
|
|
1384
|
-
|
|
1418
|
+
_ts_decorate16([
|
|
1419
|
+
Field16(() => CopilotRequestType, {
|
|
1385
1420
|
nullable: true
|
|
1386
1421
|
}),
|
|
1387
|
-
|
|
1422
|
+
_ts_metadata16("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
|
|
1388
1423
|
], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
|
|
1389
|
-
GenerateCopilotResponseMetadataInput =
|
|
1390
|
-
|
|
1424
|
+
GenerateCopilotResponseMetadataInput = _ts_decorate16([
|
|
1425
|
+
InputType12()
|
|
1391
1426
|
], GenerateCopilotResponseMetadataInput);
|
|
1392
1427
|
var GenerateCopilotResponseInput = class {
|
|
1393
1428
|
metadata;
|
|
@@ -1402,84 +1437,93 @@ var GenerateCopilotResponseInput = class {
|
|
|
1402
1437
|
agentStates;
|
|
1403
1438
|
extensions;
|
|
1404
1439
|
metaEvents;
|
|
1440
|
+
context;
|
|
1405
1441
|
};
|
|
1406
1442
|
__name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
|
|
1407
|
-
|
|
1408
|
-
|
|
1443
|
+
_ts_decorate16([
|
|
1444
|
+
Field16(() => GenerateCopilotResponseMetadataInput, {
|
|
1409
1445
|
nullable: false
|
|
1410
1446
|
}),
|
|
1411
|
-
|
|
1447
|
+
_ts_metadata16("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
|
|
1412
1448
|
], GenerateCopilotResponseInput.prototype, "metadata", void 0);
|
|
1413
|
-
|
|
1414
|
-
|
|
1449
|
+
_ts_decorate16([
|
|
1450
|
+
Field16(() => String, {
|
|
1415
1451
|
nullable: true
|
|
1416
1452
|
}),
|
|
1417
|
-
|
|
1453
|
+
_ts_metadata16("design:type", String)
|
|
1418
1454
|
], GenerateCopilotResponseInput.prototype, "threadId", void 0);
|
|
1419
|
-
|
|
1420
|
-
|
|
1455
|
+
_ts_decorate16([
|
|
1456
|
+
Field16(() => String, {
|
|
1421
1457
|
nullable: true
|
|
1422
1458
|
}),
|
|
1423
|
-
|
|
1459
|
+
_ts_metadata16("design:type", String)
|
|
1424
1460
|
], GenerateCopilotResponseInput.prototype, "runId", void 0);
|
|
1425
|
-
|
|
1426
|
-
|
|
1461
|
+
_ts_decorate16([
|
|
1462
|
+
Field16(() => [
|
|
1427
1463
|
MessageInput
|
|
1428
1464
|
]),
|
|
1429
|
-
|
|
1465
|
+
_ts_metadata16("design:type", Array)
|
|
1430
1466
|
], GenerateCopilotResponseInput.prototype, "messages", void 0);
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1467
|
+
_ts_decorate16([
|
|
1468
|
+
Field16(() => FrontendInput),
|
|
1469
|
+
_ts_metadata16("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
|
|
1434
1470
|
], GenerateCopilotResponseInput.prototype, "frontend", void 0);
|
|
1435
|
-
|
|
1436
|
-
|
|
1471
|
+
_ts_decorate16([
|
|
1472
|
+
Field16(() => CloudInput, {
|
|
1437
1473
|
nullable: true
|
|
1438
1474
|
}),
|
|
1439
|
-
|
|
1475
|
+
_ts_metadata16("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
|
|
1440
1476
|
], GenerateCopilotResponseInput.prototype, "cloud", void 0);
|
|
1441
|
-
|
|
1442
|
-
|
|
1477
|
+
_ts_decorate16([
|
|
1478
|
+
Field16(() => ForwardedParametersInput, {
|
|
1443
1479
|
nullable: true
|
|
1444
1480
|
}),
|
|
1445
|
-
|
|
1481
|
+
_ts_metadata16("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
|
|
1446
1482
|
], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
|
|
1447
|
-
|
|
1448
|
-
|
|
1483
|
+
_ts_decorate16([
|
|
1484
|
+
Field16(() => AgentSessionInput, {
|
|
1449
1485
|
nullable: true
|
|
1450
1486
|
}),
|
|
1451
|
-
|
|
1487
|
+
_ts_metadata16("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
|
|
1452
1488
|
], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
|
|
1453
|
-
|
|
1454
|
-
|
|
1489
|
+
_ts_decorate16([
|
|
1490
|
+
Field16(() => AgentStateInput, {
|
|
1455
1491
|
nullable: true
|
|
1456
1492
|
}),
|
|
1457
|
-
|
|
1493
|
+
_ts_metadata16("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
|
|
1458
1494
|
], GenerateCopilotResponseInput.prototype, "agentState", void 0);
|
|
1459
|
-
|
|
1460
|
-
|
|
1495
|
+
_ts_decorate16([
|
|
1496
|
+
Field16(() => [
|
|
1461
1497
|
AgentStateInput
|
|
1462
1498
|
], {
|
|
1463
1499
|
nullable: true
|
|
1464
1500
|
}),
|
|
1465
|
-
|
|
1501
|
+
_ts_metadata16("design:type", Array)
|
|
1466
1502
|
], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
|
|
1467
|
-
|
|
1468
|
-
|
|
1503
|
+
_ts_decorate16([
|
|
1504
|
+
Field16(() => ExtensionsInput, {
|
|
1469
1505
|
nullable: true
|
|
1470
1506
|
}),
|
|
1471
|
-
|
|
1507
|
+
_ts_metadata16("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput)
|
|
1472
1508
|
], GenerateCopilotResponseInput.prototype, "extensions", void 0);
|
|
1473
|
-
|
|
1474
|
-
|
|
1509
|
+
_ts_decorate16([
|
|
1510
|
+
Field16(() => [
|
|
1475
1511
|
MetaEventInput
|
|
1476
1512
|
], {
|
|
1477
1513
|
nullable: true
|
|
1478
1514
|
}),
|
|
1479
|
-
|
|
1515
|
+
_ts_metadata16("design:type", Array)
|
|
1480
1516
|
], GenerateCopilotResponseInput.prototype, "metaEvents", void 0);
|
|
1481
|
-
|
|
1482
|
-
|
|
1517
|
+
_ts_decorate16([
|
|
1518
|
+
Field16(() => [
|
|
1519
|
+
CopilotContextInput
|
|
1520
|
+
], {
|
|
1521
|
+
nullable: true
|
|
1522
|
+
}),
|
|
1523
|
+
_ts_metadata16("design:type", Array)
|
|
1524
|
+
], GenerateCopilotResponseInput.prototype, "context", void 0);
|
|
1525
|
+
GenerateCopilotResponseInput = _ts_decorate16([
|
|
1526
|
+
InputType12()
|
|
1483
1527
|
], GenerateCopilotResponseInput);
|
|
1484
1528
|
|
|
1485
1529
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
@@ -2882,10 +2926,10 @@ var CopilotRuntime = class {
|
|
|
2882
2926
|
}
|
|
2883
2927
|
async processRuntimeRequest(request) {
|
|
2884
2928
|
var _a, _b, _c, _d, _e;
|
|
2885
|
-
const { serviceAdapter, messages: rawMessages, actions: clientSideActionsInput, threadId, runId, outputMessagesPromise, graphqlContext, forwardedParameters, url, extensions, agentSession, agentStates, publicApiKey } = request;
|
|
2929
|
+
const { serviceAdapter, messages: rawMessages, actions: clientSideActionsInput, threadId, runId, outputMessagesPromise, graphqlContext, forwardedParameters, url, extensions, agentSession, agentStates, publicApiKey, context } = request;
|
|
2886
2930
|
const eventSource = new RuntimeEventSource({
|
|
2887
|
-
errorHandler: async (error,
|
|
2888
|
-
await this.error("error",
|
|
2931
|
+
errorHandler: async (error, context2) => {
|
|
2932
|
+
await this.error("error", context2, error, publicApiKey);
|
|
2889
2933
|
},
|
|
2890
2934
|
errorContext: {
|
|
2891
2935
|
threadId,
|
|
@@ -3331,7 +3375,7 @@ please use an LLM adapter instead.`
|
|
|
3331
3375
|
}
|
|
3332
3376
|
async processAgentRequest(request) {
|
|
3333
3377
|
var _a, _b, _c, _d, _e;
|
|
3334
|
-
const { messages: rawMessages, outputMessagesPromise, graphqlContext, agentSession, threadId: threadIdFromRequest, metaEvents, publicApiKey, forwardedParameters } = request;
|
|
3378
|
+
const { messages: rawMessages, outputMessagesPromise, graphqlContext, agentSession, threadId: threadIdFromRequest, metaEvents, publicApiKey, forwardedParameters, context } = request;
|
|
3335
3379
|
const { agentName, nodeName } = agentSession;
|
|
3336
3380
|
const requestStartTime = Date.now();
|
|
3337
3381
|
const streamedChunks = [];
|
|
@@ -3405,8 +3449,8 @@ please use an LLM adapter instead.`
|
|
|
3405
3449
|
}));
|
|
3406
3450
|
try {
|
|
3407
3451
|
const eventSource = new RuntimeEventSource({
|
|
3408
|
-
errorHandler: async (error,
|
|
3409
|
-
await this.error("error",
|
|
3452
|
+
errorHandler: async (error, context2) => {
|
|
3453
|
+
await this.error("error", context2, error, publicApiKey);
|
|
3410
3454
|
},
|
|
3411
3455
|
errorContext: {
|
|
3412
3456
|
threadId,
|
|
@@ -3631,7 +3675,8 @@ please use an LLM adapter instead.`
|
|
|
3631
3675
|
frontendUrl: url,
|
|
3632
3676
|
agents: this.agents,
|
|
3633
3677
|
metaEvents: request.metaEvents,
|
|
3634
|
-
nodeName: (_a = request.agentSession) == null ? void 0 : _a.nodeName
|
|
3678
|
+
nodeName: (_a = request.agentSession) == null ? void 0 : _a.nodeName,
|
|
3679
|
+
context: request.context
|
|
3635
3680
|
});
|
|
3636
3681
|
const configuredActions = typeof this.actions === "function" ? this.actions({
|
|
3637
3682
|
properties: graphqlContext.properties,
|
|
@@ -4375,7 +4420,7 @@ import { CopilotKitLowLevelError as CopilotKitLowLevelError6, ResolvedCopilotKit
|
|
|
4375
4420
|
// src/lib/runtime/agui-action.ts
|
|
4376
4421
|
import { catchError as catchError2, mergeMap as mergeMap2, of, throwError } from "rxjs";
|
|
4377
4422
|
import { CopilotKitError as CopilotKitError5, CopilotKitErrorCode as CopilotKitErrorCode3, parseJson as parseJson3 } from "@copilotkit/shared";
|
|
4378
|
-
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents, threadMetadata, nodeName, graphqlContext }) {
|
|
4423
|
+
function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, agent, metaEvents, threadMetadata, nodeName, context, graphqlContext }) {
|
|
4379
4424
|
const action = {
|
|
4380
4425
|
name: agent.agentId,
|
|
4381
4426
|
description: agent.description,
|
|
@@ -4434,7 +4479,8 @@ function constructAGUIRemoteAction({ logger: logger2, messages, agentStates, age
|
|
|
4434
4479
|
};
|
|
4435
4480
|
return agent.legacy_to_be_removed_runAgentBridged({
|
|
4436
4481
|
tools,
|
|
4437
|
-
forwardedProps
|
|
4482
|
+
forwardedProps,
|
|
4483
|
+
context
|
|
4438
4484
|
}).pipe(mergeMap2((event) => {
|
|
4439
4485
|
if (event.type === RuntimeEventTypes.RunError) {
|
|
4440
4486
|
const { message } = event;
|
|
@@ -4559,7 +4605,7 @@ async function fetchRemoteInfo({ url, onBeforeRequest, graphqlContext, logger: l
|
|
|
4559
4605
|
}
|
|
4560
4606
|
}
|
|
4561
4607
|
__name(fetchRemoteInfo, "fetchRemoteInfo");
|
|
4562
|
-
async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents, nodeName }) {
|
|
4608
|
+
async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, messages, agentStates, frontendUrl, agents, metaEvents, nodeName, context }) {
|
|
4563
4609
|
var _a;
|
|
4564
4610
|
const logger2 = graphqlContext.logger.child({
|
|
4565
4611
|
component: "remote-actions.fetchRemoteActions"
|
|
@@ -4627,7 +4673,8 @@ async function setupRemoteActions({ remoteEndpointDefinitions, graphqlContext, m
|
|
|
4627
4673
|
metaEvents,
|
|
4628
4674
|
threadMetadata,
|
|
4629
4675
|
nodeName,
|
|
4630
|
-
graphqlContext
|
|
4676
|
+
graphqlContext,
|
|
4677
|
+
context
|
|
4631
4678
|
}));
|
|
4632
4679
|
}
|
|
4633
4680
|
return result.flat();
|
|
@@ -4974,8 +5021,8 @@ import { GraphQLError } from "graphql";
|
|
|
4974
5021
|
import { randomId as randomId3 } from "@copilotkit/shared";
|
|
4975
5022
|
|
|
4976
5023
|
// src/graphql/types/agents-response.type.ts
|
|
4977
|
-
import { Field as
|
|
4978
|
-
function
|
|
5024
|
+
import { Field as Field17, ObjectType as ObjectType5 } from "type-graphql";
|
|
5025
|
+
function _ts_decorate17(decorators, target, key, desc) {
|
|
4979
5026
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4980
5027
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4981
5028
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -4985,50 +5032,50 @@ function _ts_decorate16(decorators, target, key, desc) {
|
|
|
4985
5032
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4986
5033
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4987
5034
|
}
|
|
4988
|
-
__name(
|
|
4989
|
-
function
|
|
5035
|
+
__name(_ts_decorate17, "_ts_decorate");
|
|
5036
|
+
function _ts_metadata17(k, v) {
|
|
4990
5037
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
4991
5038
|
return Reflect.metadata(k, v);
|
|
4992
5039
|
}
|
|
4993
|
-
__name(
|
|
5040
|
+
__name(_ts_metadata17, "_ts_metadata");
|
|
4994
5041
|
var Agent = class {
|
|
4995
5042
|
id;
|
|
4996
5043
|
name;
|
|
4997
5044
|
description;
|
|
4998
5045
|
};
|
|
4999
5046
|
__name(Agent, "Agent");
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5047
|
+
_ts_decorate17([
|
|
5048
|
+
Field17(() => String),
|
|
5049
|
+
_ts_metadata17("design:type", String)
|
|
5003
5050
|
], Agent.prototype, "id", void 0);
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5051
|
+
_ts_decorate17([
|
|
5052
|
+
Field17(() => String),
|
|
5053
|
+
_ts_metadata17("design:type", String)
|
|
5007
5054
|
], Agent.prototype, "name", void 0);
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5055
|
+
_ts_decorate17([
|
|
5056
|
+
Field17(() => String),
|
|
5057
|
+
_ts_metadata17("design:type", String)
|
|
5011
5058
|
], Agent.prototype, "description", void 0);
|
|
5012
|
-
Agent =
|
|
5059
|
+
Agent = _ts_decorate17([
|
|
5013
5060
|
ObjectType5()
|
|
5014
5061
|
], Agent);
|
|
5015
5062
|
var AgentsResponse = class {
|
|
5016
5063
|
agents;
|
|
5017
5064
|
};
|
|
5018
5065
|
__name(AgentsResponse, "AgentsResponse");
|
|
5019
|
-
|
|
5020
|
-
|
|
5066
|
+
_ts_decorate17([
|
|
5067
|
+
Field17(() => [
|
|
5021
5068
|
Agent
|
|
5022
5069
|
]),
|
|
5023
|
-
|
|
5070
|
+
_ts_metadata17("design:type", Array)
|
|
5024
5071
|
], AgentsResponse.prototype, "agents", void 0);
|
|
5025
|
-
AgentsResponse =
|
|
5072
|
+
AgentsResponse = _ts_decorate17([
|
|
5026
5073
|
ObjectType5()
|
|
5027
5074
|
], AgentsResponse);
|
|
5028
5075
|
|
|
5029
5076
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
5030
5077
|
import { CopilotKitError as CopilotKitError8, CopilotKitLowLevelError as CopilotKitLowLevelError8, isStructuredCopilotKitError as isStructuredCopilotKitError2 } from "@copilotkit/shared";
|
|
5031
|
-
function
|
|
5078
|
+
function _ts_decorate18(decorators, target, key, desc) {
|
|
5032
5079
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5033
5080
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
5034
5081
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -5038,12 +5085,12 @@ function _ts_decorate17(decorators, target, key, desc) {
|
|
|
5038
5085
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5039
5086
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5040
5087
|
}
|
|
5041
|
-
__name(
|
|
5042
|
-
function
|
|
5088
|
+
__name(_ts_decorate18, "_ts_decorate");
|
|
5089
|
+
function _ts_metadata18(k, v) {
|
|
5043
5090
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
5044
5091
|
return Reflect.metadata(k, v);
|
|
5045
5092
|
}
|
|
5046
|
-
__name(
|
|
5093
|
+
__name(_ts_metadata18, "_ts_metadata");
|
|
5047
5094
|
function _ts_param(paramIndex, decorator) {
|
|
5048
5095
|
return function(target, key) {
|
|
5049
5096
|
decorator(target, key, paramIndex);
|
|
@@ -5192,7 +5239,8 @@ var CopilotResolver = class {
|
|
|
5192
5239
|
agentStates: data.agentStates,
|
|
5193
5240
|
url: data.frontend.url,
|
|
5194
5241
|
extensions: data.extensions,
|
|
5195
|
-
metaEvents: data.metaEvents
|
|
5242
|
+
metaEvents: data.metaEvents,
|
|
5243
|
+
context: data.context
|
|
5196
5244
|
});
|
|
5197
5245
|
} catch (error) {
|
|
5198
5246
|
if (isStructuredCopilotKitError2(error) || ((_e = error == null ? void 0 : error.extensions) == null ? void 0 : _e.visibility)) {
|
|
@@ -5589,37 +5637,37 @@ var CopilotResolver = class {
|
|
|
5589
5637
|
}
|
|
5590
5638
|
};
|
|
5591
5639
|
__name(CopilotResolver, "CopilotResolver");
|
|
5592
|
-
|
|
5640
|
+
_ts_decorate18([
|
|
5593
5641
|
Query(() => String),
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5642
|
+
_ts_metadata18("design:type", Function),
|
|
5643
|
+
_ts_metadata18("design:paramtypes", []),
|
|
5644
|
+
_ts_metadata18("design:returntype", Promise)
|
|
5597
5645
|
], CopilotResolver.prototype, "hello", null);
|
|
5598
|
-
|
|
5646
|
+
_ts_decorate18([
|
|
5599
5647
|
Query(() => AgentsResponse),
|
|
5600
5648
|
_ts_param(0, Ctx()),
|
|
5601
|
-
|
|
5602
|
-
|
|
5649
|
+
_ts_metadata18("design:type", Function),
|
|
5650
|
+
_ts_metadata18("design:paramtypes", [
|
|
5603
5651
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext
|
|
5604
5652
|
]),
|
|
5605
|
-
|
|
5653
|
+
_ts_metadata18("design:returntype", Promise)
|
|
5606
5654
|
], CopilotResolver.prototype, "availableAgents", null);
|
|
5607
|
-
|
|
5655
|
+
_ts_decorate18([
|
|
5608
5656
|
Mutation(() => CopilotResponse),
|
|
5609
5657
|
_ts_param(0, Ctx()),
|
|
5610
5658
|
_ts_param(1, Arg("data")),
|
|
5611
5659
|
_ts_param(2, Arg("properties", () => GraphQLJSONObject, {
|
|
5612
5660
|
nullable: true
|
|
5613
5661
|
})),
|
|
5614
|
-
|
|
5615
|
-
|
|
5662
|
+
_ts_metadata18("design:type", Function),
|
|
5663
|
+
_ts_metadata18("design:paramtypes", [
|
|
5616
5664
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
5617
5665
|
typeof GenerateCopilotResponseInput === "undefined" ? Object : GenerateCopilotResponseInput,
|
|
5618
5666
|
typeof CopilotRequestContextProperties === "undefined" ? Object : CopilotRequestContextProperties
|
|
5619
5667
|
]),
|
|
5620
|
-
|
|
5668
|
+
_ts_metadata18("design:returntype", Promise)
|
|
5621
5669
|
], CopilotResolver.prototype, "generateCopilotResponse", null);
|
|
5622
|
-
CopilotResolver =
|
|
5670
|
+
CopilotResolver = _ts_decorate18([
|
|
5623
5671
|
Resolver(() => CopilotResponse)
|
|
5624
5672
|
], CopilotResolver);
|
|
5625
5673
|
|
|
@@ -5660,8 +5708,8 @@ import { Ctx as Ctx2 } from "type-graphql";
|
|
|
5660
5708
|
import { Query as Query2 } from "type-graphql";
|
|
5661
5709
|
|
|
5662
5710
|
// src/graphql/types/load-agent-state-response.type.ts
|
|
5663
|
-
import { Field as
|
|
5664
|
-
function
|
|
5711
|
+
import { Field as Field18, ObjectType as ObjectType6 } from "type-graphql";
|
|
5712
|
+
function _ts_decorate19(decorators, target, key, desc) {
|
|
5665
5713
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5666
5714
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
5667
5715
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -5671,12 +5719,12 @@ function _ts_decorate18(decorators, target, key, desc) {
|
|
|
5671
5719
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5672
5720
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5673
5721
|
}
|
|
5674
|
-
__name(
|
|
5675
|
-
function
|
|
5722
|
+
__name(_ts_decorate19, "_ts_decorate");
|
|
5723
|
+
function _ts_metadata19(k, v) {
|
|
5676
5724
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
5677
5725
|
return Reflect.metadata(k, v);
|
|
5678
5726
|
}
|
|
5679
|
-
__name(
|
|
5727
|
+
__name(_ts_metadata19, "_ts_metadata");
|
|
5680
5728
|
var LoadAgentStateResponse = class {
|
|
5681
5729
|
threadId;
|
|
5682
5730
|
threadExists;
|
|
@@ -5684,29 +5732,29 @@ var LoadAgentStateResponse = class {
|
|
|
5684
5732
|
messages;
|
|
5685
5733
|
};
|
|
5686
5734
|
__name(LoadAgentStateResponse, "LoadAgentStateResponse");
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5735
|
+
_ts_decorate19([
|
|
5736
|
+
Field18(() => String),
|
|
5737
|
+
_ts_metadata19("design:type", String)
|
|
5690
5738
|
], LoadAgentStateResponse.prototype, "threadId", void 0);
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5739
|
+
_ts_decorate19([
|
|
5740
|
+
Field18(() => Boolean),
|
|
5741
|
+
_ts_metadata19("design:type", Boolean)
|
|
5694
5742
|
], LoadAgentStateResponse.prototype, "threadExists", void 0);
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5743
|
+
_ts_decorate19([
|
|
5744
|
+
Field18(() => String),
|
|
5745
|
+
_ts_metadata19("design:type", String)
|
|
5698
5746
|
], LoadAgentStateResponse.prototype, "state", void 0);
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5747
|
+
_ts_decorate19([
|
|
5748
|
+
Field18(() => String),
|
|
5749
|
+
_ts_metadata19("design:type", String)
|
|
5702
5750
|
], LoadAgentStateResponse.prototype, "messages", void 0);
|
|
5703
|
-
LoadAgentStateResponse =
|
|
5751
|
+
LoadAgentStateResponse = _ts_decorate19([
|
|
5704
5752
|
ObjectType6()
|
|
5705
5753
|
], LoadAgentStateResponse);
|
|
5706
5754
|
|
|
5707
5755
|
// src/graphql/inputs/load-agent-state.input.ts
|
|
5708
|
-
import { Field as
|
|
5709
|
-
function
|
|
5756
|
+
import { Field as Field19, InputType as InputType13 } from "type-graphql";
|
|
5757
|
+
function _ts_decorate20(decorators, target, key, desc) {
|
|
5710
5758
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5711
5759
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
5712
5760
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -5716,32 +5764,32 @@ function _ts_decorate19(decorators, target, key, desc) {
|
|
|
5716
5764
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5717
5765
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5718
5766
|
}
|
|
5719
|
-
__name(
|
|
5720
|
-
function
|
|
5767
|
+
__name(_ts_decorate20, "_ts_decorate");
|
|
5768
|
+
function _ts_metadata20(k, v) {
|
|
5721
5769
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
5722
5770
|
return Reflect.metadata(k, v);
|
|
5723
5771
|
}
|
|
5724
|
-
__name(
|
|
5772
|
+
__name(_ts_metadata20, "_ts_metadata");
|
|
5725
5773
|
var LoadAgentStateInput = class {
|
|
5726
5774
|
threadId;
|
|
5727
5775
|
agentName;
|
|
5728
5776
|
};
|
|
5729
5777
|
__name(LoadAgentStateInput, "LoadAgentStateInput");
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5778
|
+
_ts_decorate20([
|
|
5779
|
+
Field19(() => String),
|
|
5780
|
+
_ts_metadata20("design:type", String)
|
|
5733
5781
|
], LoadAgentStateInput.prototype, "threadId", void 0);
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5782
|
+
_ts_decorate20([
|
|
5783
|
+
Field19(() => String),
|
|
5784
|
+
_ts_metadata20("design:type", String)
|
|
5737
5785
|
], LoadAgentStateInput.prototype, "agentName", void 0);
|
|
5738
|
-
LoadAgentStateInput =
|
|
5739
|
-
|
|
5786
|
+
LoadAgentStateInput = _ts_decorate20([
|
|
5787
|
+
InputType13()
|
|
5740
5788
|
], LoadAgentStateInput);
|
|
5741
5789
|
|
|
5742
5790
|
// src/graphql/resolvers/state.resolver.ts
|
|
5743
5791
|
import { CopilotKitAgentDiscoveryError as CopilotKitAgentDiscoveryError2 } from "@copilotkit/shared";
|
|
5744
|
-
function
|
|
5792
|
+
function _ts_decorate21(decorators, target, key, desc) {
|
|
5745
5793
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5746
5794
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
5747
5795
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -5751,12 +5799,12 @@ function _ts_decorate20(decorators, target, key, desc) {
|
|
|
5751
5799
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5752
5800
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5753
5801
|
}
|
|
5754
|
-
__name(
|
|
5755
|
-
function
|
|
5802
|
+
__name(_ts_decorate21, "_ts_decorate");
|
|
5803
|
+
function _ts_metadata21(k, v) {
|
|
5756
5804
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
5757
5805
|
return Reflect.metadata(k, v);
|
|
5758
5806
|
}
|
|
5759
|
-
__name(
|
|
5807
|
+
__name(_ts_metadata21, "_ts_metadata");
|
|
5760
5808
|
function _ts_param2(paramIndex, decorator) {
|
|
5761
5809
|
return function(target, key) {
|
|
5762
5810
|
decorator(target, key, paramIndex);
|
|
@@ -5781,18 +5829,18 @@ var StateResolver = class {
|
|
|
5781
5829
|
}
|
|
5782
5830
|
};
|
|
5783
5831
|
__name(StateResolver, "StateResolver");
|
|
5784
|
-
|
|
5832
|
+
_ts_decorate21([
|
|
5785
5833
|
Query2(() => LoadAgentStateResponse),
|
|
5786
5834
|
_ts_param2(0, Ctx2()),
|
|
5787
5835
|
_ts_param2(1, Arg2("data")),
|
|
5788
|
-
|
|
5789
|
-
|
|
5836
|
+
_ts_metadata21("design:type", Function),
|
|
5837
|
+
_ts_metadata21("design:paramtypes", [
|
|
5790
5838
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
5791
5839
|
typeof LoadAgentStateInput === "undefined" ? Object : LoadAgentStateInput
|
|
5792
5840
|
]),
|
|
5793
|
-
|
|
5841
|
+
_ts_metadata21("design:returntype", Promise)
|
|
5794
5842
|
], StateResolver.prototype, "loadAgentState", null);
|
|
5795
|
-
StateResolver =
|
|
5843
|
+
StateResolver = _ts_decorate21([
|
|
5796
5844
|
Resolver2(() => LoadAgentStateResponse)
|
|
5797
5845
|
], StateResolver);
|
|
5798
5846
|
|
|
@@ -5947,4 +5995,4 @@ export {
|
|
|
5947
5995
|
getCommonConfig,
|
|
5948
5996
|
copilotRuntimeNodeHttpEndpoint
|
|
5949
5997
|
};
|
|
5950
|
-
//# sourceMappingURL=chunk-
|
|
5998
|
+
//# sourceMappingURL=chunk-FOXQPOXW.mjs.map
|