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