@copilotkit/runtime 1.2.1 → 1.2.2-feat-runtime-remote-actions.0
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 +26 -0
- package/__snapshots__/schema/schema.graphql +41 -0
- package/dist/{chunk-YMUS43FR.mjs → chunk-2N45GS3P.mjs} +2 -2
- package/dist/{chunk-URMISMK2.mjs → chunk-73NMP3DI.mjs} +2 -2
- package/dist/{chunk-736EEICU.mjs → chunk-BJ2LVHWA.mjs} +3 -3
- package/dist/{chunk-DMO6FA25.mjs → chunk-T6O5FSTK.mjs} +2 -2
- package/dist/{chunk-GEIBJJQ4.mjs → chunk-TBZGOJJX.mjs} +14 -2
- package/dist/chunk-TBZGOJJX.mjs.map +1 -0
- package/dist/{chunk-DYF5MUAH.mjs → chunk-X5QBBMCJ.mjs} +2 -2
- package/dist/{chunk-Q5ZTE7WH.mjs → chunk-XROLDARH.mjs} +786 -158
- package/dist/chunk-XROLDARH.mjs.map +1 -0
- package/dist/chunk-ZNZGATLW.mjs +260 -0
- package/dist/chunk-ZNZGATLW.mjs.map +1 -0
- package/dist/{shared-c5362338.d.ts → copilot-runtime-d427e991.d.ts} +65 -38
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/graphql/types/converted/index.js +13 -0
- package/dist/graphql/types/converted/index.js.map +1 -1
- package/dist/graphql/types/converted/index.mjs +3 -1
- package/dist/{index-aa091e3c.d.ts → index-0476e4f7.d.ts} +24 -2
- package/dist/{index-13aa818e.d.ts → index-079752b9.d.ts} +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +982 -245
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/{langserve-a54438c6.d.ts → langserve-d6073a3b.d.ts} +24 -11
- package/dist/lib/index.d.ts +7 -7
- package/dist/lib/index.js +982 -245
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +8 -8
- package/dist/lib/integrations/index.d.ts +6 -6
- package/dist/lib/integrations/index.js +437 -182
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +6 -6
- package/dist/lib/integrations/nest/index.d.ts +5 -5
- package/dist/lib/integrations/nest/index.js +437 -182
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +4 -4
- package/dist/lib/integrations/node-express/index.d.ts +5 -5
- package/dist/lib/integrations/node-express/index.js +437 -182
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +4 -4
- package/dist/lib/integrations/node-http/index.d.ts +5 -5
- package/dist/lib/integrations/node-http/index.js +437 -182
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +3 -3
- package/dist/service-adapters/index.d.ts +3 -3
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +3 -3
- package/package.json +7 -5
- package/src/agents/langgraph/event-source.ts +222 -0
- package/src/agents/langgraph/events.ts +309 -0
- package/src/graphql/inputs/agent-session.input.ts +13 -0
- package/src/graphql/inputs/agent-state.input.ts +10 -0
- package/src/graphql/inputs/generate-copilot-response.input.ts +11 -0
- package/src/graphql/inputs/message.input.ts +30 -0
- package/src/graphql/resolvers/copilot.resolver.ts +56 -12
- package/src/graphql/types/converted/index.ts +15 -0
- package/src/graphql/types/copilot-response.type.ts +29 -0
- package/src/graphql/types/enums.ts +1 -0
- package/src/lib/index.ts +1 -1
- package/src/lib/integrations/shared.ts +1 -1
- package/src/lib/runtime/copilot-runtime.ts +360 -0
- package/src/lib/runtime/remote-actions.ts +241 -0
- package/src/service-adapters/conversion.ts +16 -0
- package/src/service-adapters/events.ts +101 -19
- package/dist/chunk-GEIBJJQ4.mjs.map +0 -1
- package/dist/chunk-PB24CCIJ.mjs +0 -158
- package/dist/chunk-PB24CCIJ.mjs.map +0 -1
- package/dist/chunk-Q5ZTE7WH.mjs.map +0 -1
- package/src/lib/copilot-runtime.ts +0 -231
- /package/dist/{chunk-YMUS43FR.mjs.map → chunk-2N45GS3P.mjs.map} +0 -0
- /package/dist/{chunk-URMISMK2.mjs.map → chunk-73NMP3DI.mjs.map} +0 -0
- /package/dist/{chunk-736EEICU.mjs.map → chunk-BJ2LVHWA.mjs.map} +0 -0
- /package/dist/{chunk-DMO6FA25.mjs.map → chunk-T6O5FSTK.mjs.map} +0 -0
- /package/dist/{chunk-DYF5MUAH.mjs.map → chunk-X5QBBMCJ.mjs.map} +0 -0
|
@@ -12,11 +12,11 @@ var __export = (target, all) => {
|
|
|
12
12
|
for (var name in all)
|
|
13
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
14
|
};
|
|
15
|
-
var __copyProps = (to,
|
|
16
|
-
if (
|
|
17
|
-
for (let key of __getOwnPropNames(
|
|
15
|
+
var __copyProps = (to, from2, except, desc) => {
|
|
16
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from2))
|
|
18
18
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
-
__defProp(to, key, { get: () =>
|
|
19
|
+
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
|
|
20
20
|
}
|
|
21
21
|
return to;
|
|
22
22
|
};
|
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.2.
|
|
47
|
+
version: "1.2.2-feat-runtime-remote-actions.0",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -59,7 +59,9 @@ var require_package = __commonJS({
|
|
|
59
59
|
test: "jest --passWithNoTests",
|
|
60
60
|
"check-types": "tsc --noEmit",
|
|
61
61
|
clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next && rm -rf __snapshots__",
|
|
62
|
-
"generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts"
|
|
62
|
+
"generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts",
|
|
63
|
+
"link:global": "pnpm link --global",
|
|
64
|
+
"unlink:global": "pnpm unlink --global"
|
|
63
65
|
},
|
|
64
66
|
devDependencies: {
|
|
65
67
|
"@swc/core": "1.5.28",
|
|
@@ -126,14 +128,14 @@ module.exports = __toCommonJS(nest_exports);
|
|
|
126
128
|
var import_graphql_yoga2 = require("graphql-yoga");
|
|
127
129
|
|
|
128
130
|
// src/lib/integrations/shared.ts
|
|
129
|
-
var
|
|
131
|
+
var import_type_graphql16 = require("type-graphql");
|
|
130
132
|
|
|
131
133
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
132
|
-
var
|
|
134
|
+
var import_type_graphql15 = require("type-graphql");
|
|
133
135
|
var import_rxjs2 = require("rxjs");
|
|
134
136
|
|
|
135
137
|
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
136
|
-
var
|
|
138
|
+
var import_type_graphql11 = require("type-graphql");
|
|
137
139
|
|
|
138
140
|
// src/graphql/inputs/message.input.ts
|
|
139
141
|
var import_type_graphql3 = require("type-graphql");
|
|
@@ -150,6 +152,7 @@ var ActionExecutionScope;
|
|
|
150
152
|
(function(ActionExecutionScope2) {
|
|
151
153
|
ActionExecutionScope2["server"] = "server";
|
|
152
154
|
ActionExecutionScope2["client"] = "client";
|
|
155
|
+
ActionExecutionScope2["passThrough"] = "passThrough";
|
|
153
156
|
})(ActionExecutionScope || (ActionExecutionScope = {}));
|
|
154
157
|
var CopilotRequestType;
|
|
155
158
|
(function(CopilotRequestType2) {
|
|
@@ -228,6 +231,7 @@ var MessageInput = class extends BaseMessage {
|
|
|
228
231
|
textMessage;
|
|
229
232
|
actionExecutionMessage;
|
|
230
233
|
resultMessage;
|
|
234
|
+
agentStateMessage;
|
|
231
235
|
};
|
|
232
236
|
__name(MessageInput, "MessageInput");
|
|
233
237
|
_ts_decorate2([
|
|
@@ -248,6 +252,12 @@ _ts_decorate2([
|
|
|
248
252
|
}),
|
|
249
253
|
_ts_metadata2("design:type", typeof ResultMessageInput === "undefined" ? Object : ResultMessageInput)
|
|
250
254
|
], MessageInput.prototype, "resultMessage", void 0);
|
|
255
|
+
_ts_decorate2([
|
|
256
|
+
(0, import_type_graphql3.Field)(() => AgentStateMessageInput, {
|
|
257
|
+
nullable: true
|
|
258
|
+
}),
|
|
259
|
+
_ts_metadata2("design:type", typeof AgentStateMessageInput === "undefined" ? Object : AgentStateMessageInput)
|
|
260
|
+
], MessageInput.prototype, "agentStateMessage", void 0);
|
|
251
261
|
MessageInput = _ts_decorate2([
|
|
252
262
|
(0, import_type_graphql3.InputType)()
|
|
253
263
|
], MessageInput);
|
|
@@ -309,6 +319,52 @@ _ts_decorate2([
|
|
|
309
319
|
ResultMessageInput = _ts_decorate2([
|
|
310
320
|
(0, import_type_graphql3.InputType)()
|
|
311
321
|
], ResultMessageInput);
|
|
322
|
+
var AgentStateMessageInput = class {
|
|
323
|
+
threadId;
|
|
324
|
+
agentName;
|
|
325
|
+
role;
|
|
326
|
+
state;
|
|
327
|
+
running;
|
|
328
|
+
nodeName;
|
|
329
|
+
runId;
|
|
330
|
+
active;
|
|
331
|
+
};
|
|
332
|
+
__name(AgentStateMessageInput, "AgentStateMessageInput");
|
|
333
|
+
_ts_decorate2([
|
|
334
|
+
(0, import_type_graphql3.Field)(() => String),
|
|
335
|
+
_ts_metadata2("design:type", String)
|
|
336
|
+
], AgentStateMessageInput.prototype, "threadId", void 0);
|
|
337
|
+
_ts_decorate2([
|
|
338
|
+
(0, import_type_graphql3.Field)(() => String),
|
|
339
|
+
_ts_metadata2("design:type", String)
|
|
340
|
+
], AgentStateMessageInput.prototype, "agentName", void 0);
|
|
341
|
+
_ts_decorate2([
|
|
342
|
+
(0, import_type_graphql3.Field)(() => MessageRole),
|
|
343
|
+
_ts_metadata2("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
|
|
344
|
+
], AgentStateMessageInput.prototype, "role", void 0);
|
|
345
|
+
_ts_decorate2([
|
|
346
|
+
(0, import_type_graphql3.Field)(() => String),
|
|
347
|
+
_ts_metadata2("design:type", String)
|
|
348
|
+
], AgentStateMessageInput.prototype, "state", void 0);
|
|
349
|
+
_ts_decorate2([
|
|
350
|
+
(0, import_type_graphql3.Field)(() => Boolean),
|
|
351
|
+
_ts_metadata2("design:type", Boolean)
|
|
352
|
+
], AgentStateMessageInput.prototype, "running", void 0);
|
|
353
|
+
_ts_decorate2([
|
|
354
|
+
(0, import_type_graphql3.Field)(() => String),
|
|
355
|
+
_ts_metadata2("design:type", String)
|
|
356
|
+
], AgentStateMessageInput.prototype, "nodeName", void 0);
|
|
357
|
+
_ts_decorate2([
|
|
358
|
+
(0, import_type_graphql3.Field)(() => String),
|
|
359
|
+
_ts_metadata2("design:type", String)
|
|
360
|
+
], AgentStateMessageInput.prototype, "runId", void 0);
|
|
361
|
+
_ts_decorate2([
|
|
362
|
+
(0, import_type_graphql3.Field)(() => Boolean),
|
|
363
|
+
_ts_metadata2("design:type", Boolean)
|
|
364
|
+
], AgentStateMessageInput.prototype, "active", void 0);
|
|
365
|
+
AgentStateMessageInput = _ts_decorate2([
|
|
366
|
+
(0, import_type_graphql3.InputType)()
|
|
367
|
+
], AgentStateMessageInput);
|
|
312
368
|
|
|
313
369
|
// src/graphql/inputs/frontend.input.ts
|
|
314
370
|
var import_type_graphql5 = require("type-graphql");
|
|
@@ -550,7 +606,8 @@ ForwardedParametersInput = _ts_decorate7([
|
|
|
550
606
|
(0, import_type_graphql8.InputType)()
|
|
551
607
|
], ForwardedParametersInput);
|
|
552
608
|
|
|
553
|
-
// src/graphql/inputs/
|
|
609
|
+
// src/graphql/inputs/agent-session.input.ts
|
|
610
|
+
var import_type_graphql9 = require("type-graphql");
|
|
554
611
|
function _ts_decorate8(decorators, target, key, desc) {
|
|
555
612
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
556
613
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -567,18 +624,96 @@ function _ts_metadata8(k, v) {
|
|
|
567
624
|
return Reflect.metadata(k, v);
|
|
568
625
|
}
|
|
569
626
|
__name(_ts_metadata8, "_ts_metadata");
|
|
627
|
+
var AgentSessionInput = class {
|
|
628
|
+
agentName;
|
|
629
|
+
threadId;
|
|
630
|
+
nodeName;
|
|
631
|
+
};
|
|
632
|
+
__name(AgentSessionInput, "AgentSessionInput");
|
|
633
|
+
_ts_decorate8([
|
|
634
|
+
(0, import_type_graphql9.Field)(() => String),
|
|
635
|
+
_ts_metadata8("design:type", String)
|
|
636
|
+
], AgentSessionInput.prototype, "agentName", void 0);
|
|
637
|
+
_ts_decorate8([
|
|
638
|
+
(0, import_type_graphql9.Field)(() => String, {
|
|
639
|
+
nullable: true
|
|
640
|
+
}),
|
|
641
|
+
_ts_metadata8("design:type", String)
|
|
642
|
+
], AgentSessionInput.prototype, "threadId", void 0);
|
|
643
|
+
_ts_decorate8([
|
|
644
|
+
(0, import_type_graphql9.Field)(() => String, {
|
|
645
|
+
nullable: true
|
|
646
|
+
}),
|
|
647
|
+
_ts_metadata8("design:type", String)
|
|
648
|
+
], AgentSessionInput.prototype, "nodeName", void 0);
|
|
649
|
+
AgentSessionInput = _ts_decorate8([
|
|
650
|
+
(0, import_type_graphql9.InputType)()
|
|
651
|
+
], AgentSessionInput);
|
|
652
|
+
|
|
653
|
+
// src/graphql/inputs/agent-state.input.ts
|
|
654
|
+
var import_type_graphql10 = require("type-graphql");
|
|
655
|
+
function _ts_decorate9(decorators, target, key, desc) {
|
|
656
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
657
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
658
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
659
|
+
else
|
|
660
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
661
|
+
if (d = decorators[i])
|
|
662
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
663
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
664
|
+
}
|
|
665
|
+
__name(_ts_decorate9, "_ts_decorate");
|
|
666
|
+
function _ts_metadata9(k, v) {
|
|
667
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
668
|
+
return Reflect.metadata(k, v);
|
|
669
|
+
}
|
|
670
|
+
__name(_ts_metadata9, "_ts_metadata");
|
|
671
|
+
var AgentStateInput = class {
|
|
672
|
+
agentName;
|
|
673
|
+
state;
|
|
674
|
+
};
|
|
675
|
+
__name(AgentStateInput, "AgentStateInput");
|
|
676
|
+
_ts_decorate9([
|
|
677
|
+
(0, import_type_graphql10.Field)(() => String),
|
|
678
|
+
_ts_metadata9("design:type", String)
|
|
679
|
+
], AgentStateInput.prototype, "agentName", void 0);
|
|
680
|
+
_ts_decorate9([
|
|
681
|
+
(0, import_type_graphql10.Field)(() => String),
|
|
682
|
+
_ts_metadata9("design:type", String)
|
|
683
|
+
], AgentStateInput.prototype, "state", void 0);
|
|
684
|
+
AgentStateInput = _ts_decorate9([
|
|
685
|
+
(0, import_type_graphql10.InputType)()
|
|
686
|
+
], AgentStateInput);
|
|
687
|
+
|
|
688
|
+
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
689
|
+
function _ts_decorate10(decorators, target, key, desc) {
|
|
690
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
691
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
692
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
693
|
+
else
|
|
694
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
695
|
+
if (d = decorators[i])
|
|
696
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
697
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
698
|
+
}
|
|
699
|
+
__name(_ts_decorate10, "_ts_decorate");
|
|
700
|
+
function _ts_metadata10(k, v) {
|
|
701
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
702
|
+
return Reflect.metadata(k, v);
|
|
703
|
+
}
|
|
704
|
+
__name(_ts_metadata10, "_ts_metadata");
|
|
570
705
|
var GenerateCopilotResponseMetadataInput = class {
|
|
571
706
|
requestType;
|
|
572
707
|
};
|
|
573
708
|
__name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
|
|
574
|
-
|
|
575
|
-
(0,
|
|
709
|
+
_ts_decorate10([
|
|
710
|
+
(0, import_type_graphql11.Field)(() => CopilotRequestType, {
|
|
576
711
|
nullable: true
|
|
577
712
|
}),
|
|
578
|
-
|
|
713
|
+
_ts_metadata10("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
|
|
579
714
|
], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
|
|
580
|
-
GenerateCopilotResponseMetadataInput =
|
|
581
|
-
(0,
|
|
715
|
+
GenerateCopilotResponseMetadataInput = _ts_decorate10([
|
|
716
|
+
(0, import_type_graphql11.InputType)()
|
|
582
717
|
], GenerateCopilotResponseMetadataInput);
|
|
583
718
|
var GenerateCopilotResponseInput = class {
|
|
584
719
|
metadata;
|
|
@@ -588,58 +723,81 @@ var GenerateCopilotResponseInput = class {
|
|
|
588
723
|
frontend;
|
|
589
724
|
cloud;
|
|
590
725
|
forwardedParameters;
|
|
726
|
+
agentSession;
|
|
727
|
+
agentState;
|
|
728
|
+
agentStates;
|
|
591
729
|
};
|
|
592
730
|
__name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
|
|
593
|
-
|
|
594
|
-
(0,
|
|
731
|
+
_ts_decorate10([
|
|
732
|
+
(0, import_type_graphql11.Field)(() => GenerateCopilotResponseMetadataInput, {
|
|
595
733
|
nullable: false
|
|
596
734
|
}),
|
|
597
|
-
|
|
735
|
+
_ts_metadata10("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
|
|
598
736
|
], GenerateCopilotResponseInput.prototype, "metadata", void 0);
|
|
599
|
-
|
|
600
|
-
(0,
|
|
737
|
+
_ts_decorate10([
|
|
738
|
+
(0, import_type_graphql11.Field)(() => String, {
|
|
601
739
|
nullable: true
|
|
602
740
|
}),
|
|
603
|
-
|
|
741
|
+
_ts_metadata10("design:type", String)
|
|
604
742
|
], GenerateCopilotResponseInput.prototype, "threadId", void 0);
|
|
605
|
-
|
|
606
|
-
(0,
|
|
743
|
+
_ts_decorate10([
|
|
744
|
+
(0, import_type_graphql11.Field)(() => String, {
|
|
607
745
|
nullable: true
|
|
608
746
|
}),
|
|
609
|
-
|
|
747
|
+
_ts_metadata10("design:type", String)
|
|
610
748
|
], GenerateCopilotResponseInput.prototype, "runId", void 0);
|
|
611
|
-
|
|
612
|
-
(0,
|
|
749
|
+
_ts_decorate10([
|
|
750
|
+
(0, import_type_graphql11.Field)(() => [
|
|
613
751
|
MessageInput
|
|
614
752
|
]),
|
|
615
|
-
|
|
753
|
+
_ts_metadata10("design:type", Array)
|
|
616
754
|
], GenerateCopilotResponseInput.prototype, "messages", void 0);
|
|
617
|
-
|
|
618
|
-
(0,
|
|
619
|
-
|
|
755
|
+
_ts_decorate10([
|
|
756
|
+
(0, import_type_graphql11.Field)(() => FrontendInput),
|
|
757
|
+
_ts_metadata10("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
|
|
620
758
|
], GenerateCopilotResponseInput.prototype, "frontend", void 0);
|
|
621
|
-
|
|
622
|
-
(0,
|
|
759
|
+
_ts_decorate10([
|
|
760
|
+
(0, import_type_graphql11.Field)(() => CloudInput, {
|
|
623
761
|
nullable: true
|
|
624
762
|
}),
|
|
625
|
-
|
|
763
|
+
_ts_metadata10("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
|
|
626
764
|
], GenerateCopilotResponseInput.prototype, "cloud", void 0);
|
|
627
|
-
|
|
628
|
-
(0,
|
|
765
|
+
_ts_decorate10([
|
|
766
|
+
(0, import_type_graphql11.Field)(() => ForwardedParametersInput, {
|
|
629
767
|
nullable: true
|
|
630
768
|
}),
|
|
631
|
-
|
|
769
|
+
_ts_metadata10("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
|
|
632
770
|
], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
|
|
633
|
-
|
|
634
|
-
(0,
|
|
771
|
+
_ts_decorate10([
|
|
772
|
+
(0, import_type_graphql11.Field)(() => AgentSessionInput, {
|
|
773
|
+
nullable: true
|
|
774
|
+
}),
|
|
775
|
+
_ts_metadata10("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
|
|
776
|
+
], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
|
|
777
|
+
_ts_decorate10([
|
|
778
|
+
(0, import_type_graphql11.Field)(() => AgentStateInput, {
|
|
779
|
+
nullable: true
|
|
780
|
+
}),
|
|
781
|
+
_ts_metadata10("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
|
|
782
|
+
], GenerateCopilotResponseInput.prototype, "agentState", void 0);
|
|
783
|
+
_ts_decorate10([
|
|
784
|
+
(0, import_type_graphql11.Field)(() => [
|
|
785
|
+
AgentStateInput
|
|
786
|
+
], {
|
|
787
|
+
nullable: true
|
|
788
|
+
}),
|
|
789
|
+
_ts_metadata10("design:type", Array)
|
|
790
|
+
], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
|
|
791
|
+
GenerateCopilotResponseInput = _ts_decorate10([
|
|
792
|
+
(0, import_type_graphql11.InputType)()
|
|
635
793
|
], GenerateCopilotResponseInput);
|
|
636
794
|
|
|
637
795
|
// src/graphql/types/copilot-response.type.ts
|
|
638
|
-
var
|
|
796
|
+
var import_type_graphql14 = require("type-graphql");
|
|
639
797
|
|
|
640
798
|
// src/graphql/types/message-status.type.ts
|
|
641
|
-
var
|
|
642
|
-
function
|
|
799
|
+
var import_type_graphql12 = require("type-graphql");
|
|
800
|
+
function _ts_decorate11(decorators, target, key, desc) {
|
|
643
801
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
644
802
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
645
803
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -649,58 +807,58 @@ function _ts_decorate9(decorators, target, key, desc) {
|
|
|
649
807
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
650
808
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
651
809
|
}
|
|
652
|
-
__name(
|
|
653
|
-
function
|
|
810
|
+
__name(_ts_decorate11, "_ts_decorate");
|
|
811
|
+
function _ts_metadata11(k, v) {
|
|
654
812
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
655
813
|
return Reflect.metadata(k, v);
|
|
656
814
|
}
|
|
657
|
-
__name(
|
|
815
|
+
__name(_ts_metadata11, "_ts_metadata");
|
|
658
816
|
var MessageStatusCode;
|
|
659
817
|
(function(MessageStatusCode2) {
|
|
660
818
|
MessageStatusCode2["Pending"] = "pending";
|
|
661
819
|
MessageStatusCode2["Success"] = "success";
|
|
662
820
|
MessageStatusCode2["Failed"] = "failed";
|
|
663
821
|
})(MessageStatusCode || (MessageStatusCode = {}));
|
|
664
|
-
(0,
|
|
822
|
+
(0, import_type_graphql12.registerEnumType)(MessageStatusCode, {
|
|
665
823
|
name: "MessageStatusCode"
|
|
666
824
|
});
|
|
667
825
|
var BaseMessageStatus = /* @__PURE__ */ __name(class BaseMessageStatus2 {
|
|
668
826
|
code;
|
|
669
827
|
}, "BaseMessageStatus");
|
|
670
|
-
|
|
671
|
-
(0,
|
|
672
|
-
|
|
828
|
+
_ts_decorate11([
|
|
829
|
+
(0, import_type_graphql12.Field)(() => MessageStatusCode),
|
|
830
|
+
_ts_metadata11("design:type", String)
|
|
673
831
|
], BaseMessageStatus.prototype, "code", void 0);
|
|
674
|
-
BaseMessageStatus =
|
|
675
|
-
(0,
|
|
832
|
+
BaseMessageStatus = _ts_decorate11([
|
|
833
|
+
(0, import_type_graphql12.ObjectType)()
|
|
676
834
|
], BaseMessageStatus);
|
|
677
835
|
var PendingMessageStatus = class extends BaseMessageStatus {
|
|
678
836
|
code = "pending";
|
|
679
837
|
};
|
|
680
838
|
__name(PendingMessageStatus, "PendingMessageStatus");
|
|
681
|
-
PendingMessageStatus =
|
|
682
|
-
(0,
|
|
839
|
+
PendingMessageStatus = _ts_decorate11([
|
|
840
|
+
(0, import_type_graphql12.ObjectType)()
|
|
683
841
|
], PendingMessageStatus);
|
|
684
842
|
var SuccessMessageStatus = class extends BaseMessageStatus {
|
|
685
843
|
code = "success";
|
|
686
844
|
};
|
|
687
845
|
__name(SuccessMessageStatus, "SuccessMessageStatus");
|
|
688
|
-
SuccessMessageStatus =
|
|
689
|
-
(0,
|
|
846
|
+
SuccessMessageStatus = _ts_decorate11([
|
|
847
|
+
(0, import_type_graphql12.ObjectType)()
|
|
690
848
|
], SuccessMessageStatus);
|
|
691
849
|
var FailedMessageStatus = class extends BaseMessageStatus {
|
|
692
850
|
code = "failed";
|
|
693
851
|
reason;
|
|
694
852
|
};
|
|
695
853
|
__name(FailedMessageStatus, "FailedMessageStatus");
|
|
696
|
-
|
|
697
|
-
(0,
|
|
698
|
-
|
|
854
|
+
_ts_decorate11([
|
|
855
|
+
(0, import_type_graphql12.Field)(() => String),
|
|
856
|
+
_ts_metadata11("design:type", String)
|
|
699
857
|
], FailedMessageStatus.prototype, "reason", void 0);
|
|
700
|
-
FailedMessageStatus =
|
|
701
|
-
(0,
|
|
858
|
+
FailedMessageStatus = _ts_decorate11([
|
|
859
|
+
(0, import_type_graphql12.ObjectType)()
|
|
702
860
|
], FailedMessageStatus);
|
|
703
|
-
var MessageStatusUnion = (0,
|
|
861
|
+
var MessageStatusUnion = (0, import_type_graphql12.createUnionType)({
|
|
704
862
|
name: "MessageStatus",
|
|
705
863
|
types: () => [
|
|
706
864
|
PendingMessageStatus,
|
|
@@ -711,8 +869,8 @@ var MessageStatusUnion = (0, import_type_graphql10.createUnionType)({
|
|
|
711
869
|
|
|
712
870
|
// src/graphql/types/response-status.type.ts
|
|
713
871
|
var import_graphql_scalars = require("graphql-scalars");
|
|
714
|
-
var
|
|
715
|
-
function
|
|
872
|
+
var import_type_graphql13 = require("type-graphql");
|
|
873
|
+
function _ts_decorate12(decorators, target, key, desc) {
|
|
716
874
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
717
875
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
718
876
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -722,30 +880,30 @@ function _ts_decorate10(decorators, target, key, desc) {
|
|
|
722
880
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
723
881
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
724
882
|
}
|
|
725
|
-
__name(
|
|
726
|
-
function
|
|
883
|
+
__name(_ts_decorate12, "_ts_decorate");
|
|
884
|
+
function _ts_metadata12(k, v) {
|
|
727
885
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
728
886
|
return Reflect.metadata(k, v);
|
|
729
887
|
}
|
|
730
|
-
__name(
|
|
888
|
+
__name(_ts_metadata12, "_ts_metadata");
|
|
731
889
|
var ResponseStatusCode;
|
|
732
890
|
(function(ResponseStatusCode2) {
|
|
733
891
|
ResponseStatusCode2["Pending"] = "pending";
|
|
734
892
|
ResponseStatusCode2["Success"] = "success";
|
|
735
893
|
ResponseStatusCode2["Failed"] = "failed";
|
|
736
894
|
})(ResponseStatusCode || (ResponseStatusCode = {}));
|
|
737
|
-
(0,
|
|
895
|
+
(0, import_type_graphql13.registerEnumType)(ResponseStatusCode, {
|
|
738
896
|
name: "ResponseStatusCode"
|
|
739
897
|
});
|
|
740
898
|
var BaseResponseStatus = /* @__PURE__ */ __name(class BaseResponseStatus2 {
|
|
741
899
|
code;
|
|
742
900
|
}, "BaseResponseStatus");
|
|
743
|
-
|
|
744
|
-
(0,
|
|
745
|
-
|
|
901
|
+
_ts_decorate12([
|
|
902
|
+
(0, import_type_graphql13.Field)(() => ResponseStatusCode),
|
|
903
|
+
_ts_metadata12("design:type", String)
|
|
746
904
|
], BaseResponseStatus.prototype, "code", void 0);
|
|
747
|
-
BaseResponseStatus =
|
|
748
|
-
(0,
|
|
905
|
+
BaseResponseStatus = _ts_decorate12([
|
|
906
|
+
(0, import_type_graphql13.InterfaceType)({
|
|
749
907
|
resolveType(value) {
|
|
750
908
|
if (value.code === "success") {
|
|
751
909
|
return SuccessResponseStatus;
|
|
@@ -757,14 +915,14 @@ BaseResponseStatus = _ts_decorate10([
|
|
|
757
915
|
return void 0;
|
|
758
916
|
}
|
|
759
917
|
}),
|
|
760
|
-
(0,
|
|
918
|
+
(0, import_type_graphql13.ObjectType)()
|
|
761
919
|
], BaseResponseStatus);
|
|
762
920
|
var PendingResponseStatus = class extends BaseResponseStatus {
|
|
763
921
|
code = "pending";
|
|
764
922
|
};
|
|
765
923
|
__name(PendingResponseStatus, "PendingResponseStatus");
|
|
766
|
-
PendingResponseStatus =
|
|
767
|
-
(0,
|
|
924
|
+
PendingResponseStatus = _ts_decorate12([
|
|
925
|
+
(0, import_type_graphql13.ObjectType)({
|
|
768
926
|
implements: BaseResponseStatus
|
|
769
927
|
})
|
|
770
928
|
], PendingResponseStatus);
|
|
@@ -772,8 +930,8 @@ var SuccessResponseStatus = class extends BaseResponseStatus {
|
|
|
772
930
|
code = "success";
|
|
773
931
|
};
|
|
774
932
|
__name(SuccessResponseStatus, "SuccessResponseStatus");
|
|
775
|
-
SuccessResponseStatus =
|
|
776
|
-
(0,
|
|
933
|
+
SuccessResponseStatus = _ts_decorate12([
|
|
934
|
+
(0, import_type_graphql13.ObjectType)({
|
|
777
935
|
implements: BaseResponseStatus
|
|
778
936
|
})
|
|
779
937
|
], SuccessResponseStatus);
|
|
@@ -783,7 +941,7 @@ var FailedResponseStatusReason;
|
|
|
783
941
|
FailedResponseStatusReason2["MESSAGE_STREAM_INTERRUPTED"] = "MESSAGE_STREAM_INTERRUPTED";
|
|
784
942
|
FailedResponseStatusReason2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
|
|
785
943
|
})(FailedResponseStatusReason || (FailedResponseStatusReason = {}));
|
|
786
|
-
(0,
|
|
944
|
+
(0, import_type_graphql13.registerEnumType)(FailedResponseStatusReason, {
|
|
787
945
|
name: "FailedResponseStatusReason"
|
|
788
946
|
});
|
|
789
947
|
var FailedResponseStatus = class extends BaseResponseStatus {
|
|
@@ -792,22 +950,22 @@ var FailedResponseStatus = class extends BaseResponseStatus {
|
|
|
792
950
|
details = null;
|
|
793
951
|
};
|
|
794
952
|
__name(FailedResponseStatus, "FailedResponseStatus");
|
|
795
|
-
|
|
796
|
-
(0,
|
|
797
|
-
|
|
953
|
+
_ts_decorate12([
|
|
954
|
+
(0, import_type_graphql13.Field)(() => FailedResponseStatusReason),
|
|
955
|
+
_ts_metadata12("design:type", String)
|
|
798
956
|
], FailedResponseStatus.prototype, "reason", void 0);
|
|
799
|
-
|
|
800
|
-
(0,
|
|
957
|
+
_ts_decorate12([
|
|
958
|
+
(0, import_type_graphql13.Field)(() => import_graphql_scalars.GraphQLJSON, {
|
|
801
959
|
nullable: true
|
|
802
960
|
}),
|
|
803
|
-
|
|
961
|
+
_ts_metadata12("design:type", typeof Record === "undefined" ? Object : Record)
|
|
804
962
|
], FailedResponseStatus.prototype, "details", void 0);
|
|
805
|
-
FailedResponseStatus =
|
|
806
|
-
(0,
|
|
963
|
+
FailedResponseStatus = _ts_decorate12([
|
|
964
|
+
(0, import_type_graphql13.ObjectType)({
|
|
807
965
|
implements: BaseResponseStatus
|
|
808
966
|
})
|
|
809
967
|
], FailedResponseStatus);
|
|
810
|
-
var ResponseStatusUnion = (0,
|
|
968
|
+
var ResponseStatusUnion = (0, import_type_graphql13.createUnionType)({
|
|
811
969
|
name: "ResponseStatus",
|
|
812
970
|
types: () => [
|
|
813
971
|
PendingResponseStatus,
|
|
@@ -817,7 +975,7 @@ var ResponseStatusUnion = (0, import_type_graphql11.createUnionType)({
|
|
|
817
975
|
});
|
|
818
976
|
|
|
819
977
|
// src/graphql/types/copilot-response.type.ts
|
|
820
|
-
function
|
|
978
|
+
function _ts_decorate13(decorators, target, key, desc) {
|
|
821
979
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
822
980
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
823
981
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -827,31 +985,31 @@ function _ts_decorate11(decorators, target, key, desc) {
|
|
|
827
985
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
828
986
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
829
987
|
}
|
|
830
|
-
__name(
|
|
831
|
-
function
|
|
988
|
+
__name(_ts_decorate13, "_ts_decorate");
|
|
989
|
+
function _ts_metadata13(k, v) {
|
|
832
990
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
833
991
|
return Reflect.metadata(k, v);
|
|
834
992
|
}
|
|
835
|
-
__name(
|
|
993
|
+
__name(_ts_metadata13, "_ts_metadata");
|
|
836
994
|
var BaseMessageOutput = /* @__PURE__ */ __name(class BaseMessageOutput2 {
|
|
837
995
|
id;
|
|
838
996
|
createdAt;
|
|
839
997
|
status;
|
|
840
998
|
}, "BaseMessageOutput");
|
|
841
|
-
|
|
842
|
-
(0,
|
|
843
|
-
|
|
999
|
+
_ts_decorate13([
|
|
1000
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1001
|
+
_ts_metadata13("design:type", String)
|
|
844
1002
|
], BaseMessageOutput.prototype, "id", void 0);
|
|
845
|
-
|
|
846
|
-
(0,
|
|
847
|
-
|
|
1003
|
+
_ts_decorate13([
|
|
1004
|
+
(0, import_type_graphql14.Field)(() => Date),
|
|
1005
|
+
_ts_metadata13("design:type", typeof Date === "undefined" ? Object : Date)
|
|
848
1006
|
], BaseMessageOutput.prototype, "createdAt", void 0);
|
|
849
|
-
|
|
850
|
-
(0,
|
|
851
|
-
|
|
1007
|
+
_ts_decorate13([
|
|
1008
|
+
(0, import_type_graphql14.Field)(() => MessageStatusUnion),
|
|
1009
|
+
_ts_metadata13("design:type", Object)
|
|
852
1010
|
], BaseMessageOutput.prototype, "status", void 0);
|
|
853
|
-
BaseMessageOutput =
|
|
854
|
-
(0,
|
|
1011
|
+
BaseMessageOutput = _ts_decorate13([
|
|
1012
|
+
(0, import_type_graphql14.InterfaceType)({
|
|
855
1013
|
resolveType(value) {
|
|
856
1014
|
if (value.hasOwnProperty("content")) {
|
|
857
1015
|
return TextMessageOutput;
|
|
@@ -859,6 +1017,8 @@ BaseMessageOutput = _ts_decorate11([
|
|
|
859
1017
|
return ActionExecutionMessageOutput;
|
|
860
1018
|
} else if (value.hasOwnProperty("result")) {
|
|
861
1019
|
return ResultMessageOutput;
|
|
1020
|
+
} else if (value.hasOwnProperty("state")) {
|
|
1021
|
+
return AgentStateMessageOutput;
|
|
862
1022
|
}
|
|
863
1023
|
return void 0;
|
|
864
1024
|
}
|
|
@@ -869,18 +1029,18 @@ var TextMessageOutput = class {
|
|
|
869
1029
|
content;
|
|
870
1030
|
};
|
|
871
1031
|
__name(TextMessageOutput, "TextMessageOutput");
|
|
872
|
-
|
|
873
|
-
(0,
|
|
874
|
-
|
|
1032
|
+
_ts_decorate13([
|
|
1033
|
+
(0, import_type_graphql14.Field)(() => MessageRole),
|
|
1034
|
+
_ts_metadata13("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
|
|
875
1035
|
], TextMessageOutput.prototype, "role", void 0);
|
|
876
|
-
|
|
877
|
-
(0,
|
|
1036
|
+
_ts_decorate13([
|
|
1037
|
+
(0, import_type_graphql14.Field)(() => [
|
|
878
1038
|
String
|
|
879
1039
|
]),
|
|
880
|
-
|
|
1040
|
+
_ts_metadata13("design:type", Array)
|
|
881
1041
|
], TextMessageOutput.prototype, "content", void 0);
|
|
882
|
-
TextMessageOutput =
|
|
883
|
-
(0,
|
|
1042
|
+
TextMessageOutput = _ts_decorate13([
|
|
1043
|
+
(0, import_type_graphql14.ObjectType)({
|
|
884
1044
|
implements: BaseMessageOutput
|
|
885
1045
|
})
|
|
886
1046
|
], TextMessageOutput);
|
|
@@ -890,22 +1050,22 @@ var ActionExecutionMessageOutput = class {
|
|
|
890
1050
|
arguments;
|
|
891
1051
|
};
|
|
892
1052
|
__name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput");
|
|
893
|
-
|
|
894
|
-
(0,
|
|
895
|
-
|
|
1053
|
+
_ts_decorate13([
|
|
1054
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1055
|
+
_ts_metadata13("design:type", String)
|
|
896
1056
|
], ActionExecutionMessageOutput.prototype, "name", void 0);
|
|
897
|
-
|
|
898
|
-
(0,
|
|
899
|
-
|
|
1057
|
+
_ts_decorate13([
|
|
1058
|
+
(0, import_type_graphql14.Field)(() => ActionExecutionScope),
|
|
1059
|
+
_ts_metadata13("design:type", typeof ActionExecutionScope === "undefined" ? Object : ActionExecutionScope)
|
|
900
1060
|
], ActionExecutionMessageOutput.prototype, "scope", void 0);
|
|
901
|
-
|
|
902
|
-
(0,
|
|
1061
|
+
_ts_decorate13([
|
|
1062
|
+
(0, import_type_graphql14.Field)(() => [
|
|
903
1063
|
String
|
|
904
1064
|
]),
|
|
905
|
-
|
|
1065
|
+
_ts_metadata13("design:type", Array)
|
|
906
1066
|
], ActionExecutionMessageOutput.prototype, "arguments", void 0);
|
|
907
|
-
ActionExecutionMessageOutput =
|
|
908
|
-
(0,
|
|
1067
|
+
ActionExecutionMessageOutput = _ts_decorate13([
|
|
1068
|
+
(0, import_type_graphql14.ObjectType)({
|
|
909
1069
|
implements: BaseMessageOutput
|
|
910
1070
|
})
|
|
911
1071
|
], ActionExecutionMessageOutput);
|
|
@@ -915,23 +1075,71 @@ var ResultMessageOutput = class {
|
|
|
915
1075
|
result;
|
|
916
1076
|
};
|
|
917
1077
|
__name(ResultMessageOutput, "ResultMessageOutput");
|
|
918
|
-
|
|
919
|
-
(0,
|
|
920
|
-
|
|
1078
|
+
_ts_decorate13([
|
|
1079
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1080
|
+
_ts_metadata13("design:type", String)
|
|
921
1081
|
], ResultMessageOutput.prototype, "actionExecutionId", void 0);
|
|
922
|
-
|
|
923
|
-
(0,
|
|
924
|
-
|
|
1082
|
+
_ts_decorate13([
|
|
1083
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1084
|
+
_ts_metadata13("design:type", String)
|
|
925
1085
|
], ResultMessageOutput.prototype, "actionName", void 0);
|
|
926
|
-
|
|
927
|
-
(0,
|
|
928
|
-
|
|
1086
|
+
_ts_decorate13([
|
|
1087
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1088
|
+
_ts_metadata13("design:type", String)
|
|
929
1089
|
], ResultMessageOutput.prototype, "result", void 0);
|
|
930
|
-
ResultMessageOutput =
|
|
931
|
-
(0,
|
|
1090
|
+
ResultMessageOutput = _ts_decorate13([
|
|
1091
|
+
(0, import_type_graphql14.ObjectType)({
|
|
932
1092
|
implements: BaseMessageOutput
|
|
933
1093
|
})
|
|
934
1094
|
], ResultMessageOutput);
|
|
1095
|
+
var AgentStateMessageOutput = class {
|
|
1096
|
+
threadId;
|
|
1097
|
+
agentName;
|
|
1098
|
+
nodeName;
|
|
1099
|
+
runId;
|
|
1100
|
+
active;
|
|
1101
|
+
role;
|
|
1102
|
+
state;
|
|
1103
|
+
running;
|
|
1104
|
+
};
|
|
1105
|
+
__name(AgentStateMessageOutput, "AgentStateMessageOutput");
|
|
1106
|
+
_ts_decorate13([
|
|
1107
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1108
|
+
_ts_metadata13("design:type", String)
|
|
1109
|
+
], AgentStateMessageOutput.prototype, "threadId", void 0);
|
|
1110
|
+
_ts_decorate13([
|
|
1111
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1112
|
+
_ts_metadata13("design:type", String)
|
|
1113
|
+
], AgentStateMessageOutput.prototype, "agentName", void 0);
|
|
1114
|
+
_ts_decorate13([
|
|
1115
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1116
|
+
_ts_metadata13("design:type", String)
|
|
1117
|
+
], AgentStateMessageOutput.prototype, "nodeName", void 0);
|
|
1118
|
+
_ts_decorate13([
|
|
1119
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1120
|
+
_ts_metadata13("design:type", String)
|
|
1121
|
+
], AgentStateMessageOutput.prototype, "runId", void 0);
|
|
1122
|
+
_ts_decorate13([
|
|
1123
|
+
(0, import_type_graphql14.Field)(() => Boolean),
|
|
1124
|
+
_ts_metadata13("design:type", Boolean)
|
|
1125
|
+
], AgentStateMessageOutput.prototype, "active", void 0);
|
|
1126
|
+
_ts_decorate13([
|
|
1127
|
+
(0, import_type_graphql14.Field)(() => MessageRole),
|
|
1128
|
+
_ts_metadata13("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
|
|
1129
|
+
], AgentStateMessageOutput.prototype, "role", void 0);
|
|
1130
|
+
_ts_decorate13([
|
|
1131
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1132
|
+
_ts_metadata13("design:type", String)
|
|
1133
|
+
], AgentStateMessageOutput.prototype, "state", void 0);
|
|
1134
|
+
_ts_decorate13([
|
|
1135
|
+
(0, import_type_graphql14.Field)(() => Boolean),
|
|
1136
|
+
_ts_metadata13("design:type", Boolean)
|
|
1137
|
+
], AgentStateMessageOutput.prototype, "running", void 0);
|
|
1138
|
+
AgentStateMessageOutput = _ts_decorate13([
|
|
1139
|
+
(0, import_type_graphql14.ObjectType)({
|
|
1140
|
+
implements: BaseMessageOutput
|
|
1141
|
+
})
|
|
1142
|
+
], AgentStateMessageOutput);
|
|
935
1143
|
var CopilotResponse = class {
|
|
936
1144
|
threadId;
|
|
937
1145
|
status;
|
|
@@ -939,28 +1147,28 @@ var CopilotResponse = class {
|
|
|
939
1147
|
messages;
|
|
940
1148
|
};
|
|
941
1149
|
__name(CopilotResponse, "CopilotResponse");
|
|
942
|
-
|
|
943
|
-
(0,
|
|
944
|
-
|
|
1150
|
+
_ts_decorate13([
|
|
1151
|
+
(0, import_type_graphql14.Field)(() => String),
|
|
1152
|
+
_ts_metadata13("design:type", String)
|
|
945
1153
|
], CopilotResponse.prototype, "threadId", void 0);
|
|
946
|
-
|
|
947
|
-
(0,
|
|
948
|
-
|
|
1154
|
+
_ts_decorate13([
|
|
1155
|
+
(0, import_type_graphql14.Field)(() => ResponseStatusUnion),
|
|
1156
|
+
_ts_metadata13("design:type", Object)
|
|
949
1157
|
], CopilotResponse.prototype, "status", void 0);
|
|
950
|
-
|
|
951
|
-
(0,
|
|
1158
|
+
_ts_decorate13([
|
|
1159
|
+
(0, import_type_graphql14.Field)({
|
|
952
1160
|
nullable: true
|
|
953
1161
|
}),
|
|
954
|
-
|
|
1162
|
+
_ts_metadata13("design:type", String)
|
|
955
1163
|
], CopilotResponse.prototype, "runId", void 0);
|
|
956
|
-
|
|
957
|
-
(0,
|
|
1164
|
+
_ts_decorate13([
|
|
1165
|
+
(0, import_type_graphql14.Field)(() => [
|
|
958
1166
|
BaseMessageOutput
|
|
959
1167
|
]),
|
|
960
|
-
|
|
1168
|
+
_ts_metadata13("design:type", Array)
|
|
961
1169
|
], CopilotResponse.prototype, "messages", void 0);
|
|
962
|
-
CopilotResponse =
|
|
963
|
-
(0,
|
|
1170
|
+
CopilotResponse = _ts_decorate13([
|
|
1171
|
+
(0, import_type_graphql14.ObjectType)()
|
|
964
1172
|
], CopilotResponse);
|
|
965
1173
|
|
|
966
1174
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
@@ -987,6 +1195,26 @@ var ResultMessage = class extends BaseMessage {
|
|
|
987
1195
|
result;
|
|
988
1196
|
};
|
|
989
1197
|
__name(ResultMessage, "ResultMessage");
|
|
1198
|
+
var AgentStateMessage = class extends BaseMessage {
|
|
1199
|
+
threadId;
|
|
1200
|
+
agentName;
|
|
1201
|
+
nodeName;
|
|
1202
|
+
runId;
|
|
1203
|
+
active;
|
|
1204
|
+
role;
|
|
1205
|
+
state;
|
|
1206
|
+
running;
|
|
1207
|
+
};
|
|
1208
|
+
__name(AgentStateMessage, "AgentStateMessage");
|
|
1209
|
+
|
|
1210
|
+
// src/lib/telemetry-client.ts
|
|
1211
|
+
var import_shared = require("@copilotkit/shared");
|
|
1212
|
+
var packageJson = require_package();
|
|
1213
|
+
var telemetryClient = new import_shared.TelemetryClient({
|
|
1214
|
+
packageName: packageJson.name,
|
|
1215
|
+
packageVersion: packageJson.version
|
|
1216
|
+
});
|
|
1217
|
+
var telemetry_client_default = telemetryClient;
|
|
990
1218
|
|
|
991
1219
|
// src/service-adapters/events.ts
|
|
992
1220
|
var RuntimeEventTypes;
|
|
@@ -998,6 +1226,7 @@ var RuntimeEventTypes;
|
|
|
998
1226
|
RuntimeEventTypes2["ActionExecutionArgs"] = "ActionExecutionArgs";
|
|
999
1227
|
RuntimeEventTypes2["ActionExecutionEnd"] = "ActionExecutionEnd";
|
|
1000
1228
|
RuntimeEventTypes2["ActionExecutionResult"] = "ActionExecutionResult";
|
|
1229
|
+
RuntimeEventTypes2["AgentStateMessage"] = "AgentStateMessage";
|
|
1001
1230
|
})(RuntimeEventTypes || (RuntimeEventTypes = {}));
|
|
1002
1231
|
|
|
1003
1232
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
@@ -1038,18 +1267,9 @@ var UnknownErrorResponse = class extends FailedResponseStatus {
|
|
|
1038
1267
|
};
|
|
1039
1268
|
__name(UnknownErrorResponse, "UnknownErrorResponse");
|
|
1040
1269
|
|
|
1041
|
-
// src/lib/telemetry-client.ts
|
|
1042
|
-
var import_shared = require("@copilotkit/shared");
|
|
1043
|
-
var packageJson = require_package();
|
|
1044
|
-
var telemetryClient = new import_shared.TelemetryClient({
|
|
1045
|
-
packageName: packageJson.name,
|
|
1046
|
-
packageVersion: packageJson.version
|
|
1047
|
-
});
|
|
1048
|
-
var telemetry_client_default = telemetryClient;
|
|
1049
|
-
|
|
1050
1270
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
1051
1271
|
var import_shared2 = require("@copilotkit/shared");
|
|
1052
|
-
function
|
|
1272
|
+
function _ts_decorate14(decorators, target, key, desc) {
|
|
1053
1273
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1054
1274
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1055
1275
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1059,12 +1279,12 @@ function _ts_decorate12(decorators, target, key, desc) {
|
|
|
1059
1279
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1060
1280
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1061
1281
|
}
|
|
1062
|
-
__name(
|
|
1063
|
-
function
|
|
1282
|
+
__name(_ts_decorate14, "_ts_decorate");
|
|
1283
|
+
function _ts_metadata14(k, v) {
|
|
1064
1284
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1065
1285
|
return Reflect.metadata(k, v);
|
|
1066
1286
|
}
|
|
1067
|
-
__name(
|
|
1287
|
+
__name(_ts_metadata14, "_ts_metadata");
|
|
1068
1288
|
function _ts_param(paramIndex, decorator) {
|
|
1069
1289
|
return function(target, key) {
|
|
1070
1290
|
decorator(target, key, paramIndex);
|
|
@@ -1073,7 +1293,6 @@ function _ts_param(paramIndex, decorator) {
|
|
|
1073
1293
|
__name(_ts_param, "_ts_param");
|
|
1074
1294
|
var invokeGuardrails = /* @__PURE__ */ __name(async ({ baseUrl, copilotCloudPublicApiKey, data, onResult, onError }) => {
|
|
1075
1295
|
var _a;
|
|
1076
|
-
console.log("invokeGuardrails.baseUrl", baseUrl);
|
|
1077
1296
|
if (data.messages.length && ((_a = data.messages[data.messages.length - 1].textMessage) == null ? void 0 : _a.role) === MessageRole.user) {
|
|
1078
1297
|
const messages = data.messages.filter((m) => m.textMessage !== void 0 && (m.textMessage.role === MessageRole.user || m.textMessage.role === MessageRole.assistant)).map((m) => ({
|
|
1079
1298
|
role: m.textMessage.role,
|
|
@@ -1119,8 +1338,6 @@ var CopilotResolver = class {
|
|
|
1119
1338
|
logger2.debug({
|
|
1120
1339
|
data
|
|
1121
1340
|
}, "Generating Copilot response");
|
|
1122
|
-
const copilotRuntime = ctx._copilotkit.runtime;
|
|
1123
|
-
const serviceAdapter = ctx._copilotkit.serviceAdapter;
|
|
1124
1341
|
if (properties) {
|
|
1125
1342
|
logger2.debug("Properties provided, merging with context properties");
|
|
1126
1343
|
ctx.properties = {
|
|
@@ -1128,6 +1345,8 @@ var CopilotResolver = class {
|
|
|
1128
1345
|
...properties
|
|
1129
1346
|
};
|
|
1130
1347
|
}
|
|
1348
|
+
const copilotRuntime = ctx._copilotkit.runtime;
|
|
1349
|
+
const serviceAdapter = ctx._copilotkit.serviceAdapter;
|
|
1131
1350
|
let copilotCloudPublicApiKey = null;
|
|
1132
1351
|
let copilotCloudBaseUrl;
|
|
1133
1352
|
if (data.cloud) {
|
|
@@ -1166,16 +1385,18 @@ var CopilotResolver = class {
|
|
|
1166
1385
|
rejectOutputMessagesPromise = reject;
|
|
1167
1386
|
});
|
|
1168
1387
|
logger2.debug("Processing");
|
|
1169
|
-
const { eventSource, threadId = (0, import_shared2.randomId)(), runId,
|
|
1388
|
+
const { eventSource, threadId = (0, import_shared2.randomId)(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
|
|
1170
1389
|
serviceAdapter,
|
|
1171
1390
|
messages: data.messages,
|
|
1172
1391
|
actions: data.frontend.actions,
|
|
1173
1392
|
threadId: data.threadId,
|
|
1174
1393
|
runId: data.runId,
|
|
1175
1394
|
publicApiKey: void 0,
|
|
1176
|
-
properties: ctx.properties || {},
|
|
1177
1395
|
outputMessagesPromise,
|
|
1396
|
+
graphqlContext: ctx,
|
|
1178
1397
|
forwardedParameters: data.forwardedParameters,
|
|
1398
|
+
agentSession: data.agentSession,
|
|
1399
|
+
agentStates: data.agentStates,
|
|
1179
1400
|
url: data.frontend.url
|
|
1180
1401
|
});
|
|
1181
1402
|
logger2.debug("Event source created, creating response");
|
|
@@ -1233,9 +1454,13 @@ var CopilotResolver = class {
|
|
|
1233
1454
|
});
|
|
1234
1455
|
}
|
|
1235
1456
|
let eventStreamSubscription;
|
|
1236
|
-
const eventStream = eventSource.
|
|
1237
|
-
|
|
1238
|
-
guardrailsResult$: ((_b2 = data.cloud) == null ? void 0 : _b2.guardrails) ? guardrailsResult$ : null
|
|
1457
|
+
const eventStream = eventSource.processRuntimeEvents({
|
|
1458
|
+
serverSideActions,
|
|
1459
|
+
guardrailsResult$: ((_b2 = data.cloud) == null ? void 0 : _b2.guardrails) ? guardrailsResult$ : null,
|
|
1460
|
+
actionInputsWithoutAgents: actionInputsWithoutAgents.filter(
|
|
1461
|
+
// TODO-AGENTS: do not exclude ALL server side actions
|
|
1462
|
+
(action) => !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name)
|
|
1463
|
+
)
|
|
1239
1464
|
}).pipe(
|
|
1240
1465
|
// shareReplay() ensures that later subscribers will see the whole stream instead of
|
|
1241
1466
|
// just the events that were emitted after the subscriber was added.
|
|
@@ -1383,6 +1608,36 @@ var CopilotResolver = class {
|
|
|
1383
1608
|
result: event.result
|
|
1384
1609
|
}));
|
|
1385
1610
|
break;
|
|
1611
|
+
case RuntimeEventTypes.AgentStateMessage:
|
|
1612
|
+
logger2.debug({
|
|
1613
|
+
event
|
|
1614
|
+
}, "Agent message event received");
|
|
1615
|
+
pushMessage({
|
|
1616
|
+
id: (0, import_shared2.randomId)(),
|
|
1617
|
+
status: new SuccessMessageStatus(),
|
|
1618
|
+
threadId: event.threadId,
|
|
1619
|
+
agentName: event.agentName,
|
|
1620
|
+
nodeName: event.nodeName,
|
|
1621
|
+
runId: event.runId,
|
|
1622
|
+
active: event.active,
|
|
1623
|
+
state: event.state,
|
|
1624
|
+
running: event.running,
|
|
1625
|
+
role: MessageRole.assistant,
|
|
1626
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
1627
|
+
});
|
|
1628
|
+
outputMessages.push((0, import_class_transformer.plainToInstance)(AgentStateMessage, {
|
|
1629
|
+
id: (0, import_shared2.randomId)(),
|
|
1630
|
+
threadId: event.threadId,
|
|
1631
|
+
agentName: event.agentName,
|
|
1632
|
+
nodeName: event.nodeName,
|
|
1633
|
+
runId: event.runId,
|
|
1634
|
+
active: event.active,
|
|
1635
|
+
state: event.state,
|
|
1636
|
+
running: event.running,
|
|
1637
|
+
role: MessageRole.assistant,
|
|
1638
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
1639
|
+
}));
|
|
1640
|
+
break;
|
|
1386
1641
|
}
|
|
1387
1642
|
},
|
|
1388
1643
|
error: (err) => {
|
|
@@ -1415,29 +1670,29 @@ var CopilotResolver = class {
|
|
|
1415
1670
|
}
|
|
1416
1671
|
};
|
|
1417
1672
|
__name(CopilotResolver, "CopilotResolver");
|
|
1418
|
-
|
|
1419
|
-
(0,
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1673
|
+
_ts_decorate14([
|
|
1674
|
+
(0, import_type_graphql15.Query)(() => String),
|
|
1675
|
+
_ts_metadata14("design:type", Function),
|
|
1676
|
+
_ts_metadata14("design:paramtypes", []),
|
|
1677
|
+
_ts_metadata14("design:returntype", Promise)
|
|
1423
1678
|
], CopilotResolver.prototype, "hello", null);
|
|
1424
|
-
|
|
1425
|
-
(0,
|
|
1426
|
-
_ts_param(0, (0,
|
|
1427
|
-
_ts_param(1, (0,
|
|
1428
|
-
_ts_param(2, (0,
|
|
1679
|
+
_ts_decorate14([
|
|
1680
|
+
(0, import_type_graphql15.Mutation)(() => CopilotResponse),
|
|
1681
|
+
_ts_param(0, (0, import_type_graphql15.Ctx)()),
|
|
1682
|
+
_ts_param(1, (0, import_type_graphql15.Arg)("data")),
|
|
1683
|
+
_ts_param(2, (0, import_type_graphql15.Arg)("properties", () => import_graphql_scalars2.GraphQLJSONObject, {
|
|
1429
1684
|
nullable: true
|
|
1430
1685
|
})),
|
|
1431
|
-
|
|
1432
|
-
|
|
1686
|
+
_ts_metadata14("design:type", Function),
|
|
1687
|
+
_ts_metadata14("design:paramtypes", [
|
|
1433
1688
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
1434
1689
|
typeof GenerateCopilotResponseInput === "undefined" ? Object : GenerateCopilotResponseInput,
|
|
1435
1690
|
typeof CopilotRequestContextProperties === "undefined" ? Object : CopilotRequestContextProperties
|
|
1436
1691
|
]),
|
|
1437
|
-
|
|
1692
|
+
_ts_metadata14("design:returntype", Promise)
|
|
1438
1693
|
], CopilotResolver.prototype, "generateCopilotResponse", null);
|
|
1439
|
-
CopilotResolver =
|
|
1440
|
-
(0,
|
|
1694
|
+
CopilotResolver = _ts_decorate14([
|
|
1695
|
+
(0, import_type_graphql15.Resolver)(() => CopilotResponse)
|
|
1441
1696
|
], CopilotResolver);
|
|
1442
1697
|
|
|
1443
1698
|
// src/lib/integrations/shared.ts
|
|
@@ -1492,7 +1747,7 @@ async function createContext(initialContext, copilotKitContext, contextLogger, p
|
|
|
1492
1747
|
__name(createContext, "createContext");
|
|
1493
1748
|
function buildSchema(options = {}) {
|
|
1494
1749
|
logger.debug("Building GraphQL schema...");
|
|
1495
|
-
const schema = (0,
|
|
1750
|
+
const schema = (0, import_type_graphql16.buildSchemaSync)({
|
|
1496
1751
|
resolvers: [
|
|
1497
1752
|
CopilotResolver
|
|
1498
1753
|
],
|