@dudousxd/nestjs-agent 0.3.1 → 0.3.3

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.
@@ -124,7 +124,9 @@ AgentRunWorkflow = _ts_decorate([
124
124
  ], AgentRunWorkflow);
125
125
 
126
126
  // src/durable/durable-agent-runner.ts
127
+ import { randomUUID } from "node:crypto";
127
128
  import { WorkflowService } from "@dudousxd/nestjs-durable";
129
+ import { WorkflowSuspended as WorkflowSuspended2 } from "@dudousxd/nestjs-durable-core";
128
130
  import { Injectable as Injectable2 } from "@nestjs/common";
129
131
  function _ts_decorate2(decorators, target, key, desc) {
130
132
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -150,9 +152,16 @@ var DurableAgentRunner = class {
150
152
  ...input,
151
153
  day: input.day ?? utcDay()
152
154
  };
153
- const result = await this.workflows.start(AgentRunWorkflow, stamped);
155
+ const runId = randomUUID();
156
+ try {
157
+ await this.workflows.start(AgentRunWorkflow, stamped, runId);
158
+ } catch (error) {
159
+ if (!(error instanceof WorkflowSuspended2)) {
160
+ throw error;
161
+ }
162
+ }
154
163
  return {
155
- runId: result.runId
164
+ runId
156
165
  };
157
166
  }
158
167
  async signal(runId, toolCallId, decision) {
@@ -215,7 +224,7 @@ AgentDurableModule = _ts_decorate3([
215
224
  ], AgentDurableModule);
216
225
 
217
226
  // src/agent.module.ts
218
- import { AGENT_ACTOR_RESOLVER as AGENT_ACTOR_RESOLVER5, AGENT_DEPS_FACTORY as AGENT_DEPS_FACTORY4, AGENT_DURABLE_RUNNER as AGENT_DURABLE_RUNNER2, AGENT_MODEL as AGENT_MODEL2, AGENT_OPTIONS as AGENT_OPTIONS3, AGENT_PROMPT_CONTRIBUTORS as AGENT_PROMPT_CONTRIBUTORS3, AGENT_QUOTA_STORE as AGENT_QUOTA_STORE3, AGENT_REGISTRY as AGENT_REGISTRY4, AGENT_ROLES_POLICY as AGENT_ROLES_POLICY2, AGENT_RUNNER as AGENT_RUNNER2, AGENT_SINK as AGENT_SINK2, AGENT_STORE as AGENT_STORE5, AGENT_TOOL_REGISTRY as AGENT_TOOL_REGISTRY3, AgentRegistry as AgentRegistry4, DefaultRolesPolicy, ToolRegistry as ToolRegistry3 } from "@dudousxd/nestjs-agent-core";
227
+ import { AGENT_ACTOR_RESOLVER as AGENT_ACTOR_RESOLVER5, AGENT_DEPS_FACTORY as AGENT_DEPS_FACTORY5, AGENT_DURABLE_RUNNER as AGENT_DURABLE_RUNNER2, AGENT_MODEL as AGENT_MODEL2, AGENT_OPTIONS as AGENT_OPTIONS3, AGENT_PROMPT_CONTRIBUTORS as AGENT_PROMPT_CONTRIBUTORS3, AGENT_QUOTA_STORE as AGENT_QUOTA_STORE3, AGENT_REGISTRY as AGENT_REGISTRY5, AGENT_ROLES_POLICY as AGENT_ROLES_POLICY2, AGENT_RUNNER as AGENT_RUNNER2, AGENT_SINK as AGENT_SINK2, AGENT_STORE as AGENT_STORE5, AGENT_TOOL_REGISTRY as AGENT_TOOL_REGISTRY3, AgentRegistry as AgentRegistry5, DefaultRolesPolicy, ToolRegistry as ToolRegistry3 } from "@dudousxd/nestjs-agent-core";
219
228
  import { Global as Global2, Module as Module2 } from "@nestjs/common";
220
229
  import { DiscoveryModule, RouterModule } from "@nestjs/core";
221
230
 
@@ -427,6 +436,9 @@ var AgentService = class {
427
436
  ...params.regenerate === true ? {
428
437
  regenerate: true
429
438
  } : {},
439
+ ...params.attachments !== void 0 ? {
440
+ attachments: params.attachments
441
+ } : {},
430
442
  ...params.pageContext !== void 0 ? {
431
443
  pageContext: params.pageContext
432
444
  } : {}
@@ -582,9 +594,9 @@ AgentService = _ts_decorate5([
582
594
  ])
583
595
  ], AgentService);
584
596
 
585
- // src/controller/chat.controller.ts
586
- import { AGENT_ACTOR_RESOLVER, AgentStreamError } from "@dudousxd/nestjs-agent-core";
587
- import { Body, Controller, Get, Inject as Inject4, Param, Post, Req, Res } from "@nestjs/common";
597
+ // src/controller/agents.controller.ts
598
+ import { AGENT_DEPS_FACTORY as AGENT_DEPS_FACTORY3, AGENT_REGISTRY as AGENT_REGISTRY2, AgentRegistry as AgentRegistry3 } from "@dudousxd/nestjs-agent-core";
599
+ import { Controller, Get, Inject as Inject4 } from "@nestjs/common";
588
600
  function _ts_decorate6(decorators, target, key, desc) {
589
601
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
590
602
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -602,6 +614,64 @@ function _ts_param4(paramIndex, decorator) {
602
614
  };
603
615
  }
604
616
  __name(_ts_param4, "_ts_param");
