@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.
Files changed (52) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/__snapshots__/schema/schema.graphql +26 -0
  3. package/dist/{chunk-WPJHMQDF.mjs → chunk-6Z3DFNOC.mjs} +2 -2
  4. package/dist/{chunk-KPOZF6JI.mjs → chunk-EC2ZHPRU.mjs} +2 -2
  5. package/dist/{chunk-I2OII4XX.mjs → chunk-QDK4OP2Y.mjs} +2 -2
  6. package/dist/{chunk-EV3MMEAZ.mjs → chunk-W4G47FRC.mjs} +513 -295
  7. package/dist/chunk-W4G47FRC.mjs.map +1 -0
  8. package/dist/{copilot-runtime-e6c34790.d.ts → copilot-runtime-a113045f.d.ts} +13 -1
  9. package/dist/{groq-adapter-acb6ed0b.d.ts → groq-adapter-248058e8.d.ts} +1 -1
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +787 -571
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +4 -4
  14. package/dist/{langserve-9614171f.d.ts → langserve-9580bd66.d.ts} +16 -2
  15. package/dist/lib/index.d.ts +3 -3
  16. package/dist/lib/index.js +787 -571
  17. package/dist/lib/index.js.map +1 -1
  18. package/dist/lib/index.mjs +4 -4
  19. package/dist/lib/integrations/index.d.ts +3 -3
  20. package/dist/lib/integrations/index.js +500 -319
  21. package/dist/lib/integrations/index.js.map +1 -1
  22. package/dist/lib/integrations/index.mjs +4 -4
  23. package/dist/lib/integrations/nest/index.d.ts +2 -2
  24. package/dist/lib/integrations/nest/index.js +500 -319
  25. package/dist/lib/integrations/nest/index.js.map +1 -1
  26. package/dist/lib/integrations/nest/index.mjs +2 -2
  27. package/dist/lib/integrations/node-express/index.d.ts +2 -2
  28. package/dist/lib/integrations/node-express/index.js +500 -319
  29. package/dist/lib/integrations/node-express/index.js.map +1 -1
  30. package/dist/lib/integrations/node-express/index.mjs +2 -2
  31. package/dist/lib/integrations/node-http/index.d.ts +2 -2
  32. package/dist/lib/integrations/node-http/index.js +500 -319
  33. package/dist/lib/integrations/node-http/index.js.map +1 -1
  34. package/dist/lib/integrations/node-http/index.mjs +1 -1
  35. package/dist/service-adapters/index.d.ts +3 -3
  36. package/package.json +3 -3
  37. package/src/agents/langgraph/event-source.ts +14 -2
  38. package/src/agents/langgraph/events.ts +12 -1
  39. package/src/graphql/inputs/generate-copilot-response.input.ts +4 -0
  40. package/src/graphql/inputs/meta-event.input.ts +17 -0
  41. package/src/graphql/resolvers/copilot.resolver.ts +67 -22
  42. package/src/graphql/types/copilot-response.type.ts +6 -0
  43. package/src/graphql/types/meta-events.type.ts +31 -0
  44. package/src/lib/runtime/copilot-runtime.ts +4 -0
  45. package/src/lib/runtime/remote-action-constructors.ts +5 -1
  46. package/src/lib/runtime/remote-actions.ts +2 -0
  47. package/src/lib/runtime/remote-lg-action.ts +35 -8
  48. package/src/service-adapters/events.ts +20 -1
  49. package/dist/chunk-EV3MMEAZ.mjs.map +0 -1
  50. /package/dist/{chunk-WPJHMQDF.mjs.map → chunk-6Z3DFNOC.mjs.map} +0 -0
  51. /package/dist/{chunk-KPOZF6JI.mjs.map → chunk-EC2ZHPRU.mjs.map} +0 -0
  52. /package/dist/{chunk-I2OII4XX.mjs.map → chunk-QDK4OP2Y.mjs.map} +0 -0
