@copilotkit/runtime 1.1.3-feat-runtime-remote-actions.2 → 1.2.1

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 (75) hide show
  1. package/CHANGELOG.md +17 -13
  2. package/__snapshots__/schema/schema.graphql +0 -41
  3. package/dist/{chunk-BJ2LVHWA.mjs → chunk-736EEICU.mjs} +3 -3
  4. package/dist/{chunk-W7RRKPE2.mjs → chunk-DMO6FA25.mjs} +2 -2
  5. package/dist/{chunk-JYLUCJP7.mjs → chunk-DYF5MUAH.mjs} +2 -2
  6. package/dist/{chunk-TBZGOJJX.mjs → chunk-GEIBJJQ4.mjs} +2 -14
  7. package/dist/chunk-GEIBJJQ4.mjs.map +1 -0
  8. package/dist/chunk-PB24CCIJ.mjs +158 -0
  9. package/dist/chunk-PB24CCIJ.mjs.map +1 -0
  10. package/dist/{chunk-7FSNQXPE.mjs → chunk-Q5ZTE7WH.mjs} +158 -786
  11. package/dist/chunk-Q5ZTE7WH.mjs.map +1 -0
  12. package/dist/{chunk-73NMP3DI.mjs → chunk-URMISMK2.mjs} +2 -2
  13. package/dist/{chunk-WRPRFRSL.mjs → chunk-YMUS43FR.mjs} +2 -2
  14. package/dist/graphql/types/converted/index.d.ts +1 -1
  15. package/dist/graphql/types/converted/index.js +0 -13
  16. package/dist/graphql/types/converted/index.js.map +1 -1
  17. package/dist/graphql/types/converted/index.mjs +1 -3
  18. package/dist/{index-079752b9.d.ts → index-13aa818e.d.ts} +1 -1
  19. package/dist/{index-0476e4f7.d.ts → index-aa091e3c.d.ts} +2 -24
  20. package/dist/index.d.ts +7 -7
  21. package/dist/index.js +245 -982
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +8 -8
  24. package/dist/{langserve-d6073a3b.d.ts → langserve-a54438c6.d.ts} +11 -24
  25. package/dist/lib/index.d.ts +7 -7
  26. package/dist/lib/index.js +245 -982
  27. package/dist/lib/index.js.map +1 -1
  28. package/dist/lib/index.mjs +8 -8
  29. package/dist/lib/integrations/index.d.ts +6 -6
  30. package/dist/lib/integrations/index.js +182 -437
  31. package/dist/lib/integrations/index.js.map +1 -1
  32. package/dist/lib/integrations/index.mjs +6 -6
  33. package/dist/lib/integrations/nest/index.d.ts +5 -5
  34. package/dist/lib/integrations/nest/index.js +182 -437
  35. package/dist/lib/integrations/nest/index.js.map +1 -1
  36. package/dist/lib/integrations/nest/index.mjs +4 -4
  37. package/dist/lib/integrations/node-express/index.d.ts +5 -5
  38. package/dist/lib/integrations/node-express/index.js +182 -437
  39. package/dist/lib/integrations/node-express/index.js.map +1 -1
  40. package/dist/lib/integrations/node-express/index.mjs +4 -4
  41. package/dist/lib/integrations/node-http/index.d.ts +5 -5
  42. package/dist/lib/integrations/node-http/index.js +182 -437
  43. package/dist/lib/integrations/node-http/index.js.map +1 -1
  44. package/dist/lib/integrations/node-http/index.mjs +3 -3
  45. package/dist/service-adapters/index.d.ts +3 -3
  46. package/dist/service-adapters/index.js.map +1 -1
  47. package/dist/service-adapters/index.mjs +3 -3
  48. package/dist/{copilot-runtime-d427e991.d.ts → shared-c5362338.d.ts} +38 -65
  49. package/package.json +5 -7
  50. package/src/graphql/inputs/generate-copilot-response.input.ts +0 -11
  51. package/src/graphql/inputs/message.input.ts +0 -30
  52. package/src/graphql/resolvers/copilot.resolver.ts +12 -56
  53. package/src/graphql/types/converted/index.ts +0 -15
  54. package/src/graphql/types/copilot-response.type.ts +0 -29
  55. package/src/graphql/types/enums.ts +0 -1
  56. package/src/lib/copilot-runtime.ts +231 -0
  57. package/src/lib/index.ts +1 -1
  58. package/src/lib/integrations/shared.ts +1 -1
  59. package/src/service-adapters/conversion.ts +0 -16
  60. package/src/service-adapters/events.ts +19 -101
  61. package/dist/chunk-5TYP4A3G.mjs +0 -260
  62. package/dist/chunk-5TYP4A3G.mjs.map +0 -1
  63. package/dist/chunk-7FSNQXPE.mjs.map +0 -1
  64. package/dist/chunk-TBZGOJJX.mjs.map +0 -1
  65. package/src/agents/langgraph/event-source.ts +0 -222
  66. package/src/agents/langgraph/events.ts +0 -309
  67. package/src/graphql/inputs/agent-session.input.ts +0 -13
  68. package/src/graphql/inputs/agent-state.input.ts +0 -10
  69. package/src/lib/runtime/copilot-runtime.ts +0 -360
  70. package/src/lib/runtime/remote-actions.ts +0 -241
  71. /package/dist/{chunk-BJ2LVHWA.mjs.map → chunk-736EEICU.mjs.map} +0 -0
  72. /package/dist/{chunk-W7RRKPE2.mjs.map → chunk-DMO6FA25.mjs.map} +0 -0
  73. /package/dist/{chunk-JYLUCJP7.mjs.map → chunk-DYF5MUAH.mjs.map} +0 -0
  74. /package/dist/{chunk-73NMP3DI.mjs.map → chunk-URMISMK2.mjs.map} +0 -0
  75. /package/dist/{chunk-WRPRFRSL.mjs.map → chunk-YMUS43FR.mjs.map} +0 -0
@@ -12,11 +12,11 @@ var __export = (target, all) => {
12
12
  for (var name in all)
13
13
  __defProp(target, name, { get: all[name], enumerable: true });
14
14
  };
15
- var __copyProps = (to, from2, except, desc) => {
16
- if (from2 && typeof from2 === "object" || typeof from2 === "function") {
17
- for (let key of __getOwnPropNames(from2))
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
18
  if (!__hasOwnProp.call(to, key) && key !== except)
19
- __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
20
  }
21
21
  return to;
22
22
  };