617
+ var AgentsController = class {
618
+ static {
619
+ __name(this, "AgentsController");
620
+ }
621
+ agents;
622
+ depsFactory;
623
+ constructor(agents, depsFactory) {
624
+ this.agents = agents;
625
+ this.depsFactory = depsFactory;
626
+ }
627
+ list() {
628
+ const defaultAgentName = this.depsFactory.defaultAgentName();
629
+ return this.agents.list().map((definition) => ({
630
+ name: definition.name,
631
+ description: definition.description ?? "",
632
+ ...definition.name === defaultAgentName ? {
633
+ isDefault: true
634
+ } : {}
635
+ }));
636
+ }
637
+ };
638
+ _ts_decorate6([
639
+ Get(),
640
+ _ts_metadata5("design:type", Function),
641
+ _ts_metadata5("design:paramtypes", []),
642
+ _ts_metadata5("design:returntype", Array)
643
+ ], AgentsController.prototype, "list", null);
644
+ AgentsController = _ts_decorate6([
645
+ Controller("agents"),
646
+ _ts_param4(0, Inject4(AGENT_REGISTRY2)),
647
+ _ts_param4(1, Inject4(AGENT_DEPS_FACTORY3)),
648
+ _ts_metadata5("design:type", Function),
649
+ _ts_metadata5("design:paramtypes", [
650
+ typeof AgentRegistry3 === "undefined" ? Object : AgentRegistry3,
651
+ typeof AgentDepsFactory === "undefined" ? Object : AgentDepsFactory
652
+ ])
653
+ ], AgentsController);
654
+
655
+ // src/controller/chat.controller.ts
656
+ import { AGENT_ACTOR_RESOLVER, AgentStreamError } from "@dudousxd/nestjs-agent-core";
657
+ import { Body, Controller as Controller2, Get as Get2, Inject as Inject5, Param, Post, Req, Res } from "@nestjs/common";
658
+ function _ts_decorate7(decorators, target, key, desc) {
659
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
660
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
661
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
662
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
663
+ }
664
+ __name(_ts_decorate7, "_ts_decorate");
665
+ function _ts_metadata6(k, v) {
666
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
667
+ }
668
+ __name(_ts_metadata6, "_ts_metadata");
669
+ function _ts_param5(paramIndex, decorator) {
670
+ return function(target, key) {
671
+ decorator(target, key, paramIndex);
672
+ };
673
+ }
674
+ __name(_ts_param5, "_ts_param");
605
675
  var ChatController = class {
606
676
  static {
607
677
  __name(this, "ChatController");
@@ -623,6 +693,9 @@ var ChatController = class {
623
693
  ...body.agent !== void 0 ? {
624
694
  agentName: body.agent
625
695
  } : {},
696
+ ...body.attachments !== void 0 ? {
697
+ attachments: body.attachments
698
+ } : {},
626
699
  ...body.pageContext !== void 0 ? {
627
700
  pageContext: body.pageContext
628
701
  } : {},
@@ -661,11 +734,26 @@ data: ${JSON.stringify({
661
734
 
662
735
  `);
663
736
  const decoder = new TextDecoder();
737
+ let buffer = "";
664
738
  try {
665
739
  for await (const chunk of this.agent.subscribe(runId)) {
666
- res.write(`data: ${JSON.stringify({
667
- delta: decoder.decode(chunk)
668
- })}
740
+ buffer += decoder.decode(chunk, {
741
+ stream: true
742
+ });
743
+ let newline = buffer.indexOf("\n");
744
+ while (newline !== -1) {
745
+ const line = buffer.slice(0, newline);
746
+ buffer = buffer.slice(newline + 1);
747
+ if (line.length > 0) {
748
+ res.write(`data: ${line}
749
+
750
+ `);
751
+ }
752
+ newline = buffer.indexOf("\n");
753
+ }
754
+ }
755
+ if (buffer.length > 0) {
756
+ res.write(`data: ${buffer}
669
757
 
670
758
  `);
671
759
  }
@@ -686,46 +774,46 @@ data: ${JSON.stringify(payload)}
686
774
  res.end();
687
775
  }
688
776
  };
689
- _ts_decorate6([
777
+ _ts_decorate7([
690
778
  Post("chat"),
691
- _ts_param4(0, Req()),
692
- _ts_param4(1, Res()),
693
- _ts_param4(2, Body()),
694
- _ts_metadata5("design:type", Function),
695
- _ts_metadata5("design:paramtypes", [
779
+ _ts_param5(0, Req()),
780
+ _ts_param5(1, Res()),
781
+ _ts_param5(2, Body()),
782
+ _ts_metadata6("design:type", Function),
783
+ _ts_metadata6("design:paramtypes", [
696
784
  typeof Request === "undefined" ? Object : Request,
697
785
  typeof Response === "undefined" ? Object : Response,
698
786
  typeof ChatBody === "undefined" ? Object : ChatBody
699
787
  ]),
700
- _ts_metadata5("design:returntype", Promise)
788
+ _ts_metadata6("design:returntype", Promise)
701
789
  ], ChatController.prototype, "chat", null);
702
- _ts_decorate6([
703
- Get("chat/:runId/stream"),
704
- _ts_param4(0, Param("runId")),
705
- _ts_param4(1, Res()),
706
- _ts_metadata5("design:type", Function),
707
- _ts_metadata5("design:paramtypes", [
790
+ _ts_decorate7([
791
+ Get2("chat/:runId/stream"),
792
+ _ts_param5(0, Param("runId")),
793
+ _ts_param5(1, Res()),
794
+ _ts_metadata6("design:type", Function),
795
+ _ts_metadata6("design:paramtypes", [
708
796
  String,
709
797
  typeof Response === "undefined" ? Object : Response
710
798
  ]),
711
- _ts_metadata5("design:returntype", Promise)
799
+ _ts_metadata6("design:returntype", Promise)
712
800
  ], ChatController.prototype, "stream", null);
713
- _ts_decorate6([
801
+ _ts_decorate7([
714
802
  Post("chat/:runId/cancel"),
715
- _ts_param4(0, Req()),
716
- _ts_param4(1, Param("runId")),
717
- _ts_metadata5("design:type", Function),
718
- _ts_metadata5("design:paramtypes", [
803
+ _ts_param5(0, Req()),
804
+ _ts_param5(1, Param("runId")),
805
+ _ts_metadata6("design:type", Function),
806
+ _ts_metadata6("design:paramtypes", [
719
807
  typeof Request === "undefined" ? Object : Request,
720
808
  String
721
809
  ]),
722
- _ts_metadata5("design:returntype", Promise)
810
+ _ts_metadata6("design:returntype", Promise)
723
811
  ], ChatController.prototype, "cancel", null);
724
- ChatController = _ts_decorate6([
725
- Controller(),
726
- _ts_param4(1, Inject4(AGENT_ACTOR_RESOLVER)),
727
- _ts_metadata5("design:type", Function),
728
- _ts_metadata5("design:paramtypes", [
812
+ ChatController = _ts_decorate7([
813
+ Controller2(),
814
+ _ts_param5(1, Inject5(AGENT_ACTOR_RESOLVER)),
815
+ _ts_metadata6("design:type", Function),
816
+ _ts_metadata6("design:paramtypes", [
729
817
  typeof AgentService === "undefined" ? Object : AgentService,
730
818
  typeof ActorResolver === "undefined" ? Object : ActorResolver
731
819
  ])
@@ -733,24 +821,24 @@ ChatController = _ts_decorate6([
733
821
 
734
822
  // src/controller/quota.controller.ts
735
823
  import { AGENT_ACTOR_RESOLVER as AGENT_ACTOR_RESOLVER2 } from "@dudousxd/nestjs-agent-core";
736
- import { Controller as Controller2, Get as Get2, Inject as Inject5, Req as Req2 } from "@nestjs/common";
737
- function _ts_decorate7(decorators, target, key, desc) {
824
+ import { Controller as Controller3, Get as Get3, Inject as Inject6, Req as Req2 } from "@nestjs/common";
825
+ function _ts_decorate8(decorators, target, key, desc) {
738
826
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
739
827
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
740
828
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
741
829
  return c > 3 && r && Object.defineProperty(target, key, r), r;
742
830
  }
743
- __name(_ts_decorate7, "_ts_decorate");
744
- function _ts_metadata6(k, v) {
831
+ __name(_ts_decorate8, "_ts_decorate");
832
+ function _ts_metadata7(k, v) {
745
833
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
746
834
  }
747
- __name(_ts_metadata6, "_ts_metadata");
748
- function _ts_param5(paramIndex, decorator) {
835
+ __name(_ts_metadata7, "_ts_metadata");
836
+ function _ts_param6(paramIndex, decorator) {
749
837
  return function(target, key) {
750
838
  decorator(target, key, paramIndex);
751
839
  };
752
840
  }
753
- __name(_ts_param5, "_ts_param");
841
+ __name(_ts_param6, "_ts_param");
754
842
  var QuotaController = class {
755
843
  static {
756
844
  __name(this, "QuotaController");
@@ -766,20 +854,20 @@ var QuotaController = class {
766
854
  return this.agent.quotaToday(actor.id);
767
855
  }
768
856
  };
769
- _ts_decorate7([
770
- Get2("today"),
771
- _ts_param5(0, Req2()),
772
- _ts_metadata6("design:type", Function),
773
- _ts_metadata6("design:paramtypes", [
857
+ _ts_decorate8([
858
+ Get3("today"),
859
+ _ts_param6(0, Req2()),
860
+ _ts_metadata7("design:type", Function),
861
+ _ts_metadata7("design:paramtypes", [
774
862
  typeof Request === "undefined" ? Object : Request
775
863
  ]),
776
- _ts_metadata6("design:returntype", Promise)
864
+ _ts_metadata7("design:returntype", Promise)
777
865
  ], QuotaController.prototype, "today", null);
778
- QuotaController = _ts_decorate7([
779
- Controller2("quota"),
780
- _ts_param5(1, Inject5(AGENT_ACTOR_RESOLVER2)),
781
- _ts_metadata6("design:type", Function),
782
- _ts_metadata6("design:paramtypes", [
866
+ QuotaController = _ts_decorate8([
867
+ Controller3("quota"),
868
+ _ts_param6(1, Inject6(AGENT_ACTOR_RESOLVER2)),
869
+ _ts_metadata7("design:type", Function),
870
+ _ts_metadata7("design:paramtypes", [
783
871
  typeof AgentService === "undefined" ? Object : AgentService,
784
872
  typeof ActorResolver === "undefined" ? Object : ActorResolver
785
873
  ])
@@ -787,24 +875,24 @@ QuotaController = _ts_decorate7([
787
875
 
788
876
  // src/controller/threads.controller.ts
789
877
  import { AGENT_ACTOR_RESOLVER as AGENT_ACTOR_RESOLVER3 } from "@dudousxd/nestjs-agent-core";
790
- import { Body as Body2, Controller as Controller3, Delete, Get as Get3, Inject as Inject6, Param as Param2, Patch, Post as Post2, Req as Req3 } from "@nestjs/common";
791
- function _ts_decorate8(decorators, target, key, desc) {
878
+ import { Body as Body2, Controller as Controller4, Delete, Get as Get4, Inject as Inject7, Param as Param2, Patch, Post as Post2, Req as Req3 } from "@nestjs/common";
879
+ function _ts_decorate9(decorators, target, key, desc) {
792
880
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
793
881
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
794
882
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
795
883
  return c > 3 && r && Object.defineProperty(target, key, r), r;
796
884
  }
797
- __name(_ts_decorate8, "_ts_decorate");
798
- function _ts_metadata7(k, v) {
885
+ __name(_ts_decorate9, "_ts_decorate");
886
+ function _ts_metadata8(k, v) {
799
887
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
800
888
  }
801
- __name(_ts_metadata7, "_ts_metadata");
802
- function _ts_param6(paramIndex, decorator) {
889
+ __name(_ts_metadata8, "_ts_metadata");
890
+ function _ts_param7(paramIndex, decorator) {
803
891
  return function(target, key) {
804
892
  decorator(target, key, paramIndex);
805
893
  };
806
894
  }
807
- __name(_ts_param6, "_ts_param");
895
+ __name(_ts_param7, "_ts_param");
808
896
  var ThreadsController = class {
809
897
  static {
810
898
  __name(this, "ThreadsController");
@@ -856,92 +944,92 @@ var ThreadsController = class {
856
944
  };
857
945
  }
858
946
  };
859
- _ts_decorate8([
860
- Get3(),
861
- _ts_param6(0, Req3()),
862
- _ts_metadata7("design:type", Function),
863
- _ts_metadata7("design:paramtypes", [
947
+ _ts_decorate9([
948
+ Get4(),
949
+ _ts_param7(0, Req3()),
950
+ _ts_metadata8("design:type", Function),
951
+ _ts_metadata8("design:paramtypes", [
864
952
  typeof Request === "undefined" ? Object : Request
865
953
  ]),
866
- _ts_metadata7("design:returntype", Promise)
954
+ _ts_metadata8("design:returntype", Promise)
867
955
  ], ThreadsController.prototype, "list", null);
868
- _ts_decorate8([
869
- Get3(":id"),
870
- _ts_param6(0, Req3()),
871
- _ts_param6(1, Param2("id")),
872
- _ts_metadata7("design:type", Function),
873
- _ts_metadata7("design:paramtypes", [
956
+ _ts_decorate9([
957
+ Get4(":id"),
958
+ _ts_param7(0, Req3()),
959
+ _ts_param7(1, Param2("id")),
960
+ _ts_metadata8("design:type", Function),
961
+ _ts_metadata8("design:paramtypes", [
874
962
  typeof Request === "undefined" ? Object : Request,
875
963
  String
876
964
  ]),
877
- _ts_metadata7("design:returntype", Promise)
965
+ _ts_metadata8("design:returntype", Promise)
878
966
  ], ThreadsController.prototype, "detail", null);
879
- _ts_decorate8([
967
+ _ts_decorate9([
880
968
  Delete(":id"),
881
- _ts_param6(0, Req3()),
882
- _ts_param6(1, Param2("id")),
883
- _ts_metadata7("design:type", Function),
884
- _ts_metadata7("design:paramtypes", [
969
+ _ts_param7(0, Req3()),
970
+ _ts_param7(1, Param2("id")),
971
+ _ts_metadata8("design:type", Function),
972
+ _ts_metadata8("design:paramtypes", [
885
973
  typeof Request === "undefined" ? Object : Request,
886
974
  String
887
975
  ]),
888
- _ts_metadata7("design:returntype", Promise)
976
+ _ts_metadata8("design:returntype", Promise)
889
977
  ], ThreadsController.prototype, "remove", null);
890
- _ts_decorate8([
978
+ _ts_decorate9([
891
979
  Post2(":id/fork-from/:messageId"),
892
- _ts_param6(0, Req3()),
893
- _ts_param6(1, Param2("id")),
894
- _ts_param6(2, Param2("messageId")),
895
- _ts_metadata7("design:type", Function),
896
- _ts_metadata7("design:paramtypes", [
980
+ _ts_param7(0, Req3()),
981
+ _ts_param7(1, Param2("id")),
982
+ _ts_param7(2, Param2("messageId")),
983
+ _ts_metadata8("design:type", Function),
984
+ _ts_metadata8("design:paramtypes", [
897
985
  typeof Request === "undefined" ? Object : Request,
898
986
  String,
899
987
  String
900
988
  ]),
901
- _ts_metadata7("design:returntype", Promise)
989
+ _ts_metadata8("design:returntype", Promise)
902
990
  ], ThreadsController.prototype, "fork", null);
903
- _ts_decorate8([
991
+ _ts_decorate9([
904
992
  Patch(":id"),
905
- _ts_param6(0, Req3()),
906
- _ts_param6(1, Param2("id")),
907
- _ts_param6(2, Body2()),
908
- _ts_metadata7("design:type", Function),
909
- _ts_metadata7("design:paramtypes", [
993
+ _ts_param7(0, Req3()),
994
+ _ts_param7(1, Param2("id")),
995
+ _ts_param7(2, Body2()),
996
+ _ts_metadata8("design:type", Function),
997
+ _ts_metadata8("design:paramtypes", [
910
998
  typeof Request === "undefined" ? Object : Request,
911
999
  String,
912
1000
  typeof RenameThreadBody === "undefined" ? Object : RenameThreadBody
913
1001
  ]),
914
- _ts_metadata7("design:returntype", Promise)
1002
+ _ts_metadata8("design:returntype", Promise)
915
1003
  ], ThreadsController.prototype, "rename", null);
916
- _ts_decorate8([
1004
+ _ts_decorate9([
917
1005
  Post2(":id/promote"),
918
- _ts_param6(0, Req3()),
919
- _ts_param6(1, Param2("id")),
920
- _ts_metadata7("design:type", Function),
921
- _ts_metadata7("design:paramtypes", [
1006
+ _ts_param7(0, Req3()),
1007
+ _ts_param7(1, Param2("id")),
1008
+ _ts_metadata8("design:type", Function),
1009
+ _ts_metadata8("design:paramtypes", [
922
1010
  typeof Request === "undefined" ? Object : Request,
923
1011
  String
924
1012
  ]),
925
- _ts_metadata7("design:returntype", Promise)
1013
+ _ts_metadata8("design:returntype", Promise)
926
1014
  ], ThreadsController.prototype, "promote", null);
927
- _ts_decorate8([
1015
+ _ts_decorate9([
928
1016
  Delete(":id/from/:messageId"),
929
- _ts_param6(0, Req3()),
930
- _ts_param6(1, Param2("id")),
931
- _ts_param6(2, Param2("messageId")),
932
- _ts_metadata7("design:type", Function),
933
- _ts_metadata7("design:paramtypes", [
1017
+ _ts_param7(0, Req3()),
1018
+ _ts_param7(1, Param2("id")),
1019
+ _ts_param7(2, Param2("messageId")),
1020
+ _ts_metadata8("design:type", Function),
1021
+ _ts_metadata8("design:paramtypes", [
934
1022
  typeof Request === "undefined" ? Object : Request,
935
1023
  String,
936
1024
  String
937
1025
  ]),
938
- _ts_metadata7("design:returntype", Promise)
1026
+ _ts_metadata8("design:returntype", Promise)
939
1027
  ], ThreadsController.prototype, "truncateFrom", null);
940
- ThreadsController = _ts_decorate8([
941
- Controller3("threads"),
942
- _ts_param6(1, Inject6(AGENT_ACTOR_RESOLVER3)),
943
- _ts_metadata7("design:type", Function),
944
- _ts_metadata7("design:paramtypes", [
1028
+ ThreadsController = _ts_decorate9([
1029
+ Controller4("threads"),
1030
+ _ts_param7(1, Inject7(AGENT_ACTOR_RESOLVER3)),
1031
+ _ts_metadata8("design:type", Function),
1032
+ _ts_metadata8("design:paramtypes", [
945
1033
  typeof AgentService === "undefined" ? Object : AgentService,
946
1034
  typeof ActorResolver === "undefined" ? Object : ActorResolver
947
1035
  ])
@@ -949,24 +1037,24 @@ ThreadsController = _ts_decorate8([
949
1037
 
950
1038
  // src/controller/tool-call.controller.ts
951
1039
  import { AGENT_ACTOR_RESOLVER as AGENT_ACTOR_RESOLVER4 } from "@dudousxd/nestjs-agent-core";
952
- import { Body as Body3, Controller as Controller4, Inject as Inject7, Post as Post3, Req as Req4 } from "@nestjs/common";
953
- function _ts_decorate9(decorators, target, key, desc) {
1040
+ import { Body as Body3, Controller as Controller5, Inject as Inject8, Post as Post3, Req as Req4 } from "@nestjs/common";
1041
+ function _ts_decorate10(decorators, target, key, desc) {
954
1042
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
955
1043
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
956
1044
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
957
1045
  return c > 3 && r && Object.defineProperty(target, key, r), r;
958
1046
  }
959
- __name(_ts_decorate9, "_ts_decorate");
960
- function _ts_metadata8(k, v) {
1047
+ __name(_ts_decorate10, "_ts_decorate");
1048
+ function _ts_metadata9(k, v) {
961
1049
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
962
1050
  }
963
- __name(_ts_metadata8, "_ts_metadata");
964
- function _ts_param7(paramIndex, decorator) {
1051
+ __name(_ts_metadata9, "_ts_metadata");
1052
+ function _ts_param8(paramIndex, decorator) {
965
1053
  return function(target, key) {
966
1054
  decorator(target, key, paramIndex);
967
1055
  };
968
1056
  }
969
- __name(_ts_param7, "_ts_param");
1057
+ __name(_ts_param8, "_ts_param");
970
1058
  var ToolCallController = class {
971
1059
  static {
972
1060
  __name(this, "ToolCallController");
@@ -992,41 +1080,41 @@ var ToolCallController = class {
992
1080
  };
993
1081
  }
994
1082
  };
995
- _ts_decorate9([
1083
+ _ts_decorate10([
996
1084
  Post3("approve"),
997
- _ts_param7(0, Req4()),
998
- _ts_param7(1, Body3()),
999
- _ts_metadata8("design:type", Function),
1000
- _ts_metadata8("design:paramtypes", [
1085
+ _ts_param8(0, Req4()),
1086
+ _ts_param8(1, Body3()),
1087
+ _ts_metadata9("design:type", Function),
1088
+ _ts_metadata9("design:paramtypes", [
1001
1089
  typeof Request === "undefined" ? Object : Request,
1002
1090
  typeof ApproveBody === "undefined" ? Object : ApproveBody
1003
1091
  ]),
1004
- _ts_metadata8("design:returntype", Promise)
1092
+ _ts_metadata9("design:returntype", Promise)
1005
1093
  ], ToolCallController.prototype, "approve", null);
1006
- _ts_decorate9([
1094
+ _ts_decorate10([
1007
1095
  Post3("reject"),
1008
- _ts_param7(0, Req4()),
1009
- _ts_param7(1, Body3()),
1010
- _ts_metadata8("design:type", Function),
1011
- _ts_metadata8("design:paramtypes", [
1096
+ _ts_param8(0, Req4()),
1097
+ _ts_param8(1, Body3()),
1098
+ _ts_metadata9("design:type", Function),
1099
+ _ts_metadata9("design:paramtypes", [
1012
1100
  typeof Request === "undefined" ? Object : Request,
1013
1101
  typeof RejectBody === "undefined" ? Object : RejectBody
1014
1102
  ]),
1015
- _ts_metadata8("design:returntype", Promise)
1103
+ _ts_metadata9("design:returntype", Promise)
1016
1104
  ], ToolCallController.prototype, "reject", null);
1017
- ToolCallController = _ts_decorate9([
1018
- Controller4("tool-call"),
1019
- _ts_param7(1, Inject7(AGENT_ACTOR_RESOLVER4)),
1020
- _ts_metadata8("design:type", Function),
1021
- _ts_metadata8("design:paramtypes", [
1105
+ ToolCallController = _ts_decorate10([
1106
+ Controller5("tool-call"),
1107
+ _ts_param8(1, Inject8(AGENT_ACTOR_RESOLVER4)),
1108
+ _ts_metadata9("design:type", Function),
1109
+ _ts_metadata9("design:paramtypes", [
1022
1110
  typeof AgentService === "undefined" ? Object : AgentService,
1023
1111
  typeof ActorResolver === "undefined" ? Object : ActorResolver
1024
1112
  ])
1025
1113
  ], ToolCallController);
1026
1114
 
1027
1115
  // src/discovery/agent-discovery.service.ts
1028
- import { AGENT_PROMPT_CONTRIBUTORS as AGENT_PROMPT_CONTRIBUTORS2, AGENT_REGISTRY as AGENT_REGISTRY2, AgentRegistry as AgentRegistry3 } from "@dudousxd/nestjs-agent-core";
1029
- import { Inject as Inject8, Injectable as Injectable5, Logger } from "@nestjs/common";
1116
+ import { AGENT_PROMPT_CONTRIBUTORS as AGENT_PROMPT_CONTRIBUTORS2, AGENT_REGISTRY as AGENT_REGISTRY3, AgentRegistry as AgentRegistry4 } from "@dudousxd/nestjs-agent-core";
1117
+ import { Inject as Inject9, Injectable as Injectable5, Logger } from "@nestjs/common";
1030
1118
  import { DiscoveryService, MetadataScanner } from "@nestjs/core";
1031
1119
 
1032
1120
  // src/decorator/agent.decorator.ts
@@ -1043,23 +1131,23 @@ var SYSTEM_PROMPT_METADATA = Symbol.for("@dudousxd/nestjs-agent:system-prompt");
1043
1131
  var SYSTEM_PROMPT_CONTRIBUTOR_METADATA = Symbol.for("@dudousxd/nestjs-agent:system-prompt-contributor");
1044
1132
 
1045
1133
  // src/discovery/agent-discovery.service.ts
1046
- function _ts_decorate10(decorators, target, key, desc) {
1134
+ function _ts_decorate11(decorators, target, key, desc) {
1047
1135
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1048
1136
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1049
1137
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1050
1138
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1051
1139
  }
1052
- __name(_ts_decorate10, "_ts_decorate");
1053
- function _ts_metadata9(k, v) {
1140
+ __name(_ts_decorate11, "_ts_decorate");
1141
+ function _ts_metadata10(k, v) {
1054
1142
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1055
1143
  }
1056
- __name(_ts_metadata9, "_ts_metadata");
1057
- function _ts_param8(paramIndex, decorator) {
1144
+ __name(_ts_metadata10, "_ts_metadata");
1145
+ function _ts_param9(paramIndex, decorator) {
1058
1146
  return function(target, key) {
1059
1147
  decorator(target, key, paramIndex);
1060
1148
  };
1061
1149
  }
1062
- __name(_ts_param8, "_ts_param");
1150
+ __name(_ts_param9, "_ts_param");
1063
1151
  var AgentDiscoveryService = class _AgentDiscoveryService {
1064
1152
  static {
1065
1153
  __name(this, "AgentDiscoveryService");
@@ -1094,6 +1182,9 @@ var AgentDiscoveryService = class _AgentDiscoveryService {
1094
1182
  const systemPrompt = promptMethod !== void 0 ? (ctx) => promptMethod(ctx) : meta.systemPrompt ?? "You are a helpful assistant.";
1095
1183
  return {
1096
1184
  name: meta.name,
1185
+ ...meta.description !== void 0 ? {
1186
+ description: meta.description
1187
+ } : {},
1097
1188
  systemPrompt,
1098
1189
  ...meta.tools !== void 0 ? {
1099
1190
  tools: meta.tools
@@ -1153,22 +1244,22 @@ var AgentDiscoveryService = class _AgentDiscoveryService {
1153
1244
  return (ctx) => candidate.call(instance, ctx);
1154
1245
  }
1155
1246
  };
1156
- AgentDiscoveryService = _ts_decorate10([
1247
+ AgentDiscoveryService = _ts_decorate11([
1157
1248
  Injectable5(),
1158
- _ts_param8(2, Inject8(AGENT_REGISTRY2)),
1159
- _ts_param8(3, Inject8(AGENT_PROMPT_CONTRIBUTORS2)),
1160
- _ts_metadata9("design:type", Function),
1161
- _ts_metadata9("design:paramtypes", [
1249
+ _ts_param9(2, Inject9(AGENT_REGISTRY3)),
1250
+ _ts_param9(3, Inject9(AGENT_PROMPT_CONTRIBUTORS2)),
1251
+ _ts_metadata10("design:type", Function),
1252
+ _ts_metadata10("design:paramtypes", [
1162
1253
  typeof DiscoveryService === "undefined" ? Object : DiscoveryService,
1163
1254
  typeof MetadataScanner === "undefined" ? Object : MetadataScanner,
1164
- typeof AgentRegistry3 === "undefined" ? Object : AgentRegistry3,
1255
+ typeof AgentRegistry4 === "undefined" ? Object : AgentRegistry4,
1165
1256
  Array
1166
1257
  ])
1167
1258
  ], AgentDiscoveryService);
1168
1259
 
1169
1260
  // src/discovery/ai-tool-discovery.service.ts
1170
- import { AGENT_OPTIONS as AGENT_OPTIONS2, AGENT_REGISTRY as AGENT_REGISTRY3, AGENT_TOOL_REGISTRY as AGENT_TOOL_REGISTRY2 } from "@dudousxd/nestjs-agent-core";
1171
- import { Inject as Inject9, Injectable as Injectable6, Logger as Logger2 } from "@nestjs/common";
1261
+ import { AGENT_OPTIONS as AGENT_OPTIONS2, AGENT_REGISTRY as AGENT_REGISTRY4, AGENT_TOOL_REGISTRY as AGENT_TOOL_REGISTRY2 } from "@dudousxd/nestjs-agent-core";
1262
+ import { Inject as Inject10, Injectable as Injectable6, Logger as Logger2 } from "@nestjs/common";
1172
1263
  import { DiscoveryService as DiscoveryService2 } from "@nestjs/core";
1173
1264
  import { z } from "zod";
1174
1265
 
@@ -1188,23 +1279,23 @@ function isBrandedFunctionalTool(value) {
1188
1279
  __name(isBrandedFunctionalTool, "isBrandedFunctionalTool");
1189
1280
 
1190
1281
  // src/discovery/ai-tool-discovery.service.ts
1191
- function _ts_decorate11(decorators, target, key, desc) {
1282
+ function _ts_decorate12(decorators, target, key, desc) {
1192
1283
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1193
1284
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1194
1285
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1195
1286
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1196
1287
  }
1197
- __name(_ts_decorate11, "_ts_decorate");
1198
- function _ts_metadata10(k, v) {
1288
+ __name(_ts_decorate12, "_ts_decorate");
1289
+ function _ts_metadata11(k, v) {
1199
1290
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1200
1291
  }
1201
- __name(_ts_metadata10, "_ts_metadata");
1202
- function _ts_param9(paramIndex, decorator) {
1292
+ __name(_ts_metadata11, "_ts_metadata");
1293
+ function _ts_param10(paramIndex, decorator) {
1203
1294
  return function(target, key) {
1204
1295
  decorator(target, key, paramIndex);
1205
1296
  };
1206
1297
  }
1207
- __name(_ts_param9, "_ts_param");
1298
+ __name(_ts_param10, "_ts_param");
1208
1299
  var AiToolDiscoveryService = class _AiToolDiscoveryService {
1209
1300
  static {
1210
1301
  __name(this, "AiToolDiscoveryService");
@@ -1311,13 +1402,13 @@ var AiToolDiscoveryService = class _AiToolDiscoveryService {
1311
1402
  return true;
1312
1403
  }
1313
1404
  };
1314
- AiToolDiscoveryService = _ts_decorate11([
1405
+ AiToolDiscoveryService = _ts_decorate12([
1315
1406
  Injectable6(),
1316
- _ts_param9(1, Inject9(AGENT_TOOL_REGISTRY2)),
1317
- _ts_param9(2, Inject9(AGENT_REGISTRY3)),
1318
- _ts_param9(3, Inject9(AGENT_OPTIONS2)),
1319
- _ts_metadata10("design:type", Function),
1320
- _ts_metadata10("design:paramtypes", [
1407
+ _ts_param10(1, Inject10(AGENT_TOOL_REGISTRY2)),
1408
+ _ts_param10(2, Inject10(AGENT_REGISTRY4)),
1409
+ _ts_param10(3, Inject10(AGENT_OPTIONS2)),
1410
+ _ts_metadata11("design:type", Function),
1411
+ _ts_metadata11("design:paramtypes", [
1321
1412
  typeof DiscoveryService2 === "undefined" ? Object : DiscoveryService2,
1322
1413
  typeof ToolRegistry === "undefined" ? Object : ToolRegistry,
1323
1414
  typeof AgentRegistry === "undefined" ? Object : AgentRegistry,
@@ -1417,25 +1508,25 @@ var LedgerQuotaStore = class {
1417
1508
  };
1418
1509
 
1419
1510
  // src/runner/inline-agent-runner.ts
1420
- import { AGENT_DEPS_FACTORY as AGENT_DEPS_FACTORY3, AGENT_STORE as AGENT_STORE4, QuotaExceededError as QuotaExceededError2, publishAgentRunFailed as publishAgentRunFailed2, runAgentLoop as runAgentLoop2 } from "@dudousxd/nestjs-agent-core";
1421
- import { Inject as Inject10, Injectable as Injectable7, Logger as Logger3 } from "@nestjs/common";
1422
- function _ts_decorate12(decorators, target, key, desc) {
1511
+ import { AGENT_DEPS_FACTORY as AGENT_DEPS_FACTORY4, AGENT_STORE as AGENT_STORE4, QuotaExceededError as QuotaExceededError2, publishAgentRunFailed as publishAgentRunFailed2, runAgentLoop as runAgentLoop2 } from "@dudousxd/nestjs-agent-core";
1512
+ import { Inject as Inject11, Injectable as Injectable7, Logger as Logger3 } from "@nestjs/common";
1513
+ function _ts_decorate13(decorators, target, key, desc) {
1423
1514
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1424
1515
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1425
1516
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1426
1517
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1427
1518
  }
1428
- __name(_ts_decorate12, "_ts_decorate");
1429
- function _ts_metadata11(k, v) {
1519
+ __name(_ts_decorate13, "_ts_decorate");
1520
+ function _ts_metadata12(k, v) {
1430
1521
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1431
1522
  }
1432
- __name(_ts_metadata11, "_ts_metadata");
1433
- function _ts_param10(paramIndex, decorator) {
1523
+ __name(_ts_metadata12, "_ts_metadata");
1524
+ function _ts_param11(paramIndex, decorator) {
1434
1525
  return function(target, key) {
1435
1526
  decorator(target, key, paramIndex);
1436
1527
  };
1437
1528
  }
1438
- __name(_ts_param10, "_ts_param");
1529
+ __name(_ts_param11, "_ts_param");
1439
1530
  var InlineAgentRunner = class _InlineAgentRunner {
1440
1531
  static {
1441
1532
  __name(this, "InlineAgentRunner");
@@ -1536,25 +1627,25 @@ var InlineAgentRunner = class _InlineAgentRunner {
1536
1627
  }, hooks);
1537
1628
  }
1538
1629
  };
1539
- InlineAgentRunner = _ts_decorate12([
1630
+ InlineAgentRunner = _ts_decorate13([
1540
1631
  Injectable7(),
1541
- _ts_param10(0, Inject10(AGENT_DEPS_FACTORY3)),
1542
- _ts_param10(1, Inject10(AGENT_STORE4)),
1543
- _ts_metadata11("design:type", Function),
1544
- _ts_metadata11("design:paramtypes", [
1632
+ _ts_param11(0, Inject11(AGENT_DEPS_FACTORY4)),
1633
+ _ts_param11(1, Inject11(AGENT_STORE4)),
1634
+ _ts_metadata12("design:type", Function),
1635
+ _ts_metadata12("design:paramtypes", [
1545
1636
  typeof AgentDepsFactory === "undefined" ? Object : AgentDepsFactory,
1546
1637
  typeof AgentStore === "undefined" ? Object : AgentStore
1547
1638
  ])
1548
1639
  ], InlineAgentRunner);
1549
1640
 
1550
1641
  // src/agent.module.ts
1551
- function _ts_decorate13(decorators, target, key, desc) {
1642
+ function _ts_decorate14(decorators, target, key, desc) {
1552
1643
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1553
1644
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1554
1645
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1555
1646
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1556
1647
  }
1557
- __name(_ts_decorate13, "_ts_decorate");
1648
+ __name(_ts_decorate14, "_ts_decorate");
1558
1649
  var DEFAULT_PATH = "agent";
1559
1650
  function sharedProviders(durable, includeStore) {
1560
1651
  const providers = [
@@ -1564,8 +1655,8 @@ function sharedProviders(durable, includeStore) {
1564
1655
  },
1565
1656
  // Starts empty; AgentDiscoveryService populates it from `@Agent`-decorated providers at boot.
1566
1657
  {
1567
- provide: AGENT_REGISTRY4,
1568
- useFactory: /* @__PURE__ */ __name(() => new AgentRegistry4(), "useFactory")
1658
+ provide: AGENT_REGISTRY5,
1659
+ useFactory: /* @__PURE__ */ __name(() => new AgentRegistry5(), "useFactory")
1569
1660
  },
1570
1661
  // A shared, mutable list AgentDiscoveryService fills with `@SystemPromptContributor()` methods.
1571
1662
  {
@@ -1613,7 +1704,7 @@ function sharedProviders(durable, includeStore) {
1613
1704
  },
1614
1705
  AgentDepsFactory2,
1615
1706
  {
1616
- provide: AGENT_DEPS_FACTORY4,
1707
+ provide: AGENT_DEPS_FACTORY5,
1617
1708
  useExisting: AgentDepsFactory2
1618
1709
  },
1619
1710
  // Populates the registry + contributors (onModuleInit) BEFORE AiToolDiscoveryService synthesizes
@@ -1661,7 +1752,7 @@ function exportsFor(includeStore) {
1661
1752
  return [
1662
1753
  AGENT_OPTIONS3,
1663
1754
  AGENT_TOOL_REGISTRY3,
1664
- AGENT_REGISTRY4,
1755
+ AGENT_REGISTRY5,
1665
1756
  AGENT_SINK2,
1666
1757
  AGENT_ROLES_POLICY2,
1667
1758
  AGENT_ACTOR_RESOLVER5,
@@ -1671,7 +1762,7 @@ function exportsFor(includeStore) {
1671
1762
  ] : [],
1672
1763
  AGENT_QUOTA_STORE3,
1673
1764
  AGENT_PROMPT_CONTRIBUTORS3,
1674
- AGENT_DEPS_FACTORY4,
1765
+ AGENT_DEPS_FACTORY5,
1675
1766
  AgentDepsFactory2,
1676
1767
  AgentService,
1677
1768
  InlineAgentRunner
@@ -1682,7 +1773,8 @@ var CONTROLLERS = [
1682
1773
  ChatController,
1683
1774
  ThreadsController,
1684
1775
  ToolCallController,
1685
- QuotaController
1776
+ QuotaController,
1777
+ AgentsController
1686
1778
  ];
1687
1779
  function routerFor(path) {
1688
1780
  return RouterModule.register([
@@ -1720,6 +1812,7 @@ var AgentModule = class _AgentModule {
1720
1812
  }
1721
1813
  static forRootAsync(options) {
1722
1814
  const path = options.path ?? DEFAULT_PATH;
1815
+ const includeStore = options.externalStore !== true;
1723
1816
  return {
1724
1817
  module: _AgentModule,
1725
1818
  global: true,
@@ -1735,15 +1828,13 @@ var AgentModule = class _AgentModule {
1735
1828
  useFactory: options.useFactory,
1736
1829
  inject: options.inject ?? []
1737
1830
  },
1738
- // The async factory resolves too late to inspect `store`, so we always bind AGENT_STORE here
1739
- // (its factory reads the resolved options). Omit-and-import-a-store-module is a `forRoot` path.
1740
- ...sharedProviders(options.durable ?? false, true)
1831
+ ...sharedProviders(options.durable ?? false, includeStore)
1741
1832
  ],
1742
- exports: exportsFor(true)
1833
+ exports: exportsFor(includeStore)
1743
1834
  };
1744
1835
  }
1745
1836
  };
1746
- AgentModule = _ts_decorate13([
1837
+ AgentModule = _ts_decorate14([
1747
1838
  Global2(),
1748
1839
  Module2({})
1749
1840
  ], AgentModule);