@@ -38,7 +38,7 @@ var require_package = __commonJS({
38
38
  publishConfig: {
39
39
  access: "public"
40
40
  },
41
- version: "1.5.15-next.3",
41
+ version: "1.5.15-next.4",
42
42
  sideEffects: false,
43
43
  main: "./dist/index.js",
44
44
  module: "./dist/index.mjs",
@@ -81,7 +81,7 @@ var require_package = __commonJS({
81
81
  "@langchain/community": "^0.0.53",
82
82
  "@langchain/core": "^0.3.13",
83
83
  "@langchain/google-gauth": "^0.1.0",
84
- "@langchain/langgraph-sdk": "^0.0.16",
84
+ "@langchain/langgraph-sdk": "^0.0.36",
85
85
  "@langchain/openai": "^0.0.28",
86
86
  "class-transformer": "^0.5.1",
87
87
  express: "^4.19.2",
@@ -126,7 +126,7 @@ import { Arg, Ctx, Mutation, Query, Resolver } from "type-graphql";
126
126
  import { ReplaySubject as ReplaySubject3, Subject, filter, finalize, firstValueFrom as firstValueFrom2, shareReplay, skipWhile, take, takeWhile, tap } from "rxjs";
127
127
 
128
128
  // src/graphql/inputs/generate-copilot-response.input.ts
129
- import { Field as Field10, InputType as InputType10 } from "type-graphql";
129
+ import { Field as Field12, InputType as InputType11 } from "type-graphql";
130
130
 
131
131
  // src/graphql/inputs/message.input.ts
132
132
  import { Field, InputType } from "type-graphql";
@@ -732,7 +732,11 @@ OpenAIApiAssistantAPIInput = _ts_decorate9([
732
732
  InputType9()
733
733
  ], OpenAIApiAssistantAPIInput);
734
734
 
735
- // src/graphql/inputs/generate-copilot-response.input.ts
735
+ // src/graphql/inputs/meta-event.input.ts
736
+ import { Field as Field11, InputType as InputType10 } from "type-graphql";
737
+
738
+ // src/graphql/types/meta-events.type.ts
739
+ import { Field as Field10, InterfaceType, ObjectType, registerEnumType as registerEnumType2 } from "type-graphql";
736
740
  function _ts_decorate10(decorators, target, key, desc) {
737
741
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
738
742
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -749,18 +753,131 @@ function _ts_metadata10(k, v) {
749
753
  return Reflect.metadata(k, v);
750
754
  }
751
755
  __name(_ts_metadata10, "_ts_metadata");
756
+ var MetaEventName;
757
+ (function(MetaEventName2) {
758
+ MetaEventName2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent";
759
+ })(MetaEventName || (MetaEventName = {}));
760
+ registerEnumType2(MetaEventName, {
761
+ name: "MetaEventName",
762
+ description: "Meta event types"
763
+ });
764
+ var BaseMetaEvent = class {
765
+ type = "MetaEvent";
766
+ name;
767
+ };
768
+ __name(BaseMetaEvent, "BaseMetaEvent");
769
+ _ts_decorate10([
770
+ Field10(() => String),
771
+ _ts_metadata10("design:type", String)
772
+ ], BaseMetaEvent.prototype, "type", void 0);
773
+ _ts_decorate10([
774
+ Field10(() => MetaEventName),
775
+ _ts_metadata10("design:type", String)
776
+ ], BaseMetaEvent.prototype, "name", void 0);
777
+ BaseMetaEvent = _ts_decorate10([
778
+ InterfaceType()
779
+ ], BaseMetaEvent);
780
+ var LangGraphInterruptEvent = class {
781
+ name = "LangGraphInterruptEvent";
782
+ value;
783
+ response;
784
+ };
785
+ __name(LangGraphInterruptEvent, "LangGraphInterruptEvent");
786
+ _ts_decorate10([
787
+ Field10(() => MetaEventName),
788
+ _ts_metadata10("design:type", typeof MetaEventName === "undefined" || false ? Object : "LangGraphInterruptEvent")
789
+ ], LangGraphInterruptEvent.prototype, "name", void 0);
790
+ _ts_decorate10([
791
+ Field10(() => String),
792
+ _ts_metadata10("design:type", String)
793
+ ], LangGraphInterruptEvent.prototype, "value", void 0);
794
+ _ts_decorate10([
795
+ Field10(() => String, {
796
+ nullable: true
797
+ }),
798
+ _ts_metadata10("design:type", String)
799
+ ], LangGraphInterruptEvent.prototype, "response", void 0);
800
+ LangGraphInterruptEvent = _ts_decorate10([
801
+ ObjectType({
802
+ implements: BaseMetaEvent
803
+ })
804
+ ], LangGraphInterruptEvent);
805
+
806
+ // src/graphql/inputs/meta-event.input.ts
807
+ function _ts_decorate11(decorators, target, key, desc) {
808
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
809
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
810
+ r = Reflect.decorate(decorators, target, key, desc);
811
+ else
812
+ for (var i = decorators.length - 1; i >= 0; i--)
813
+ if (d = decorators[i])
814
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
815
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
816
+ }
817
+ __name(_ts_decorate11, "_ts_decorate");
818
+ function _ts_metadata11(k, v) {
819
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
820
+ return Reflect.metadata(k, v);
821
+ }
822
+ __name(_ts_metadata11, "_ts_metadata");
823
+ var MetaEventInput = class {
824
+ type = "MetaEvent";
825
+ name;
826
+ value;
827
+ response;
828
+ };
829
+ __name(MetaEventInput, "MetaEventInput");
830
+ _ts_decorate11([
831
+ Field11(() => String),
832
+ _ts_metadata11("design:type", String)
833
+ ], MetaEventInput.prototype, "type", void 0);
834
+ _ts_decorate11([
835
+ Field11(() => MetaEventName),
836
+ _ts_metadata11("design:type", typeof MetaEventName === "undefined" ? Object : MetaEventName)
837
+ ], MetaEventInput.prototype, "name", void 0);
838
+ _ts_decorate11([
839
+ Field11(() => String),
840
+ _ts_metadata11("design:type", String)
841
+ ], MetaEventInput.prototype, "value", void 0);
842
+ _ts_decorate11([
843
+ Field11(() => String, {
844
+ nullable: true
845
+ }),
846
+ _ts_metadata11("design:type", String)
847
+ ], MetaEventInput.prototype, "response", void 0);
848
+ MetaEventInput = _ts_decorate11([
849
+ InputType10()
850
+ ], MetaEventInput);
851
+
852
+ // src/graphql/inputs/generate-copilot-response.input.ts
853
+ function _ts_decorate12(decorators, target, key, desc) {
854
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
855
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
856
+ r = Reflect.decorate(decorators, target, key, desc);
857
+ else
858
+ for (var i = decorators.length - 1; i >= 0; i--)
859
+ if (d = decorators[i])
860
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
861
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
862
+ }
863
+ __name(_ts_decorate12, "_ts_decorate");
864
+ function _ts_metadata12(k, v) {
865
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
866
+ return Reflect.metadata(k, v);
867
+ }
868
+ __name(_ts_metadata12, "_ts_metadata");
752
869
  var GenerateCopilotResponseMetadataInput = class {
753
870
  requestType;
754
871
  };
755
872
  __name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
756
- _ts_decorate10([
757
- Field10(() => CopilotRequestType, {
873
+ _ts_decorate12([
874
+ Field12(() => CopilotRequestType, {
758
875
  nullable: true
759
876
  }),
760
- _ts_metadata10("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
877
+ _ts_metadata12("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
761
878
  ], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
762
- GenerateCopilotResponseMetadataInput = _ts_decorate10([
763
- InputType10()
879
+ GenerateCopilotResponseMetadataInput = _ts_decorate12([
880
+ InputType11()
764
881
  ], GenerateCopilotResponseMetadataInput);
765
882
  var GenerateCopilotResponseInput = class {
766
883
  metadata;
@@ -774,84 +891,93 @@ var GenerateCopilotResponseInput = class {
774
891
  agentState;
775
892
  agentStates;
776
893
  extensions;
894
+ metaEvents;
777
895
  };
778
896
  __name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
779
- _ts_decorate10([
780
- Field10(() => GenerateCopilotResponseMetadataInput, {
897
+ _ts_decorate12([
898
+ Field12(() => GenerateCopilotResponseMetadataInput, {
781
899
  nullable: false
782
900
  }),
783
- _ts_metadata10("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
901
+ _ts_metadata12("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
784
902
  ], GenerateCopilotResponseInput.prototype, "metadata", void 0);
785
- _ts_decorate10([
786
- Field10(() => String, {
903
+ _ts_decorate12([
904
+ Field12(() => String, {
787
905
  nullable: true
788
906
  }),
789
- _ts_metadata10("design:type", String)
907
+ _ts_metadata12("design:type", String)
790
908
  ], GenerateCopilotResponseInput.prototype, "threadId", void 0);
791
- _ts_decorate10([
792
- Field10(() => String, {
909
+ _ts_decorate12([
910
+ Field12(() => String, {
793
911
  nullable: true
794
912
  }),
795
- _ts_metadata10("design:type", String)
913
+ _ts_metadata12("design:type", String)
796
914
  ], GenerateCopilotResponseInput.prototype, "runId", void 0);
797
- _ts_decorate10([
798
- Field10(() => [
915
+ _ts_decorate12([
916
+ Field12(() => [
799
917
  MessageInput
800
918
  ]),
801
- _ts_metadata10("design:type", Array)
919
+ _ts_metadata12("design:type", Array)
802
920
  ], GenerateCopilotResponseInput.prototype, "messages", void 0);
803
- _ts_decorate10([
804
- Field10(() => FrontendInput),
805
- _ts_metadata10("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
921
+ _ts_decorate12([
922
+ Field12(() => FrontendInput),
923
+ _ts_metadata12("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
806
924
  ], GenerateCopilotResponseInput.prototype, "frontend", void 0);
807
- _ts_decorate10([
808
- Field10(() => CloudInput, {
925
+ _ts_decorate12([
926
+ Field12(() => CloudInput, {
809
927
  nullable: true
810
928
  }),
811
- _ts_metadata10("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
929
+ _ts_metadata12("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
812
930
  ], GenerateCopilotResponseInput.prototype, "cloud", void 0);
813
- _ts_decorate10([
814
- Field10(() => ForwardedParametersInput, {
931
+ _ts_decorate12([
932
+ Field12(() => ForwardedParametersInput, {
815
933
  nullable: true
816
934
  }),
817
- _ts_metadata10("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
935
+ _ts_metadata12("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
818
936
  ], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
819
- _ts_decorate10([
820
- Field10(() => AgentSessionInput, {
937
+ _ts_decorate12([
938
+ Field12(() => AgentSessionInput, {
821
939
  nullable: true
822
940
  }),
823
- _ts_metadata10("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
941
+ _ts_metadata12("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
824
942
  ], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
825
- _ts_decorate10([
826
- Field10(() => AgentStateInput, {
943
+ _ts_decorate12([
944
+ Field12(() => AgentStateInput, {
827
945
  nullable: true
828
946
  }),
829
- _ts_metadata10("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
947
+ _ts_metadata12("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
830
948
  ], GenerateCopilotResponseInput.prototype, "agentState", void 0);
831
- _ts_decorate10([
832
- Field10(() => [
949
+ _ts_decorate12([
950
+ Field12(() => [
833
951
  AgentStateInput
834
952
  ], {
835
953
  nullable: true
836
954
  }),
837
- _ts_metadata10("design:type", Array)
955
+ _ts_metadata12("design:type", Array)
838
956
  ], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
839
- _ts_decorate10([
840
- Field10(() => ExtensionsInput, {
957
+ _ts_decorate12([
958
+ Field12(() => ExtensionsInput, {
841
959
  nullable: true
842
960
  }),
843
- _ts_metadata10("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput)
961
+ _ts_metadata12("design:type", typeof ExtensionsInput === "undefined" ? Object : ExtensionsInput)
844
962
  ], GenerateCopilotResponseInput.prototype, "extensions", void 0);
845
- GenerateCopilotResponseInput = _ts_decorate10([
846
- InputType10()
963
+ _ts_decorate12([
964
+ Field12(() => [
965
+ MetaEventInput
966
+ ], {
967
+ nullable: true
968
+ }),
969
+ _ts_metadata12("design:type", Array)
970
+ ], GenerateCopilotResponseInput.prototype, "metaEvents", void 0);
971
+ GenerateCopilotResponseInput = _ts_decorate12([
972
+ InputType11()
847
973
  ], GenerateCopilotResponseInput);
848
974
 
849
975
  // src/graphql/types/copilot-response.type.ts
850
- import { Field as Field13, InterfaceType, ObjectType as ObjectType3 } from "type-graphql";
976
+ import { Field as Field15, InterfaceType as InterfaceType2, ObjectType as ObjectType4 } from "type-graphql";
851
977
 
852
978
  // src/graphql/types/message-status.type.ts
853
- import { Field as Field11, ObjectType, createUnionType, registerEnumType as registerEnumType2 } from "type-graphql";
854
- function _ts_decorate11(decorators, target, key, desc) {
979
+ import { Field as Field13, ObjectType as ObjectType2, createUnionType, registerEnumType as registerEnumType3 } from "type-graphql";
980
+ function _ts_decorate13(decorators, target, key, desc) {
855
981
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
856
982
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
857
983
  r = Reflect.decorate(decorators, target, key, desc);
@@ -861,56 +987,56 @@ function _ts_decorate11(decorators, target, key, desc) {
861
987
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
862
988
  return c > 3 && r && Object.defineProperty(target, key, r), r;
863
989
  }
864
- __name(_ts_decorate11, "_ts_decorate");
865
- function _ts_metadata11(k, v) {
990
+ __name(_ts_decorate13, "_ts_decorate");
991
+ function _ts_metadata13(k, v) {
866
992
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
867
993
  return Reflect.metadata(k, v);
868
994
  }
869
- __name(_ts_metadata11, "_ts_metadata");
995
+ __name(_ts_metadata13, "_ts_metadata");
870
996
  var MessageStatusCode;
871
997
  (function(MessageStatusCode2) {
872
998
  MessageStatusCode2["Pending"] = "pending";
873
999
  MessageStatusCode2["Success"] = "success";
874
1000
  MessageStatusCode2["Failed"] = "failed";
875
1001
  })(MessageStatusCode || (MessageStatusCode = {}));
876
- registerEnumType2(MessageStatusCode, {
1002
+ registerEnumType3(MessageStatusCode, {
877
1003
  name: "MessageStatusCode"
878
1004
  });
879
1005
  var BaseMessageStatus = /* @__PURE__ */ __name(class BaseMessageStatus2 {
880
1006
  code;
881
1007
  }, "BaseMessageStatus");
882
- _ts_decorate11([
883
- Field11(() => MessageStatusCode),
884
- _ts_metadata11("design:type", String)
1008
+ _ts_decorate13([
1009
+ Field13(() => MessageStatusCode),
1010
+ _ts_metadata13("design:type", String)
885
1011
  ], BaseMessageStatus.prototype, "code", void 0);
886
- BaseMessageStatus = _ts_decorate11([
887
- ObjectType()
1012
+ BaseMessageStatus = _ts_decorate13([
1013
+ ObjectType2()
888
1014
  ], BaseMessageStatus);
889
1015
  var PendingMessageStatus = class extends BaseMessageStatus {
890
1016
  code = "pending";
891
1017
  };
892
1018
  __name(PendingMessageStatus, "PendingMessageStatus");
893
- PendingMessageStatus = _ts_decorate11([
894
- ObjectType()
1019
+ PendingMessageStatus = _ts_decorate13([
1020
+ ObjectType2()
895
1021
  ], PendingMessageStatus);
896
1022
  var SuccessMessageStatus = class extends BaseMessageStatus {
897
1023
  code = "success";
898
1024
  };
899
1025
  __name(SuccessMessageStatus, "SuccessMessageStatus");
900
- SuccessMessageStatus = _ts_decorate11([
901
- ObjectType()
1026
+ SuccessMessageStatus = _ts_decorate13([
1027
+ ObjectType2()
902
1028
  ], SuccessMessageStatus);
903
1029
  var FailedMessageStatus = class extends BaseMessageStatus {
904
1030
  code = "failed";
905
1031
  reason;
906
1032
  };
907
1033
  __name(FailedMessageStatus, "FailedMessageStatus");
908
- _ts_decorate11([
909
- Field11(() => String),
910
- _ts_metadata11("design:type", String)
1034
+ _ts_decorate13([
1035
+ Field13(() => String),
1036
+ _ts_metadata13("design:type", String)
911
1037
  ], FailedMessageStatus.prototype, "reason", void 0);
912
- FailedMessageStatus = _ts_decorate11([
913
- ObjectType()
1038
+ FailedMessageStatus = _ts_decorate13([
1039
+ ObjectType2()
914
1040
  ], FailedMessageStatus);
915
1041
  var MessageStatusUnion = createUnionType({
916
1042
  name: "MessageStatus",
@@ -922,8 +1048,8 @@ var MessageStatusUnion = createUnionType({
922
1048
  });
923
1049
 
924
1050
  // src/graphql/types/extensions-response.type.ts
925
- import { Field as Field12, ObjectType as ObjectType2 } from "type-graphql";
926
- function _ts_decorate12(decorators, target, key, desc) {
1051
+ import { Field as Field14, ObjectType as ObjectType3 } from "type-graphql";
1052
+ function _ts_decorate14(decorators, target, key, desc) {
927
1053
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
928
1054
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
929
1055
  r = Reflect.decorate(decorators, target, key, desc);
@@ -933,48 +1059,48 @@ function _ts_decorate12(decorators, target, key, desc) {
933
1059
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
934
1060
  return c > 3 && r && Object.defineProperty(target, key, r), r;
935
1061
  }
936
- __name(_ts_decorate12, "_ts_decorate");
937
- function _ts_metadata12(k, v) {
1062
+ __name(_ts_decorate14, "_ts_decorate");
1063
+ function _ts_metadata14(k, v) {
938
1064
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
939
1065
  return Reflect.metadata(k, v);
940
1066
  }
941
- __name(_ts_metadata12, "_ts_metadata");
1067
+ __name(_ts_metadata14, "_ts_metadata");
942
1068
  var ExtensionsResponse = class {
943
1069
  openaiAssistantAPI;
944
1070
  };
945
1071
  __name(ExtensionsResponse, "ExtensionsResponse");
946
- _ts_decorate12([
947
- Field12(() => OpenAIApiAssistantAPIResponse, {
1072
+ _ts_decorate14([
1073
+ Field14(() => OpenAIApiAssistantAPIResponse, {
948
1074
  nullable: true
949
1075
  }),
950
- _ts_metadata12("design:type", typeof OpenAIApiAssistantAPIResponse === "undefined" ? Object : OpenAIApiAssistantAPIResponse)
1076
+ _ts_metadata14("design:type", typeof OpenAIApiAssistantAPIResponse === "undefined" ? Object : OpenAIApiAssistantAPIResponse)
951
1077
  ], ExtensionsResponse.prototype, "openaiAssistantAPI", void 0);
952
- ExtensionsResponse = _ts_decorate12([
953
- ObjectType2()
1078
+ ExtensionsResponse = _ts_decorate14([
1079
+ ObjectType3()
954
1080
  ], ExtensionsResponse);
955
1081
  var OpenAIApiAssistantAPIResponse = class {
956
1082
  runId;
957
1083
  threadId;
958
1084
  };
959
1085
  __name(OpenAIApiAssistantAPIResponse, "OpenAIApiAssistantAPIResponse");
960
- _ts_decorate12([
961
- Field12(() => String, {
1086
+ _ts_decorate14([
1087
+ Field14(() => String, {
962
1088
  nullable: true
963
1089
  }),
964
- _ts_metadata12("design:type", String)
1090
+ _ts_metadata14("design:type", String)
965
1091
  ], OpenAIApiAssistantAPIResponse.prototype, "runId", void 0);
966
- _ts_decorate12([
967
- Field12(() => String, {
1092
+ _ts_decorate14([
1093
+ Field14(() => String, {
968
1094
  nullable: true
969
1095
  }),
970
- _ts_metadata12("design:type", String)
1096
+ _ts_metadata14("design:type", String)
971
1097
  ], OpenAIApiAssistantAPIResponse.prototype, "threadId", void 0);
972
- OpenAIApiAssistantAPIResponse = _ts_decorate12([
973
- ObjectType2()
1098
+ OpenAIApiAssistantAPIResponse = _ts_decorate14([
1099
+ ObjectType3()
974
1100
  ], OpenAIApiAssistantAPIResponse);
975
1101
 
976
1102
  // src/graphql/types/copilot-response.type.ts
977
- function _ts_decorate13(decorators, target, key, desc) {
1103
+ function _ts_decorate15(decorators, target, key, desc) {
978
1104
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
979
1105
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
980
1106
  r = Reflect.decorate(decorators, target, key, desc);
@@ -984,32 +1110,32 @@ function _ts_decorate13(decorators, target, key, desc) {
984
1110
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
985
1111
  return c > 3 && r && Object.defineProperty(target, key, r), r;
986
1112
  }
987
- __name(_ts_decorate13, "_ts_decorate");
988
- function _ts_metadata13(k, v) {
1113
+ __name(_ts_decorate15, "_ts_decorate");
1114
+ function _ts_metadata15(k, v) {
989
1115
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
990
1116
  return Reflect.metadata(k, v);
991
1117
  }
992
- __name(_ts_metadata13, "_ts_metadata");
1118
+ __name(_ts_metadata15, "_ts_metadata");
993
1119
  var BaseMessageOutput = class {
994
1120
  id;
995
1121
  createdAt;
996
1122
  status;
997
1123
  };
998
1124
  __name(BaseMessageOutput, "BaseMessageOutput");
999
- _ts_decorate13([
1000
- Field13(() => String),
1001
- _ts_metadata13("design:type", String)
1125
+ _ts_decorate15([
1126
+ Field15(() => String),
1127
+ _ts_metadata15("design:type", String)
1002
1128
  ], BaseMessageOutput.prototype, "id", void 0);
1003
- _ts_decorate13([
1004
- Field13(() => Date),
1005
- _ts_metadata13("design:type", typeof Date === "undefined" ? Object : Date)
1129
+ _ts_decorate15([
1130
+ Field15(() => Date),
1131
+ _ts_metadata15("design:type", typeof Date === "undefined" ? Object : Date)
1006
1132
  ], BaseMessageOutput.prototype, "createdAt", void 0);
1007
- _ts_decorate13([
1008
- Field13(() => MessageStatusUnion),
1009
- _ts_metadata13("design:type", Object)
1133
+ _ts_decorate15([
1134
+ Field15(() => MessageStatusUnion),
1135
+ _ts_metadata15("design:type", Object)
1010
1136
  ], BaseMessageOutput.prototype, "status", void 0);
1011
- BaseMessageOutput = _ts_decorate13([
1012
- InterfaceType({
1137
+ BaseMessageOutput = _ts_decorate15([
1138
+ InterfaceType2({
1013
1139
  resolveType(value) {
1014
1140
  if (value.hasOwnProperty("content")) {
1015
1141
  return TextMessageOutput;
@@ -1019,6 +1145,8 @@ BaseMessageOutput = _ts_decorate13([
1019
1145
  return ResultMessageOutput;
1020
1146
  } else if (value.hasOwnProperty("state")) {
1021
1147
  return AgentStateMessageOutput;
1148
+ } else if (value.name === MetaEventName.LangGraphInterruptEvent) {
1149
+ return LangGraphInterruptEvent;
1022
1150
  }
1023
1151
  return void 0;
1024
1152
  }
@@ -1030,24 +1158,24 @@ var TextMessageOutput = class {
1030
1158
  parentMessageId;
1031
1159
  };
1032
1160
  __name(TextMessageOutput, "TextMessageOutput");
1033
- _ts_decorate13([
1034
- Field13(() => MessageRole),
1035
- _ts_metadata13("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1161
+ _ts_decorate15([
1162
+ Field15(() => MessageRole),
1163
+ _ts_metadata15("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1036
1164
  ], TextMessageOutput.prototype, "role", void 0);
1037
- _ts_decorate13([
1038
- Field13(() => [
1165
+ _ts_decorate15([
1166
+ Field15(() => [
1039
1167
  String
1040
1168
  ]),
1041
- _ts_metadata13("design:type", Array)
1169
+ _ts_metadata15("design:type", Array)
1042
1170
  ], TextMessageOutput.prototype, "content", void 0);
1043
- _ts_decorate13([
1044
- Field13(() => String, {
1171
+ _ts_decorate15([
1172
+ Field15(() => String, {
1045
1173
  nullable: true
1046
1174
  }),
1047
- _ts_metadata13("design:type", String)
1175
+ _ts_metadata15("design:type", String)
1048
1176
  ], TextMessageOutput.prototype, "parentMessageId", void 0);
1049
- TextMessageOutput = _ts_decorate13([
1050
- ObjectType3({
1177
+ TextMessageOutput = _ts_decorate15([
1178
+ ObjectType4({
1051
1179
  implements: BaseMessageOutput
1052
1180
  })
1053
1181
  ], TextMessageOutput);
@@ -1058,31 +1186,31 @@ var ActionExecutionMessageOutput = class {
1058
1186
  parentMessageId;
1059
1187
  };
1060
1188
  __name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput");
1061
- _ts_decorate13([
1062
- Field13(() => String),
1063
- _ts_metadata13("design:type", String)
1189
+ _ts_decorate15([
1190
+ Field15(() => String),
1191
+ _ts_metadata15("design:type", String)
1064
1192
  ], ActionExecutionMessageOutput.prototype, "name", void 0);
1065
- _ts_decorate13([
1066
- Field13(() => String, {
1193
+ _ts_decorate15([
1194
+ Field15(() => String, {
1067
1195
  nullable: true,
1068
1196
  deprecationReason: "This field will be removed in a future version"
1069
1197
  }),
1070
- _ts_metadata13("design:type", String)
1198
+ _ts_metadata15("design:type", String)
1071
1199
  ], ActionExecutionMessageOutput.prototype, "scope", void 0);
1072
- _ts_decorate13([
1073
- Field13(() => [
1200
+ _ts_decorate15([
1201
+ Field15(() => [
1074
1202
  String
1075
1203
  ]),
1076
- _ts_metadata13("design:type", Array)
1204
+ _ts_metadata15("design:type", Array)
1077
1205
  ], ActionExecutionMessageOutput.prototype, "arguments", void 0);
1078
- _ts_decorate13([
1079
- Field13(() => String, {
1206
+ _ts_decorate15([
1207
+ Field15(() => String, {
1080
1208
  nullable: true
1081
1209
  }),
1082
- _ts_metadata13("design:type", String)
1210
+ _ts_metadata15("design:type", String)
1083
1211
  ], ActionExecutionMessageOutput.prototype, "parentMessageId", void 0);
1084
- ActionExecutionMessageOutput = _ts_decorate13([
1085
- ObjectType3({
1212
+ ActionExecutionMessageOutput = _ts_decorate15([
1213
+ ObjectType4({
1086
1214
  implements: BaseMessageOutput
1087
1215
  })
1088
1216
  ], ActionExecutionMessageOutput);
@@ -1092,20 +1220,20 @@ var ResultMessageOutput = class {
1092
1220
  result;
1093
1221
  };
1094
1222
  __name(ResultMessageOutput, "ResultMessageOutput");
1095
- _ts_decorate13([
1096
- Field13(() => String),
1097
- _ts_metadata13("design:type", String)
1223
+ _ts_decorate15([
1224
+ Field15(() => String),
1225
+ _ts_metadata15("design:type", String)
1098
1226
  ], ResultMessageOutput.prototype, "actionExecutionId", void 0);
1099
- _ts_decorate13([
1100
- Field13(() => String),
1101
- _ts_metadata13("design:type", String)
1227
+ _ts_decorate15([
1228
+ Field15(() => String),
1229
+ _ts_metadata15("design:type", String)
1102
1230
  ], ResultMessageOutput.prototype, "actionName", void 0);
1103
- _ts_decorate13([
1104
- Field13(() => String),
1105
- _ts_metadata13("design:type", String)
1231
+ _ts_decorate15([
1232
+ Field15(() => String),
1233
+ _ts_metadata15("design:type", String)
1106
1234
  ], ResultMessageOutput.prototype, "result", void 0);
1107
- ResultMessageOutput = _ts_decorate13([
1108
- ObjectType3({
1235
+ ResultMessageOutput = _ts_decorate15([
1236
+ ObjectType4({
1109
1237
  implements: BaseMessageOutput
1110
1238
  })
1111
1239
  ], ResultMessageOutput);
@@ -1120,40 +1248,40 @@ var AgentStateMessageOutput = class {
1120
1248
  running;
1121
1249
  };
1122
1250
  __name(AgentStateMessageOutput, "AgentStateMessageOutput");
1123
- _ts_decorate13([
1124
- Field13(() => String),
1125
- _ts_metadata13("design:type", String)
1251
+ _ts_decorate15([
1252
+ Field15(() => String),
1253
+ _ts_metadata15("design:type", String)
1126
1254
  ], AgentStateMessageOutput.prototype, "threadId", void 0);
1127
- _ts_decorate13([
1128
- Field13(() => String),
1129
- _ts_metadata13("design:type", String)
1255
+ _ts_decorate15([
1256
+ Field15(() => String),
1257
+ _ts_metadata15("design:type", String)
1130
1258
  ], AgentStateMessageOutput.prototype, "agentName", void 0);
1131
- _ts_decorate13([
1132
- Field13(() => String),
1133
- _ts_metadata13("design:type", String)
1259
+ _ts_decorate15([
1260
+ Field15(() => String),
1261
+ _ts_metadata15("design:type", String)
1134
1262
  ], AgentStateMessageOutput.prototype, "nodeName", void 0);
1135
- _ts_decorate13([
1136
- Field13(() => String),
1137
- _ts_metadata13("design:type", String)
1263
+ _ts_decorate15([
1264
+ Field15(() => String),
1265
+ _ts_metadata15("design:type", String)
1138
1266
  ], AgentStateMessageOutput.prototype, "runId", void 0);
1139
- _ts_decorate13([
1140
- Field13(() => Boolean),
1141
- _ts_metadata13("design:type", Boolean)
1267
+ _ts_decorate15([
1268
+ Field15(() => Boolean),
1269
+ _ts_metadata15("design:type", Boolean)
1142
1270
  ], AgentStateMessageOutput.prototype, "active", void 0);
1143
- _ts_decorate13([
1144
- Field13(() => MessageRole),
1145
- _ts_metadata13("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1271
+ _ts_decorate15([
1272
+ Field15(() => MessageRole),
1273
+ _ts_metadata15("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1146
1274
  ], AgentStateMessageOutput.prototype, "role", void 0);
1147
- _ts_decorate13([
1148
- Field13(() => String),
1149
- _ts_metadata13("design:type", String)
1275
+ _ts_decorate15([
1276
+ Field15(() => String),
1277
+ _ts_metadata15("design:type", String)
1150
1278
  ], AgentStateMessageOutput.prototype, "state", void 0);
1151
- _ts_decorate13([
1152
- Field13(() => Boolean),
1153
- _ts_metadata13("design:type", Boolean)
1279
+ _ts_decorate15([
1280
+ Field15(() => Boolean),
1281
+ _ts_metadata15("design:type", Boolean)
1154
1282
  ], AgentStateMessageOutput.prototype, "running", void 0);
1155
- AgentStateMessageOutput = _ts_decorate13([
1156
- ObjectType3({
1283
+ AgentStateMessageOutput = _ts_decorate15([
1284
+ ObjectType4({
1157
1285
  implements: BaseMessageOutput
1158
1286
  })
1159
1287
  ], AgentStateMessageOutput);
@@ -1163,36 +1291,45 @@ var CopilotResponse = class {
1163
1291
  runId;
1164
1292
  messages;
1165
1293
  extensions;
1294
+ metaEvents;
1166
1295
  };
1167
1296
  __name(CopilotResponse, "CopilotResponse");
1168
- _ts_decorate13([
1169
- Field13(() => String),
1170
- _ts_metadata13("design:type", String)
1297
+ _ts_decorate15([
1298
+ Field15(() => String),
1299
+ _ts_metadata15("design:type", String)
1171
1300
  ], CopilotResponse.prototype, "threadId", void 0);
1172
- _ts_decorate13([
1173
- Field13(() => ResponseStatusUnion),
1174
- _ts_metadata13("design:type", Object)
1301
+ _ts_decorate15([
1302
+ Field15(() => ResponseStatusUnion),
1303
+ _ts_metadata15("design:type", Object)
1175
1304
  ], CopilotResponse.prototype, "status", void 0);
1176
- _ts_decorate13([
1177
- Field13({
1305
+ _ts_decorate15([
1306
+ Field15({
1178
1307
  nullable: true
1179
1308
  }),
1180
- _ts_metadata13("design:type", String)
1309
+ _ts_metadata15("design:type", String)
1181
1310
  ], CopilotResponse.prototype, "runId", void 0);
1182
- _ts_decorate13([
1183
- Field13(() => [
1311
+ _ts_decorate15([
1312
+ Field15(() => [
1184
1313
  BaseMessageOutput
1185
1314
  ]),
1186
- _ts_metadata13("design:type", Array)
1315
+ _ts_metadata15("design:type", Array)
1187
1316
  ], CopilotResponse.prototype, "messages", void 0);
1188
- _ts_decorate13([
1189
- Field13(() => ExtensionsResponse, {
1317
+ _ts_decorate15([
1318
+ Field15(() => ExtensionsResponse, {
1190
1319
  nullable: true
1191
1320
  }),
1192
- _ts_metadata13("design:type", typeof ExtensionsResponse === "undefined" ? Object : ExtensionsResponse)
1321
+ _ts_metadata15("design:type", typeof ExtensionsResponse === "undefined" ? Object : ExtensionsResponse)
1193
1322
  ], CopilotResponse.prototype, "extensions", void 0);
1194
- CopilotResponse = _ts_decorate13([
1195
- ObjectType3()
1323
+ _ts_decorate15([
1324
+ Field15(() => [
1325
+ BaseMetaEvent
1326
+ ], {
1327
+ nullable: true
1328
+ }),
1329
+ _ts_metadata15("design:type", Array)
1330
+ ], CopilotResponse.prototype, "metaEvents", void 0);
1331
+ CopilotResponse = _ts_decorate15([
1332
+ ObjectType4()
1196
1333
  ], CopilotResponse);
1197
1334
 
1198
1335
  // src/graphql/resolvers/copilot.resolver.ts
@@ -1209,7 +1346,7 @@ import { TelemetryClient } from "@copilotkit/shared";
1209
1346
  import { createHash as createHash2 } from "crypto";
1210
1347
 
1211
1348
  // src/agents/langgraph/event-source.ts
1212
- import { ReplaySubject, scan, mergeMap, catchError } from "rxjs";
1349
+ import { catchError, mergeMap, ReplaySubject, scan } from "rxjs";
1213
1350
 
1214
1351
  // src/agents/langgraph/events.ts
1215
1352
  var LangGraphEventTypes;
@@ -1226,7 +1363,12 @@ var LangGraphEventTypes;
1226
1363
  LangGraphEventTypes2["OnCopilotKitEmitMessage"] = "on_copilotkit_emit_message";
1227
1364
  LangGraphEventTypes2["OnCopilotKitEmitToolCall"] = "on_copilotkit_emit_tool_call";
1228
1365
  LangGraphEventTypes2["OnCustomEvent"] = "on_custom_event";
1366
+ LangGraphEventTypes2["OnInterrupt"] = "on_interrupt";
1229
1367
  })(LangGraphEventTypes || (LangGraphEventTypes = {}));
1368
+ var MetaEventNames;
1369
+ (function(MetaEventNames2) {
1370
+ MetaEventNames2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent";
1371
+ })(MetaEventNames || (MetaEventNames = {}));
1230
1372
  var CustomEventNames;
1231
1373
  (function(CustomEventNames2) {
1232
1374
  CustomEventNames2["CopilotKitManuallyEmitMessage"] = "copilotkit_manually_emit_message";
@@ -1323,6 +1465,13 @@ var RemoteLangGraphEventSource = class {
1323
1465
  shouldEmitMessages = acc.event.metadata["copilotkit:emit-messages"];
1324
1466
  }
1325
1467
  }
1468
+ if (acc.event.event === LangGraphEventTypes.OnInterrupt) {
1469
+ events.push({
1470
+ type: RuntimeEventTypes.MetaEvent,
1471
+ name: RuntimeMetaEventName.LangGraphInterruptEvent,
1472
+ value: acc.event.value
1473
+ });
1474
+ }
1326
1475
  const responseMetadata = this.getResponseMetadata(acc.event);
1327
1476
  if ((responseMetadata == null ? void 0 : responseMetadata.finish_reason) === "tool_calls" && this.shouldEmitToolCall(shouldEmitToolCalls, acc.lastToolCallName)) {
1328
1477
  events.push({
@@ -1451,7 +1600,7 @@ __name(RemoteLangGraphEventSource, "RemoteLangGraphEventSource");
1451
1600
  // src/lib/runtime/remote-lg-action.ts
1452
1601
  import { Client as LangGraphClient } from "@langchain/langgraph-sdk";
1453
1602
  import { createHash } from "crypto";
1454
- import { randomUUID, isValidUUID } from "@copilotkit/shared";
1603
+ import { isValidUUID, randomUUID } from "@copilotkit/shared";
1455
1604
  import { parse as parsePartialJson } from "partial-json";
1456
1605
  async function execute(args) {
1457
1606
  return new ReadableStream({
@@ -1466,8 +1615,8 @@ async function execute(args) {
1466
1615
  }
1467
1616
  __name(execute, "execute");
1468
1617
  async function streamEvents(controller, args) {
1469
- var _a, _b, _c, _d, _e, _f;
1470
- const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2, properties } = args;
1618
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1619
+ const { deploymentUrl, langsmithApiKey, threadId: argsInitialThreadId, agent, nodeName: initialNodeName, state: initialState, messages, actions, logger: logger2, properties, metaEvents } = args;
1471
1620
  let nodeName = initialNodeName;
1472
1621
  let state = initialState;
1473
1622
  const { name, assistantId: initialAssistantId } = agent;
@@ -1513,7 +1662,8 @@ async function streamEvents(controller, args) {
1513
1662
  logger2.error(e, `Error event thrown: ${e.message}`);
1514
1663
  }
1515
1664
  state = langGraphDefaultMergeState(state, formattedMessages, actions, name);
1516
- if (mode === "continue") {
1665
+ const lgInterruptEvent = metaEvents == null ? void 0 : metaEvents.find((ev) => ev.name === MetaEventName.LangGraphInterruptEvent);
1666
+ if (mode === "continue" && !lgInterruptEvent) {
1517
1667
  await client.threads.updateState(threadId, {
1518
1668
  values: state,
1519
1669
  asNode: nodeName
@@ -1546,13 +1696,21 @@ async function streamEvents(controller, args) {
1546
1696
  let emitIntermediateStateUntilEnd = null;
1547
1697
  let shouldExit = false;
1548
1698
  let externalRunId = null;
1549
- const streamResponse2 = client.runs.stream(threadId, assistantId, {
1699
+ const payload = {
1550
1700
  input: streamInput,
1551
1701
  streamMode: [
1552
1702
  "events",
1553
- "values"
1554
- ]
1555
- });
1703
+ "values",
1704
+ "updates"
1705
+ ],
1706
+ command: void 0
1707
+ };
1708
+ if (lgInterruptEvent == null ? void 0 : lgInterruptEvent.response) {
1709
+ payload.command = {
1710
+ resume: lgInterruptEvent.response
1711
+ };
1712
+ }
1713
+ const streamResponse2 = client.runs.stream(threadId, assistantId, payload);
1556
1714
  const emit = /* @__PURE__ */ __name((message) => controller.enqueue(new TextEncoder().encode(message)), "emit");
1557
1715
  let latestStateValues = {};
1558
1716
  let updatedState = state;
@@ -1565,12 +1723,22 @@ async function streamEvents(controller, args) {
1565
1723
  if (![
1566
1724
  "events",
1567
1725
  "values",
1568
- "error"
1726
+ "error",
1727
+ "updates"
1569
1728
  ].includes(chunk.event))
1570
1729
  continue;
1571
1730
  if (chunk.event === "error") {
1572
1731
  throw new Error(`Error event thrown: ${chunk.data.message}`);
1573
1732
  }
1733
+ if (chunk.event === "updates" && chunk.data.__interrupt__) {
1734
+ emit(JSON.stringify({
1735
+ event: LangGraphEventTypes.OnInterrupt,
1736
+ value: chunk.data.__interrupt__[0].value
1737
+ }) + "\n");
1738
+ continue;
1739
+ }
1740
+ if (chunk.event === "updates")
1741
+ continue;
1574
1742
  if (chunk.event === "values") {
1575
1743
  latestStateValues = chunk.data;
1576
1744
  continue;
@@ -1651,8 +1819,9 @@ async function streamEvents(controller, args) {
1651
1819
  emit(JSON.stringify(event) + "\n");
1652
1820
  }
1653
1821
  state = await client.threads.getState(threadId);
1654
- const isEndNode = state.next.length === 0;
1655
- nodeName = Object.keys(state.metadata.writes)[0];
1822
+ const interrupts = (_h = (_g = state.tasks) == null ? void 0 : _g[0]) == null ? void 0 : _h.interrupts;
1823
+ nodeName = interrupts ? nodeName : Object.keys(state.metadata.writes)[0];
1824
+ const isEndNode = state.next.length === 0 && !interrupts;
1656
1825
  telemetry_client_default.capture("oss.runtime.agent_execution_stream_ended", streamInfo);
1657
1826
  emit(getStateSyncEvent({
1658
1827
  threadId,
@@ -1933,7 +2102,7 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
1933
2102
  parameters: [],
1934
2103
  handler: async (_args) => {
1935
2104
  },
1936
- langGraphAgentHandler: async ({ name, actionInputsWithoutAgents, threadId, nodeName, additionalMessages = [] }) => {
2105
+ langGraphAgentHandler: async ({ name, actionInputsWithoutAgents, threadId, nodeName, additionalMessages = [], metaEvents }) => {
1937
2106
  var _a;
1938
2107
  logger2.debug({
1939
2108
  actionName: agent.name
@@ -1953,7 +2122,9 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
1953
2122
  }
1954
2123
  try {
1955
2124
  const response = await execute({
1956
- logger: logger2,
2125
+ logger: logger2.child({
2126
+ component: "remote-actions.remote-lg-action.streamEvents"
2127
+ }),
1957
2128
  deploymentUrl: endpoint.deploymentUrl,
1958
2129
  langsmithApiKey: endpoint.langsmithApiKey,
1959
2130
  agent,
@@ -1969,7 +2140,8 @@ function constructLGCRemoteAction({ endpoint, graphqlContext, logger: logger2, m
1969
2140
  name: action.name,
1970
2141
  description: action.description,
1971
2142
  parameters: JSON.parse(action.jsonSchema)
1972
- }))
2143
+ })),
2144
+ metaEvents
1973
2145
  });
1974
2146
  const eventSource = new RemoteLangGraphEventSource();
1975
2147
  streamResponse(response, eventSource.eventStream$);
@@ -2049,7 +2221,7 @@ function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, lo
2049
2221
  parameters: [],
2050
2222
  handler: async (_args) => {
2051
2223
  },
2052
- langGraphAgentHandler: async ({ name, actionInputsWithoutAgents, threadId, nodeName, additionalMessages = [] }) => {
2224
+ langGraphAgentHandler: async ({ name, actionInputsWithoutAgents, threadId, nodeName, additionalMessages = [], metaEvents }) => {
2053
2225
  var _a;
2054
2226
  logger2.debug({
2055
2227
  actionName: agent.name
@@ -2086,7 +2258,8 @@ function constructRemoteActions({ json, url, onBeforeRequest, graphqlContext, lo
2086
2258
  name: action.name,
2087
2259
  description: action.description,
2088
2260
  parameters: JSON.parse(action.jsonSchema)
2089
- }))
2261
+ })),
2262
+ metaEvents
2090
2263
  })
2091
2264
  });
2092
2265
  if (!response.ok) {
@@ -2573,7 +2746,7 @@ please use an LLM adapter instead.`
2573
2746
  }
2574
2747
  async processAgentRequest(request) {
2575
2748
  var _a;
2576
- const { messages: rawMessages, outputMessagesPromise, graphqlContext, agentSession, threadId: threadIdFromRequest } = request;
2749
+ const { messages: rawMessages, outputMessagesPromise, graphqlContext, agentSession, threadId: threadIdFromRequest, metaEvents } = request;
2577
2750
  const { agentName, nodeName } = agentSession;
2578
2751
  const threadId = threadIdFromRequest ?? agentSession.threadId;
2579
2752
  const serverSideActions = await this.getServerSideActions(request);
@@ -2605,7 +2778,8 @@ please use an LLM adapter instead.`
2605
2778
  name: agentName,
2606
2779
  threadId,
2607
2780
  nodeName,
2608
- actionInputsWithoutAgents
2781
+ actionInputsWithoutAgents,
2782
+ metaEvents
2609
2783
  });
2610
2784
  eventSource.stream(async (eventStream$) => {
2611
2785
  from(stream).subscribe({
@@ -2772,7 +2946,13 @@ var RuntimeEventTypes;
2772
2946
  RuntimeEventTypes2["ActionExecutionEnd"] = "ActionExecutionEnd";
2773
2947
  RuntimeEventTypes2["ActionExecutionResult"] = "ActionExecutionResult";
2774
2948
  RuntimeEventTypes2["AgentStateMessage"] = "AgentStateMessage";
2949
+ RuntimeEventTypes2["MetaEvent"] = "MetaEvent";
2775
2950
  })(RuntimeEventTypes || (RuntimeEventTypes = {}));
2951
+ var RuntimeMetaEventName;
2952
+ (function(RuntimeMetaEventName2) {
2953
+ RuntimeMetaEventName2["LangGraphInterruptEvent"] = "LangGraphInterruptEvent";
2954
+ RuntimeMetaEventName2["LangGraphInterruptResumeEvent"] = "LangGraphInterruptResumeEvent";
2955
+ })(RuntimeMetaEventName || (RuntimeMetaEventName = {}));
2776
2956
  var RuntimeEventSubject = class extends ReplaySubject2 {
2777
2957
  constructor() {
2778
2958
  super();
@@ -3044,8 +3224,8 @@ import { GraphQLError } from "graphql";
3044
3224
  import { randomId as randomId4 } from "@copilotkit/shared";
3045
3225
 
3046
3226
  // src/graphql/types/agents-response.type.ts
3047
- import { Field as Field14, ObjectType as ObjectType4 } from "type-graphql";
3048
- function _ts_decorate14(decorators, target, key, desc) {
3227
+ import { Field as Field16, ObjectType as ObjectType5 } from "type-graphql";
3228
+ function _ts_decorate16(decorators, target, key, desc) {
3049
3229
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3050
3230
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3051
3231
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3055,49 +3235,49 @@ function _ts_decorate14(decorators, target, key, desc) {
3055
3235
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3056
3236
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3057
3237
  }
3058
- __name(_ts_decorate14, "_ts_decorate");
3059
- function _ts_metadata14(k, v) {
3238
+ __name(_ts_decorate16, "_ts_decorate");
3239
+ function _ts_metadata16(k, v) {
3060
3240
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
3061
3241
  return Reflect.metadata(k, v);
3062
3242
  }
3063
- __name(_ts_metadata14, "_ts_metadata");
3243
+ __name(_ts_metadata16, "_ts_metadata");
3064
3244
  var Agent = class {
3065
3245
  id;
3066
3246
  name;
3067
3247
  description;
3068
3248
  };
3069
3249
  __name(Agent, "Agent");
3070
- _ts_decorate14([
3071
- Field14(() => String),
3072
- _ts_metadata14("design:type", String)
3250
+ _ts_decorate16([
3251
+ Field16(() => String),
3252
+ _ts_metadata16("design:type", String)
3073
3253
  ], Agent.prototype, "id", void 0);
3074
- _ts_decorate14([
3075
- Field14(() => String),
3076
- _ts_metadata14("design:type", String)
3254
+ _ts_decorate16([
3255
+ Field16(() => String),
3256
+ _ts_metadata16("design:type", String)
3077
3257
  ], Agent.prototype, "name", void 0);
3078
- _ts_decorate14([
3079
- Field14(() => String),
3080
- _ts_metadata14("design:type", String)
3258
+ _ts_decorate16([
3259
+ Field16(() => String),
3260
+ _ts_metadata16("design:type", String)
3081
3261
  ], Agent.prototype, "description", void 0);
3082
- Agent = _ts_decorate14([
3083
- ObjectType4()
3262
+ Agent = _ts_decorate16([
3263
+ ObjectType5()
3084
3264
  ], Agent);
3085
3265
  var AgentsResponse = class {
3086
3266
  agents;
3087
3267
  };
3088
3268
  __name(AgentsResponse, "AgentsResponse");
3089
- _ts_decorate14([
3090
- Field14(() => [
3269
+ _ts_decorate16([
3270
+ Field16(() => [
3091
3271
  Agent
3092
3272
  ]),
3093
- _ts_metadata14("design:type", Array)
3273
+ _ts_metadata16("design:type", Array)
3094
3274
  ], AgentsResponse.prototype, "agents", void 0);
3095
- AgentsResponse = _ts_decorate14([
3096
- ObjectType4()
3275
+ AgentsResponse = _ts_decorate16([
3276
+ ObjectType5()
3097
3277
  ], AgentsResponse);
3098
3278
 
3099
3279
  // src/graphql/resolvers/copilot.resolver.ts
3100
- function _ts_decorate15(decorators, target, key, desc) {
3280
+ function _ts_decorate17(decorators, target, key, desc) {
3101
3281
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3102
3282
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3103
3283
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3107,12 +3287,12 @@ function _ts_decorate15(decorators, target, key, desc) {
3107
3287
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3108
3288
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3109
3289
  }
3110
- __name(_ts_decorate15, "_ts_decorate");
3111
- function _ts_metadata15(k, v) {
3290
+ __name(_ts_decorate17, "_ts_decorate");
3291
+ function _ts_metadata17(k, v) {
3112
3292
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
3113
3293
  return Reflect.metadata(k, v);
3114
3294
  }
3115
- __name(_ts_metadata15, "_ts_metadata");
3295
+ __name(_ts_metadata17, "_ts_metadata");
3116
3296
  function _ts_param(paramIndex, decorator) {
3117
3297
  return function(target, key) {
3118
3298
  decorator(target, key, paramIndex);
@@ -3166,7 +3346,7 @@ var CopilotResolver = class {
3166
3346
  };
3167
3347
  }
3168
3348
  async generateCopilotResponse(ctx, data, properties) {
3169
- var _a, _b, _c;
3349
+ var _a, _b, _c, _d;
3170
3350
  telemetry_client_default.capture("oss.runtime.copilot_request_created", {
3171
3351
  "cloud.guardrails.enabled": ((_a = data.cloud) == null ? void 0 : _a.guardrails) !== void 0,
3172
3352
  requestType: data.metadata.requestType
@@ -3237,16 +3417,68 @@ var CopilotResolver = class {
3237
3417
  agentSession: data.agentSession,
3238
3418
  agentStates: data.agentStates,
3239
3419
  url: data.frontend.url,
3240
- extensions: data.extensions
3420
+ extensions: data.extensions,
3421
+ metaEvents: data.metaEvents
3241
3422
  });
3242
3423
  logger2.debug("Event source created, creating response");
3424
+ const eventStream = eventSource.processRuntimeEvents({
3425
+ serverSideActions,
3426
+ guardrailsResult$: ((_d = data.cloud) == null ? void 0 : _d.guardrails) ? guardrailsResult$ : null,
3427
+ actionInputsWithoutAgents: actionInputsWithoutAgents.filter(
3428
+ // TODO-AGENTS: do not exclude ALL server side actions
3429
+ (action) => !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name)
3430
+ ),
3431
+ threadId
3432
+ }).pipe(
3433
+ // shareReplay() ensures that later subscribers will see the whole stream instead of
3434
+ // just the events that were emitted after the subscriber was added.
3435
+ shareReplay(),
3436
+ finalize(() => {
3437
+ logger2.debug("Event stream finalized");
3438
+ })
3439
+ );
3243
3440
  const response = {
3244
3441
  threadId,
3245
3442
  runId,
3246
3443
  status: firstValueFrom2(responseStatus$),
3247
3444
  extensions,
3445
+ metaEvents: new Repeater(async (push, stop) => {
3446
+ let eventStreamSubscription;
3447
+ eventStreamSubscription = eventStream.subscribe({
3448
+ next: async (event) => {
3449
+ if (event.type != RuntimeEventTypes.MetaEvent) {
3450
+ return;
3451
+ }
3452
+ switch (event.name) {
3453
+ case RuntimeMetaEventName.LangGraphInterruptEvent:
3454
+ push(plainToInstance3(LangGraphInterruptEvent, {
3455
+ type: event.type,
3456
+ name: event.name,
3457
+ value: event.value
3458
+ }));
3459
+ break;
3460
+ }
3461
+ },
3462
+ error: (err) => {
3463
+ logger2.error({
3464
+ err
3465
+ }, "Error in meta events stream");
3466
+ responseStatus$.next(new UnknownErrorResponse({
3467
+ description: `An unknown error has occurred in the event stream`
3468
+ }));
3469
+ eventStreamSubscription == null ? void 0 : eventStreamSubscription.unsubscribe();
3470
+ stop();
3471
+ },
3472
+ complete: async () => {
3473
+ logger2.debug("Meta events stream completed");
3474
+ responseStatus$.next(new SuccessResponseStatus());
3475
+ eventStreamSubscription == null ? void 0 : eventStreamSubscription.unsubscribe();
3476
+ stop();
3477
+ }
3478
+ });
3479
+ }),
3248
3480
  messages: new Repeater(async (pushMessage, stopStreamingMessages) => {
3249
- var _a2, _b2;
3481
+ var _a2;
3250
3482
  logger2.debug("Messages repeater created");
3251
3483
  if ((_a2 = data.cloud) == null ? void 0 : _a2.guardrails) {
3252
3484
  logger2 = logger2.child({
@@ -3295,26 +3527,12 @@ var CopilotResolver = class {
3295
3527
  });
3296
3528
  }
3297
3529
  let eventStreamSubscription;
3298
- const eventStream = eventSource.processRuntimeEvents({
3299
- serverSideActions,
3300
- guardrailsResult$: ((_b2 = data.cloud) == null ? void 0 : _b2.guardrails) ? guardrailsResult$ : null,
3301
- actionInputsWithoutAgents: actionInputsWithoutAgents.filter(
3302
- // TODO-AGENTS: do not exclude ALL server side actions
3303
- (action) => !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name)
3304
- ),
3305
- threadId
3306
- }).pipe(
3307
- // shareReplay() ensures that later subscribers will see the whole stream instead of
3308
- // just the events that were emitted after the subscriber was added.
3309
- shareReplay(),
3310
- finalize(() => {
3311
- logger2.debug("Event stream finalized");
3312
- })
3313
- );
3314
3530
  logger2.debug("Event stream created, subscribing to event stream");
3315
3531
  eventStreamSubscription = eventStream.subscribe({
3316
3532
  next: async (event) => {
3317
3533
  switch (event.type) {
3534
+ case RuntimeEventTypes.MetaEvent:
3535
+ break;
3318
3536
  case RuntimeEventTypes.TextMessageStart:
3319
3537
  const textMessageContentStream = eventStream.pipe(
3320
3538
  // skip until this message start event
@@ -3520,37 +3738,37 @@ var CopilotResolver = class {
3520
3738
  }
3521
3739
  };
3522
3740
  __name(CopilotResolver, "CopilotResolver");
3523
- _ts_decorate15([
3741
+ _ts_decorate17([
3524
3742
  Query(() => String),
3525
- _ts_metadata15("design:type", Function),
3526
- _ts_metadata15("design:paramtypes", []),
3527
- _ts_metadata15("design:returntype", Promise)
3743
+ _ts_metadata17("design:type", Function),
3744
+ _ts_metadata17("design:paramtypes", []),
3745
+ _ts_metadata17("design:returntype", Promise)
3528
3746
  ], CopilotResolver.prototype, "hello", null);
3529
- _ts_decorate15([
3747
+ _ts_decorate17([
3530
3748
  Query(() => AgentsResponse),
3531
3749
  _ts_param(0, Ctx()),
3532
- _ts_metadata15("design:type", Function),
3533
- _ts_metadata15("design:paramtypes", [
3750
+ _ts_metadata17("design:type", Function),
3751
+ _ts_metadata17("design:paramtypes", [
3534
3752
  typeof GraphQLContext === "undefined" ? Object : GraphQLContext
3535
3753
  ]),
3536
- _ts_metadata15("design:returntype", Promise)
3754
+ _ts_metadata17("design:returntype", Promise)
3537
3755
  ], CopilotResolver.prototype, "availableAgents", null);
3538
- _ts_decorate15([
3756
+ _ts_decorate17([
3539
3757
  Mutation(() => CopilotResponse),
3540
3758
  _ts_param(0, Ctx()),
3541
3759
  _ts_param(1, Arg("data")),
3542
3760
  _ts_param(2, Arg("properties", () => GraphQLJSONObject, {
3543
3761
  nullable: true
3544
3762
  })),
3545
- _ts_metadata15("design:type", Function),
3546
- _ts_metadata15("design:paramtypes", [
3763
+ _ts_metadata17("design:type", Function),
3764
+ _ts_metadata17("design:paramtypes", [
3547
3765
  typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
3548
3766
  typeof GenerateCopilotResponseInput === "undefined" ? Object : GenerateCopilotResponseInput,
3549
3767
  typeof CopilotRequestContextProperties === "undefined" ? Object : CopilotRequestContextProperties
3550
3768
  ]),
3551
- _ts_metadata15("design:returntype", Promise)
3769
+ _ts_metadata17("design:returntype", Promise)
3552
3770
  ], CopilotResolver.prototype, "generateCopilotResponse", null);
3553
- CopilotResolver = _ts_decorate15([
3771
+ CopilotResolver = _ts_decorate17([
3554
3772
  Resolver(() => CopilotResponse)
3555
3773
  ], CopilotResolver);
3556
3774
 
@@ -3591,8 +3809,8 @@ import { Ctx as Ctx2 } from "type-graphql";
3591
3809
  import { Query as Query2 } from "type-graphql";
3592
3810
 
3593
3811
  // src/graphql/types/load-agent-state-response.type.ts
3594
- import { Field as Field15, ObjectType as ObjectType5 } from "type-graphql";
3595
- function _ts_decorate16(decorators, target, key, desc) {
3812
+ import { Field as Field17, ObjectType as ObjectType6 } from "type-graphql";
3813
+ function _ts_decorate18(decorators, target, key, desc) {
3596
3814
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3597
3815
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3598
3816
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3602,12 +3820,12 @@ function _ts_decorate16(decorators, target, key, desc) {
3602
3820
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3603
3821
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3604
3822
  }
3605
- __name(_ts_decorate16, "_ts_decorate");
3606
- function _ts_metadata16(k, v) {
3823
+ __name(_ts_decorate18, "_ts_decorate");
3824
+ function _ts_metadata18(k, v) {
3607
3825
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
3608
3826
  return Reflect.metadata(k, v);
3609
3827
  }
3610
- __name(_ts_metadata16, "_ts_metadata");
3828
+ __name(_ts_metadata18, "_ts_metadata");
3611
3829
  var LoadAgentStateResponse = class {
3612
3830
  threadId;
3613
3831
  threadExists;
@@ -3615,29 +3833,29 @@ var LoadAgentStateResponse = class {
3615
3833
  messages;
3616
3834
  };
3617
3835
  __name(LoadAgentStateResponse, "LoadAgentStateResponse");
3618
- _ts_decorate16([
3619
- Field15(() => String),
3620
- _ts_metadata16("design:type", String)
3836
+ _ts_decorate18([
3837
+ Field17(() => String),
3838
+ _ts_metadata18("design:type", String)
3621
3839
  ], LoadAgentStateResponse.prototype, "threadId", void 0);
3622
- _ts_decorate16([
3623
- Field15(() => Boolean),
3624
- _ts_metadata16("design:type", Boolean)
3840
+ _ts_decorate18([
3841
+ Field17(() => Boolean),
3842
+ _ts_metadata18("design:type", Boolean)
3625
3843
  ], LoadAgentStateResponse.prototype, "threadExists", void 0);
3626
- _ts_decorate16([
3627
- Field15(() => String),
3628
- _ts_metadata16("design:type", String)
3844
+ _ts_decorate18([
3845
+ Field17(() => String),
3846
+ _ts_metadata18("design:type", String)
3629
3847
  ], LoadAgentStateResponse.prototype, "state", void 0);
3630
- _ts_decorate16([
3631
- Field15(() => String),
3632
- _ts_metadata16("design:type", String)
3848
+ _ts_decorate18([
3849
+ Field17(() => String),
3850
+ _ts_metadata18("design:type", String)
3633
3851
  ], LoadAgentStateResponse.prototype, "messages", void 0);
3634
- LoadAgentStateResponse = _ts_decorate16([
3635
- ObjectType5()
3852
+ LoadAgentStateResponse = _ts_decorate18([
3853
+ ObjectType6()
3636
3854
  ], LoadAgentStateResponse);
3637
3855
 
3638
3856
  // src/graphql/inputs/load-agent-state.input.ts
3639
- import { Field as Field16, InputType as InputType11 } from "type-graphql";
3640
- function _ts_decorate17(decorators, target, key, desc) {
3857
+ import { Field as Field18, InputType as InputType12 } from "type-graphql";
3858
+ function _ts_decorate19(decorators, target, key, desc) {
3641
3859
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3642
3860
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3643
3861
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3647,31 +3865,31 @@ function _ts_decorate17(decorators, target, key, desc) {
3647
3865
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3648
3866
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3649
3867
  }
3650
- __name(_ts_decorate17, "_ts_decorate");
3651
- function _ts_metadata17(k, v) {
3868
+ __name(_ts_decorate19, "_ts_decorate");
3869
+ function _ts_metadata19(k, v) {
3652
3870
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
3653
3871
  return Reflect.metadata(k, v);
3654
3872
  }
3655
- __name(_ts_metadata17, "_ts_metadata");
3873
+ __name(_ts_metadata19, "_ts_metadata");
3656
3874
  var LoadAgentStateInput = class {
3657
3875
  threadId;
3658
3876
  agentName;
3659
3877
  };
3660
3878
  __name(LoadAgentStateInput, "LoadAgentStateInput");
3661
- _ts_decorate17([
3662
- Field16(() => String),
3663
- _ts_metadata17("design:type", String)
3879
+ _ts_decorate19([
3880
+ Field18(() => String),
3881
+ _ts_metadata19("design:type", String)
3664
3882
  ], LoadAgentStateInput.prototype, "threadId", void 0);
3665
- _ts_decorate17([
3666
- Field16(() => String),
3667
- _ts_metadata17("design:type", String)
3883
+ _ts_decorate19([
3884
+ Field18(() => String),
3885
+ _ts_metadata19("design:type", String)
3668
3886
  ], LoadAgentStateInput.prototype, "agentName", void 0);
3669
- LoadAgentStateInput = _ts_decorate17([
3670
- InputType11()
3887
+ LoadAgentStateInput = _ts_decorate19([
3888
+ InputType12()
3671
3889
  ], LoadAgentStateInput);
3672
3890
 
3673
3891
  // src/graphql/resolvers/state.resolver.ts
3674
- function _ts_decorate18(decorators, target, key, desc) {
3892
+ function _ts_decorate20(decorators, target, key, desc) {
3675
3893
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3676
3894
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3677
3895
  r = Reflect.decorate(decorators, target, key, desc);
@@ -3681,12 +3899,12 @@ function _ts_decorate18(decorators, target, key, desc) {
3681
3899
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3682
3900
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3683
3901
  }
3684
- __name(_ts_decorate18, "_ts_decorate");
3685
- function _ts_metadata18(k, v) {
3902
+ __name(_ts_decorate20, "_ts_decorate");
3903
+ function _ts_metadata20(k, v) {
3686
3904
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
3687
3905
  return Reflect.metadata(k, v);
3688
3906
  }
3689
- __name(_ts_metadata18, "_ts_metadata");
3907
+ __name(_ts_metadata20, "_ts_metadata");
3690
3908
  function _ts_param2(paramIndex, decorator) {
3691
3909
  return function(target, key) {
3692
3910
  decorator(target, key, paramIndex);
@@ -3705,18 +3923,18 @@ var StateResolver = class {
3705
3923
  }
3706
3924
  };
3707
3925
  __name(StateResolver, "StateResolver");
3708
- _ts_decorate18([
3926
+ _ts_decorate20([
3709
3927
  Query2(() => LoadAgentStateResponse),
3710
3928
  _ts_param2(0, Ctx2()),
3711
3929
  _ts_param2(1, Arg2("data")),
3712
- _ts_metadata18("design:type", Function),
3713
- _ts_metadata18("design:paramtypes", [
3930
+ _ts_metadata20("design:type", Function),
3931
+ _ts_metadata20("design:paramtypes", [
3714
3932
  typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
3715
3933
  typeof LoadAgentStateInput === "undefined" ? Object : LoadAgentStateInput
3716
3934
  ]),
3717
- _ts_metadata18("design:returntype", Promise)
3935
+ _ts_metadata20("design:returntype", Promise)
3718
3936
  ], StateResolver.prototype, "loadAgentState", null);
3719
- StateResolver = _ts_decorate18([
3937
+ StateResolver = _ts_decorate20([
3720
3938
  Resolver2(() => LoadAgentStateResponse)
3721
3939
  ], StateResolver);
3722
3940
 
@@ -3832,4 +4050,4 @@ export {
3832
4050
  getCommonConfig,
3833
4051
  copilotRuntimeNodeHttpEndpoint
3834
4052
  };
3835
- //# sourceMappingURL=chunk-EV3MMEAZ.mjs.map
4053
+ //# sourceMappingURL=chunk-W4G47FRC.mjs.map