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