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