@copilotkit/runtime 1.5.15-next.3 → 1.5.15-next.5
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 +16 -0
- package/__snapshots__/schema/schema.graphql +26 -0
- package/dist/{chunk-WPJHMQDF.mjs → chunk-6AZ56PM7.mjs} +2 -2
- package/dist/{chunk-KPOZF6JI.mjs → chunk-AKPE4ICY.mjs} +2 -2
- package/dist/{chunk-EV3MMEAZ.mjs → chunk-IARJ7RBP.mjs} +513 -295
- package/dist/chunk-IARJ7RBP.mjs.map +1 -0
- package/dist/{chunk-I2OII4XX.mjs → chunk-NKM2XMY5.mjs} +2 -2
- package/dist/{copilot-runtime-e6c34790.d.ts → copilot-runtime-a113045f.d.ts} +13 -1
- package/dist/{groq-adapter-acb6ed0b.d.ts → groq-adapter-248058e8.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +787 -571
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{langserve-9614171f.d.ts → langserve-9580bd66.d.ts} +16 -2
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +787 -571
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -4
- package/dist/lib/integrations/index.d.ts +3 -3
- package/dist/lib/integrations/index.js +500 -319
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +4 -4
- package/dist/lib/integrations/nest/index.d.ts +2 -2
- package/dist/lib/integrations/nest/index.js +500 -319
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +2 -2
- package/dist/lib/integrations/node-express/index.d.ts +2 -2
- package/dist/lib/integrations/node-express/index.js +500 -319
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +2 -2
- package/dist/lib/integrations/node-http/index.d.ts +2 -2
- package/dist/lib/integrations/node-http/index.js +500 -319
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +1 -1
- package/dist/service-adapters/index.d.ts +3 -3
- package/package.json +3 -3
- package/src/agents/langgraph/event-source.ts +14 -2
- package/src/agents/langgraph/events.ts +12 -1
- package/src/graphql/inputs/generate-copilot-response.input.ts +4 -0
- package/src/graphql/inputs/meta-event.input.ts +17 -0
- package/src/graphql/resolvers/copilot.resolver.ts +67 -22
- package/src/graphql/types/copilot-response.type.ts +6 -0
- package/src/graphql/types/meta-events.type.ts +31 -0
- package/src/lib/runtime/copilot-runtime.ts +4 -0
- package/src/lib/runtime/remote-action-constructors.ts +5 -1
- package/src/lib/runtime/remote-actions.ts +2 -0
- package/src/lib/runtime/remote-lg-action.ts +35 -8
- package/src/service-adapters/events.ts +20 -1
- package/dist/chunk-EV3MMEAZ.mjs.map +0 -1
- /package/dist/{chunk-WPJHMQDF.mjs.map → chunk-6AZ56PM7.mjs.map} +0 -0
- /package/dist/{chunk-KPOZF6JI.mjs.map → chunk-AKPE4ICY.mjs.map} +0 -0
- /package/dist/{chunk-I2OII4XX.mjs.map → chunk-NKM2XMY5.mjs.map} +0 -0
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.5.15-next.
|
|
47
|
+
version: "1.5.15-next.5",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -87,7 +87,7 @@ var require_package = __commonJS({
|
|
|
87
87
|
"@langchain/community": "^0.0.53",
|
|
88
88
|
"@langchain/core": "^0.3.13",
|
|
89
89
|
"@langchain/google-gauth": "^0.1.0",
|
|
90
|
-
"@langchain/langgraph-sdk": "^0.0.
|
|
90
|
+
"@langchain/langgraph-sdk": "^0.0.36",
|
|
91
91
|
"@langchain/openai": "^0.0.28",
|
|
92
92
|
"class-transformer": "^0.5.1",
|
|
93
93
|
express: "^4.19.2",
|
|
@@ -130,14 +130,14 @@ module.exports = __toCommonJS(node_http_exports);
|
|
|
130
130
|
var import_graphql_yoga2 = require("graphql-yoga");
|
|
131
131
|
|
|
132
132
|
// src/lib/integrations/shared.ts
|
|
133
|
-
var
|
|
133
|
+
var import_type_graphql26 = require("type-graphql");
|
|
134
134
|
|
|
135
135
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
136
|
-
var
|
|
136
|
+
var import_type_graphql20 = require("type-graphql");
|
|
137
137
|
var import_rxjs3 = require("rxjs");
|
|
138
138
|
|
|
139
139
|
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
140
|
-
var
|
|
140
|
+
var import_type_graphql14 = require("type-graphql");
|
|
141
141
|
|
|
142
142
|
// src/graphql/inputs/message.input.ts
|
|
143
143
|
var import_type_graphql3 = require("type-graphql");
|
|
@@ -778,7 +778,11 @@ OpenAIApiAssistantAPIInput = _ts_decorate10([
|
|
|
778
778
|
(0, import_type_graphql11.InputType)()
|
|
779
779
|
], OpenAIApiAssistantAPIInput);
|
|
780
780
|
|
|
781
|
-
// src/graphql/inputs/
|
|
781
|
+
// src/graphql/inputs/meta-event.input.ts
|
|
782
|
+
var import_type_graphql13 = require("type-graphql");
|
|
783
|
+
|
|
784
|
+
// src/graphql/types/meta-events.type.ts
|
|
785
|
+
var import_type_graphql12 = require("type-graphql");
|
|
782
786
|
function _ts_decorate11(decorators, target, key, desc) {
|
|
783
787
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
784
788
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -795,18 +799,131 @@ function _ts_metadata11(k, v) {
|
|
|
795
799
|
return Reflect.metadata(k, v);
|
|
796
800
|
}
|
|
797
801
|
__name(_ts_metadata11, "_ts_metadata");
|
|
802
|
+
var MetaEventName;
|
|
803
|
+
(function(MetaEventName2) {
|
|
804
|
+
MetaEventName2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent";
|
|
805
|
+
})(MetaEventName || (MetaEventName = {}));
|
|
806
|
+
(0, import_type_graphql12.registerEnumType)(MetaEventName, {
|
|
807
|
+
name: "MetaEventName",
|
|
808
|
+
description: "Meta event types"
|
|
809
|
+
});
|
|
810
|
+
var BaseMetaEvent = class {
|
|
811
|
+
type = "MetaEvent";
|
|
812
|
+
name;
|
|
813
|
+
};
|
|
814
|
+
__name(BaseMetaEvent, "BaseMetaEvent");
|
|
815
|
+
_ts_decorate11([
|
|
816
|
+
(0, import_type_graphql12.Field)(() => String),
|
|
817
|
+
_ts_metadata11("design:type", String)
|
|
818
|
+
], BaseMetaEvent.prototype, "type", void 0);
|
|
819
|
+
_ts_decorate11([
|
|
820
|
+
(0, import_type_graphql12.Field)(() => MetaEventName),
|
|
821
|
+
_ts_metadata11("design:type", String)
|
|
822
|
+
], BaseMetaEvent.prototype, "name", void 0);
|
|
823
|
+
BaseMetaEvent = _ts_decorate11([
|
|
824
|
+
(0, import_type_graphql12.InterfaceType)()
|
|
825
|
+
], BaseMetaEvent);
|
|
826
|
+
var LangGraphInterruptEvent = class {
|
|
827
|
+
name = "LangGraphInterruptEvent";
|
|
828
|
+
value;
|
|
829
|
+
response;
|
|
830
|
+
};
|
|
831
|
+
__name(LangGraphInterruptEvent, "LangGraphInterruptEvent");
|
|
832
|
+
_ts_decorate11([
|
|
833
|
+
(0, import_type_graphql12.Field)(() => MetaEventName),
|
|
834
|
+
_ts_metadata11("design:type", typeof MetaEventName === "undefined" || false ? Object : "LangGraphInterruptEvent")
|
|
835
|
+
], LangGraphInterruptEvent.prototype, "name", void 0);
|
|
836
|
+
_ts_decorate11([
|
|
837
|
+
(0, import_type_graphql12.Field)(() => String),
|
|
838
|
+
_ts_metadata11("design:type", String)
|
|
839
|
+
], LangGraphInterruptEvent.prototype, "value", void 0);
|
|
840
|
+
_ts_decorate11([
|
|
841
|
+
(0, import_type_graphql12.Field)(() => String, {
|
|
842
|
+
nullable: true
|
|
843
|
+
}),
|
|
844
|
+
_ts_metadata11("design:type", String)
|
|
845
|
+
], LangGraphInterruptEvent.prototype, "response", void 0);
|
|
846
|
+
LangGraphInterruptEvent = _ts_decorate11([
|
|
847
|
+
(0, import_type_graphql12.ObjectType)({
|
|
848
|
+
implements: BaseMetaEvent
|
|
849
|
+
})
|
|
850
|
+
], LangGraphInterruptEvent);
|
|
851
|
+
|
|
852
|
+
// src/graphql/inputs/meta-event.input.ts
|
|
853
|
+
function _ts_decorate12(decorators, target, key, desc) {
|
|
854
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
855
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
856
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
857
|
+
else
|
|
858
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
859
|
+
if (d = decorators[i])
|
|
860
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
861
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
862
|
+
}
|
|
863
|
+
__name(_ts_decorate12, "_ts_decorate");
|
|
864
|
+
function _ts_metadata12(k, v) {
|
|
865
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
866
|
+
return Reflect.metadata(k, v);
|
|
867
|
+
}
|
|
868
|
+
__name(_ts_metadata12, "_ts_metadata");
|
|
869
|
+
var MetaEventInput = class {
|
|
870
|
+
type = "MetaEvent";
|
|
871
|
+
name;
|
|
872
|
+
value;
|
|
873
|
+
response;
|
|
874
|
+
};
|
|
875
|
+
__name(MetaEventInput, "MetaEventInput");
|
|
876
|
+
_ts_decorate12([
|
|
877
|
+
(0, import_type_graphql13.Field)(() => String),
|
|
878
|
+
_ts_metadata12("design:type", String)
|
|
879
|
+
], MetaEventInput.prototype, "type", void 0);
|
|
880
|
+
_ts_decorate12([
|
|
881
|
+
(0, import_type_graphql13.Field)(() => MetaEventName),
|
|
882
|
+
_ts_metadata12("design:type", typeof MetaEventName === "undefined" ? Object : MetaEventName)
|
|
883
|
+
], MetaEventInput.prototype, "name", void 0);
|
|
884
|
+
_ts_decorate12([
|
|
885
|
+
(0, import_type_graphql13.Field)(() => String),
|
|
886
|
+
_ts_metadata12("design:type", String)
|
|
887
|
+
], MetaEventInput.prototype, "value", void 0);
|
|
888
|
+
_ts_decorate12([
|
|
889
|
+
(0, import_type_graphql13.Field)(() => String, {
|
|
890
|
+
nullable: true
|
|
891
|
+
}),
|
|
892
|
+
_ts_metadata12("design:type", String)
|
|
893
|
+
], MetaEventInput.prototype, "response", void 0);
|
|
894
|
+
MetaEventInput = _ts_decorate12([
|
|
895
|
+
(0, import_type_graphql13.InputType)()
|
|
896
|
+
], MetaEventInput);
|
|
897
|
+
|
|
898
|
+
// src/graphql/inputs/generate-copilot-response.input.ts
|
|
899
|
+
function _ts_decorate13(decorators, target, key, desc) {
|
|
900
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
901
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
902
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
903
|
+
else
|
|
904
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
905
|
+
if (d = decorators[i])
|
|
906
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
907
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
908
|
+
}
|
|
909
|
+
__name(_ts_decorate13, "_ts_decorate");
|
|
910
|
+
function _ts_metadata13(k, v) {
|
|
911
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
912
|
+
return Reflect.metadata(k, v);
|
|
913
|
+
}
|
|
914
|
+
__name(_ts_metadata13, "_ts_metadata");
|
|
798
915
|
var GenerateCopilotResponseMetadataInput = class {
|
|
799
916
|
requestType;
|
|
800
917
|
};
|
|
801
918
|
__name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
|
|
802
|
-
|
|
803
|
-
(0,
|
|
919
|
+
_ts_decorate13([
|
|
920
|
+
(0, import_type_graphql14.Field)(() => CopilotRequestType, {
|
|
804
921
|
nullable: true
|
|
805
922
|
}),
|
|
806
|
-
|
|
923
|
+
_ts_metadata13("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
|
|
807
924
|
], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
|
|
808
|
-
GenerateCopilotResponseMetadataInput =
|
|
809
|
-
(0,
|
|
925
|
+
GenerateCopilotResponseMetadataInput = _ts_decorate13([
|
|
926
|
+
(0, import_type_graphql14.InputType)()
|
|
810
927
|
], GenerateCopilotResponseMetadataInput);
|
|
811
928
|
var GenerateCopilotResponseInput = class {
|
|
812
929
|
metadata;
|
|
@@ -820,84 +937,93 @@ var GenerateCopilotResponseInput = class {
|
|
|
820
937
|
agentState;
|
|
821
938
|
agentStates;
|
|
822
939
|
extensions;
|
|
940
|
+
metaEvents;
|
|
823
941
|
};
|
|
824
942
|
__name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
|
|
825
|
-
|
|
826
|
-
(0,
|
|
943
|
+
_ts_decorate13([
|
|
944
|
+
(0, import_type_graphql14.Field)(() => GenerateCopilotResponseMetadataInput, {
|
|
827
945
|
nullable: false
|
|
828
946
|
}),
|
|
829
|
-
|
|
947
|
+
_ts_metadata13("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
|
|
830
948
|
], GenerateCopilotResponseInput.prototype, "metadata", void 0);
|
|
831
|
-
|
|
832
|
-
(0,
|
|
949
|
+
_ts_decorate13([
|
|
950
|
+
(0, import_type_graphql14.Field)(() => String, {
|
|
833
951
|
nullable: true
|
|
834
952
|
}),
|
|
835
|
-
|
|
953
|
+
_ts_metadata13("design:type", String)
|
|
836
954
|
], GenerateCopilotResponseInput.prototype, "threadId", void 0);
|
|
837
|
-
|
|
838
|
-
(0,
|
|
955
|
+
_ts_decorate13([
|
|
956
|
+
(0, import_type_graphql14.Field)(() => String, {
|
|
839
957
|
nullable: true
|
|
840
958
|
}),
|
|
841
|
-
|
|
959
|
+
_ts_metadata13("design:type", String)
|
|
842
960
|
], GenerateCopilotResponseInput.prototype, "runId", void 0);
|
|
843
|
-
|
|
844
|
-
(0,
|
|
961
|
+
_ts_decorate13([
|
|
962
|
+
(0, import_type_graphql14.Field)(() => [
|
|
845
963
|
MessageInput
|
|
846
964
|
]),
|
|
847
|
-
|
|
965
|
+
_ts_metadata13("design:type", Array)
|
|
848
966
|
], GenerateCopilotResponseInput.prototype, "messages", void 0);
|
|
849
|
-
|
|
850
|
-
(0,
|
|
851
|
-
|
|
967
|
+
_ts_decorate13([
|
|
968
|
+
(0, import_type_graphql14.Field)(() => FrontendInput),
|
|
969
|
+
_ts_metadata13("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
|
|
852
970
|
], GenerateCopilotResponseInput.prototype, "frontend", void 0);
|
|
853
|
-
|
|
854
|
-
(0,
|
|
971
|
+
_ts_decorate13([
|
|
972
|
+
(0, import_type_graphql14.Field)(() => CloudInput, {
|
|
855
973
|
nullable: true
|
|
856
974
|
}),
|
|
857
|
-
|
|
975
|
+
_ts_metadata13("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
|
|
858
976
|
], GenerateCopilotResponseInput.prototype, "cloud", void 0);
|
|
859
|
-
|
|
860
|
-
(0,
|
|
977
|
+
_ts_decorate13([
|
|
978
|
+
(0, import_type_graphql14.Field)(() => ForwardedParametersInput, {
|
|
861
979
|
nullable: true
|
|
862
980
|
}),
|
|
863
|
-
|
|
981
|
+
_ts_metadata13("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
|
|
864
982
|
], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
|
|
865
|
-
|
|
866
|
-
(0,
|
|
983
|
+
_ts_decorate13([
|
|
984
|
+
(0, import_type_graphql14.Field)(() => AgentSessionInput, {
|
|
867
985
|
nullable: true
|
|
868
986
|
}),
|
|
869
|
-
|
|
987
|
+
_ts_metadata13("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
|
|
870
988
|
], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
|
|
871
|
-
|
|
872
|
-
(0,
|
|
989
|
+
_ts_decorate13([
|
|
990
|
+
(0, import_type_graphql14.Field)(() => AgentStateInput, {
|
|
873
991
|
nullable: true
|
|
874
992
|
}),
|
|
875
|
-
|
|
993
|
+
_ts_metadata13("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
|
|
876
994
|
], GenerateCopilotResponseInput.prototype, "agentState", void 0);
|
|
877
|
-
|
|
878
|
-
(0,
|
|
995
|
+
_ts_decorate13([
|
|
996
|
+
(0, import_type_graphql14.Field)(() => [
|
|
879
997
|
AgentStateInput
|
|
880
998
|
], {
|
|
881
999
|
nullable: true
|
|
882
1000
|
}),
|
|
883
|
-
|
|
1001
|
+
_ts_metadata13("design:type", Array)
|
|
884
1002
|
], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
|
|
885
|
-
|
|
886
|
-
(0,
|
|
1003
|
+
_ts_decorate13([
|
|
1004
|
+
(0, import_type_graphql14.Field)(() => ExtensionsInput, {
|
|
887
1005
|
nullable: true
|
|
888
1006
|
}),
|
|
889
|
-
|
|
1007
|
+
_ts_metadata13("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput)
|
|
890
1008
|
], GenerateCopilotResponseInput.prototype, "extensions", void 0);
|
|
891
|
-
|
|
892
|
-
(0,
|
|
1009
|
+
_ts_decorate13([
|
|
1010
|
+
(0, import_type_graphql14.Field)(() => [
|
|
1011
|
+
MetaEventInput
|
|
1012
|
+
], {
|
|
1013
|
+
nullable: true
|
|
1014
|
+
}),
|
|
1015
|
+
_ts_metadata13("design:type", Array)
|
|
1016
|
+
], GenerateCopilotResponseInput.prototype, "metaEvents", void 0);
|
|
1017
|
+
GenerateCopilotResponseInput = _ts_decorate13([
|
|
1018
|
+
(0, import_type_graphql14.InputType)()
|
|
893
1019
|
], GenerateCopilotResponseInput);
|
|
894
1020
|
|
|
895
1021
|
// src/graphql/types/copilot-response.type.ts
|
|
896
|
-
var
|
|
1022
|
+
var import_type_graphql18 = require("type-graphql");
|
|
897
1023
|
|
|
898
1024
|
// src/graphql/types/message-status.type.ts
|
|
899
|
-
var
|
|
900
|
-
function
|
|
1025
|
+
var import_type_graphql15 = require("type-graphql");
|
|
1026
|
+
function _ts_decorate14(decorators, target, key, desc) {
|
|
901
1027
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
902
1028
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
903
1029
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -907,58 +1033,58 @@ function _ts_decorate12(decorators, target, key, desc) {
|
|
|
907
1033
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
908
1034
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
909
1035
|
}
|
|
910
|
-
__name(
|
|
911
|
-
function
|
|
1036
|
+
__name(_ts_decorate14, "_ts_decorate");
|
|
1037
|
+
function _ts_metadata14(k, v) {
|
|
912
1038
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
913
1039
|
return Reflect.metadata(k, v);
|
|
914
1040
|
}
|
|
915
|
-
__name(
|
|
1041
|
+
__name(_ts_metadata14, "_ts_metadata");
|
|
916
1042
|
var MessageStatusCode;
|
|
917
1043
|
(function(MessageStatusCode2) {
|
|
918
1044
|
MessageStatusCode2["Pending"] = "pending";
|
|
919
1045
|
MessageStatusCode2["Success"] = "success";
|
|
920
1046
|
MessageStatusCode2["Failed"] = "failed";
|
|
921
1047
|
})(MessageStatusCode || (MessageStatusCode = {}));
|
|
922
|
-
(0,
|
|
1048
|
+
(0, import_type_graphql15.registerEnumType)(MessageStatusCode, {
|
|
923
1049
|
name: "MessageStatusCode"
|
|
924
1050
|
});
|
|
925
1051
|
var BaseMessageStatus = /* @__PURE__ */ __name(class BaseMessageStatus2 {
|
|
926
1052
|
code;
|
|
927
1053
|
}, "BaseMessageStatus");
|
|
928
|
-
|
|
929
|
-
(0,
|
|
930
|
-
|
|
1054
|
+
_ts_decorate14([
|
|
1055
|
+
(0, import_type_graphql15.Field)(() => MessageStatusCode),
|
|
1056
|
+
_ts_metadata14("design:type", String)
|
|
931
1057
|
], BaseMessageStatus.prototype, "code", void 0);
|
|
932
|
-
BaseMessageStatus =
|
|
933
|
-
(0,
|
|
1058
|
+
BaseMessageStatus = _ts_decorate14([
|
|
1059
|
+
(0, import_type_graphql15.ObjectType)()
|
|
934
1060
|
], BaseMessageStatus);
|
|
935
1061
|
var PendingMessageStatus = class extends BaseMessageStatus {
|
|
936
1062
|
code = "pending";
|
|
937
1063
|
};
|
|
938
1064
|
__name(PendingMessageStatus, "PendingMessageStatus");
|
|
939
|
-
PendingMessageStatus =
|
|
940
|
-
(0,
|
|
1065
|
+
PendingMessageStatus = _ts_decorate14([
|
|
1066
|
+
(0, import_type_graphql15.ObjectType)()
|
|
941
1067
|
], PendingMessageStatus);
|
|
942
1068
|
var SuccessMessageStatus = class extends BaseMessageStatus {
|
|
943
1069
|
code = "success";
|
|
944
1070
|
};
|
|
945
1071
|
__name(SuccessMessageStatus, "SuccessMessageStatus");
|
|
946
|
-
SuccessMessageStatus =
|
|
947
|
-
(0,
|
|
1072
|
+
SuccessMessageStatus = _ts_decorate14([
|
|
1073
|
+
(0, import_type_graphql15.ObjectType)()
|
|
948
1074
|
], SuccessMessageStatus);
|
|
949
1075
|
var FailedMessageStatus = class extends BaseMessageStatus {
|
|
950
1076
|
code = "failed";
|
|
951
1077
|
reason;
|
|
952
1078
|
};
|
|
953
1079
|
__name(FailedMessageStatus, "FailedMessageStatus");
|
|
954
|
-
|
|
955
|
-
(0,
|
|
956
|
-
|
|
1080
|
+
_ts_decorate14([
|
|
1081
|
+
(0, import_type_graphql15.Field)(() => String),
|
|
1082
|
+
_ts_metadata14("design:type", String)
|
|
957
1083
|
], FailedMessageStatus.prototype, "reason", void 0);
|
|
958
|
-
FailedMessageStatus =
|
|
959
|
-
(0,
|
|
1084
|
+
FailedMessageStatus = _ts_decorate14([
|
|
1085
|
+
(0, import_type_graphql15.ObjectType)()
|
|
960
1086
|
], FailedMessageStatus);
|
|
961
|
-
var MessageStatusUnion = (0,
|
|
1087
|
+
var MessageStatusUnion = (0, import_type_graphql15.createUnionType)({
|
|
962
1088
|
name: "MessageStatus",
|
|
963
1089
|
types: () => [
|
|
964
1090
|
PendingMessageStatus,
|
|
@@ -969,8 +1095,8 @@ var MessageStatusUnion = (0, import_type_graphql13.createUnionType)({
|
|
|
969
1095
|
|
|
970
1096
|
// src/graphql/types/response-status.type.ts
|
|
971
1097
|
var import_graphql_scalars = require("graphql-scalars");
|
|
972
|
-
var
|
|
973
|
-
function
|
|
1098
|
+
var import_type_graphql16 = require("type-graphql");
|
|
1099
|
+
function _ts_decorate15(decorators, target, key, desc) {
|
|
974
1100
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
975
1101
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
976
1102
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -980,30 +1106,30 @@ function _ts_decorate13(decorators, target, key, desc) {
|
|
|
980
1106
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
981
1107
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
982
1108
|
}
|
|
983
|
-
__name(
|
|
984
|
-
function
|
|
1109
|
+
__name(_ts_decorate15, "_ts_decorate");
|
|
1110
|
+
function _ts_metadata15(k, v) {
|
|
985
1111
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
986
1112
|
return Reflect.metadata(k, v);
|
|
987
1113
|
}
|
|
988
|
-
__name(
|
|
1114
|
+
__name(_ts_metadata15, "_ts_metadata");
|
|
989
1115
|
var ResponseStatusCode;
|
|
990
1116
|
(function(ResponseStatusCode2) {
|
|
991
1117
|
ResponseStatusCode2["Pending"] = "pending";
|
|
992
1118
|
ResponseStatusCode2["Success"] = "success";
|
|
993
1119
|
ResponseStatusCode2["Failed"] = "failed";
|
|
994
1120
|
})(ResponseStatusCode || (ResponseStatusCode = {}));
|
|
995
|
-
(0,
|
|
1121
|
+
(0, import_type_graphql16.registerEnumType)(ResponseStatusCode, {
|
|
996
1122
|
name: "ResponseStatusCode"
|
|
997
1123
|
});
|
|
998
1124
|
var BaseResponseStatus = /* @__PURE__ */ __name(class BaseResponseStatus2 {
|
|
999
1125
|
code;
|
|
1000
1126
|
}, "BaseResponseStatus");
|
|
1001
|
-
|
|
1002
|
-
(0,
|
|
1003
|
-
|
|
1127
|
+
_ts_decorate15([
|
|
1128
|
+
(0, import_type_graphql16.Field)(() => ResponseStatusCode),
|
|
1129
|
+
_ts_metadata15("design:type", String)
|
|
1004
1130
|
], BaseResponseStatus.prototype, "code", void 0);
|
|
1005
|
-
BaseResponseStatus =
|
|
1006
|
-
(0,
|
|
1131
|
+
BaseResponseStatus = _ts_decorate15([
|
|
1132
|
+
(0, import_type_graphql16.InterfaceType)({
|
|
1007
1133
|
resolveType(value) {
|
|
1008
1134
|
if (value.code === "success") {
|
|
1009
1135
|
return SuccessResponseStatus;
|
|
@@ -1015,14 +1141,14 @@ BaseResponseStatus = _ts_decorate13([
|
|
|
1015
1141
|
return void 0;
|
|
1016
1142
|
}
|
|
1017
1143
|
}),
|
|
1018
|
-
(0,
|
|
1144
|
+
(0, import_type_graphql16.ObjectType)()
|
|
1019
1145
|
], BaseResponseStatus);
|
|
1020
1146
|
var PendingResponseStatus = class extends BaseResponseStatus {
|
|
1021
1147
|
code = "pending";
|
|
1022
1148
|
};
|
|
1023
1149
|
__name(PendingResponseStatus, "PendingResponseStatus");
|
|
1024
|
-
PendingResponseStatus =
|
|
1025
|
-
(0,
|
|
1150
|
+
PendingResponseStatus = _ts_decorate15([
|
|
1151
|
+
(0, import_type_graphql16.ObjectType)({
|
|
1026
1152
|
implements: BaseResponseStatus
|
|
1027
1153
|
})
|
|
1028
1154
|
], PendingResponseStatus);
|
|
@@ -1030,8 +1156,8 @@ var SuccessResponseStatus = class extends BaseResponseStatus {
|
|
|
1030
1156
|
code = "success";
|
|
1031
1157
|
};
|
|
1032
1158
|
__name(SuccessResponseStatus, "SuccessResponseStatus");
|
|
1033
|
-
SuccessResponseStatus =
|
|
1034
|
-
(0,
|
|
1159
|
+
SuccessResponseStatus = _ts_decorate15([
|
|
1160
|
+
(0, import_type_graphql16.ObjectType)({
|
|
1035
1161
|
implements: BaseResponseStatus
|
|
1036
1162
|
})
|
|
1037
1163
|
], SuccessResponseStatus);
|
|
@@ -1041,7 +1167,7 @@ var FailedResponseStatusReason;
|
|
|
1041
1167
|
FailedResponseStatusReason2["MESSAGE_STREAM_INTERRUPTED"] = "MESSAGE_STREAM_INTERRUPTED";
|
|
1042
1168
|
FailedResponseStatusReason2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
|
|
1043
1169
|
})(FailedResponseStatusReason || (FailedResponseStatusReason = {}));
|
|
1044
|
-
(0,
|
|
1170
|
+
(0, import_type_graphql16.registerEnumType)(FailedResponseStatusReason, {
|
|
1045
1171
|
name: "FailedResponseStatusReason"
|
|
1046
1172
|
});
|
|
1047
1173
|
var FailedResponseStatus = class extends BaseResponseStatus {
|
|
@@ -1050,22 +1176,22 @@ var FailedResponseStatus = class extends BaseResponseStatus {
|
|
|
1050
1176
|
details = null;
|
|
1051
1177
|
};
|
|
1052
1178
|
__name(FailedResponseStatus, "FailedResponseStatus");
|
|
1053
|
-
|
|
1054
|
-
(0,
|
|
1055
|
-
|
|
1179
|
+
_ts_decorate15([
|
|
1180
|
+
(0, import_type_graphql16.Field)(() => FailedResponseStatusReason),
|
|
1181
|
+
_ts_metadata15("design:type", String)
|
|
1056
1182
|
], FailedResponseStatus.prototype, "reason", void 0);
|
|
1057
|
-
|
|
1058
|
-
(0,
|
|
1183
|
+
_ts_decorate15([
|
|
1184
|
+
(0, import_type_graphql16.Field)(() => import_graphql_scalars.GraphQLJSON, {
|
|
1059
1185
|
nullable: true
|
|
1060
1186
|
}),
|
|
1061
|
-
|
|
1187
|
+
_ts_metadata15("design:type", typeof Record === "undefined" ? Object : Record)
|
|
1062
1188
|
], FailedResponseStatus.prototype, "details", void 0);
|
|
1063
|
-
FailedResponseStatus =
|
|
1064
|
-
(0,
|
|
1189
|
+
FailedResponseStatus = _ts_decorate15([
|
|
1190
|
+
(0, import_type_graphql16.ObjectType)({
|
|
1065
1191
|
implements: BaseResponseStatus
|
|
1066
1192
|
})
|
|
1067
1193
|
], FailedResponseStatus);
|
|
1068
|
-
var ResponseStatusUnion = (0,
|
|
1194
|
+
var ResponseStatusUnion = (0, import_type_graphql16.createUnionType)({
|
|
1069
1195
|
name: "ResponseStatus",
|
|
1070
1196
|
types: () => [
|
|
1071
1197
|
PendingResponseStatus,
|
|
@@ -1075,8 +1201,8 @@ var ResponseStatusUnion = (0, import_type_graphql14.createUnionType)({
|
|
|
1075
1201
|
});
|
|
1076
1202
|
|
|
1077
1203
|
// src/graphql/types/extensions-response.type.ts
|
|
1078
|
-
var
|
|
1079
|
-
function
|
|
1204
|
+
var import_type_graphql17 = require("type-graphql");
|
|
1205
|
+
function _ts_decorate16(decorators, target, key, desc) {
|
|
1080
1206
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1081
1207
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1082
1208
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1086,48 +1212,48 @@ function _ts_decorate14(decorators, target, key, desc) {
|
|
|
1086
1212
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1087
1213
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1088
1214
|
}
|
|
1089
|
-
__name(
|
|
1090
|
-
function
|
|
1215
|
+
__name(_ts_decorate16, "_ts_decorate");
|
|
1216
|
+
function _ts_metadata16(k, v) {
|
|
1091
1217
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1092
1218
|
return Reflect.metadata(k, v);
|
|
1093
1219
|
}
|
|
1094
|
-
__name(
|
|
1220
|
+
__name(_ts_metadata16, "_ts_metadata");
|
|
1095
1221
|
var ExtensionsResponse = class {
|
|
1096
1222
|
openaiAssistantAPI;
|
|
1097
1223
|
};
|
|
1098
1224
|
__name(ExtensionsResponse, "ExtensionsResponse");
|
|
1099
|
-
|
|
1100
|
-
(0,
|
|
1225
|
+
_ts_decorate16([
|
|
1226
|
+
(0, import_type_graphql17.Field)(() => OpenAIApiAssistantAPIResponse, {
|
|
1101
1227
|
nullable: true
|
|
1102
1228
|
}),
|
|
1103
|
-
|
|
1229
|
+
_ts_metadata16("design:type", typeof OpenAIApiAssistantAPIResponse === "undefined" ? Object : OpenAIApiAssistantAPIResponse)
|
|
1104
1230
|
], ExtensionsResponse.prototype, "openaiAssistantAPI", void 0);
|
|
1105
|
-
ExtensionsResponse =
|
|
1106
|
-
(0,
|
|
1231
|
+
ExtensionsResponse = _ts_decorate16([
|
|
1232
|
+
(0, import_type_graphql17.ObjectType)()
|
|
1107
1233
|
], ExtensionsResponse);
|
|
1108
1234
|
var OpenAIApiAssistantAPIResponse = class {
|
|
1109
1235
|
runId;
|
|
1110
1236
|
threadId;
|
|
1111
1237
|
};
|
|
1112
1238
|
__name(OpenAIApiAssistantAPIResponse, "OpenAIApiAssistantAPIResponse");
|
|
1113
|
-
|
|
1114
|
-
(0,
|
|
1239
|
+
_ts_decorate16([
|
|
1240
|
+
(0, import_type_graphql17.Field)(() => String, {
|
|
1115
1241
|
nullable: true
|
|
1116
1242
|
}),
|
|
1117
|
-
|
|
1243
|
+
_ts_metadata16("design:type", String)
|
|
1118
1244
|
], OpenAIApiAssistantAPIResponse.prototype, "runId", void 0);
|
|
1119
|
-
|
|
1120
|
-
(0,
|
|
1245
|
+
_ts_decorate16([
|
|
1246
|
+
(0, import_type_graphql17.Field)(() => String, {
|
|
1121
1247
|
nullable: true
|
|
1122
1248
|
}),
|
|
1123
|
-
|
|
1249
|
+
_ts_metadata16("design:type", String)
|
|
1124
1250
|
], OpenAIApiAssistantAPIResponse.prototype, "threadId", void 0);
|
|
1125
|
-
OpenAIApiAssistantAPIResponse =
|
|
1126
|
-
(0,
|
|
1251
|
+
OpenAIApiAssistantAPIResponse = _ts_decorate16([
|
|
1252
|
+
(0, import_type_graphql17.ObjectType)()
|
|
1127
1253
|
], OpenAIApiAssistantAPIResponse);
|
|
1128
1254
|
|
|
1129
1255
|
// src/graphql/types/copilot-response.type.ts
|
|
1130
|
-
function
|
|
1256
|
+
function _ts_decorate17(decorators, target, key, desc) {
|
|
1131
1257
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1132
1258
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1133
1259
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1137,32 +1263,32 @@ function _ts_decorate15(decorators, target, key, desc) {
|
|
|
1137
1263
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1138
1264
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1139
1265
|
}
|
|
1140
|
-
__name(
|
|
1141
|
-
function
|
|
1266
|
+
__name(_ts_decorate17, "_ts_decorate");
|
|
1267
|
+
function _ts_metadata17(k, v) {
|
|
1142
1268
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1143
1269
|
return Reflect.metadata(k, v);
|
|
1144
1270
|
}
|
|
1145
|
-
__name(
|
|
1271
|
+
__name(_ts_metadata17, "_ts_metadata");
|
|
1146
1272
|
var BaseMessageOutput = class {
|
|
1147
1273
|
id;
|
|
1148
1274
|
createdAt;
|
|
1149
1275
|
status;
|
|
1150
1276
|
};
|
|
1151
1277
|
__name(BaseMessageOutput, "BaseMessageOutput");
|
|
1152
|
-
|
|
1153
|
-
(0,
|
|
1154
|
-
|
|
1278
|
+
_ts_decorate17([
|
|
1279
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1280
|
+
_ts_metadata17("design:type", String)
|
|
1155
1281
|
], BaseMessageOutput.prototype, "id", void 0);
|
|
1156
|
-
|
|
1157
|
-
(0,
|
|
1158
|
-
|
|
1282
|
+
_ts_decorate17([
|
|
1283
|
+
(0, import_type_graphql18.Field)(() => Date),
|
|
1284
|
+
_ts_metadata17("design:type", typeof Date === "undefined" ? Object : Date)
|
|
1159
1285
|
], BaseMessageOutput.prototype, "createdAt", void 0);
|
|
1160
|
-
|
|
1161
|
-
(0,
|
|
1162
|
-
|
|
1286
|
+
_ts_decorate17([
|
|
1287
|
+
(0, import_type_graphql18.Field)(() => MessageStatusUnion),
|
|
1288
|
+
_ts_metadata17("design:type", Object)
|
|
1163
1289
|
], BaseMessageOutput.prototype, "status", void 0);
|
|
1164
|
-
BaseMessageOutput =
|
|
1165
|
-
(0,
|
|
1290
|
+
BaseMessageOutput = _ts_decorate17([
|
|
1291
|
+
(0, import_type_graphql18.InterfaceType)({
|
|
1166
1292
|
resolveType(value) {
|
|
1167
1293
|
if (value.hasOwnProperty("content")) {
|
|
1168
1294
|
return TextMessageOutput;
|
|
@@ -1172,6 +1298,8 @@ BaseMessageOutput = _ts_decorate15([
|
|
|
1172
1298
|
return ResultMessageOutput;
|
|
1173
1299
|
} else if (value.hasOwnProperty("state")) {
|
|
1174
1300
|
return AgentStateMessageOutput;
|
|
1301
|
+
} else if (value.name === MetaEventName.LangGraphInterruptEvent) {
|
|
1302
|
+
return LangGraphInterruptEvent;
|
|
1175
1303
|
}
|
|
1176
1304
|
return void 0;
|
|
1177
1305
|
}
|
|
@@ -1183,24 +1311,24 @@ var TextMessageOutput = class {
|
|
|
1183
1311
|
parentMessageId;
|
|
1184
1312
|
};
|
|
1185
1313
|
__name(TextMessageOutput, "TextMessageOutput");
|
|
1186
|
-
|
|
1187
|
-
(0,
|
|
1188
|
-
|
|
1314
|
+
_ts_decorate17([
|
|
1315
|
+
(0, import_type_graphql18.Field)(() => MessageRole),
|
|
1316
|
+
_ts_metadata17("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
|
|
1189
1317
|
], TextMessageOutput.prototype, "role", void 0);
|
|
1190
|
-
|
|
1191
|
-
(0,
|
|
1318
|
+
_ts_decorate17([
|
|
1319
|
+
(0, import_type_graphql18.Field)(() => [
|
|
1192
1320
|
String
|
|
1193
1321
|
]),
|
|
1194
|
-
|
|
1322
|
+
_ts_metadata17("design:type", Array)
|
|
1195
1323
|
], TextMessageOutput.prototype, "content", void 0);
|
|
1196
|
-
|
|
1197
|
-
(0,
|
|
1324
|
+
_ts_decorate17([
|
|
1325
|
+
(0, import_type_graphql18.Field)(() => String, {
|
|
1198
1326
|
nullable: true
|
|
1199
1327
|
}),
|
|
1200
|
-
|
|
1328
|
+
_ts_metadata17("design:type", String)
|
|
1201
1329
|
], TextMessageOutput.prototype, "parentMessageId", void 0);
|
|
1202
|
-
TextMessageOutput =
|
|
1203
|
-
(0,
|
|
1330
|
+
TextMessageOutput = _ts_decorate17([
|
|
1331
|
+
(0, import_type_graphql18.ObjectType)({
|
|
1204
1332
|
implements: BaseMessageOutput
|
|
1205
1333
|
})
|
|
1206
1334
|
], TextMessageOutput);
|
|
@@ -1211,31 +1339,31 @@ var ActionExecutionMessageOutput = class {
|
|
|
1211
1339
|
parentMessageId;
|
|
1212
1340
|
};
|
|
1213
1341
|
__name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput");
|
|
1214
|
-
|
|
1215
|
-
(0,
|
|
1216
|
-
|
|
1342
|
+
_ts_decorate17([
|
|
1343
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1344
|
+
_ts_metadata17("design:type", String)
|
|
1217
1345
|
], ActionExecutionMessageOutput.prototype, "name", void 0);
|
|
1218
|
-
|
|
1219
|
-
(0,
|
|
1346
|
+
_ts_decorate17([
|
|
1347
|
+
(0, import_type_graphql18.Field)(() => String, {
|
|
1220
1348
|
nullable: true,
|
|
1221
1349
|
deprecationReason: "This field will be removed in a future version"
|
|
1222
1350
|
}),
|
|
1223
|
-
|
|
1351
|
+
_ts_metadata17("design:type", String)
|
|
1224
1352
|
], ActionExecutionMessageOutput.prototype, "scope", void 0);
|
|
1225
|
-
|
|
1226
|
-
(0,
|
|
1353
|
+
_ts_decorate17([
|
|
1354
|
+
(0, import_type_graphql18.Field)(() => [
|
|
1227
1355
|
String
|
|
1228
1356
|
]),
|
|
1229
|
-
|
|
1357
|
+
_ts_metadata17("design:type", Array)
|
|
1230
1358
|
], ActionExecutionMessageOutput.prototype, "arguments", void 0);
|
|
1231
|
-
|
|
1232
|
-
(0,
|
|
1359
|
+
_ts_decorate17([
|
|
1360
|
+
(0, import_type_graphql18.Field)(() => String, {
|
|
1233
1361
|
nullable: true
|
|
1234
1362
|
}),
|
|
1235
|
-
|
|
1363
|
+
_ts_metadata17("design:type", String)
|
|
1236
1364
|
], ActionExecutionMessageOutput.prototype, "parentMessageId", void 0);
|
|
1237
|
-
ActionExecutionMessageOutput =
|
|
1238
|
-
(0,
|
|
1365
|
+
ActionExecutionMessageOutput = _ts_decorate17([
|
|
1366
|
+
(0, import_type_graphql18.ObjectType)({
|
|
1239
1367
|
implements: BaseMessageOutput
|
|
1240
1368
|
})
|
|
1241
1369
|
], ActionExecutionMessageOutput);
|
|
@@ -1245,20 +1373,20 @@ var ResultMessageOutput = class {
|
|
|
1245
1373
|
result;
|
|
1246
1374
|
};
|
|
1247
1375
|
__name(ResultMessageOutput, "ResultMessageOutput");
|
|
1248
|
-
|
|
1249
|
-
(0,
|
|
1250
|
-
|
|
1376
|
+
_ts_decorate17([
|
|
1377
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1378
|
+
_ts_metadata17("design:type", String)
|
|
1251
1379
|
], ResultMessageOutput.prototype, "actionExecutionId", void 0);
|
|
1252
|
-
|
|
1253
|
-
(0,
|
|
1254
|
-
|
|
1380
|
+
_ts_decorate17([
|
|
1381
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1382
|
+
_ts_metadata17("design:type", String)
|
|
1255
1383
|
], ResultMessageOutput.prototype, "actionName", void 0);
|
|
1256
|
-
|
|
1257
|
-
(0,
|
|
1258
|
-
|
|
1384
|
+
_ts_decorate17([
|
|
1385
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1386
|
+
_ts_metadata17("design:type", String)
|
|
1259
1387
|
], ResultMessageOutput.prototype, "result", void 0);
|
|
1260
|
-
ResultMessageOutput =
|
|
1261
|
-
(0,
|
|
1388
|
+
ResultMessageOutput = _ts_decorate17([
|
|
1389
|
+
(0, import_type_graphql18.ObjectType)({
|
|
1262
1390
|
implements: BaseMessageOutput
|
|
1263
1391
|
})
|
|
1264
1392
|
], ResultMessageOutput);
|
|
@@ -1273,40 +1401,40 @@ var AgentStateMessageOutput = class {
|
|
|
1273
1401
|
running;
|
|
1274
1402
|
};
|
|
1275
1403
|
__name(AgentStateMessageOutput, "AgentStateMessageOutput");
|
|
1276
|
-
|
|
1277
|
-
(0,
|
|
1278
|
-
|
|
1404
|
+
_ts_decorate17([
|
|
1405
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1406
|
+
_ts_metadata17("design:type", String)
|
|
1279
1407
|
], AgentStateMessageOutput.prototype, "threadId", void 0);
|
|
1280
|
-
|
|
1281
|
-
(0,
|
|
1282
|
-
|
|
1408
|
+
_ts_decorate17([
|
|
1409
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1410
|
+
_ts_metadata17("design:type", String)
|
|
1283
1411
|
], AgentStateMessageOutput.prototype, "agentName", void 0);
|
|
1284
|
-
|
|
1285
|
-
(0,
|
|
1286
|
-
|
|
1412
|
+
_ts_decorate17([
|
|
1413
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1414
|
+
_ts_metadata17("design:type", String)
|
|
1287
1415
|
], AgentStateMessageOutput.prototype, "nodeName", void 0);
|
|
1288
|
-
|
|
1289
|
-
(0,
|
|
1290
|
-
|
|
1416
|
+
_ts_decorate17([
|
|
1417
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1418
|
+
_ts_metadata17("design:type", String)
|
|
1291
1419
|
], AgentStateMessageOutput.prototype, "runId", void 0);
|
|
1292
|
-
|
|
1293
|
-
(0,
|
|
1294
|
-
|
|
1420
|
+
_ts_decorate17([
|
|
1421
|
+
(0, import_type_graphql18.Field)(() => Boolean),
|
|
1422
|
+
_ts_metadata17("design:type", Boolean)
|
|
1295
1423
|
], AgentStateMessageOutput.prototype, "active", void 0);
|
|
1296
|
-
|
|
1297
|
-
(0,
|
|
1298
|
-
|
|
1424
|
+
_ts_decorate17([
|
|
1425
|
+
(0, import_type_graphql18.Field)(() => MessageRole),
|
|
1426
|
+
_ts_metadata17("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
|
|
1299
1427
|
], AgentStateMessageOutput.prototype, "role", void 0);
|
|
1300
|
-
|
|
1301
|
-
(0,
|
|
1302
|
-
|
|
1428
|
+
_ts_decorate17([
|
|
1429
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1430
|
+
_ts_metadata17("design:type", String)
|
|
1303
1431
|
], AgentStateMessageOutput.prototype, "state", void 0);
|
|
1304
|
-
|
|
1305
|
-
(0,
|
|
1306
|
-
|
|
1432
|
+
_ts_decorate17([
|
|
1433
|
+
(0, import_type_graphql18.Field)(() => Boolean),
|
|
1434
|
+
_ts_metadata17("design:type", Boolean)
|
|
1307
1435
|
], AgentStateMessageOutput.prototype, "running", void 0);
|
|
1308
|
-
AgentStateMessageOutput =
|
|
1309
|
-
(0,
|
|
1436
|
+
AgentStateMessageOutput = _ts_decorate17([
|
|
1437
|
+
(0, import_type_graphql18.ObjectType)({
|
|
1310
1438
|
implements: BaseMessageOutput
|
|
1311
1439
|
})
|
|
1312
1440
|
], AgentStateMessageOutput);
|
|
@@ -1316,36 +1444,45 @@ var CopilotResponse = class {
|
|
|
1316
1444
|
runId;
|
|
1317
1445
|
messages;
|
|
1318
1446
|
extensions;
|
|
1447
|
+
metaEvents;
|
|
1319
1448
|
};
|
|
1320
1449
|
__name(CopilotResponse, "CopilotResponse");
|
|
1321
|
-
|
|
1322
|
-
(0,
|
|
1323
|
-
|
|
1450
|
+
_ts_decorate17([
|
|
1451
|
+
(0, import_type_graphql18.Field)(() => String),
|
|
1452
|
+
_ts_metadata17("design:type", String)
|
|
1324
1453
|
], CopilotResponse.prototype, "threadId", void 0);
|
|
1325
|
-
|
|
1326
|
-
(0,
|
|
1327
|
-
|
|
1454
|
+
_ts_decorate17([
|
|
1455
|
+
(0, import_type_graphql18.Field)(() => ResponseStatusUnion),
|
|
1456
|
+
_ts_metadata17("design:type", Object)
|
|
1328
1457
|
], CopilotResponse.prototype, "status", void 0);
|
|
1329
|
-
|
|
1330
|
-
(0,
|
|
1458
|
+
_ts_decorate17([
|
|
1459
|
+
(0, import_type_graphql18.Field)({
|
|
1331
1460
|
nullable: true
|
|
1332
1461
|
}),
|
|
1333
|
-
|
|
1462
|
+
_ts_metadata17("design:type", String)
|
|
1334
1463
|
], CopilotResponse.prototype, "runId", void 0);
|
|
1335
|
-
|
|
1336
|
-
(0,
|
|
1464
|
+
_ts_decorate17([
|
|
1465
|
+
(0, import_type_graphql18.Field)(() => [
|
|
1337
1466
|
BaseMessageOutput
|
|
1338
1467
|
]),
|
|
1339
|
-
|
|
1468
|
+
_ts_metadata17("design:type", Array)
|
|
1340
1469
|
], CopilotResponse.prototype, "messages", void 0);
|
|
1341
|
-
|
|
1342
|
-
(0,
|
|
1470
|
+
_ts_decorate17([
|
|
1471
|
+
(0, import_type_graphql18.Field)(() => ExtensionsResponse, {
|
|
1343
1472
|
nullable: true
|
|
1344
1473
|
}),
|
|
1345
|
-
|
|
1474
|
+
_ts_metadata17("design:type", typeof ExtensionsResponse === "undefined" ? Object : ExtensionsResponse)
|
|
1346
1475
|
], CopilotResponse.prototype, "extensions", void 0);
|
|
1347
|
-
|
|
1348
|
-
(0,
|
|
1476
|
+
_ts_decorate17([
|
|
1477
|
+
(0, import_type_graphql18.Field)(() => [
|
|
1478
|
+
BaseMetaEvent
|
|
1479
|
+
], {
|
|
1480
|
+
nullable: true
|
|
1481
|
+
}),
|
|
1482
|
+
_ts_metadata17("design:type", Array)
|
|
1483
|
+
], CopilotResponse.prototype, "metaEvents", void 0);
|
|
1484
|
+
CopilotResponse = _ts_decorate17([
|
|
1485
|
+
(0, import_type_graphql18.ObjectType)()
|
|
1349
1486
|
], CopilotResponse);
|
|
1350
1487
|
|
|
1351
1488
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
@@ -1559,7 +1696,13 @@ var RuntimeEventTypes;
|
|
|
1559
1696
|
RuntimeEventTypes2["ActionExecutionEnd"] = "ActionExecutionEnd";
|
|
1560
1697
|
RuntimeEventTypes2["ActionExecutionResult"] = "ActionExecutionResult";
|
|
1561
1698
|
RuntimeEventTypes2["AgentStateMessage"] = "AgentStateMessage";
|
|
1699
|
+
RuntimeEventTypes2["MetaEvent"] = "MetaEvent";
|
|
1562
1700
|
})(RuntimeEventTypes || (RuntimeEventTypes = {}));
|
|
1701
|
+
var RuntimeMetaEventName;
|
|
1702
|
+
(function(RuntimeMetaEventName2) {
|
|
1703
|
+
RuntimeMetaEventName2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent";
|
|
1704
|
+
RuntimeMetaEventName2["LangGraphInterruptResumeEvent"] = "LangGraphInterruptResumeEvent";
|
|
1705
|
+
})(RuntimeMetaEventName || (RuntimeMetaEventName = {}));
|
|
1563
1706
|
|
|
1564
1707
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
1565
1708
|
var import_graphql_scalars2 = require("graphql-scalars");
|
|
@@ -1603,8 +1746,8 @@ __name(UnknownErrorResponse, "UnknownErrorResponse");
|
|
|
1603
1746
|
var import_shared5 = require("@copilotkit/shared");
|
|
1604
1747
|
|
|
1605
1748
|
// src/graphql/types/agents-response.type.ts
|
|
1606
|
-
var
|
|
1607
|
-
function
|
|
1749
|
+
var import_type_graphql19 = require("type-graphql");
|
|
1750
|
+
function _ts_decorate18(decorators, target, key, desc) {
|
|
1608
1751
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1609
1752
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1610
1753
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1614,49 +1757,49 @@ function _ts_decorate16(decorators, target, key, desc) {
|
|
|
1614
1757
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1615
1758
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1616
1759
|
}
|
|
1617
|
-
__name(
|
|
1618
|
-
function
|
|
1760
|
+
__name(_ts_decorate18, "_ts_decorate");
|
|
1761
|
+
function _ts_metadata18(k, v) {
|
|
1619
1762
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1620
1763
|
return Reflect.metadata(k, v);
|
|
1621
1764
|
}
|
|
1622
|
-
__name(
|
|
1765
|
+
__name(_ts_metadata18, "_ts_metadata");
|
|
1623
1766
|
var Agent = class {
|
|
1624
1767
|
id;
|
|
1625
1768
|
name;
|
|
1626
1769
|
description;
|
|
1627
1770
|
};
|
|
1628
1771
|
__name(Agent, "Agent");
|
|
1629
|
-
|
|
1630
|
-
(0,
|
|
1631
|
-
|
|
1772
|
+
_ts_decorate18([
|
|
1773
|
+
(0, import_type_graphql19.Field)(() => String),
|
|
1774
|
+
_ts_metadata18("design:type", String)
|
|
1632
1775
|
], Agent.prototype, "id", void 0);
|
|
1633
|
-
|
|
1634
|
-
(0,
|
|
1635
|
-
|
|
1776
|
+
_ts_decorate18([
|
|
1777
|
+
(0, import_type_graphql19.Field)(() => String),
|
|
1778
|
+
_ts_metadata18("design:type", String)
|
|
1636
1779
|
], Agent.prototype, "name", void 0);
|
|
1637
|
-
|
|
1638
|
-
(0,
|
|
1639
|
-
|
|
1780
|
+
_ts_decorate18([
|
|
1781
|
+
(0, import_type_graphql19.Field)(() => String),
|
|
1782
|
+
_ts_metadata18("design:type", String)
|
|
1640
1783
|
], Agent.prototype, "description", void 0);
|
|
1641
|
-
Agent =
|
|
1642
|
-
(0,
|
|
1784
|
+
Agent = _ts_decorate18([
|
|
1785
|
+
(0, import_type_graphql19.ObjectType)()
|
|
1643
1786
|
], Agent);
|
|
1644
1787
|
var AgentsResponse = class {
|
|
1645
1788
|
agents;
|
|
1646
1789
|
};
|
|
1647
1790
|
__name(AgentsResponse, "AgentsResponse");
|
|
1648
|
-
|
|
1649
|
-
(0,
|
|
1791
|
+
_ts_decorate18([
|
|
1792
|
+
(0, import_type_graphql19.Field)(() => [
|
|
1650
1793
|
Agent
|
|
1651
1794
|
]),
|
|
1652
|
-
|
|
1795
|
+
_ts_metadata18("design:type", Array)
|
|
1653
1796
|
], AgentsResponse.prototype, "agents", void 0);
|
|
1654
|
-
AgentsResponse =
|
|
1655
|
-
(0,
|
|
1797
|
+
AgentsResponse = _ts_decorate18([
|
|
1798
|
+
(0, import_type_graphql19.ObjectType)()
|
|
1656
1799
|
], AgentsResponse);
|
|
1657
1800
|
|
|
1658
1801
|
// src/graphql/resolvers/copilot.resolver.ts
|
|
1659
|
-
function
|
|
1802
|
+
function _ts_decorate19(decorators, target, key, desc) {
|
|
1660
1803
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1661
1804
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1662
1805
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1666,12 +1809,12 @@ function _ts_decorate17(decorators, target, key, desc) {
|
|
|
1666
1809
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1667
1810
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1668
1811
|
}
|
|
1669
|
-
__name(
|
|
1670
|
-
function
|
|
1812
|
+
__name(_ts_decorate19, "_ts_decorate");
|
|
1813
|
+
function _ts_metadata19(k, v) {
|
|
1671
1814
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1672
1815
|
return Reflect.metadata(k, v);
|
|
1673
1816
|
}
|
|
1674
|
-
__name(
|
|
1817
|
+
__name(_ts_metadata19, "_ts_metadata");
|
|
1675
1818
|
function _ts_param(paramIndex, decorator) {
|
|
1676
1819
|
return function(target, key) {
|
|
1677
1820
|
decorator(target, key, paramIndex);
|
|
@@ -1725,7 +1868,7 @@ var CopilotResolver = class {
|
|
|
1725
1868
|
};
|
|
1726
1869
|
}
|
|
1727
1870
|
async generateCopilotResponse(ctx, data, properties) {
|
|
1728
|
-
var _a, _b, _c;
|
|
1871
|
+
var _a, _b, _c, _d;
|
|
1729
1872
|
telemetry_client_default.capture("oss.runtime.copilot_request_created", {
|
|
1730
1873
|
"cloud.guardrails.enabled": ((_a = data.cloud) == null ? void 0 : _a.guardrails) !== void 0,
|
|
1731
1874
|
requestType: data.metadata.requestType
|
|
@@ -1796,16 +1939,68 @@ var CopilotResolver = class {
|
|
|
1796
1939
|
agentSession: data.agentSession,
|
|
1797
1940
|
agentStates: data.agentStates,
|
|
1798
1941
|
url: data.frontend.url,
|
|
1799
|
-
extensions: data.extensions
|
|
1942
|
+
extensions: data.extensions,
|
|
1943
|
+
metaEvents: data.metaEvents
|
|
1800
1944
|
});
|
|
1801
1945
|
logger2.debug("Event source created, creating response");
|
|
1946
|
+
const eventStream = eventSource.processRuntimeEvents({
|
|
1947
|
+
serverSideActions,
|
|
1948
|
+
guardrailsResult$: ((_d = data.cloud) == null ? void 0 : _d.guardrails) ? guardrailsResult$ : null,
|
|
1949
|
+
actionInputsWithoutAgents: actionInputsWithoutAgents.filter(
|
|
1950
|
+
// TODO-AGENTS: do not exclude ALL server side actions
|
|
1951
|
+
(action) => !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name)
|
|
1952
|
+
),
|
|
1953
|
+
threadId
|
|
1954
|
+
}).pipe(
|
|
1955
|
+
// shareReplay() ensures that later subscribers will see the whole stream instead of
|
|
1956
|
+
// just the events that were emitted after the subscriber was added.
|
|
1957
|
+
(0, import_rxjs3.shareReplay)(),
|
|
1958
|
+
(0, import_rxjs3.finalize)(() => {
|
|
1959
|
+
logger2.debug("Event stream finalized");
|
|
1960
|
+
})
|
|
1961
|
+
);
|
|
1802
1962
|
const response = {
|
|
1803
1963
|
threadId,
|
|
1804
1964
|
runId,
|
|
1805
1965
|
status: (0, import_rxjs3.firstValueFrom)(responseStatus$),
|
|
1806
1966
|
extensions,
|
|
1967
|
+
metaEvents: new import_graphql_yoga.Repeater(async (push, stop) => {
|
|
1968
|
+
let eventStreamSubscription;
|
|
1969
|
+
eventStreamSubscription = eventStream.subscribe({
|
|
1970
|
+
next: async (event) => {
|
|
1971
|
+
if (event.type != RuntimeEventTypes.MetaEvent) {
|
|
1972
|
+
return;
|
|
1973
|
+
}
|
|
1974
|
+
switch (event.name) {
|
|
1975
|
+
case RuntimeMetaEventName.LangGraphInterruptEvent:
|
|
1976
|
+
push((0, import_class_transformer2.plainToInstance)(LangGraphInterruptEvent, {
|
|
1977
|
+
type: event.type,
|
|
1978
|
+
name: event.name,
|
|
1979
|
+
value: event.value
|
|
1980
|
+
}));
|
|
1981
|
+
break;
|
|
1982
|
+
}
|
|
1983
|
+
},
|
|
1984
|
+
error: (err) => {
|
|
1985
|
+
logger2.error({
|
|
1986
|
+
err
|
|
1987
|
+
}, "Error in meta events stream");
|
|
1988
|
+
responseStatus$.next(new UnknownErrorResponse({
|
|
1989
|
+
description: `An unknown error has occurred in the event stream`
|
|
1990
|
+
}));
|
|
1991
|
+
eventStreamSubscription == null ? void 0 : eventStreamSubscription.unsubscribe();
|
|
1992
|
+
stop();
|
|
1993
|
+
},
|
|
1994
|
+
complete: async () => {
|
|
1995
|
+
logger2.debug("Meta events stream completed");
|
|
1996
|
+
responseStatus$.next(new SuccessResponseStatus());
|
|
1997
|
+
eventStreamSubscription == null ? void 0 : eventStreamSubscription.unsubscribe();
|
|
1998
|
+
stop();
|
|
1999
|
+
}
|
|
2000
|
+
});
|
|
2001
|
+
}),
|
|
1807
2002
|
messages: new import_graphql_yoga.Repeater(async (pushMessage, stopStreamingMessages) => {
|
|
1808
|
-
var _a2
|
|
2003
|
+
var _a2;
|
|
1809
2004
|
logger2.debug("Messages repeater created");
|
|
1810
2005
|
if ((_a2 = data.cloud) == null ? void 0 : _a2.guardrails) {
|
|
1811
2006
|
logger2 = logger2.child({
|
|
@@ -1854,26 +2049,12 @@ var CopilotResolver = class {
|
|
|
1854
2049
|
});
|
|
1855
2050
|
}
|
|
1856
2051
|
let eventStreamSubscription;
|
|
1857
|
-
const eventStream = eventSource.processRuntimeEvents({
|
|
1858
|
-
serverSideActions,
|
|
1859
|
-
guardrailsResult$: ((_b2 = data.cloud) == null ? void 0 : _b2.guardrails) ? guardrailsResult$ : null,
|
|
1860
|
-
actionInputsWithoutAgents: actionInputsWithoutAgents.filter(
|
|
1861
|
-
// TODO-AGENTS: do not exclude ALL server side actions
|
|
1862
|
-
(action) => !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name)
|
|
1863
|
-
),
|
|
1864
|
-
threadId
|
|
1865
|
-
}).pipe(
|
|
1866
|
-
// shareReplay() ensures that later subscribers will see the whole stream instead of
|
|
1867
|
-
// just the events that were emitted after the subscriber was added.
|
|
1868
|
-
(0, import_rxjs3.shareReplay)(),
|
|
1869
|
-
(0, import_rxjs3.finalize)(() => {
|
|
1870
|
-
logger2.debug("Event stream finalized");
|
|
1871
|
-
})
|
|
1872
|
-
);
|
|
1873
2052
|
logger2.debug("Event stream created, subscribing to event stream");
|
|
1874
2053
|
eventStreamSubscription = eventStream.subscribe({
|
|
1875
2054
|
next: async (event) => {
|
|
1876
2055
|
switch (event.type) {
|
|
2056
|
+
case RuntimeEventTypes.MetaEvent:
|
|
2057
|
+
break;
|
|
1877
2058
|
case RuntimeEventTypes.TextMessageStart:
|
|
1878
2059
|
const textMessageContentStream = eventStream.pipe(
|
|
1879
2060
|
// skip until this message start event
|
|
@@ -2079,38 +2260,38 @@ var CopilotResolver = class {
|
|
|
2079
2260
|
}
|
|
2080
2261
|
};
|
|
2081
2262
|
__name(CopilotResolver, "CopilotResolver");
|
|
2082
|
-
|
|
2083
|
-
(0,
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2263
|
+
_ts_decorate19([
|
|
2264
|
+
(0, import_type_graphql20.Query)(() => String),
|
|
2265
|
+
_ts_metadata19("design:type", Function),
|
|
2266
|
+
_ts_metadata19("design:paramtypes", []),
|
|
2267
|
+
_ts_metadata19("design:returntype", Promise)
|
|
2087
2268
|
], CopilotResolver.prototype, "hello", null);
|
|
2088
|
-
|
|
2089
|
-
(0,
|
|
2090
|
-
_ts_param(0, (0,
|
|
2091
|
-
|
|
2092
|
-
|
|
2269
|
+
_ts_decorate19([
|
|
2270
|
+
(0, import_type_graphql20.Query)(() => AgentsResponse),
|
|
2271
|
+
_ts_param(0, (0, import_type_graphql20.Ctx)()),
|
|
2272
|
+
_ts_metadata19("design:type", Function),
|
|
2273
|
+
_ts_metadata19("design:paramtypes", [
|
|
2093
2274
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext
|
|
2094
2275
|
]),
|
|
2095
|
-
|
|
2276
|
+
_ts_metadata19("design:returntype", Promise)
|
|
2096
2277
|
], CopilotResolver.prototype, "availableAgents", null);
|
|
2097
|
-
|
|
2098
|
-
(0,
|
|
2099
|
-
_ts_param(0, (0,
|
|
2100
|
-
_ts_param(1, (0,
|
|
2101
|
-
_ts_param(2, (0,
|
|
2278
|
+
_ts_decorate19([
|
|
2279
|
+
(0, import_type_graphql20.Mutation)(() => CopilotResponse),
|
|
2280
|
+
_ts_param(0, (0, import_type_graphql20.Ctx)()),
|
|
2281
|
+
_ts_param(1, (0, import_type_graphql20.Arg)("data")),
|
|
2282
|
+
_ts_param(2, (0, import_type_graphql20.Arg)("properties", () => import_graphql_scalars2.GraphQLJSONObject, {
|
|
2102
2283
|
nullable: true
|
|
2103
2284
|
})),
|
|
2104
|
-
|
|
2105
|
-
|
|
2285
|
+
_ts_metadata19("design:type", Function),
|
|
2286
|
+
_ts_metadata19("design:paramtypes", [
|
|
2106
2287
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
2107
2288
|
typeof GenerateCopilotResponseInput === "undefined" ? Object : GenerateCopilotResponseInput,
|
|
2108
2289
|
typeof CopilotRequestContextProperties === "undefined" ? Object : CopilotRequestContextProperties
|
|
2109
2290
|
]),
|
|
2110
|
-
|
|
2291
|
+
_ts_metadata19("design:returntype", Promise)
|
|
2111
2292
|
], CopilotResolver.prototype, "generateCopilotResponse", null);
|
|
2112
|
-
CopilotResolver =
|
|
2113
|
-
(0,
|
|
2293
|
+
CopilotResolver = _ts_decorate19([
|
|
2294
|
+
(0, import_type_graphql20.Resolver)(() => CopilotResponse)
|
|
2114
2295
|
], CopilotResolver);
|
|
2115
2296
|
|
|
2116
2297
|
// src/lib/integrations/shared.ts
|
|
@@ -2145,13 +2326,13 @@ function createLogger(options) {
|
|
|
2145
2326
|
__name(createLogger, "createLogger");
|
|
2146
2327
|
|
|
2147
2328
|
// src/graphql/resolvers/state.resolver.ts
|
|
2148
|
-
var import_type_graphql21 = require("type-graphql");
|
|
2149
|
-
var import_type_graphql22 = require("type-graphql");
|
|
2150
2329
|
var import_type_graphql23 = require("type-graphql");
|
|
2330
|
+
var import_type_graphql24 = require("type-graphql");
|
|
2331
|
+
var import_type_graphql25 = require("type-graphql");
|
|
2151
2332
|
|
|
2152
2333
|
// src/graphql/types/load-agent-state-response.type.ts
|
|
2153
|
-
var
|
|
2154
|
-
function
|
|
2334
|
+
var import_type_graphql21 = require("type-graphql");
|
|
2335
|
+
function _ts_decorate20(decorators, target, key, desc) {
|
|
2155
2336
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2156
2337
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2157
2338
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2161,12 +2342,12 @@ function _ts_decorate18(decorators, target, key, desc) {
|
|
|
2161
2342
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2162
2343
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2163
2344
|
}
|
|
2164
|
-
__name(
|
|
2165
|
-
function
|
|
2345
|
+
__name(_ts_decorate20, "_ts_decorate");
|
|
2346
|
+
function _ts_metadata20(k, v) {
|
|
2166
2347
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2167
2348
|
return Reflect.metadata(k, v);
|
|
2168
2349
|
}
|
|
2169
|
-
__name(
|
|
2350
|
+
__name(_ts_metadata20, "_ts_metadata");
|
|
2170
2351
|
var LoadAgentStateResponse = class {
|
|
2171
2352
|
threadId;
|
|
2172
2353
|
threadExists;
|
|
@@ -2174,29 +2355,29 @@ var LoadAgentStateResponse = class {
|
|
|
2174
2355
|
messages;
|
|
2175
2356
|
};
|
|
2176
2357
|
__name(LoadAgentStateResponse, "LoadAgentStateResponse");
|
|
2177
|
-
|
|
2178
|
-
(0,
|
|
2179
|
-
|
|
2358
|
+
_ts_decorate20([
|
|
2359
|
+
(0, import_type_graphql21.Field)(() => String),
|
|
2360
|
+
_ts_metadata20("design:type", String)
|
|
2180
2361
|
], LoadAgentStateResponse.prototype, "threadId", void 0);
|
|
2181
|
-
|
|
2182
|
-
(0,
|
|
2183
|
-
|
|
2362
|
+
_ts_decorate20([
|
|
2363
|
+
(0, import_type_graphql21.Field)(() => Boolean),
|
|
2364
|
+
_ts_metadata20("design:type", Boolean)
|
|
2184
2365
|
], LoadAgentStateResponse.prototype, "threadExists", void 0);
|
|
2185
|
-
|
|
2186
|
-
(0,
|
|
2187
|
-
|
|
2366
|
+
_ts_decorate20([
|
|
2367
|
+
(0, import_type_graphql21.Field)(() => String),
|
|
2368
|
+
_ts_metadata20("design:type", String)
|
|
2188
2369
|
], LoadAgentStateResponse.prototype, "state", void 0);
|
|
2189
|
-
|
|
2190
|
-
(0,
|
|
2191
|
-
|
|
2370
|
+
_ts_decorate20([
|
|
2371
|
+
(0, import_type_graphql21.Field)(() => String),
|
|
2372
|
+
_ts_metadata20("design:type", String)
|
|
2192
2373
|
], LoadAgentStateResponse.prototype, "messages", void 0);
|
|
2193
|
-
LoadAgentStateResponse =
|
|
2194
|
-
(0,
|
|
2374
|
+
LoadAgentStateResponse = _ts_decorate20([
|
|
2375
|
+
(0, import_type_graphql21.ObjectType)()
|
|
2195
2376
|
], LoadAgentStateResponse);
|
|
2196
2377
|
|
|
2197
2378
|
// src/graphql/inputs/load-agent-state.input.ts
|
|
2198
|
-
var
|
|
2199
|
-
function
|
|
2379
|
+
var import_type_graphql22 = require("type-graphql");
|
|
2380
|
+
function _ts_decorate21(decorators, target, key, desc) {
|
|
2200
2381
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2201
2382
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2202
2383
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2206,31 +2387,31 @@ function _ts_decorate19(decorators, target, key, desc) {
|
|
|
2206
2387
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2207
2388
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2208
2389
|
}
|
|
2209
|
-
__name(
|
|
2210
|
-
function
|
|
2390
|
+
__name(_ts_decorate21, "_ts_decorate");
|
|
2391
|
+
function _ts_metadata21(k, v) {
|
|
2211
2392
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2212
2393
|
return Reflect.metadata(k, v);
|
|
2213
2394
|
}
|
|
2214
|
-
__name(
|
|
2395
|
+
__name(_ts_metadata21, "_ts_metadata");
|
|
2215
2396
|
var LoadAgentStateInput = class {
|
|
2216
2397
|
threadId;
|
|
2217
2398
|
agentName;
|
|
2218
2399
|
};
|
|
2219
2400
|
__name(LoadAgentStateInput, "LoadAgentStateInput");
|
|
2220
|
-
|
|
2221
|
-
(0,
|
|
2222
|
-
|
|
2401
|
+
_ts_decorate21([
|
|
2402
|
+
(0, import_type_graphql22.Field)(() => String),
|
|
2403
|
+
_ts_metadata21("design:type", String)
|
|
2223
2404
|
], LoadAgentStateInput.prototype, "threadId", void 0);
|
|
2224
|
-
|
|
2225
|
-
(0,
|
|
2226
|
-
|
|
2405
|
+
_ts_decorate21([
|
|
2406
|
+
(0, import_type_graphql22.Field)(() => String),
|
|
2407
|
+
_ts_metadata21("design:type", String)
|
|
2227
2408
|
], LoadAgentStateInput.prototype, "agentName", void 0);
|
|
2228
|
-
LoadAgentStateInput =
|
|
2229
|
-
(0,
|
|
2409
|
+
LoadAgentStateInput = _ts_decorate21([
|
|
2410
|
+
(0, import_type_graphql22.InputType)()
|
|
2230
2411
|
], LoadAgentStateInput);
|
|
2231
2412
|
|
|
2232
2413
|
// src/graphql/resolvers/state.resolver.ts
|
|
2233
|
-
function
|
|
2414
|
+
function _ts_decorate22(decorators, target, key, desc) {
|
|
2234
2415
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2235
2416
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2236
2417
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2240,12 +2421,12 @@ function _ts_decorate20(decorators, target, key, desc) {
|
|
|
2240
2421
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2241
2422
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2242
2423
|
}
|
|
2243
|
-
__name(
|
|
2244
|
-
function
|
|
2424
|
+
__name(_ts_decorate22, "_ts_decorate");
|
|
2425
|
+
function _ts_metadata22(k, v) {
|
|
2245
2426
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2246
2427
|
return Reflect.metadata(k, v);
|
|
2247
2428
|
}
|
|
2248
|
-
__name(
|
|
2429
|
+
__name(_ts_metadata22, "_ts_metadata");
|
|
2249
2430
|
function _ts_param2(paramIndex, decorator) {
|
|
2250
2431
|
return function(target, key) {
|
|
2251
2432
|
decorator(target, key, paramIndex);
|
|
@@ -2264,19 +2445,19 @@ var StateResolver = class {
|
|
|
2264
2445
|
}
|
|
2265
2446
|
};
|
|
2266
2447
|
__name(StateResolver, "StateResolver");
|
|
2267
|
-
|
|
2268
|
-
(0,
|
|
2269
|
-
_ts_param2(0, (0,
|
|
2270
|
-
_ts_param2(1, (0,
|
|
2271
|
-
|
|
2272
|
-
|
|
2448
|
+
_ts_decorate22([
|
|
2449
|
+
(0, import_type_graphql25.Query)(() => LoadAgentStateResponse),
|
|
2450
|
+
_ts_param2(0, (0, import_type_graphql24.Ctx)()),
|
|
2451
|
+
_ts_param2(1, (0, import_type_graphql23.Arg)("data")),
|
|
2452
|
+
_ts_metadata22("design:type", Function),
|
|
2453
|
+
_ts_metadata22("design:paramtypes", [
|
|
2273
2454
|
typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
|
|
2274
2455
|
typeof LoadAgentStateInput === "undefined" ? Object : LoadAgentStateInput
|
|
2275
2456
|
]),
|
|
2276
|
-
|
|
2457
|
+
_ts_metadata22("design:returntype", Promise)
|
|
2277
2458
|
], StateResolver.prototype, "loadAgentState", null);
|
|
2278
|
-
StateResolver =
|
|
2279
|
-
(0,
|
|
2459
|
+
StateResolver = _ts_decorate22([
|
|
2460
|
+
(0, import_type_graphql23.Resolver)(() => LoadAgentStateResponse)
|
|
2280
2461
|
], StateResolver);
|
|
2281
2462
|
|
|
2282
2463
|
// src/lib/integrations/shared.ts
|
|
@@ -2300,7 +2481,7 @@ async function createContext(initialContext, copilotKitContext, contextLogger, p
|
|
|
2300
2481
|
__name(createContext, "createContext");
|
|
2301
2482
|
function buildSchema(options = {}) {
|
|
2302
2483
|
logger.debug("Building GraphQL schema...");
|
|
2303
|
-
const schema = (0,
|
|
2484
|
+
const schema = (0, import_type_graphql26.buildSchemaSync)({
|
|
2304
2485
|
resolvers: [
|
|
2305
2486
|
CopilotResolver,
|
|
2306
2487
|
StateResolver
|