@@ -44,7 +44,7 @@ var require_package = __commonJS({
44
44
  publishConfig: {
45
45
  access: "public"
46
46
  },
47
- version: "1.1.3-feat-runtime-remote-actions.2",
47
+ version: "1.2.1",
48
48
  sideEffects: false,
49
49
  main: "./dist/index.js",
50
50
  module: "./dist/index.mjs",
@@ -59,9 +59,7 @@ var require_package = __commonJS({
59
59
  test: "jest --passWithNoTests",
60
60
  "check-types": "tsc --noEmit",
61
61
  clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next && rm -rf __snapshots__",
62
- "generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts",
63
- "link:global": "pnpm link --global",
64
- "unlink:global": "pnpm unlink --global"
62
+ "generate-graphql-schema": "rm -rf __snapshots__ && ts-node ./scripts/generate-gql-schema.ts"
65
63
  },
66
64
  devDependencies: {
67
65
  "@swc/core": "1.5.28",
@@ -126,14 +124,14 @@ module.exports = __toCommonJS(node_http_exports);
126
124
  var import_graphql_yoga2 = require("graphql-yoga");
127
125
 
128
126
  // src/lib/integrations/shared.ts
129
- var import_type_graphql16 = require("type-graphql");
127
+ var import_type_graphql14 = require("type-graphql");
130
128
 
131
129
  // src/graphql/resolvers/copilot.resolver.ts
132
- var import_type_graphql15 = require("type-graphql");
130
+ var import_type_graphql13 = require("type-graphql");
133
131
  var import_rxjs2 = require("rxjs");
134
132
 
135
133
  // src/graphql/inputs/generate-copilot-response.input.ts
136
- var import_type_graphql11 = require("type-graphql");
134
+ var import_type_graphql9 = require("type-graphql");
137
135
 
138
136
  // src/graphql/inputs/message.input.ts
139
137
  var import_type_graphql3 = require("type-graphql");
@@ -150,7 +148,6 @@ var ActionExecutionScope;
150
148
  (function(ActionExecutionScope2) {
151
149
  ActionExecutionScope2["server"] = "server";
152
150
  ActionExecutionScope2["client"] = "client";
153
- ActionExecutionScope2["passThrough"] = "passThrough";
154
151
  })(ActionExecutionScope || (ActionExecutionScope = {}));
155
152
  var CopilotRequestType;
156
153
  (function(CopilotRequestType2) {
@@ -229,7 +226,6 @@ var MessageInput = class extends BaseMessage {
229
226
  textMessage;
230
227
  actionExecutionMessage;
231
228
  resultMessage;
232
- agentStateMessage;
233
229
  };
234
230
  __name(MessageInput, "MessageInput");
235
231
  _ts_decorate2([
@@ -250,12 +246,6 @@ _ts_decorate2([
250
246
  }),
251
247
  _ts_metadata2("design:type", typeof ResultMessageInput === "undefined" ? Object : ResultMessageInput)
252
248
  ], MessageInput.prototype, "resultMessage", void 0);
253
- _ts_decorate2([
254
- (0, import_type_graphql3.Field)(() => AgentStateMessageInput, {
255
- nullable: true
256
- }),
257
- _ts_metadata2("design:type", typeof AgentStateMessageInput === "undefined" ? Object : AgentStateMessageInput)
258
- ], MessageInput.prototype, "agentStateMessage", void 0);
259
249
  MessageInput = _ts_decorate2([
260
250
  (0, import_type_graphql3.InputType)()
261
251
  ], MessageInput);
@@ -317,52 +307,6 @@ _ts_decorate2([
317
307
  ResultMessageInput = _ts_decorate2([
318
308
  (0, import_type_graphql3.InputType)()
319
309
  ], ResultMessageInput);
320
- var AgentStateMessageInput = class {
321
- threadId;
322
- agentName;
323
- role;
324
- state;
325
- running;
326
- nodeName;
327
- runId;
328
- active;
329
- };
330
- __name(AgentStateMessageInput, "AgentStateMessageInput");
331
- _ts_decorate2([
332
- (0, import_type_graphql3.Field)(() => String),
333
- _ts_metadata2("design:type", String)
334
- ], AgentStateMessageInput.prototype, "threadId", void 0);
335
- _ts_decorate2([
336
- (0, import_type_graphql3.Field)(() => String),
337
- _ts_metadata2("design:type", String)
338
- ], AgentStateMessageInput.prototype, "agentName", void 0);
339
- _ts_decorate2([
340
- (0, import_type_graphql3.Field)(() => MessageRole),
341
- _ts_metadata2("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
342
- ], AgentStateMessageInput.prototype, "role", void 0);
343
- _ts_decorate2([
344
- (0, import_type_graphql3.Field)(() => String),
345
- _ts_metadata2("design:type", String)
346
- ], AgentStateMessageInput.prototype, "state", void 0);
347
- _ts_decorate2([
348
- (0, import_type_graphql3.Field)(() => Boolean),
349
- _ts_metadata2("design:type", Boolean)
350
- ], AgentStateMessageInput.prototype, "running", void 0);
351
- _ts_decorate2([
352
- (0, import_type_graphql3.Field)(() => String),
353
- _ts_metadata2("design:type", String)
354
- ], AgentStateMessageInput.prototype, "nodeName", void 0);
355
- _ts_decorate2([
356
- (0, import_type_graphql3.Field)(() => String),
357
- _ts_metadata2("design:type", String)
358
- ], AgentStateMessageInput.prototype, "runId", void 0);
359
- _ts_decorate2([
360
- (0, import_type_graphql3.Field)(() => Boolean),
361
- _ts_metadata2("design:type", Boolean)
362
- ], AgentStateMessageInput.prototype, "active", void 0);
363
- AgentStateMessageInput = _ts_decorate2([
364
- (0, import_type_graphql3.InputType)()
365
- ], AgentStateMessageInput);
366
310
 
367
311
  // src/graphql/inputs/frontend.input.ts
368
312
  var import_type_graphql5 = require("type-graphql");
@@ -604,8 +548,7 @@ ForwardedParametersInput = _ts_decorate7([
604
548
  (0, import_type_graphql8.InputType)()
605
549
  ], ForwardedParametersInput);
606
550
 
607
- // src/graphql/inputs/agent-session.input.ts
608
- var import_type_graphql9 = require("type-graphql");
551
+ // src/graphql/inputs/generate-copilot-response.input.ts
609
552
  function _ts_decorate8(decorators, target, key, desc) {
610
553
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
611
554
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -622,96 +565,18 @@ function _ts_metadata8(k, v) {
622
565
  return Reflect.metadata(k, v);
623
566
  }
624
567
  __name(_ts_metadata8, "_ts_metadata");
625
- var AgentSessionInput = class {
626
- agentName;
627
- threadId;
628
- nodeName;
629
- };
630
- __name(AgentSessionInput, "AgentSessionInput");
631
- _ts_decorate8([
632
- (0, import_type_graphql9.Field)(() => String),
633
- _ts_metadata8("design:type", String)
634
- ], AgentSessionInput.prototype, "agentName", void 0);
635
- _ts_decorate8([
636
- (0, import_type_graphql9.Field)(() => String, {
637
- nullable: true
638
- }),
639
- _ts_metadata8("design:type", String)
640
- ], AgentSessionInput.prototype, "threadId", void 0);
641
- _ts_decorate8([
642
- (0, import_type_graphql9.Field)(() => String, {
643
- nullable: true
644
- }),
645
- _ts_metadata8("design:type", String)
646
- ], AgentSessionInput.prototype, "nodeName", void 0);
647
- AgentSessionInput = _ts_decorate8([
648
- (0, import_type_graphql9.InputType)()
649
- ], AgentSessionInput);
650
-
651
- // src/graphql/inputs/agent-state.input.ts
652
- var import_type_graphql10 = require("type-graphql");
653
- function _ts_decorate9(decorators, target, key, desc) {
654
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
655
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
656
- r = Reflect.decorate(decorators, target, key, desc);
657
- else
658
- for (var i = decorators.length - 1; i >= 0; i--)
659
- if (d = decorators[i])
660
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
661
- return c > 3 && r && Object.defineProperty(target, key, r), r;
662
- }
663
- __name(_ts_decorate9, "_ts_decorate");
664
- function _ts_metadata9(k, v) {
665
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
666
- return Reflect.metadata(k, v);
667
- }
668
- __name(_ts_metadata9, "_ts_metadata");
669
- var AgentStateInput = class {
670
- agentName;
671
- state;
672
- };
673
- __name(AgentStateInput, "AgentStateInput");
674
- _ts_decorate9([
675
- (0, import_type_graphql10.Field)(() => String),
676
- _ts_metadata9("design:type", String)
677
- ], AgentStateInput.prototype, "agentName", void 0);
678
- _ts_decorate9([
679
- (0, import_type_graphql10.Field)(() => String),
680
- _ts_metadata9("design:type", String)
681
- ], AgentStateInput.prototype, "state", void 0);
682
- AgentStateInput = _ts_decorate9([
683
- (0, import_type_graphql10.InputType)()
684
- ], AgentStateInput);
685
-
686
- // src/graphql/inputs/generate-copilot-response.input.ts
687
- function _ts_decorate10(decorators, target, key, desc) {
688
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
689
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
690
- r = Reflect.decorate(decorators, target, key, desc);
691
- else
692
- for (var i = decorators.length - 1; i >= 0; i--)
693
- if (d = decorators[i])
694
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
695
- return c > 3 && r && Object.defineProperty(target, key, r), r;
696
- }
697
- __name(_ts_decorate10, "_ts_decorate");
698
- function _ts_metadata10(k, v) {
699
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
700
- return Reflect.metadata(k, v);
701
- }
702
- __name(_ts_metadata10, "_ts_metadata");
703
568
  var GenerateCopilotResponseMetadataInput = class {
704
569
  requestType;
705
570
  };
706
571
  __name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
707
- _ts_decorate10([
708
- (0, import_type_graphql11.Field)(() => CopilotRequestType, {
572
+ _ts_decorate8([
573
+ (0, import_type_graphql9.Field)(() => CopilotRequestType, {
709
574
  nullable: true
710
575
  }),
711
- _ts_metadata10("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
576
+ _ts_metadata8("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
712
577
  ], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
713
- GenerateCopilotResponseMetadataInput = _ts_decorate10([
714
- (0, import_type_graphql11.InputType)()
578
+ GenerateCopilotResponseMetadataInput = _ts_decorate8([
579
+ (0, import_type_graphql9.InputType)()
715
580
  ], GenerateCopilotResponseMetadataInput);
716
581
  var GenerateCopilotResponseInput = class {
717
582
  metadata;
@@ -721,81 +586,58 @@ var GenerateCopilotResponseInput = class {
721
586
  frontend;
722
587
  cloud;
723
588
  forwardedParameters;
724
- agentSession;
725
- agentState;
726
- agentStates;
727
589
  };
728
590
  __name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
729
- _ts_decorate10([
730
- (0, import_type_graphql11.Field)(() => GenerateCopilotResponseMetadataInput, {
591
+ _ts_decorate8([
592
+ (0, import_type_graphql9.Field)(() => GenerateCopilotResponseMetadataInput, {
731
593
  nullable: false
732
594
  }),
733
- _ts_metadata10("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
595
+ _ts_metadata8("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
734
596
  ], GenerateCopilotResponseInput.prototype, "metadata", void 0);
735
- _ts_decorate10([
736
- (0, import_type_graphql11.Field)(() => String, {
597
+ _ts_decorate8([
598
+ (0, import_type_graphql9.Field)(() => String, {
737
599
  nullable: true
738
600
  }),
739
- _ts_metadata10("design:type", String)
601
+ _ts_metadata8("design:type", String)
740
602
  ], GenerateCopilotResponseInput.prototype, "threadId", void 0);
741
- _ts_decorate10([
742
- (0, import_type_graphql11.Field)(() => String, {
603
+ _ts_decorate8([
604
+ (0, import_type_graphql9.Field)(() => String, {
743
605
  nullable: true
744
606
  }),
745
- _ts_metadata10("design:type", String)
607
+ _ts_metadata8("design:type", String)
746
608
  ], GenerateCopilotResponseInput.prototype, "runId", void 0);
747
- _ts_decorate10([
748
- (0, import_type_graphql11.Field)(() => [
609
+ _ts_decorate8([
610
+ (0, import_type_graphql9.Field)(() => [
749
611
  MessageInput
750
612
  ]),
751
- _ts_metadata10("design:type", Array)
613
+ _ts_metadata8("design:type", Array)
752
614
  ], GenerateCopilotResponseInput.prototype, "messages", void 0);
753
- _ts_decorate10([
754
- (0, import_type_graphql11.Field)(() => FrontendInput),
755
- _ts_metadata10("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
615
+ _ts_decorate8([
616
+ (0, import_type_graphql9.Field)(() => FrontendInput),
617
+ _ts_metadata8("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
756
618
  ], GenerateCopilotResponseInput.prototype, "frontend", void 0);
757
- _ts_decorate10([
758
- (0, import_type_graphql11.Field)(() => CloudInput, {
619
+ _ts_decorate8([
620
+ (0, import_type_graphql9.Field)(() => CloudInput, {
759
621
  nullable: true
760
622
  }),
761
- _ts_metadata10("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
623
+ _ts_metadata8("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
762
624
  ], GenerateCopilotResponseInput.prototype, "cloud", void 0);
763
- _ts_decorate10([
764
- (0, import_type_graphql11.Field)(() => ForwardedParametersInput, {
625
+ _ts_decorate8([
626
+ (0, import_type_graphql9.Field)(() => ForwardedParametersInput, {
765
627
  nullable: true
766
628
  }),
767
- _ts_metadata10("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
629
+ _ts_metadata8("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
768
630
  ], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
769
- _ts_decorate10([
770
- (0, import_type_graphql11.Field)(() => AgentSessionInput, {
771
- nullable: true
772
- }),
773
- _ts_metadata10("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
774
- ], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
775
- _ts_decorate10([
776
- (0, import_type_graphql11.Field)(() => AgentStateInput, {
777
- nullable: true
778
- }),
779
- _ts_metadata10("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
780
- ], GenerateCopilotResponseInput.prototype, "agentState", void 0);
781
- _ts_decorate10([
782
- (0, import_type_graphql11.Field)(() => [
783
- AgentStateInput
784
- ], {
785
- nullable: true
786
- }),
787
- _ts_metadata10("design:type", Array)
788
- ], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
789
- GenerateCopilotResponseInput = _ts_decorate10([
790
- (0, import_type_graphql11.InputType)()
631
+ GenerateCopilotResponseInput = _ts_decorate8([
632
+ (0, import_type_graphql9.InputType)()
791
633
  ], GenerateCopilotResponseInput);
792
634
 
793
635
  // src/graphql/types/copilot-response.type.ts
794
- var import_type_graphql14 = require("type-graphql");
636
+ var import_type_graphql12 = require("type-graphql");
795
637
 
796
638
  // src/graphql/types/message-status.type.ts
797
- var import_type_graphql12 = require("type-graphql");
798
- function _ts_decorate11(decorators, target, key, desc) {
639
+ var import_type_graphql10 = require("type-graphql");
640
+ function _ts_decorate9(decorators, target, key, desc) {
799
641
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
800
642
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
801
643
  r = Reflect.decorate(decorators, target, key, desc);
@@ -805,58 +647,58 @@ function _ts_decorate11(decorators, target, key, desc) {
805
647
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
806
648
  return c > 3 && r && Object.defineProperty(target, key, r), r;
807
649
  }
808
- __name(_ts_decorate11, "_ts_decorate");
809
- function _ts_metadata11(k, v) {
650
+ __name(_ts_decorate9, "_ts_decorate");
651
+ function _ts_metadata9(k, v) {
810
652
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
811
653
  return Reflect.metadata(k, v);
812
654
  }
813
- __name(_ts_metadata11, "_ts_metadata");
655
+ __name(_ts_metadata9, "_ts_metadata");
814
656
  var MessageStatusCode;
815
657
  (function(MessageStatusCode2) {
816
658
  MessageStatusCode2["Pending"] = "pending";
817
659
  MessageStatusCode2["Success"] = "success";
818
660
  MessageStatusCode2["Failed"] = "failed";
819
661
  })(MessageStatusCode || (MessageStatusCode = {}));
820
- (0, import_type_graphql12.registerEnumType)(MessageStatusCode, {
662
+ (0, import_type_graphql10.registerEnumType)(MessageStatusCode, {
821
663
  name: "MessageStatusCode"
822
664
  });
823
665
  var BaseMessageStatus = /* @__PURE__ */ __name(class BaseMessageStatus2 {
824
666
  code;
825
667
  }, "BaseMessageStatus");
826
- _ts_decorate11([
827
- (0, import_type_graphql12.Field)(() => MessageStatusCode),
828
- _ts_metadata11("design:type", String)
668
+ _ts_decorate9([
669
+ (0, import_type_graphql10.Field)(() => MessageStatusCode),
670
+ _ts_metadata9("design:type", String)
829
671
  ], BaseMessageStatus.prototype, "code", void 0);
830
- BaseMessageStatus = _ts_decorate11([
831
- (0, import_type_graphql12.ObjectType)()
672
+ BaseMessageStatus = _ts_decorate9([
673
+ (0, import_type_graphql10.ObjectType)()
832
674
  ], BaseMessageStatus);
833
675
  var PendingMessageStatus = class extends BaseMessageStatus {
834
676
  code = "pending";
835
677
  };
836
678
  __name(PendingMessageStatus, "PendingMessageStatus");
837
- PendingMessageStatus = _ts_decorate11([
838
- (0, import_type_graphql12.ObjectType)()
679
+ PendingMessageStatus = _ts_decorate9([
680
+ (0, import_type_graphql10.ObjectType)()
839
681
  ], PendingMessageStatus);
840
682
  var SuccessMessageStatus = class extends BaseMessageStatus {
841
683
  code = "success";
842
684
  };
843
685
  __name(SuccessMessageStatus, "SuccessMessageStatus");
844
- SuccessMessageStatus = _ts_decorate11([
845
- (0, import_type_graphql12.ObjectType)()
686
+ SuccessMessageStatus = _ts_decorate9([
687
+ (0, import_type_graphql10.ObjectType)()
846
688
  ], SuccessMessageStatus);
847
689
  var FailedMessageStatus = class extends BaseMessageStatus {
848
690
  code = "failed";
849
691
  reason;
850
692
  };
851
693
  __name(FailedMessageStatus, "FailedMessageStatus");
852
- _ts_decorate11([
853
- (0, import_type_graphql12.Field)(() => String),
854
- _ts_metadata11("design:type", String)
694
+ _ts_decorate9([
695
+ (0, import_type_graphql10.Field)(() => String),
696
+ _ts_metadata9("design:type", String)
855
697
  ], FailedMessageStatus.prototype, "reason", void 0);
856
- FailedMessageStatus = _ts_decorate11([
857
- (0, import_type_graphql12.ObjectType)()
698
+ FailedMessageStatus = _ts_decorate9([
699
+ (0, import_type_graphql10.ObjectType)()
858
700
  ], FailedMessageStatus);
859
- var MessageStatusUnion = (0, import_type_graphql12.createUnionType)({
701
+ var MessageStatusUnion = (0, import_type_graphql10.createUnionType)({
860
702
  name: "MessageStatus",
861
703
  types: () => [
862
704
  PendingMessageStatus,
@@ -867,8 +709,8 @@ var MessageStatusUnion = (0, import_type_graphql12.createUnionType)({
867
709
 
868
710
  // src/graphql/types/response-status.type.ts
869
711
  var import_graphql_scalars = require("graphql-scalars");
870
- var import_type_graphql13 = require("type-graphql");
871
- function _ts_decorate12(decorators, target, key, desc) {
712
+ var import_type_graphql11 = require("type-graphql");
713
+ function _ts_decorate10(decorators, target, key, desc) {
872
714
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
873
715
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
874
716
  r = Reflect.decorate(decorators, target, key, desc);
@@ -878,30 +720,30 @@ function _ts_decorate12(decorators, target, key, desc) {
878
720
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
879
721
  return c > 3 && r && Object.defineProperty(target, key, r), r;
880
722
  }
881
- __name(_ts_decorate12, "_ts_decorate");
882
- function _ts_metadata12(k, v) {
723
+ __name(_ts_decorate10, "_ts_decorate");
724
+ function _ts_metadata10(k, v) {
883
725
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
884
726
  return Reflect.metadata(k, v);
885
727
  }
886
- __name(_ts_metadata12, "_ts_metadata");
728
+ __name(_ts_metadata10, "_ts_metadata");
887
729
  var ResponseStatusCode;
888
730
  (function(ResponseStatusCode2) {
889
731
  ResponseStatusCode2["Pending"] = "pending";
890
732
  ResponseStatusCode2["Success"] = "success";
891
733
  ResponseStatusCode2["Failed"] = "failed";
892
734
  })(ResponseStatusCode || (ResponseStatusCode = {}));
893
- (0, import_type_graphql13.registerEnumType)(ResponseStatusCode, {
735
+ (0, import_type_graphql11.registerEnumType)(ResponseStatusCode, {
894
736
  name: "ResponseStatusCode"
895
737
  });
896
738
  var BaseResponseStatus = /* @__PURE__ */ __name(class BaseResponseStatus2 {
897
739
  code;
898
740
  }, "BaseResponseStatus");
899
- _ts_decorate12([
900
- (0, import_type_graphql13.Field)(() => ResponseStatusCode),
901
- _ts_metadata12("design:type", String)
741
+ _ts_decorate10([
742
+ (0, import_type_graphql11.Field)(() => ResponseStatusCode),
743
+ _ts_metadata10("design:type", String)
902
744
  ], BaseResponseStatus.prototype, "code", void 0);
903
- BaseResponseStatus = _ts_decorate12([
904
- (0, import_type_graphql13.InterfaceType)({
745
+ BaseResponseStatus = _ts_decorate10([
746
+ (0, import_type_graphql11.InterfaceType)({
905
747
  resolveType(value) {
906
748
  if (value.code === "success") {
907
749
  return SuccessResponseStatus;
@@ -913,14 +755,14 @@ BaseResponseStatus = _ts_decorate12([
913
755
  return void 0;
914
756
  }
915
757
  }),
916
- (0, import_type_graphql13.ObjectType)()
758
+ (0, import_type_graphql11.ObjectType)()
917
759
  ], BaseResponseStatus);
918
760
  var PendingResponseStatus = class extends BaseResponseStatus {
919
761
  code = "pending";
920
762
  };
921
763
  __name(PendingResponseStatus, "PendingResponseStatus");
922
- PendingResponseStatus = _ts_decorate12([
923
- (0, import_type_graphql13.ObjectType)({
764
+ PendingResponseStatus = _ts_decorate10([
765
+ (0, import_type_graphql11.ObjectType)({
924
766
  implements: BaseResponseStatus
925
767
  })
926
768
  ], PendingResponseStatus);
@@ -928,8 +770,8 @@ var SuccessResponseStatus = class extends BaseResponseStatus {
928
770
  code = "success";
929
771
  };
930
772
  __name(SuccessResponseStatus, "SuccessResponseStatus");
931
- SuccessResponseStatus = _ts_decorate12([
932
- (0, import_type_graphql13.ObjectType)({
773
+ SuccessResponseStatus = _ts_decorate10([
774
+ (0, import_type_graphql11.ObjectType)({
933
775
  implements: BaseResponseStatus
934
776
  })
935
777
  ], SuccessResponseStatus);
@@ -939,7 +781,7 @@ var FailedResponseStatusReason;
939
781
  FailedResponseStatusReason2["MESSAGE_STREAM_INTERRUPTED"] = "MESSAGE_STREAM_INTERRUPTED";
940
782
  FailedResponseStatusReason2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
941
783
  })(FailedResponseStatusReason || (FailedResponseStatusReason = {}));
942
- (0, import_type_graphql13.registerEnumType)(FailedResponseStatusReason, {
784
+ (0, import_type_graphql11.registerEnumType)(FailedResponseStatusReason, {
943
785
  name: "FailedResponseStatusReason"
944
786
  });
945
787
  var FailedResponseStatus = class extends BaseResponseStatus {
@@ -948,22 +790,22 @@ var FailedResponseStatus = class extends BaseResponseStatus {
948
790
  details = null;
949
791
  };
950
792
  __name(FailedResponseStatus, "FailedResponseStatus");
951
- _ts_decorate12([
952
- (0, import_type_graphql13.Field)(() => FailedResponseStatusReason),
953
- _ts_metadata12("design:type", String)
793
+ _ts_decorate10([
794
+ (0, import_type_graphql11.Field)(() => FailedResponseStatusReason),
795
+ _ts_metadata10("design:type", String)
954
796
  ], FailedResponseStatus.prototype, "reason", void 0);
955
- _ts_decorate12([
956
- (0, import_type_graphql13.Field)(() => import_graphql_scalars.GraphQLJSON, {
797
+ _ts_decorate10([
798
+ (0, import_type_graphql11.Field)(() => import_graphql_scalars.GraphQLJSON, {
957
799
  nullable: true
958
800
  }),
959
- _ts_metadata12("design:type", typeof Record === "undefined" ? Object : Record)
801
+ _ts_metadata10("design:type", typeof Record === "undefined" ? Object : Record)
960
802
  ], FailedResponseStatus.prototype, "details", void 0);
961
- FailedResponseStatus = _ts_decorate12([
962
- (0, import_type_graphql13.ObjectType)({
803
+ FailedResponseStatus = _ts_decorate10([
804
+ (0, import_type_graphql11.ObjectType)({
963
805
  implements: BaseResponseStatus
964
806
  })
965
807
  ], FailedResponseStatus);
966
- var ResponseStatusUnion = (0, import_type_graphql13.createUnionType)({
808
+ var ResponseStatusUnion = (0, import_type_graphql11.createUnionType)({
967
809
  name: "ResponseStatus",
968
810
  types: () => [
969
811
  PendingResponseStatus,
@@ -973,7 +815,7 @@ var ResponseStatusUnion = (0, import_type_graphql13.createUnionType)({
973
815
  });
974
816
 
975
817
  // src/graphql/types/copilot-response.type.ts
976
- function _ts_decorate13(decorators, target, key, desc) {
818
+ function _ts_decorate11(decorators, target, key, desc) {
977
819
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
978
820
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
979
821
  r = Reflect.decorate(decorators, target, key, desc);
@@ -983,31 +825,31 @@ function _ts_decorate13(decorators, target, key, desc) {
983
825
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
984
826
  return c > 3 && r && Object.defineProperty(target, key, r), r;
985
827
  }
986
- __name(_ts_decorate13, "_ts_decorate");
987
- function _ts_metadata13(k, v) {
828
+ __name(_ts_decorate11, "_ts_decorate");
829
+ function _ts_metadata11(k, v) {
988
830
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
989
831
  return Reflect.metadata(k, v);
990
832
  }
991
- __name(_ts_metadata13, "_ts_metadata");
833
+ __name(_ts_metadata11, "_ts_metadata");
992
834
  var BaseMessageOutput = /* @__PURE__ */ __name(class BaseMessageOutput2 {
993
835
  id;
994
836
  createdAt;
995
837
  status;
996
838
  }, "BaseMessageOutput");
997
- _ts_decorate13([
998
- (0, import_type_graphql14.Field)(() => String),
999
- _ts_metadata13("design:type", String)
839
+ _ts_decorate11([
840
+ (0, import_type_graphql12.Field)(() => String),
841
+ _ts_metadata11("design:type", String)
1000
842
  ], BaseMessageOutput.prototype, "id", void 0);
1001
- _ts_decorate13([
1002
- (0, import_type_graphql14.Field)(() => Date),
1003
- _ts_metadata13("design:type", typeof Date === "undefined" ? Object : Date)
843
+ _ts_decorate11([
844
+ (0, import_type_graphql12.Field)(() => Date),
845
+ _ts_metadata11("design:type", typeof Date === "undefined" ? Object : Date)
1004
846
  ], BaseMessageOutput.prototype, "createdAt", void 0);
1005
- _ts_decorate13([
1006
- (0, import_type_graphql14.Field)(() => MessageStatusUnion),
1007
- _ts_metadata13("design:type", Object)
847
+ _ts_decorate11([
848
+ (0, import_type_graphql12.Field)(() => MessageStatusUnion),
849
+ _ts_metadata11("design:type", Object)
1008
850
  ], BaseMessageOutput.prototype, "status", void 0);
1009
- BaseMessageOutput = _ts_decorate13([
1010
- (0, import_type_graphql14.InterfaceType)({
851
+ BaseMessageOutput = _ts_decorate11([
852
+ (0, import_type_graphql12.InterfaceType)({
1011
853
  resolveType(value) {
1012
854
  if (value.hasOwnProperty("content")) {
1013
855
  return TextMessageOutput;
@@ -1015,8 +857,6 @@ BaseMessageOutput = _ts_decorate13([
1015
857
  return ActionExecutionMessageOutput;
1016
858
  } else if (value.hasOwnProperty("result")) {
1017
859
  return ResultMessageOutput;
1018
- } else if (value.hasOwnProperty("state")) {
1019
- return AgentStateMessageOutput;
1020
860
  }
1021
861
  return void 0;
1022
862
  }
@@ -1027,18 +867,18 @@ var TextMessageOutput = class {
1027
867
  content;
1028
868
  };
1029
869
  __name(TextMessageOutput, "TextMessageOutput");
1030
- _ts_decorate13([
1031
- (0, import_type_graphql14.Field)(() => MessageRole),
1032
- _ts_metadata13("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
870
+ _ts_decorate11([
871
+ (0, import_type_graphql12.Field)(() => MessageRole),
872
+ _ts_metadata11("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1033
873
  ], TextMessageOutput.prototype, "role", void 0);
1034
- _ts_decorate13([
1035
- (0, import_type_graphql14.Field)(() => [
874
+ _ts_decorate11([
875
+ (0, import_type_graphql12.Field)(() => [
1036
876
  String
1037
877
  ]),
1038
- _ts_metadata13("design:type", Array)
878
+ _ts_metadata11("design:type", Array)
1039
879
  ], TextMessageOutput.prototype, "content", void 0);
1040
- TextMessageOutput = _ts_decorate13([
1041
- (0, import_type_graphql14.ObjectType)({
880
+ TextMessageOutput = _ts_decorate11([
881
+ (0, import_type_graphql12.ObjectType)({
1042
882
  implements: BaseMessageOutput
1043
883
  })
1044
884
  ], TextMessageOutput);
@@ -1048,22 +888,22 @@ var ActionExecutionMessageOutput = class {
1048
888
  arguments;
1049
889
  };
1050
890
  __name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput");
1051
- _ts_decorate13([
1052
- (0, import_type_graphql14.Field)(() => String),
1053
- _ts_metadata13("design:type", String)
891
+ _ts_decorate11([
892
+ (0, import_type_graphql12.Field)(() => String),
893
+ _ts_metadata11("design:type", String)
1054
894
  ], ActionExecutionMessageOutput.prototype, "name", void 0);
1055
- _ts_decorate13([
1056
- (0, import_type_graphql14.Field)(() => ActionExecutionScope),
1057
- _ts_metadata13("design:type", typeof ActionExecutionScope === "undefined" ? Object : ActionExecutionScope)
895
+ _ts_decorate11([
896
+ (0, import_type_graphql12.Field)(() => ActionExecutionScope),
897
+ _ts_metadata11("design:type", typeof ActionExecutionScope === "undefined" ? Object : ActionExecutionScope)
1058
898
  ], ActionExecutionMessageOutput.prototype, "scope", void 0);
1059
- _ts_decorate13([
1060
- (0, import_type_graphql14.Field)(() => [
899
+ _ts_decorate11([
900
+ (0, import_type_graphql12.Field)(() => [
1061
901
  String
1062
902
  ]),
1063
- _ts_metadata13("design:type", Array)
903
+ _ts_metadata11("design:type", Array)
1064
904
  ], ActionExecutionMessageOutput.prototype, "arguments", void 0);
1065
- ActionExecutionMessageOutput = _ts_decorate13([
1066
- (0, import_type_graphql14.ObjectType)({
905
+ ActionExecutionMessageOutput = _ts_decorate11([
906
+ (0, import_type_graphql12.ObjectType)({
1067
907
  implements: BaseMessageOutput
1068
908
  })
1069
909
  ], ActionExecutionMessageOutput);
@@ -1073,71 +913,23 @@ var ResultMessageOutput = class {
1073
913
  result;
1074
914
  };
1075
915
  __name(ResultMessageOutput, "ResultMessageOutput");
1076
- _ts_decorate13([
1077
- (0, import_type_graphql14.Field)(() => String),
1078
- _ts_metadata13("design:type", String)
916
+ _ts_decorate11([
917
+ (0, import_type_graphql12.Field)(() => String),
918
+ _ts_metadata11("design:type", String)
1079
919
  ], ResultMessageOutput.prototype, "actionExecutionId", void 0);
1080
- _ts_decorate13([
1081
- (0, import_type_graphql14.Field)(() => String),
1082
- _ts_metadata13("design:type", String)
920
+ _ts_decorate11([
921
+ (0, import_type_graphql12.Field)(() => String),
922
+ _ts_metadata11("design:type", String)
1083
923
  ], ResultMessageOutput.prototype, "actionName", void 0);
1084
- _ts_decorate13([
1085
- (0, import_type_graphql14.Field)(() => String),
1086
- _ts_metadata13("design:type", String)
924
+ _ts_decorate11([
925
+ (0, import_type_graphql12.Field)(() => String),
926
+ _ts_metadata11("design:type", String)
1087
927
  ], ResultMessageOutput.prototype, "result", void 0);
1088
- ResultMessageOutput = _ts_decorate13([
1089
- (0, import_type_graphql14.ObjectType)({
928
+ ResultMessageOutput = _ts_decorate11([
929
+ (0, import_type_graphql12.ObjectType)({
1090
930
  implements: BaseMessageOutput
1091
931
  })
1092
932
  ], ResultMessageOutput);
1093
- var AgentStateMessageOutput = class {
1094
- threadId;
1095
- agentName;
1096
- nodeName;
1097
- runId;
1098
- active;
1099
- role;
1100
- state;
1101
- running;
1102
- };
1103
- __name(AgentStateMessageOutput, "AgentStateMessageOutput");
1104
- _ts_decorate13([
1105
- (0, import_type_graphql14.Field)(() => String),
1106
- _ts_metadata13("design:type", String)
1107
- ], AgentStateMessageOutput.prototype, "threadId", void 0);
1108
- _ts_decorate13([
1109
- (0, import_type_graphql14.Field)(() => String),
1110
- _ts_metadata13("design:type", String)
1111
- ], AgentStateMessageOutput.prototype, "agentName", void 0);
1112
- _ts_decorate13([
1113
- (0, import_type_graphql14.Field)(() => String),
1114
- _ts_metadata13("design:type", String)
1115
- ], AgentStateMessageOutput.prototype, "nodeName", void 0);
1116
- _ts_decorate13([
1117
- (0, import_type_graphql14.Field)(() => String),
1118
- _ts_metadata13("design:type", String)
1119
- ], AgentStateMessageOutput.prototype, "runId", void 0);
1120
- _ts_decorate13([
1121
- (0, import_type_graphql14.Field)(() => Boolean),
1122
- _ts_metadata13("design:type", Boolean)
1123
- ], AgentStateMessageOutput.prototype, "active", void 0);
1124
- _ts_decorate13([
1125
- (0, import_type_graphql14.Field)(() => MessageRole),
1126
- _ts_metadata13("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1127
- ], AgentStateMessageOutput.prototype, "role", void 0);
1128
- _ts_decorate13([
1129
- (0, import_type_graphql14.Field)(() => String),
1130
- _ts_metadata13("design:type", String)
1131
- ], AgentStateMessageOutput.prototype, "state", void 0);
1132
- _ts_decorate13([
1133
- (0, import_type_graphql14.Field)(() => Boolean),
1134
- _ts_metadata13("design:type", Boolean)
1135
- ], AgentStateMessageOutput.prototype, "running", void 0);
1136
- AgentStateMessageOutput = _ts_decorate13([
1137
- (0, import_type_graphql14.ObjectType)({
1138
- implements: BaseMessageOutput
1139
- })
1140
- ], AgentStateMessageOutput);
1141
933
  var CopilotResponse = class {
1142
934
  threadId;
1143
935
  status;
@@ -1145,28 +937,28 @@ var CopilotResponse = class {
1145
937
  messages;
1146
938
  };
1147
939
  __name(CopilotResponse, "CopilotResponse");
1148
- _ts_decorate13([
1149
- (0, import_type_graphql14.Field)(() => String),
1150
- _ts_metadata13("design:type", String)
940
+ _ts_decorate11([
941
+ (0, import_type_graphql12.Field)(() => String),
942
+ _ts_metadata11("design:type", String)
1151
943
  ], CopilotResponse.prototype, "threadId", void 0);
1152
- _ts_decorate13([
1153
- (0, import_type_graphql14.Field)(() => ResponseStatusUnion),
1154
- _ts_metadata13("design:type", Object)
944
+ _ts_decorate11([
945
+ (0, import_type_graphql12.Field)(() => ResponseStatusUnion),
946
+ _ts_metadata11("design:type", Object)
1155
947
  ], CopilotResponse.prototype, "status", void 0);
1156
- _ts_decorate13([
1157
- (0, import_type_graphql14.Field)({
948
+ _ts_decorate11([
949
+ (0, import_type_graphql12.Field)({
1158
950
  nullable: true
1159
951
  }),
1160
- _ts_metadata13("design:type", String)
952
+ _ts_metadata11("design:type", String)
1161
953
  ], CopilotResponse.prototype, "runId", void 0);
1162
- _ts_decorate13([
1163
- (0, import_type_graphql14.Field)(() => [
954
+ _ts_decorate11([
955
+ (0, import_type_graphql12.Field)(() => [
1164
956
  BaseMessageOutput
1165
957
  ]),
1166
- _ts_metadata13("design:type", Array)
958
+ _ts_metadata11("design:type", Array)
1167
959
  ], CopilotResponse.prototype, "messages", void 0);
1168
- CopilotResponse = _ts_decorate13([
1169
- (0, import_type_graphql14.ObjectType)()
960
+ CopilotResponse = _ts_decorate11([
961
+ (0, import_type_graphql12.ObjectType)()
1170
962
  ], CopilotResponse);
1171
963
 
1172
964
  // src/graphql/resolvers/copilot.resolver.ts
@@ -1193,26 +985,6 @@ var ResultMessage = class extends BaseMessage {
1193
985
  result;
1194
986
  };
1195
987
  __name(ResultMessage, "ResultMessage");
1196
- var AgentStateMessage = class extends BaseMessage {
1197
- threadId;
1198
- agentName;
1199
- nodeName;
1200
- runId;
1201
- active;
1202
- role;
1203
- state;
1204
- running;
1205
- };
1206
- __name(AgentStateMessage, "AgentStateMessage");
1207
-
1208
- // src/lib/telemetry-client.ts
1209
- var import_shared = require("@copilotkit/shared");
1210
- var packageJson = require_package();
1211
- var telemetryClient = new import_shared.TelemetryClient({
1212
- packageName: packageJson.name,
1213
- packageVersion: packageJson.version
1214
- });
1215
- var telemetry_client_default = telemetryClient;
1216
988
 
1217
989
  // src/service-adapters/events.ts
1218
990
  var RuntimeEventTypes;
@@ -1224,7 +996,6 @@ var RuntimeEventTypes;
1224
996
  RuntimeEventTypes2["ActionExecutionArgs"] = "ActionExecutionArgs";
1225
997
  RuntimeEventTypes2["ActionExecutionEnd"] = "ActionExecutionEnd";
1226
998
  RuntimeEventTypes2["ActionExecutionResult"] = "ActionExecutionResult";
1227
- RuntimeEventTypes2["AgentStateMessage"] = "AgentStateMessage";
1228
999
  })(RuntimeEventTypes || (RuntimeEventTypes = {}));
1229
1000
 
1230
1001
  // src/graphql/resolvers/copilot.resolver.ts
@@ -1265,9 +1036,18 @@ var UnknownErrorResponse = class extends FailedResponseStatus {
1265
1036
  };
1266
1037
  __name(UnknownErrorResponse, "UnknownErrorResponse");
1267
1038
 
1039
+ // src/lib/telemetry-client.ts
1040
+ var import_shared = require("@copilotkit/shared");
1041
+ var packageJson = require_package();
1042
+ var telemetryClient = new import_shared.TelemetryClient({
1043
+ packageName: packageJson.name,
1044
+ packageVersion: packageJson.version
1045
+ });
1046
+ var telemetry_client_default = telemetryClient;
1047
+
1268
1048
  // src/graphql/resolvers/copilot.resolver.ts
1269
1049
  var import_shared2 = require("@copilotkit/shared");
1270
- function _ts_decorate14(decorators, target, key, desc) {
1050
+ function _ts_decorate12(decorators, target, key, desc) {
1271
1051
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1272
1052
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1273
1053
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1277,12 +1057,12 @@ function _ts_decorate14(decorators, target, key, desc) {
1277
1057
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1278
1058
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1279
1059
  }
1280
- __name(_ts_decorate14, "_ts_decorate");
1281
- function _ts_metadata14(k, v) {
1060
+ __name(_ts_decorate12, "_ts_decorate");
1061
+ function _ts_metadata12(k, v) {
1282
1062
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1283
1063
  return Reflect.metadata(k, v);
1284
1064
  }
1285
- __name(_ts_metadata14, "_ts_metadata");
1065
+ __name(_ts_metadata12, "_ts_metadata");
1286
1066
  function _ts_param(paramIndex, decorator) {
1287
1067
  return function(target, key) {
1288
1068
  decorator(target, key, paramIndex);
@@ -1291,6 +1071,7 @@ function _ts_param(paramIndex, decorator) {
1291
1071
  __name(_ts_param, "_ts_param");
1292
1072
  var invokeGuardrails = /* @__PURE__ */ __name(async ({ baseUrl, copilotCloudPublicApiKey, data, onResult, onError }) => {
1293
1073
  var _a;
1074
+ console.log("invokeGuardrails.baseUrl", baseUrl);
1294
1075
  if (data.messages.length && ((_a = data.messages[data.messages.length - 1].textMessage) == null ? void 0 : _a.role) === MessageRole.user) {
1295
1076
  const messages = data.messages.filter((m) => m.textMessage !== void 0 && (m.textMessage.role === MessageRole.user || m.textMessage.role === MessageRole.assistant)).map((m) => ({
1296
1077
  role: m.textMessage.role,
@@ -1336,6 +1117,8 @@ var CopilotResolver = class {
1336
1117
  logger2.debug({
1337
1118
  data
1338
1119
  }, "Generating Copilot response");
1120
+ const copilotRuntime = ctx._copilotkit.runtime;
1121
+ const serviceAdapter = ctx._copilotkit.serviceAdapter;
1339
1122
  if (properties) {
1340
1123
  logger2.debug("Properties provided, merging with context properties");
1341
1124
  ctx.properties = {
@@ -1343,8 +1126,6 @@ var CopilotResolver = class {
1343
1126
  ...properties
1344
1127
  };
1345
1128
  }
1346
- const copilotRuntime = ctx._copilotkit.runtime;
1347
- const serviceAdapter = ctx._copilotkit.serviceAdapter;
1348
1129
  let copilotCloudPublicApiKey = null;
1349
1130
  let copilotCloudBaseUrl;
1350
1131
  if (data.cloud) {
@@ -1383,18 +1164,16 @@ var CopilotResolver = class {
1383
1164
  rejectOutputMessagesPromise = reject;
1384
1165
  });
1385
1166
  logger2.debug("Processing");
1386
- const { eventSource, threadId = (0, import_shared2.randomId)(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
1167
+ const { eventSource, threadId = (0, import_shared2.randomId)(), runId, actions } = await copilotRuntime.process({
1387
1168
  serviceAdapter,
1388
1169
  messages: data.messages,
1389
1170
  actions: data.frontend.actions,
1390
1171
  threadId: data.threadId,
1391
1172
  runId: data.runId,
1392
1173
  publicApiKey: void 0,
1174
+ properties: ctx.properties || {},
1393
1175
  outputMessagesPromise,
1394
- graphqlContext: ctx,
1395
1176
  forwardedParameters: data.forwardedParameters,
1396
- agentSession: data.agentSession,
1397
- agentStates: data.agentStates,
1398
1177
  url: data.frontend.url
1399
1178
  });
1400
1179
  logger2.debug("Event source created, creating response");
@@ -1452,13 +1231,9 @@ var CopilotResolver = class {
1452
1231
  });
1453
1232
  }
1454
1233
  let eventStreamSubscription;
1455
- const eventStream = eventSource.processRuntimeEvents({
1456
- serverSideActions,
1457
- guardrailsResult$: ((_b2 = data.cloud) == null ? void 0 : _b2.guardrails) ? guardrailsResult$ : null,
1458
- actionInputsWithoutAgents: actionInputsWithoutAgents.filter(
1459
- // TODO-AGENTS: do not exclude ALL server side actions
1460
- (action) => !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name)
1461
- )
1234
+ const eventStream = eventSource.process({
1235
+ serversideActions: actions,
1236
+ guardrailsResult$: ((_b2 = data.cloud) == null ? void 0 : _b2.guardrails) ? guardrailsResult$ : null
1462
1237
  }).pipe(
1463
1238
  // shareReplay() ensures that later subscribers will see the whole stream instead of
1464
1239
  // just the events that were emitted after the subscriber was added.
@@ -1606,36 +1381,6 @@ var CopilotResolver = class {
1606
1381
  result: event.result
1607
1382
  }));
1608
1383
  break;
1609
- case RuntimeEventTypes.AgentStateMessage:
1610
- logger2.debug({
1611
- event
1612
- }, "Agent message event received");
1613
- pushMessage({
1614
- id: (0, import_shared2.randomId)(),
1615
- status: new SuccessMessageStatus(),
1616
- threadId: event.threadId,
1617
- agentName: event.agentName,
1618
- nodeName: event.nodeName,
1619
- runId: event.runId,
1620
- active: event.active,
1621
- state: event.state,
1622
- running: event.running,
1623
- role: MessageRole.assistant,
1624
- createdAt: /* @__PURE__ */ new Date()
1625
- });
1626
- outputMessages.push((0, import_class_transformer.plainToInstance)(AgentStateMessage, {
1627
- id: (0, import_shared2.randomId)(),
1628
- threadId: event.threadId,
1629
- agentName: event.agentName,
1630
- nodeName: event.nodeName,
1631
- runId: event.runId,
1632
- active: event.active,
1633
- state: event.state,
1634
- running: event.running,
1635
- role: MessageRole.assistant,
1636
- createdAt: /* @__PURE__ */ new Date()
1637
- }));
1638
- break;
1639
1384
  }
1640
1385
  },
1641
1386
  error: (err) => {
@@ -1668,29 +1413,29 @@ var CopilotResolver = class {
1668
1413
  }
1669
1414
  };
1670
1415
  __name(CopilotResolver, "CopilotResolver");
1671
- _ts_decorate14([
1672
- (0, import_type_graphql15.Query)(() => String),
1673
- _ts_metadata14("design:type", Function),
1674
- _ts_metadata14("design:paramtypes", []),
1675
- _ts_metadata14("design:returntype", Promise)
1416
+ _ts_decorate12([
1417
+ (0, import_type_graphql13.Query)(() => String),
1418
+ _ts_metadata12("design:type", Function),
1419
+ _ts_metadata12("design:paramtypes", []),
1420
+ _ts_metadata12("design:returntype", Promise)
1676
1421
  ], CopilotResolver.prototype, "hello", null);
1677
- _ts_decorate14([
1678
- (0, import_type_graphql15.Mutation)(() => CopilotResponse),
1679
- _ts_param(0, (0, import_type_graphql15.Ctx)()),
1680
- _ts_param(1, (0, import_type_graphql15.Arg)("data")),
1681
- _ts_param(2, (0, import_type_graphql15.Arg)("properties", () => import_graphql_scalars2.GraphQLJSONObject, {
1422
+ _ts_decorate12([
1423
+ (0, import_type_graphql13.Mutation)(() => CopilotResponse),
1424
+ _ts_param(0, (0, import_type_graphql13.Ctx)()),
1425
+ _ts_param(1, (0, import_type_graphql13.Arg)("data")),
1426
+ _ts_param(2, (0, import_type_graphql13.Arg)("properties", () => import_graphql_scalars2.GraphQLJSONObject, {
1682
1427
  nullable: true
1683
1428
  })),
1684
- _ts_metadata14("design:type", Function),
1685
- _ts_metadata14("design:paramtypes", [
1429
+ _ts_metadata12("design:type", Function),
1430
+ _ts_metadata12("design:paramtypes", [
1686
1431
  typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
1687
1432
  typeof GenerateCopilotResponseInput === "undefined" ? Object : GenerateCopilotResponseInput,
1688
1433
  typeof CopilotRequestContextProperties === "undefined" ? Object : CopilotRequestContextProperties
1689
1434
  ]),
1690
- _ts_metadata14("design:returntype", Promise)
1435
+ _ts_metadata12("design:returntype", Promise)
1691
1436
  ], CopilotResolver.prototype, "generateCopilotResponse", null);
1692
- CopilotResolver = _ts_decorate14([
1693
- (0, import_type_graphql15.Resolver)(() => CopilotResponse)
1437
+ CopilotResolver = _ts_decorate12([
1438
+ (0, import_type_graphql13.Resolver)(() => CopilotResponse)
1694
1439
  ], CopilotResolver);
1695
1440
 
1696
1441
  // src/lib/integrations/shared.ts
@@ -1745,7 +1490,7 @@ async function createContext(initialContext, copilotKitContext, contextLogger, p
1745
1490
  __name(createContext, "createContext");
1746
1491
  function buildSchema(options = {}) {
1747
1492
  logger.debug("Building GraphQL schema...");
1748
- const schema = (0, import_type_graphql16.buildSchemaSync)({
1493
+ const schema = (0, import_type_graphql14.buildSchemaSync)({
1749
1494
  resolvers: [
1750
1495
  CopilotResolver
1751
1496
  ],