@copilotkit/runtime 1.5.15-next.7 → 1.5.15-next.8

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/__snapshots__/schema/schema.graphql +14 -1
  3. package/dist/{chunk-F4WILQ32.mjs → chunk-253HES6R.mjs} +2 -2
  4. package/dist/{chunk-BUEAVIXA.mjs → chunk-5EJIMI36.mjs} +2 -2
  5. package/dist/{chunk-OMS5GY45.mjs → chunk-HG6ZQKQW.mjs} +538 -416
  6. package/dist/chunk-HG6ZQKQW.mjs.map +1 -0
  7. package/dist/{chunk-65VBDTR4.mjs → chunk-R7GOSVTA.mjs} +2 -2
  8. package/dist/{copilot-runtime-a113045f.d.ts → copilot-runtime-3e7f1c7b.d.ts} +5 -4
  9. package/dist/graphql/types/converted/index.d.ts +1 -1
  10. package/dist/{groq-adapter-248058e8.d.ts → groq-adapter-3b894689.d.ts} +1 -1
  11. package/dist/{index-a7f37670.d.ts → index-f6d1f30b.d.ts} +1 -1
  12. package/dist/index.d.ts +4 -4
  13. package/dist/index.js +1283 -1161
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +4 -4
  16. package/dist/{langserve-9580bd66.d.ts → langserve-3a591089.d.ts} +11 -3
  17. package/dist/lib/index.d.ts +4 -4
  18. package/dist/lib/index.js +1283 -1161
  19. package/dist/lib/index.js.map +1 -1
  20. package/dist/lib/index.mjs +4 -4
  21. package/dist/lib/integrations/index.d.ts +4 -4
  22. package/dist/lib/integrations/index.js +493 -400
  23. package/dist/lib/integrations/index.js.map +1 -1
  24. package/dist/lib/integrations/index.mjs +4 -4
  25. package/dist/lib/integrations/nest/index.d.ts +3 -3
  26. package/dist/lib/integrations/nest/index.js +493 -400
  27. package/dist/lib/integrations/nest/index.js.map +1 -1
  28. package/dist/lib/integrations/nest/index.mjs +2 -2
  29. package/dist/lib/integrations/node-express/index.d.ts +3 -3
  30. package/dist/lib/integrations/node-express/index.js +493 -400
  31. package/dist/lib/integrations/node-express/index.js.map +1 -1
  32. package/dist/lib/integrations/node-express/index.mjs +2 -2
  33. package/dist/lib/integrations/node-http/index.d.ts +3 -3
  34. package/dist/lib/integrations/node-http/index.js +493 -400
  35. package/dist/lib/integrations/node-http/index.js.map +1 -1
  36. package/dist/lib/integrations/node-http/index.mjs +1 -1
  37. package/dist/service-adapters/index.d.ts +4 -4
  38. package/package.json +2 -2
  39. package/src/agents/langgraph/event-source.ts +7 -0
  40. package/src/agents/langgraph/events.ts +11 -1
  41. package/src/graphql/inputs/meta-event.input.ts +4 -3
  42. package/src/graphql/resolvers/copilot.resolver.ts +44 -1
  43. package/src/graphql/types/copilot-response.type.ts +1 -3
  44. package/src/graphql/types/meta-events.type.ts +41 -1
  45. package/src/lib/runtime/remote-lg-action.ts +44 -19
  46. package/src/service-adapters/events.ts +8 -2
  47. package/dist/chunk-OMS5GY45.mjs.map +0 -1
  48. /package/dist/{chunk-F4WILQ32.mjs.map → chunk-253HES6R.mjs.map} +0 -0
  49. /package/dist/{chunk-BUEAVIXA.mjs.map → chunk-5EJIMI36.mjs.map} +0 -0
  50. /package/dist/{chunk-65VBDTR4.mjs.map → chunk-R7GOSVTA.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.7",
47
+ version: "1.5.15-next.8",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -139,7 +139,7 @@ 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 import_type_graphql14 = require("type-graphql");
142
+ var import_type_graphql18 = require("type-graphql");
143
143
 
144
144
  // src/graphql/inputs/message.input.ts
145
145
  var import_type_graphql3 = require("type-graphql");
@@ -781,9 +781,15 @@ OpenAIApiAssistantAPIInput = _ts_decorate10([
781
781
  ], OpenAIApiAssistantAPIInput);
782
782
 
783
783
  // src/graphql/inputs/meta-event.input.ts
784
- var import_type_graphql13 = require("type-graphql");
784
+ var import_type_graphql17 = require("type-graphql");
785
785
 
786
786
  // src/graphql/types/meta-events.type.ts
787
+ var import_type_graphql16 = require("type-graphql");
788
+
789
+ // src/graphql/types/copilot-response.type.ts
790
+ var import_type_graphql15 = require("type-graphql");
791
+
792
+ // src/graphql/types/message-status.type.ts
787
793
  var import_type_graphql12 = require("type-graphql");
788
794
  function _ts_decorate11(decorators, target, key, desc) {
789
795
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -801,292 +807,52 @@ function _ts_metadata11(k, v) {
801
807
  return Reflect.metadata(k, v);
802
808
  }
803
809
  __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");
917
- var GenerateCopilotResponseMetadataInput = class {
918
- requestType;
919
- };
920
- __name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
921
- _ts_decorate13([
922
- (0, import_type_graphql14.Field)(() => CopilotRequestType, {
923
- nullable: true
924
- }),
925
- _ts_metadata13("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
926
- ], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
927
- GenerateCopilotResponseMetadataInput = _ts_decorate13([
928
- (0, import_type_graphql14.InputType)()
929
- ], GenerateCopilotResponseMetadataInput);
930
- var GenerateCopilotResponseInput = class {
931
- metadata;
932
- threadId;
933
- runId;
934
- messages;
935
- frontend;
936
- cloud;
937
- forwardedParameters;
938
- agentSession;
939
- agentState;
940
- agentStates;
941
- extensions;
942
- metaEvents;
943
- };
944
- __name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
945
- _ts_decorate13([
946
- (0, import_type_graphql14.Field)(() => GenerateCopilotResponseMetadataInput, {
947
- nullable: false
948
- }),
949
- _ts_metadata13("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
950
- ], GenerateCopilotResponseInput.prototype, "metadata", void 0);
951
- _ts_decorate13([
952
- (0, import_type_graphql14.Field)(() => String, {
953
- nullable: true
954
- }),
955
- _ts_metadata13("design:type", String)
956
- ], GenerateCopilotResponseInput.prototype, "threadId", void 0);
957
- _ts_decorate13([
958
- (0, import_type_graphql14.Field)(() => String, {
959
- nullable: true
960
- }),
961
- _ts_metadata13("design:type", String)
962
- ], GenerateCopilotResponseInput.prototype, "runId", void 0);
963
- _ts_decorate13([
964
- (0, import_type_graphql14.Field)(() => [
965
- MessageInput
966
- ]),
967
- _ts_metadata13("design:type", Array)
968
- ], GenerateCopilotResponseInput.prototype, "messages", void 0);
969
- _ts_decorate13([
970
- (0, import_type_graphql14.Field)(() => FrontendInput),
971
- _ts_metadata13("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
972
- ], GenerateCopilotResponseInput.prototype, "frontend", void 0);
973
- _ts_decorate13([
974
- (0, import_type_graphql14.Field)(() => CloudInput, {
975
- nullable: true
976
- }),
977
- _ts_metadata13("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
978
- ], GenerateCopilotResponseInput.prototype, "cloud", void 0);
979
- _ts_decorate13([
980
- (0, import_type_graphql14.Field)(() => ForwardedParametersInput, {
981
- nullable: true
982
- }),
983
- _ts_metadata13("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
984
- ], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
985
- _ts_decorate13([
986
- (0, import_type_graphql14.Field)(() => AgentSessionInput, {
987
- nullable: true
988
- }),
989
- _ts_metadata13("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
990
- ], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
991
- _ts_decorate13([
992
- (0, import_type_graphql14.Field)(() => AgentStateInput, {
993
- nullable: true
994
- }),
995
- _ts_metadata13("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
996
- ], GenerateCopilotResponseInput.prototype, "agentState", void 0);
997
- _ts_decorate13([
998
- (0, import_type_graphql14.Field)(() => [
999
- AgentStateInput
1000
- ], {
1001
- nullable: true
1002
- }),
1003
- _ts_metadata13("design:type", Array)
1004
- ], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
1005
- _ts_decorate13([
1006
- (0, import_type_graphql14.Field)(() => ExtensionsInput, {
1007
- nullable: true
1008
- }),
1009
- _ts_metadata13("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput)
1010
- ], GenerateCopilotResponseInput.prototype, "extensions", void 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)()
1021
- ], GenerateCopilotResponseInput);
1022
-
1023
- // src/graphql/types/copilot-response.type.ts
1024
- var import_type_graphql18 = require("type-graphql");
1025
-
1026
- // src/graphql/types/message-status.type.ts
1027
- var import_type_graphql15 = require("type-graphql");
1028
- function _ts_decorate14(decorators, target, key, desc) {
1029
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1030
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1031
- r = Reflect.decorate(decorators, target, key, desc);
1032
- else
1033
- for (var i = decorators.length - 1; i >= 0; i--)
1034
- if (d = decorators[i])
1035
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1036
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1037
- }
1038
- __name(_ts_decorate14, "_ts_decorate");
1039
- function _ts_metadata14(k, v) {
1040
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1041
- return Reflect.metadata(k, v);
1042
- }
1043
- __name(_ts_metadata14, "_ts_metadata");
1044
810
  var MessageStatusCode;
1045
811
  (function(MessageStatusCode2) {
1046
812
  MessageStatusCode2["Pending"] = "pending";
1047
813
  MessageStatusCode2["Success"] = "success";
1048
814
  MessageStatusCode2["Failed"] = "failed";
1049
815
  })(MessageStatusCode || (MessageStatusCode = {}));
1050
- (0, import_type_graphql15.registerEnumType)(MessageStatusCode, {
816
+ (0, import_type_graphql12.registerEnumType)(MessageStatusCode, {
1051
817
  name: "MessageStatusCode"
1052
818
  });
1053
819
  var BaseMessageStatus = /* @__PURE__ */ __name(class BaseMessageStatus2 {
1054
820
  code;
1055
821
  }, "BaseMessageStatus");
1056
- _ts_decorate14([
1057
- (0, import_type_graphql15.Field)(() => MessageStatusCode),
1058
- _ts_metadata14("design:type", String)
822
+ _ts_decorate11([
823
+ (0, import_type_graphql12.Field)(() => MessageStatusCode),
824
+ _ts_metadata11("design:type", String)
1059
825
  ], BaseMessageStatus.prototype, "code", void 0);
1060
- BaseMessageStatus = _ts_decorate14([
1061
- (0, import_type_graphql15.ObjectType)()
826
+ BaseMessageStatus = _ts_decorate11([
827
+ (0, import_type_graphql12.ObjectType)()
1062
828
  ], BaseMessageStatus);
1063
829
  var PendingMessageStatus = class extends BaseMessageStatus {
1064
830
  code = "pending";
1065
831
  };
1066
832
  __name(PendingMessageStatus, "PendingMessageStatus");
1067
- PendingMessageStatus = _ts_decorate14([
1068
- (0, import_type_graphql15.ObjectType)()
833
+ PendingMessageStatus = _ts_decorate11([
834
+ (0, import_type_graphql12.ObjectType)()
1069
835
  ], PendingMessageStatus);
1070
836
  var SuccessMessageStatus = class extends BaseMessageStatus {
1071
837
  code = "success";
1072
838
  };
1073
839
  __name(SuccessMessageStatus, "SuccessMessageStatus");
1074
- SuccessMessageStatus = _ts_decorate14([
1075
- (0, import_type_graphql15.ObjectType)()
840
+ SuccessMessageStatus = _ts_decorate11([
841
+ (0, import_type_graphql12.ObjectType)()
1076
842
  ], SuccessMessageStatus);
1077
843
  var FailedMessageStatus = class extends BaseMessageStatus {
1078
844
  code = "failed";
1079
845
  reason;
1080
846
  };
1081
847
  __name(FailedMessageStatus, "FailedMessageStatus");
1082
- _ts_decorate14([
1083
- (0, import_type_graphql15.Field)(() => String),
1084
- _ts_metadata14("design:type", String)
848
+ _ts_decorate11([
849
+ (0, import_type_graphql12.Field)(() => String),
850
+ _ts_metadata11("design:type", String)
1085
851
  ], FailedMessageStatus.prototype, "reason", void 0);
1086
- FailedMessageStatus = _ts_decorate14([
1087
- (0, import_type_graphql15.ObjectType)()
852
+ FailedMessageStatus = _ts_decorate11([
853
+ (0, import_type_graphql12.ObjectType)()
1088
854
  ], FailedMessageStatus);
1089
- var MessageStatusUnion = (0, import_type_graphql15.createUnionType)({
855
+ var MessageStatusUnion = (0, import_type_graphql12.createUnionType)({
1090
856
  name: "MessageStatus",
1091
857
  types: () => [
1092
858
  PendingMessageStatus,
@@ -1097,8 +863,8 @@ var MessageStatusUnion = (0, import_type_graphql15.createUnionType)({
1097
863
 
1098
864
  // src/graphql/types/response-status.type.ts
1099
865
  var import_graphql_scalars = require("graphql-scalars");
1100
- var import_type_graphql16 = require("type-graphql");
1101
- function _ts_decorate15(decorators, target, key, desc) {
866
+ var import_type_graphql13 = require("type-graphql");
867
+ function _ts_decorate12(decorators, target, key, desc) {
1102
868
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1103
869
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1104
870
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1108,30 +874,30 @@ function _ts_decorate15(decorators, target, key, desc) {
1108
874
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1109
875
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1110
876
  }
1111
- __name(_ts_decorate15, "_ts_decorate");
1112
- function _ts_metadata15(k, v) {
877
+ __name(_ts_decorate12, "_ts_decorate");
878
+ function _ts_metadata12(k, v) {
1113
879
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1114
880
  return Reflect.metadata(k, v);
1115
881
  }
1116
- __name(_ts_metadata15, "_ts_metadata");
882
+ __name(_ts_metadata12, "_ts_metadata");
1117
883
  var ResponseStatusCode;
1118
884
  (function(ResponseStatusCode2) {
1119
885
  ResponseStatusCode2["Pending"] = "pending";
1120
886
  ResponseStatusCode2["Success"] = "success";
1121
887
  ResponseStatusCode2["Failed"] = "failed";
1122
888
  })(ResponseStatusCode || (ResponseStatusCode = {}));
1123
- (0, import_type_graphql16.registerEnumType)(ResponseStatusCode, {
889
+ (0, import_type_graphql13.registerEnumType)(ResponseStatusCode, {
1124
890
  name: "ResponseStatusCode"
1125
891
  });
1126
892
  var BaseResponseStatus = /* @__PURE__ */ __name(class BaseResponseStatus2 {
1127
893
  code;
1128
894
  }, "BaseResponseStatus");
1129
- _ts_decorate15([
1130
- (0, import_type_graphql16.Field)(() => ResponseStatusCode),
1131
- _ts_metadata15("design:type", String)
895
+ _ts_decorate12([
896
+ (0, import_type_graphql13.Field)(() => ResponseStatusCode),
897
+ _ts_metadata12("design:type", String)
1132
898
  ], BaseResponseStatus.prototype, "code", void 0);
1133
- BaseResponseStatus = _ts_decorate15([
1134
- (0, import_type_graphql16.InterfaceType)({
899
+ BaseResponseStatus = _ts_decorate12([
900
+ (0, import_type_graphql13.InterfaceType)({
1135
901
  resolveType(value) {
1136
902
  if (value.code === "success") {
1137
903
  return SuccessResponseStatus;
@@ -1143,14 +909,14 @@ BaseResponseStatus = _ts_decorate15([
1143
909
  return void 0;
1144
910
  }
1145
911
  }),
1146
- (0, import_type_graphql16.ObjectType)()
912
+ (0, import_type_graphql13.ObjectType)()
1147
913
  ], BaseResponseStatus);
1148
914
  var PendingResponseStatus = class extends BaseResponseStatus {
1149
915
  code = "pending";
1150
916
  };
1151
917
  __name(PendingResponseStatus, "PendingResponseStatus");
1152
- PendingResponseStatus = _ts_decorate15([
1153
- (0, import_type_graphql16.ObjectType)({
918
+ PendingResponseStatus = _ts_decorate12([
919
+ (0, import_type_graphql13.ObjectType)({
1154
920
  implements: BaseResponseStatus
1155
921
  })
1156
922
  ], PendingResponseStatus);
@@ -1158,8 +924,8 @@ var SuccessResponseStatus = class extends BaseResponseStatus {
1158
924
  code = "success";
1159
925
  };
1160
926
  __name(SuccessResponseStatus, "SuccessResponseStatus");
1161
- SuccessResponseStatus = _ts_decorate15([
1162
- (0, import_type_graphql16.ObjectType)({
927
+ SuccessResponseStatus = _ts_decorate12([
928
+ (0, import_type_graphql13.ObjectType)({
1163
929
  implements: BaseResponseStatus
1164
930
  })
1165
931
  ], SuccessResponseStatus);
@@ -1169,7 +935,7 @@ var FailedResponseStatusReason;
1169
935
  FailedResponseStatusReason2["MESSAGE_STREAM_INTERRUPTED"] = "MESSAGE_STREAM_INTERRUPTED";
1170
936
  FailedResponseStatusReason2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
1171
937
  })(FailedResponseStatusReason || (FailedResponseStatusReason = {}));
1172
- (0, import_type_graphql16.registerEnumType)(FailedResponseStatusReason, {
938
+ (0, import_type_graphql13.registerEnumType)(FailedResponseStatusReason, {
1173
939
  name: "FailedResponseStatusReason"
1174
940
  });
1175
941
  var FailedResponseStatus = class extends BaseResponseStatus {
@@ -1178,22 +944,22 @@ var FailedResponseStatus = class extends BaseResponseStatus {
1178
944
  details = null;
1179
945
  };
1180
946
  __name(FailedResponseStatus, "FailedResponseStatus");
1181
- _ts_decorate15([
1182
- (0, import_type_graphql16.Field)(() => FailedResponseStatusReason),
1183
- _ts_metadata15("design:type", String)
947
+ _ts_decorate12([
948
+ (0, import_type_graphql13.Field)(() => FailedResponseStatusReason),
949
+ _ts_metadata12("design:type", String)
1184
950
  ], FailedResponseStatus.prototype, "reason", void 0);
1185
- _ts_decorate15([
1186
- (0, import_type_graphql16.Field)(() => import_graphql_scalars.GraphQLJSON, {
951
+ _ts_decorate12([
952
+ (0, import_type_graphql13.Field)(() => import_graphql_scalars.GraphQLJSON, {
1187
953
  nullable: true
1188
954
  }),
1189
- _ts_metadata15("design:type", typeof Record === "undefined" ? Object : Record)
955
+ _ts_metadata12("design:type", typeof Record === "undefined" ? Object : Record)
1190
956
  ], FailedResponseStatus.prototype, "details", void 0);
1191
- FailedResponseStatus = _ts_decorate15([
1192
- (0, import_type_graphql16.ObjectType)({
957
+ FailedResponseStatus = _ts_decorate12([
958
+ (0, import_type_graphql13.ObjectType)({
1193
959
  implements: BaseResponseStatus
1194
960
  })
1195
961
  ], FailedResponseStatus);
1196
- var ResponseStatusUnion = (0, import_type_graphql16.createUnionType)({
962
+ var ResponseStatusUnion = (0, import_type_graphql13.createUnionType)({
1197
963
  name: "ResponseStatus",
1198
964
  types: () => [
1199
965
  PendingResponseStatus,
@@ -1203,8 +969,8 @@ var ResponseStatusUnion = (0, import_type_graphql16.createUnionType)({
1203
969
  });
1204
970
 
1205
971
  // src/graphql/types/extensions-response.type.ts
1206
- var import_type_graphql17 = require("type-graphql");
1207
- function _ts_decorate16(decorators, target, key, desc) {
972
+ var import_type_graphql14 = require("type-graphql");
973
+ function _ts_decorate13(decorators, target, key, desc) {
1208
974
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1209
975
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1210
976
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1214,48 +980,48 @@ function _ts_decorate16(decorators, target, key, desc) {
1214
980
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1215
981
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1216
982
  }
1217
- __name(_ts_decorate16, "_ts_decorate");
1218
- function _ts_metadata16(k, v) {
983
+ __name(_ts_decorate13, "_ts_decorate");
984
+ function _ts_metadata13(k, v) {
1219
985
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1220
986
  return Reflect.metadata(k, v);
1221
987
  }
1222
- __name(_ts_metadata16, "_ts_metadata");
988
+ __name(_ts_metadata13, "_ts_metadata");
1223
989
  var ExtensionsResponse = class {
1224
990
  openaiAssistantAPI;
1225
991
  };
1226
992
  __name(ExtensionsResponse, "ExtensionsResponse");
1227
- _ts_decorate16([
1228
- (0, import_type_graphql17.Field)(() => OpenAIApiAssistantAPIResponse, {
993
+ _ts_decorate13([
994
+ (0, import_type_graphql14.Field)(() => OpenAIApiAssistantAPIResponse, {
1229
995
  nullable: true
1230
996
  }),
1231
- _ts_metadata16("design:type", typeof OpenAIApiAssistantAPIResponse === "undefined" ? Object : OpenAIApiAssistantAPIResponse)
997
+ _ts_metadata13("design:type", typeof OpenAIApiAssistantAPIResponse === "undefined" ? Object : OpenAIApiAssistantAPIResponse)
1232
998
  ], ExtensionsResponse.prototype, "openaiAssistantAPI", void 0);
1233
- ExtensionsResponse = _ts_decorate16([
1234
- (0, import_type_graphql17.ObjectType)()
999
+ ExtensionsResponse = _ts_decorate13([
1000
+ (0, import_type_graphql14.ObjectType)()
1235
1001
  ], ExtensionsResponse);
1236
1002
  var OpenAIApiAssistantAPIResponse = class {
1237
1003
  runId;
1238
1004
  threadId;
1239
1005
  };
1240
1006
  __name(OpenAIApiAssistantAPIResponse, "OpenAIApiAssistantAPIResponse");
1241
- _ts_decorate16([
1242
- (0, import_type_graphql17.Field)(() => String, {
1007
+ _ts_decorate13([
1008
+ (0, import_type_graphql14.Field)(() => String, {
1243
1009
  nullable: true
1244
1010
  }),
1245
- _ts_metadata16("design:type", String)
1011
+ _ts_metadata13("design:type", String)
1246
1012
  ], OpenAIApiAssistantAPIResponse.prototype, "runId", void 0);
1247
- _ts_decorate16([
1248
- (0, import_type_graphql17.Field)(() => String, {
1013
+ _ts_decorate13([
1014
+ (0, import_type_graphql14.Field)(() => String, {
1249
1015
  nullable: true
1250
1016
  }),
1251
- _ts_metadata16("design:type", String)
1017
+ _ts_metadata13("design:type", String)
1252
1018
  ], OpenAIApiAssistantAPIResponse.prototype, "threadId", void 0);
1253
- OpenAIApiAssistantAPIResponse = _ts_decorate16([
1254
- (0, import_type_graphql17.ObjectType)()
1019
+ OpenAIApiAssistantAPIResponse = _ts_decorate13([
1020
+ (0, import_type_graphql14.ObjectType)()
1255
1021
  ], OpenAIApiAssistantAPIResponse);
1256
1022
 
1257
1023
  // src/graphql/types/copilot-response.type.ts
1258
- function _ts_decorate17(decorators, target, key, desc) {
1024
+ function _ts_decorate14(decorators, target, key, desc) {
1259
1025
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1260
1026
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1261
1027
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1265,32 +1031,32 @@ function _ts_decorate17(decorators, target, key, desc) {
1265
1031
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1266
1032
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1267
1033
  }
1268
- __name(_ts_decorate17, "_ts_decorate");
1269
- function _ts_metadata17(k, v) {
1034
+ __name(_ts_decorate14, "_ts_decorate");
1035
+ function _ts_metadata14(k, v) {
1270
1036
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1271
1037
  return Reflect.metadata(k, v);
1272
1038
  }
1273
- __name(_ts_metadata17, "_ts_metadata");
1039
+ __name(_ts_metadata14, "_ts_metadata");
1274
1040
  var BaseMessageOutput = class {
1275
1041
  id;
1276
1042
  createdAt;
1277
1043
  status;
1278
1044
  };
1279
1045
  __name(BaseMessageOutput, "BaseMessageOutput");
1280
- _ts_decorate17([
1281
- (0, import_type_graphql18.Field)(() => String),
1282
- _ts_metadata17("design:type", String)
1046
+ _ts_decorate14([
1047
+ (0, import_type_graphql15.Field)(() => String),
1048
+ _ts_metadata14("design:type", String)
1283
1049
  ], BaseMessageOutput.prototype, "id", void 0);
1284
- _ts_decorate17([
1285
- (0, import_type_graphql18.Field)(() => Date),
1286
- _ts_metadata17("design:type", typeof Date === "undefined" ? Object : Date)
1050
+ _ts_decorate14([
1051
+ (0, import_type_graphql15.Field)(() => Date),
1052
+ _ts_metadata14("design:type", typeof Date === "undefined" ? Object : Date)
1287
1053
  ], BaseMessageOutput.prototype, "createdAt", void 0);
1288
- _ts_decorate17([
1289
- (0, import_type_graphql18.Field)(() => MessageStatusUnion),
1290
- _ts_metadata17("design:type", Object)
1054
+ _ts_decorate14([
1055
+ (0, import_type_graphql15.Field)(() => MessageStatusUnion),
1056
+ _ts_metadata14("design:type", Object)
1291
1057
  ], BaseMessageOutput.prototype, "status", void 0);
1292
- BaseMessageOutput = _ts_decorate17([
1293
- (0, import_type_graphql18.InterfaceType)({
1058
+ BaseMessageOutput = _ts_decorate14([
1059
+ (0, import_type_graphql15.InterfaceType)({
1294
1060
  resolveType(value) {
1295
1061
  if (value.hasOwnProperty("content")) {
1296
1062
  return TextMessageOutput;
@@ -1300,8 +1066,6 @@ BaseMessageOutput = _ts_decorate17([
1300
1066
  return ResultMessageOutput;
1301
1067
  } else if (value.hasOwnProperty("state")) {
1302
1068
  return AgentStateMessageOutput;
1303
- } else if (value.name === MetaEventName.LangGraphInterruptEvent) {
1304
- return LangGraphInterruptEvent;
1305
1069
  }
1306
1070
  return void 0;
1307
1071
  }
@@ -1313,24 +1077,24 @@ var TextMessageOutput = class {
1313
1077
  parentMessageId;
1314
1078
  };
1315
1079
  __name(TextMessageOutput, "TextMessageOutput");
1316
- _ts_decorate17([
1317
- (0, import_type_graphql18.Field)(() => MessageRole),
1318
- _ts_metadata17("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1080
+ _ts_decorate14([
1081
+ (0, import_type_graphql15.Field)(() => MessageRole),
1082
+ _ts_metadata14("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1319
1083
  ], TextMessageOutput.prototype, "role", void 0);
1320
- _ts_decorate17([
1321
- (0, import_type_graphql18.Field)(() => [
1084
+ _ts_decorate14([
1085
+ (0, import_type_graphql15.Field)(() => [
1322
1086
  String
1323
1087
  ]),
1324
- _ts_metadata17("design:type", Array)
1088
+ _ts_metadata14("design:type", Array)
1325
1089
  ], TextMessageOutput.prototype, "content", void 0);
1326
- _ts_decorate17([
1327
- (0, import_type_graphql18.Field)(() => String, {
1090
+ _ts_decorate14([
1091
+ (0, import_type_graphql15.Field)(() => String, {
1328
1092
  nullable: true
1329
1093
  }),
1330
- _ts_metadata17("design:type", String)
1094
+ _ts_metadata14("design:type", String)
1331
1095
  ], TextMessageOutput.prototype, "parentMessageId", void 0);
1332
- TextMessageOutput = _ts_decorate17([
1333
- (0, import_type_graphql18.ObjectType)({
1096
+ TextMessageOutput = _ts_decorate14([
1097
+ (0, import_type_graphql15.ObjectType)({
1334
1098
  implements: BaseMessageOutput
1335
1099
  })
1336
1100
  ], TextMessageOutput);
@@ -1341,31 +1105,31 @@ var ActionExecutionMessageOutput = class {
1341
1105
  parentMessageId;
1342
1106
  };
1343
1107
  __name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput");
1344
- _ts_decorate17([
1345
- (0, import_type_graphql18.Field)(() => String),
1346
- _ts_metadata17("design:type", String)
1108
+ _ts_decorate14([
1109
+ (0, import_type_graphql15.Field)(() => String),
1110
+ _ts_metadata14("design:type", String)
1347
1111
  ], ActionExecutionMessageOutput.prototype, "name", void 0);
1348
- _ts_decorate17([
1349
- (0, import_type_graphql18.Field)(() => String, {
1112
+ _ts_decorate14([
1113
+ (0, import_type_graphql15.Field)(() => String, {
1350
1114
  nullable: true,
1351
1115
  deprecationReason: "This field will be removed in a future version"
1352
1116
  }),
1353
- _ts_metadata17("design:type", String)
1117
+ _ts_metadata14("design:type", String)
1354
1118
  ], ActionExecutionMessageOutput.prototype, "scope", void 0);
1355
- _ts_decorate17([
1356
- (0, import_type_graphql18.Field)(() => [
1119
+ _ts_decorate14([
1120
+ (0, import_type_graphql15.Field)(() => [
1357
1121
  String
1358
1122
  ]),
1359
- _ts_metadata17("design:type", Array)
1123
+ _ts_metadata14("design:type", Array)
1360
1124
  ], ActionExecutionMessageOutput.prototype, "arguments", void 0);
1361
- _ts_decorate17([
1362
- (0, import_type_graphql18.Field)(() => String, {
1125
+ _ts_decorate14([
1126
+ (0, import_type_graphql15.Field)(() => String, {
1363
1127
  nullable: true
1364
1128
  }),
1365
- _ts_metadata17("design:type", String)
1129
+ _ts_metadata14("design:type", String)
1366
1130
  ], ActionExecutionMessageOutput.prototype, "parentMessageId", void 0);
1367
- ActionExecutionMessageOutput = _ts_decorate17([
1368
- (0, import_type_graphql18.ObjectType)({
1131
+ ActionExecutionMessageOutput = _ts_decorate14([
1132
+ (0, import_type_graphql15.ObjectType)({
1369
1133
  implements: BaseMessageOutput
1370
1134
  })
1371
1135
  ], ActionExecutionMessageOutput);
@@ -1375,20 +1139,20 @@ var ResultMessageOutput = class {
1375
1139
  result;
1376
1140
  };
1377
1141
  __name(ResultMessageOutput, "ResultMessageOutput");
1378
- _ts_decorate17([
1379
- (0, import_type_graphql18.Field)(() => String),
1380
- _ts_metadata17("design:type", String)
1142
+ _ts_decorate14([
1143
+ (0, import_type_graphql15.Field)(() => String),
1144
+ _ts_metadata14("design:type", String)
1381
1145
  ], ResultMessageOutput.prototype, "actionExecutionId", void 0);
1382
- _ts_decorate17([
1383
- (0, import_type_graphql18.Field)(() => String),
1384
- _ts_metadata17("design:type", String)
1146
+ _ts_decorate14([
1147
+ (0, import_type_graphql15.Field)(() => String),
1148
+ _ts_metadata14("design:type", String)
1385
1149
  ], ResultMessageOutput.prototype, "actionName", void 0);
1386
- _ts_decorate17([
1387
- (0, import_type_graphql18.Field)(() => String),
1388
- _ts_metadata17("design:type", String)
1150
+ _ts_decorate14([
1151
+ (0, import_type_graphql15.Field)(() => String),
1152
+ _ts_metadata14("design:type", String)
1389
1153
  ], ResultMessageOutput.prototype, "result", void 0);
1390
- ResultMessageOutput = _ts_decorate17([
1391
- (0, import_type_graphql18.ObjectType)({
1154
+ ResultMessageOutput = _ts_decorate14([
1155
+ (0, import_type_graphql15.ObjectType)({
1392
1156
  implements: BaseMessageOutput
1393
1157
  })
1394
1158
  ], ResultMessageOutput);
@@ -1403,40 +1167,40 @@ var AgentStateMessageOutput = class {
1403
1167
  running;
1404
1168
  };
1405
1169
  __name(AgentStateMessageOutput, "AgentStateMessageOutput");
1406
- _ts_decorate17([
1407
- (0, import_type_graphql18.Field)(() => String),
1408
- _ts_metadata17("design:type", String)
1170
+ _ts_decorate14([
1171
+ (0, import_type_graphql15.Field)(() => String),
1172
+ _ts_metadata14("design:type", String)
1409
1173
  ], AgentStateMessageOutput.prototype, "threadId", void 0);
1410
- _ts_decorate17([
1411
- (0, import_type_graphql18.Field)(() => String),
1412
- _ts_metadata17("design:type", String)
1174
+ _ts_decorate14([
1175
+ (0, import_type_graphql15.Field)(() => String),
1176
+ _ts_metadata14("design:type", String)
1413
1177
  ], AgentStateMessageOutput.prototype, "agentName", void 0);
1414
- _ts_decorate17([
1415
- (0, import_type_graphql18.Field)(() => String),
1416
- _ts_metadata17("design:type", String)
1178
+ _ts_decorate14([
1179
+ (0, import_type_graphql15.Field)(() => String),
1180
+ _ts_metadata14("design:type", String)
1417
1181
  ], AgentStateMessageOutput.prototype, "nodeName", void 0);
1418
- _ts_decorate17([
1419
- (0, import_type_graphql18.Field)(() => String),
1420
- _ts_metadata17("design:type", String)
1182
+ _ts_decorate14([
1183
+ (0, import_type_graphql15.Field)(() => String),
1184
+ _ts_metadata14("design:type", String)
1421
1185
  ], AgentStateMessageOutput.prototype, "runId", void 0);
1422
- _ts_decorate17([
1423
- (0, import_type_graphql18.Field)(() => Boolean),
1424
- _ts_metadata17("design:type", Boolean)
1186
+ _ts_decorate14([
1187
+ (0, import_type_graphql15.Field)(() => Boolean),
1188
+ _ts_metadata14("design:type", Boolean)
1425
1189
  ], AgentStateMessageOutput.prototype, "active", void 0);
1426
- _ts_decorate17([
1427
- (0, import_type_graphql18.Field)(() => MessageRole),
1428
- _ts_metadata17("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1190
+ _ts_decorate14([
1191
+ (0, import_type_graphql15.Field)(() => MessageRole),
1192
+ _ts_metadata14("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1429
1193
  ], AgentStateMessageOutput.prototype, "role", void 0);
1430
- _ts_decorate17([
1431
- (0, import_type_graphql18.Field)(() => String),
1432
- _ts_metadata17("design:type", String)
1194
+ _ts_decorate14([
1195
+ (0, import_type_graphql15.Field)(() => String),
1196
+ _ts_metadata14("design:type", String)
1433
1197
  ], AgentStateMessageOutput.prototype, "state", void 0);
1434
- _ts_decorate17([
1435
- (0, import_type_graphql18.Field)(() => Boolean),
1436
- _ts_metadata17("design:type", Boolean)
1198
+ _ts_decorate14([
1199
+ (0, import_type_graphql15.Field)(() => Boolean),
1200
+ _ts_metadata14("design:type", Boolean)
1437
1201
  ], AgentStateMessageOutput.prototype, "running", void 0);
1438
- AgentStateMessageOutput = _ts_decorate17([
1439
- (0, import_type_graphql18.ObjectType)({
1202
+ AgentStateMessageOutput = _ts_decorate14([
1203
+ (0, import_type_graphql15.ObjectType)({
1440
1204
  implements: BaseMessageOutput
1441
1205
  })
1442
1206
  ], AgentStateMessageOutput);
@@ -1449,43 +1213,337 @@ var CopilotResponse = class {
1449
1213
  metaEvents;
1450
1214
  };
1451
1215
  __name(CopilotResponse, "CopilotResponse");
1452
- _ts_decorate17([
1453
- (0, import_type_graphql18.Field)(() => String),
1454
- _ts_metadata17("design:type", String)
1216
+ _ts_decorate14([
1217
+ (0, import_type_graphql15.Field)(() => String),
1218
+ _ts_metadata14("design:type", String)
1455
1219
  ], CopilotResponse.prototype, "threadId", void 0);
1456
- _ts_decorate17([
1457
- (0, import_type_graphql18.Field)(() => ResponseStatusUnion),
1458
- _ts_metadata17("design:type", Object)
1220
+ _ts_decorate14([
1221
+ (0, import_type_graphql15.Field)(() => ResponseStatusUnion),
1222
+ _ts_metadata14("design:type", Object)
1459
1223
  ], CopilotResponse.prototype, "status", void 0);
1224
+ _ts_decorate14([
1225
+ (0, import_type_graphql15.Field)({
1226
+ nullable: true
1227
+ }),
1228
+ _ts_metadata14("design:type", String)
1229
+ ], CopilotResponse.prototype, "runId", void 0);
1230
+ _ts_decorate14([
1231
+ (0, import_type_graphql15.Field)(() => [
1232
+ BaseMessageOutput
1233
+ ]),
1234
+ _ts_metadata14("design:type", Array)
1235
+ ], CopilotResponse.prototype, "messages", void 0);
1236
+ _ts_decorate14([
1237
+ (0, import_type_graphql15.Field)(() => ExtensionsResponse, {
1238
+ nullable: true
1239
+ }),
1240
+ _ts_metadata14("design:type", typeof ExtensionsResponse === "undefined" ? Object : ExtensionsResponse)
1241
+ ], CopilotResponse.prototype, "extensions", void 0);
1242
+ _ts_decorate14([
1243
+ (0, import_type_graphql15.Field)(() => [
1244
+ BaseMetaEvent
1245
+ ], {
1246
+ nullable: true
1247
+ }),
1248
+ _ts_metadata14("design:type", Array)
1249
+ ], CopilotResponse.prototype, "metaEvents", void 0);
1250
+ CopilotResponse = _ts_decorate14([
1251
+ (0, import_type_graphql15.ObjectType)()
1252
+ ], CopilotResponse);
1253
+
1254
+ // src/graphql/types/meta-events.type.ts
1255
+ function _ts_decorate15(decorators, target, key, desc) {
1256
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1257
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1258
+ r = Reflect.decorate(decorators, target, key, desc);
1259
+ else
1260
+ for (var i = decorators.length - 1; i >= 0; i--)
1261
+ if (d = decorators[i])
1262
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1263
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1264
+ }
1265
+ __name(_ts_decorate15, "_ts_decorate");
1266
+ function _ts_metadata15(k, v) {
1267
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1268
+ return Reflect.metadata(k, v);
1269
+ }
1270
+ __name(_ts_metadata15, "_ts_metadata");
1271
+ var MetaEventName;
1272
+ (function(MetaEventName2) {
1273
+ MetaEventName2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent";
1274
+ MetaEventName2["CopilotKitLangGraphInterruptEvent"] = "CopilotKitLangGraphInterruptEvent";
1275
+ })(MetaEventName || (MetaEventName = {}));
1276
+ (0, import_type_graphql16.registerEnumType)(MetaEventName, {
1277
+ name: "MetaEventName",
1278
+ description: "Meta event types"
1279
+ });
1280
+ var BaseMetaEvent = class {
1281
+ type = "MetaEvent";
1282
+ name;
1283
+ };
1284
+ __name(BaseMetaEvent, "BaseMetaEvent");
1285
+ _ts_decorate15([
1286
+ (0, import_type_graphql16.Field)(() => String),
1287
+ _ts_metadata15("design:type", String)
1288
+ ], BaseMetaEvent.prototype, "type", void 0);
1289
+ _ts_decorate15([
1290
+ (0, import_type_graphql16.Field)(() => MetaEventName),
1291
+ _ts_metadata15("design:type", String)
1292
+ ], BaseMetaEvent.prototype, "name", void 0);
1293
+ BaseMetaEvent = _ts_decorate15([
1294
+ (0, import_type_graphql16.InterfaceType)({
1295
+ resolveType(value) {
1296
+ if (value.name === "LangGraphInterruptEvent") {
1297
+ return LangGraphInterruptEvent;
1298
+ } else if (value.name === "CopilotKitLangGraphInterruptEvent") {
1299
+ return CopilotKitLangGraphInterruptEvent;
1300
+ }
1301
+ return void 0;
1302
+ }
1303
+ }),
1304
+ (0, import_type_graphql16.InterfaceType)()
1305
+ ], BaseMetaEvent);
1306
+ var CopilotKitLangGraphInterruptEventData = class {
1307
+ value;
1308
+ messages;
1309
+ };
1310
+ __name(CopilotKitLangGraphInterruptEventData, "CopilotKitLangGraphInterruptEventData");
1311
+ _ts_decorate15([
1312
+ (0, import_type_graphql16.Field)(() => String),
1313
+ _ts_metadata15("design:type", String)
1314
+ ], CopilotKitLangGraphInterruptEventData.prototype, "value", void 0);
1315
+ _ts_decorate15([
1316
+ (0, import_type_graphql16.Field)(() => [
1317
+ BaseMessageOutput
1318
+ ]),
1319
+ _ts_metadata15("design:type", Array)
1320
+ ], CopilotKitLangGraphInterruptEventData.prototype, "messages", void 0);
1321
+ CopilotKitLangGraphInterruptEventData = _ts_decorate15([
1322
+ (0, import_type_graphql16.ObjectType)()
1323
+ ], CopilotKitLangGraphInterruptEventData);
1324
+ var LangGraphInterruptEvent = class {
1325
+ name = "LangGraphInterruptEvent";
1326
+ value;
1327
+ response;
1328
+ };
1329
+ __name(LangGraphInterruptEvent, "LangGraphInterruptEvent");
1330
+ _ts_decorate15([
1331
+ (0, import_type_graphql16.Field)(() => MetaEventName),
1332
+ _ts_metadata15("design:type", typeof MetaEventName === "undefined" || false ? Object : "LangGraphInterruptEvent")
1333
+ ], LangGraphInterruptEvent.prototype, "name", void 0);
1334
+ _ts_decorate15([
1335
+ (0, import_type_graphql16.Field)(() => String),
1336
+ _ts_metadata15("design:type", String)
1337
+ ], LangGraphInterruptEvent.prototype, "value", void 0);
1338
+ _ts_decorate15([
1339
+ (0, import_type_graphql16.Field)(() => String, {
1340
+ nullable: true
1341
+ }),
1342
+ _ts_metadata15("design:type", String)
1343
+ ], LangGraphInterruptEvent.prototype, "response", void 0);
1344
+ LangGraphInterruptEvent = _ts_decorate15([
1345
+ (0, import_type_graphql16.ObjectType)({
1346
+ implements: BaseMetaEvent
1347
+ })
1348
+ ], LangGraphInterruptEvent);
1349
+ var CopilotKitLangGraphInterruptEvent = class {
1350
+ name = "CopilotKitLangGraphInterruptEvent";
1351
+ data;
1352
+ response;
1353
+ };
1354
+ __name(CopilotKitLangGraphInterruptEvent, "CopilotKitLangGraphInterruptEvent");
1355
+ _ts_decorate15([
1356
+ (0, import_type_graphql16.Field)(() => MetaEventName),
1357
+ _ts_metadata15("design:type", typeof MetaEventName === "undefined" || false ? Object : "CopilotKitLangGraphInterruptEvent")
1358
+ ], CopilotKitLangGraphInterruptEvent.prototype, "name", void 0);
1359
+ _ts_decorate15([
1360
+ (0, import_type_graphql16.Field)(() => CopilotKitLangGraphInterruptEventData),
1361
+ _ts_metadata15("design:type", typeof CopilotKitLangGraphInterruptEventData === "undefined" ? Object : CopilotKitLangGraphInterruptEventData)
1362
+ ], CopilotKitLangGraphInterruptEvent.prototype, "data", void 0);
1363
+ _ts_decorate15([
1364
+ (0, import_type_graphql16.Field)(() => String, {
1365
+ nullable: true
1366
+ }),
1367
+ _ts_metadata15("design:type", String)
1368
+ ], CopilotKitLangGraphInterruptEvent.prototype, "response", void 0);
1369
+ CopilotKitLangGraphInterruptEvent = _ts_decorate15([
1370
+ (0, import_type_graphql16.ObjectType)({
1371
+ implements: BaseMetaEvent
1372
+ })
1373
+ ], CopilotKitLangGraphInterruptEvent);
1374
+
1375
+ // src/graphql/inputs/meta-event.input.ts
1376
+ function _ts_decorate16(decorators, target, key, desc) {
1377
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1378
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1379
+ r = Reflect.decorate(decorators, target, key, desc);
1380
+ else
1381
+ for (var i = decorators.length - 1; i >= 0; i--)
1382
+ if (d = decorators[i])
1383
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1384
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1385
+ }
1386
+ __name(_ts_decorate16, "_ts_decorate");
1387
+ function _ts_metadata16(k, v) {
1388
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1389
+ return Reflect.metadata(k, v);
1390
+ }
1391
+ __name(_ts_metadata16, "_ts_metadata");
1392
+ var MetaEventInput = class {
1393
+ name;
1394
+ value;
1395
+ response;
1396
+ messages;
1397
+ };
1398
+ __name(MetaEventInput, "MetaEventInput");
1399
+ _ts_decorate16([
1400
+ (0, import_type_graphql17.Field)(() => MetaEventName),
1401
+ _ts_metadata16("design:type", typeof MetaEventName === "undefined" ? Object : MetaEventName)
1402
+ ], MetaEventInput.prototype, "name", void 0);
1403
+ _ts_decorate16([
1404
+ (0, import_type_graphql17.Field)(() => String),
1405
+ _ts_metadata16("design:type", String)
1406
+ ], MetaEventInput.prototype, "value", void 0);
1407
+ _ts_decorate16([
1408
+ (0, import_type_graphql17.Field)(() => String, {
1409
+ nullable: true
1410
+ }),
1411
+ _ts_metadata16("design:type", String)
1412
+ ], MetaEventInput.prototype, "response", void 0);
1413
+ _ts_decorate16([
1414
+ (0, import_type_graphql17.Field)(() => [
1415
+ MessageInput
1416
+ ], {
1417
+ nullable: true
1418
+ }),
1419
+ _ts_metadata16("design:type", Array)
1420
+ ], MetaEventInput.prototype, "messages", void 0);
1421
+ MetaEventInput = _ts_decorate16([
1422
+ (0, import_type_graphql17.InputType)()
1423
+ ], MetaEventInput);
1424
+
1425
+ // src/graphql/inputs/generate-copilot-response.input.ts
1426
+ function _ts_decorate17(decorators, target, key, desc) {
1427
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1428
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1429
+ r = Reflect.decorate(decorators, target, key, desc);
1430
+ else
1431
+ for (var i = decorators.length - 1; i >= 0; i--)
1432
+ if (d = decorators[i])
1433
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1434
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1435
+ }
1436
+ __name(_ts_decorate17, "_ts_decorate");
1437
+ function _ts_metadata17(k, v) {
1438
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1439
+ return Reflect.metadata(k, v);
1440
+ }
1441
+ __name(_ts_metadata17, "_ts_metadata");
1442
+ var GenerateCopilotResponseMetadataInput = class {
1443
+ requestType;
1444
+ };
1445
+ __name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
1446
+ _ts_decorate17([
1447
+ (0, import_type_graphql18.Field)(() => CopilotRequestType, {
1448
+ nullable: true
1449
+ }),
1450
+ _ts_metadata17("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
1451
+ ], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
1452
+ GenerateCopilotResponseMetadataInput = _ts_decorate17([
1453
+ (0, import_type_graphql18.InputType)()
1454
+ ], GenerateCopilotResponseMetadataInput);
1455
+ var GenerateCopilotResponseInput = class {
1456
+ metadata;
1457
+ threadId;
1458
+ runId;
1459
+ messages;
1460
+ frontend;
1461
+ cloud;
1462
+ forwardedParameters;
1463
+ agentSession;
1464
+ agentState;
1465
+ agentStates;
1466
+ extensions;
1467
+ metaEvents;
1468
+ };
1469
+ __name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
1470
+ _ts_decorate17([
1471
+ (0, import_type_graphql18.Field)(() => GenerateCopilotResponseMetadataInput, {
1472
+ nullable: false
1473
+ }),
1474
+ _ts_metadata17("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
1475
+ ], GenerateCopilotResponseInput.prototype, "metadata", void 0);
1460
1476
  _ts_decorate17([
1461
- (0, import_type_graphql18.Field)({
1477
+ (0, import_type_graphql18.Field)(() => String, {
1462
1478
  nullable: true
1463
1479
  }),
1464
1480
  _ts_metadata17("design:type", String)
1465
- ], CopilotResponse.prototype, "runId", void 0);
1481
+ ], GenerateCopilotResponseInput.prototype, "threadId", void 0);
1482
+ _ts_decorate17([
1483
+ (0, import_type_graphql18.Field)(() => String, {
1484
+ nullable: true
1485
+ }),
1486
+ _ts_metadata17("design:type", String)
1487
+ ], GenerateCopilotResponseInput.prototype, "runId", void 0);
1466
1488
  _ts_decorate17([
1467
1489
  (0, import_type_graphql18.Field)(() => [
1468
- BaseMessageOutput
1490
+ MessageInput
1469
1491
  ]),
1470
1492
  _ts_metadata17("design:type", Array)
1471
- ], CopilotResponse.prototype, "messages", void 0);
1493
+ ], GenerateCopilotResponseInput.prototype, "messages", void 0);
1494
+ _ts_decorate17([
1495
+ (0, import_type_graphql18.Field)(() => FrontendInput),
1496
+ _ts_metadata17("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
1497
+ ], GenerateCopilotResponseInput.prototype, "frontend", void 0);
1472
1498
  _ts_decorate17([
1473
- (0, import_type_graphql18.Field)(() => ExtensionsResponse, {
1499
+ (0, import_type_graphql18.Field)(() => CloudInput, {
1474
1500
  nullable: true
1475
1501
  }),
1476
- _ts_metadata17("design:type", typeof ExtensionsResponse === "undefined" ? Object : ExtensionsResponse)
1477
- ], CopilotResponse.prototype, "extensions", void 0);
1502
+ _ts_metadata17("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
1503
+ ], GenerateCopilotResponseInput.prototype, "cloud", void 0);
1504
+ _ts_decorate17([
1505
+ (0, import_type_graphql18.Field)(() => ForwardedParametersInput, {
1506
+ nullable: true
1507
+ }),
1508
+ _ts_metadata17("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
1509
+ ], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
1510
+ _ts_decorate17([
1511
+ (0, import_type_graphql18.Field)(() => AgentSessionInput, {
1512
+ nullable: true
1513
+ }),
1514
+ _ts_metadata17("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
1515
+ ], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
1516
+ _ts_decorate17([
1517
+ (0, import_type_graphql18.Field)(() => AgentStateInput, {
1518
+ nullable: true
1519
+ }),
1520
+ _ts_metadata17("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
1521
+ ], GenerateCopilotResponseInput.prototype, "agentState", void 0);
1478
1522
  _ts_decorate17([
1479
1523
  (0, import_type_graphql18.Field)(() => [
1480
- BaseMetaEvent
1524
+ AgentStateInput
1481
1525
  ], {
1482
1526
  nullable: true
1483
1527
  }),
1484
1528
  _ts_metadata17("design:type", Array)
1485
- ], CopilotResponse.prototype, "metaEvents", void 0);
1486
- CopilotResponse = _ts_decorate17([
1487
- (0, import_type_graphql18.ObjectType)()
1488
- ], CopilotResponse);
1529
+ ], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
1530
+ _ts_decorate17([
1531
+ (0, import_type_graphql18.Field)(() => ExtensionsInput, {
1532
+ nullable: true
1533
+ }),
1534
+ _ts_metadata17("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput)
1535
+ ], GenerateCopilotResponseInput.prototype, "extensions", void 0);
1536
+ _ts_decorate17([
1537
+ (0, import_type_graphql18.Field)(() => [
1538
+ MetaEventInput
1539
+ ], {
1540
+ nullable: true
1541
+ }),
1542
+ _ts_metadata17("design:type", Array)
1543
+ ], GenerateCopilotResponseInput.prototype, "metaEvents", void 0);
1544
+ GenerateCopilotResponseInput = _ts_decorate17([
1545
+ (0, import_type_graphql18.InputType)()
1546
+ ], GenerateCopilotResponseInput);
1489
1547
 
1490
1548
  // src/graphql/resolvers/copilot.resolver.ts
1491
1549
  var import_graphql_yoga = require("graphql-yoga");
@@ -1704,6 +1762,7 @@ var RuntimeMetaEventName;
1704
1762
  (function(RuntimeMetaEventName2) {
1705
1763
  RuntimeMetaEventName2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent";
1706
1764
  RuntimeMetaEventName2["LangGraphInterruptResumeEvent"] = "LangGraphInterruptResumeEvent";
1765
+ RuntimeMetaEventName2["CopilotKitLangGraphInterruptEvent"] = "CopilotKitLangGraphInterruptEvent";
1707
1766
  })(RuntimeMetaEventName || (RuntimeMetaEventName = {}));
1708
1767
 
1709
1768
  // src/graphql/resolvers/copilot.resolver.ts
@@ -1981,6 +2040,40 @@ var CopilotResolver = class {
1981
2040
  value: event.value
1982
2041
  }));
1983
2042
  break;
2043
+ case RuntimeMetaEventName.CopilotKitLangGraphInterruptEvent:
2044
+ push((0, import_class_transformer2.plainToInstance)(CopilotKitLangGraphInterruptEvent, {
2045
+ type: event.type,
2046
+ name: event.name,
2047
+ data: {
2048
+ value: typeof event.data.value === "string" ? event.data.value : JSON.stringify(event.data.value),
2049
+ messages: event.data.messages.map((message) => {
2050
+ if (message.type === "TextMessage" || "content" in message && "role" in message) {
2051
+ return (0, import_class_transformer2.plainToInstance)(TextMessage, {
2052
+ id: message.id,
2053
+ createdAt: /* @__PURE__ */ new Date(),
2054
+ content: [
2055
+ message.content
2056
+ ],
2057
+ role: message.role,
2058
+ status: new SuccessMessageStatus()
2059
+ });
2060
+ }
2061
+ if ("arguments" in message) {
2062
+ return (0, import_class_transformer2.plainToInstance)(ActionExecutionMessage, {
2063
+ name: message.name,
2064
+ id: message.id,
2065
+ arguments: [
2066
+ JSON.stringify(message.arguments)
2067
+ ],
2068
+ createdAt: /* @__PURE__ */ new Date(),
2069
+ status: new SuccessMessageStatus()
2070
+ });
2071
+ }
2072
+ throw new Error("Unknown message in metaEvents copilot resolver");
2073
+ })
2074
+ }
2075
+ }));
2076
+ break;
1984
2077
  }
1985
2078
  },
1986
2079
  error: (err) => {