@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",
@@ -133,14 +131,14 @@ __export(integrations_exports, {
133
131
  module.exports = __toCommonJS(integrations_exports);
134
132
 
135
133
  // src/lib/integrations/shared.ts
136
- var import_type_graphql16 = require("type-graphql");
134
+ var import_type_graphql14 = require("type-graphql");
137
135
 
138
136
  // src/graphql/resolvers/copilot.resolver.ts
139
- var import_type_graphql15 = require("type-graphql");
137
+ var import_type_graphql13 = require("type-graphql");
140
138
  var import_rxjs2 = require("rxjs");
141
139
 
142
140
  // src/graphql/inputs/generate-copilot-response.input.ts
143
- var import_type_graphql11 = require("type-graphql");
141
+ var import_type_graphql9 = require("type-graphql");
144
142
 
145
143
  // src/graphql/inputs/message.input.ts
146
144
  var import_type_graphql3 = require("type-graphql");
@@ -157,7 +155,6 @@ var ActionExecutionScope;
157
155
  (function(ActionExecutionScope2) {
158
156
  ActionExecutionScope2["server"] = "server";
159
157
  ActionExecutionScope2["client"] = "client";
160
- ActionExecutionScope2["passThrough"] = "passThrough";
161
158
  })(ActionExecutionScope || (ActionExecutionScope = {}));
162
159
  var CopilotRequestType;
163
160
  (function(CopilotRequestType2) {
@@ -236,7 +233,6 @@ var MessageInput = class extends BaseMessage {
236
233
  textMessage;
237
234
  actionExecutionMessage;
238
235
  resultMessage;
239
- agentStateMessage;
240
236
  };
241
237
  __name(MessageInput, "MessageInput");
242
238
  _ts_decorate2([
@@ -257,12 +253,6 @@ _ts_decorate2([
257
253
  }),
258
254
  _ts_metadata2("design:type", typeof ResultMessageInput === "undefined" ? Object : ResultMessageInput)
259
255
  ], MessageInput.prototype, "resultMessage", void 0);
260
- _ts_decorate2([
261
- (0, import_type_graphql3.Field)(() => AgentStateMessageInput, {
262
- nullable: true
263
- }),
264
- _ts_metadata2("design:type", typeof AgentStateMessageInput === "undefined" ? Object : AgentStateMessageInput)
265
- ], MessageInput.prototype, "agentStateMessage", void 0);
266
256
  MessageInput = _ts_decorate2([
267
257
  (0, import_type_graphql3.InputType)()
268
258
  ], MessageInput);
@@ -324,52 +314,6 @@ _ts_decorate2([
324
314
  ResultMessageInput = _ts_decorate2([
325
315
  (0, import_type_graphql3.InputType)()
326
316
  ], ResultMessageInput);
327
- var AgentStateMessageInput = class {
328
- threadId;
329
- agentName;
330
- role;
331
- state;
332
- running;
333
- nodeName;
334
- runId;
335
- active;
336
- };
337
- __name(AgentStateMessageInput, "AgentStateMessageInput");
338
- _ts_decorate2([
339
- (0, import_type_graphql3.Field)(() => String),
340
- _ts_metadata2("design:type", String)
341
- ], AgentStateMessageInput.prototype, "threadId", void 0);
342
- _ts_decorate2([
343
- (0, import_type_graphql3.Field)(() => String),
344
- _ts_metadata2("design:type", String)
345
- ], AgentStateMessageInput.prototype, "agentName", void 0);
346
- _ts_decorate2([
347
- (0, import_type_graphql3.Field)(() => MessageRole),
348
- _ts_metadata2("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
349
- ], AgentStateMessageInput.prototype, "role", void 0);
350
- _ts_decorate2([
351
- (0, import_type_graphql3.Field)(() => String),
352
- _ts_metadata2("design:type", String)
353
- ], AgentStateMessageInput.prototype, "state", void 0);
354
- _ts_decorate2([
355
- (0, import_type_graphql3.Field)(() => Boolean),
356
- _ts_metadata2("design:type", Boolean)
357
- ], AgentStateMessageInput.prototype, "running", void 0);
358
- _ts_decorate2([
359
- (0, import_type_graphql3.Field)(() => String),
360
- _ts_metadata2("design:type", String)
361
- ], AgentStateMessageInput.prototype, "nodeName", void 0);
362
- _ts_decorate2([
363
- (0, import_type_graphql3.Field)(() => String),
364
- _ts_metadata2("design:type", String)
365
- ], AgentStateMessageInput.prototype, "runId", void 0);
366
- _ts_decorate2([
367
- (0, import_type_graphql3.Field)(() => Boolean),
368
- _ts_metadata2("design:type", Boolean)
369
- ], AgentStateMessageInput.prototype, "active", void 0);
370
- AgentStateMessageInput = _ts_decorate2([
371
- (0, import_type_graphql3.InputType)()
372
- ], AgentStateMessageInput);
373
317
 
374
318
  // src/graphql/inputs/frontend.input.ts
375
319
  var import_type_graphql5 = require("type-graphql");
@@ -611,8 +555,7 @@ ForwardedParametersInput = _ts_decorate7([
611
555
  (0, import_type_graphql8.InputType)()
612
556
  ], ForwardedParametersInput);
613
557
 
614
- // src/graphql/inputs/agent-session.input.ts
615
- var import_type_graphql9 = require("type-graphql");
558
+ // src/graphql/inputs/generate-copilot-response.input.ts
616
559
  function _ts_decorate8(decorators, target, key, desc) {
617
560
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
618
561
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -629,96 +572,18 @@ function _ts_metadata8(k, v) {
629
572
  return Reflect.metadata(k, v);
630
573
  }
631
574
  __name(_ts_metadata8, "_ts_metadata");
632
- var AgentSessionInput = class {
633
- agentName;
634
- threadId;
635
- nodeName;
636
- };
637
- __name(AgentSessionInput, "AgentSessionInput");
638
- _ts_decorate8([
639
- (0, import_type_graphql9.Field)(() => String),
640
- _ts_metadata8("design:type", String)
641
- ], AgentSessionInput.prototype, "agentName", void 0);
642
- _ts_decorate8([
643
- (0, import_type_graphql9.Field)(() => String, {
644
- nullable: true
645
- }),
646
- _ts_metadata8("design:type", String)
647
- ], AgentSessionInput.prototype, "threadId", void 0);
648
- _ts_decorate8([
649
- (0, import_type_graphql9.Field)(() => String, {
650
- nullable: true
651
- }),
652
- _ts_metadata8("design:type", String)
653
- ], AgentSessionInput.prototype, "nodeName", void 0);
654
- AgentSessionInput = _ts_decorate8([
655
- (0, import_type_graphql9.InputType)()
656
- ], AgentSessionInput);
657
-
658
- // src/graphql/inputs/agent-state.input.ts
659
- var import_type_graphql10 = require("type-graphql");
660
- function _ts_decorate9(decorators, target, key, desc) {
661
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
662
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
663
- r = Reflect.decorate(decorators, target, key, desc);
664
- else
665
- for (var i = decorators.length - 1; i >= 0; i--)
666
- if (d = decorators[i])
667
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
668
- return c > 3 && r && Object.defineProperty(target, key, r), r;
669
- }
670
- __name(_ts_decorate9, "_ts_decorate");
671
- function _ts_metadata9(k, v) {
672
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
673
- return Reflect.metadata(k, v);
674
- }
675
- __name(_ts_metadata9, "_ts_metadata");
676
- var AgentStateInput = class {
677
- agentName;
678
- state;
679
- };
680
- __name(AgentStateInput, "AgentStateInput");
681
- _ts_decorate9([
682
- (0, import_type_graphql10.Field)(() => String),
683
- _ts_metadata9("design:type", String)
684
- ], AgentStateInput.prototype, "agentName", void 0);
685
- _ts_decorate9([
686
- (0, import_type_graphql10.Field)(() => String),
687
- _ts_metadata9("design:type", String)
688
- ], AgentStateInput.prototype, "state", void 0);
689
- AgentStateInput = _ts_decorate9([
690
- (0, import_type_graphql10.InputType)()
691
- ], AgentStateInput);
692
-
693
- // src/graphql/inputs/generate-copilot-response.input.ts
694
- function _ts_decorate10(decorators, target, key, desc) {
695
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
696
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
697
- r = Reflect.decorate(decorators, target, key, desc);
698
- else
699
- for (var i = decorators.length - 1; i >= 0; i--)
700
- if (d = decorators[i])
701
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
702
- return c > 3 && r && Object.defineProperty(target, key, r), r;
703
- }
704
- __name(_ts_decorate10, "_ts_decorate");
705
- function _ts_metadata10(k, v) {
706
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
707
- return Reflect.metadata(k, v);
708
- }
709
- __name(_ts_metadata10, "_ts_metadata");
710
575
  var GenerateCopilotResponseMetadataInput = class {
711
576
  requestType;
712
577
  };
713
578
  __name(GenerateCopilotResponseMetadataInput, "GenerateCopilotResponseMetadataInput");
714
- _ts_decorate10([
715
- (0, import_type_graphql11.Field)(() => CopilotRequestType, {
579
+ _ts_decorate8([
580
+ (0, import_type_graphql9.Field)(() => CopilotRequestType, {
716
581
  nullable: true
717
582
  }),
718
- _ts_metadata10("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
583
+ _ts_metadata8("design:type", typeof CopilotRequestType === "undefined" ? Object : CopilotRequestType)
719
584
  ], GenerateCopilotResponseMetadataInput.prototype, "requestType", void 0);
720
- GenerateCopilotResponseMetadataInput = _ts_decorate10([
721
- (0, import_type_graphql11.InputType)()
585
+ GenerateCopilotResponseMetadataInput = _ts_decorate8([
586
+ (0, import_type_graphql9.InputType)()
722
587
  ], GenerateCopilotResponseMetadataInput);
723
588
  var GenerateCopilotResponseInput = class {
724
589
  metadata;
@@ -728,81 +593,58 @@ var GenerateCopilotResponseInput = class {
728
593
  frontend;
729
594
  cloud;
730
595
  forwardedParameters;
731
- agentSession;
732
- agentState;
733
- agentStates;
734
596
  };
735
597
  __name(GenerateCopilotResponseInput, "GenerateCopilotResponseInput");
736
- _ts_decorate10([
737
- (0, import_type_graphql11.Field)(() => GenerateCopilotResponseMetadataInput, {
598
+ _ts_decorate8([
599
+ (0, import_type_graphql9.Field)(() => GenerateCopilotResponseMetadataInput, {
738
600
  nullable: false
739
601
  }),
740
- _ts_metadata10("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
602
+ _ts_metadata8("design:type", typeof GenerateCopilotResponseMetadataInput === "undefined" ? Object : GenerateCopilotResponseMetadataInput)
741
603
  ], GenerateCopilotResponseInput.prototype, "metadata", void 0);
742
- _ts_decorate10([
743
- (0, import_type_graphql11.Field)(() => String, {
604
+ _ts_decorate8([
605
+ (0, import_type_graphql9.Field)(() => String, {
744
606
  nullable: true
745
607
  }),
746
- _ts_metadata10("design:type", String)
608
+ _ts_metadata8("design:type", String)
747
609
  ], GenerateCopilotResponseInput.prototype, "threadId", void 0);
748
- _ts_decorate10([
749
- (0, import_type_graphql11.Field)(() => String, {
610
+ _ts_decorate8([
611
+ (0, import_type_graphql9.Field)(() => String, {
750
612
  nullable: true
751
613
  }),
752
- _ts_metadata10("design:type", String)
614
+ _ts_metadata8("design:type", String)
753
615
  ], GenerateCopilotResponseInput.prototype, "runId", void 0);
754
- _ts_decorate10([
755
- (0, import_type_graphql11.Field)(() => [
616
+ _ts_decorate8([
617
+ (0, import_type_graphql9.Field)(() => [
756
618
  MessageInput
757
619
  ]),
758
- _ts_metadata10("design:type", Array)
620
+ _ts_metadata8("design:type", Array)
759
621
  ], GenerateCopilotResponseInput.prototype, "messages", void 0);
760
- _ts_decorate10([
761
- (0, import_type_graphql11.Field)(() => FrontendInput),
762
- _ts_metadata10("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
622
+ _ts_decorate8([
623
+ (0, import_type_graphql9.Field)(() => FrontendInput),
624
+ _ts_metadata8("design:type", typeof FrontendInput === "undefined" ? Object : FrontendInput)
763
625
  ], GenerateCopilotResponseInput.prototype, "frontend", void 0);
764
- _ts_decorate10([
765
- (0, import_type_graphql11.Field)(() => CloudInput, {
626
+ _ts_decorate8([
627
+ (0, import_type_graphql9.Field)(() => CloudInput, {
766
628
  nullable: true
767
629
  }),
768
- _ts_metadata10("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
630
+ _ts_metadata8("design:type", typeof CloudInput === "undefined" ? Object : CloudInput)
769
631
  ], GenerateCopilotResponseInput.prototype, "cloud", void 0);
770
- _ts_decorate10([
771
- (0, import_type_graphql11.Field)(() => ForwardedParametersInput, {
632
+ _ts_decorate8([
633
+ (0, import_type_graphql9.Field)(() => ForwardedParametersInput, {
772
634
  nullable: true
773
635
  }),
774
- _ts_metadata10("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
636
+ _ts_metadata8("design:type", typeof ForwardedParametersInput === "undefined" ? Object : ForwardedParametersInput)
775
637
  ], GenerateCopilotResponseInput.prototype, "forwardedParameters", void 0);
776
- _ts_decorate10([
777
- (0, import_type_graphql11.Field)(() => AgentSessionInput, {
778
- nullable: true
779
- }),
780
- _ts_metadata10("design:type", typeof AgentSessionInput === "undefined" ? Object : AgentSessionInput)
781
- ], GenerateCopilotResponseInput.prototype, "agentSession", void 0);
782
- _ts_decorate10([
783
- (0, import_type_graphql11.Field)(() => AgentStateInput, {
784
- nullable: true
785
- }),
786
- _ts_metadata10("design:type", typeof AgentStateInput === "undefined" ? Object : AgentStateInput)
787
- ], GenerateCopilotResponseInput.prototype, "agentState", void 0);
788
- _ts_decorate10([
789
- (0, import_type_graphql11.Field)(() => [
790
- AgentStateInput
791
- ], {
792
- nullable: true
793
- }),
794
- _ts_metadata10("design:type", Array)
795
- ], GenerateCopilotResponseInput.prototype, "agentStates", void 0);
796
- GenerateCopilotResponseInput = _ts_decorate10([
797
- (0, import_type_graphql11.InputType)()
638
+ GenerateCopilotResponseInput = _ts_decorate8([
639
+ (0, import_type_graphql9.InputType)()
798
640
  ], GenerateCopilotResponseInput);
799
641
 
800
642
  // src/graphql/types/copilot-response.type.ts
801
- var import_type_graphql14 = require("type-graphql");
643
+ var import_type_graphql12 = require("type-graphql");
802
644
 
803
645
  // src/graphql/types/message-status.type.ts
804
- var import_type_graphql12 = require("type-graphql");
805
- function _ts_decorate11(decorators, target, key, desc) {
646
+ var import_type_graphql10 = require("type-graphql");
647
+ function _ts_decorate9(decorators, target, key, desc) {
806
648
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
807
649
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
808
650
  r = Reflect.decorate(decorators, target, key, desc);
@@ -812,58 +654,58 @@ function _ts_decorate11(decorators, target, key, desc) {
812
654
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
813
655
  return c > 3 && r && Object.defineProperty(target, key, r), r;
814
656
  }
815
- __name(_ts_decorate11, "_ts_decorate");
816
- function _ts_metadata11(k, v) {
657
+ __name(_ts_decorate9, "_ts_decorate");
658
+ function _ts_metadata9(k, v) {
817
659
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
818
660
  return Reflect.metadata(k, v);
819
661
  }
820
- __name(_ts_metadata11, "_ts_metadata");
662
+ __name(_ts_metadata9, "_ts_metadata");
821
663
  var MessageStatusCode;
822
664
  (function(MessageStatusCode2) {
823
665
  MessageStatusCode2["Pending"] = "pending";
824
666
  MessageStatusCode2["Success"] = "success";
825
667
  MessageStatusCode2["Failed"] = "failed";
826
668
  })(MessageStatusCode || (MessageStatusCode = {}));
827
- (0, import_type_graphql12.registerEnumType)(MessageStatusCode, {
669
+ (0, import_type_graphql10.registerEnumType)(MessageStatusCode, {
828
670
  name: "MessageStatusCode"
829
671
  });
830
672
  var BaseMessageStatus = /* @__PURE__ */ __name(class BaseMessageStatus2 {
831
673
  code;
832
674
  }, "BaseMessageStatus");
833
- _ts_decorate11([
834
- (0, import_type_graphql12.Field)(() => MessageStatusCode),
835
- _ts_metadata11("design:type", String)
675
+ _ts_decorate9([
676
+ (0, import_type_graphql10.Field)(() => MessageStatusCode),
677
+ _ts_metadata9("design:type", String)
836
678
  ], BaseMessageStatus.prototype, "code", void 0);
837
- BaseMessageStatus = _ts_decorate11([
838
- (0, import_type_graphql12.ObjectType)()
679
+ BaseMessageStatus = _ts_decorate9([
680
+ (0, import_type_graphql10.ObjectType)()
839
681
  ], BaseMessageStatus);
840
682
  var PendingMessageStatus = class extends BaseMessageStatus {
841
683
  code = "pending";
842
684
  };
843
685
  __name(PendingMessageStatus, "PendingMessageStatus");
844
- PendingMessageStatus = _ts_decorate11([
845
- (0, import_type_graphql12.ObjectType)()
686
+ PendingMessageStatus = _ts_decorate9([
687
+ (0, import_type_graphql10.ObjectType)()
846
688
  ], PendingMessageStatus);
847
689
  var SuccessMessageStatus = class extends BaseMessageStatus {
848
690
  code = "success";
849
691
  };
850
692
  __name(SuccessMessageStatus, "SuccessMessageStatus");
851
- SuccessMessageStatus = _ts_decorate11([
852
- (0, import_type_graphql12.ObjectType)()
693
+ SuccessMessageStatus = _ts_decorate9([
694
+ (0, import_type_graphql10.ObjectType)()
853
695
  ], SuccessMessageStatus);
854
696
  var FailedMessageStatus = class extends BaseMessageStatus {
855
697
  code = "failed";
856
698
  reason;
857
699
  };
858
700
  __name(FailedMessageStatus, "FailedMessageStatus");
859
- _ts_decorate11([
860
- (0, import_type_graphql12.Field)(() => String),
861
- _ts_metadata11("design:type", String)
701
+ _ts_decorate9([
702
+ (0, import_type_graphql10.Field)(() => String),
703
+ _ts_metadata9("design:type", String)
862
704
  ], FailedMessageStatus.prototype, "reason", void 0);
863
- FailedMessageStatus = _ts_decorate11([
864
- (0, import_type_graphql12.ObjectType)()
705
+ FailedMessageStatus = _ts_decorate9([
706
+ (0, import_type_graphql10.ObjectType)()
865
707
  ], FailedMessageStatus);
866
- var MessageStatusUnion = (0, import_type_graphql12.createUnionType)({
708
+ var MessageStatusUnion = (0, import_type_graphql10.createUnionType)({
867
709
  name: "MessageStatus",
868
710
  types: () => [
869
711
  PendingMessageStatus,
@@ -874,8 +716,8 @@ var MessageStatusUnion = (0, import_type_graphql12.createUnionType)({
874
716
 
875
717
  // src/graphql/types/response-status.type.ts
876
718
  var import_graphql_scalars = require("graphql-scalars");
877
- var import_type_graphql13 = require("type-graphql");
878
- function _ts_decorate12(decorators, target, key, desc) {
719
+ var import_type_graphql11 = require("type-graphql");
720
+ function _ts_decorate10(decorators, target, key, desc) {
879
721
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
880
722
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
881
723
  r = Reflect.decorate(decorators, target, key, desc);
@@ -885,30 +727,30 @@ function _ts_decorate12(decorators, target, key, desc) {
885
727
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
886
728
  return c > 3 && r && Object.defineProperty(target, key, r), r;
887
729
  }
888
- __name(_ts_decorate12, "_ts_decorate");
889
- function _ts_metadata12(k, v) {
730
+ __name(_ts_decorate10, "_ts_decorate");
731
+ function _ts_metadata10(k, v) {
890
732
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
891
733
  return Reflect.metadata(k, v);
892
734
  }
893
- __name(_ts_metadata12, "_ts_metadata");
735
+ __name(_ts_metadata10, "_ts_metadata");
894
736
  var ResponseStatusCode;
895
737
  (function(ResponseStatusCode2) {
896
738
  ResponseStatusCode2["Pending"] = "pending";
897
739
  ResponseStatusCode2["Success"] = "success";
898
740
  ResponseStatusCode2["Failed"] = "failed";
899
741
  })(ResponseStatusCode || (ResponseStatusCode = {}));
900
- (0, import_type_graphql13.registerEnumType)(ResponseStatusCode, {
742
+ (0, import_type_graphql11.registerEnumType)(ResponseStatusCode, {
901
743
  name: "ResponseStatusCode"
902
744
  });
903
745
  var BaseResponseStatus = /* @__PURE__ */ __name(class BaseResponseStatus2 {
904
746
  code;
905
747
  }, "BaseResponseStatus");
906
- _ts_decorate12([
907
- (0, import_type_graphql13.Field)(() => ResponseStatusCode),
908
- _ts_metadata12("design:type", String)
748
+ _ts_decorate10([
749
+ (0, import_type_graphql11.Field)(() => ResponseStatusCode),
750
+ _ts_metadata10("design:type", String)
909
751
  ], BaseResponseStatus.prototype, "code", void 0);
910
- BaseResponseStatus = _ts_decorate12([
911
- (0, import_type_graphql13.InterfaceType)({
752
+ BaseResponseStatus = _ts_decorate10([
753
+ (0, import_type_graphql11.InterfaceType)({
912
754
  resolveType(value) {
913
755
  if (value.code === "success") {
914
756
  return SuccessResponseStatus;
@@ -920,14 +762,14 @@ BaseResponseStatus = _ts_decorate12([
920
762
  return void 0;
921
763
  }
922
764
  }),
923
- (0, import_type_graphql13.ObjectType)()
765
+ (0, import_type_graphql11.ObjectType)()
924
766
  ], BaseResponseStatus);
925
767
  var PendingResponseStatus = class extends BaseResponseStatus {
926
768
  code = "pending";
927
769
  };
928
770
  __name(PendingResponseStatus, "PendingResponseStatus");
929
- PendingResponseStatus = _ts_decorate12([
930
- (0, import_type_graphql13.ObjectType)({
771
+ PendingResponseStatus = _ts_decorate10([
772
+ (0, import_type_graphql11.ObjectType)({
931
773
  implements: BaseResponseStatus
932
774
  })
933
775
  ], PendingResponseStatus);
@@ -935,8 +777,8 @@ var SuccessResponseStatus = class extends BaseResponseStatus {
935
777
  code = "success";
936
778
  };
937
779
  __name(SuccessResponseStatus, "SuccessResponseStatus");
938
- SuccessResponseStatus = _ts_decorate12([
939
- (0, import_type_graphql13.ObjectType)({
780
+ SuccessResponseStatus = _ts_decorate10([
781
+ (0, import_type_graphql11.ObjectType)({
940
782
  implements: BaseResponseStatus
941
783
  })
942
784
  ], SuccessResponseStatus);
@@ -946,7 +788,7 @@ var FailedResponseStatusReason;
946
788
  FailedResponseStatusReason2["MESSAGE_STREAM_INTERRUPTED"] = "MESSAGE_STREAM_INTERRUPTED";
947
789
  FailedResponseStatusReason2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
948
790
  })(FailedResponseStatusReason || (FailedResponseStatusReason = {}));
949
- (0, import_type_graphql13.registerEnumType)(FailedResponseStatusReason, {
791
+ (0, import_type_graphql11.registerEnumType)(FailedResponseStatusReason, {
950
792
  name: "FailedResponseStatusReason"
951
793
  });
952
794
  var FailedResponseStatus = class extends BaseResponseStatus {
@@ -955,22 +797,22 @@ var FailedResponseStatus = class extends BaseResponseStatus {
955
797
  details = null;
956
798
  };
957
799
  __name(FailedResponseStatus, "FailedResponseStatus");
958
- _ts_decorate12([
959
- (0, import_type_graphql13.Field)(() => FailedResponseStatusReason),
960
- _ts_metadata12("design:type", String)
800
+ _ts_decorate10([
801
+ (0, import_type_graphql11.Field)(() => FailedResponseStatusReason),
802
+ _ts_metadata10("design:type", String)
961
803
  ], FailedResponseStatus.prototype, "reason", void 0);
962
- _ts_decorate12([
963
- (0, import_type_graphql13.Field)(() => import_graphql_scalars.GraphQLJSON, {
804
+ _ts_decorate10([
805
+ (0, import_type_graphql11.Field)(() => import_graphql_scalars.GraphQLJSON, {
964
806
  nullable: true
965
807
  }),
966
- _ts_metadata12("design:type", typeof Record === "undefined" ? Object : Record)
808
+ _ts_metadata10("design:type", typeof Record === "undefined" ? Object : Record)
967
809
  ], FailedResponseStatus.prototype, "details", void 0);
968
- FailedResponseStatus = _ts_decorate12([
969
- (0, import_type_graphql13.ObjectType)({
810
+ FailedResponseStatus = _ts_decorate10([
811
+ (0, import_type_graphql11.ObjectType)({
970
812
  implements: BaseResponseStatus
971
813
  })
972
814
  ], FailedResponseStatus);
973
- var ResponseStatusUnion = (0, import_type_graphql13.createUnionType)({
815
+ var ResponseStatusUnion = (0, import_type_graphql11.createUnionType)({
974
816
  name: "ResponseStatus",
975
817
  types: () => [
976
818
  PendingResponseStatus,
@@ -980,7 +822,7 @@ var ResponseStatusUnion = (0, import_type_graphql13.createUnionType)({
980
822
  });
981
823
 
982
824
  // src/graphql/types/copilot-response.type.ts
983
- function _ts_decorate13(decorators, target, key, desc) {
825
+ function _ts_decorate11(decorators, target, key, desc) {
984
826
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
985
827
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
986
828
  r = Reflect.decorate(decorators, target, key, desc);
@@ -990,31 +832,31 @@ function _ts_decorate13(decorators, target, key, desc) {
990
832
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
991
833
  return c > 3 && r && Object.defineProperty(target, key, r), r;
992
834
  }
993
- __name(_ts_decorate13, "_ts_decorate");
994
- function _ts_metadata13(k, v) {
835
+ __name(_ts_decorate11, "_ts_decorate");
836
+ function _ts_metadata11(k, v) {
995
837
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
996
838
  return Reflect.metadata(k, v);
997
839
  }
998
- __name(_ts_metadata13, "_ts_metadata");
840
+ __name(_ts_metadata11, "_ts_metadata");
999
841
  var BaseMessageOutput = /* @__PURE__ */ __name(class BaseMessageOutput2 {
1000
842
  id;
1001
843
  createdAt;
1002
844
  status;
1003
845
  }, "BaseMessageOutput");
1004
- _ts_decorate13([
1005
- (0, import_type_graphql14.Field)(() => String),
1006
- _ts_metadata13("design:type", String)
846
+ _ts_decorate11([
847
+ (0, import_type_graphql12.Field)(() => String),
848
+ _ts_metadata11("design:type", String)
1007
849
  ], BaseMessageOutput.prototype, "id", void 0);
1008
- _ts_decorate13([
1009
- (0, import_type_graphql14.Field)(() => Date),
1010
- _ts_metadata13("design:type", typeof Date === "undefined" ? Object : Date)
850
+ _ts_decorate11([
851
+ (0, import_type_graphql12.Field)(() => Date),
852
+ _ts_metadata11("design:type", typeof Date === "undefined" ? Object : Date)
1011
853
  ], BaseMessageOutput.prototype, "createdAt", void 0);
1012
- _ts_decorate13([
1013
- (0, import_type_graphql14.Field)(() => MessageStatusUnion),
1014
- _ts_metadata13("design:type", Object)
854
+ _ts_decorate11([
855
+ (0, import_type_graphql12.Field)(() => MessageStatusUnion),
856
+ _ts_metadata11("design:type", Object)
1015
857
  ], BaseMessageOutput.prototype, "status", void 0);
1016
- BaseMessageOutput = _ts_decorate13([
1017
- (0, import_type_graphql14.InterfaceType)({
858
+ BaseMessageOutput = _ts_decorate11([
859
+ (0, import_type_graphql12.InterfaceType)({
1018
860
  resolveType(value) {
1019
861
  if (value.hasOwnProperty("content")) {
1020
862
  return TextMessageOutput;
@@ -1022,8 +864,6 @@ BaseMessageOutput = _ts_decorate13([
1022
864
  return ActionExecutionMessageOutput;
1023
865
  } else if (value.hasOwnProperty("result")) {
1024
866
  return ResultMessageOutput;
1025
- } else if (value.hasOwnProperty("state")) {
1026
- return AgentStateMessageOutput;
1027
867
  }
1028
868
  return void 0;
1029
869
  }
@@ -1034,18 +874,18 @@ var TextMessageOutput = class {
1034
874
  content;
1035
875
  };
1036
876
  __name(TextMessageOutput, "TextMessageOutput");
1037
- _ts_decorate13([
1038
- (0, import_type_graphql14.Field)(() => MessageRole),
1039
- _ts_metadata13("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
877
+ _ts_decorate11([
878
+ (0, import_type_graphql12.Field)(() => MessageRole),
879
+ _ts_metadata11("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1040
880
  ], TextMessageOutput.prototype, "role", void 0);
1041
- _ts_decorate13([
1042
- (0, import_type_graphql14.Field)(() => [
881
+ _ts_decorate11([
882
+ (0, import_type_graphql12.Field)(() => [
1043
883
  String
1044
884
  ]),
1045
- _ts_metadata13("design:type", Array)
885
+ _ts_metadata11("design:type", Array)
1046
886
  ], TextMessageOutput.prototype, "content", void 0);
1047
- TextMessageOutput = _ts_decorate13([
1048
- (0, import_type_graphql14.ObjectType)({
887
+ TextMessageOutput = _ts_decorate11([
888
+ (0, import_type_graphql12.ObjectType)({
1049
889
  implements: BaseMessageOutput
1050
890
  })
1051
891
  ], TextMessageOutput);
@@ -1055,22 +895,22 @@ var ActionExecutionMessageOutput = class {
1055
895
  arguments;
1056
896
  };
1057
897
  __name(ActionExecutionMessageOutput, "ActionExecutionMessageOutput");
1058
- _ts_decorate13([
1059
- (0, import_type_graphql14.Field)(() => String),
1060
- _ts_metadata13("design:type", String)
898
+ _ts_decorate11([
899
+ (0, import_type_graphql12.Field)(() => String),
900
+ _ts_metadata11("design:type", String)
1061
901
  ], ActionExecutionMessageOutput.prototype, "name", void 0);
1062
- _ts_decorate13([
1063
- (0, import_type_graphql14.Field)(() => ActionExecutionScope),
1064
- _ts_metadata13("design:type", typeof ActionExecutionScope === "undefined" ? Object : ActionExecutionScope)
902
+ _ts_decorate11([
903
+ (0, import_type_graphql12.Field)(() => ActionExecutionScope),
904
+ _ts_metadata11("design:type", typeof ActionExecutionScope === "undefined" ? Object : ActionExecutionScope)
1065
905
  ], ActionExecutionMessageOutput.prototype, "scope", void 0);
1066
- _ts_decorate13([
1067
- (0, import_type_graphql14.Field)(() => [
906
+ _ts_decorate11([
907
+ (0, import_type_graphql12.Field)(() => [
1068
908
  String
1069
909
  ]),
1070
- _ts_metadata13("design:type", Array)
910
+ _ts_metadata11("design:type", Array)
1071
911
  ], ActionExecutionMessageOutput.prototype, "arguments", void 0);
1072
- ActionExecutionMessageOutput = _ts_decorate13([
1073
- (0, import_type_graphql14.ObjectType)({
912
+ ActionExecutionMessageOutput = _ts_decorate11([
913
+ (0, import_type_graphql12.ObjectType)({
1074
914
  implements: BaseMessageOutput
1075
915
  })
1076
916
  ], ActionExecutionMessageOutput);
@@ -1080,71 +920,23 @@ var ResultMessageOutput = class {
1080
920
  result;
1081
921
  };
1082
922
  __name(ResultMessageOutput, "ResultMessageOutput");
1083
- _ts_decorate13([
1084
- (0, import_type_graphql14.Field)(() => String),
1085
- _ts_metadata13("design:type", String)
923
+ _ts_decorate11([
924
+ (0, import_type_graphql12.Field)(() => String),
925
+ _ts_metadata11("design:type", String)
1086
926
  ], ResultMessageOutput.prototype, "actionExecutionId", void 0);
1087
- _ts_decorate13([
1088
- (0, import_type_graphql14.Field)(() => String),
1089
- _ts_metadata13("design:type", String)
927
+ _ts_decorate11([
928
+ (0, import_type_graphql12.Field)(() => String),
929
+ _ts_metadata11("design:type", String)
1090
930
  ], ResultMessageOutput.prototype, "actionName", void 0);
1091
- _ts_decorate13([
1092
- (0, import_type_graphql14.Field)(() => String),
1093
- _ts_metadata13("design:type", String)
931
+ _ts_decorate11([
932
+ (0, import_type_graphql12.Field)(() => String),
933
+ _ts_metadata11("design:type", String)
1094
934
  ], ResultMessageOutput.prototype, "result", void 0);
1095
- ResultMessageOutput = _ts_decorate13([
1096
- (0, import_type_graphql14.ObjectType)({
935
+ ResultMessageOutput = _ts_decorate11([
936
+ (0, import_type_graphql12.ObjectType)({
1097
937
  implements: BaseMessageOutput
1098
938
  })
1099
939
  ], ResultMessageOutput);
1100
- var AgentStateMessageOutput = class {
1101
- threadId;
1102
- agentName;
1103
- nodeName;
1104
- runId;
1105
- active;
1106
- role;
1107
- state;
1108
- running;
1109
- };
1110
- __name(AgentStateMessageOutput, "AgentStateMessageOutput");
1111
- _ts_decorate13([
1112
- (0, import_type_graphql14.Field)(() => String),
1113
- _ts_metadata13("design:type", String)
1114
- ], AgentStateMessageOutput.prototype, "threadId", void 0);
1115
- _ts_decorate13([
1116
- (0, import_type_graphql14.Field)(() => String),
1117
- _ts_metadata13("design:type", String)
1118
- ], AgentStateMessageOutput.prototype, "agentName", void 0);
1119
- _ts_decorate13([
1120
- (0, import_type_graphql14.Field)(() => String),
1121
- _ts_metadata13("design:type", String)
1122
- ], AgentStateMessageOutput.prototype, "nodeName", void 0);
1123
- _ts_decorate13([
1124
- (0, import_type_graphql14.Field)(() => String),
1125
- _ts_metadata13("design:type", String)
1126
- ], AgentStateMessageOutput.prototype, "runId", void 0);
1127
- _ts_decorate13([
1128
- (0, import_type_graphql14.Field)(() => Boolean),
1129
- _ts_metadata13("design:type", Boolean)
1130
- ], AgentStateMessageOutput.prototype, "active", void 0);
1131
- _ts_decorate13([
1132
- (0, import_type_graphql14.Field)(() => MessageRole),
1133
- _ts_metadata13("design:type", typeof MessageRole === "undefined" ? Object : MessageRole)
1134
- ], AgentStateMessageOutput.prototype, "role", void 0);
1135
- _ts_decorate13([
1136
- (0, import_type_graphql14.Field)(() => String),
1137
- _ts_metadata13("design:type", String)
1138
- ], AgentStateMessageOutput.prototype, "state", void 0);
1139
- _ts_decorate13([
1140
- (0, import_type_graphql14.Field)(() => Boolean),
1141
- _ts_metadata13("design:type", Boolean)
1142
- ], AgentStateMessageOutput.prototype, "running", void 0);
1143
- AgentStateMessageOutput = _ts_decorate13([
1144
- (0, import_type_graphql14.ObjectType)({
1145
- implements: BaseMessageOutput
1146
- })
1147
- ], AgentStateMessageOutput);
1148
940
  var CopilotResponse = class {
1149
941
  threadId;
1150
942
  status;
@@ -1152,28 +944,28 @@ var CopilotResponse = class {
1152
944
  messages;
1153
945
  };
1154
946
  __name(CopilotResponse, "CopilotResponse");
1155
- _ts_decorate13([
1156
- (0, import_type_graphql14.Field)(() => String),
1157
- _ts_metadata13("design:type", String)
947
+ _ts_decorate11([
948
+ (0, import_type_graphql12.Field)(() => String),
949
+ _ts_metadata11("design:type", String)
1158
950
  ], CopilotResponse.prototype, "threadId", void 0);
1159
- _ts_decorate13([
1160
- (0, import_type_graphql14.Field)(() => ResponseStatusUnion),
1161
- _ts_metadata13("design:type", Object)
951
+ _ts_decorate11([
952
+ (0, import_type_graphql12.Field)(() => ResponseStatusUnion),
953
+ _ts_metadata11("design:type", Object)
1162
954
  ], CopilotResponse.prototype, "status", void 0);
1163
- _ts_decorate13([
1164
- (0, import_type_graphql14.Field)({
955
+ _ts_decorate11([
956
+ (0, import_type_graphql12.Field)({
1165
957
  nullable: true
1166
958
  }),
1167
- _ts_metadata13("design:type", String)
959
+ _ts_metadata11("design:type", String)
1168
960
  ], CopilotResponse.prototype, "runId", void 0);
1169
- _ts_decorate13([
1170
- (0, import_type_graphql14.Field)(() => [
961
+ _ts_decorate11([
962
+ (0, import_type_graphql12.Field)(() => [
1171
963
  BaseMessageOutput
1172
964
  ]),
1173
- _ts_metadata13("design:type", Array)
965
+ _ts_metadata11("design:type", Array)
1174
966
  ], CopilotResponse.prototype, "messages", void 0);
1175
- CopilotResponse = _ts_decorate13([
1176
- (0, import_type_graphql14.ObjectType)()
967
+ CopilotResponse = _ts_decorate11([
968
+ (0, import_type_graphql12.ObjectType)()
1177
969
  ], CopilotResponse);
1178
970
 
1179
971
  // src/graphql/resolvers/copilot.resolver.ts
@@ -1200,26 +992,6 @@ var ResultMessage = class extends BaseMessage {
1200
992
  result;
1201
993
  };
1202
994
  __name(ResultMessage, "ResultMessage");
1203
- var AgentStateMessage = class extends BaseMessage {
1204
- threadId;
1205
- agentName;
1206
- nodeName;
1207
- runId;
1208
- active;
1209
- role;
1210
- state;
1211
- running;
1212
- };
1213
- __name(AgentStateMessage, "AgentStateMessage");
1214
-
1215
- // src/lib/telemetry-client.ts
1216
- var import_shared = require("@copilotkit/shared");
1217
- var packageJson = require_package();
1218
- var telemetryClient = new import_shared.TelemetryClient({
1219
- packageName: packageJson.name,
1220
- packageVersion: packageJson.version
1221
- });
1222
- var telemetry_client_default = telemetryClient;
1223
995
 
1224
996
  // src/service-adapters/events.ts
1225
997
  var RuntimeEventTypes;
@@ -1231,7 +1003,6 @@ var RuntimeEventTypes;
1231
1003
  RuntimeEventTypes2["ActionExecutionArgs"] = "ActionExecutionArgs";
1232
1004
  RuntimeEventTypes2["ActionExecutionEnd"] = "ActionExecutionEnd";
1233
1005
  RuntimeEventTypes2["ActionExecutionResult"] = "ActionExecutionResult";
1234
- RuntimeEventTypes2["AgentStateMessage"] = "AgentStateMessage";
1235
1006
  })(RuntimeEventTypes || (RuntimeEventTypes = {}));
1236
1007
 
1237
1008
  // src/graphql/resolvers/copilot.resolver.ts
@@ -1272,9 +1043,18 @@ var UnknownErrorResponse = class extends FailedResponseStatus {
1272
1043
  };
1273
1044
  __name(UnknownErrorResponse, "UnknownErrorResponse");
1274
1045
 
1046
+ // src/lib/telemetry-client.ts
1047
+ var import_shared = require("@copilotkit/shared");
1048
+ var packageJson = require_package();
1049
+ var telemetryClient = new import_shared.TelemetryClient({
1050
+ packageName: packageJson.name,
1051
+ packageVersion: packageJson.version
1052
+ });
1053
+ var telemetry_client_default = telemetryClient;
1054
+
1275
1055
  // src/graphql/resolvers/copilot.resolver.ts
1276
1056
  var import_shared2 = require("@copilotkit/shared");
1277
- function _ts_decorate14(decorators, target, key, desc) {
1057
+ function _ts_decorate12(decorators, target, key, desc) {
1278
1058
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1279
1059
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1280
1060
  r = Reflect.decorate(decorators, target, key, desc);
@@ -1284,12 +1064,12 @@ function _ts_decorate14(decorators, target, key, desc) {
1284
1064
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1285
1065
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1286
1066
  }
1287
- __name(_ts_decorate14, "_ts_decorate");
1288
- function _ts_metadata14(k, v) {
1067
+ __name(_ts_decorate12, "_ts_decorate");
1068
+ function _ts_metadata12(k, v) {
1289
1069
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1290
1070
  return Reflect.metadata(k, v);
1291
1071
  }
1292
- __name(_ts_metadata14, "_ts_metadata");
1072
+ __name(_ts_metadata12, "_ts_metadata");
1293
1073
  function _ts_param(paramIndex, decorator) {
1294
1074
  return function(target, key) {
1295
1075
  decorator(target, key, paramIndex);
@@ -1298,6 +1078,7 @@ function _ts_param(paramIndex, decorator) {
1298
1078
  __name(_ts_param, "_ts_param");
1299
1079
  var invokeGuardrails = /* @__PURE__ */ __name(async ({ baseUrl, copilotCloudPublicApiKey, data, onResult, onError }) => {
1300
1080
  var _a;
1081
+ console.log("invokeGuardrails.baseUrl", baseUrl);
1301
1082
  if (data.messages.length && ((_a = data.messages[data.messages.length - 1].textMessage) == null ? void 0 : _a.role) === MessageRole.user) {
1302
1083
  const messages = data.messages.filter((m) => m.textMessage !== void 0 && (m.textMessage.role === MessageRole.user || m.textMessage.role === MessageRole.assistant)).map((m) => ({
1303
1084
  role: m.textMessage.role,
@@ -1343,6 +1124,8 @@ var CopilotResolver = class {
1343
1124
  logger2.debug({
1344
1125
  data
1345
1126
  }, "Generating Copilot response");
1127
+ const copilotRuntime = ctx._copilotkit.runtime;
1128
+ const serviceAdapter = ctx._copilotkit.serviceAdapter;
1346
1129
  if (properties) {
1347
1130
  logger2.debug("Properties provided, merging with context properties");
1348
1131
  ctx.properties = {
@@ -1350,8 +1133,6 @@ var CopilotResolver = class {
1350
1133
  ...properties
1351
1134
  };
1352
1135
  }
1353
- const copilotRuntime = ctx._copilotkit.runtime;
1354
- const serviceAdapter = ctx._copilotkit.serviceAdapter;
1355
1136
  let copilotCloudPublicApiKey = null;
1356
1137
  let copilotCloudBaseUrl;
1357
1138
  if (data.cloud) {
@@ -1390,18 +1171,16 @@ var CopilotResolver = class {
1390
1171
  rejectOutputMessagesPromise = reject;
1391
1172
  });
1392
1173
  logger2.debug("Processing");
1393
- const { eventSource, threadId = (0, import_shared2.randomId)(), runId, serverSideActions, actionInputsWithoutAgents } = await copilotRuntime.processRuntimeRequest({
1174
+ const { eventSource, threadId = (0, import_shared2.randomId)(), runId, actions } = await copilotRuntime.process({
1394
1175
  serviceAdapter,
1395
1176
  messages: data.messages,
1396
1177
  actions: data.frontend.actions,
1397
1178
  threadId: data.threadId,
1398
1179
  runId: data.runId,
1399
1180
  publicApiKey: void 0,
1181
+ properties: ctx.properties || {},
1400
1182
  outputMessagesPromise,
1401
- graphqlContext: ctx,
1402
1183
  forwardedParameters: data.forwardedParameters,
1403
- agentSession: data.agentSession,
1404
- agentStates: data.agentStates,
1405
1184
  url: data.frontend.url
1406
1185
  });
1407
1186
  logger2.debug("Event source created, creating response");
@@ -1459,13 +1238,9 @@ var CopilotResolver = class {
1459
1238
  });
1460
1239
  }
1461
1240
  let eventStreamSubscription;
1462
- const eventStream = eventSource.processRuntimeEvents({
1463
- serverSideActions,
1464
- guardrailsResult$: ((_b2 = data.cloud) == null ? void 0 : _b2.guardrails) ? guardrailsResult$ : null,
1465
- actionInputsWithoutAgents: actionInputsWithoutAgents.filter(
1466
- // TODO-AGENTS: do not exclude ALL server side actions
1467
- (action) => !serverSideActions.find((serverSideAction) => serverSideAction.name == action.name)
1468
- )
1241
+ const eventStream = eventSource.process({
1242
+ serversideActions: actions,
1243
+ guardrailsResult$: ((_b2 = data.cloud) == null ? void 0 : _b2.guardrails) ? guardrailsResult$ : null
1469
1244
  }).pipe(
1470
1245
  // shareReplay() ensures that later subscribers will see the whole stream instead of
1471
1246
  // just the events that were emitted after the subscriber was added.
@@ -1613,36 +1388,6 @@ var CopilotResolver = class {
1613
1388
  result: event.result
1614
1389
  }));
1615
1390
  break;
1616
- case RuntimeEventTypes.AgentStateMessage:
1617
- logger2.debug({
1618
- event
1619
- }, "Agent message event received");
1620
- pushMessage({
1621
- id: (0, import_shared2.randomId)(),
1622
- status: new SuccessMessageStatus(),
1623
- threadId: event.threadId,
1624
- agentName: event.agentName,
1625
- nodeName: event.nodeName,
1626
- runId: event.runId,
1627
- active: event.active,
1628
- state: event.state,
1629
- running: event.running,
1630
- role: MessageRole.assistant,
1631
- createdAt: /* @__PURE__ */ new Date()
1632
- });
1633
- outputMessages.push((0, import_class_transformer.plainToInstance)(AgentStateMessage, {
1634
- id: (0, import_shared2.randomId)(),
1635
- threadId: event.threadId,
1636
- agentName: event.agentName,
1637
- nodeName: event.nodeName,
1638
- runId: event.runId,
1639
- active: event.active,
1640
- state: event.state,
1641
- running: event.running,
1642
- role: MessageRole.assistant,
1643
- createdAt: /* @__PURE__ */ new Date()
1644
- }));
1645
- break;
1646
1391
  }
1647
1392
  },
1648
1393
  error: (err) => {
@@ -1675,29 +1420,29 @@ var CopilotResolver = class {
1675
1420
  }
1676
1421
  };
1677
1422
  __name(CopilotResolver, "CopilotResolver");
1678
- _ts_decorate14([
1679
- (0, import_type_graphql15.Query)(() => String),
1680
- _ts_metadata14("design:type", Function),
1681
- _ts_metadata14("design:paramtypes", []),
1682
- _ts_metadata14("design:returntype", Promise)
1423
+ _ts_decorate12([
1424
+ (0, import_type_graphql13.Query)(() => String),
1425
+ _ts_metadata12("design:type", Function),
1426
+ _ts_metadata12("design:paramtypes", []),
1427
+ _ts_metadata12("design:returntype", Promise)
1683
1428
  ], CopilotResolver.prototype, "hello", null);
1684
- _ts_decorate14([
1685
- (0, import_type_graphql15.Mutation)(() => CopilotResponse),
1686
- _ts_param(0, (0, import_type_graphql15.Ctx)()),
1687
- _ts_param(1, (0, import_type_graphql15.Arg)("data")),
1688
- _ts_param(2, (0, import_type_graphql15.Arg)("properties", () => import_graphql_scalars2.GraphQLJSONObject, {
1429
+ _ts_decorate12([
1430
+ (0, import_type_graphql13.Mutation)(() => CopilotResponse),
1431
+ _ts_param(0, (0, import_type_graphql13.Ctx)()),
1432
+ _ts_param(1, (0, import_type_graphql13.Arg)("data")),
1433
+ _ts_param(2, (0, import_type_graphql13.Arg)("properties", () => import_graphql_scalars2.GraphQLJSONObject, {
1689
1434
  nullable: true
1690
1435
  })),
1691
- _ts_metadata14("design:type", Function),
1692
- _ts_metadata14("design:paramtypes", [
1436
+ _ts_metadata12("design:type", Function),
1437
+ _ts_metadata12("design:paramtypes", [
1693
1438
  typeof GraphQLContext === "undefined" ? Object : GraphQLContext,
1694
1439
  typeof GenerateCopilotResponseInput === "undefined" ? Object : GenerateCopilotResponseInput,
1695
1440
  typeof CopilotRequestContextProperties === "undefined" ? Object : CopilotRequestContextProperties
1696
1441
  ]),
1697
- _ts_metadata14("design:returntype", Promise)
1442
+ _ts_metadata12("design:returntype", Promise)
1698
1443
  ], CopilotResolver.prototype, "generateCopilotResponse", null);
1699
- CopilotResolver = _ts_decorate14([
1700
- (0, import_type_graphql15.Resolver)(() => CopilotResponse)
1444
+ CopilotResolver = _ts_decorate12([
1445
+ (0, import_type_graphql13.Resolver)(() => CopilotResponse)
1701
1446
  ], CopilotResolver);
1702
1447
 
1703
1448
  // src/lib/integrations/shared.ts
@@ -1752,7 +1497,7 @@ async function createContext(initialContext, copilotKitContext, contextLogger, p
1752
1497
  __name(createContext, "createContext");
1753
1498
  function buildSchema(options = {}) {
1754
1499
  logger.debug("Building GraphQL schema...");
1755
- const schema = (0, import_type_graphql16.buildSchemaSync)({
1500
+ const schema = (0, import_type_graphql14.buildSchemaSync)({
1756
1501
  resolvers: [
1757
1502
  CopilotResolver
1758
1503
  ],