@inkeep/agents-cli 0.14.16 → 0.16.0

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 (2) hide show
  1. package/dist/index.js +1319 -1139
  2. package/package.json +8 -7
package/dist/index.js CHANGED
@@ -49,14 +49,14 @@ var init_esm_shims = __esm({
49
49
 
50
50
  // ../packages/agents-core/src/api-client/base-client.ts
51
51
  async function apiFetch(url, options = {}) {
52
- const headers = {
52
+ const headers2 = {
53
53
  "Content-Type": "application/json",
54
54
  Accept: "application/json",
55
55
  ...options.headers || {}
56
56
  };
57
57
  return fetch(url, {
58
58
  ...options,
59
- headers
59
+ headers: headers2
60
60
  });
61
61
  }
62
62
  var init_base_client = __esm({
@@ -66,6 +66,62 @@ var init_base_client = __esm({
66
66
  }
67
67
  });
68
68
 
69
+ // ../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
70
+ import { webcrypto as crypto2 } from "crypto";
71
+ function fillPool(bytes) {
72
+ if (!pool || pool.length < bytes) {
73
+ pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
74
+ crypto2.getRandomValues(pool);
75
+ poolOffset = 0;
76
+ } else if (poolOffset + bytes > pool.length) {
77
+ crypto2.getRandomValues(pool);
78
+ poolOffset = 0;
79
+ }
80
+ poolOffset += bytes;
81
+ }
82
+ function random(bytes) {
83
+ fillPool(bytes |= 0);
84
+ return pool.subarray(poolOffset - bytes, poolOffset);
85
+ }
86
+ function customRandom(alphabet, defaultSize, getRandom) {
87
+ let mask = (2 << 31 - Math.clz32(alphabet.length - 1 | 1)) - 1;
88
+ let step = Math.ceil(1.6 * mask * defaultSize / alphabet.length);
89
+ return (size = defaultSize) => {
90
+ if (!size) return "";
91
+ let id = "";
92
+ while (true) {
93
+ let bytes = getRandom(step);
94
+ let i2 = step;
95
+ while (i2--) {
96
+ id += alphabet[bytes[i2] & mask] || "";
97
+ if (id.length >= size) return id;
98
+ }
99
+ }
100
+ };
101
+ }
102
+ function customAlphabet(alphabet, size = 21) {
103
+ return customRandom(alphabet, size, random);
104
+ }
105
+ var POOL_SIZE_MULTIPLIER, pool, poolOffset;
106
+ var init_nanoid = __esm({
107
+ "../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js"() {
108
+ "use strict";
109
+ init_esm_shims();
110
+ POOL_SIZE_MULTIPLIER = 128;
111
+ }
112
+ });
113
+
114
+ // ../packages/agents-core/src/utils/conversations.ts
115
+ var generateId;
116
+ var init_conversations = __esm({
117
+ "../packages/agents-core/src/utils/conversations.ts"() {
118
+ "use strict";
119
+ init_esm_shims();
120
+ init_nanoid();
121
+ generateId = customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789", 21);
122
+ }
123
+ });
124
+
69
125
  // ../packages/agents-core/src/utils/logger.ts
70
126
  import pino from "pino";
71
127
  import pinoPretty from "pino-pretty";
@@ -202,22 +258,22 @@ var init_logger = __esm({
202
258
  */
203
259
  getLogger(name) {
204
260
  if (this.loggers.has(name)) {
205
- const logger14 = this.loggers.get(name);
206
- if (!logger14) {
261
+ const logger15 = this.loggers.get(name);
262
+ if (!logger15) {
207
263
  throw new Error(`Logger '${name}' not found in cache`);
208
264
  }
209
- return logger14;
265
+ return logger15;
210
266
  }
211
- let logger13;
267
+ let logger14;
212
268
  if (this.config.loggerFactory) {
213
- logger13 = this.config.loggerFactory(name);
269
+ logger14 = this.config.loggerFactory(name);
214
270
  } else if (this.config.defaultLogger) {
215
- logger13 = this.config.defaultLogger;
271
+ logger14 = this.config.defaultLogger;
216
272
  } else {
217
- logger13 = new PinoLogger(name, this.config.pinoConfig);
273
+ logger14 = new PinoLogger(name, this.config.pinoConfig);
218
274
  }
219
- this.loggers.set(name, logger13);
220
- return logger13;
275
+ this.loggers.set(name, logger14);
276
+ return logger14;
221
277
  }
222
278
  /**
223
279
  * Reset factory to default state
@@ -231,7 +287,19 @@ var init_logger = __esm({
231
287
  }
232
288
  });
233
289
 
234
- // ../node_modules/.pnpm/@asteasolutions+zod-to-openapi@8.1.0_zod@4.1.11/node_modules/@asteasolutions/zod-to-openapi/dist/index.mjs
290
+ // ../packages/agents-core/src/utils/schema-conversion.ts
291
+ import { z } from "zod";
292
+ var logger;
293
+ var init_schema_conversion = __esm({
294
+ "../packages/agents-core/src/utils/schema-conversion.ts"() {
295
+ "use strict";
296
+ init_esm_shims();
297
+ init_logger();
298
+ logger = getLogger("schema-conversion");
299
+ }
300
+ });
301
+
302
+ // ../node_modules/.pnpm/@asteasolutions+zod-to-openapi@8.1.0_zod@4.1.12/node_modules/@asteasolutions/zod-to-openapi/dist/index.mjs
235
303
  function __rest(s2, e2) {
236
304
  var t2 = {};
237
305
  for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)
@@ -363,7 +431,7 @@ function getOpenApiConfiguration(refOrOpenapi, metadataOrOptions, options) {
363
431
  }
364
432
  var ZodTypeKeys, $ZodRegistry, zodToOpenAPIRegistry, Metadata;
365
433
  var init_dist = __esm({
366
- "../node_modules/.pnpm/@asteasolutions+zod-to-openapi@8.1.0_zod@4.1.11/node_modules/@asteasolutions/zod-to-openapi/dist/index.mjs"() {
434
+ "../node_modules/.pnpm/@asteasolutions+zod-to-openapi@8.1.0_zod@4.1.12/node_modules/@asteasolutions/zod-to-openapi/dist/index.mjs"() {
367
435
  "use strict";
368
436
  init_esm_shims();
369
437
  ZodTypeKeys = {
@@ -556,10 +624,10 @@ var init_dist = __esm({
556
624
  }
557
625
  });
558
626
 
559
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/url.js
627
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/url.js
560
628
  var tryDecode, _decodeURI, _getQueryParam, getQueryParam, getQueryParams, decodeURIComponent_;
561
629
  var init_url = __esm({
562
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/url.js"() {
630
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/url.js"() {
563
631
  "use strict";
564
632
  init_esm_shims();
565
633
  tryDecode = (str, decoder) => {
@@ -656,52 +724,52 @@ var init_url = __esm({
656
724
  }
657
725
  });
658
726
 
659
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/cookie.js
727
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/cookie.js
660
728
  var init_cookie = __esm({
661
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/cookie.js"() {
729
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/cookie.js"() {
662
730
  "use strict";
663
731
  init_esm_shims();
664
732
  init_url();
665
733
  }
666
734
  });
667
735
 
668
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/helper/cookie/index.js
736
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/helper/cookie/index.js
669
737
  var init_cookie2 = __esm({
670
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/helper/cookie/index.js"() {
738
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/helper/cookie/index.js"() {
671
739
  "use strict";
672
740
  init_esm_shims();
673
741
  init_cookie();
674
742
  }
675
743
  });
676
744
 
677
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/http-exception.js
745
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/http-exception.js
678
746
  var init_http_exception = __esm({
679
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/http-exception.js"() {
747
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/http-exception.js"() {
680
748
  "use strict";
681
749
  init_esm_shims();
682
750
  }
683
751
  });
684
752
 
685
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/crypto.js
753
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/crypto.js
686
754
  var init_crypto = __esm({
687
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/crypto.js"() {
755
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/crypto.js"() {
688
756
  "use strict";
689
757
  init_esm_shims();
690
758
  }
691
759
  });
692
760
 
693
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/buffer.js
761
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/buffer.js
694
762
  var init_buffer = __esm({
695
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/buffer.js"() {
763
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/buffer.js"() {
696
764
  "use strict";
697
765
  init_esm_shims();
698
766
  init_crypto();
699
767
  }
700
768
  });
701
769
 
702
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/validator/validator.js
770
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/validator/validator.js
703
771
  var init_validator = __esm({
704
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/validator/validator.js"() {
772
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/validator/validator.js"() {
705
773
  "use strict";
706
774
  init_esm_shims();
707
775
  init_cookie2();
@@ -710,43 +778,43 @@ var init_validator = __esm({
710
778
  }
711
779
  });
712
780
 
713
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/validator/index.js
781
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/validator/index.js
714
782
  var init_validator2 = __esm({
715
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/validator/index.js"() {
783
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/validator/index.js"() {
716
784
  "use strict";
717
785
  init_esm_shims();
718
786
  init_validator();
719
787
  }
720
788
  });
721
789
 
722
- // ../node_modules/.pnpm/@hono+zod-validator@0.7.3_hono@4.9.9_zod@4.1.11/node_modules/@hono/zod-validator/dist/index.js
790
+ // ../node_modules/.pnpm/@hono+zod-validator@0.7.3_hono@4.9.10_zod@4.1.12/node_modules/@hono/zod-validator/dist/index.js
723
791
  var init_dist2 = __esm({
724
- "../node_modules/.pnpm/@hono+zod-validator@0.7.3_hono@4.9.9_zod@4.1.11/node_modules/@hono/zod-validator/dist/index.js"() {
792
+ "../node_modules/.pnpm/@hono+zod-validator@0.7.3_hono@4.9.10_zod@4.1.12/node_modules/@hono/zod-validator/dist/index.js"() {
725
793
  "use strict";
726
794
  init_esm_shims();
727
795
  init_validator2();
728
796
  }
729
797
  });
730
798
 
731
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/compose.js
799
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/compose.js
732
800
  var init_compose = __esm({
733
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/compose.js"() {
801
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/compose.js"() {
734
802
  "use strict";
735
803
  init_esm_shims();
736
804
  }
737
805
  });
738
806
 
739
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/request/constants.js
807
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/request/constants.js
740
808
  var GET_MATCH_RESULT;
741
809
  var init_constants = __esm({
742
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/request/constants.js"() {
810
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/request/constants.js"() {
743
811
  "use strict";
744
812
  init_esm_shims();
745
813
  GET_MATCH_RESULT = Symbol();
746
814
  }
747
815
  });
748
816
 
749
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/body.js
817
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/body.js
750
818
  async function parseFormData(request, options) {
751
819
  const formData = await request.formData();
752
820
  if (formData) {
@@ -777,14 +845,14 @@ function convertFormDataToBodyData(formData, options) {
777
845
  }
778
846
  var parseBody, handleParsingAllValues, handleParsingNestedValues;
779
847
  var init_body = __esm({
780
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/body.js"() {
848
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/body.js"() {
781
849
  "use strict";
782
850
  init_esm_shims();
783
851
  init_request();
784
852
  parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) => {
785
853
  const { all = false, dot = false } = options;
786
- const headers = request instanceof HonoRequest ? request.raw.headers : request.headers;
787
- const contentType = headers.get("Content-Type");
854
+ const headers2 = request instanceof HonoRequest ? request.raw.headers : request.headers;
855
+ const contentType = headers2.get("Content-Type");
788
856
  if (contentType?.startsWith("multipart/form-data") || contentType?.startsWith("application/x-www-form-urlencoded")) {
789
857
  return parseFormData(request, { all, dot });
790
858
  }
@@ -823,10 +891,10 @@ var init_body = __esm({
823
891
  }
824
892
  });
825
893
 
826
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/request.js
894
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/request.js
827
895
  var tryDecodeURIComponent, HonoRequest;
828
896
  var init_request = __esm({
829
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/request.js"() {
897
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/request.js"() {
830
898
  "use strict";
831
899
  init_esm_shims();
832
900
  init_constants();
@@ -944,17 +1012,17 @@ var init_request = __esm({
944
1012
  }
945
1013
  });
946
1014
 
947
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/html.js
1015
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/html.js
948
1016
  var init_html = __esm({
949
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/html.js"() {
1017
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/html.js"() {
950
1018
  "use strict";
951
1019
  init_esm_shims();
952
1020
  }
953
1021
  });
954
1022
 
955
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/context.js
1023
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/context.js
956
1024
  var init_context = __esm({
957
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/context.js"() {
1025
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/context.js"() {
958
1026
  "use strict";
959
1027
  init_esm_shims();
960
1028
  init_request();
@@ -962,25 +1030,25 @@ var init_context = __esm({
962
1030
  }
963
1031
  });
964
1032
 
965
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router.js
1033
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router.js
966
1034
  var init_router = __esm({
967
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router.js"() {
1035
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router.js"() {
968
1036
  "use strict";
969
1037
  init_esm_shims();
970
1038
  }
971
1039
  });
972
1040
 
973
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/constants.js
1041
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/constants.js
974
1042
  var init_constants2 = __esm({
975
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/constants.js"() {
1043
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/utils/constants.js"() {
976
1044
  "use strict";
977
1045
  init_esm_shims();
978
1046
  }
979
1047
  });
980
1048
 
981
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/hono-base.js
1049
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/hono-base.js
982
1050
  var init_hono_base = __esm({
983
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/hono-base.js"() {
1051
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/hono-base.js"() {
984
1052
  "use strict";
985
1053
  init_esm_shims();
986
1054
  init_compose();
@@ -991,10 +1059,10 @@ var init_hono_base = __esm({
991
1059
  }
992
1060
  });
993
1061
 
994
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/node.js
1062
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/reg-exp-router/node.js
995
1063
  var PATH_ERROR, regExpMetaChars;
996
1064
  var init_node = __esm({
997
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/node.js"() {
1065
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/reg-exp-router/node.js"() {
998
1066
  "use strict";
999
1067
  init_esm_shims();
1000
1068
  PATH_ERROR = Symbol();
@@ -1002,18 +1070,18 @@ var init_node = __esm({
1002
1070
  }
1003
1071
  });
1004
1072
 
1005
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/trie.js
1073
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/reg-exp-router/trie.js
1006
1074
  var init_trie = __esm({
1007
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/trie.js"() {
1075
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/reg-exp-router/trie.js"() {
1008
1076
  "use strict";
1009
1077
  init_esm_shims();
1010
1078
  init_node();
1011
1079
  }
1012
1080
  });
1013
1081
 
1014
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/router.js
1082
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/reg-exp-router/router.js
1015
1083
  var init_router2 = __esm({
1016
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/router.js"() {
1084
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/reg-exp-router/router.js"() {
1017
1085
  "use strict";
1018
1086
  init_esm_shims();
1019
1087
  init_router();
@@ -1023,36 +1091,36 @@ var init_router2 = __esm({
1023
1091
  }
1024
1092
  });
1025
1093
 
1026
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/index.js
1094
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/reg-exp-router/index.js
1027
1095
  var init_reg_exp_router = __esm({
1028
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/index.js"() {
1096
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/reg-exp-router/index.js"() {
1029
1097
  "use strict";
1030
1098
  init_esm_shims();
1031
1099
  init_router2();
1032
1100
  }
1033
1101
  });
1034
1102
 
1035
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/smart-router/router.js
1103
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/smart-router/router.js
1036
1104
  var init_router3 = __esm({
1037
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/smart-router/router.js"() {
1105
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/smart-router/router.js"() {
1038
1106
  "use strict";
1039
1107
  init_esm_shims();
1040
1108
  init_router();
1041
1109
  }
1042
1110
  });
1043
1111
 
1044
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/smart-router/index.js
1112
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/smart-router/index.js
1045
1113
  var init_smart_router = __esm({
1046
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/smart-router/index.js"() {
1114
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/smart-router/index.js"() {
1047
1115
  "use strict";
1048
1116
  init_esm_shims();
1049
1117
  init_router3();
1050
1118
  }
1051
1119
  });
1052
1120
 
1053
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/node.js
1121
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/trie-router/node.js
1054
1122
  var init_node2 = __esm({
1055
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/node.js"() {
1123
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/trie-router/node.js"() {
1056
1124
  "use strict";
1057
1125
  init_esm_shims();
1058
1126
  init_router();
@@ -1060,9 +1128,9 @@ var init_node2 = __esm({
1060
1128
  }
1061
1129
  });
1062
1130
 
1063
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/router.js
1131
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/trie-router/router.js
1064
1132
  var init_router4 = __esm({
1065
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/router.js"() {
1133
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/trie-router/router.js"() {
1066
1134
  "use strict";
1067
1135
  init_esm_shims();
1068
1136
  init_url();
@@ -1070,18 +1138,18 @@ var init_router4 = __esm({
1070
1138
  }
1071
1139
  });
1072
1140
 
1073
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/index.js
1141
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/trie-router/index.js
1074
1142
  var init_trie_router = __esm({
1075
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/index.js"() {
1143
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/router/trie-router/index.js"() {
1076
1144
  "use strict";
1077
1145
  init_esm_shims();
1078
1146
  init_router4();
1079
1147
  }
1080
1148
  });
1081
1149
 
1082
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/hono.js
1150
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/hono.js
1083
1151
  var init_hono = __esm({
1084
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/hono.js"() {
1152
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/hono.js"() {
1085
1153
  "use strict";
1086
1154
  init_esm_shims();
1087
1155
  init_hono_base();
@@ -1091,31 +1159,31 @@ var init_hono = __esm({
1091
1159
  }
1092
1160
  });
1093
1161
 
1094
- // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/index.js
1162
+ // ../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/index.js
1095
1163
  var init_dist3 = __esm({
1096
- "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/index.js"() {
1164
+ "../node_modules/.pnpm/hono@4.9.10/node_modules/hono/dist/index.js"() {
1097
1165
  "use strict";
1098
1166
  init_esm_shims();
1099
1167
  init_hono();
1100
1168
  }
1101
1169
  });
1102
1170
 
1103
- // ../node_modules/.pnpm/@hono+zod-openapi@1.1.3_hono@4.9.9_zod@4.1.11/node_modules/@hono/zod-openapi/dist/index.js
1104
- import { z } from "zod";
1171
+ // ../node_modules/.pnpm/@hono+zod-openapi@1.1.3_hono@4.9.10_zod@4.1.12/node_modules/@hono/zod-openapi/dist/index.js
1172
+ import { z as z2 } from "zod";
1105
1173
  var init_dist4 = __esm({
1106
- "../node_modules/.pnpm/@hono+zod-openapi@1.1.3_hono@4.9.9_zod@4.1.11/node_modules/@hono/zod-openapi/dist/index.js"() {
1174
+ "../node_modules/.pnpm/@hono+zod-openapi@1.1.3_hono@4.9.10_zod@4.1.12/node_modules/@hono/zod-openapi/dist/index.js"() {
1107
1175
  "use strict";
1108
1176
  init_esm_shims();
1109
1177
  init_dist();
1110
1178
  init_dist2();
1111
1179
  init_dist3();
1112
1180
  init_url();
1113
- extendZodWithOpenApi(z);
1181
+ extendZodWithOpenApi(z2);
1114
1182
  }
1115
1183
  });
1116
1184
 
1117
- // ../node_modules/.pnpm/drizzle-zod@0.8.3_drizzle-orm@0.44.5_@libsql+client@0.15.15_@opentelemetry+api@1.9.0_@types+pg@8.15.5__zod@4.1.11/node_modules/drizzle-zod/index.mjs
1118
- import { z as z2 } from "zod/v4";
1185
+ // ../node_modules/.pnpm/drizzle-zod@0.8.3_drizzle-orm@0.44.6_@libsql+client@0.15.15_@opentelemetry+api@1.9.0_@types+pg@8.15.5__zod@4.1.12/node_modules/drizzle-zod/index.mjs
1186
+ import { z as z3 } from "zod/v4";
1119
1187
  import { isTable, getTableColumns, getViewSelectedFields, is, Column, SQL, isView } from "drizzle-orm";
1120
1188
  function isColumnType(column, columnTypes) {
1121
1189
  return columnTypes.includes(column.columnType);
@@ -1124,7 +1192,7 @@ function isWithEnum(column) {
1124
1192
  return "enumValues" in column && Array.isArray(column.enumValues) && column.enumValues.length > 0;
1125
1193
  }
1126
1194
  function columnToSchema(column, factory) {
1127
- const z$1 = factory?.zodInstance ?? z2;
1195
+ const z$1 = factory?.zodInstance ?? z3;
1128
1196
  const coerce = factory?.coerce ?? {};
1129
1197
  let schema;
1130
1198
  if (isWithEnum(column)) {
@@ -1174,7 +1242,7 @@ function columnToSchema(column, factory) {
1174
1242
  }
1175
1243
  return schema;
1176
1244
  }
1177
- function numberColumnToSchema(column, z11, coerce) {
1245
+ function numberColumnToSchema(column, z12, coerce) {
1178
1246
  let unsigned = column.getSQLType().includes("unsigned");
1179
1247
  let min;
1180
1248
  let max;
@@ -1242,20 +1310,20 @@ function numberColumnToSchema(column, z11, coerce) {
1242
1310
  min = Number.MIN_SAFE_INTEGER;
1243
1311
  max = Number.MAX_SAFE_INTEGER;
1244
1312
  }
1245
- let schema = coerce === true || coerce?.number ? integer2 ? z11.coerce.number() : z11.coerce.number().int() : integer2 ? z11.int() : z11.number();
1313
+ let schema = coerce === true || coerce?.number ? integer2 ? z12.coerce.number() : z12.coerce.number().int() : integer2 ? z12.int() : z12.number();
1246
1314
  schema = schema.gte(min).lte(max);
1247
1315
  return schema;
1248
1316
  }
1249
- function bigintColumnToSchema(column, z11, coerce) {
1317
+ function bigintColumnToSchema(column, z12, coerce) {
1250
1318
  const unsigned = column.getSQLType().includes("unsigned");
1251
1319
  const min = unsigned ? 0n : CONSTANTS.INT64_MIN;
1252
1320
  const max = unsigned ? CONSTANTS.INT64_UNSIGNED_MAX : CONSTANTS.INT64_MAX;
1253
- const schema = coerce === true || coerce?.bigint ? z11.coerce.bigint() : z11.bigint();
1321
+ const schema = coerce === true || coerce?.bigint ? z12.coerce.bigint() : z12.bigint();
1254
1322
  return schema.gte(min).lte(max);
1255
1323
  }
1256
- function stringColumnToSchema(column, z11, coerce) {
1324
+ function stringColumnToSchema(column, z12, coerce) {
1257
1325
  if (isColumnType(column, ["PgUUID"])) {
1258
- return z11.uuid();
1326
+ return z12.uuid();
1259
1327
  }
1260
1328
  let max;
1261
1329
  let regex;
@@ -1287,7 +1355,7 @@ function stringColumnToSchema(column, z11, coerce) {
1287
1355
  regex = /^[01]+$/;
1288
1356
  max = column.dimensions;
1289
1357
  }
1290
- let schema = coerce === true || coerce?.string ? z11.coerce.string() : z11.string();
1358
+ let schema = coerce === true || coerce?.string ? z12.coerce.string() : z12.string();
1291
1359
  schema = regex ? schema.regex(regex) : schema;
1292
1360
  return max && fixed ? schema.length(max) : max ? schema.max(max) : schema;
1293
1361
  }
@@ -1308,7 +1376,7 @@ function handleColumns(columns, refinements, conditions, factory) {
1308
1376
  continue;
1309
1377
  }
1310
1378
  const column = is(selected, Column) ? selected : void 0;
1311
- const schema = column ? columnToSchema(column, factory) : z2.any();
1379
+ const schema = column ? columnToSchema(column, factory) : z3.any();
1312
1380
  const refined = typeof refinement === "function" ? refinement(schema) : schema;
1313
1381
  if (conditions.never(column)) {
1314
1382
  continue;
@@ -1324,15 +1392,15 @@ function handleColumns(columns, refinements, conditions, factory) {
1324
1392
  }
1325
1393
  }
1326
1394
  }
1327
- return z2.object(columnSchemas);
1395
+ return z3.object(columnSchemas);
1328
1396
  }
1329
1397
  function handleEnum(enum_, factory) {
1330
- const zod = factory?.zodInstance ?? z2;
1398
+ const zod = factory?.zodInstance ?? z3;
1331
1399
  return zod.enum(enum_.enumValues);
1332
1400
  }
1333
1401
  var CONSTANTS, isPgEnum, literalSchema, jsonSchema, bufferSchema, selectConditions, insertConditions, createSelectSchema, createInsertSchema;
1334
1402
  var init_drizzle_zod = __esm({
1335
- "../node_modules/.pnpm/drizzle-zod@0.8.3_drizzle-orm@0.44.5_@libsql+client@0.15.15_@opentelemetry+api@1.9.0_@types+pg@8.15.5__zod@4.1.11/node_modules/drizzle-zod/index.mjs"() {
1403
+ "../node_modules/.pnpm/drizzle-zod@0.8.3_drizzle-orm@0.44.6_@libsql+client@0.15.15_@opentelemetry+api@1.9.0_@types+pg@8.15.5__zod@4.1.12/node_modules/drizzle-zod/index.mjs"() {
1336
1404
  "use strict";
1337
1405
  init_esm_shims();
1338
1406
  CONSTANTS = {
@@ -1356,13 +1424,13 @@ var init_drizzle_zod = __esm({
1356
1424
  INT64_UNSIGNED_MAX: 18446744073709551615n
1357
1425
  };
1358
1426
  isPgEnum = isWithEnum;
1359
- literalSchema = z2.union([z2.string(), z2.number(), z2.boolean(), z2.null()]);
1360
- jsonSchema = z2.union([
1427
+ literalSchema = z3.union([z3.string(), z3.number(), z3.boolean(), z3.null()]);
1428
+ jsonSchema = z3.union([
1361
1429
  literalSchema,
1362
- z2.record(z2.string(), z2.any()),
1363
- z2.array(z2.any())
1430
+ z3.record(z3.string(), z3.any()),
1431
+ z3.array(z3.any())
1364
1432
  ]);
1365
- bufferSchema = z2.custom((v2) => v2 instanceof Buffer);
1433
+ bufferSchema = z3.custom((v2) => v2 instanceof Buffer);
1366
1434
  selectConditions = {
1367
1435
  never: () => false,
1368
1436
  optional: () => false,
@@ -1399,7 +1467,7 @@ import {
1399
1467
  text,
1400
1468
  unique
1401
1469
  } from "drizzle-orm/sqlite-core";
1402
- var tenantScoped, projectScoped, graphScoped, agentScoped, uiProperties, timestamps, projects, agentGraph, contextConfigs, contextCache, agents, agentRelations, externalAgents, tasks, taskRelations, dataComponents, agentDataComponents, artifactComponents, agentArtifactComponents, tools, agentToolRelations, conversations, messages, ledgerArtifacts, apiKeys, credentialReferences, tasksRelations, projectsRelations, taskRelationsRelations, contextConfigsRelations, contextCacheRelations, agentsRelations, agentGraphRelations, externalAgentsRelations, apiKeysRelations, agentToolRelationsRelations, credentialReferencesRelations, toolsRelations, conversationsRelations, messagesRelations, artifactComponentsRelations, agentArtifactComponentsRelations, dataComponentsRelations, agentDataComponentsRelations, ledgerArtifactsRelations, agentRelationsRelations;
1470
+ var tenantScoped, projectScoped, graphScoped, agentScoped, uiProperties, timestamps, projects, agentGraph, contextConfigs, contextCache, agents, agentRelations, externalAgents, tasks, taskRelations, dataComponents, agentDataComponents, artifactComponents, agentArtifactComponents, tools, functions, agentToolRelations, conversations, messages, ledgerArtifacts, apiKeys, credentialReferences, tasksRelations, projectsRelations, taskRelationsRelations, contextConfigsRelations, contextCacheRelations, agentsRelations, agentGraphRelations, externalAgentsRelations, apiKeysRelations, agentToolRelationsRelations, credentialReferencesRelations, toolsRelations, conversationsRelations, messagesRelations, artifactComponentsRelations, agentArtifactComponentsRelations, dataComponentsRelations, agentDataComponentsRelations, ledgerArtifactsRelations, functionsRelations, agentRelationsRelations;
1403
1471
  var init_schema = __esm({
1404
1472
  "../packages/agents-core/src/db/schema.ts"() {
1405
1473
  "use strict";
@@ -1437,6 +1505,8 @@ var init_schema = __esm({
1437
1505
  models: text("models", { mode: "json" }).$type(),
1438
1506
  // Project-level stopWhen configuration that can be inherited by graphs and agents
1439
1507
  stopWhen: text("stop_when", { mode: "json" }).$type(),
1508
+ // Project-level sandbox configuration for function execution
1509
+ sandboxConfig: text("sandbox_config", { mode: "json" }).$type(),
1440
1510
  ...timestamps
1441
1511
  },
1442
1512
  (table) => [primaryKey({ columns: [table.tenantId, table.id] })]
@@ -1474,9 +1544,8 @@ var init_schema = __esm({
1474
1544
  "context_configs",
1475
1545
  {
1476
1546
  ...graphScoped,
1477
- ...uiProperties,
1478
1547
  // Developer-defined Zod schema for validating incoming request context
1479
- requestContextSchema: blob("request_context_schema", { mode: "json" }).$type(),
1548
+ headersSchema: blob("headers_schema", { mode: "json" }).$type(),
1480
1549
  // Stores serialized Zod schema
1481
1550
  // Object mapping template keys to fetch definitions that use request context data
1482
1551
  contextVariables: blob("context_variables", { mode: "json" }).$type(),
@@ -1683,8 +1752,7 @@ var init_schema = __esm({
1683
1752
  {
1684
1753
  ...projectScoped,
1685
1754
  ...uiProperties,
1686
- summaryProps: blob("summary_props", { mode: "json" }).$type(),
1687
- fullProps: blob("full_props", { mode: "json" }).$type(),
1755
+ props: blob("props", { mode: "json" }).$type(),
1688
1756
  ...timestamps
1689
1757
  },
1690
1758
  (table) => [
@@ -1730,13 +1798,16 @@ var init_schema = __esm({
1730
1798
  {
1731
1799
  ...projectScoped,
1732
1800
  name: text("name").notNull(),
1733
- // Enhanced MCP configuration
1801
+ description: text("description"),
1802
+ // Tool configuration - supports both MCP and function tools
1734
1803
  config: blob("config", { mode: "json" }).$type().notNull(),
1804
+ // For function tools, reference the global functions table
1805
+ functionId: text("function_id"),
1735
1806
  credentialReferenceId: text("credential_reference_id"),
1736
1807
  headers: blob("headers", { mode: "json" }).$type(),
1737
1808
  // Image URL for custom tool icon (supports regular URLs and base64 encoded images)
1738
1809
  imageUrl: text("image_url"),
1739
- // Server capabilities and status
1810
+ // Server capabilities and status (only for MCP tools)
1740
1811
  capabilities: blob("capabilities", { mode: "json" }).$type(),
1741
1812
  lastError: text("last_error"),
1742
1813
  ...timestamps
@@ -1747,6 +1818,30 @@ var init_schema = __esm({
1747
1818
  columns: [table.tenantId, table.projectId],
1748
1819
  foreignColumns: [projects.tenantId, projects.id],
1749
1820
  name: "tools_project_fk"
1821
+ }).onDelete("cascade"),
1822
+ // Foreign key constraint to functions table (for function tools)
1823
+ foreignKey({
1824
+ columns: [table.tenantId, table.projectId, table.functionId],
1825
+ foreignColumns: [functions.tenantId, functions.projectId, functions.id],
1826
+ name: "tools_function_fk"
1827
+ }).onDelete("cascade")
1828
+ ]
1829
+ );
1830
+ functions = sqliteTable(
1831
+ "functions",
1832
+ {
1833
+ ...projectScoped,
1834
+ inputSchema: blob("input_schema", { mode: "json" }).$type(),
1835
+ executeCode: text("execute_code").notNull(),
1836
+ dependencies: blob("dependencies", { mode: "json" }).$type(),
1837
+ ...timestamps
1838
+ },
1839
+ (table) => [
1840
+ primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
1841
+ foreignKey({
1842
+ columns: [table.tenantId, table.projectId],
1843
+ foreignColumns: [projects.tenantId, projects.id],
1844
+ name: "functions_project_fk"
1750
1845
  }).onDelete("cascade")
1751
1846
  ]
1752
1847
  );
@@ -2081,6 +2176,10 @@ var init_schema = __esm({
2081
2176
  credentialReference: one(credentialReferences, {
2082
2177
  fields: [tools.credentialReferenceId],
2083
2178
  references: [credentialReferences.id]
2179
+ }),
2180
+ function: one(functions, {
2181
+ fields: [tools.functionId],
2182
+ references: [functions.id]
2084
2183
  })
2085
2184
  }));
2086
2185
  conversationsRelations = relations(conversations, ({ one, many }) => ({
@@ -2178,6 +2277,9 @@ var init_schema = __esm({
2178
2277
  references: [tasks.id]
2179
2278
  })
2180
2279
  }));
2280
+ functionsRelations = relations(functions, ({ many }) => ({
2281
+ tools: many(tools)
2282
+ }));
2181
2283
  agentRelationsRelations = relations(agentRelations, ({ one }) => ({
2182
2284
  graph: one(agentGraph, {
2183
2285
  fields: [agentRelations.graphId],
@@ -2226,7 +2328,7 @@ var init_utility = __esm({
2226
2328
  });
2227
2329
 
2228
2330
  // ../packages/agents-core/src/validation/schemas.ts
2229
- var StopWhenSchema, GraphStopWhenSchema, AgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createGraphScopedApiSchema, createGraphScopedApiInsertSchema, createGraphScopedApiUpdateSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, AgentRelationSelectSchema, AgentRelationInsertSchema, AgentRelationUpdateSchema, AgentRelationApiSelectSchema, AgentRelationApiInsertSchema, AgentRelationApiUpdateSchema, AgentRelationQuerySchema, ExternalAgentRelationInsertSchema, ExternalAgentRelationApiInsertSchema, AgentGraphSelectSchema, AgentGraphInsertSchema, AgentGraphUpdateSchema, AgentGraphApiSelectSchema, AgentGraphApiInsertSchema, AgentGraphApiUpdateSchema, TaskSelectSchema, TaskInsertSchema, TaskUpdateSchema, TaskApiSelectSchema, TaskApiInsertSchema, TaskApiUpdateSchema, TaskRelationSelectSchema, TaskRelationInsertSchema, TaskRelationUpdateSchema, TaskRelationApiSelectSchema, TaskRelationApiInsertSchema, TaskRelationApiUpdateSchema, imageUrlSchema, McpTransportConfigSchema, ToolStatusSchema, McpToolDefinitionSchema, ToolSelectSchema, ToolInsertSchema, ConversationSelectSchema, ConversationInsertSchema, ConversationUpdateSchema, ConversationApiSelectSchema, ConversationApiInsertSchema, ConversationApiUpdateSchema, MessageSelectSchema, MessageInsertSchema, MessageUpdateSchema, MessageApiSelectSchema, MessageApiInsertSchema, MessageApiUpdateSchema, ContextCacheSelectSchema, ContextCacheInsertSchema, ContextCacheUpdateSchema, ContextCacheApiSelectSchema, ContextCacheApiInsertSchema, ContextCacheApiUpdateSchema, DataComponentSelectSchema, DataComponentInsertSchema, DataComponentBaseSchema, DataComponentUpdateSchema, DataComponentApiSelectSchema, DataComponentApiInsertSchema, DataComponentApiUpdateSchema, AgentDataComponentSelectSchema, AgentDataComponentInsertSchema, AgentDataComponentUpdateSchema, AgentDataComponentApiSelectSchema, AgentDataComponentApiInsertSchema, AgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, AgentArtifactComponentSelectSchema, AgentArtifactComponentInsertSchema, AgentArtifactComponentUpdateSchema, AgentArtifactComponentApiSelectSchema, AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, AgentToolRelationSelectSchema, AgentToolRelationInsertSchema, AgentToolRelationUpdateSchema, AgentToolRelationApiSelectSchema, AgentToolRelationApiInsertSchema, AgentToolRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, FullGraphAgentInsertSchema, FullGraphDefinitionSchema, GraphWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, HeadersScopeSchema, TenantParamsSchema, TenantProjectParamsSchema, TenantProjectGraphParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectIdParamsSchema, TenantIdParamsSchema, IdParamsSchema, PaginationQueryParamsSchema;
2331
+ var StopWhenSchema, GraphStopWhenSchema, AgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, SandboxConfigSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createGraphScopedApiSchema, createGraphScopedApiInsertSchema, createGraphScopedApiUpdateSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, AgentRelationSelectSchema, AgentRelationInsertSchema, AgentRelationUpdateSchema, AgentRelationApiSelectSchema, AgentRelationApiInsertSchema, AgentRelationApiUpdateSchema, AgentRelationQuerySchema, ExternalAgentRelationInsertSchema, ExternalAgentRelationApiInsertSchema, AgentGraphSelectSchema, AgentGraphInsertSchema, AgentGraphUpdateSchema, AgentGraphApiSelectSchema, AgentGraphApiInsertSchema, AgentGraphApiUpdateSchema, TaskSelectSchema, TaskInsertSchema, TaskUpdateSchema, TaskApiSelectSchema, TaskApiInsertSchema, TaskApiUpdateSchema, TaskRelationSelectSchema, TaskRelationInsertSchema, TaskRelationUpdateSchema, TaskRelationApiSelectSchema, TaskRelationApiInsertSchema, TaskRelationApiUpdateSchema, imageUrlSchema, McpTransportConfigSchema, ToolStatusSchema, McpToolDefinitionSchema, ToolSelectSchema, ToolInsertSchema, ConversationSelectSchema, ConversationInsertSchema, ConversationUpdateSchema, ConversationApiSelectSchema, ConversationApiInsertSchema, ConversationApiUpdateSchema, MessageSelectSchema, MessageInsertSchema, MessageUpdateSchema, MessageApiSelectSchema, MessageApiInsertSchema, MessageApiUpdateSchema, ContextCacheSelectSchema, ContextCacheInsertSchema, ContextCacheUpdateSchema, ContextCacheApiSelectSchema, ContextCacheApiInsertSchema, ContextCacheApiUpdateSchema, DataComponentSelectSchema, DataComponentInsertSchema, DataComponentBaseSchema, DataComponentUpdateSchema, DataComponentApiSelectSchema, DataComponentApiInsertSchema, DataComponentApiUpdateSchema, AgentDataComponentSelectSchema, AgentDataComponentInsertSchema, AgentDataComponentUpdateSchema, AgentDataComponentApiSelectSchema, AgentDataComponentApiInsertSchema, AgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, AgentArtifactComponentSelectSchema, AgentArtifactComponentInsertSchema, AgentArtifactComponentUpdateSchema, AgentArtifactComponentApiSelectSchema, AgentArtifactComponentApiInsertSchema, AgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, AgentToolRelationSelectSchema, AgentToolRelationInsertSchema, AgentToolRelationUpdateSchema, AgentToolRelationApiSelectSchema, AgentToolRelationApiInsertSchema, AgentToolRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, FullGraphAgentInsertSchema, FullGraphDefinitionSchema, GraphWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, HeadersScopeSchema, TenantParamsSchema, TenantProjectParamsSchema, TenantProjectGraphParamsSchema, TenantProjectGraphIdParamsSchema, TenantProjectIdParamsSchema, TenantIdParamsSchema, IdParamsSchema, PaginationQueryParamsSchema;
2230
2332
  var init_schemas = __esm({
2231
2333
  "../packages/agents-core/src/validation/schemas.ts"() {
2232
2334
  "use strict";
@@ -2235,35 +2337,48 @@ var init_schemas = __esm({
2235
2337
  init_drizzle_zod();
2236
2338
  init_schema();
2237
2339
  init_utility();
2238
- StopWhenSchema = z.object({
2239
- transferCountIs: z.number().min(1).max(100).optional(),
2240
- stepCountIs: z.number().min(1).max(1e3).optional()
2340
+ StopWhenSchema = z2.object({
2341
+ transferCountIs: z2.number().min(1).max(100).optional(),
2342
+ stepCountIs: z2.number().min(1).max(1e3).optional()
2241
2343
  });
2242
2344
  GraphStopWhenSchema = StopWhenSchema.pick({ transferCountIs: true });
2243
2345
  AgentStopWhenSchema = StopWhenSchema.pick({ stepCountIs: true });
2244
2346
  MIN_ID_LENGTH = 1;
2245
2347
  MAX_ID_LENGTH = 255;
2246
2348
  URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
2247
- resourceIdSchema = z.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).regex(URL_SAFE_ID_PATTERN, {
2349
+ resourceIdSchema = z2.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).regex(URL_SAFE_ID_PATTERN, {
2248
2350
  message: "ID must contain only letters, numbers, hyphens, underscores, and dots"
2249
2351
  }).openapi({
2250
2352
  description: "Resource identifier",
2251
2353
  example: "resource_789"
2252
2354
  });
2253
- ModelSettingsSchema = z.object({
2254
- model: z.string().optional(),
2255
- providerOptions: z.record(z.string(), z.any()).optional()
2355
+ ModelSettingsSchema = z2.object({
2356
+ model: z2.string().optional(),
2357
+ providerOptions: z2.record(z2.string(), z2.any()).optional()
2256
2358
  });
2257
- ModelSchema = z.object({
2359
+ ModelSchema = z2.object({
2258
2360
  base: ModelSettingsSchema.optional(),
2259
2361
  structuredOutput: ModelSettingsSchema.optional(),
2260
2362
  summarizer: ModelSettingsSchema.optional()
2261
2363
  });
2262
- ProjectModelSchema = z.object({
2364
+ ProjectModelSchema = z2.object({
2263
2365
  base: ModelSettingsSchema,
2264
2366
  structuredOutput: ModelSettingsSchema.optional(),
2265
2367
  summarizer: ModelSettingsSchema.optional()
2266
2368
  });
2369
+ SandboxConfigSchema = z2.object({
2370
+ provider: z2.enum(["vercel", "local"]),
2371
+ runtime: z2.enum(["node22", "typescript"]),
2372
+ timeout: z2.number().min(1e3).max(3e5).optional(),
2373
+ vcpus: z2.number().min(1).max(8).optional()
2374
+ });
2375
+ FunctionToolConfigSchema = z2.object({
2376
+ name: z2.string(),
2377
+ description: z2.string(),
2378
+ inputSchema: z2.record(z2.string(), z2.unknown()),
2379
+ dependencies: z2.record(z2.string(), z2.string()).optional(),
2380
+ execute: z2.union([z2.function(), z2.string()])
2381
+ });
2267
2382
  createApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
2268
2383
  createApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
2269
2384
  createApiUpdateSchema = (schema) => schema.omit({ tenantId: true, projectId: true }).partial();
@@ -2292,7 +2407,7 @@ var init_schemas = __esm({
2292
2407
  AgentRelationApiInsertSchema = createGraphScopedApiInsertSchema(
2293
2408
  AgentRelationInsertSchema
2294
2409
  ).extend({
2295
- relationType: z.enum(VALID_RELATION_TYPES)
2410
+ relationType: z2.enum(VALID_RELATION_TYPES)
2296
2411
  }).refine(
2297
2412
  (data) => {
2298
2413
  const hasTarget = data.targetAgentId != null;
@@ -2307,7 +2422,7 @@ var init_schemas = __esm({
2307
2422
  AgentRelationApiUpdateSchema = createGraphScopedApiUpdateSchema(
2308
2423
  AgentRelationUpdateSchema
2309
2424
  ).extend({
2310
- relationType: z.enum(VALID_RELATION_TYPES).optional()
2425
+ relationType: z2.enum(VALID_RELATION_TYPES).optional()
2311
2426
  }).refine(
2312
2427
  (data) => {
2313
2428
  const hasTarget = data.targetAgentId != null;
@@ -2322,10 +2437,10 @@ var init_schemas = __esm({
2322
2437
  path: ["targetAgentId", "externalAgentId"]
2323
2438
  }
2324
2439
  );
2325
- AgentRelationQuerySchema = z.object({
2326
- sourceAgentId: z.string().optional(),
2327
- targetAgentId: z.string().optional(),
2328
- externalAgentId: z.string().optional()
2440
+ AgentRelationQuerySchema = z2.object({
2441
+ sourceAgentId: z2.string().optional(),
2442
+ targetAgentId: z2.string().optional(),
2443
+ externalAgentId: z2.string().optional()
2329
2444
  });
2330
2445
  ExternalAgentRelationInsertSchema = createInsertSchema(agentRelations).extend({
2331
2446
  id: resourceIdSchema,
@@ -2365,7 +2480,7 @@ var init_schemas = __esm({
2365
2480
  TaskRelationApiSelectSchema = createApiSchema(TaskRelationSelectSchema);
2366
2481
  TaskRelationApiInsertSchema = createApiInsertSchema(TaskRelationInsertSchema);
2367
2482
  TaskRelationApiUpdateSchema = createApiUpdateSchema(TaskRelationUpdateSchema);
2368
- imageUrlSchema = z.string().optional().refine(
2483
+ imageUrlSchema = z2.string().optional().refine(
2369
2484
  (url) => {
2370
2485
  if (!url) return true;
2371
2486
  if (url.startsWith("data:image/")) {
@@ -2384,23 +2499,49 @@ var init_schemas = __esm({
2384
2499
  message: "Image URL must be a valid HTTP(S) URL or a base64 data URL (max 1MB)"
2385
2500
  }
2386
2501
  );
2387
- McpTransportConfigSchema = z.object({
2388
- type: z.enum(MCPTransportType),
2389
- requestInit: z.record(z.string(), z.unknown()).optional(),
2390
- eventSourceInit: z.record(z.string(), z.unknown()).optional(),
2391
- reconnectionOptions: z.custom().optional(),
2392
- sessionId: z.string().optional()
2502
+ McpTransportConfigSchema = z2.object({
2503
+ type: z2.enum(MCPTransportType),
2504
+ requestInit: z2.record(z2.string(), z2.unknown()).optional(),
2505
+ eventSourceInit: z2.record(z2.string(), z2.unknown()).optional(),
2506
+ reconnectionOptions: z2.custom().optional(),
2507
+ sessionId: z2.string().optional()
2393
2508
  });
2394
- ToolStatusSchema = z.enum(TOOL_STATUS_VALUES);
2395
- McpToolDefinitionSchema = z.object({
2396
- name: z.string(),
2397
- description: z.string().optional(),
2398
- inputSchema: z.record(z.string(), z.unknown()).optional()
2509
+ ToolStatusSchema = z2.enum(TOOL_STATUS_VALUES);
2510
+ McpToolDefinitionSchema = z2.object({
2511
+ name: z2.string(),
2512
+ description: z2.string().optional(),
2513
+ inputSchema: z2.record(z2.string(), z2.unknown()).optional()
2399
2514
  });
2400
2515
  ToolSelectSchema = createSelectSchema(tools);
2401
2516
  ToolInsertSchema = createInsertSchema(tools).extend({
2402
2517
  id: resourceIdSchema,
2403
- imageUrl: imageUrlSchema
2518
+ imageUrl: imageUrlSchema,
2519
+ functionId: resourceIdSchema.optional(),
2520
+ // For function tools, reference to global functions table
2521
+ config: z2.discriminatedUnion("type", [
2522
+ // MCP tools
2523
+ z2.object({
2524
+ type: z2.literal("mcp"),
2525
+ mcp: z2.object({
2526
+ server: z2.object({
2527
+ url: z2.string().url()
2528
+ }),
2529
+ transport: z2.object({
2530
+ type: z2.enum(MCPTransportType),
2531
+ requestInit: z2.record(z2.string(), z2.unknown()).optional(),
2532
+ eventSourceInit: z2.record(z2.string(), z2.unknown()).optional(),
2533
+ reconnectionOptions: z2.custom().optional(),
2534
+ sessionId: z2.string().optional()
2535
+ }).optional(),
2536
+ activeTools: z2.array(z2.string()).optional()
2537
+ })
2538
+ }),
2539
+ // Function tools (reference-only, no inline duplication)
2540
+ z2.object({
2541
+ type: z2.literal("function")
2542
+ // No inline function details - they're in the functions table via functionId
2543
+ })
2544
+ ])
2404
2545
  });
2405
2546
  ConversationSelectSchema = createSelectSchema(conversations);
2406
2547
  ConversationInsertSchema = createInsertSchema(conversations).extend({
@@ -2491,8 +2632,8 @@ var init_schemas = __esm({
2491
2632
  AgentArtifactComponentUpdateSchema
2492
2633
  );
2493
2634
  ExternalAgentSelectSchema = createSelectSchema(externalAgents).extend({
2494
- credentialReferenceId: z.string().nullable().optional(),
2495
- headers: z.record(z.string(), z.string()).nullable().optional()
2635
+ credentialReferenceId: z2.string().nullable().optional(),
2636
+ headers: z2.record(z2.string(), z2.string()).nullable().optional()
2496
2637
  });
2497
2638
  ExternalAgentInsertSchema = createInsertSchema(externalAgents).extend({
2498
2639
  id: resourceIdSchema
@@ -2501,9 +2642,9 @@ var init_schemas = __esm({
2501
2642
  ExternalAgentApiSelectSchema = createGraphScopedApiSchema(ExternalAgentSelectSchema);
2502
2643
  ExternalAgentApiInsertSchema = createGraphScopedApiInsertSchema(ExternalAgentInsertSchema);
2503
2644
  ExternalAgentApiUpdateSchema = createGraphScopedApiUpdateSchema(ExternalAgentUpdateSchema);
2504
- AllAgentSchema = z.discriminatedUnion("type", [
2505
- AgentApiSelectSchema.extend({ type: z.literal("internal") }),
2506
- ExternalAgentApiSelectSchema.extend({ type: z.literal("external") })
2645
+ AllAgentSchema = z2.discriminatedUnion("type", [
2646
+ AgentApiSelectSchema.extend({ type: z2.literal("internal") }),
2647
+ ExternalAgentApiSelectSchema.extend({ type: z2.literal("external") })
2507
2648
  ]);
2508
2649
  ApiKeySelectSchema = createSelectSchema(apiKeys);
2509
2650
  ApiKeyInsertSchema = createInsertSchema(apiKeys).extend({
@@ -2525,10 +2666,10 @@ var init_schemas = __esm({
2525
2666
  keyHash: true
2526
2667
  // Never expose the hash
2527
2668
  });
2528
- ApiKeyApiCreationResponseSchema = z.object({
2529
- data: z.object({
2669
+ ApiKeyApiCreationResponseSchema = z2.object({
2670
+ data: z2.object({
2530
2671
  apiKey: ApiKeyApiSelectSchema,
2531
- key: z.string().describe("The full API key (shown only once)")
2672
+ key: z2.string().describe("The full API key (shown only once)")
2532
2673
  })
2533
2674
  });
2534
2675
  ApiKeyApiInsertSchema = ApiKeyInsertSchema.omit({
@@ -2545,46 +2686,46 @@ var init_schemas = __esm({
2545
2686
  lastUsedAt: true
2546
2687
  // Not set on creation
2547
2688
  });
2548
- CredentialReferenceSelectSchema = z.object({
2549
- id: z.string(),
2550
- tenantId: z.string(),
2551
- projectId: z.string(),
2552
- type: z.string(),
2553
- credentialStoreId: z.string(),
2554
- retrievalParams: z.record(z.string(), z.unknown()).nullish(),
2555
- createdAt: z.string(),
2556
- updatedAt: z.string()
2689
+ CredentialReferenceSelectSchema = z2.object({
2690
+ id: z2.string(),
2691
+ tenantId: z2.string(),
2692
+ projectId: z2.string(),
2693
+ type: z2.string(),
2694
+ credentialStoreId: z2.string(),
2695
+ retrievalParams: z2.record(z2.string(), z2.unknown()).nullish(),
2696
+ createdAt: z2.string(),
2697
+ updatedAt: z2.string()
2557
2698
  });
2558
2699
  CredentialReferenceInsertSchema = createInsertSchema(credentialReferences).extend({
2559
2700
  id: resourceIdSchema,
2560
- type: z.string(),
2701
+ type: z2.string(),
2561
2702
  credentialStoreId: resourceIdSchema,
2562
- retrievalParams: z.record(z.string(), z.unknown()).nullish()
2703
+ retrievalParams: z2.record(z2.string(), z2.unknown()).nullish()
2563
2704
  });
2564
2705
  CredentialReferenceUpdateSchema = CredentialReferenceInsertSchema.partial();
2565
2706
  CredentialReferenceApiSelectSchema = createApiSchema(
2566
2707
  CredentialReferenceSelectSchema
2567
2708
  ).extend({
2568
- type: z.enum(CredentialStoreType),
2569
- tools: z.array(ToolSelectSchema).optional()
2709
+ type: z2.enum(CredentialStoreType),
2710
+ tools: z2.array(ToolSelectSchema).optional()
2570
2711
  });
2571
2712
  CredentialReferenceApiInsertSchema = createApiInsertSchema(
2572
2713
  CredentialReferenceInsertSchema
2573
2714
  ).extend({
2574
- type: z.enum(CredentialStoreType)
2715
+ type: z2.enum(CredentialStoreType)
2575
2716
  });
2576
2717
  CredentialReferenceApiUpdateSchema = createApiUpdateSchema(
2577
2718
  CredentialReferenceUpdateSchema
2578
2719
  ).extend({
2579
- type: z.enum(CredentialStoreType).optional()
2720
+ type: z2.enum(CredentialStoreType).optional()
2580
2721
  });
2581
2722
  McpToolSchema = ToolInsertSchema.extend({
2582
2723
  imageUrl: imageUrlSchema,
2583
- availableTools: z.array(McpToolDefinitionSchema).optional(),
2724
+ availableTools: z2.array(McpToolDefinitionSchema).optional(),
2584
2725
  status: ToolStatusSchema.default("unknown"),
2585
- version: z.string().optional(),
2586
- createdAt: z.date(),
2587
- updatedAt: z.date()
2726
+ version: z2.string().optional(),
2727
+ createdAt: z2.date(),
2728
+ updatedAt: z2.date()
2588
2729
  });
2589
2730
  MCPToolConfigSchema = McpToolSchema.omit({
2590
2731
  config: true,
@@ -2596,12 +2737,12 @@ var init_schemas = __esm({
2596
2737
  updatedAt: true,
2597
2738
  credentialReferenceId: true
2598
2739
  }).extend({
2599
- tenantId: z.string().optional(),
2600
- projectId: z.string().optional(),
2601
- description: z.string().optional(),
2602
- serverUrl: z.url(),
2603
- activeTools: z.array(z.string()).optional(),
2604
- mcpType: z.enum(MCPServerType).optional(),
2740
+ tenantId: z2.string().optional(),
2741
+ projectId: z2.string().optional(),
2742
+ description: z2.string().optional(),
2743
+ serverUrl: z2.url(),
2744
+ activeTools: z2.array(z2.string()).optional(),
2745
+ mcpType: z2.enum(MCPServerType).optional(),
2605
2746
  transport: McpTransportConfigSchema.optional(),
2606
2747
  credential: CredentialReferenceApiInsertSchema.optional()
2607
2748
  });
@@ -2609,46 +2750,60 @@ var init_schemas = __esm({
2609
2750
  ToolApiSelectSchema = createApiSchema(ToolSelectSchema);
2610
2751
  ToolApiInsertSchema = createApiInsertSchema(ToolInsertSchema);
2611
2752
  ToolApiUpdateSchema = createApiUpdateSchema(ToolUpdateSchema);
2612
- FetchConfigSchema = z.object({
2613
- url: z.string().min(1, "URL is required"),
2614
- method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
2615
- headers: z.record(z.string(), z.string()).optional(),
2616
- body: z.record(z.string(), z.unknown()).optional(),
2617
- transform: z.string().optional(),
2753
+ FunctionSelectSchema = createSelectSchema(functions);
2754
+ FunctionInsertSchema = createInsertSchema(functions).extend({
2755
+ id: resourceIdSchema
2756
+ });
2757
+ FunctionUpdateSchema = FunctionInsertSchema.partial();
2758
+ FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema);
2759
+ FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema);
2760
+ FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema);
2761
+ FetchConfigSchema = z2.object({
2762
+ url: z2.string().min(1, "URL is required"),
2763
+ method: z2.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
2764
+ headers: z2.record(z2.string(), z2.string()).optional(),
2765
+ body: z2.record(z2.string(), z2.unknown()).optional(),
2766
+ transform: z2.string().optional(),
2618
2767
  // JSONPath or JS transform function
2619
- timeout: z.number().min(0).optional().default(1e4).optional()
2768
+ timeout: z2.number().min(0).optional().default(1e4).optional()
2620
2769
  });
2621
- FetchDefinitionSchema = z.object({
2622
- id: z.string().min(1, "Fetch definition ID is required"),
2623
- name: z.string().optional(),
2624
- trigger: z.enum(["initialization", "invocation"]),
2770
+ FetchDefinitionSchema = z2.object({
2771
+ id: z2.string().min(1, "Fetch definition ID is required"),
2772
+ name: z2.string().optional(),
2773
+ trigger: z2.enum(["initialization", "invocation"]),
2625
2774
  fetchConfig: FetchConfigSchema,
2626
- responseSchema: z.any().optional(),
2775
+ responseSchema: z2.any().optional(),
2627
2776
  // JSON Schema for validating HTTP response
2628
- defaultValue: z.unknown().optional(),
2777
+ defaultValue: z2.unknown().optional(),
2629
2778
  credential: CredentialReferenceApiInsertSchema.optional()
2630
2779
  });
2631
2780
  ContextConfigSelectSchema = createSelectSchema(contextConfigs).extend({
2632
- requestContextSchema: z.unknown().optional()
2781
+ headersSchema: z2.unknown().optional()
2633
2782
  });
2634
2783
  ContextConfigInsertSchema = createInsertSchema(contextConfigs).extend({
2635
- id: resourceIdSchema,
2636
- requestContextSchema: z.unknown().optional()
2784
+ id: resourceIdSchema.optional(),
2785
+ headersSchema: z2.unknown().optional()
2637
2786
  }).omit({
2638
2787
  createdAt: true,
2639
2788
  updatedAt: true
2640
2789
  });
2641
2790
  ContextConfigUpdateSchema = ContextConfigInsertSchema.partial();
2642
- ContextConfigApiSelectSchema = createApiSchema(ContextConfigSelectSchema);
2643
- ContextConfigApiInsertSchema = createApiInsertSchema(ContextConfigInsertSchema);
2644
- ContextConfigApiUpdateSchema = createApiUpdateSchema(ContextConfigUpdateSchema);
2791
+ ContextConfigApiSelectSchema = createApiSchema(ContextConfigSelectSchema).omit({
2792
+ graphId: true
2793
+ });
2794
+ ContextConfigApiInsertSchema = createApiInsertSchema(ContextConfigInsertSchema).omit({
2795
+ graphId: true
2796
+ });
2797
+ ContextConfigApiUpdateSchema = createApiUpdateSchema(ContextConfigUpdateSchema).omit({
2798
+ graphId: true
2799
+ });
2645
2800
  AgentToolRelationSelectSchema = createSelectSchema(agentToolRelations);
2646
2801
  AgentToolRelationInsertSchema = createInsertSchema(agentToolRelations).extend({
2647
2802
  id: resourceIdSchema,
2648
2803
  agentId: resourceIdSchema,
2649
2804
  toolId: resourceIdSchema,
2650
- selectedTools: z.array(z.string()).nullish(),
2651
- headers: z.record(z.string(), z.string()).nullish()
2805
+ selectedTools: z2.array(z2.string()).nullish(),
2806
+ headers: z2.record(z2.string(), z2.string()).nullish()
2652
2807
  });
2653
2808
  AgentToolRelationUpdateSchema = AgentToolRelationInsertSchema.partial();
2654
2809
  AgentToolRelationApiSelectSchema = createGraphScopedApiSchema(
@@ -2666,83 +2821,87 @@ var init_schemas = __esm({
2666
2821
  LedgerArtifactApiSelectSchema = createApiSchema(LedgerArtifactSelectSchema);
2667
2822
  LedgerArtifactApiInsertSchema = createApiInsertSchema(LedgerArtifactInsertSchema);
2668
2823
  LedgerArtifactApiUpdateSchema = createApiUpdateSchema(LedgerArtifactUpdateSchema);
2669
- StatusComponentSchema = z.object({
2670
- type: z.string(),
2671
- description: z.string().optional(),
2672
- detailsSchema: z.object({
2673
- type: z.literal("object"),
2674
- properties: z.record(z.string(), z.any()),
2675
- required: z.array(z.string()).optional()
2824
+ StatusComponentSchema = z2.object({
2825
+ type: z2.string(),
2826
+ description: z2.string().optional(),
2827
+ detailsSchema: z2.object({
2828
+ type: z2.literal("object"),
2829
+ properties: z2.record(z2.string(), z2.any()),
2830
+ required: z2.array(z2.string()).optional()
2676
2831
  }).optional()
2677
2832
  });
2678
- StatusUpdateSchema = z.object({
2679
- enabled: z.boolean().optional(),
2680
- numEvents: z.number().min(1).max(100).optional(),
2681
- timeInSeconds: z.number().min(1).max(600).optional(),
2682
- prompt: z.string().max(2e3, "Custom prompt cannot exceed 2000 characters").optional(),
2683
- statusComponents: z.array(StatusComponentSchema).optional()
2833
+ StatusUpdateSchema = z2.object({
2834
+ enabled: z2.boolean().optional(),
2835
+ numEvents: z2.number().min(1).max(100).optional(),
2836
+ timeInSeconds: z2.number().min(1).max(600).optional(),
2837
+ prompt: z2.string().max(2e3, "Custom prompt cannot exceed 2000 characters").optional(),
2838
+ statusComponents: z2.array(StatusComponentSchema).optional()
2684
2839
  });
2685
- CanUseItemSchema = z.object({
2686
- agentToolRelationId: z.string().optional(),
2687
- toolId: z.string(),
2688
- toolSelection: z.array(z.string()).nullish(),
2689
- headers: z.record(z.string(), z.string()).nullish()
2840
+ CanUseItemSchema = z2.object({
2841
+ agentToolRelationId: z2.string().optional(),
2842
+ toolId: z2.string(),
2843
+ toolSelection: z2.array(z2.string()).nullish(),
2844
+ headers: z2.record(z2.string(), z2.string()).nullish()
2690
2845
  });
2691
2846
  FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
2692
- type: z.literal("internal"),
2693
- canUse: z.array(CanUseItemSchema),
2694
- dataComponents: z.array(z.string()).optional(),
2695
- artifactComponents: z.array(z.string()).optional(),
2696
- canTransferTo: z.array(z.string()).optional(),
2697
- canDelegateTo: z.array(z.string()).optional()
2847
+ type: z2.literal("internal"),
2848
+ canUse: z2.array(CanUseItemSchema),
2849
+ // All tools (both MCP and function tools)
2850
+ dataComponents: z2.array(z2.string()).optional(),
2851
+ artifactComponents: z2.array(z2.string()).optional(),
2852
+ canTransferTo: z2.array(z2.string()).optional(),
2853
+ canDelegateTo: z2.array(z2.string()).optional()
2698
2854
  });
2699
2855
  FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
2700
- agents: z.record(z.string(), z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
2701
- // Removed project-scoped resources - these are now managed at project level:
2702
- // tools, credentialReferences, dataComponents, artifactComponents
2703
- // Agent relationships to these resources are maintained via agent.tools, agent.dataComponents, etc.
2704
- contextConfig: z.optional(ContextConfigApiInsertSchema),
2705
- statusUpdates: z.optional(StatusUpdateSchema),
2856
+ agents: z2.record(z2.string(), z2.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
2857
+ // Lookup maps for UI to resolve canUse items
2858
+ tools: z2.record(z2.string(), ToolApiInsertSchema).optional(),
2859
+ // Get tool name/description from toolId
2860
+ functions: z2.record(z2.string(), FunctionApiInsertSchema).optional(),
2861
+ // Get function code for function tools
2862
+ contextConfig: z2.optional(ContextConfigApiInsertSchema),
2863
+ statusUpdates: z2.optional(StatusUpdateSchema),
2706
2864
  models: ModelSchema.optional(),
2707
2865
  stopWhen: GraphStopWhenSchema.optional(),
2708
- graphPrompt: z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
2866
+ graphPrompt: z2.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
2709
2867
  });
2710
2868
  GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
2711
- agents: z.record(
2712
- z.string(),
2713
- z.discriminatedUnion("type", [
2869
+ agents: z2.record(
2870
+ z2.string(),
2871
+ z2.discriminatedUnion("type", [
2714
2872
  FullGraphAgentInsertSchema,
2715
- ExternalAgentApiInsertSchema.extend({ type: z.literal("external") })
2873
+ ExternalAgentApiInsertSchema.extend({ type: z2.literal("external") })
2716
2874
  ])
2717
2875
  ),
2718
- contextConfig: z.optional(ContextConfigApiInsertSchema),
2719
- statusUpdates: z.optional(StatusUpdateSchema),
2876
+ contextConfig: z2.optional(ContextConfigApiInsertSchema),
2877
+ statusUpdates: z2.optional(StatusUpdateSchema),
2720
2878
  models: ModelSchema.optional(),
2721
2879
  stopWhen: GraphStopWhenSchema.optional(),
2722
- graphPrompt: z.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
2880
+ graphPrompt: z2.string().max(5e3, "Graph prompt cannot exceed 5000 characters").optional()
2723
2881
  });
2724
- PaginationSchema = z.object({
2725
- page: z.coerce.number().min(1).default(1),
2726
- limit: z.coerce.number().min(1).max(100).default(10),
2727
- total: z.number(),
2728
- pages: z.number()
2882
+ PaginationSchema = z2.object({
2883
+ page: z2.coerce.number().min(1).default(1),
2884
+ limit: z2.coerce.number().min(1).max(100).default(10),
2885
+ total: z2.number(),
2886
+ pages: z2.number()
2729
2887
  });
2730
- ErrorResponseSchema = z.object({
2731
- error: z.string(),
2732
- message: z.string().optional(),
2733
- details: z.unknown().optional()
2888
+ ErrorResponseSchema = z2.object({
2889
+ error: z2.string(),
2890
+ message: z2.string().optional(),
2891
+ details: z2.unknown().optional()
2734
2892
  });
2735
- ExistsResponseSchema = z.object({
2736
- exists: z.boolean()
2893
+ ExistsResponseSchema = z2.object({
2894
+ exists: z2.boolean()
2737
2895
  });
2738
- RemovedResponseSchema = z.object({
2739
- message: z.string(),
2740
- removed: z.boolean()
2896
+ RemovedResponseSchema = z2.object({
2897
+ message: z2.string(),
2898
+ removed: z2.boolean()
2741
2899
  });
2742
2900
  ProjectSelectSchema = createSelectSchema(projects);
2743
2901
  ProjectInsertSchema = createInsertSchema(projects).extend({
2744
2902
  models: ProjectModelSchema,
2745
- stopWhen: StopWhenSchema.optional()
2903
+ stopWhen: StopWhenSchema.optional(),
2904
+ sandboxConfig: SandboxConfigSchema.optional()
2746
2905
  }).omit({
2747
2906
  createdAt: true,
2748
2907
  updatedAt: true
@@ -2752,112 +2911,117 @@ var init_schemas = __esm({
2752
2911
  ProjectApiInsertSchema = ProjectInsertSchema.omit({ tenantId: true });
2753
2912
  ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true });
2754
2913
  FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
2755
- graphs: z.record(z.string(), GraphWithinContextOfProjectSchema),
2756
- tools: z.record(z.string(), ToolApiInsertSchema),
2757
- dataComponents: z.record(z.string(), DataComponentApiInsertSchema).optional(),
2758
- artifactComponents: z.record(z.string(), ArtifactComponentApiInsertSchema).optional(),
2759
- statusUpdates: z.optional(StatusUpdateSchema),
2760
- credentialReferences: z.record(z.string(), CredentialReferenceApiInsertSchema).optional(),
2761
- createdAt: z.string().optional(),
2762
- updatedAt: z.string().optional()
2914
+ graphs: z2.record(z2.string(), GraphWithinContextOfProjectSchema),
2915
+ tools: z2.record(z2.string(), ToolApiInsertSchema),
2916
+ // Now includes both MCP and function tools
2917
+ functions: z2.record(z2.string(), FunctionApiInsertSchema).optional(),
2918
+ // Global functions
2919
+ dataComponents: z2.record(z2.string(), DataComponentApiInsertSchema).optional(),
2920
+ artifactComponents: z2.record(z2.string(), ArtifactComponentApiInsertSchema).optional(),
2921
+ statusUpdates: z2.optional(StatusUpdateSchema),
2922
+ credentialReferences: z2.record(z2.string(), CredentialReferenceApiInsertSchema).optional(),
2923
+ createdAt: z2.string().optional(),
2924
+ updatedAt: z2.string().optional()
2763
2925
  });
2764
- HeadersScopeSchema = z.object({
2765
- "x-inkeep-tenant-id": z.string().optional().openapi({
2926
+ HeadersScopeSchema = z2.object({
2927
+ "x-inkeep-tenant-id": z2.string().optional().openapi({
2766
2928
  description: "Tenant identifier",
2767
2929
  example: "tenant_123"
2768
2930
  }),
2769
- "x-inkeep-project-id": z.string().optional().openapi({
2931
+ "x-inkeep-project-id": z2.string().optional().openapi({
2770
2932
  description: "Project identifier",
2771
2933
  example: "project_456"
2772
2934
  }),
2773
- "x-inkeep-graph-id": z.string().optional().openapi({
2935
+ "x-inkeep-graph-id": z2.string().optional().openapi({
2774
2936
  description: "Graph identifier",
2775
2937
  example: "graph_789"
2776
2938
  })
2777
2939
  });
2778
- TenantParamsSchema = z.object({
2779
- tenantId: z.string().openapi({
2940
+ TenantParamsSchema = z2.object({
2941
+ tenantId: z2.string().openapi({
2780
2942
  description: "Tenant identifier",
2781
2943
  example: "tenant_123"
2782
2944
  })
2783
2945
  }).openapi("TenantParams");
2784
- TenantProjectParamsSchema = z.object({
2785
- tenantId: z.string().openapi({
2946
+ TenantProjectParamsSchema = z2.object({
2947
+ tenantId: z2.string().openapi({
2786
2948
  description: "Tenant identifier",
2787
2949
  example: "tenant_123"
2788
2950
  }),
2789
- projectId: z.string().openapi({
2951
+ projectId: z2.string().openapi({
2790
2952
  description: "Project identifier",
2791
2953
  example: "project_456"
2792
2954
  })
2793
2955
  }).openapi("TenantProjectParams");
2794
- TenantProjectGraphParamsSchema = z.object({
2795
- tenantId: z.string().openapi({
2956
+ TenantProjectGraphParamsSchema = z2.object({
2957
+ tenantId: z2.string().openapi({
2796
2958
  description: "Tenant identifier",
2797
2959
  example: "tenant_123"
2798
2960
  }),
2799
- projectId: z.string().openapi({
2961
+ projectId: z2.string().openapi({
2800
2962
  description: "Project identifier",
2801
2963
  example: "project_456"
2802
2964
  }),
2803
- graphId: z.string().openapi({
2965
+ graphId: z2.string().openapi({
2804
2966
  description: "Graph identifier",
2805
2967
  example: "graph_789"
2806
2968
  })
2807
2969
  }).openapi("TenantProjectGraphParams");
2808
- TenantProjectGraphIdParamsSchema = z.object({
2809
- tenantId: z.string().openapi({
2970
+ TenantProjectGraphIdParamsSchema = z2.object({
2971
+ tenantId: z2.string().openapi({
2810
2972
  description: "Tenant identifier",
2811
2973
  example: "tenant_123"
2812
2974
  }),
2813
- projectId: z.string().openapi({
2975
+ projectId: z2.string().openapi({
2814
2976
  description: "Project identifier",
2815
2977
  example: "project_456"
2816
2978
  }),
2817
- graphId: z.string().openapi({
2979
+ graphId: z2.string().openapi({
2818
2980
  description: "Graph identifier",
2819
2981
  example: "graph_789"
2820
2982
  }),
2821
2983
  id: resourceIdSchema
2822
2984
  }).openapi("TenantProjectGraphIdParams");
2823
- TenantProjectIdParamsSchema = z.object({
2824
- tenantId: z.string().openapi({
2985
+ TenantProjectIdParamsSchema = z2.object({
2986
+ tenantId: z2.string().openapi({
2825
2987
  description: "Tenant identifier",
2826
2988
  example: "tenant_123"
2827
2989
  }),
2828
- projectId: z.string().openapi({
2990
+ projectId: z2.string().openapi({
2829
2991
  description: "Project identifier",
2830
2992
  example: "project_456"
2831
2993
  }),
2832
2994
  id: resourceIdSchema
2833
2995
  }).openapi("TenantProjectIdParams");
2834
- TenantIdParamsSchema = z.object({
2835
- tenantId: z.string().openapi({
2996
+ TenantIdParamsSchema = z2.object({
2997
+ tenantId: z2.string().openapi({
2836
2998
  description: "Tenant identifier",
2837
2999
  example: "tenant_123"
2838
3000
  }),
2839
3001
  id: resourceIdSchema
2840
3002
  }).openapi("TenantIdParams");
2841
- IdParamsSchema = z.object({
3003
+ IdParamsSchema = z2.object({
2842
3004
  id: resourceIdSchema
2843
3005
  }).openapi("IdParams");
2844
- PaginationQueryParamsSchema = z.object({
2845
- page: z.coerce.number().min(1).default(1),
2846
- limit: z.coerce.number().min(1).max(100).default(10)
3006
+ PaginationQueryParamsSchema = z2.object({
3007
+ page: z2.coerce.number().min(1).default(1),
3008
+ limit: z2.coerce.number().min(1).max(100).default(10)
2847
3009
  });
2848
3010
  }
2849
3011
  });
2850
3012
 
2851
3013
  // ../packages/agents-core/src/context/ContextConfig.ts
2852
- import { z as z3 } from "zod";
2853
- var logger;
3014
+ import { z as z4 } from "zod";
3015
+ var logger2;
2854
3016
  var init_ContextConfig = __esm({
2855
3017
  "../packages/agents-core/src/context/ContextConfig.ts"() {
2856
3018
  "use strict";
2857
3019
  init_esm_shims();
3020
+ init_conversations();
2858
3021
  init_logger();
3022
+ init_schema_conversion();
2859
3023
  init_schemas();
2860
- logger = getLogger("context-config");
3024
+ logger2 = getLogger("context-config");
2861
3025
  }
2862
3026
  });
2863
3027
 
@@ -4373,14 +4537,14 @@ var require_jmespath = __commonJS({
4373
4537
  });
4374
4538
 
4375
4539
  // ../packages/agents-core/src/context/TemplateEngine.ts
4376
- var import_jmespath, logger2;
4540
+ var import_jmespath, logger3;
4377
4541
  var init_TemplateEngine = __esm({
4378
4542
  "../packages/agents-core/src/context/TemplateEngine.ts"() {
4379
4543
  "use strict";
4380
4544
  init_esm_shims();
4381
4545
  import_jmespath = __toESM(require_jmespath(), 1);
4382
4546
  init_logger();
4383
- logger2 = getLogger("template-engine");
4547
+ logger3 = getLogger("template-engine");
4384
4548
  }
4385
4549
  });
4386
4550
 
@@ -4452,51 +4616,6 @@ var init_client = __esm({
4452
4616
  }
4453
4617
  });
4454
4618
 
4455
- // ../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
4456
- import { webcrypto as crypto2 } from "crypto";
4457
- function fillPool(bytes) {
4458
- if (!pool || pool.length < bytes) {
4459
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
4460
- crypto2.getRandomValues(pool);
4461
- poolOffset = 0;
4462
- } else if (poolOffset + bytes > pool.length) {
4463
- crypto2.getRandomValues(pool);
4464
- poolOffset = 0;
4465
- }
4466
- poolOffset += bytes;
4467
- }
4468
- function random(bytes) {
4469
- fillPool(bytes |= 0);
4470
- return pool.subarray(poolOffset - bytes, poolOffset);
4471
- }
4472
- function customRandom(alphabet, defaultSize, getRandom) {
4473
- let mask = (2 << 31 - Math.clz32(alphabet.length - 1 | 1)) - 1;
4474
- let step = Math.ceil(1.6 * mask * defaultSize / alphabet.length);
4475
- return (size = defaultSize) => {
4476
- if (!size) return "";
4477
- let id = "";
4478
- while (true) {
4479
- let bytes = getRandom(step);
4480
- let i2 = step;
4481
- while (i2--) {
4482
- id += alphabet[bytes[i2] & mask] || "";
4483
- if (id.length >= size) return id;
4484
- }
4485
- }
4486
- };
4487
- }
4488
- function customAlphabet(alphabet, size = 21) {
4489
- return customRandom(alphabet, size, random);
4490
- }
4491
- var POOL_SIZE_MULTIPLIER, pool, poolOffset;
4492
- var init_nanoid = __esm({
4493
- "../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js"() {
4494
- "use strict";
4495
- init_esm_shims();
4496
- POOL_SIZE_MULTIPLIER = 128;
4497
- }
4498
- });
4499
-
4500
4619
  // ../packages/agents-core/src/data-access/agentRelations.ts
4501
4620
  import { and, count, desc, eq, isNotNull } from "drizzle-orm";
4502
4621
  var init_agentRelations = __esm({
@@ -4537,24 +4656,29 @@ var init_externalAgents = __esm({
4537
4656
  }
4538
4657
  });
4539
4658
 
4540
- // ../packages/agents-core/src/data-access/agentGraphs.ts
4541
- import { and as and5, count as count5, desc as desc5, eq as eq5, inArray as inArray2 } from "drizzle-orm";
4542
- var init_agentGraphs = __esm({
4543
- "../packages/agents-core/src/data-access/agentGraphs.ts"() {
4659
+ // ../packages/agents-core/src/data-access/functions.ts
4660
+ import { and as and5, eq as eq5 } from "drizzle-orm";
4661
+ var init_functions = __esm({
4662
+ "../packages/agents-core/src/data-access/functions.ts"() {
4544
4663
  "use strict";
4545
4664
  init_esm_shims();
4546
4665
  init_schema();
4547
- init_agentRelations();
4548
- init_agents();
4549
- init_contextConfigs();
4550
- init_externalAgents();
4666
+ }
4667
+ });
4668
+
4669
+ // ../packages/agents-core/src/credential-stuffer/index.ts
4670
+ var init_credential_stuffer = __esm({
4671
+ "../packages/agents-core/src/credential-stuffer/index.ts"() {
4672
+ "use strict";
4673
+ init_esm_shims();
4674
+ init_CredentialStuffer();
4551
4675
  }
4552
4676
  });
4553
4677
 
4554
4678
  // ../packages/agents-core/src/utils/apiKeys.ts
4555
4679
  import { randomBytes, scrypt, timingSafeEqual } from "crypto";
4556
4680
  import { promisify } from "util";
4557
- var scryptAsync, logger3, PUBLIC_ID_LENGTH, PUBLIC_ID_ALPHABET, generatePublicId;
4681
+ var scryptAsync, logger4, PUBLIC_ID_LENGTH, PUBLIC_ID_ALPHABET, generatePublicId;
4558
4682
  var init_apiKeys = __esm({
4559
4683
  "../packages/agents-core/src/utils/apiKeys.ts"() {
4560
4684
  "use strict";
@@ -4562,104 +4686,13 @@ var init_apiKeys = __esm({
4562
4686
  init_nanoid();
4563
4687
  init_logger();
4564
4688
  scryptAsync = promisify(scrypt);
4565
- logger3 = getLogger("api-key");
4689
+ logger4 = getLogger("api-key");
4566
4690
  PUBLIC_ID_LENGTH = 12;
4567
4691
  PUBLIC_ID_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-";
4568
4692
  generatePublicId = customAlphabet(PUBLIC_ID_ALPHABET, PUBLIC_ID_LENGTH);
4569
4693
  }
4570
4694
  });
4571
4695
 
4572
- // ../packages/agents-core/src/data-access/apiKeys.ts
4573
- import { and as and6, count as count6, desc as desc6, eq as eq6 } from "drizzle-orm";
4574
- var init_apiKeys2 = __esm({
4575
- "../packages/agents-core/src/data-access/apiKeys.ts"() {
4576
- "use strict";
4577
- init_esm_shims();
4578
- init_schema();
4579
- init_apiKeys();
4580
- }
4581
- });
4582
-
4583
- // ../packages/agents-core/src/data-access/artifactComponents.ts
4584
- import { and as and7, count as count7, desc as desc7, eq as eq7 } from "drizzle-orm";
4585
- var init_artifactComponents = __esm({
4586
- "../packages/agents-core/src/data-access/artifactComponents.ts"() {
4587
- "use strict";
4588
- init_esm_shims();
4589
- init_schema();
4590
- }
4591
- });
4592
-
4593
- // ../packages/agents-core/src/data-access/contextCache.ts
4594
- import { and as and8, eq as eq8 } from "drizzle-orm";
4595
- var init_contextCache = __esm({
4596
- "../packages/agents-core/src/data-access/contextCache.ts"() {
4597
- "use strict";
4598
- init_esm_shims();
4599
- init_schema();
4600
- }
4601
- });
4602
-
4603
- // ../packages/agents-core/src/utils/conversations.ts
4604
- var generateId;
4605
- var init_conversations = __esm({
4606
- "../packages/agents-core/src/utils/conversations.ts"() {
4607
- "use strict";
4608
- init_esm_shims();
4609
- init_nanoid();
4610
- generateId = customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789", 21);
4611
- }
4612
- });
4613
-
4614
- // ../packages/agents-core/src/data-access/conversations.ts
4615
- import { and as and9, count as count8, desc as desc8, eq as eq9 } from "drizzle-orm";
4616
- var init_conversations2 = __esm({
4617
- "../packages/agents-core/src/data-access/conversations.ts"() {
4618
- "use strict";
4619
- init_esm_shims();
4620
- init_schema();
4621
- init_conversations();
4622
- }
4623
- });
4624
-
4625
- // ../packages/agents-core/src/data-access/credentialReferences.ts
4626
- import { and as and10, count as count9, desc as desc9, eq as eq10, sql as sql3 } from "drizzle-orm";
4627
- var init_credentialReferences = __esm({
4628
- "../packages/agents-core/src/data-access/credentialReferences.ts"() {
4629
- "use strict";
4630
- init_esm_shims();
4631
- init_schema();
4632
- }
4633
- });
4634
-
4635
- // ../packages/agents-core/src/data-access/dataComponents.ts
4636
- import { and as and11, count as count10, desc as desc10, eq as eq11 } from "drizzle-orm";
4637
- var init_dataComponents = __esm({
4638
- "../packages/agents-core/src/data-access/dataComponents.ts"() {
4639
- "use strict";
4640
- init_esm_shims();
4641
- init_schema();
4642
- }
4643
- });
4644
-
4645
- // ../packages/agents-core/src/validation/graphFull.ts
4646
- var init_graphFull = __esm({
4647
- "../packages/agents-core/src/validation/graphFull.ts"() {
4648
- "use strict";
4649
- init_esm_shims();
4650
- init_schemas();
4651
- }
4652
- });
4653
-
4654
- // ../packages/agents-core/src/credential-stuffer/index.ts
4655
- var init_credential_stuffer = __esm({
4656
- "../packages/agents-core/src/credential-stuffer/index.ts"() {
4657
- "use strict";
4658
- init_esm_shims();
4659
- init_CredentialStuffer();
4660
- }
4661
- });
4662
-
4663
4696
  // ../packages/agents-core/src/utils/auth-detection.ts
4664
4697
  var init_auth_detection = __esm({
4665
4698
  "../packages/agents-core/src/utils/auth-detection.ts"() {
@@ -4697,7 +4730,7 @@ var init_error = __esm({
4697
4730
  init_dist4();
4698
4731
  init_http_exception();
4699
4732
  init_logger();
4700
- ErrorCode = z.enum([
4733
+ ErrorCode = z2.enum([
4701
4734
  "bad_request",
4702
4735
  "unauthorized",
4703
4736
  "forbidden",
@@ -4715,28 +4748,28 @@ var init_error = __esm({
4715
4748
  unprocessable_entity: 422,
4716
4749
  internal_server_error: 500
4717
4750
  };
4718
- problemDetailsSchema = z.object({
4751
+ problemDetailsSchema = z2.object({
4719
4752
  // type: z.string().url().openapi({
4720
4753
  // description: "A URI reference that identifies the problem type.",
4721
4754
  // example: `${ERROR_DOCS_BASE_URL}#not-found`,
4722
4755
  // }),
4723
- title: z.string().openapi({
4756
+ title: z2.string().openapi({
4724
4757
  description: "A short, human-readable summary of the problem type.",
4725
4758
  example: "Resource Not Found"
4726
4759
  }),
4727
- status: z.number().int().openapi({
4760
+ status: z2.number().int().openapi({
4728
4761
  description: "The HTTP status code.",
4729
4762
  example: 404
4730
4763
  }),
4731
- detail: z.string().openapi({
4764
+ detail: z2.string().openapi({
4732
4765
  description: "A human-readable explanation specific to this occurrence of the problem.",
4733
4766
  example: "The requested resource was not found."
4734
4767
  }),
4735
- instance: z.string().optional().openapi({
4768
+ instance: z2.string().optional().openapi({
4736
4769
  description: "A URI reference that identifies the specific occurrence of the problem.",
4737
4770
  example: "/conversations/123"
4738
4771
  }),
4739
- requestId: z.string().optional().openapi({
4772
+ requestId: z2.string().optional().openapi({
4740
4773
  description: "A unique identifier for the request, useful for troubleshooting.",
4741
4774
  example: "req_1234567890"
4742
4775
  }),
@@ -4745,13 +4778,13 @@ var init_error = __esm({
4745
4778
  example: "not_found"
4746
4779
  })
4747
4780
  }).openapi("ProblemDetails");
4748
- errorResponseSchema = z.object({
4749
- error: z.object({
4781
+ errorResponseSchema = z2.object({
4782
+ error: z2.object({
4750
4783
  code: ErrorCode.openapi({
4751
4784
  description: "A short code indicating the error code returned.",
4752
4785
  example: "not_found"
4753
4786
  }),
4754
- message: z.string().openapi({
4787
+ message: z2.string().openapi({
4755
4788
  description: "A human readable error message.",
4756
4789
  example: "The requested resource was not found."
4757
4790
  })
@@ -4763,15 +4796,15 @@ var init_error = __esm({
4763
4796
  content: {
4764
4797
  "application/problem+json": {
4765
4798
  schema: problemDetailsSchema.extend({
4766
- code: z.literal(code).openapi({
4799
+ code: z2.literal(code).openapi({
4767
4800
  description: "A short code indicating the error code returned.",
4768
4801
  example: code
4769
4802
  }),
4770
- detail: z.string().openapi({
4803
+ detail: z2.string().openapi({
4771
4804
  description: "A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.",
4772
4805
  example: description
4773
4806
  }),
4774
- title: z.string().openapi({
4807
+ title: z2.string().openapi({
4775
4808
  description: "A short, human-readable summary of the problem type.",
4776
4809
  example: getTitleFromCode(code)
4777
4810
  }),
@@ -4779,16 +4812,16 @@ var init_error = __esm({
4779
4812
  // description: "A URI reference that identifies the problem type.",
4780
4813
  // example: `${ERROR_DOCS_BASE_URL}#${code}`,
4781
4814
  // }),
4782
- status: z.literal(errorCodeToHttpStatus[code]).openapi({
4815
+ status: z2.literal(errorCodeToHttpStatus[code]).openapi({
4783
4816
  description: "The HTTP status code.",
4784
4817
  example: errorCodeToHttpStatus[code]
4785
4818
  }),
4786
- error: z.object({
4787
- code: z.literal(code).openapi({
4819
+ error: z2.object({
4820
+ code: z2.literal(code).openapi({
4788
4821
  description: "A short code indicating the error code returned.",
4789
4822
  example: code
4790
4823
  }),
4791
- message: z.string().openapi({
4824
+ message: z2.string().openapi({
4792
4825
  description: "A concise error message suitable for display to end users. May be truncated if the full detail is long.",
4793
4826
  example: description.length > 100 ? `${description.substring(0, 97)}...` : description
4794
4827
  })
@@ -4841,57 +4874,57 @@ var init_execution = __esm({
4841
4874
  }
4842
4875
  });
4843
4876
 
4844
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
4845
- import { z as z4 } from "zod";
4846
- var JSONRPC_VERSION, ProgressTokenSchema, CursorSchema, RequestMetaSchema, BaseRequestParamsSchema, RequestSchema, BaseNotificationParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, ErrorCode2, JSONRPCErrorSchema, JSONRPCMessageSchema, EmptyResultSchema, CancelledNotificationSchema, IconSchema, BaseMetadataSchema, ImplementationSchema, ClientCapabilitiesSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationSchema, PaginatedRequestSchema, PaginatedResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, LoggingLevelSchema, SetLevelRequestSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, SamplingMessageSchema, CreateMessageRequestSchema, CreateMessageResultSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema;
4877
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
4878
+ import { z as z5 } from "zod";
4879
+ var JSONRPC_VERSION, ProgressTokenSchema, CursorSchema, RequestMetaSchema, BaseRequestParamsSchema, RequestSchema, BaseNotificationParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, ErrorCode2, JSONRPCErrorSchema, JSONRPCMessageSchema, EmptyResultSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, ClientCapabilitiesSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationSchema, PaginatedRequestSchema, PaginatedResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, LoggingLevelSchema, SetLevelRequestSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, SamplingMessageSchema, CreateMessageRequestSchema, CreateMessageResultSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema;
4847
4880
  var init_types2 = __esm({
4848
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"() {
4881
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"() {
4849
4882
  "use strict";
4850
4883
  init_esm_shims();
4851
4884
  JSONRPC_VERSION = "2.0";
4852
- ProgressTokenSchema = z4.union([z4.string(), z4.number().int()]);
4853
- CursorSchema = z4.string();
4854
- RequestMetaSchema = z4.object({
4885
+ ProgressTokenSchema = z5.union([z5.string(), z5.number().int()]);
4886
+ CursorSchema = z5.string();
4887
+ RequestMetaSchema = z5.object({
4855
4888
  /**
4856
4889
  * If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
4857
4890
  */
4858
- progressToken: z4.optional(ProgressTokenSchema)
4891
+ progressToken: z5.optional(ProgressTokenSchema)
4859
4892
  }).passthrough();
4860
- BaseRequestParamsSchema = z4.object({
4861
- _meta: z4.optional(RequestMetaSchema)
4893
+ BaseRequestParamsSchema = z5.object({
4894
+ _meta: z5.optional(RequestMetaSchema)
4862
4895
  }).passthrough();
4863
- RequestSchema = z4.object({
4864
- method: z4.string(),
4865
- params: z4.optional(BaseRequestParamsSchema)
4896
+ RequestSchema = z5.object({
4897
+ method: z5.string(),
4898
+ params: z5.optional(BaseRequestParamsSchema)
4866
4899
  });
4867
- BaseNotificationParamsSchema = z4.object({
4900
+ BaseNotificationParamsSchema = z5.object({
4868
4901
  /**
4869
4902
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4870
4903
  * for notes on _meta usage.
4871
4904
  */
4872
- _meta: z4.optional(z4.object({}).passthrough())
4905
+ _meta: z5.optional(z5.object({}).passthrough())
4873
4906
  }).passthrough();
4874
- NotificationSchema = z4.object({
4875
- method: z4.string(),
4876
- params: z4.optional(BaseNotificationParamsSchema)
4907
+ NotificationSchema = z5.object({
4908
+ method: z5.string(),
4909
+ params: z5.optional(BaseNotificationParamsSchema)
4877
4910
  });
4878
- ResultSchema = z4.object({
4911
+ ResultSchema = z5.object({
4879
4912
  /**
4880
4913
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4881
4914
  * for notes on _meta usage.
4882
4915
  */
4883
- _meta: z4.optional(z4.object({}).passthrough())
4916
+ _meta: z5.optional(z5.object({}).passthrough())
4884
4917
  }).passthrough();
4885
- RequestIdSchema = z4.union([z4.string(), z4.number().int()]);
4886
- JSONRPCRequestSchema = z4.object({
4887
- jsonrpc: z4.literal(JSONRPC_VERSION),
4918
+ RequestIdSchema = z5.union([z5.string(), z5.number().int()]);
4919
+ JSONRPCRequestSchema = z5.object({
4920
+ jsonrpc: z5.literal(JSONRPC_VERSION),
4888
4921
  id: RequestIdSchema
4889
4922
  }).merge(RequestSchema).strict();
4890
- JSONRPCNotificationSchema = z4.object({
4891
- jsonrpc: z4.literal(JSONRPC_VERSION)
4923
+ JSONRPCNotificationSchema = z5.object({
4924
+ jsonrpc: z5.literal(JSONRPC_VERSION)
4892
4925
  }).merge(NotificationSchema).strict();
4893
- JSONRPCResponseSchema = z4.object({
4894
- jsonrpc: z4.literal(JSONRPC_VERSION),
4926
+ JSONRPCResponseSchema = z5.object({
4927
+ jsonrpc: z5.literal(JSONRPC_VERSION),
4895
4928
  id: RequestIdSchema,
4896
4929
  result: ResultSchema
4897
4930
  }).strict();
@@ -4904,33 +4937,28 @@ var init_types2 = __esm({
4904
4937
  ErrorCode3[ErrorCode3["InvalidParams"] = -32602] = "InvalidParams";
4905
4938
  ErrorCode3[ErrorCode3["InternalError"] = -32603] = "InternalError";
4906
4939
  })(ErrorCode2 || (ErrorCode2 = {}));
4907
- JSONRPCErrorSchema = z4.object({
4908
- jsonrpc: z4.literal(JSONRPC_VERSION),
4940
+ JSONRPCErrorSchema = z5.object({
4941
+ jsonrpc: z5.literal(JSONRPC_VERSION),
4909
4942
  id: RequestIdSchema,
4910
- error: z4.object({
4943
+ error: z5.object({
4911
4944
  /**
4912
4945
  * The error type that occurred.
4913
4946
  */
4914
- code: z4.number().int(),
4947
+ code: z5.number().int(),
4915
4948
  /**
4916
4949
  * A short description of the error. The message SHOULD be limited to a concise single sentence.
4917
4950
  */
4918
- message: z4.string(),
4951
+ message: z5.string(),
4919
4952
  /**
4920
4953
  * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
4921
4954
  */
4922
- data: z4.optional(z4.unknown())
4955
+ data: z5.optional(z5.unknown())
4923
4956
  })
4924
4957
  }).strict();
4925
- JSONRPCMessageSchema = z4.union([
4926
- JSONRPCRequestSchema,
4927
- JSONRPCNotificationSchema,
4928
- JSONRPCResponseSchema,
4929
- JSONRPCErrorSchema
4930
- ]);
4958
+ JSONRPCMessageSchema = z5.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
4931
4959
  EmptyResultSchema = ResultSchema.strict();
4932
4960
  CancelledNotificationSchema = NotificationSchema.extend({
4933
- method: z4.literal("notifications/cancelled"),
4961
+ method: z5.literal("notifications/cancelled"),
4934
4962
  params: BaseNotificationParamsSchema.extend({
4935
4963
  /**
4936
4964
  * The ID of the request to cancel.
@@ -4941,136 +4969,144 @@ var init_types2 = __esm({
4941
4969
  /**
4942
4970
  * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
4943
4971
  */
4944
- reason: z4.string().optional()
4972
+ reason: z5.string().optional()
4945
4973
  })
4946
4974
  });
4947
- IconSchema = z4.object({
4975
+ IconSchema = z5.object({
4948
4976
  /**
4949
4977
  * URL or data URI for the icon.
4950
4978
  */
4951
- src: z4.string(),
4979
+ src: z5.string(),
4952
4980
  /**
4953
4981
  * Optional MIME type for the icon.
4954
4982
  */
4955
- mimeType: z4.optional(z4.string()),
4983
+ mimeType: z5.optional(z5.string()),
4984
+ /**
4985
+ * Optional array of strings that specify sizes at which the icon can be used.
4986
+ * Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
4987
+ *
4988
+ * If not provided, the client should assume that the icon can be used at any size.
4989
+ */
4990
+ sizes: z5.optional(z5.array(z5.string()))
4991
+ }).passthrough();
4992
+ IconsSchema = z5.object({
4956
4993
  /**
4957
- * Optional string specifying icon dimensions (e.g., "48x48 96x96").
4994
+ * Optional set of sized icons that the client can display in a user interface.
4995
+ *
4996
+ * Clients that support rendering icons MUST support at least the following MIME types:
4997
+ * - `image/png` - PNG images (safe, universal compatibility)
4998
+ * - `image/jpeg` (and `image/jpg`) - JPEG images (safe, universal compatibility)
4999
+ *
5000
+ * Clients that support rendering icons SHOULD also support:
5001
+ * - `image/svg+xml` - SVG images (scalable but requires security precautions)
5002
+ * - `image/webp` - WebP images (modern, efficient format)
4958
5003
  */
4959
- sizes: z4.optional(z4.string())
5004
+ icons: z5.array(IconSchema).optional()
4960
5005
  }).passthrough();
4961
- BaseMetadataSchema = z4.object({
5006
+ BaseMetadataSchema = z5.object({
4962
5007
  /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
4963
- name: z4.string(),
5008
+ name: z5.string(),
4964
5009
  /**
4965
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
4966
- * even by those unfamiliar with domain-specific terminology.
4967
- *
4968
- * If not provided, the name should be used for display (except for Tool,
4969
- * where `annotations.title` should be given precedence over using `name`,
4970
- * if present).
4971
- */
4972
- title: z4.optional(z4.string())
5010
+ * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
5011
+ * even by those unfamiliar with domain-specific terminology.
5012
+ *
5013
+ * If not provided, the name should be used for display (except for Tool,
5014
+ * where `annotations.title` should be given precedence over using `name`,
5015
+ * if present).
5016
+ */
5017
+ title: z5.optional(z5.string())
4973
5018
  }).passthrough();
4974
5019
  ImplementationSchema = BaseMetadataSchema.extend({
4975
- version: z4.string(),
5020
+ version: z5.string(),
4976
5021
  /**
4977
5022
  * An optional URL of the website for this implementation.
4978
5023
  */
4979
- websiteUrl: z4.optional(z4.string()),
4980
- /**
4981
- * An optional list of icons for this implementation.
4982
- * This can be used by clients to display the implementation in a user interface.
4983
- * Each icon should have a `kind` property that specifies whether it is a data representation or a URL source, a `src` property that points to the icon file or data representation, and may also include a `mimeType` and `sizes` property.
4984
- * The `mimeType` property should be a valid MIME type for the icon file, such as "image/png" or "image/svg+xml".
4985
- * The `sizes` property should be a string that specifies one or more sizes at which the icon file can be used, such as "48x48" or "any" for scalable formats like SVG.
4986
- * The `sizes` property is optional, and if not provided, the client should assume that the icon can be used at any size.
4987
- */
4988
- icons: z4.optional(z4.array(IconSchema))
4989
- });
4990
- ClientCapabilitiesSchema = z4.object({
5024
+ websiteUrl: z5.optional(z5.string())
5025
+ }).merge(IconsSchema);
5026
+ ClientCapabilitiesSchema = z5.object({
4991
5027
  /**
4992
5028
  * Experimental, non-standard capabilities that the client supports.
4993
5029
  */
4994
- experimental: z4.optional(z4.object({}).passthrough()),
5030
+ experimental: z5.optional(z5.object({}).passthrough()),
4995
5031
  /**
4996
5032
  * Present if the client supports sampling from an LLM.
4997
5033
  */
4998
- sampling: z4.optional(z4.object({}).passthrough()),
5034
+ sampling: z5.optional(z5.object({}).passthrough()),
4999
5035
  /**
5000
5036
  * Present if the client supports eliciting user input.
5001
5037
  */
5002
- elicitation: z4.optional(z4.object({}).passthrough()),
5038
+ elicitation: z5.optional(z5.object({}).passthrough()),
5003
5039
  /**
5004
5040
  * Present if the client supports listing roots.
5005
5041
  */
5006
- roots: z4.optional(z4.object({
5042
+ roots: z5.optional(z5.object({
5007
5043
  /**
5008
5044
  * Whether the client supports issuing notifications for changes to the roots list.
5009
5045
  */
5010
- listChanged: z4.optional(z4.boolean())
5046
+ listChanged: z5.optional(z5.boolean())
5011
5047
  }).passthrough())
5012
5048
  }).passthrough();
5013
5049
  InitializeRequestSchema = RequestSchema.extend({
5014
- method: z4.literal("initialize"),
5050
+ method: z5.literal("initialize"),
5015
5051
  params: BaseRequestParamsSchema.extend({
5016
5052
  /**
5017
5053
  * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
5018
5054
  */
5019
- protocolVersion: z4.string(),
5055
+ protocolVersion: z5.string(),
5020
5056
  capabilities: ClientCapabilitiesSchema,
5021
5057
  clientInfo: ImplementationSchema
5022
5058
  })
5023
5059
  });
5024
- ServerCapabilitiesSchema = z4.object({
5060
+ ServerCapabilitiesSchema = z5.object({
5025
5061
  /**
5026
5062
  * Experimental, non-standard capabilities that the server supports.
5027
5063
  */
5028
- experimental: z4.optional(z4.object({}).passthrough()),
5064
+ experimental: z5.optional(z5.object({}).passthrough()),
5029
5065
  /**
5030
5066
  * Present if the server supports sending log messages to the client.
5031
5067
  */
5032
- logging: z4.optional(z4.object({}).passthrough()),
5068
+ logging: z5.optional(z5.object({}).passthrough()),
5033
5069
  /**
5034
5070
  * Present if the server supports sending completions to the client.
5035
5071
  */
5036
- completions: z4.optional(z4.object({}).passthrough()),
5072
+ completions: z5.optional(z5.object({}).passthrough()),
5037
5073
  /**
5038
5074
  * Present if the server offers any prompt templates.
5039
5075
  */
5040
- prompts: z4.optional(z4.object({
5076
+ prompts: z5.optional(z5.object({
5041
5077
  /**
5042
5078
  * Whether this server supports issuing notifications for changes to the prompt list.
5043
5079
  */
5044
- listChanged: z4.optional(z4.boolean())
5080
+ listChanged: z5.optional(z5.boolean())
5045
5081
  }).passthrough()),
5046
5082
  /**
5047
5083
  * Present if the server offers any resources to read.
5048
5084
  */
5049
- resources: z4.optional(z4.object({
5085
+ resources: z5.optional(z5.object({
5050
5086
  /**
5051
5087
  * Whether this server supports clients subscribing to resource updates.
5052
5088
  */
5053
- subscribe: z4.optional(z4.boolean()),
5089
+ subscribe: z5.optional(z5.boolean()),
5054
5090
  /**
5055
5091
  * Whether this server supports issuing notifications for changes to the resource list.
5056
5092
  */
5057
- listChanged: z4.optional(z4.boolean())
5093
+ listChanged: z5.optional(z5.boolean())
5058
5094
  }).passthrough()),
5059
5095
  /**
5060
5096
  * Present if the server offers any tools to call.
5061
5097
  */
5062
- tools: z4.optional(z4.object({
5098
+ tools: z5.optional(z5.object({
5063
5099
  /**
5064
5100
  * Whether this server supports issuing notifications for changes to the tool list.
5065
5101
  */
5066
- listChanged: z4.optional(z4.boolean())
5102
+ listChanged: z5.optional(z5.boolean())
5067
5103
  }).passthrough())
5068
5104
  }).passthrough();
5069
5105
  InitializeResultSchema = ResultSchema.extend({
5070
5106
  /**
5071
5107
  * The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
5072
5108
  */
5073
- protocolVersion: z4.string(),
5109
+ protocolVersion: z5.string(),
5074
5110
  capabilities: ServerCapabilitiesSchema,
5075
5111
  serverInfo: ImplementationSchema,
5076
5112
  /**
@@ -5078,30 +5114,30 @@ var init_types2 = __esm({
5078
5114
  *
5079
5115
  * This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
5080
5116
  */
5081
- instructions: z4.optional(z4.string())
5117
+ instructions: z5.optional(z5.string())
5082
5118
  });
5083
5119
  InitializedNotificationSchema = NotificationSchema.extend({
5084
- method: z4.literal("notifications/initialized")
5120
+ method: z5.literal("notifications/initialized")
5085
5121
  });
5086
5122
  PingRequestSchema = RequestSchema.extend({
5087
- method: z4.literal("ping")
5123
+ method: z5.literal("ping")
5088
5124
  });
5089
- ProgressSchema = z4.object({
5125
+ ProgressSchema = z5.object({
5090
5126
  /**
5091
5127
  * The progress thus far. This should increase every time progress is made, even if the total is unknown.
5092
5128
  */
5093
- progress: z4.number(),
5129
+ progress: z5.number(),
5094
5130
  /**
5095
5131
  * Total number of items to process (or total progress required), if known.
5096
5132
  */
5097
- total: z4.optional(z4.number()),
5133
+ total: z5.optional(z5.number()),
5098
5134
  /**
5099
5135
  * An optional message describing the current progress.
5100
5136
  */
5101
- message: z4.optional(z4.string())
5137
+ message: z5.optional(z5.string())
5102
5138
  }).passthrough();
5103
5139
  ProgressNotificationSchema = NotificationSchema.extend({
5104
- method: z4.literal("notifications/progress"),
5140
+ method: z5.literal("notifications/progress"),
5105
5141
  params: BaseNotificationParamsSchema.merge(ProgressSchema).extend({
5106
5142
  /**
5107
5143
  * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
@@ -5115,7 +5151,7 @@ var init_types2 = __esm({
5115
5151
  * An opaque token representing the current pagination position.
5116
5152
  * If provided, the server should return results starting after this cursor.
5117
5153
  */
5118
- cursor: z4.optional(CursorSchema)
5154
+ cursor: z5.optional(CursorSchema)
5119
5155
  }).optional()
5120
5156
  });
5121
5157
  PaginatedResultSchema = ResultSchema.extend({
@@ -5123,30 +5159,30 @@ var init_types2 = __esm({
5123
5159
  * An opaque token representing the pagination position after the last returned result.
5124
5160
  * If present, there may be more results available.
5125
5161
  */
5126
- nextCursor: z4.optional(CursorSchema)
5162
+ nextCursor: z5.optional(CursorSchema)
5127
5163
  });
5128
- ResourceContentsSchema = z4.object({
5164
+ ResourceContentsSchema = z5.object({
5129
5165
  /**
5130
5166
  * The URI of this resource.
5131
5167
  */
5132
- uri: z4.string(),
5168
+ uri: z5.string(),
5133
5169
  /**
5134
5170
  * The MIME type of this resource, if known.
5135
5171
  */
5136
- mimeType: z4.optional(z4.string()),
5172
+ mimeType: z5.optional(z5.string()),
5137
5173
  /**
5138
5174
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5139
5175
  * for notes on _meta usage.
5140
5176
  */
5141
- _meta: z4.optional(z4.object({}).passthrough())
5177
+ _meta: z5.optional(z5.object({}).passthrough())
5142
5178
  }).passthrough();
5143
5179
  TextResourceContentsSchema = ResourceContentsSchema.extend({
5144
5180
  /**
5145
5181
  * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
5146
5182
  */
5147
- text: z4.string()
5183
+ text: z5.string()
5148
5184
  });
5149
- Base64Schema = z4.string().refine((val) => {
5185
+ Base64Schema = z5.string().refine((val) => {
5150
5186
  try {
5151
5187
  atob(val);
5152
5188
  return true;
@@ -5164,168 +5200,160 @@ var init_types2 = __esm({
5164
5200
  /**
5165
5201
  * The URI of this resource.
5166
5202
  */
5167
- uri: z4.string(),
5203
+ uri: z5.string(),
5168
5204
  /**
5169
5205
  * A description of what this resource represents.
5170
5206
  *
5171
5207
  * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
5172
5208
  */
5173
- description: z4.optional(z4.string()),
5209
+ description: z5.optional(z5.string()),
5174
5210
  /**
5175
5211
  * The MIME type of this resource, if known.
5176
5212
  */
5177
- mimeType: z4.optional(z4.string()),
5178
- /**
5179
- * An optional list of icons for this resource.
5180
- */
5181
- icons: z4.optional(z4.array(IconSchema)),
5213
+ mimeType: z5.optional(z5.string()),
5182
5214
  /**
5183
5215
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5184
5216
  * for notes on _meta usage.
5185
5217
  */
5186
- _meta: z4.optional(z4.object({}).passthrough())
5187
- });
5218
+ _meta: z5.optional(z5.object({}).passthrough())
5219
+ }).merge(IconsSchema);
5188
5220
  ResourceTemplateSchema = BaseMetadataSchema.extend({
5189
5221
  /**
5190
5222
  * A URI template (according to RFC 6570) that can be used to construct resource URIs.
5191
5223
  */
5192
- uriTemplate: z4.string(),
5224
+ uriTemplate: z5.string(),
5193
5225
  /**
5194
5226
  * A description of what this template is for.
5195
5227
  *
5196
5228
  * This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
5197
5229
  */
5198
- description: z4.optional(z4.string()),
5230
+ description: z5.optional(z5.string()),
5199
5231
  /**
5200
5232
  * The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
5201
5233
  */
5202
- mimeType: z4.optional(z4.string()),
5234
+ mimeType: z5.optional(z5.string()),
5203
5235
  /**
5204
5236
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5205
5237
  * for notes on _meta usage.
5206
5238
  */
5207
- _meta: z4.optional(z4.object({}).passthrough())
5208
- });
5239
+ _meta: z5.optional(z5.object({}).passthrough())
5240
+ }).merge(IconsSchema);
5209
5241
  ListResourcesRequestSchema = PaginatedRequestSchema.extend({
5210
- method: z4.literal("resources/list")
5242
+ method: z5.literal("resources/list")
5211
5243
  });
5212
5244
  ListResourcesResultSchema = PaginatedResultSchema.extend({
5213
- resources: z4.array(ResourceSchema)
5245
+ resources: z5.array(ResourceSchema)
5214
5246
  });
5215
5247
  ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
5216
- method: z4.literal("resources/templates/list")
5248
+ method: z5.literal("resources/templates/list")
5217
5249
  });
5218
5250
  ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
5219
- resourceTemplates: z4.array(ResourceTemplateSchema)
5251
+ resourceTemplates: z5.array(ResourceTemplateSchema)
5220
5252
  });
5221
5253
  ReadResourceRequestSchema = RequestSchema.extend({
5222
- method: z4.literal("resources/read"),
5254
+ method: z5.literal("resources/read"),
5223
5255
  params: BaseRequestParamsSchema.extend({
5224
5256
  /**
5225
5257
  * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
5226
5258
  */
5227
- uri: z4.string()
5259
+ uri: z5.string()
5228
5260
  })
5229
5261
  });
5230
5262
  ReadResourceResultSchema = ResultSchema.extend({
5231
- contents: z4.array(z4.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
5263
+ contents: z5.array(z5.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
5232
5264
  });
5233
5265
  ResourceListChangedNotificationSchema = NotificationSchema.extend({
5234
- method: z4.literal("notifications/resources/list_changed")
5266
+ method: z5.literal("notifications/resources/list_changed")
5235
5267
  });
5236
5268
  SubscribeRequestSchema = RequestSchema.extend({
5237
- method: z4.literal("resources/subscribe"),
5269
+ method: z5.literal("resources/subscribe"),
5238
5270
  params: BaseRequestParamsSchema.extend({
5239
5271
  /**
5240
5272
  * The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.
5241
5273
  */
5242
- uri: z4.string()
5274
+ uri: z5.string()
5243
5275
  })
5244
5276
  });
5245
5277
  UnsubscribeRequestSchema = RequestSchema.extend({
5246
- method: z4.literal("resources/unsubscribe"),
5278
+ method: z5.literal("resources/unsubscribe"),
5247
5279
  params: BaseRequestParamsSchema.extend({
5248
5280
  /**
5249
5281
  * The URI of the resource to unsubscribe from.
5250
5282
  */
5251
- uri: z4.string()
5283
+ uri: z5.string()
5252
5284
  })
5253
5285
  });
5254
5286
  ResourceUpdatedNotificationSchema = NotificationSchema.extend({
5255
- method: z4.literal("notifications/resources/updated"),
5287
+ method: z5.literal("notifications/resources/updated"),
5256
5288
  params: BaseNotificationParamsSchema.extend({
5257
5289
  /**
5258
5290
  * The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
5259
5291
  */
5260
- uri: z4.string()
5292
+ uri: z5.string()
5261
5293
  })
5262
5294
  });
5263
- PromptArgumentSchema = z4.object({
5295
+ PromptArgumentSchema = z5.object({
5264
5296
  /**
5265
5297
  * The name of the argument.
5266
5298
  */
5267
- name: z4.string(),
5299
+ name: z5.string(),
5268
5300
  /**
5269
5301
  * A human-readable description of the argument.
5270
5302
  */
5271
- description: z4.optional(z4.string()),
5303
+ description: z5.optional(z5.string()),
5272
5304
  /**
5273
5305
  * Whether this argument must be provided.
5274
5306
  */
5275
- required: z4.optional(z4.boolean())
5307
+ required: z5.optional(z5.boolean())
5276
5308
  }).passthrough();
5277
5309
  PromptSchema = BaseMetadataSchema.extend({
5278
5310
  /**
5279
5311
  * An optional description of what this prompt provides
5280
5312
  */
5281
- description: z4.optional(z4.string()),
5313
+ description: z5.optional(z5.string()),
5282
5314
  /**
5283
5315
  * A list of arguments to use for templating the prompt.
5284
5316
  */
5285
- arguments: z4.optional(z4.array(PromptArgumentSchema)),
5286
- /**
5287
- * An optional list of icons for this prompt.
5288
- */
5289
- icons: z4.optional(z4.array(IconSchema)),
5317
+ arguments: z5.optional(z5.array(PromptArgumentSchema)),
5290
5318
  /**
5291
5319
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5292
5320
  * for notes on _meta usage.
5293
5321
  */
5294
- _meta: z4.optional(z4.object({}).passthrough())
5295
- });
5322
+ _meta: z5.optional(z5.object({}).passthrough())
5323
+ }).merge(IconsSchema);
5296
5324
  ListPromptsRequestSchema = PaginatedRequestSchema.extend({
5297
- method: z4.literal("prompts/list")
5325
+ method: z5.literal("prompts/list")
5298
5326
  });
5299
5327
  ListPromptsResultSchema = PaginatedResultSchema.extend({
5300
- prompts: z4.array(PromptSchema)
5328
+ prompts: z5.array(PromptSchema)
5301
5329
  });
5302
5330
  GetPromptRequestSchema = RequestSchema.extend({
5303
- method: z4.literal("prompts/get"),
5331
+ method: z5.literal("prompts/get"),
5304
5332
  params: BaseRequestParamsSchema.extend({
5305
5333
  /**
5306
5334
  * The name of the prompt or prompt template.
5307
5335
  */
5308
- name: z4.string(),
5336
+ name: z5.string(),
5309
5337
  /**
5310
5338
  * Arguments to use for templating the prompt.
5311
5339
  */
5312
- arguments: z4.optional(z4.record(z4.string()))
5340
+ arguments: z5.optional(z5.record(z5.string()))
5313
5341
  })
5314
5342
  });
5315
- TextContentSchema = z4.object({
5316
- type: z4.literal("text"),
5343
+ TextContentSchema = z5.object({
5344
+ type: z5.literal("text"),
5317
5345
  /**
5318
5346
  * The text content of the message.
5319
5347
  */
5320
- text: z4.string(),
5348
+ text: z5.string(),
5321
5349
  /**
5322
5350
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5323
5351
  * for notes on _meta usage.
5324
5352
  */
5325
- _meta: z4.optional(z4.object({}).passthrough())
5353
+ _meta: z5.optional(z5.object({}).passthrough())
5326
5354
  }).passthrough();
5327
- ImageContentSchema = z4.object({
5328
- type: z4.literal("image"),
5355
+ ImageContentSchema = z5.object({
5356
+ type: z5.literal("image"),
5329
5357
  /**
5330
5358
  * The base64-encoded image data.
5331
5359
  */
@@ -5333,15 +5361,15 @@ var init_types2 = __esm({
5333
5361
  /**
5334
5362
  * The MIME type of the image. Different providers may support different image types.
5335
5363
  */
5336
- mimeType: z4.string(),
5364
+ mimeType: z5.string(),
5337
5365
  /**
5338
5366
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5339
5367
  * for notes on _meta usage.
5340
5368
  */
5341
- _meta: z4.optional(z4.object({}).passthrough())
5369
+ _meta: z5.optional(z5.object({}).passthrough())
5342
5370
  }).passthrough();
5343
- AudioContentSchema = z4.object({
5344
- type: z4.literal("audio"),
5371
+ AudioContentSchema = z5.object({
5372
+ type: z5.literal("audio"),
5345
5373
  /**
5346
5374
  * The base64-encoded audio data.
5347
5375
  */
@@ -5349,57 +5377,57 @@ var init_types2 = __esm({
5349
5377
  /**
5350
5378
  * The MIME type of the audio. Different providers may support different audio types.
5351
5379
  */
5352
- mimeType: z4.string(),
5380
+ mimeType: z5.string(),
5353
5381
  /**
5354
5382
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5355
5383
  * for notes on _meta usage.
5356
5384
  */
5357
- _meta: z4.optional(z4.object({}).passthrough())
5385
+ _meta: z5.optional(z5.object({}).passthrough())
5358
5386
  }).passthrough();
5359
- EmbeddedResourceSchema = z4.object({
5360
- type: z4.literal("resource"),
5361
- resource: z4.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
5387
+ EmbeddedResourceSchema = z5.object({
5388
+ type: z5.literal("resource"),
5389
+ resource: z5.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
5362
5390
  /**
5363
5391
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5364
5392
  * for notes on _meta usage.
5365
5393
  */
5366
- _meta: z4.optional(z4.object({}).passthrough())
5394
+ _meta: z5.optional(z5.object({}).passthrough())
5367
5395
  }).passthrough();
5368
5396
  ResourceLinkSchema = ResourceSchema.extend({
5369
- type: z4.literal("resource_link")
5397
+ type: z5.literal("resource_link")
5370
5398
  });
5371
- ContentBlockSchema = z4.union([
5399
+ ContentBlockSchema = z5.union([
5372
5400
  TextContentSchema,
5373
5401
  ImageContentSchema,
5374
5402
  AudioContentSchema,
5375
5403
  ResourceLinkSchema,
5376
5404
  EmbeddedResourceSchema
5377
5405
  ]);
5378
- PromptMessageSchema = z4.object({
5379
- role: z4.enum(["user", "assistant"]),
5406
+ PromptMessageSchema = z5.object({
5407
+ role: z5.enum(["user", "assistant"]),
5380
5408
  content: ContentBlockSchema
5381
5409
  }).passthrough();
5382
5410
  GetPromptResultSchema = ResultSchema.extend({
5383
5411
  /**
5384
5412
  * An optional description for the prompt.
5385
5413
  */
5386
- description: z4.optional(z4.string()),
5387
- messages: z4.array(PromptMessageSchema)
5414
+ description: z5.optional(z5.string()),
5415
+ messages: z5.array(PromptMessageSchema)
5388
5416
  });
5389
5417
  PromptListChangedNotificationSchema = NotificationSchema.extend({
5390
- method: z4.literal("notifications/prompts/list_changed")
5418
+ method: z5.literal("notifications/prompts/list_changed")
5391
5419
  });
5392
- ToolAnnotationsSchema = z4.object({
5420
+ ToolAnnotationsSchema = z5.object({
5393
5421
  /**
5394
5422
  * A human-readable title for the tool.
5395
5423
  */
5396
- title: z4.optional(z4.string()),
5424
+ title: z5.optional(z5.string()),
5397
5425
  /**
5398
5426
  * If true, the tool does not modify its environment.
5399
5427
  *
5400
5428
  * Default: false
5401
5429
  */
5402
- readOnlyHint: z4.optional(z4.boolean()),
5430
+ readOnlyHint: z5.optional(z5.boolean()),
5403
5431
  /**
5404
5432
  * If true, the tool may perform destructive updates to its environment.
5405
5433
  * If false, the tool performs only additive updates.
@@ -5408,7 +5436,7 @@ var init_types2 = __esm({
5408
5436
  *
5409
5437
  * Default: true
5410
5438
  */
5411
- destructiveHint: z4.optional(z4.boolean()),
5439
+ destructiveHint: z5.optional(z5.boolean()),
5412
5440
  /**
5413
5441
  * If true, calling the tool repeatedly with the same arguments
5414
5442
  * will have no additional effect on the its environment.
@@ -5417,7 +5445,7 @@ var init_types2 = __esm({
5417
5445
  *
5418
5446
  * Default: false
5419
5447
  */
5420
- idempotentHint: z4.optional(z4.boolean()),
5448
+ idempotentHint: z5.optional(z5.boolean()),
5421
5449
  /**
5422
5450
  * If true, this tool may interact with an "open world" of external
5423
5451
  * entities. If false, the tool's domain of interaction is closed.
@@ -5426,49 +5454,45 @@ var init_types2 = __esm({
5426
5454
  *
5427
5455
  * Default: true
5428
5456
  */
5429
- openWorldHint: z4.optional(z4.boolean())
5457
+ openWorldHint: z5.optional(z5.boolean())
5430
5458
  }).passthrough();
5431
5459
  ToolSchema = BaseMetadataSchema.extend({
5432
5460
  /**
5433
5461
  * A human-readable description of the tool.
5434
5462
  */
5435
- description: z4.optional(z4.string()),
5463
+ description: z5.optional(z5.string()),
5436
5464
  /**
5437
5465
  * A JSON Schema object defining the expected parameters for the tool.
5438
5466
  */
5439
- inputSchema: z4.object({
5440
- type: z4.literal("object"),
5441
- properties: z4.optional(z4.object({}).passthrough()),
5442
- required: z4.optional(z4.array(z4.string()))
5467
+ inputSchema: z5.object({
5468
+ type: z5.literal("object"),
5469
+ properties: z5.optional(z5.object({}).passthrough()),
5470
+ required: z5.optional(z5.array(z5.string()))
5443
5471
  }).passthrough(),
5444
5472
  /**
5445
5473
  * An optional JSON Schema object defining the structure of the tool's output returned in
5446
5474
  * the structuredContent field of a CallToolResult.
5447
5475
  */
5448
- outputSchema: z4.optional(z4.object({
5449
- type: z4.literal("object"),
5450
- properties: z4.optional(z4.object({}).passthrough()),
5451
- required: z4.optional(z4.array(z4.string()))
5476
+ outputSchema: z5.optional(z5.object({
5477
+ type: z5.literal("object"),
5478
+ properties: z5.optional(z5.object({}).passthrough()),
5479
+ required: z5.optional(z5.array(z5.string()))
5452
5480
  }).passthrough()),
5453
5481
  /**
5454
5482
  * Optional additional tool information.
5455
5483
  */
5456
- annotations: z4.optional(ToolAnnotationsSchema),
5457
- /**
5458
- * An optional list of icons for this tool.
5459
- */
5460
- icons: z4.optional(z4.array(IconSchema)),
5484
+ annotations: z5.optional(ToolAnnotationsSchema),
5461
5485
  /**
5462
5486
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5463
5487
  * for notes on _meta usage.
5464
5488
  */
5465
- _meta: z4.optional(z4.object({}).passthrough())
5466
- });
5489
+ _meta: z5.optional(z5.object({}).passthrough())
5490
+ }).merge(IconsSchema);
5467
5491
  ListToolsRequestSchema = PaginatedRequestSchema.extend({
5468
- method: z4.literal("tools/list")
5492
+ method: z5.literal("tools/list")
5469
5493
  });
5470
5494
  ListToolsResultSchema = PaginatedResultSchema.extend({
5471
- tools: z4.array(ToolSchema)
5495
+ tools: z5.array(ToolSchema)
5472
5496
  });
5473
5497
  CallToolResultSchema = ResultSchema.extend({
5474
5498
  /**
@@ -5477,13 +5501,13 @@ var init_types2 = __esm({
5477
5501
  * If the Tool does not define an outputSchema, this field MUST be present in the result.
5478
5502
  * For backwards compatibility, this field is always present, but it may be empty.
5479
5503
  */
5480
- content: z4.array(ContentBlockSchema).default([]),
5504
+ content: z5.array(ContentBlockSchema).default([]),
5481
5505
  /**
5482
5506
  * An object containing structured tool output.
5483
5507
  *
5484
5508
  * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
5485
5509
  */
5486
- structuredContent: z4.object({}).passthrough().optional(),
5510
+ structuredContent: z5.object({}).passthrough().optional(),
5487
5511
  /**
5488
5512
  * Whether the tool call ended in an error.
5489
5513
  *
@@ -5498,33 +5522,24 @@ var init_types2 = __esm({
5498
5522
  * server does not support tool calls, or any other exceptional conditions,
5499
5523
  * should be reported as an MCP error response.
5500
5524
  */
5501
- isError: z4.optional(z4.boolean())
5525
+ isError: z5.optional(z5.boolean())
5502
5526
  });
5503
5527
  CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
5504
- toolResult: z4.unknown()
5528
+ toolResult: z5.unknown()
5505
5529
  }));
5506
5530
  CallToolRequestSchema = RequestSchema.extend({
5507
- method: z4.literal("tools/call"),
5531
+ method: z5.literal("tools/call"),
5508
5532
  params: BaseRequestParamsSchema.extend({
5509
- name: z4.string(),
5510
- arguments: z4.optional(z4.record(z4.unknown()))
5533
+ name: z5.string(),
5534
+ arguments: z5.optional(z5.record(z5.unknown()))
5511
5535
  })
5512
5536
  });
5513
5537
  ToolListChangedNotificationSchema = NotificationSchema.extend({
5514
- method: z4.literal("notifications/tools/list_changed")
5538
+ method: z5.literal("notifications/tools/list_changed")
5515
5539
  });
5516
- LoggingLevelSchema = z4.enum([
5517
- "debug",
5518
- "info",
5519
- "notice",
5520
- "warning",
5521
- "error",
5522
- "critical",
5523
- "alert",
5524
- "emergency"
5525
- ]);
5540
+ LoggingLevelSchema = z5.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
5526
5541
  SetLevelRequestSchema = RequestSchema.extend({
5527
- method: z4.literal("logging/setLevel"),
5542
+ method: z5.literal("logging/setLevel"),
5528
5543
  params: BaseRequestParamsSchema.extend({
5529
5544
  /**
5530
5545
  * The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/logging/message.
@@ -5533,7 +5548,7 @@ var init_types2 = __esm({
5533
5548
  })
5534
5549
  });
5535
5550
  LoggingMessageNotificationSchema = NotificationSchema.extend({
5536
- method: z4.literal("notifications/message"),
5551
+ method: z5.literal("notifications/message"),
5537
5552
  params: BaseNotificationParamsSchema.extend({
5538
5553
  /**
5539
5554
  * The severity of this log message.
@@ -5542,133 +5557,124 @@ var init_types2 = __esm({
5542
5557
  /**
5543
5558
  * An optional name of the logger issuing this message.
5544
5559
  */
5545
- logger: z4.optional(z4.string()),
5560
+ logger: z5.optional(z5.string()),
5546
5561
  /**
5547
5562
  * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
5548
5563
  */
5549
- data: z4.unknown()
5564
+ data: z5.unknown()
5550
5565
  })
5551
5566
  });
5552
- ModelHintSchema = z4.object({
5567
+ ModelHintSchema = z5.object({
5553
5568
  /**
5554
5569
  * A hint for a model name.
5555
5570
  */
5556
- name: z4.string().optional()
5571
+ name: z5.string().optional()
5557
5572
  }).passthrough();
5558
- ModelPreferencesSchema = z4.object({
5573
+ ModelPreferencesSchema = z5.object({
5559
5574
  /**
5560
5575
  * Optional hints to use for model selection.
5561
5576
  */
5562
- hints: z4.optional(z4.array(ModelHintSchema)),
5577
+ hints: z5.optional(z5.array(ModelHintSchema)),
5563
5578
  /**
5564
5579
  * How much to prioritize cost when selecting a model.
5565
5580
  */
5566
- costPriority: z4.optional(z4.number().min(0).max(1)),
5581
+ costPriority: z5.optional(z5.number().min(0).max(1)),
5567
5582
  /**
5568
5583
  * How much to prioritize sampling speed (latency) when selecting a model.
5569
5584
  */
5570
- speedPriority: z4.optional(z4.number().min(0).max(1)),
5585
+ speedPriority: z5.optional(z5.number().min(0).max(1)),
5571
5586
  /**
5572
5587
  * How much to prioritize intelligence and capabilities when selecting a model.
5573
5588
  */
5574
- intelligencePriority: z4.optional(z4.number().min(0).max(1))
5589
+ intelligencePriority: z5.optional(z5.number().min(0).max(1))
5575
5590
  }).passthrough();
5576
- SamplingMessageSchema = z4.object({
5577
- role: z4.enum(["user", "assistant"]),
5578
- content: z4.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
5591
+ SamplingMessageSchema = z5.object({
5592
+ role: z5.enum(["user", "assistant"]),
5593
+ content: z5.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
5579
5594
  }).passthrough();
5580
5595
  CreateMessageRequestSchema = RequestSchema.extend({
5581
- method: z4.literal("sampling/createMessage"),
5596
+ method: z5.literal("sampling/createMessage"),
5582
5597
  params: BaseRequestParamsSchema.extend({
5583
- messages: z4.array(SamplingMessageSchema),
5598
+ messages: z5.array(SamplingMessageSchema),
5584
5599
  /**
5585
5600
  * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
5586
5601
  */
5587
- systemPrompt: z4.optional(z4.string()),
5602
+ systemPrompt: z5.optional(z5.string()),
5588
5603
  /**
5589
5604
  * A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
5590
5605
  */
5591
- includeContext: z4.optional(z4.enum(["none", "thisServer", "allServers"])),
5592
- temperature: z4.optional(z4.number()),
5606
+ includeContext: z5.optional(z5.enum(["none", "thisServer", "allServers"])),
5607
+ temperature: z5.optional(z5.number()),
5593
5608
  /**
5594
5609
  * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
5595
5610
  */
5596
- maxTokens: z4.number().int(),
5597
- stopSequences: z4.optional(z4.array(z4.string())),
5611
+ maxTokens: z5.number().int(),
5612
+ stopSequences: z5.optional(z5.array(z5.string())),
5598
5613
  /**
5599
5614
  * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
5600
5615
  */
5601
- metadata: z4.optional(z4.object({}).passthrough()),
5616
+ metadata: z5.optional(z5.object({}).passthrough()),
5602
5617
  /**
5603
5618
  * The server's preferences for which model to select.
5604
5619
  */
5605
- modelPreferences: z4.optional(ModelPreferencesSchema)
5620
+ modelPreferences: z5.optional(ModelPreferencesSchema)
5606
5621
  })
5607
5622
  });
5608
5623
  CreateMessageResultSchema = ResultSchema.extend({
5609
5624
  /**
5610
5625
  * The name of the model that generated the message.
5611
5626
  */
5612
- model: z4.string(),
5627
+ model: z5.string(),
5613
5628
  /**
5614
5629
  * The reason why sampling stopped.
5615
5630
  */
5616
- stopReason: z4.optional(z4.enum(["endTurn", "stopSequence", "maxTokens"]).or(z4.string())),
5617
- role: z4.enum(["user", "assistant"]),
5618
- content: z4.discriminatedUnion("type", [
5619
- TextContentSchema,
5620
- ImageContentSchema,
5621
- AudioContentSchema
5622
- ])
5631
+ stopReason: z5.optional(z5.enum(["endTurn", "stopSequence", "maxTokens"]).or(z5.string())),
5632
+ role: z5.enum(["user", "assistant"]),
5633
+ content: z5.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema])
5623
5634
  });
5624
- BooleanSchemaSchema = z4.object({
5625
- type: z4.literal("boolean"),
5626
- title: z4.optional(z4.string()),
5627
- description: z4.optional(z4.string()),
5628
- default: z4.optional(z4.boolean())
5635
+ BooleanSchemaSchema = z5.object({
5636
+ type: z5.literal("boolean"),
5637
+ title: z5.optional(z5.string()),
5638
+ description: z5.optional(z5.string()),
5639
+ default: z5.optional(z5.boolean())
5629
5640
  }).passthrough();
5630
- StringSchemaSchema = z4.object({
5631
- type: z4.literal("string"),
5632
- title: z4.optional(z4.string()),
5633
- description: z4.optional(z4.string()),
5634
- minLength: z4.optional(z4.number()),
5635
- maxLength: z4.optional(z4.number()),
5636
- format: z4.optional(z4.enum(["email", "uri", "date", "date-time"]))
5641
+ StringSchemaSchema = z5.object({
5642
+ type: z5.literal("string"),
5643
+ title: z5.optional(z5.string()),
5644
+ description: z5.optional(z5.string()),
5645
+ minLength: z5.optional(z5.number()),
5646
+ maxLength: z5.optional(z5.number()),
5647
+ format: z5.optional(z5.enum(["email", "uri", "date", "date-time"]))
5637
5648
  }).passthrough();
5638
- NumberSchemaSchema = z4.object({
5639
- type: z4.enum(["number", "integer"]),
5640
- title: z4.optional(z4.string()),
5641
- description: z4.optional(z4.string()),
5642
- minimum: z4.optional(z4.number()),
5643
- maximum: z4.optional(z4.number())
5649
+ NumberSchemaSchema = z5.object({
5650
+ type: z5.enum(["number", "integer"]),
5651
+ title: z5.optional(z5.string()),
5652
+ description: z5.optional(z5.string()),
5653
+ minimum: z5.optional(z5.number()),
5654
+ maximum: z5.optional(z5.number())
5644
5655
  }).passthrough();
5645
- EnumSchemaSchema = z4.object({
5646
- type: z4.literal("string"),
5647
- title: z4.optional(z4.string()),
5648
- description: z4.optional(z4.string()),
5649
- enum: z4.array(z4.string()),
5650
- enumNames: z4.optional(z4.array(z4.string()))
5656
+ EnumSchemaSchema = z5.object({
5657
+ type: z5.literal("string"),
5658
+ title: z5.optional(z5.string()),
5659
+ description: z5.optional(z5.string()),
5660
+ enum: z5.array(z5.string()),
5661
+ enumNames: z5.optional(z5.array(z5.string()))
5651
5662
  }).passthrough();
5652
- PrimitiveSchemaDefinitionSchema = z4.union([
5653
- BooleanSchemaSchema,
5654
- StringSchemaSchema,
5655
- NumberSchemaSchema,
5656
- EnumSchemaSchema
5657
- ]);
5663
+ PrimitiveSchemaDefinitionSchema = z5.union([BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema]);
5658
5664
  ElicitRequestSchema = RequestSchema.extend({
5659
- method: z4.literal("elicitation/create"),
5665
+ method: z5.literal("elicitation/create"),
5660
5666
  params: BaseRequestParamsSchema.extend({
5661
5667
  /**
5662
5668
  * The message to present to the user.
5663
5669
  */
5664
- message: z4.string(),
5670
+ message: z5.string(),
5665
5671
  /**
5666
5672
  * The schema for the requested user input.
5667
5673
  */
5668
- requestedSchema: z4.object({
5669
- type: z4.literal("object"),
5670
- properties: z4.record(z4.string(), PrimitiveSchemaDefinitionSchema),
5671
- required: z4.optional(z4.array(z4.string()))
5674
+ requestedSchema: z5.object({
5675
+ type: z5.literal("object"),
5676
+ properties: z5.record(z5.string(), PrimitiveSchemaDefinitionSchema),
5677
+ required: z5.optional(z5.array(z5.string()))
5672
5678
  }).passthrough()
5673
5679
  })
5674
5680
  });
@@ -5676,92 +5682,92 @@ var init_types2 = __esm({
5676
5682
  /**
5677
5683
  * The user's response action.
5678
5684
  */
5679
- action: z4.enum(["accept", "decline", "cancel"]),
5685
+ action: z5.enum(["accept", "decline", "cancel"]),
5680
5686
  /**
5681
5687
  * The collected user input content (only present if action is "accept").
5682
5688
  */
5683
- content: z4.optional(z4.record(z4.string(), z4.unknown()))
5689
+ content: z5.optional(z5.record(z5.string(), z5.unknown()))
5684
5690
  });
5685
- ResourceTemplateReferenceSchema = z4.object({
5686
- type: z4.literal("ref/resource"),
5691
+ ResourceTemplateReferenceSchema = z5.object({
5692
+ type: z5.literal("ref/resource"),
5687
5693
  /**
5688
5694
  * The URI or URI template of the resource.
5689
5695
  */
5690
- uri: z4.string()
5696
+ uri: z5.string()
5691
5697
  }).passthrough();
5692
- PromptReferenceSchema = z4.object({
5693
- type: z4.literal("ref/prompt"),
5698
+ PromptReferenceSchema = z5.object({
5699
+ type: z5.literal("ref/prompt"),
5694
5700
  /**
5695
5701
  * The name of the prompt or prompt template
5696
5702
  */
5697
- name: z4.string()
5703
+ name: z5.string()
5698
5704
  }).passthrough();
5699
5705
  CompleteRequestSchema = RequestSchema.extend({
5700
- method: z4.literal("completion/complete"),
5706
+ method: z5.literal("completion/complete"),
5701
5707
  params: BaseRequestParamsSchema.extend({
5702
- ref: z4.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
5708
+ ref: z5.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
5703
5709
  /**
5704
5710
  * The argument's information
5705
5711
  */
5706
- argument: z4.object({
5712
+ argument: z5.object({
5707
5713
  /**
5708
5714
  * The name of the argument
5709
5715
  */
5710
- name: z4.string(),
5716
+ name: z5.string(),
5711
5717
  /**
5712
5718
  * The value of the argument to use for completion matching.
5713
5719
  */
5714
- value: z4.string()
5720
+ value: z5.string()
5715
5721
  }).passthrough(),
5716
- context: z4.optional(z4.object({
5722
+ context: z5.optional(z5.object({
5717
5723
  /**
5718
5724
  * Previously-resolved variables in a URI template or prompt.
5719
5725
  */
5720
- arguments: z4.optional(z4.record(z4.string(), z4.string()))
5726
+ arguments: z5.optional(z5.record(z5.string(), z5.string()))
5721
5727
  }))
5722
5728
  })
5723
5729
  });
5724
5730
  CompleteResultSchema = ResultSchema.extend({
5725
- completion: z4.object({
5731
+ completion: z5.object({
5726
5732
  /**
5727
5733
  * An array of completion values. Must not exceed 100 items.
5728
5734
  */
5729
- values: z4.array(z4.string()).max(100),
5735
+ values: z5.array(z5.string()).max(100),
5730
5736
  /**
5731
5737
  * The total number of completion options available. This can exceed the number of values actually sent in the response.
5732
5738
  */
5733
- total: z4.optional(z4.number().int()),
5739
+ total: z5.optional(z5.number().int()),
5734
5740
  /**
5735
5741
  * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
5736
5742
  */
5737
- hasMore: z4.optional(z4.boolean())
5743
+ hasMore: z5.optional(z5.boolean())
5738
5744
  }).passthrough()
5739
5745
  });
5740
- RootSchema = z4.object({
5746
+ RootSchema = z5.object({
5741
5747
  /**
5742
5748
  * The URI identifying the root. This *must* start with file:// for now.
5743
5749
  */
5744
- uri: z4.string().startsWith("file://"),
5750
+ uri: z5.string().startsWith("file://"),
5745
5751
  /**
5746
5752
  * An optional name for the root.
5747
5753
  */
5748
- name: z4.optional(z4.string()),
5754
+ name: z5.optional(z5.string()),
5749
5755
  /**
5750
5756
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5751
5757
  * for notes on _meta usage.
5752
5758
  */
5753
- _meta: z4.optional(z4.object({}).passthrough())
5759
+ _meta: z5.optional(z5.object({}).passthrough())
5754
5760
  }).passthrough();
5755
5761
  ListRootsRequestSchema = RequestSchema.extend({
5756
- method: z4.literal("roots/list")
5762
+ method: z5.literal("roots/list")
5757
5763
  });
5758
5764
  ListRootsResultSchema = ResultSchema.extend({
5759
- roots: z4.array(RootSchema)
5765
+ roots: z5.array(RootSchema)
5760
5766
  });
5761
5767
  RootsListChangedNotificationSchema = NotificationSchema.extend({
5762
- method: z4.literal("notifications/roots/list_changed")
5768
+ method: z5.literal("notifications/roots/list_changed")
5763
5769
  });
5764
- ClientRequestSchema = z4.union([
5770
+ ClientRequestSchema = z5.union([
5765
5771
  PingRequestSchema,
5766
5772
  InitializeRequestSchema,
5767
5773
  CompleteRequestSchema,
@@ -5776,25 +5782,15 @@ var init_types2 = __esm({
5776
5782
  CallToolRequestSchema,
5777
5783
  ListToolsRequestSchema
5778
5784
  ]);
5779
- ClientNotificationSchema = z4.union([
5785
+ ClientNotificationSchema = z5.union([
5780
5786
  CancelledNotificationSchema,
5781
5787
  ProgressNotificationSchema,
5782
5788
  InitializedNotificationSchema,
5783
5789
  RootsListChangedNotificationSchema
5784
5790
  ]);
5785
- ClientResultSchema = z4.union([
5786
- EmptyResultSchema,
5787
- CreateMessageResultSchema,
5788
- ElicitResultSchema,
5789
- ListRootsResultSchema
5790
- ]);
5791
- ServerRequestSchema = z4.union([
5792
- PingRequestSchema,
5793
- CreateMessageRequestSchema,
5794
- ElicitRequestSchema,
5795
- ListRootsRequestSchema
5796
- ]);
5797
- ServerNotificationSchema = z4.union([
5791
+ ClientResultSchema = z5.union([EmptyResultSchema, CreateMessageResultSchema, ElicitResultSchema, ListRootsResultSchema]);
5792
+ ServerRequestSchema = z5.union([PingRequestSchema, CreateMessageRequestSchema, ElicitRequestSchema, ListRootsRequestSchema]);
5793
+ ServerNotificationSchema = z5.union([
5798
5794
  CancelledNotificationSchema,
5799
5795
  ProgressNotificationSchema,
5800
5796
  LoggingMessageNotificationSchema,
@@ -5803,7 +5799,7 @@ var init_types2 = __esm({
5803
5799
  ToolListChangedNotificationSchema,
5804
5800
  PromptListChangedNotificationSchema
5805
5801
  ]);
5806
- ServerResultSchema = z4.union([
5802
+ ServerResultSchema = z5.union([
5807
5803
  EmptyResultSchema,
5808
5804
  InitializeResultSchema,
5809
5805
  CompleteResultSchema,
@@ -5818,9 +5814,9 @@ var init_types2 = __esm({
5818
5814
  }
5819
5815
  });
5820
5816
 
5821
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
5817
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
5822
5818
  var init_protocol = __esm({
5823
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js"() {
5819
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js"() {
5824
5820
  "use strict";
5825
5821
  init_esm_shims();
5826
5822
  init_types2();
@@ -6692,7 +6688,7 @@ var require_uri_all = __commonJS({
6692
6688
  mailtoComponents.path = void 0;
6693
6689
  if (mailtoComponents.query) {
6694
6690
  var unknownHeaders = false;
6695
- var headers = {};
6691
+ var headers2 = {};
6696
6692
  var hfields = mailtoComponents.query.split("&");
6697
6693
  for (var x2 = 0, xl = hfields.length; x2 < xl; ++x2) {
6698
6694
  var hfield = hfields[x2].split("=");
@@ -6711,11 +6707,11 @@ var require_uri_all = __commonJS({
6711
6707
  break;
6712
6708
  default:
6713
6709
  unknownHeaders = true;
6714
- headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
6710
+ headers2[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
6715
6711
  break;
6716
6712
  }
6717
6713
  }
6718
- if (unknownHeaders) mailtoComponents.headers = headers;
6714
+ if (unknownHeaders) mailtoComponents.headers = headers2;
6719
6715
  }
6720
6716
  mailtoComponents.query = void 0;
6721
6717
  for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
@@ -6752,13 +6748,13 @@ var require_uri_all = __commonJS({
6752
6748
  }
6753
6749
  components.path = to.join(",");
6754
6750
  }
6755
- var headers = mailtoComponents.headers = mailtoComponents.headers || {};
6756
- if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
6757
- if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
6751
+ var headers2 = mailtoComponents.headers = mailtoComponents.headers || {};
6752
+ if (mailtoComponents.subject) headers2["subject"] = mailtoComponents.subject;
6753
+ if (mailtoComponents.body) headers2["body"] = mailtoComponents.body;
6758
6754
  var fields = [];
6759
- for (var name in headers) {
6760
- if (headers[name] !== O[name]) {
6761
- fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
6755
+ for (var name in headers2) {
6756
+ if (headers2[name] !== O[name]) {
6757
+ fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers2[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
6762
6758
  }
6763
6759
  }
6764
6760
  if (fields.length) {
@@ -11749,33 +11745,33 @@ var require_ajv = __commonJS({
11749
11745
  var rules = require_rules();
11750
11746
  var $dataMetaSchema = require_data();
11751
11747
  var util = require_util();
11752
- module.exports = Ajv3;
11753
- Ajv3.prototype.validate = validate;
11754
- Ajv3.prototype.compile = compile;
11755
- Ajv3.prototype.addSchema = addSchema;
11756
- Ajv3.prototype.addMetaSchema = addMetaSchema;
11757
- Ajv3.prototype.validateSchema = validateSchema;
11758
- Ajv3.prototype.getSchema = getSchema;
11759
- Ajv3.prototype.removeSchema = removeSchema;
11760
- Ajv3.prototype.addFormat = addFormat;
11761
- Ajv3.prototype.errorsText = errorsText;
11762
- Ajv3.prototype._addSchema = _addSchema;
11763
- Ajv3.prototype._compile = _compile;
11764
- Ajv3.prototype.compileAsync = require_async();
11748
+ module.exports = Ajv4;
11749
+ Ajv4.prototype.validate = validate;
11750
+ Ajv4.prototype.compile = compile;
11751
+ Ajv4.prototype.addSchema = addSchema;
11752
+ Ajv4.prototype.addMetaSchema = addMetaSchema;
11753
+ Ajv4.prototype.validateSchema = validateSchema;
11754
+ Ajv4.prototype.getSchema = getSchema;
11755
+ Ajv4.prototype.removeSchema = removeSchema;
11756
+ Ajv4.prototype.addFormat = addFormat;
11757
+ Ajv4.prototype.errorsText = errorsText;
11758
+ Ajv4.prototype._addSchema = _addSchema;
11759
+ Ajv4.prototype._compile = _compile;
11760
+ Ajv4.prototype.compileAsync = require_async();
11765
11761
  var customKeyword = require_keyword();
11766
- Ajv3.prototype.addKeyword = customKeyword.add;
11767
- Ajv3.prototype.getKeyword = customKeyword.get;
11768
- Ajv3.prototype.removeKeyword = customKeyword.remove;
11769
- Ajv3.prototype.validateKeyword = customKeyword.validate;
11762
+ Ajv4.prototype.addKeyword = customKeyword.add;
11763
+ Ajv4.prototype.getKeyword = customKeyword.get;
11764
+ Ajv4.prototype.removeKeyword = customKeyword.remove;
11765
+ Ajv4.prototype.validateKeyword = customKeyword.validate;
11770
11766
  var errorClasses = require_error_classes();
11771
- Ajv3.ValidationError = errorClasses.Validation;
11772
- Ajv3.MissingRefError = errorClasses.MissingRef;
11773
- Ajv3.$dataMetaSchema = $dataMetaSchema;
11767
+ Ajv4.ValidationError = errorClasses.Validation;
11768
+ Ajv4.MissingRefError = errorClasses.MissingRef;
11769
+ Ajv4.$dataMetaSchema = $dataMetaSchema;
11774
11770
  var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
11775
11771
  var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes", "strictDefaults"];
11776
11772
  var META_SUPPORT_DATA = ["/properties"];
11777
- function Ajv3(opts) {
11778
- if (!(this instanceof Ajv3)) return new Ajv3(opts);
11773
+ function Ajv4(opts) {
11774
+ if (!(this instanceof Ajv4)) return new Ajv4(opts);
11779
11775
  opts = this._opts = util.copy(opts) || {};
11780
11776
  setLogger(this);
11781
11777
  this._schemas = {};
@@ -12073,14 +12069,14 @@ var require_ajv = __commonJS({
12073
12069
  return metaOpts;
12074
12070
  }
12075
12071
  function setLogger(self) {
12076
- var logger13 = self._opts.logger;
12077
- if (logger13 === false) {
12072
+ var logger14 = self._opts.logger;
12073
+ if (logger14 === false) {
12078
12074
  self.logger = { log: noop, warn: noop, error: noop };
12079
12075
  } else {
12080
- if (logger13 === void 0) logger13 = console;
12081
- if (!(typeof logger13 == "object" && logger13.log && logger13.warn && logger13.error))
12076
+ if (logger14 === void 0) logger14 = console;
12077
+ if (!(typeof logger14 == "object" && logger14.log && logger14.warn && logger14.error))
12082
12078
  throw new Error("logger must implement log, warn and error methods");
12083
- self.logger = logger13;
12079
+ self.logger = logger14;
12084
12080
  }
12085
12081
  }
12086
12082
  function noop() {
@@ -12088,10 +12084,10 @@ var require_ajv = __commonJS({
12088
12084
  }
12089
12085
  });
12090
12086
 
12091
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js
12087
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js
12092
12088
  var import_ajv;
12093
12089
  var init_client2 = __esm({
12094
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js"() {
12090
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js"() {
12095
12091
  "use strict";
12096
12092
  init_esm_shims();
12097
12093
  init_protocol();
@@ -12112,164 +12108,164 @@ var init_index_node = __esm({
12112
12108
  }
12113
12109
  });
12114
12110
 
12115
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
12116
- import { z as z5 } from "zod";
12111
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
12112
+ import { z as z6 } from "zod";
12117
12113
  var SafeUrlSchema, OAuthProtectedResourceMetadataSchema, OAuthMetadataSchema, OpenIdProviderMetadataSchema, OpenIdProviderDiscoveryMetadataSchema, OAuthTokensSchema, OAuthErrorResponseSchema, OAuthClientMetadataSchema, OAuthClientInformationSchema, OAuthClientInformationFullSchema, OAuthClientRegistrationErrorSchema, OAuthTokenRevocationRequestSchema;
12118
12114
  var init_auth = __esm({
12119
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js"() {
12115
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js"() {
12120
12116
  "use strict";
12121
12117
  init_esm_shims();
12122
- SafeUrlSchema = z5.string().url().superRefine((val, ctx) => {
12118
+ SafeUrlSchema = z6.string().url().superRefine((val, ctx) => {
12123
12119
  if (!URL.canParse(val)) {
12124
12120
  ctx.addIssue({
12125
- code: z5.ZodIssueCode.custom,
12121
+ code: z6.ZodIssueCode.custom,
12126
12122
  message: "URL must be parseable",
12127
12123
  fatal: true
12128
12124
  });
12129
- return z5.NEVER;
12125
+ return z6.NEVER;
12130
12126
  }
12131
12127
  }).refine((url) => {
12132
12128
  const u2 = new URL(url);
12133
12129
  return u2.protocol !== "javascript:" && u2.protocol !== "data:" && u2.protocol !== "vbscript:";
12134
12130
  }, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
12135
- OAuthProtectedResourceMetadataSchema = z5.object({
12136
- resource: z5.string().url(),
12137
- authorization_servers: z5.array(SafeUrlSchema).optional(),
12138
- jwks_uri: z5.string().url().optional(),
12139
- scopes_supported: z5.array(z5.string()).optional(),
12140
- bearer_methods_supported: z5.array(z5.string()).optional(),
12141
- resource_signing_alg_values_supported: z5.array(z5.string()).optional(),
12142
- resource_name: z5.string().optional(),
12143
- resource_documentation: z5.string().optional(),
12144
- resource_policy_uri: z5.string().url().optional(),
12145
- resource_tos_uri: z5.string().url().optional(),
12146
- tls_client_certificate_bound_access_tokens: z5.boolean().optional(),
12147
- authorization_details_types_supported: z5.array(z5.string()).optional(),
12148
- dpop_signing_alg_values_supported: z5.array(z5.string()).optional(),
12149
- dpop_bound_access_tokens_required: z5.boolean().optional()
12131
+ OAuthProtectedResourceMetadataSchema = z6.object({
12132
+ resource: z6.string().url(),
12133
+ authorization_servers: z6.array(SafeUrlSchema).optional(),
12134
+ jwks_uri: z6.string().url().optional(),
12135
+ scopes_supported: z6.array(z6.string()).optional(),
12136
+ bearer_methods_supported: z6.array(z6.string()).optional(),
12137
+ resource_signing_alg_values_supported: z6.array(z6.string()).optional(),
12138
+ resource_name: z6.string().optional(),
12139
+ resource_documentation: z6.string().optional(),
12140
+ resource_policy_uri: z6.string().url().optional(),
12141
+ resource_tos_uri: z6.string().url().optional(),
12142
+ tls_client_certificate_bound_access_tokens: z6.boolean().optional(),
12143
+ authorization_details_types_supported: z6.array(z6.string()).optional(),
12144
+ dpop_signing_alg_values_supported: z6.array(z6.string()).optional(),
12145
+ dpop_bound_access_tokens_required: z6.boolean().optional()
12150
12146
  }).passthrough();
12151
- OAuthMetadataSchema = z5.object({
12152
- issuer: z5.string(),
12147
+ OAuthMetadataSchema = z6.object({
12148
+ issuer: z6.string(),
12153
12149
  authorization_endpoint: SafeUrlSchema,
12154
12150
  token_endpoint: SafeUrlSchema,
12155
12151
  registration_endpoint: SafeUrlSchema.optional(),
12156
- scopes_supported: z5.array(z5.string()).optional(),
12157
- response_types_supported: z5.array(z5.string()),
12158
- response_modes_supported: z5.array(z5.string()).optional(),
12159
- grant_types_supported: z5.array(z5.string()).optional(),
12160
- token_endpoint_auth_methods_supported: z5.array(z5.string()).optional(),
12161
- token_endpoint_auth_signing_alg_values_supported: z5.array(z5.string()).optional(),
12152
+ scopes_supported: z6.array(z6.string()).optional(),
12153
+ response_types_supported: z6.array(z6.string()),
12154
+ response_modes_supported: z6.array(z6.string()).optional(),
12155
+ grant_types_supported: z6.array(z6.string()).optional(),
12156
+ token_endpoint_auth_methods_supported: z6.array(z6.string()).optional(),
12157
+ token_endpoint_auth_signing_alg_values_supported: z6.array(z6.string()).optional(),
12162
12158
  service_documentation: SafeUrlSchema.optional(),
12163
12159
  revocation_endpoint: SafeUrlSchema.optional(),
12164
- revocation_endpoint_auth_methods_supported: z5.array(z5.string()).optional(),
12165
- revocation_endpoint_auth_signing_alg_values_supported: z5.array(z5.string()).optional(),
12166
- introspection_endpoint: z5.string().optional(),
12167
- introspection_endpoint_auth_methods_supported: z5.array(z5.string()).optional(),
12168
- introspection_endpoint_auth_signing_alg_values_supported: z5.array(z5.string()).optional(),
12169
- code_challenge_methods_supported: z5.array(z5.string()).optional()
12160
+ revocation_endpoint_auth_methods_supported: z6.array(z6.string()).optional(),
12161
+ revocation_endpoint_auth_signing_alg_values_supported: z6.array(z6.string()).optional(),
12162
+ introspection_endpoint: z6.string().optional(),
12163
+ introspection_endpoint_auth_methods_supported: z6.array(z6.string()).optional(),
12164
+ introspection_endpoint_auth_signing_alg_values_supported: z6.array(z6.string()).optional(),
12165
+ code_challenge_methods_supported: z6.array(z6.string()).optional()
12170
12166
  }).passthrough();
12171
- OpenIdProviderMetadataSchema = z5.object({
12172
- issuer: z5.string(),
12167
+ OpenIdProviderMetadataSchema = z6.object({
12168
+ issuer: z6.string(),
12173
12169
  authorization_endpoint: SafeUrlSchema,
12174
12170
  token_endpoint: SafeUrlSchema,
12175
12171
  userinfo_endpoint: SafeUrlSchema.optional(),
12176
12172
  jwks_uri: SafeUrlSchema,
12177
12173
  registration_endpoint: SafeUrlSchema.optional(),
12178
- scopes_supported: z5.array(z5.string()).optional(),
12179
- response_types_supported: z5.array(z5.string()),
12180
- response_modes_supported: z5.array(z5.string()).optional(),
12181
- grant_types_supported: z5.array(z5.string()).optional(),
12182
- acr_values_supported: z5.array(z5.string()).optional(),
12183
- subject_types_supported: z5.array(z5.string()),
12184
- id_token_signing_alg_values_supported: z5.array(z5.string()),
12185
- id_token_encryption_alg_values_supported: z5.array(z5.string()).optional(),
12186
- id_token_encryption_enc_values_supported: z5.array(z5.string()).optional(),
12187
- userinfo_signing_alg_values_supported: z5.array(z5.string()).optional(),
12188
- userinfo_encryption_alg_values_supported: z5.array(z5.string()).optional(),
12189
- userinfo_encryption_enc_values_supported: z5.array(z5.string()).optional(),
12190
- request_object_signing_alg_values_supported: z5.array(z5.string()).optional(),
12191
- request_object_encryption_alg_values_supported: z5.array(z5.string()).optional(),
12192
- request_object_encryption_enc_values_supported: z5.array(z5.string()).optional(),
12193
- token_endpoint_auth_methods_supported: z5.array(z5.string()).optional(),
12194
- token_endpoint_auth_signing_alg_values_supported: z5.array(z5.string()).optional(),
12195
- display_values_supported: z5.array(z5.string()).optional(),
12196
- claim_types_supported: z5.array(z5.string()).optional(),
12197
- claims_supported: z5.array(z5.string()).optional(),
12198
- service_documentation: z5.string().optional(),
12199
- claims_locales_supported: z5.array(z5.string()).optional(),
12200
- ui_locales_supported: z5.array(z5.string()).optional(),
12201
- claims_parameter_supported: z5.boolean().optional(),
12202
- request_parameter_supported: z5.boolean().optional(),
12203
- request_uri_parameter_supported: z5.boolean().optional(),
12204
- require_request_uri_registration: z5.boolean().optional(),
12174
+ scopes_supported: z6.array(z6.string()).optional(),
12175
+ response_types_supported: z6.array(z6.string()),
12176
+ response_modes_supported: z6.array(z6.string()).optional(),
12177
+ grant_types_supported: z6.array(z6.string()).optional(),
12178
+ acr_values_supported: z6.array(z6.string()).optional(),
12179
+ subject_types_supported: z6.array(z6.string()),
12180
+ id_token_signing_alg_values_supported: z6.array(z6.string()),
12181
+ id_token_encryption_alg_values_supported: z6.array(z6.string()).optional(),
12182
+ id_token_encryption_enc_values_supported: z6.array(z6.string()).optional(),
12183
+ userinfo_signing_alg_values_supported: z6.array(z6.string()).optional(),
12184
+ userinfo_encryption_alg_values_supported: z6.array(z6.string()).optional(),
12185
+ userinfo_encryption_enc_values_supported: z6.array(z6.string()).optional(),
12186
+ request_object_signing_alg_values_supported: z6.array(z6.string()).optional(),
12187
+ request_object_encryption_alg_values_supported: z6.array(z6.string()).optional(),
12188
+ request_object_encryption_enc_values_supported: z6.array(z6.string()).optional(),
12189
+ token_endpoint_auth_methods_supported: z6.array(z6.string()).optional(),
12190
+ token_endpoint_auth_signing_alg_values_supported: z6.array(z6.string()).optional(),
12191
+ display_values_supported: z6.array(z6.string()).optional(),
12192
+ claim_types_supported: z6.array(z6.string()).optional(),
12193
+ claims_supported: z6.array(z6.string()).optional(),
12194
+ service_documentation: z6.string().optional(),
12195
+ claims_locales_supported: z6.array(z6.string()).optional(),
12196
+ ui_locales_supported: z6.array(z6.string()).optional(),
12197
+ claims_parameter_supported: z6.boolean().optional(),
12198
+ request_parameter_supported: z6.boolean().optional(),
12199
+ request_uri_parameter_supported: z6.boolean().optional(),
12200
+ require_request_uri_registration: z6.boolean().optional(),
12205
12201
  op_policy_uri: SafeUrlSchema.optional(),
12206
12202
  op_tos_uri: SafeUrlSchema.optional()
12207
12203
  }).passthrough();
12208
12204
  OpenIdProviderDiscoveryMetadataSchema = OpenIdProviderMetadataSchema.merge(OAuthMetadataSchema.pick({
12209
12205
  code_challenge_methods_supported: true
12210
12206
  }));
12211
- OAuthTokensSchema = z5.object({
12212
- access_token: z5.string(),
12213
- id_token: z5.string().optional(),
12207
+ OAuthTokensSchema = z6.object({
12208
+ access_token: z6.string(),
12209
+ id_token: z6.string().optional(),
12214
12210
  // Optional for OAuth 2.1, but necessary in OpenID Connect
12215
- token_type: z5.string(),
12216
- expires_in: z5.number().optional(),
12217
- scope: z5.string().optional(),
12218
- refresh_token: z5.string().optional()
12211
+ token_type: z6.string(),
12212
+ expires_in: z6.number().optional(),
12213
+ scope: z6.string().optional(),
12214
+ refresh_token: z6.string().optional()
12219
12215
  }).strip();
12220
- OAuthErrorResponseSchema = z5.object({
12221
- error: z5.string(),
12222
- error_description: z5.string().optional(),
12223
- error_uri: z5.string().optional()
12216
+ OAuthErrorResponseSchema = z6.object({
12217
+ error: z6.string(),
12218
+ error_description: z6.string().optional(),
12219
+ error_uri: z6.string().optional()
12224
12220
  });
12225
- OAuthClientMetadataSchema = z5.object({
12226
- redirect_uris: z5.array(SafeUrlSchema),
12227
- token_endpoint_auth_method: z5.string().optional(),
12228
- grant_types: z5.array(z5.string()).optional(),
12229
- response_types: z5.array(z5.string()).optional(),
12230
- client_name: z5.string().optional(),
12221
+ OAuthClientMetadataSchema = z6.object({
12222
+ redirect_uris: z6.array(SafeUrlSchema),
12223
+ token_endpoint_auth_method: z6.string().optional(),
12224
+ grant_types: z6.array(z6.string()).optional(),
12225
+ response_types: z6.array(z6.string()).optional(),
12226
+ client_name: z6.string().optional(),
12231
12227
  client_uri: SafeUrlSchema.optional(),
12232
12228
  logo_uri: SafeUrlSchema.optional(),
12233
- scope: z5.string().optional(),
12234
- contacts: z5.array(z5.string()).optional(),
12229
+ scope: z6.string().optional(),
12230
+ contacts: z6.array(z6.string()).optional(),
12235
12231
  tos_uri: SafeUrlSchema.optional(),
12236
- policy_uri: z5.string().optional(),
12232
+ policy_uri: z6.string().optional(),
12237
12233
  jwks_uri: SafeUrlSchema.optional(),
12238
- jwks: z5.any().optional(),
12239
- software_id: z5.string().optional(),
12240
- software_version: z5.string().optional(),
12241
- software_statement: z5.string().optional()
12234
+ jwks: z6.any().optional(),
12235
+ software_id: z6.string().optional(),
12236
+ software_version: z6.string().optional(),
12237
+ software_statement: z6.string().optional()
12242
12238
  }).strip();
12243
- OAuthClientInformationSchema = z5.object({
12244
- client_id: z5.string(),
12245
- client_secret: z5.string().optional(),
12246
- client_id_issued_at: z5.number().optional(),
12247
- client_secret_expires_at: z5.number().optional()
12239
+ OAuthClientInformationSchema = z6.object({
12240
+ client_id: z6.string(),
12241
+ client_secret: z6.string().optional(),
12242
+ client_id_issued_at: z6.number().optional(),
12243
+ client_secret_expires_at: z6.number().optional()
12248
12244
  }).strip();
12249
12245
  OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
12250
- OAuthClientRegistrationErrorSchema = z5.object({
12251
- error: z5.string(),
12252
- error_description: z5.string().optional()
12246
+ OAuthClientRegistrationErrorSchema = z6.object({
12247
+ error: z6.string(),
12248
+ error_description: z6.string().optional()
12253
12249
  }).strip();
12254
- OAuthTokenRevocationRequestSchema = z5.object({
12255
- token: z5.string(),
12256
- token_type_hint: z5.string().optional()
12250
+ OAuthTokenRevocationRequestSchema = z6.object({
12251
+ token: z6.string(),
12252
+ token_type_hint: z6.string().optional()
12257
12253
  }).strip();
12258
12254
  }
12259
12255
  });
12260
12256
 
12261
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
12257
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
12262
12258
  var init_auth_utils = __esm({
12263
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js"() {
12259
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js"() {
12264
12260
  "use strict";
12265
12261
  init_esm_shims();
12266
12262
  }
12267
12263
  });
12268
12264
 
12269
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js
12265
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js
12270
12266
  var OAuthError, InvalidRequestError, InvalidClientError, InvalidGrantError, UnauthorizedClientError, UnsupportedGrantTypeError, InvalidScopeError, AccessDeniedError, ServerError, TemporarilyUnavailableError, UnsupportedResponseTypeError, UnsupportedTokenTypeError, InvalidTokenError, MethodNotAllowedError, TooManyRequestsError, InvalidClientMetadataError, InsufficientScopeError, OAUTH_ERRORS;
12271
12267
  var init_errors = __esm({
12272
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js"() {
12268
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js"() {
12273
12269
  "use strict";
12274
12270
  init_esm_shims();
12275
12271
  OAuthError = class extends Error {
@@ -12364,9 +12360,9 @@ var init_errors = __esm({
12364
12360
  }
12365
12361
  });
12366
12362
 
12367
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js
12363
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js
12368
12364
  var init_auth2 = __esm({
12369
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js"() {
12365
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js"() {
12370
12366
  "use strict";
12371
12367
  init_esm_shims();
12372
12368
  init_index_node();
@@ -12378,9 +12374,9 @@ var init_auth2 = __esm({
12378
12374
  }
12379
12375
  });
12380
12376
 
12381
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js
12377
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js
12382
12378
  var init_sse = __esm({
12383
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js"() {
12379
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js"() {
12384
12380
  "use strict";
12385
12381
  init_esm_shims();
12386
12382
  init_types2();
@@ -12388,9 +12384,9 @@ var init_sse = __esm({
12388
12384
  }
12389
12385
  });
12390
12386
 
12391
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js
12387
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js
12392
12388
  var init_streamableHttp = __esm({
12393
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js"() {
12389
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.19.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js"() {
12394
12390
  "use strict";
12395
12391
  init_esm_shims();
12396
12392
  init_types2();
@@ -12542,7 +12538,7 @@ var init_dist5 = __esm({
12542
12538
 
12543
12539
  // ../packages/agents-core/src/utils/mcp-client.ts
12544
12540
  import { tool } from "ai";
12545
- import { z as z7 } from "zod";
12541
+ import { z as z8 } from "zod";
12546
12542
  var init_mcp_client = __esm({
12547
12543
  "../packages/agents-core/src/utils/mcp-client.ts"() {
12548
12544
  "use strict";
@@ -12725,12 +12721,12 @@ var init_global_utils = __esm({
12725
12721
 
12726
12722
  // ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js
12727
12723
  function logProxy(funcName, namespace, args) {
12728
- var logger13 = getGlobal("diag");
12729
- if (!logger13) {
12724
+ var logger14 = getGlobal("diag");
12725
+ if (!logger14) {
12730
12726
  return;
12731
12727
  }
12732
12728
  args.unshift(namespace);
12733
- return logger13[funcName].apply(logger13, __spreadArray([], __read(args), false));
12729
+ return logger14[funcName].apply(logger14, __spreadArray([], __read(args), false));
12734
12730
  }
12735
12731
  var __read, __spreadArray, DiagComponentLogger;
12736
12732
  var init_ComponentLogger = __esm({
@@ -12828,17 +12824,17 @@ var init_types3 = __esm({
12828
12824
  });
12829
12825
 
12830
12826
  // ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
12831
- function createLogLevelDiagLogger(maxLevel, logger13) {
12827
+ function createLogLevelDiagLogger(maxLevel, logger14) {
12832
12828
  if (maxLevel < DiagLogLevel.NONE) {
12833
12829
  maxLevel = DiagLogLevel.NONE;
12834
12830
  } else if (maxLevel > DiagLogLevel.ALL) {
12835
12831
  maxLevel = DiagLogLevel.ALL;
12836
12832
  }
12837
- logger13 = logger13 || {};
12833
+ logger14 = logger14 || {};
12838
12834
  function _filterFunc(funcName, theLevel) {
12839
- var theFunc = logger13[funcName];
12835
+ var theFunc = logger14[funcName];
12840
12836
  if (typeof theFunc === "function" && maxLevel >= theLevel) {
12841
- return theFunc.bind(logger13);
12837
+ return theFunc.bind(logger14);
12842
12838
  }
12843
12839
  return function() {
12844
12840
  };
@@ -12905,19 +12901,19 @@ var init_diag = __esm({
12905
12901
  for (var _i = 0; _i < arguments.length; _i++) {
12906
12902
  args[_i] = arguments[_i];
12907
12903
  }
12908
- var logger13 = getGlobal("diag");
12909
- if (!logger13)
12904
+ var logger14 = getGlobal("diag");
12905
+ if (!logger14)
12910
12906
  return;
12911
- return logger13[funcName].apply(logger13, __spreadArray2([], __read2(args), false));
12907
+ return logger14[funcName].apply(logger14, __spreadArray2([], __read2(args), false));
12912
12908
  };
12913
12909
  }
12914
12910
  var self = this;
12915
- var setLogger = function(logger13, optionsOrLogLevel) {
12911
+ var setLogger = function(logger14, optionsOrLogLevel) {
12916
12912
  var _a, _b, _c;
12917
12913
  if (optionsOrLogLevel === void 0) {
12918
12914
  optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
12919
12915
  }
12920
- if (logger13 === self) {
12916
+ if (logger14 === self) {
12921
12917
  var err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
12922
12918
  self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
12923
12919
  return false;
@@ -12928,7 +12924,7 @@ var init_diag = __esm({
12928
12924
  };
12929
12925
  }
12930
12926
  var oldLogger = getGlobal("diag");
12931
- var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger13);
12927
+ var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger14);
12932
12928
  if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
12933
12929
  var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
12934
12930
  oldLogger.warn("Current logger will be overwritten from " + stack);
@@ -13497,18 +13493,18 @@ function getTracer(serviceName, serviceVersion) {
13497
13493
  try {
13498
13494
  return trace.getTracer(serviceName, serviceVersion);
13499
13495
  } catch (_error) {
13500
- logger4.debug({}, "OpenTelemetry tracer not available, using no-op tracer");
13496
+ logger5.debug({}, "OpenTelemetry tracer not available, using no-op tracer");
13501
13497
  return noopTracer;
13502
13498
  }
13503
13499
  }
13504
- var logger4, createNoOpSpan, noopTracer;
13500
+ var logger5, createNoOpSpan, noopTracer;
13505
13501
  var init_tracer_factory = __esm({
13506
13502
  "../packages/agents-core/src/utils/tracer-factory.ts"() {
13507
13503
  "use strict";
13508
13504
  init_esm_shims();
13509
13505
  init_esm();
13510
13506
  init_utils();
13511
- logger4 = getLogger("tracer");
13507
+ logger5 = getLogger("tracer");
13512
13508
  createNoOpSpan = () => ({
13513
13509
  setAttributes: () => ({}),
13514
13510
  recordException: () => ({}),
@@ -13549,146 +13545,69 @@ var init_utils = __esm({
13549
13545
  init_auth_detection();
13550
13546
  init_conversations();
13551
13547
  init_credential_store_utils();
13552
- init_error();
13553
- init_execution();
13554
- init_logger();
13555
- init_mcp_client();
13556
- init_tracer_factory();
13557
- }
13558
- });
13559
-
13560
- // ../packages/agents-core/src/data-access/tools.ts
13561
- import { and as and12, count as count11, desc as desc11, eq as eq12 } from "drizzle-orm";
13562
- var logger5;
13563
- var init_tools = __esm({
13564
- "../packages/agents-core/src/data-access/tools.ts"() {
13565
- "use strict";
13566
- init_esm_shims();
13567
- init_context5();
13568
- init_credential_stuffer();
13569
- init_schema();
13570
- init_types();
13571
- init_utils();
13572
- init_logger();
13573
- init_mcp_client();
13574
- init_agentRelations();
13575
- init_credentialReferences();
13576
- logger5 = getLogger("tools");
13577
- }
13578
- });
13579
-
13580
- // ../packages/agents-core/src/data-access/graphFull.ts
13581
- import { and as and13, eq as eq13, inArray as inArray3, not } from "drizzle-orm";
13582
- var init_graphFull2 = __esm({
13583
- "../packages/agents-core/src/data-access/graphFull.ts"() {
13584
- "use strict";
13585
- init_esm_shims();
13586
- init_schema();
13587
- init_graphFull();
13588
- init_agentGraphs();
13589
- init_agentRelations();
13590
- init_agents();
13591
- init_artifactComponents();
13592
- init_contextConfigs();
13593
- init_dataComponents();
13594
- init_externalAgents();
13595
- init_tools();
13596
- }
13597
- });
13598
-
13599
- // ../packages/agents-core/src/data-access/ledgerArtifacts.ts
13600
- import { and as and14, count as count12, eq as eq14 } from "drizzle-orm";
13601
- var init_ledgerArtifacts = __esm({
13602
- "../packages/agents-core/src/data-access/ledgerArtifacts.ts"() {
13603
- "use strict";
13604
- init_esm_shims();
13605
- init_schema();
13606
- }
13607
- });
13608
-
13609
- // ../packages/agents-core/src/data-access/messages.ts
13610
- import { and as and15, asc as asc2, count as count13, desc as desc12, eq as eq15, inArray as inArray4 } from "drizzle-orm";
13611
- var init_messages = __esm({
13612
- "../packages/agents-core/src/data-access/messages.ts"() {
13613
- "use strict";
13614
- init_esm_shims();
13615
- init_schema();
13616
- }
13617
- });
13618
-
13619
- // ../packages/agents-core/src/data-access/projects.ts
13620
- import { and as and16, count as count14, desc as desc13, eq as eq16 } from "drizzle-orm";
13621
- var init_projects = __esm({
13622
- "../packages/agents-core/src/data-access/projects.ts"() {
13623
- "use strict";
13624
- init_esm_shims();
13625
- init_schema();
13626
- }
13627
- });
13628
-
13629
- // ../packages/agents-core/src/data-access/projectFull.ts
13630
- var defaultLogger;
13631
- var init_projectFull = __esm({
13632
- "../packages/agents-core/src/data-access/projectFull.ts"() {
13633
- "use strict";
13634
- init_esm_shims();
13635
- init_logger();
13636
- init_agentGraphs();
13637
- init_artifactComponents();
13638
- init_contextConfigs();
13639
- init_credentialReferences();
13640
- init_dataComponents();
13641
- init_graphFull2();
13642
- init_projects();
13643
- init_tools();
13644
- defaultLogger = getLogger("projectFull");
13548
+ init_error();
13549
+ init_execution();
13550
+ init_logger();
13551
+ init_mcp_client();
13552
+ init_schema_conversion();
13553
+ init_tracer_factory();
13645
13554
  }
13646
13555
  });
13647
13556
 
13648
- // ../packages/agents-core/src/data-access/tasks.ts
13649
- import { and as and17, eq as eq17 } from "drizzle-orm";
13650
- var init_tasks = __esm({
13651
- "../packages/agents-core/src/data-access/tasks.ts"() {
13557
+ // ../packages/agents-core/src/data-access/credentialReferences.ts
13558
+ import { and as and6, count as count5, desc as desc5, eq as eq6, sql as sql3 } from "drizzle-orm";
13559
+ var init_credentialReferences = __esm({
13560
+ "../packages/agents-core/src/data-access/credentialReferences.ts"() {
13652
13561
  "use strict";
13653
13562
  init_esm_shims();
13654
13563
  init_schema();
13655
13564
  }
13656
13565
  });
13657
13566
 
13658
- // ../packages/agents-core/src/data-access/validation.ts
13659
- var init_validation = __esm({
13660
- "../packages/agents-core/src/data-access/validation.ts"() {
13567
+ // ../packages/agents-core/src/data-access/tools.ts
13568
+ import { and as and7, count as count6, desc as desc6, eq as eq7 } from "drizzle-orm";
13569
+ var logger6;
13570
+ var init_tools = __esm({
13571
+ "../packages/agents-core/src/data-access/tools.ts"() {
13661
13572
  "use strict";
13662
13573
  init_esm_shims();
13663
- init_projects();
13574
+ init_context5();
13575
+ init_credential_stuffer();
13576
+ init_schema();
13577
+ init_types();
13578
+ init_utils();
13579
+ init_logger();
13580
+ init_mcp_client();
13581
+ init_agentRelations();
13582
+ init_credentialReferences();
13583
+ logger6 = getLogger("tools");
13664
13584
  }
13665
13585
  });
13666
13586
 
13667
- // ../packages/agents-core/src/data-access/index.ts
13668
- var init_data_access = __esm({
13669
- "../packages/agents-core/src/data-access/index.ts"() {
13587
+ // ../packages/agents-core/src/data-access/agentGraphs.ts
13588
+ import { and as and8, count as count7, desc as desc7, eq as eq8, inArray as inArray2 } from "drizzle-orm";
13589
+ var init_agentGraphs = __esm({
13590
+ "../packages/agents-core/src/data-access/agentGraphs.ts"() {
13670
13591
  "use strict";
13671
13592
  init_esm_shims();
13672
- init_client();
13673
- init_agentGraphs();
13593
+ init_schema();
13674
13594
  init_agentRelations();
13675
13595
  init_agents();
13676
- init_apiKeys2();
13677
- init_artifactComponents();
13678
- init_contextCache();
13679
13596
  init_contextConfigs();
13680
- init_conversations2();
13681
- init_credentialReferences();
13682
- init_dataComponents();
13683
13597
  init_externalAgents();
13684
- init_graphFull2();
13685
- init_ledgerArtifacts();
13686
- init_messages();
13687
- init_projectFull();
13688
- init_projects();
13689
- init_tasks();
13598
+ init_functions();
13690
13599
  init_tools();
13691
- init_validation();
13600
+ }
13601
+ });
13602
+
13603
+ // ../packages/agents-core/src/data-access/apiKeys.ts
13604
+ import { and as and9, count as count8, desc as desc8, eq as eq9 } from "drizzle-orm";
13605
+ var init_apiKeys2 = __esm({
13606
+ "../packages/agents-core/src/data-access/apiKeys.ts"() {
13607
+ "use strict";
13608
+ init_esm_shims();
13609
+ init_schema();
13610
+ init_apiKeys();
13692
13611
  }
13693
13612
  });
13694
13613
 
@@ -14696,10 +14615,10 @@ var require_codegen = __commonJS({
14696
14615
  }
14697
14616
  exports.not = not2;
14698
14617
  var andCode = mappend(exports.operators.AND);
14699
- function and18(...args) {
14618
+ function and19(...args) {
14700
14619
  return args.reduce(andCode);
14701
14620
  }
14702
- exports.and = and18;
14621
+ exports.and = and19;
14703
14622
  var orCode = mappend(exports.operators.OR);
14704
14623
  function or(...args) {
14705
14624
  return args.reduce(orCode);
@@ -17593,7 +17512,7 @@ var require_core = __commonJS({
17593
17512
  uriResolver
17594
17513
  };
17595
17514
  }
17596
- var Ajv3 = class {
17515
+ var Ajv4 = class {
17597
17516
  constructor(opts = {}) {
17598
17517
  this.schemas = {};
17599
17518
  this.refs = {};
@@ -17963,9 +17882,9 @@ var require_core = __commonJS({
17963
17882
  }
17964
17883
  }
17965
17884
  };
17966
- Ajv3.ValidationError = validation_error_1.default;
17967
- Ajv3.MissingRefError = ref_error_1.default;
17968
- exports.default = Ajv3;
17885
+ Ajv4.ValidationError = validation_error_1.default;
17886
+ Ajv4.MissingRefError = ref_error_1.default;
17887
+ exports.default = Ajv4;
17969
17888
  function checkOptions(checkOpts, options, msg, log = "error") {
17970
17889
  for (const key in checkOpts) {
17971
17890
  const opt = key;
@@ -18017,13 +17936,13 @@ var require_core = __commonJS({
18017
17936
  }, warn() {
18018
17937
  }, error() {
18019
17938
  } };
18020
- function getLogger2(logger13) {
18021
- if (logger13 === false)
17939
+ function getLogger2(logger14) {
17940
+ if (logger14 === false)
18022
17941
  return noLogs;
18023
- if (logger13 === void 0)
17942
+ if (logger14 === void 0)
18024
17943
  return console;
18025
- if (logger13.log && logger13.warn && logger13.error)
18026
- return logger13;
17944
+ if (logger14.log && logger14.warn && logger14.error)
17945
+ return logger14;
18027
17946
  throw new Error("logger must implement log, warn and error methods");
18028
17947
  }
18029
17948
  var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
@@ -20107,7 +20026,7 @@ var require_ajv2 = __commonJS({
20107
20026
  var draft7MetaSchema = require_json_schema_draft_072();
20108
20027
  var META_SUPPORT_DATA = ["/properties"];
20109
20028
  var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
20110
- var Ajv3 = class extends core_1.default {
20029
+ var Ajv4 = class extends core_1.default {
20111
20030
  _addVocabularies() {
20112
20031
  super._addVocabularies();
20113
20032
  draft7_1.default.forEach((v2) => this.addVocabulary(v2));
@@ -20126,11 +20045,11 @@ var require_ajv2 = __commonJS({
20126
20045
  return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
20127
20046
  }
20128
20047
  };
20129
- exports.Ajv = Ajv3;
20130
- module.exports = exports = Ajv3;
20131
- module.exports.Ajv = Ajv3;
20048
+ exports.Ajv = Ajv4;
20049
+ module.exports = exports = Ajv4;
20050
+ module.exports.Ajv = Ajv4;
20132
20051
  Object.defineProperty(exports, "__esModule", { value: true });
20133
- exports.default = Ajv3;
20052
+ exports.default = Ajv4;
20134
20053
  var validate_1 = require_validate2();
20135
20054
  Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
20136
20055
  return validate_1.KeywordCxt;
@@ -20165,6 +20084,184 @@ var require_ajv2 = __commonJS({
20165
20084
  }
20166
20085
  });
20167
20086
 
20087
+ // ../packages/agents-core/src/validation/props-validation.ts
20088
+ var import_ajv2;
20089
+ var init_props_validation = __esm({
20090
+ "../packages/agents-core/src/validation/props-validation.ts"() {
20091
+ "use strict";
20092
+ init_esm_shims();
20093
+ import_ajv2 = __toESM(require_ajv2(), 1);
20094
+ }
20095
+ });
20096
+
20097
+ // ../packages/agents-core/src/data-access/artifactComponents.ts
20098
+ import { and as and10, count as count9, desc as desc9, eq as eq10 } from "drizzle-orm";
20099
+ var init_artifactComponents = __esm({
20100
+ "../packages/agents-core/src/data-access/artifactComponents.ts"() {
20101
+ "use strict";
20102
+ init_esm_shims();
20103
+ init_schema();
20104
+ init_props_validation();
20105
+ }
20106
+ });
20107
+
20108
+ // ../packages/agents-core/src/data-access/contextCache.ts
20109
+ import { and as and11, eq as eq11 } from "drizzle-orm";
20110
+ var init_contextCache = __esm({
20111
+ "../packages/agents-core/src/data-access/contextCache.ts"() {
20112
+ "use strict";
20113
+ init_esm_shims();
20114
+ init_schema();
20115
+ }
20116
+ });
20117
+
20118
+ // ../packages/agents-core/src/data-access/conversations.ts
20119
+ import { and as and12, count as count10, desc as desc10, eq as eq12 } from "drizzle-orm";
20120
+ var init_conversations2 = __esm({
20121
+ "../packages/agents-core/src/data-access/conversations.ts"() {
20122
+ "use strict";
20123
+ init_esm_shims();
20124
+ init_schema();
20125
+ init_conversations();
20126
+ }
20127
+ });
20128
+
20129
+ // ../packages/agents-core/src/data-access/dataComponents.ts
20130
+ import { and as and13, count as count11, desc as desc11, eq as eq13 } from "drizzle-orm";
20131
+ var init_dataComponents = __esm({
20132
+ "../packages/agents-core/src/data-access/dataComponents.ts"() {
20133
+ "use strict";
20134
+ init_esm_shims();
20135
+ init_schema();
20136
+ init_props_validation();
20137
+ }
20138
+ });
20139
+
20140
+ // ../packages/agents-core/src/validation/graphFull.ts
20141
+ var init_graphFull = __esm({
20142
+ "../packages/agents-core/src/validation/graphFull.ts"() {
20143
+ "use strict";
20144
+ init_esm_shims();
20145
+ init_schemas();
20146
+ }
20147
+ });
20148
+
20149
+ // ../packages/agents-core/src/data-access/graphFull.ts
20150
+ import { and as and14, eq as eq14, inArray as inArray3, not } from "drizzle-orm";
20151
+ var init_graphFull2 = __esm({
20152
+ "../packages/agents-core/src/data-access/graphFull.ts"() {
20153
+ "use strict";
20154
+ init_esm_shims();
20155
+ init_schema();
20156
+ init_graphFull();
20157
+ init_agentGraphs();
20158
+ init_agentRelations();
20159
+ init_agents();
20160
+ init_artifactComponents();
20161
+ init_contextConfigs();
20162
+ init_dataComponents();
20163
+ init_externalAgents();
20164
+ init_tools();
20165
+ }
20166
+ });
20167
+
20168
+ // ../packages/agents-core/src/data-access/ledgerArtifacts.ts
20169
+ import { and as and15, count as count12, eq as eq15 } from "drizzle-orm";
20170
+ var init_ledgerArtifacts = __esm({
20171
+ "../packages/agents-core/src/data-access/ledgerArtifacts.ts"() {
20172
+ "use strict";
20173
+ init_esm_shims();
20174
+ init_schema();
20175
+ }
20176
+ });
20177
+
20178
+ // ../packages/agents-core/src/data-access/messages.ts
20179
+ import { and as and16, asc as asc2, count as count13, desc as desc12, eq as eq16, inArray as inArray4 } from "drizzle-orm";
20180
+ var init_messages = __esm({
20181
+ "../packages/agents-core/src/data-access/messages.ts"() {
20182
+ "use strict";
20183
+ init_esm_shims();
20184
+ init_schema();
20185
+ }
20186
+ });
20187
+
20188
+ // ../packages/agents-core/src/data-access/projects.ts
20189
+ import { and as and17, count as count14, desc as desc13, eq as eq17 } from "drizzle-orm";
20190
+ var init_projects = __esm({
20191
+ "../packages/agents-core/src/data-access/projects.ts"() {
20192
+ "use strict";
20193
+ init_esm_shims();
20194
+ init_schema();
20195
+ }
20196
+ });
20197
+
20198
+ // ../packages/agents-core/src/data-access/projectFull.ts
20199
+ var defaultLogger;
20200
+ var init_projectFull = __esm({
20201
+ "../packages/agents-core/src/data-access/projectFull.ts"() {
20202
+ "use strict";
20203
+ init_esm_shims();
20204
+ init_logger();
20205
+ init_agentGraphs();
20206
+ init_artifactComponents();
20207
+ init_credentialReferences();
20208
+ init_dataComponents();
20209
+ init_functions();
20210
+ init_graphFull2();
20211
+ init_projects();
20212
+ init_tools();
20213
+ defaultLogger = getLogger("projectFull");
20214
+ }
20215
+ });
20216
+
20217
+ // ../packages/agents-core/src/data-access/tasks.ts
20218
+ import { and as and18, eq as eq18 } from "drizzle-orm";
20219
+ var init_tasks = __esm({
20220
+ "../packages/agents-core/src/data-access/tasks.ts"() {
20221
+ "use strict";
20222
+ init_esm_shims();
20223
+ init_schema();
20224
+ }
20225
+ });
20226
+
20227
+ // ../packages/agents-core/src/data-access/validation.ts
20228
+ var init_validation = __esm({
20229
+ "../packages/agents-core/src/data-access/validation.ts"() {
20230
+ "use strict";
20231
+ init_esm_shims();
20232
+ init_projects();
20233
+ }
20234
+ });
20235
+
20236
+ // ../packages/agents-core/src/data-access/index.ts
20237
+ var init_data_access = __esm({
20238
+ "../packages/agents-core/src/data-access/index.ts"() {
20239
+ "use strict";
20240
+ init_esm_shims();
20241
+ init_client();
20242
+ init_agentGraphs();
20243
+ init_agentRelations();
20244
+ init_agents();
20245
+ init_apiKeys2();
20246
+ init_artifactComponents();
20247
+ init_contextCache();
20248
+ init_contextConfigs();
20249
+ init_conversations2();
20250
+ init_credentialReferences();
20251
+ init_dataComponents();
20252
+ init_externalAgents();
20253
+ init_functions();
20254
+ init_graphFull2();
20255
+ init_ledgerArtifacts();
20256
+ init_messages();
20257
+ init_projectFull();
20258
+ init_projects();
20259
+ init_tasks();
20260
+ init_tools();
20261
+ init_validation();
20262
+ }
20263
+ });
20264
+
20168
20265
  // ../packages/agents-core/src/utils/tracer.ts
20169
20266
  var tracer;
20170
20267
  var init_tracer = __esm({
@@ -20178,20 +20275,20 @@ var init_tracer = __esm({
20178
20275
  });
20179
20276
 
20180
20277
  // ../packages/agents-core/src/context/contextCache.ts
20181
- var logger6;
20278
+ var logger7;
20182
20279
  var init_contextCache2 = __esm({
20183
20280
  "../packages/agents-core/src/context/contextCache.ts"() {
20184
20281
  "use strict";
20185
20282
  init_esm_shims();
20186
20283
  init_data_access();
20187
20284
  init_logger();
20188
- logger6 = getLogger("context-cache");
20285
+ logger7 = getLogger("context-cache");
20189
20286
  }
20190
20287
  });
20191
20288
 
20192
20289
  // ../packages/agents-core/src/context/ContextResolver.ts
20193
20290
  import crypto4 from "crypto";
20194
- var logger7;
20291
+ var logger8;
20195
20292
  var init_ContextResolver = __esm({
20196
20293
  "../packages/agents-core/src/context/ContextResolver.ts"() {
20197
20294
  "use strict";
@@ -20200,25 +20297,25 @@ var init_ContextResolver = __esm({
20200
20297
  init_tracer();
20201
20298
  init_ContextFetcher();
20202
20299
  init_contextCache2();
20203
- logger7 = getLogger("context-resolver");
20300
+ logger8 = getLogger("context-resolver");
20204
20301
  }
20205
20302
  });
20206
20303
 
20207
20304
  // ../packages/agents-core/src/middleware/contextValidation.ts
20208
- var import_ajv2, logger8, ajv;
20305
+ var import_ajv3, logger9, ajv;
20209
20306
  var init_contextValidation = __esm({
20210
20307
  "../packages/agents-core/src/middleware/contextValidation.ts"() {
20211
20308
  "use strict";
20212
20309
  init_esm_shims();
20213
- import_ajv2 = __toESM(require_ajv2(), 1);
20310
+ import_ajv3 = __toESM(require_ajv2(), 1);
20214
20311
  init_ContextResolver();
20215
20312
  init_agentGraphs();
20216
20313
  init_contextConfigs();
20217
20314
  init_error();
20218
20315
  init_execution();
20219
20316
  init_logger();
20220
- logger8 = getLogger("context-validation");
20221
- ajv = new import_ajv2.default({ allErrors: true, strict: false });
20317
+ logger9 = getLogger("context-validation");
20318
+ ajv = new import_ajv3.default({ allErrors: true, strict: false });
20222
20319
  }
20223
20320
  });
20224
20321
 
@@ -20232,7 +20329,7 @@ var init_middleware = __esm({
20232
20329
  });
20233
20330
 
20234
20331
  // ../packages/agents-core/src/context/ContextFetcher.ts
20235
- var import_jmespath2, logger9;
20332
+ var import_jmespath2, logger10;
20236
20333
  var init_ContextFetcher = __esm({
20237
20334
  "../packages/agents-core/src/context/ContextFetcher.ts"() {
20238
20335
  "use strict";
@@ -20243,12 +20340,12 @@ var init_ContextFetcher = __esm({
20243
20340
  init_middleware();
20244
20341
  init_logger();
20245
20342
  init_TemplateEngine();
20246
- logger9 = getLogger("context-fetcher");
20343
+ logger10 = getLogger("context-fetcher");
20247
20344
  }
20248
20345
  });
20249
20346
 
20250
20347
  // ../packages/agents-core/src/context/context.ts
20251
- var logger10;
20348
+ var logger11;
20252
20349
  var init_context4 = __esm({
20253
20350
  "../packages/agents-core/src/context/context.ts"() {
20254
20351
  "use strict";
@@ -20257,7 +20354,7 @@ var init_context4 = __esm({
20257
20354
  init_utils();
20258
20355
  init_tracer();
20259
20356
  init_ContextResolver();
20260
- logger10 = getLogger("context");
20357
+ logger11 = getLogger("context");
20261
20358
  }
20262
20359
  });
20263
20360
 
@@ -20349,8 +20446,8 @@ var init_dist6 = __esm({
20349
20446
  });
20350
20447
 
20351
20448
  // ../packages/agents-core/src/credential-stores/nango-store.ts
20352
- import { z as z8 } from "zod";
20353
- var logger11, CredentialKeySchema;
20449
+ import { z as z9 } from "zod";
20450
+ var logger12, CredentialKeySchema;
20354
20451
  var init_nango_store = __esm({
20355
20452
  "../packages/agents-core/src/credential-stores/nango-store.ts"() {
20356
20453
  "use strict";
@@ -20358,10 +20455,10 @@ var init_nango_store = __esm({
20358
20455
  init_dist6();
20359
20456
  init_types();
20360
20457
  init_logger();
20361
- logger11 = getLogger("nango-credential-store");
20362
- CredentialKeySchema = z8.object({
20363
- connectionId: z8.string().min(1, "connectionId must be a non-empty string"),
20364
- providerConfigKey: z8.string().min(1, "providerConfigKey must be a non-empty string")
20458
+ logger12 = getLogger("nango-credential-store");
20459
+ CredentialKeySchema = z9.object({
20460
+ connectionId: z9.string().min(1, "connectionId must be a non-empty string"),
20461
+ providerConfigKey: z9.string().min(1, "providerConfigKey must be a non-empty string")
20365
20462
  });
20366
20463
  }
20367
20464
  });
@@ -20469,7 +20566,7 @@ import os from "os";
20469
20566
  import path2 from "path";
20470
20567
  import dotenv from "dotenv";
20471
20568
  import { findUpSync } from "find-up";
20472
- import { z as z9 } from "zod";
20569
+ import { z as z10 } from "zod";
20473
20570
  var import_dotenv_expand, loadEnvironmentFiles, envSchema, parseEnv, env;
20474
20571
  var init_env = __esm({
20475
20572
  "../packages/agents-core/src/env.ts"() {
@@ -20502,19 +20599,19 @@ var init_env = __esm({
20502
20599
  }
20503
20600
  };
20504
20601
  loadEnvironmentFiles();
20505
- envSchema = z9.object({
20506
- ENVIRONMENT: z9.enum(["development", "production", "pentest", "test"]).optional(),
20507
- DB_FILE_NAME: z9.string().optional(),
20508
- TURSO_DATABASE_URL: z9.string().optional(),
20509
- TURSO_AUTH_TOKEN: z9.string().optional(),
20510
- OTEL_TRACES_FORCE_FLUSH_ENABLED: z9.coerce.boolean().optional()
20602
+ envSchema = z10.object({
20603
+ ENVIRONMENT: z10.enum(["development", "production", "pentest", "test"]).optional(),
20604
+ DB_FILE_NAME: z10.string().optional(),
20605
+ TURSO_DATABASE_URL: z10.string().optional(),
20606
+ TURSO_AUTH_TOKEN: z10.string().optional(),
20607
+ OTEL_TRACES_FORCE_FLUSH_ENABLED: z10.coerce.boolean().optional()
20511
20608
  });
20512
20609
  parseEnv = () => {
20513
20610
  try {
20514
20611
  const parsedEnv = envSchema.parse(process.env);
20515
20612
  return parsedEnv;
20516
20613
  } catch (error) {
20517
- if (error instanceof z9.ZodError) {
20614
+ if (error instanceof z10.ZodError) {
20518
20615
  const missingVars = error.issues.map((issue) => issue.path.join("."));
20519
20616
  throw new Error(
20520
20617
  `\u274C Invalid environment variables: ${missingVars.join(", ")}
@@ -20544,6 +20641,7 @@ var init_validation2 = __esm({
20544
20641
  init_esm_shims();
20545
20642
  init_graphFull();
20546
20643
  init_id_validation();
20644
+ init_props_validation();
20547
20645
  init_schemas();
20548
20646
  }
20549
20647
  });
@@ -20671,7 +20769,7 @@ function findConfigFile(startPath = process.cwd()) {
20671
20769
  return null;
20672
20770
  }
20673
20771
  async function loadConfigFromFile(configPath) {
20674
- logger12.info({ fromPath: configPath }, `Loading config file`);
20772
+ logger13.info({ fromPath: configPath }, `Loading config file`);
20675
20773
  let resolvedPath;
20676
20774
  if (configPath) {
20677
20775
  resolvedPath = resolve2(process.cwd(), configPath);
@@ -20691,7 +20789,7 @@ async function loadConfigFromFile(configPath) {
20691
20789
  throw new Error(`No config exported from ${resolvedPath}`);
20692
20790
  }
20693
20791
  const config = normalizeConfig(rawConfig);
20694
- logger12.info({ config: maskSensitiveConfig(config) }, `Loaded config values`);
20792
+ logger13.info({ config: maskSensitiveConfig(config) }, `Loaded config values`);
20695
20793
  return config;
20696
20794
  } catch (error) {
20697
20795
  console.warn(`Warning: Failed to load config file ${resolvedPath}:`, error);
@@ -20712,9 +20810,9 @@ async function loadConfig(configPath) {
20712
20810
  config[key] = value;
20713
20811
  }
20714
20812
  });
20715
- logger12.info({ mergedConfig: maskSensitiveConfig(config) }, `Config loaded from file`);
20813
+ logger13.info({ mergedConfig: maskSensitiveConfig(config) }, `Config loaded from file`);
20716
20814
  } else {
20717
- logger12.info(
20815
+ logger13.info(
20718
20816
  { config: maskSensitiveConfig(config) },
20719
20817
  `Using default config (no config file found)`
20720
20818
  );
@@ -20766,14 +20864,14 @@ Please add agentsRunApiUrl to your configuration file`
20766
20864
  sources
20767
20865
  };
20768
20866
  }
20769
- var logger12;
20867
+ var logger13;
20770
20868
  var init_config = __esm({
20771
20869
  "src/utils/config.ts"() {
20772
20870
  "use strict";
20773
20871
  init_esm_shims();
20774
20872
  init_src();
20775
20873
  init_tsx_loader();
20776
- logger12 = getLogger("config");
20874
+ logger13 = getLogger("config");
20777
20875
  }
20778
20876
  });
20779
20877
 
@@ -20805,15 +20903,15 @@ var init_api = __esm({
20805
20903
  * Wrapper around fetch that automatically includes Authorization header if API key is present
20806
20904
  */
20807
20905
  async authenticatedFetch(url, options = {}) {
20808
- const headers = {
20906
+ const headers2 = {
20809
20907
  ...options.headers || {}
20810
20908
  };
20811
20909
  if (this.apiKey) {
20812
- headers.Authorization = `Bearer ${this.apiKey}`;
20910
+ headers2.Authorization = `Bearer ${this.apiKey}`;
20813
20911
  }
20814
20912
  return apiFetch(url, {
20815
20913
  ...options,
20816
- headers
20914
+ headers: headers2
20817
20915
  });
20818
20916
  }
20819
20917
  getTenantId() {
@@ -20917,14 +21015,15 @@ ${errorText}`);
20917
21015
  const projectId = projectIdOverride || "";
20918
21016
  return new _ExecutionApiClient(resolvedApiUrl, tenantId, projectId, config.agentsRunApiKey);
20919
21017
  }
20920
- async chatCompletion(graphId, messages2, conversationId) {
21018
+ async chatCompletion(graphId, messages2, conversationId, emitOperations) {
20921
21019
  const response = await this.authenticatedFetch(`${this.apiUrl}/v1/chat/completions`, {
20922
21020
  method: "POST",
20923
21021
  headers: {
20924
21022
  Accept: "text/event-stream",
20925
21023
  "x-inkeep-tenant-id": this.tenantId || "test-tenant-id",
20926
21024
  "x-inkeep-project-id": this.projectId,
20927
- "x-inkeep-graph-id": graphId
21025
+ "x-inkeep-graph-id": graphId,
21026
+ ...emitOperations && { "x-emit-operations": "true" }
20928
21027
  },
20929
21028
  body: JSON.stringify({
20930
21029
  model: "gpt-4o-mini",
@@ -21108,9 +21207,9 @@ async function chatCommandEnhanced(graphIdInput, options) {
21108
21207
  });
21109
21208
  const conversationId = `cli-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
21110
21209
  const messages2 = [];
21111
- let debugMode = false;
21210
+ let emitOperations = false;
21112
21211
  console.log(chalk9.gray('\n\u{1F4AC} Chat session started. Type "exit" or press Ctrl+C to quit.'));
21113
- console.log(chalk9.gray("Commands: help, clear, history, reset, debug\n"));
21212
+ console.log(chalk9.gray("Commands: help, clear, history, reset, operations\n"));
21114
21213
  async function handleStreamingResponse(stream, showDebug = false) {
21115
21214
  const decoder = new TextDecoder();
21116
21215
  const reader = stream.getReader();
@@ -21154,19 +21253,24 @@ async function chatCommandEnhanced(graphIdInput, options) {
21154
21253
  debugOperations.push(dataOp);
21155
21254
  if (showDebug && dataOp.type === "data-operation") {
21156
21255
  const opType = dataOp.data?.type || "unknown";
21157
- const ctx = dataOp.data?.ctx || {};
21158
- let ctxDisplay = "";
21159
- if (opType === "agent_thinking" || opType === "iteration_start") {
21160
- ctxDisplay = ctx.agent || JSON.stringify(ctx);
21161
- } else if (opType === "task_creation") {
21162
- ctxDisplay = `agent: ${ctx.agent}`;
21256
+ const label = dataOp.data?.label || "Unknown operation";
21257
+ const details = dataOp.data?.details || {};
21258
+ const agentId = details.agentId || "unknown-agent";
21259
+ let displayText = "";
21260
+ if (opType === "completion") {
21261
+ displayText = `${label} (agent: ${agentId})`;
21262
+ } else if (opType === "tool_execution") {
21263
+ const toolData = details.data || {};
21264
+ displayText = `${label} - ${toolData.toolName || "unknown tool"}`;
21265
+ } else if (opType === "agent_generate" || opType === "agent_reasoning") {
21266
+ displayText = `${label}`;
21163
21267
  } else {
21164
- ctxDisplay = JSON.stringify(ctx);
21268
+ displayText = `${label} (${agentId})`;
21165
21269
  }
21166
21270
  if (opType === "completion" && hasStartedResponse) {
21167
21271
  console.log("");
21168
21272
  }
21169
- console.log(chalk9.gray(` [${opType}] ${ctxDisplay}`));
21273
+ console.log(chalk9.gray(` [${opType}] ${displayText}`));
21170
21274
  }
21171
21275
  currentPos = jsonEnd;
21172
21276
  } catch {
@@ -21225,17 +21329,19 @@ async function chatCommandEnhanced(graphIdInput, options) {
21225
21329
  console.log(chalk9.gray(" \u2022 clear - Clear the screen (preserves context)"));
21226
21330
  console.log(chalk9.gray(" \u2022 history - Show conversation history"));
21227
21331
  console.log(chalk9.gray(" \u2022 reset - Reset conversation context"));
21228
- console.log(chalk9.gray(" \u2022 debug - Toggle debug mode (show/hide data operations)"));
21332
+ console.log(
21333
+ chalk9.gray(" \u2022 operations - Toggle emit operations (show/hide data operations)")
21334
+ );
21229
21335
  console.log(chalk9.gray(" \u2022 help - Show this help message"));
21230
21336
  console.log(chalk9.gray("\n Commands can be prefixed with / (e.g., /help)\n"));
21231
21337
  rl.prompt();
21232
21338
  return;
21233
21339
  }
21234
- if (command === "debug") {
21235
- debugMode = !debugMode;
21340
+ if (command === "operations") {
21341
+ emitOperations = !emitOperations;
21236
21342
  console.log(chalk9.yellow(`
21237
- \u{1F527} Debug mode: ${debugMode ? "ON" : "OFF"}`));
21238
- if (debugMode) {
21343
+ \u{1F527} Data operations: ${emitOperations ? "ON" : "OFF"}`));
21344
+ if (emitOperations) {
21239
21345
  console.log(chalk9.gray("Data operations will be shown during responses.\n"));
21240
21346
  } else {
21241
21347
  console.log(chalk9.gray("Data operations are hidden.\n"));
@@ -21272,13 +21378,18 @@ async function chatCommandEnhanced(graphIdInput, options) {
21272
21378
  messages2.push({ role: "user", content: trimmedInput });
21273
21379
  try {
21274
21380
  if (!graphId) throw new Error("No graph selected");
21275
- const response = await executionApi.chatCompletion(graphId, messages2, conversationId);
21381
+ const response = await executionApi.chatCompletion(
21382
+ graphId,
21383
+ messages2,
21384
+ conversationId,
21385
+ emitOperations
21386
+ );
21276
21387
  let assistantResponse;
21277
21388
  if (typeof response === "string") {
21278
21389
  console.log(chalk9.green("Assistant>"), response);
21279
21390
  assistantResponse = response;
21280
21391
  } else {
21281
- assistantResponse = await handleStreamingResponse(response, debugMode);
21392
+ assistantResponse = await handleStreamingResponse(response, emitOperations);
21282
21393
  }
21283
21394
  messages2.push({ role: "assistant", content: assistantResponse });
21284
21395
  } catch (error) {
@@ -21311,19 +21422,19 @@ init_esm_shims();
21311
21422
  // src/env.ts
21312
21423
  init_esm_shims();
21313
21424
  init_src();
21314
- import { z as z10 } from "zod";
21425
+ import { z as z11 } from "zod";
21315
21426
  loadEnvironmentFiles();
21316
- var envSchema2 = z10.object({
21317
- DEBUG: z10.string().optional(),
21427
+ var envSchema2 = z11.object({
21428
+ DEBUG: z11.string().optional(),
21318
21429
  // Secrets loaded from .env files (relative to where CLI is executed)
21319
- ANTHROPIC_API_KEY: z10.string().optional()
21430
+ ANTHROPIC_API_KEY: z11.string().optional()
21320
21431
  });
21321
21432
  var parseEnv2 = () => {
21322
21433
  try {
21323
21434
  const parsedEnv = envSchema2.parse(process.env);
21324
21435
  return parsedEnv;
21325
21436
  } catch (error) {
21326
- if (error instanceof z10.ZodError) {
21437
+ if (error instanceof z11.ZodError) {
21327
21438
  const missingVars = error.issues.map((issue) => issue.path.join("."));
21328
21439
  throw new Error(
21329
21440
  `\u274C Invalid environment variables: ${missingVars.join(", ")}
@@ -22026,6 +22137,7 @@ import { generateText } from "ai";
22026
22137
  // src/commands/pull.placeholder-system.ts
22027
22138
  init_esm_shims();
22028
22139
  import { randomBytes as randomBytes2 } from "crypto";
22140
+ import { jsonSchemaToZod } from "json-schema-to-zod";
22029
22141
  var MIN_REPLACEMENT_LENGTH = 50;
22030
22142
  function generateShortId(length = 8) {
22031
22143
  return randomBytes2(Math.ceil(length / 2)).toString("hex").slice(0, length);
@@ -22037,6 +22149,16 @@ function generatePlaceholder(jsonPath) {
22037
22149
  function shouldReplaceString(value, placeholder) {
22038
22150
  return value.length >= MIN_REPLACEMENT_LENGTH && placeholder.length < value.length;
22039
22151
  }
22152
+ function isJsonSchemaPath(path3) {
22153
+ if (path3.endsWith("contextConfig.headersSchema") || path3.endsWith("responseSchema")) {
22154
+ return true;
22155
+ }
22156
+ return false;
22157
+ }
22158
+ function updateTracker(tracker, placeholder, value) {
22159
+ tracker.placeholderToValue.set(placeholder, value);
22160
+ tracker.valueToPlaceholder.set(value, placeholder);
22161
+ }
22040
22162
  function processObject(obj, tracker, path3 = "") {
22041
22163
  if (typeof obj === "string") {
22042
22164
  const existingPlaceholder = tracker.valueToPlaceholder.get(obj);
@@ -22051,12 +22173,19 @@ function processObject(obj, tracker, path3 = "") {
22051
22173
  `Placeholder collision detected: placeholder '${placeholder}' already exists with different value. Existing value length: ${existingValue.length}, New value length: ${obj.length}`
22052
22174
  );
22053
22175
  }
22054
- tracker.placeholderToValue.set(placeholder, obj);
22055
- tracker.valueToPlaceholder.set(obj, placeholder);
22176
+ updateTracker(tracker, placeholder, obj);
22056
22177
  return placeholder;
22057
22178
  }
22058
22179
  return obj;
22059
22180
  }
22181
+ if (isJsonSchemaPath(path3)) {
22182
+ try {
22183
+ const zodSchema = jsonSchemaToZod(obj);
22184
+ return zodSchema;
22185
+ } catch (error) {
22186
+ console.error("Error converting JSON schema to Zod schema:", error);
22187
+ }
22188
+ }
22060
22189
  if (Array.isArray(obj)) {
22061
22190
  return obj.map((item, index2) => processObject(item, tracker, `${path3}[${index2}]`));
22062
22191
  }
@@ -22454,6 +22583,7 @@ ${getTypeDefinitions()}
22454
22583
  IMPORTANT CONTEXT:
22455
22584
  - Agents reference resources (tools, components) by their imported variable names
22456
22585
  - The 'tools' field in agents contains tool IDs that must match the imported variable names
22586
+ - If contextConfig is present, it must be imported from '@inkeep/agents-core' and used to create the context config
22457
22587
 
22458
22588
  ${NAMING_CONVENTION_RULES}
22459
22589
 
@@ -22470,6 +22600,8 @@ REQUIREMENTS:
22470
22600
  - IMPORTANT: ANY placeholder that starts with < and ends with > MUST be wrapped in template literals (backticks)
22471
22601
  - Placeholders contain multi-line content and require template literals
22472
22602
  - This prevents TypeScript syntax errors with newlines and special characters
22603
+ - you must import { z } from 'zod' if you are using zod schemas in the graph file.
22604
+ 6. If you are writing zod schemas make them clean. For example if you see z.union([z.string(), z.null()]) write it as z.string().nullable()
22473
22605
 
22474
22606
  PLACEHOLDER HANDLING EXAMPLES:
22475
22607
  // CORRECT - Placeholder wrapped in template literals:
@@ -22480,9 +22612,40 @@ prompt: '<{{agents.facts.prompt.abc12345}}>'
22480
22612
 
22481
22613
  FULL EXAMPLE:
22482
22614
  import { agent, agentGraph } from '@inkeep/agents-sdk';
22615
+ import { contextConfig, fetchDefinition } from '@inkeep/agents-core';
22483
22616
  import { userProfile } from '../data-components/user-profile';
22484
22617
  import { searchTool } from '../tools/search-tool';
22485
22618
  import { weatherTool } from '../tools/weather-tool';
22619
+ import { z } from 'zod';
22620
+
22621
+
22622
+ const supportDescriptionFetchDefinition = fetchDefinition({
22623
+ id: 'support-description',
22624
+ name: 'Support Description',
22625
+ trigger: 'initialization',
22626
+ fetchConfig: {
22627
+ url: 'https://api.example.com/support-description',
22628
+ method: 'GET',
22629
+ headers: {
22630
+ 'Authorization': 'Bearer {{headers.sessionToken}}',
22631
+ },
22632
+ transform: 'data',
22633
+ },
22634
+ responseSchema: z.object({
22635
+ description: z.string(),
22636
+ }),
22637
+ defaultValue: 'Support Description',
22638
+ });
22639
+
22640
+ const supportGraphContext = contextConfig({
22641
+ headers: z.object({
22642
+ userId: z.string(),
22643
+ sessionToken: z.string(),
22644
+ }),
22645
+ contextVariables: {
22646
+ supportDescription: supportDescriptionDefinition,
22647
+ },
22648
+ });
22486
22649
 
22487
22650
  const routerAgent = agent({
22488
22651
  id: 'router',
@@ -22550,6 +22713,7 @@ Generate ONLY the TypeScript code without any markdown or explanations.`;
22550
22713
  console.log(`[DEBUG] - Unique tools: ${toolIds.size}`);
22551
22714
  console.log(`[DEBUG] - Data components: ${dataComponentIds.size}`);
22552
22715
  console.log(`[DEBUG] - Artifact components: ${artifactComponentIds.size}`);
22716
+ console.log(`[DEBUG] - Context config: ${graphData.contextConfig ? "Yes" : "No"}`);
22553
22717
  console.log(
22554
22718
  `[DEBUG] - Has relations: ${graphData.relations ? Object.keys(graphData.relations).length : 0}`
22555
22719
  );
@@ -22720,24 +22884,42 @@ ${IMPORT_INSTRUCTIONS}
22720
22884
  REQUIREMENTS:
22721
22885
  1. Import artifactComponent from '@inkeep/agents-sdk'
22722
22886
  2. Create the artifact component using artifactComponent()
22723
- 3. Include summaryProps and fullProps from the component data
22724
- 4. Include the 'id' property to preserve the original component ID
22887
+ 3. Include props from the component data with inPreview indicators
22888
+ 4. Export following naming convention rules (camelCase version of ID)
22889
+ 5. Include the 'id' property to preserve the original component ID
22890
+ 6. CRITICAL: All imports must be alphabetically sorted to comply with Biome linting
22725
22891
 
22726
22892
  EXAMPLE:
22727
22893
  import { artifactComponent } from '@inkeep/agents-sdk';
22728
22894
 
22895
+ // Component ID 'pdf_export' becomes export name 'pdfExport'
22896
+ export const pdfExport = artifactComponent({
22897
+ id: 'pdf_export',
22898
+ name: 'PDF Export',
22899
+ description: 'Export data as PDF',
22900
+ props: {
22901
+ type: 'object',
22902
+ properties: {
22903
+ filename: { type: 'string', required: true, inPreview: true },
22904
+ content: { type: 'object', required: true, inPreview: false }
22905
+ }
22906
+ }
22907
+ });
22908
+
22909
+ EXAMPLE WITH HYPHEN ID:
22910
+ import { artifactComponent } from '@inkeep/agents-sdk';
22911
+
22912
+ // Component ID 'order-summary' becomes export name 'orderSummary'
22729
22913
  export const orderSummary = artifactComponent({
22730
22914
  id: 'order-summary',
22731
22915
  name: 'Order Summary',
22732
22916
  description: 'Summary of customer order',
22733
- summaryProps: {
22734
- orderId: { type: 'string', required: true },
22735
- total: { type: 'number', required: true }
22736
- },
22737
- fullProps: {
22738
- orderId: { type: 'string', required: true },
22739
- items: { type: 'array', required: true },
22740
- total: { type: 'number', required: true },
22917
+ props: {
22918
+ type: 'object',
22919
+ properties: {
22920
+ orderId: { type: 'string', required: true, inPreview: true },
22921
+ total: { type: 'number', required: true, inPreview: true },
22922
+ items: { type: 'array', required: true, inPreview: false },
22741
22923
  tax: { type: 'number' }
22742
22924
  }
22743
22925
  });
@@ -23602,9 +23784,7 @@ async function pushCommand(options) {
23602
23784
  for (const graph of graphs) {
23603
23785
  const graphStats = graph.getStats();
23604
23786
  console.log(
23605
- chalk8.gray(
23606
- ` \u2022 ${graph.getName()} (${graph.getId()}): ${graphStats.agentCount} agents, ${graphStats.toolCount} tools`
23607
- )
23787
+ chalk8.gray(` \u2022 ${graph.getName()} (${graph.getId()}): ${graphStats.agentCount} agents`)
23608
23788
  );
23609
23789
  }
23610
23790
  }