@inkeep/agents-cli 0.15.0 → 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 +1281 -1119
  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,31 +2750,39 @@ 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
@@ -2653,8 +2802,8 @@ var init_schemas = __esm({
2653
2802
  id: resourceIdSchema,
2654
2803
  agentId: resourceIdSchema,
2655
2804
  toolId: resourceIdSchema,
2656
- selectedTools: z.array(z.string()).nullish(),
2657
- headers: z.record(z.string(), z.string()).nullish()
2805
+ selectedTools: z2.array(z2.string()).nullish(),
2806
+ headers: z2.record(z2.string(), z2.string()).nullish()
2658
2807
  });
2659
2808
  AgentToolRelationUpdateSchema = AgentToolRelationInsertSchema.partial();
2660
2809
  AgentToolRelationApiSelectSchema = createGraphScopedApiSchema(
@@ -2672,83 +2821,87 @@ var init_schemas = __esm({
2672
2821
  LedgerArtifactApiSelectSchema = createApiSchema(LedgerArtifactSelectSchema);
2673
2822
  LedgerArtifactApiInsertSchema = createApiInsertSchema(LedgerArtifactInsertSchema);
2674
2823
  LedgerArtifactApiUpdateSchema = createApiUpdateSchema(LedgerArtifactUpdateSchema);
2675
- StatusComponentSchema = z.object({
2676
- type: z.string(),
2677
- description: z.string().optional(),
2678
- detailsSchema: z.object({
2679
- type: z.literal("object"),
2680
- properties: z.record(z.string(), z.any()),
2681
- 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()
2682
2831
  }).optional()
2683
2832
  });
2684
- StatusUpdateSchema = z.object({
2685
- enabled: z.boolean().optional(),
2686
- numEvents: z.number().min(1).max(100).optional(),
2687
- timeInSeconds: z.number().min(1).max(600).optional(),
2688
- prompt: z.string().max(2e3, "Custom prompt cannot exceed 2000 characters").optional(),
2689
- 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()
2690
2839
  });
2691
- CanUseItemSchema = z.object({
2692
- agentToolRelationId: z.string().optional(),
2693
- toolId: z.string(),
2694
- toolSelection: z.array(z.string()).nullish(),
2695
- 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()
2696
2845
  });
2697
2846
  FullGraphAgentInsertSchema = AgentApiInsertSchema.extend({
2698
- type: z.literal("internal"),
2699
- canUse: z.array(CanUseItemSchema),
2700
- dataComponents: z.array(z.string()).optional(),
2701
- artifactComponents: z.array(z.string()).optional(),
2702
- canTransferTo: z.array(z.string()).optional(),
2703
- 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()
2704
2854
  });
2705
2855
  FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
2706
- agents: z.record(z.string(), z.union([FullGraphAgentInsertSchema, ExternalAgentApiInsertSchema])),
2707
- // Removed project-scoped resources - these are now managed at project level:
2708
- // tools, credentialReferences, dataComponents, artifactComponents
2709
- // Agent relationships to these resources are maintained via agent.tools, agent.dataComponents, etc.
2710
- contextConfig: z.optional(ContextConfigApiInsertSchema),
2711
- 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),
2712
2864
  models: ModelSchema.optional(),
2713
2865
  stopWhen: GraphStopWhenSchema.optional(),
2714
- 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()
2715
2867
  });
2716
2868
  GraphWithinContextOfProjectSchema = AgentGraphApiInsertSchema.extend({
2717
- agents: z.record(
2718
- z.string(),
2719
- z.discriminatedUnion("type", [
2869
+ agents: z2.record(
2870
+ z2.string(),
2871
+ z2.discriminatedUnion("type", [
2720
2872
  FullGraphAgentInsertSchema,
2721
- ExternalAgentApiInsertSchema.extend({ type: z.literal("external") })
2873
+ ExternalAgentApiInsertSchema.extend({ type: z2.literal("external") })
2722
2874
  ])
2723
2875
  ),
2724
- contextConfig: z.optional(ContextConfigApiInsertSchema),
2725
- statusUpdates: z.optional(StatusUpdateSchema),
2876
+ contextConfig: z2.optional(ContextConfigApiInsertSchema),
2877
+ statusUpdates: z2.optional(StatusUpdateSchema),
2726
2878
  models: ModelSchema.optional(),
2727
2879
  stopWhen: GraphStopWhenSchema.optional(),
2728
- 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()
2729
2881
  });
2730
- PaginationSchema = z.object({
2731
- page: z.coerce.number().min(1).default(1),
2732
- limit: z.coerce.number().min(1).max(100).default(10),
2733
- total: z.number(),
2734
- 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()
2735
2887
  });
2736
- ErrorResponseSchema = z.object({
2737
- error: z.string(),
2738
- message: z.string().optional(),
2739
- details: z.unknown().optional()
2888
+ ErrorResponseSchema = z2.object({
2889
+ error: z2.string(),
2890
+ message: z2.string().optional(),
2891
+ details: z2.unknown().optional()
2740
2892
  });
2741
- ExistsResponseSchema = z.object({
2742
- exists: z.boolean()
2893
+ ExistsResponseSchema = z2.object({
2894
+ exists: z2.boolean()
2743
2895
  });
2744
- RemovedResponseSchema = z.object({
2745
- message: z.string(),
2746
- removed: z.boolean()
2896
+ RemovedResponseSchema = z2.object({
2897
+ message: z2.string(),
2898
+ removed: z2.boolean()
2747
2899
  });
2748
2900
  ProjectSelectSchema = createSelectSchema(projects);
2749
2901
  ProjectInsertSchema = createInsertSchema(projects).extend({
2750
2902
  models: ProjectModelSchema,
2751
- stopWhen: StopWhenSchema.optional()
2903
+ stopWhen: StopWhenSchema.optional(),
2904
+ sandboxConfig: SandboxConfigSchema.optional()
2752
2905
  }).omit({
2753
2906
  createdAt: true,
2754
2907
  updatedAt: true
@@ -2758,112 +2911,117 @@ var init_schemas = __esm({
2758
2911
  ProjectApiInsertSchema = ProjectInsertSchema.omit({ tenantId: true });
2759
2912
  ProjectApiUpdateSchema = ProjectUpdateSchema.omit({ tenantId: true });
2760
2913
  FullProjectDefinitionSchema = ProjectApiInsertSchema.extend({
2761
- graphs: z.record(z.string(), GraphWithinContextOfProjectSchema),
2762
- tools: z.record(z.string(), ToolApiInsertSchema),
2763
- dataComponents: z.record(z.string(), DataComponentApiInsertSchema).optional(),
2764
- artifactComponents: z.record(z.string(), ArtifactComponentApiInsertSchema).optional(),
2765
- statusUpdates: z.optional(StatusUpdateSchema),
2766
- credentialReferences: z.record(z.string(), CredentialReferenceApiInsertSchema).optional(),
2767
- createdAt: z.string().optional(),
2768
- 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()
2769
2925
  });
2770
- HeadersScopeSchema = z.object({
2771
- "x-inkeep-tenant-id": z.string().optional().openapi({
2926
+ HeadersScopeSchema = z2.object({
2927
+ "x-inkeep-tenant-id": z2.string().optional().openapi({
2772
2928
  description: "Tenant identifier",
2773
2929
  example: "tenant_123"
2774
2930
  }),
2775
- "x-inkeep-project-id": z.string().optional().openapi({
2931
+ "x-inkeep-project-id": z2.string().optional().openapi({
2776
2932
  description: "Project identifier",
2777
2933
  example: "project_456"
2778
2934
  }),
2779
- "x-inkeep-graph-id": z.string().optional().openapi({
2935
+ "x-inkeep-graph-id": z2.string().optional().openapi({
2780
2936
  description: "Graph identifier",
2781
2937
  example: "graph_789"
2782
2938
  })
2783
2939
  });
2784
- TenantParamsSchema = z.object({
2785
- tenantId: z.string().openapi({
2940
+ TenantParamsSchema = z2.object({
2941
+ tenantId: z2.string().openapi({
2786
2942
  description: "Tenant identifier",
2787
2943
  example: "tenant_123"
2788
2944
  })
2789
2945
  }).openapi("TenantParams");
2790
- TenantProjectParamsSchema = z.object({
2791
- tenantId: z.string().openapi({
2946
+ TenantProjectParamsSchema = z2.object({
2947
+ tenantId: z2.string().openapi({
2792
2948
  description: "Tenant identifier",
2793
2949
  example: "tenant_123"
2794
2950
  }),
2795
- projectId: z.string().openapi({
2951
+ projectId: z2.string().openapi({
2796
2952
  description: "Project identifier",
2797
2953
  example: "project_456"
2798
2954
  })
2799
2955
  }).openapi("TenantProjectParams");
2800
- TenantProjectGraphParamsSchema = z.object({
2801
- tenantId: z.string().openapi({
2956
+ TenantProjectGraphParamsSchema = z2.object({
2957
+ tenantId: z2.string().openapi({
2802
2958
  description: "Tenant identifier",
2803
2959
  example: "tenant_123"
2804
2960
  }),
2805
- projectId: z.string().openapi({
2961
+ projectId: z2.string().openapi({
2806
2962
  description: "Project identifier",
2807
2963
  example: "project_456"
2808
2964
  }),
2809
- graphId: z.string().openapi({
2965
+ graphId: z2.string().openapi({
2810
2966
  description: "Graph identifier",
2811
2967
  example: "graph_789"
2812
2968
  })
2813
2969
  }).openapi("TenantProjectGraphParams");
2814
- TenantProjectGraphIdParamsSchema = z.object({
2815
- tenantId: z.string().openapi({
2970
+ TenantProjectGraphIdParamsSchema = z2.object({
2971
+ tenantId: z2.string().openapi({
2816
2972
  description: "Tenant identifier",
2817
2973
  example: "tenant_123"
2818
2974
  }),
2819
- projectId: z.string().openapi({
2975
+ projectId: z2.string().openapi({
2820
2976
  description: "Project identifier",
2821
2977
  example: "project_456"
2822
2978
  }),
2823
- graphId: z.string().openapi({
2979
+ graphId: z2.string().openapi({
2824
2980
  description: "Graph identifier",
2825
2981
  example: "graph_789"
2826
2982
  }),
2827
2983
  id: resourceIdSchema
2828
2984
  }).openapi("TenantProjectGraphIdParams");
2829
- TenantProjectIdParamsSchema = z.object({
2830
- tenantId: z.string().openapi({
2985
+ TenantProjectIdParamsSchema = z2.object({
2986
+ tenantId: z2.string().openapi({
2831
2987
  description: "Tenant identifier",
2832
2988
  example: "tenant_123"
2833
2989
  }),
2834
- projectId: z.string().openapi({
2990
+ projectId: z2.string().openapi({
2835
2991
  description: "Project identifier",
2836
2992
  example: "project_456"
2837
2993
  }),
2838
2994
  id: resourceIdSchema
2839
2995
  }).openapi("TenantProjectIdParams");
2840
- TenantIdParamsSchema = z.object({
2841
- tenantId: z.string().openapi({
2996
+ TenantIdParamsSchema = z2.object({
2997
+ tenantId: z2.string().openapi({
2842
2998
  description: "Tenant identifier",
2843
2999
  example: "tenant_123"
2844
3000
  }),
2845
3001
  id: resourceIdSchema
2846
3002
  }).openapi("TenantIdParams");
2847
- IdParamsSchema = z.object({
3003
+ IdParamsSchema = z2.object({
2848
3004
  id: resourceIdSchema
2849
3005
  }).openapi("IdParams");
2850
- PaginationQueryParamsSchema = z.object({
2851
- page: z.coerce.number().min(1).default(1),
2852
- 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)
2853
3009
  });
2854
3010
  }
2855
3011
  });
2856
3012
 
2857
3013
  // ../packages/agents-core/src/context/ContextConfig.ts
2858
- import { z as z3 } from "zod";
2859
- var logger;
3014
+ import { z as z4 } from "zod";
3015
+ var logger2;
2860
3016
  var init_ContextConfig = __esm({
2861
3017
  "../packages/agents-core/src/context/ContextConfig.ts"() {
2862
3018
  "use strict";
2863
3019
  init_esm_shims();
3020
+ init_conversations();
2864
3021
  init_logger();
3022
+ init_schema_conversion();
2865
3023
  init_schemas();
2866
- logger = getLogger("context-config");
3024
+ logger2 = getLogger("context-config");
2867
3025
  }
2868
3026
  });
2869
3027
 
@@ -4379,14 +4537,14 @@ var require_jmespath = __commonJS({
4379
4537
  });
4380
4538
 
4381
4539
  // ../packages/agents-core/src/context/TemplateEngine.ts
4382
- var import_jmespath, logger2;
4540
+ var import_jmespath, logger3;
4383
4541
  var init_TemplateEngine = __esm({
4384
4542
  "../packages/agents-core/src/context/TemplateEngine.ts"() {
4385
4543
  "use strict";
4386
4544
  init_esm_shims();
4387
4545
  import_jmespath = __toESM(require_jmespath(), 1);
4388
4546
  init_logger();
4389
- logger2 = getLogger("template-engine");
4547
+ logger3 = getLogger("template-engine");
4390
4548
  }
4391
4549
  });
4392
4550
 
@@ -4458,51 +4616,6 @@ var init_client = __esm({
4458
4616
  }
4459
4617
  });
4460
4618
 
4461
- // ../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
4462
- import { webcrypto as crypto2 } from "crypto";
4463
- function fillPool(bytes) {
4464
- if (!pool || pool.length < bytes) {
4465
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
4466
- crypto2.getRandomValues(pool);
4467
- poolOffset = 0;
4468
- } else if (poolOffset + bytes > pool.length) {
4469
- crypto2.getRandomValues(pool);
4470
- poolOffset = 0;
4471
- }
4472
- poolOffset += bytes;
4473
- }
4474
- function random(bytes) {
4475
- fillPool(bytes |= 0);
4476
- return pool.subarray(poolOffset - bytes, poolOffset);
4477
- }
4478
- function customRandom(alphabet, defaultSize, getRandom) {
4479
- let mask = (2 << 31 - Math.clz32(alphabet.length - 1 | 1)) - 1;
4480
- let step = Math.ceil(1.6 * mask * defaultSize / alphabet.length);
4481
- return (size = defaultSize) => {
4482
- if (!size) return "";
4483
- let id = "";
4484
- while (true) {
4485
- let bytes = getRandom(step);
4486
- let i2 = step;
4487
- while (i2--) {
4488
- id += alphabet[bytes[i2] & mask] || "";
4489
- if (id.length >= size) return id;
4490
- }
4491
- }
4492
- };
4493
- }
4494
- function customAlphabet(alphabet, size = 21) {
4495
- return customRandom(alphabet, size, random);
4496
- }
4497
- var POOL_SIZE_MULTIPLIER, pool, poolOffset;
4498
- var init_nanoid = __esm({
4499
- "../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js"() {
4500
- "use strict";
4501
- init_esm_shims();
4502
- POOL_SIZE_MULTIPLIER = 128;
4503
- }
4504
- });
4505
-
4506
4619
  // ../packages/agents-core/src/data-access/agentRelations.ts
4507
4620
  import { and, count, desc, eq, isNotNull } from "drizzle-orm";
4508
4621
  var init_agentRelations = __esm({
@@ -4543,24 +4656,29 @@ var init_externalAgents = __esm({
4543
4656
  }
4544
4657
  });
4545
4658
 
4546
- // ../packages/agents-core/src/data-access/agentGraphs.ts
4547
- import { and as and5, count as count5, desc as desc5, eq as eq5, inArray as inArray2 } from "drizzle-orm";
4548
- var init_agentGraphs = __esm({
4549
- "../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"() {
4550
4663
  "use strict";
4551
4664
  init_esm_shims();
4552
4665
  init_schema();
4553
- init_agentRelations();
4554
- init_agents();
4555
- init_contextConfigs();
4556
- 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();
4557
4675
  }
4558
4676
  });
4559
4677
 
4560
4678
  // ../packages/agents-core/src/utils/apiKeys.ts
4561
4679
  import { randomBytes, scrypt, timingSafeEqual } from "crypto";
4562
4680
  import { promisify } from "util";
4563
- var scryptAsync, logger3, PUBLIC_ID_LENGTH, PUBLIC_ID_ALPHABET, generatePublicId;
4681
+ var scryptAsync, logger4, PUBLIC_ID_LENGTH, PUBLIC_ID_ALPHABET, generatePublicId;
4564
4682
  var init_apiKeys = __esm({
4565
4683
  "../packages/agents-core/src/utils/apiKeys.ts"() {
4566
4684
  "use strict";
@@ -4568,104 +4686,13 @@ var init_apiKeys = __esm({
4568
4686
  init_nanoid();
4569
4687
  init_logger();
4570
4688
  scryptAsync = promisify(scrypt);
4571
- logger3 = getLogger("api-key");
4689
+ logger4 = getLogger("api-key");
4572
4690
  PUBLIC_ID_LENGTH = 12;
4573
4691
  PUBLIC_ID_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-";
4574
4692
  generatePublicId = customAlphabet(PUBLIC_ID_ALPHABET, PUBLIC_ID_LENGTH);
4575
4693
  }
4576
4694
  });
4577
4695
 
4578
- // ../packages/agents-core/src/data-access/apiKeys.ts
4579
- import { and as and6, count as count6, desc as desc6, eq as eq6 } from "drizzle-orm";
4580
- var init_apiKeys2 = __esm({
4581
- "../packages/agents-core/src/data-access/apiKeys.ts"() {
4582
- "use strict";
4583
- init_esm_shims();
4584
- init_schema();
4585
- init_apiKeys();
4586
- }
4587
- });
4588
-
4589
- // ../packages/agents-core/src/data-access/artifactComponents.ts
4590
- import { and as and7, count as count7, desc as desc7, eq as eq7 } from "drizzle-orm";
4591
- var init_artifactComponents = __esm({
4592
- "../packages/agents-core/src/data-access/artifactComponents.ts"() {
4593
- "use strict";
4594
- init_esm_shims();
4595
- init_schema();
4596
- }
4597
- });
4598
-
4599
- // ../packages/agents-core/src/data-access/contextCache.ts
4600
- import { and as and8, eq as eq8 } from "drizzle-orm";
4601
- var init_contextCache = __esm({
4602
- "../packages/agents-core/src/data-access/contextCache.ts"() {
4603
- "use strict";
4604
- init_esm_shims();
4605
- init_schema();
4606
- }
4607
- });
4608
-
4609
- // ../packages/agents-core/src/utils/conversations.ts
4610
- var generateId;
4611
- var init_conversations = __esm({
4612
- "../packages/agents-core/src/utils/conversations.ts"() {
4613
- "use strict";
4614
- init_esm_shims();
4615
- init_nanoid();
4616
- generateId = customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789", 21);
4617
- }
4618
- });
4619
-
4620
- // ../packages/agents-core/src/data-access/conversations.ts
4621
- import { and as and9, count as count8, desc as desc8, eq as eq9 } from "drizzle-orm";
4622
- var init_conversations2 = __esm({
4623
- "../packages/agents-core/src/data-access/conversations.ts"() {
4624
- "use strict";
4625
- init_esm_shims();
4626
- init_schema();
4627
- init_conversations();
4628
- }
4629
- });
4630
-
4631
- // ../packages/agents-core/src/data-access/credentialReferences.ts
4632
- import { and as and10, count as count9, desc as desc9, eq as eq10, sql as sql3 } from "drizzle-orm";
4633
- var init_credentialReferences = __esm({
4634
- "../packages/agents-core/src/data-access/credentialReferences.ts"() {
4635
- "use strict";
4636
- init_esm_shims();
4637
- init_schema();
4638
- }
4639
- });
4640
-
4641
- // ../packages/agents-core/src/data-access/dataComponents.ts
4642
- import { and as and11, count as count10, desc as desc10, eq as eq11 } from "drizzle-orm";
4643
- var init_dataComponents = __esm({
4644
- "../packages/agents-core/src/data-access/dataComponents.ts"() {
4645
- "use strict";
4646
- init_esm_shims();
4647
- init_schema();
4648
- }
4649
- });
4650
-
4651
- // ../packages/agents-core/src/validation/graphFull.ts
4652
- var init_graphFull = __esm({
4653
- "../packages/agents-core/src/validation/graphFull.ts"() {
4654
- "use strict";
4655
- init_esm_shims();
4656
- init_schemas();
4657
- }
4658
- });
4659
-
4660
- // ../packages/agents-core/src/credential-stuffer/index.ts
4661
- var init_credential_stuffer = __esm({
4662
- "../packages/agents-core/src/credential-stuffer/index.ts"() {
4663
- "use strict";
4664
- init_esm_shims();
4665
- init_CredentialStuffer();
4666
- }
4667
- });
4668
-
4669
4696
  // ../packages/agents-core/src/utils/auth-detection.ts
4670
4697
  var init_auth_detection = __esm({
4671
4698
  "../packages/agents-core/src/utils/auth-detection.ts"() {
@@ -4703,7 +4730,7 @@ var init_error = __esm({
4703
4730
  init_dist4();
4704
4731
  init_http_exception();
4705
4732
  init_logger();
4706
- ErrorCode = z.enum([
4733
+ ErrorCode = z2.enum([
4707
4734
  "bad_request",
4708
4735
  "unauthorized",
4709
4736
  "forbidden",
@@ -4721,28 +4748,28 @@ var init_error = __esm({
4721
4748
  unprocessable_entity: 422,
4722
4749
  internal_server_error: 500
4723
4750
  };
4724
- problemDetailsSchema = z.object({
4751
+ problemDetailsSchema = z2.object({
4725
4752
  // type: z.string().url().openapi({
4726
4753
  // description: "A URI reference that identifies the problem type.",
4727
4754
  // example: `${ERROR_DOCS_BASE_URL}#not-found`,
4728
4755
  // }),
4729
- title: z.string().openapi({
4756
+ title: z2.string().openapi({
4730
4757
  description: "A short, human-readable summary of the problem type.",
4731
4758
  example: "Resource Not Found"
4732
4759
  }),
4733
- status: z.number().int().openapi({
4760
+ status: z2.number().int().openapi({
4734
4761
  description: "The HTTP status code.",
4735
4762
  example: 404
4736
4763
  }),
4737
- detail: z.string().openapi({
4764
+ detail: z2.string().openapi({
4738
4765
  description: "A human-readable explanation specific to this occurrence of the problem.",
4739
4766
  example: "The requested resource was not found."
4740
4767
  }),
4741
- instance: z.string().optional().openapi({
4768
+ instance: z2.string().optional().openapi({
4742
4769
  description: "A URI reference that identifies the specific occurrence of the problem.",
4743
4770
  example: "/conversations/123"
4744
4771
  }),
4745
- requestId: z.string().optional().openapi({
4772
+ requestId: z2.string().optional().openapi({
4746
4773
  description: "A unique identifier for the request, useful for troubleshooting.",
4747
4774
  example: "req_1234567890"
4748
4775
  }),
@@ -4751,13 +4778,13 @@ var init_error = __esm({
4751
4778
  example: "not_found"
4752
4779
  })
4753
4780
  }).openapi("ProblemDetails");
4754
- errorResponseSchema = z.object({
4755
- error: z.object({
4781
+ errorResponseSchema = z2.object({
4782
+ error: z2.object({
4756
4783
  code: ErrorCode.openapi({
4757
4784
  description: "A short code indicating the error code returned.",
4758
4785
  example: "not_found"
4759
4786
  }),
4760
- message: z.string().openapi({
4787
+ message: z2.string().openapi({
4761
4788
  description: "A human readable error message.",
4762
4789
  example: "The requested resource was not found."
4763
4790
  })
@@ -4769,15 +4796,15 @@ var init_error = __esm({
4769
4796
  content: {
4770
4797
  "application/problem+json": {
4771
4798
  schema: problemDetailsSchema.extend({
4772
- code: z.literal(code).openapi({
4799
+ code: z2.literal(code).openapi({
4773
4800
  description: "A short code indicating the error code returned.",
4774
4801
  example: code
4775
4802
  }),
4776
- detail: z.string().openapi({
4803
+ detail: z2.string().openapi({
4777
4804
  description: "A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.",
4778
4805
  example: description
4779
4806
  }),
4780
- title: z.string().openapi({
4807
+ title: z2.string().openapi({
4781
4808
  description: "A short, human-readable summary of the problem type.",
4782
4809
  example: getTitleFromCode(code)
4783
4810
  }),
@@ -4785,16 +4812,16 @@ var init_error = __esm({
4785
4812
  // description: "A URI reference that identifies the problem type.",
4786
4813
  // example: `${ERROR_DOCS_BASE_URL}#${code}`,
4787
4814
  // }),
4788
- status: z.literal(errorCodeToHttpStatus[code]).openapi({
4815
+ status: z2.literal(errorCodeToHttpStatus[code]).openapi({
4789
4816
  description: "The HTTP status code.",
4790
4817
  example: errorCodeToHttpStatus[code]
4791
4818
  }),
4792
- error: z.object({
4793
- code: z.literal(code).openapi({
4819
+ error: z2.object({
4820
+ code: z2.literal(code).openapi({
4794
4821
  description: "A short code indicating the error code returned.",
4795
4822
  example: code
4796
4823
  }),
4797
- message: z.string().openapi({
4824
+ message: z2.string().openapi({
4798
4825
  description: "A concise error message suitable for display to end users. May be truncated if the full detail is long.",
4799
4826
  example: description.length > 100 ? `${description.substring(0, 97)}...` : description
4800
4827
  })
@@ -4847,57 +4874,57 @@ var init_execution = __esm({
4847
4874
  }
4848
4875
  });
4849
4876
 
4850
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
4851
- import { z as z4 } from "zod";
4852
- 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;
4853
4880
  var init_types2 = __esm({
4854
- "../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"() {
4855
4882
  "use strict";
4856
4883
  init_esm_shims();
4857
4884
  JSONRPC_VERSION = "2.0";
4858
- ProgressTokenSchema = z4.union([z4.string(), z4.number().int()]);
4859
- CursorSchema = z4.string();
4860
- RequestMetaSchema = z4.object({
4885
+ ProgressTokenSchema = z5.union([z5.string(), z5.number().int()]);
4886
+ CursorSchema = z5.string();
4887
+ RequestMetaSchema = z5.object({
4861
4888
  /**
4862
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.
4863
4890
  */
4864
- progressToken: z4.optional(ProgressTokenSchema)
4891
+ progressToken: z5.optional(ProgressTokenSchema)
4865
4892
  }).passthrough();
4866
- BaseRequestParamsSchema = z4.object({
4867
- _meta: z4.optional(RequestMetaSchema)
4893
+ BaseRequestParamsSchema = z5.object({
4894
+ _meta: z5.optional(RequestMetaSchema)
4868
4895
  }).passthrough();
4869
- RequestSchema = z4.object({
4870
- method: z4.string(),
4871
- params: z4.optional(BaseRequestParamsSchema)
4896
+ RequestSchema = z5.object({
4897
+ method: z5.string(),
4898
+ params: z5.optional(BaseRequestParamsSchema)
4872
4899
  });
4873
- BaseNotificationParamsSchema = z4.object({
4900
+ BaseNotificationParamsSchema = z5.object({
4874
4901
  /**
4875
4902
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4876
4903
  * for notes on _meta usage.
4877
4904
  */
4878
- _meta: z4.optional(z4.object({}).passthrough())
4905
+ _meta: z5.optional(z5.object({}).passthrough())
4879
4906
  }).passthrough();
4880
- NotificationSchema = z4.object({
4881
- method: z4.string(),
4882
- params: z4.optional(BaseNotificationParamsSchema)
4907
+ NotificationSchema = z5.object({
4908
+ method: z5.string(),
4909
+ params: z5.optional(BaseNotificationParamsSchema)
4883
4910
  });
4884
- ResultSchema = z4.object({
4911
+ ResultSchema = z5.object({
4885
4912
  /**
4886
4913
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
4887
4914
  * for notes on _meta usage.
4888
4915
  */
4889
- _meta: z4.optional(z4.object({}).passthrough())
4916
+ _meta: z5.optional(z5.object({}).passthrough())
4890
4917
  }).passthrough();
4891
- RequestIdSchema = z4.union([z4.string(), z4.number().int()]);
4892
- JSONRPCRequestSchema = z4.object({
4893
- jsonrpc: z4.literal(JSONRPC_VERSION),
4918
+ RequestIdSchema = z5.union([z5.string(), z5.number().int()]);
4919
+ JSONRPCRequestSchema = z5.object({
4920
+ jsonrpc: z5.literal(JSONRPC_VERSION),
4894
4921
  id: RequestIdSchema
4895
4922
  }).merge(RequestSchema).strict();
4896
- JSONRPCNotificationSchema = z4.object({
4897
- jsonrpc: z4.literal(JSONRPC_VERSION)
4923
+ JSONRPCNotificationSchema = z5.object({
4924
+ jsonrpc: z5.literal(JSONRPC_VERSION)
4898
4925
  }).merge(NotificationSchema).strict();
4899
- JSONRPCResponseSchema = z4.object({
4900
- jsonrpc: z4.literal(JSONRPC_VERSION),
4926
+ JSONRPCResponseSchema = z5.object({
4927
+ jsonrpc: z5.literal(JSONRPC_VERSION),
4901
4928
  id: RequestIdSchema,
4902
4929
  result: ResultSchema
4903
4930
  }).strict();
@@ -4910,33 +4937,28 @@ var init_types2 = __esm({
4910
4937
  ErrorCode3[ErrorCode3["InvalidParams"] = -32602] = "InvalidParams";
4911
4938
  ErrorCode3[ErrorCode3["InternalError"] = -32603] = "InternalError";
4912
4939
  })(ErrorCode2 || (ErrorCode2 = {}));
4913
- JSONRPCErrorSchema = z4.object({
4914
- jsonrpc: z4.literal(JSONRPC_VERSION),
4940
+ JSONRPCErrorSchema = z5.object({
4941
+ jsonrpc: z5.literal(JSONRPC_VERSION),
4915
4942
  id: RequestIdSchema,
4916
- error: z4.object({
4943
+ error: z5.object({
4917
4944
  /**
4918
4945
  * The error type that occurred.
4919
4946
  */
4920
- code: z4.number().int(),
4947
+ code: z5.number().int(),
4921
4948
  /**
4922
4949
  * A short description of the error. The message SHOULD be limited to a concise single sentence.
4923
4950
  */
4924
- message: z4.string(),
4951
+ message: z5.string(),
4925
4952
  /**
4926
4953
  * Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
4927
4954
  */
4928
- data: z4.optional(z4.unknown())
4955
+ data: z5.optional(z5.unknown())
4929
4956
  })
4930
4957
  }).strict();
4931
- JSONRPCMessageSchema = z4.union([
4932
- JSONRPCRequestSchema,
4933
- JSONRPCNotificationSchema,
4934
- JSONRPCResponseSchema,
4935
- JSONRPCErrorSchema
4936
- ]);
4958
+ JSONRPCMessageSchema = z5.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
4937
4959
  EmptyResultSchema = ResultSchema.strict();
4938
4960
  CancelledNotificationSchema = NotificationSchema.extend({
4939
- method: z4.literal("notifications/cancelled"),
4961
+ method: z5.literal("notifications/cancelled"),
4940
4962
  params: BaseNotificationParamsSchema.extend({
4941
4963
  /**
4942
4964
  * The ID of the request to cancel.
@@ -4947,136 +4969,144 @@ var init_types2 = __esm({
4947
4969
  /**
4948
4970
  * An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
4949
4971
  */
4950
- reason: z4.string().optional()
4972
+ reason: z5.string().optional()
4951
4973
  })
4952
4974
  });
4953
- IconSchema = z4.object({
4975
+ IconSchema = z5.object({
4954
4976
  /**
4955
4977
  * URL or data URI for the icon.
4956
4978
  */
4957
- src: z4.string(),
4979
+ src: z5.string(),
4958
4980
  /**
4959
4981
  * Optional MIME type for the icon.
4960
4982
  */
4961
- 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({
4962
4993
  /**
4963
- * 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)
4964
5003
  */
4965
- sizes: z4.optional(z4.string())
5004
+ icons: z5.array(IconSchema).optional()
4966
5005
  }).passthrough();
4967
- BaseMetadataSchema = z4.object({
5006
+ BaseMetadataSchema = z5.object({
4968
5007
  /** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
4969
- name: z4.string(),
5008
+ name: z5.string(),
4970
5009
  /**
4971
- * Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
4972
- * even by those unfamiliar with domain-specific terminology.
4973
- *
4974
- * If not provided, the name should be used for display (except for Tool,
4975
- * where `annotations.title` should be given precedence over using `name`,
4976
- * if present).
4977
- */
4978
- 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())
4979
5018
  }).passthrough();
4980
5019
  ImplementationSchema = BaseMetadataSchema.extend({
4981
- version: z4.string(),
5020
+ version: z5.string(),
4982
5021
  /**
4983
5022
  * An optional URL of the website for this implementation.
4984
5023
  */
4985
- websiteUrl: z4.optional(z4.string()),
4986
- /**
4987
- * An optional list of icons for this implementation.
4988
- * This can be used by clients to display the implementation in a user interface.
4989
- * 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.
4990
- * The `mimeType` property should be a valid MIME type for the icon file, such as "image/png" or "image/svg+xml".
4991
- * 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.
4992
- * The `sizes` property is optional, and if not provided, the client should assume that the icon can be used at any size.
4993
- */
4994
- icons: z4.optional(z4.array(IconSchema))
4995
- });
4996
- ClientCapabilitiesSchema = z4.object({
5024
+ websiteUrl: z5.optional(z5.string())
5025
+ }).merge(IconsSchema);
5026
+ ClientCapabilitiesSchema = z5.object({
4997
5027
  /**
4998
5028
  * Experimental, non-standard capabilities that the client supports.
4999
5029
  */
5000
- experimental: z4.optional(z4.object({}).passthrough()),
5030
+ experimental: z5.optional(z5.object({}).passthrough()),
5001
5031
  /**
5002
5032
  * Present if the client supports sampling from an LLM.
5003
5033
  */
5004
- sampling: z4.optional(z4.object({}).passthrough()),
5034
+ sampling: z5.optional(z5.object({}).passthrough()),
5005
5035
  /**
5006
5036
  * Present if the client supports eliciting user input.
5007
5037
  */
5008
- elicitation: z4.optional(z4.object({}).passthrough()),
5038
+ elicitation: z5.optional(z5.object({}).passthrough()),
5009
5039
  /**
5010
5040
  * Present if the client supports listing roots.
5011
5041
  */
5012
- roots: z4.optional(z4.object({
5042
+ roots: z5.optional(z5.object({
5013
5043
  /**
5014
5044
  * Whether the client supports issuing notifications for changes to the roots list.
5015
5045
  */
5016
- listChanged: z4.optional(z4.boolean())
5046
+ listChanged: z5.optional(z5.boolean())
5017
5047
  }).passthrough())
5018
5048
  }).passthrough();
5019
5049
  InitializeRequestSchema = RequestSchema.extend({
5020
- method: z4.literal("initialize"),
5050
+ method: z5.literal("initialize"),
5021
5051
  params: BaseRequestParamsSchema.extend({
5022
5052
  /**
5023
5053
  * The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
5024
5054
  */
5025
- protocolVersion: z4.string(),
5055
+ protocolVersion: z5.string(),
5026
5056
  capabilities: ClientCapabilitiesSchema,
5027
5057
  clientInfo: ImplementationSchema
5028
5058
  })
5029
5059
  });
5030
- ServerCapabilitiesSchema = z4.object({
5060
+ ServerCapabilitiesSchema = z5.object({
5031
5061
  /**
5032
5062
  * Experimental, non-standard capabilities that the server supports.
5033
5063
  */
5034
- experimental: z4.optional(z4.object({}).passthrough()),
5064
+ experimental: z5.optional(z5.object({}).passthrough()),
5035
5065
  /**
5036
5066
  * Present if the server supports sending log messages to the client.
5037
5067
  */
5038
- logging: z4.optional(z4.object({}).passthrough()),
5068
+ logging: z5.optional(z5.object({}).passthrough()),
5039
5069
  /**
5040
5070
  * Present if the server supports sending completions to the client.
5041
5071
  */
5042
- completions: z4.optional(z4.object({}).passthrough()),
5072
+ completions: z5.optional(z5.object({}).passthrough()),
5043
5073
  /**
5044
5074
  * Present if the server offers any prompt templates.
5045
5075
  */
5046
- prompts: z4.optional(z4.object({
5076
+ prompts: z5.optional(z5.object({
5047
5077
  /**
5048
5078
  * Whether this server supports issuing notifications for changes to the prompt list.
5049
5079
  */
5050
- listChanged: z4.optional(z4.boolean())
5080
+ listChanged: z5.optional(z5.boolean())
5051
5081
  }).passthrough()),
5052
5082
  /**
5053
5083
  * Present if the server offers any resources to read.
5054
5084
  */
5055
- resources: z4.optional(z4.object({
5085
+ resources: z5.optional(z5.object({
5056
5086
  /**
5057
5087
  * Whether this server supports clients subscribing to resource updates.
5058
5088
  */
5059
- subscribe: z4.optional(z4.boolean()),
5089
+ subscribe: z5.optional(z5.boolean()),
5060
5090
  /**
5061
5091
  * Whether this server supports issuing notifications for changes to the resource list.
5062
5092
  */
5063
- listChanged: z4.optional(z4.boolean())
5093
+ listChanged: z5.optional(z5.boolean())
5064
5094
  }).passthrough()),
5065
5095
  /**
5066
5096
  * Present if the server offers any tools to call.
5067
5097
  */
5068
- tools: z4.optional(z4.object({
5098
+ tools: z5.optional(z5.object({
5069
5099
  /**
5070
5100
  * Whether this server supports issuing notifications for changes to the tool list.
5071
5101
  */
5072
- listChanged: z4.optional(z4.boolean())
5102
+ listChanged: z5.optional(z5.boolean())
5073
5103
  }).passthrough())
5074
5104
  }).passthrough();
5075
5105
  InitializeResultSchema = ResultSchema.extend({
5076
5106
  /**
5077
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.
5078
5108
  */
5079
- protocolVersion: z4.string(),
5109
+ protocolVersion: z5.string(),
5080
5110
  capabilities: ServerCapabilitiesSchema,
5081
5111
  serverInfo: ImplementationSchema,
5082
5112
  /**
@@ -5084,30 +5114,30 @@ var init_types2 = __esm({
5084
5114
  *
5085
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.
5086
5116
  */
5087
- instructions: z4.optional(z4.string())
5117
+ instructions: z5.optional(z5.string())
5088
5118
  });
5089
5119
  InitializedNotificationSchema = NotificationSchema.extend({
5090
- method: z4.literal("notifications/initialized")
5120
+ method: z5.literal("notifications/initialized")
5091
5121
  });
5092
5122
  PingRequestSchema = RequestSchema.extend({
5093
- method: z4.literal("ping")
5123
+ method: z5.literal("ping")
5094
5124
  });
5095
- ProgressSchema = z4.object({
5125
+ ProgressSchema = z5.object({
5096
5126
  /**
5097
5127
  * The progress thus far. This should increase every time progress is made, even if the total is unknown.
5098
5128
  */
5099
- progress: z4.number(),
5129
+ progress: z5.number(),
5100
5130
  /**
5101
5131
  * Total number of items to process (or total progress required), if known.
5102
5132
  */
5103
- total: z4.optional(z4.number()),
5133
+ total: z5.optional(z5.number()),
5104
5134
  /**
5105
5135
  * An optional message describing the current progress.
5106
5136
  */
5107
- message: z4.optional(z4.string())
5137
+ message: z5.optional(z5.string())
5108
5138
  }).passthrough();
5109
5139
  ProgressNotificationSchema = NotificationSchema.extend({
5110
- method: z4.literal("notifications/progress"),
5140
+ method: z5.literal("notifications/progress"),
5111
5141
  params: BaseNotificationParamsSchema.merge(ProgressSchema).extend({
5112
5142
  /**
5113
5143
  * The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
@@ -5121,7 +5151,7 @@ var init_types2 = __esm({
5121
5151
  * An opaque token representing the current pagination position.
5122
5152
  * If provided, the server should return results starting after this cursor.
5123
5153
  */
5124
- cursor: z4.optional(CursorSchema)
5154
+ cursor: z5.optional(CursorSchema)
5125
5155
  }).optional()
5126
5156
  });
5127
5157
  PaginatedResultSchema = ResultSchema.extend({
@@ -5129,30 +5159,30 @@ var init_types2 = __esm({
5129
5159
  * An opaque token representing the pagination position after the last returned result.
5130
5160
  * If present, there may be more results available.
5131
5161
  */
5132
- nextCursor: z4.optional(CursorSchema)
5162
+ nextCursor: z5.optional(CursorSchema)
5133
5163
  });
5134
- ResourceContentsSchema = z4.object({
5164
+ ResourceContentsSchema = z5.object({
5135
5165
  /**
5136
5166
  * The URI of this resource.
5137
5167
  */
5138
- uri: z4.string(),
5168
+ uri: z5.string(),
5139
5169
  /**
5140
5170
  * The MIME type of this resource, if known.
5141
5171
  */
5142
- mimeType: z4.optional(z4.string()),
5172
+ mimeType: z5.optional(z5.string()),
5143
5173
  /**
5144
5174
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5145
5175
  * for notes on _meta usage.
5146
5176
  */
5147
- _meta: z4.optional(z4.object({}).passthrough())
5177
+ _meta: z5.optional(z5.object({}).passthrough())
5148
5178
  }).passthrough();
5149
5179
  TextResourceContentsSchema = ResourceContentsSchema.extend({
5150
5180
  /**
5151
5181
  * The text of the item. This must only be set if the item can actually be represented as text (not binary data).
5152
5182
  */
5153
- text: z4.string()
5183
+ text: z5.string()
5154
5184
  });
5155
- Base64Schema = z4.string().refine((val) => {
5185
+ Base64Schema = z5.string().refine((val) => {
5156
5186
  try {
5157
5187
  atob(val);
5158
5188
  return true;
@@ -5170,168 +5200,160 @@ var init_types2 = __esm({
5170
5200
  /**
5171
5201
  * The URI of this resource.
5172
5202
  */
5173
- uri: z4.string(),
5203
+ uri: z5.string(),
5174
5204
  /**
5175
5205
  * A description of what this resource represents.
5176
5206
  *
5177
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.
5178
5208
  */
5179
- description: z4.optional(z4.string()),
5209
+ description: z5.optional(z5.string()),
5180
5210
  /**
5181
5211
  * The MIME type of this resource, if known.
5182
5212
  */
5183
- mimeType: z4.optional(z4.string()),
5184
- /**
5185
- * An optional list of icons for this resource.
5186
- */
5187
- icons: z4.optional(z4.array(IconSchema)),
5213
+ mimeType: z5.optional(z5.string()),
5188
5214
  /**
5189
5215
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5190
5216
  * for notes on _meta usage.
5191
5217
  */
5192
- _meta: z4.optional(z4.object({}).passthrough())
5193
- });
5218
+ _meta: z5.optional(z5.object({}).passthrough())
5219
+ }).merge(IconsSchema);
5194
5220
  ResourceTemplateSchema = BaseMetadataSchema.extend({
5195
5221
  /**
5196
5222
  * A URI template (according to RFC 6570) that can be used to construct resource URIs.
5197
5223
  */
5198
- uriTemplate: z4.string(),
5224
+ uriTemplate: z5.string(),
5199
5225
  /**
5200
5226
  * A description of what this template is for.
5201
5227
  *
5202
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.
5203
5229
  */
5204
- description: z4.optional(z4.string()),
5230
+ description: z5.optional(z5.string()),
5205
5231
  /**
5206
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.
5207
5233
  */
5208
- mimeType: z4.optional(z4.string()),
5234
+ mimeType: z5.optional(z5.string()),
5209
5235
  /**
5210
5236
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5211
5237
  * for notes on _meta usage.
5212
5238
  */
5213
- _meta: z4.optional(z4.object({}).passthrough())
5214
- });
5239
+ _meta: z5.optional(z5.object({}).passthrough())
5240
+ }).merge(IconsSchema);
5215
5241
  ListResourcesRequestSchema = PaginatedRequestSchema.extend({
5216
- method: z4.literal("resources/list")
5242
+ method: z5.literal("resources/list")
5217
5243
  });
5218
5244
  ListResourcesResultSchema = PaginatedResultSchema.extend({
5219
- resources: z4.array(ResourceSchema)
5245
+ resources: z5.array(ResourceSchema)
5220
5246
  });
5221
5247
  ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
5222
- method: z4.literal("resources/templates/list")
5248
+ method: z5.literal("resources/templates/list")
5223
5249
  });
5224
5250
  ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
5225
- resourceTemplates: z4.array(ResourceTemplateSchema)
5251
+ resourceTemplates: z5.array(ResourceTemplateSchema)
5226
5252
  });
5227
5253
  ReadResourceRequestSchema = RequestSchema.extend({
5228
- method: z4.literal("resources/read"),
5254
+ method: z5.literal("resources/read"),
5229
5255
  params: BaseRequestParamsSchema.extend({
5230
5256
  /**
5231
5257
  * The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
5232
5258
  */
5233
- uri: z4.string()
5259
+ uri: z5.string()
5234
5260
  })
5235
5261
  });
5236
5262
  ReadResourceResultSchema = ResultSchema.extend({
5237
- contents: z4.array(z4.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
5263
+ contents: z5.array(z5.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
5238
5264
  });
5239
5265
  ResourceListChangedNotificationSchema = NotificationSchema.extend({
5240
- method: z4.literal("notifications/resources/list_changed")
5266
+ method: z5.literal("notifications/resources/list_changed")
5241
5267
  });
5242
5268
  SubscribeRequestSchema = RequestSchema.extend({
5243
- method: z4.literal("resources/subscribe"),
5269
+ method: z5.literal("resources/subscribe"),
5244
5270
  params: BaseRequestParamsSchema.extend({
5245
5271
  /**
5246
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.
5247
5273
  */
5248
- uri: z4.string()
5274
+ uri: z5.string()
5249
5275
  })
5250
5276
  });
5251
5277
  UnsubscribeRequestSchema = RequestSchema.extend({
5252
- method: z4.literal("resources/unsubscribe"),
5278
+ method: z5.literal("resources/unsubscribe"),
5253
5279
  params: BaseRequestParamsSchema.extend({
5254
5280
  /**
5255
5281
  * The URI of the resource to unsubscribe from.
5256
5282
  */
5257
- uri: z4.string()
5283
+ uri: z5.string()
5258
5284
  })
5259
5285
  });
5260
5286
  ResourceUpdatedNotificationSchema = NotificationSchema.extend({
5261
- method: z4.literal("notifications/resources/updated"),
5287
+ method: z5.literal("notifications/resources/updated"),
5262
5288
  params: BaseNotificationParamsSchema.extend({
5263
5289
  /**
5264
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.
5265
5291
  */
5266
- uri: z4.string()
5292
+ uri: z5.string()
5267
5293
  })
5268
5294
  });
5269
- PromptArgumentSchema = z4.object({
5295
+ PromptArgumentSchema = z5.object({
5270
5296
  /**
5271
5297
  * The name of the argument.
5272
5298
  */
5273
- name: z4.string(),
5299
+ name: z5.string(),
5274
5300
  /**
5275
5301
  * A human-readable description of the argument.
5276
5302
  */
5277
- description: z4.optional(z4.string()),
5303
+ description: z5.optional(z5.string()),
5278
5304
  /**
5279
5305
  * Whether this argument must be provided.
5280
5306
  */
5281
- required: z4.optional(z4.boolean())
5307
+ required: z5.optional(z5.boolean())
5282
5308
  }).passthrough();
5283
5309
  PromptSchema = BaseMetadataSchema.extend({
5284
5310
  /**
5285
5311
  * An optional description of what this prompt provides
5286
5312
  */
5287
- description: z4.optional(z4.string()),
5313
+ description: z5.optional(z5.string()),
5288
5314
  /**
5289
5315
  * A list of arguments to use for templating the prompt.
5290
5316
  */
5291
- arguments: z4.optional(z4.array(PromptArgumentSchema)),
5292
- /**
5293
- * An optional list of icons for this prompt.
5294
- */
5295
- icons: z4.optional(z4.array(IconSchema)),
5317
+ arguments: z5.optional(z5.array(PromptArgumentSchema)),
5296
5318
  /**
5297
5319
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5298
5320
  * for notes on _meta usage.
5299
5321
  */
5300
- _meta: z4.optional(z4.object({}).passthrough())
5301
- });
5322
+ _meta: z5.optional(z5.object({}).passthrough())
5323
+ }).merge(IconsSchema);
5302
5324
  ListPromptsRequestSchema = PaginatedRequestSchema.extend({
5303
- method: z4.literal("prompts/list")
5325
+ method: z5.literal("prompts/list")
5304
5326
  });
5305
5327
  ListPromptsResultSchema = PaginatedResultSchema.extend({
5306
- prompts: z4.array(PromptSchema)
5328
+ prompts: z5.array(PromptSchema)
5307
5329
  });
5308
5330
  GetPromptRequestSchema = RequestSchema.extend({
5309
- method: z4.literal("prompts/get"),
5331
+ method: z5.literal("prompts/get"),
5310
5332
  params: BaseRequestParamsSchema.extend({
5311
5333
  /**
5312
5334
  * The name of the prompt or prompt template.
5313
5335
  */
5314
- name: z4.string(),
5336
+ name: z5.string(),
5315
5337
  /**
5316
5338
  * Arguments to use for templating the prompt.
5317
5339
  */
5318
- arguments: z4.optional(z4.record(z4.string()))
5340
+ arguments: z5.optional(z5.record(z5.string()))
5319
5341
  })
5320
5342
  });
5321
- TextContentSchema = z4.object({
5322
- type: z4.literal("text"),
5343
+ TextContentSchema = z5.object({
5344
+ type: z5.literal("text"),
5323
5345
  /**
5324
5346
  * The text content of the message.
5325
5347
  */
5326
- text: z4.string(),
5348
+ text: z5.string(),
5327
5349
  /**
5328
5350
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5329
5351
  * for notes on _meta usage.
5330
5352
  */
5331
- _meta: z4.optional(z4.object({}).passthrough())
5353
+ _meta: z5.optional(z5.object({}).passthrough())
5332
5354
  }).passthrough();
5333
- ImageContentSchema = z4.object({
5334
- type: z4.literal("image"),
5355
+ ImageContentSchema = z5.object({
5356
+ type: z5.literal("image"),
5335
5357
  /**
5336
5358
  * The base64-encoded image data.
5337
5359
  */
@@ -5339,15 +5361,15 @@ var init_types2 = __esm({
5339
5361
  /**
5340
5362
  * The MIME type of the image. Different providers may support different image types.
5341
5363
  */
5342
- mimeType: z4.string(),
5364
+ mimeType: z5.string(),
5343
5365
  /**
5344
5366
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5345
5367
  * for notes on _meta usage.
5346
5368
  */
5347
- _meta: z4.optional(z4.object({}).passthrough())
5369
+ _meta: z5.optional(z5.object({}).passthrough())
5348
5370
  }).passthrough();
5349
- AudioContentSchema = z4.object({
5350
- type: z4.literal("audio"),
5371
+ AudioContentSchema = z5.object({
5372
+ type: z5.literal("audio"),
5351
5373
  /**
5352
5374
  * The base64-encoded audio data.
5353
5375
  */
@@ -5355,57 +5377,57 @@ var init_types2 = __esm({
5355
5377
  /**
5356
5378
  * The MIME type of the audio. Different providers may support different audio types.
5357
5379
  */
5358
- mimeType: z4.string(),
5380
+ mimeType: z5.string(),
5359
5381
  /**
5360
5382
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5361
5383
  * for notes on _meta usage.
5362
5384
  */
5363
- _meta: z4.optional(z4.object({}).passthrough())
5385
+ _meta: z5.optional(z5.object({}).passthrough())
5364
5386
  }).passthrough();
5365
- EmbeddedResourceSchema = z4.object({
5366
- type: z4.literal("resource"),
5367
- resource: z4.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
5387
+ EmbeddedResourceSchema = z5.object({
5388
+ type: z5.literal("resource"),
5389
+ resource: z5.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
5368
5390
  /**
5369
5391
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5370
5392
  * for notes on _meta usage.
5371
5393
  */
5372
- _meta: z4.optional(z4.object({}).passthrough())
5394
+ _meta: z5.optional(z5.object({}).passthrough())
5373
5395
  }).passthrough();
5374
5396
  ResourceLinkSchema = ResourceSchema.extend({
5375
- type: z4.literal("resource_link")
5397
+ type: z5.literal("resource_link")
5376
5398
  });
5377
- ContentBlockSchema = z4.union([
5399
+ ContentBlockSchema = z5.union([
5378
5400
  TextContentSchema,
5379
5401
  ImageContentSchema,
5380
5402
  AudioContentSchema,
5381
5403
  ResourceLinkSchema,
5382
5404
  EmbeddedResourceSchema
5383
5405
  ]);
5384
- PromptMessageSchema = z4.object({
5385
- role: z4.enum(["user", "assistant"]),
5406
+ PromptMessageSchema = z5.object({
5407
+ role: z5.enum(["user", "assistant"]),
5386
5408
  content: ContentBlockSchema
5387
5409
  }).passthrough();
5388
5410
  GetPromptResultSchema = ResultSchema.extend({
5389
5411
  /**
5390
5412
  * An optional description for the prompt.
5391
5413
  */
5392
- description: z4.optional(z4.string()),
5393
- messages: z4.array(PromptMessageSchema)
5414
+ description: z5.optional(z5.string()),
5415
+ messages: z5.array(PromptMessageSchema)
5394
5416
  });
5395
5417
  PromptListChangedNotificationSchema = NotificationSchema.extend({
5396
- method: z4.literal("notifications/prompts/list_changed")
5418
+ method: z5.literal("notifications/prompts/list_changed")
5397
5419
  });
5398
- ToolAnnotationsSchema = z4.object({
5420
+ ToolAnnotationsSchema = z5.object({
5399
5421
  /**
5400
5422
  * A human-readable title for the tool.
5401
5423
  */
5402
- title: z4.optional(z4.string()),
5424
+ title: z5.optional(z5.string()),
5403
5425
  /**
5404
5426
  * If true, the tool does not modify its environment.
5405
5427
  *
5406
5428
  * Default: false
5407
5429
  */
5408
- readOnlyHint: z4.optional(z4.boolean()),
5430
+ readOnlyHint: z5.optional(z5.boolean()),
5409
5431
  /**
5410
5432
  * If true, the tool may perform destructive updates to its environment.
5411
5433
  * If false, the tool performs only additive updates.
@@ -5414,7 +5436,7 @@ var init_types2 = __esm({
5414
5436
  *
5415
5437
  * Default: true
5416
5438
  */
5417
- destructiveHint: z4.optional(z4.boolean()),
5439
+ destructiveHint: z5.optional(z5.boolean()),
5418
5440
  /**
5419
5441
  * If true, calling the tool repeatedly with the same arguments
5420
5442
  * will have no additional effect on the its environment.
@@ -5423,7 +5445,7 @@ var init_types2 = __esm({
5423
5445
  *
5424
5446
  * Default: false
5425
5447
  */
5426
- idempotentHint: z4.optional(z4.boolean()),
5448
+ idempotentHint: z5.optional(z5.boolean()),
5427
5449
  /**
5428
5450
  * If true, this tool may interact with an "open world" of external
5429
5451
  * entities. If false, the tool's domain of interaction is closed.
@@ -5432,49 +5454,45 @@ var init_types2 = __esm({
5432
5454
  *
5433
5455
  * Default: true
5434
5456
  */
5435
- openWorldHint: z4.optional(z4.boolean())
5457
+ openWorldHint: z5.optional(z5.boolean())
5436
5458
  }).passthrough();
5437
5459
  ToolSchema = BaseMetadataSchema.extend({
5438
5460
  /**
5439
5461
  * A human-readable description of the tool.
5440
5462
  */
5441
- description: z4.optional(z4.string()),
5463
+ description: z5.optional(z5.string()),
5442
5464
  /**
5443
5465
  * A JSON Schema object defining the expected parameters for the tool.
5444
5466
  */
5445
- inputSchema: z4.object({
5446
- type: z4.literal("object"),
5447
- properties: z4.optional(z4.object({}).passthrough()),
5448
- 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()))
5449
5471
  }).passthrough(),
5450
5472
  /**
5451
5473
  * An optional JSON Schema object defining the structure of the tool's output returned in
5452
5474
  * the structuredContent field of a CallToolResult.
5453
5475
  */
5454
- outputSchema: z4.optional(z4.object({
5455
- type: z4.literal("object"),
5456
- properties: z4.optional(z4.object({}).passthrough()),
5457
- 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()))
5458
5480
  }).passthrough()),
5459
5481
  /**
5460
5482
  * Optional additional tool information.
5461
5483
  */
5462
- annotations: z4.optional(ToolAnnotationsSchema),
5463
- /**
5464
- * An optional list of icons for this tool.
5465
- */
5466
- icons: z4.optional(z4.array(IconSchema)),
5484
+ annotations: z5.optional(ToolAnnotationsSchema),
5467
5485
  /**
5468
5486
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5469
5487
  * for notes on _meta usage.
5470
5488
  */
5471
- _meta: z4.optional(z4.object({}).passthrough())
5472
- });
5489
+ _meta: z5.optional(z5.object({}).passthrough())
5490
+ }).merge(IconsSchema);
5473
5491
  ListToolsRequestSchema = PaginatedRequestSchema.extend({
5474
- method: z4.literal("tools/list")
5492
+ method: z5.literal("tools/list")
5475
5493
  });
5476
5494
  ListToolsResultSchema = PaginatedResultSchema.extend({
5477
- tools: z4.array(ToolSchema)
5495
+ tools: z5.array(ToolSchema)
5478
5496
  });
5479
5497
  CallToolResultSchema = ResultSchema.extend({
5480
5498
  /**
@@ -5483,13 +5501,13 @@ var init_types2 = __esm({
5483
5501
  * If the Tool does not define an outputSchema, this field MUST be present in the result.
5484
5502
  * For backwards compatibility, this field is always present, but it may be empty.
5485
5503
  */
5486
- content: z4.array(ContentBlockSchema).default([]),
5504
+ content: z5.array(ContentBlockSchema).default([]),
5487
5505
  /**
5488
5506
  * An object containing structured tool output.
5489
5507
  *
5490
5508
  * If the Tool defines an outputSchema, this field MUST be present in the result, and contain a JSON object that matches the schema.
5491
5509
  */
5492
- structuredContent: z4.object({}).passthrough().optional(),
5510
+ structuredContent: z5.object({}).passthrough().optional(),
5493
5511
  /**
5494
5512
  * Whether the tool call ended in an error.
5495
5513
  *
@@ -5504,33 +5522,24 @@ var init_types2 = __esm({
5504
5522
  * server does not support tool calls, or any other exceptional conditions,
5505
5523
  * should be reported as an MCP error response.
5506
5524
  */
5507
- isError: z4.optional(z4.boolean())
5525
+ isError: z5.optional(z5.boolean())
5508
5526
  });
5509
5527
  CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
5510
- toolResult: z4.unknown()
5528
+ toolResult: z5.unknown()
5511
5529
  }));
5512
5530
  CallToolRequestSchema = RequestSchema.extend({
5513
- method: z4.literal("tools/call"),
5531
+ method: z5.literal("tools/call"),
5514
5532
  params: BaseRequestParamsSchema.extend({
5515
- name: z4.string(),
5516
- arguments: z4.optional(z4.record(z4.unknown()))
5533
+ name: z5.string(),
5534
+ arguments: z5.optional(z5.record(z5.unknown()))
5517
5535
  })
5518
5536
  });
5519
5537
  ToolListChangedNotificationSchema = NotificationSchema.extend({
5520
- method: z4.literal("notifications/tools/list_changed")
5538
+ method: z5.literal("notifications/tools/list_changed")
5521
5539
  });
5522
- LoggingLevelSchema = z4.enum([
5523
- "debug",
5524
- "info",
5525
- "notice",
5526
- "warning",
5527
- "error",
5528
- "critical",
5529
- "alert",
5530
- "emergency"
5531
- ]);
5540
+ LoggingLevelSchema = z5.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
5532
5541
  SetLevelRequestSchema = RequestSchema.extend({
5533
- method: z4.literal("logging/setLevel"),
5542
+ method: z5.literal("logging/setLevel"),
5534
5543
  params: BaseRequestParamsSchema.extend({
5535
5544
  /**
5536
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.
@@ -5539,7 +5548,7 @@ var init_types2 = __esm({
5539
5548
  })
5540
5549
  });
5541
5550
  LoggingMessageNotificationSchema = NotificationSchema.extend({
5542
- method: z4.literal("notifications/message"),
5551
+ method: z5.literal("notifications/message"),
5543
5552
  params: BaseNotificationParamsSchema.extend({
5544
5553
  /**
5545
5554
  * The severity of this log message.
@@ -5548,133 +5557,124 @@ var init_types2 = __esm({
5548
5557
  /**
5549
5558
  * An optional name of the logger issuing this message.
5550
5559
  */
5551
- logger: z4.optional(z4.string()),
5560
+ logger: z5.optional(z5.string()),
5552
5561
  /**
5553
5562
  * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
5554
5563
  */
5555
- data: z4.unknown()
5564
+ data: z5.unknown()
5556
5565
  })
5557
5566
  });
5558
- ModelHintSchema = z4.object({
5567
+ ModelHintSchema = z5.object({
5559
5568
  /**
5560
5569
  * A hint for a model name.
5561
5570
  */
5562
- name: z4.string().optional()
5571
+ name: z5.string().optional()
5563
5572
  }).passthrough();
5564
- ModelPreferencesSchema = z4.object({
5573
+ ModelPreferencesSchema = z5.object({
5565
5574
  /**
5566
5575
  * Optional hints to use for model selection.
5567
5576
  */
5568
- hints: z4.optional(z4.array(ModelHintSchema)),
5577
+ hints: z5.optional(z5.array(ModelHintSchema)),
5569
5578
  /**
5570
5579
  * How much to prioritize cost when selecting a model.
5571
5580
  */
5572
- costPriority: z4.optional(z4.number().min(0).max(1)),
5581
+ costPriority: z5.optional(z5.number().min(0).max(1)),
5573
5582
  /**
5574
5583
  * How much to prioritize sampling speed (latency) when selecting a model.
5575
5584
  */
5576
- speedPriority: z4.optional(z4.number().min(0).max(1)),
5585
+ speedPriority: z5.optional(z5.number().min(0).max(1)),
5577
5586
  /**
5578
5587
  * How much to prioritize intelligence and capabilities when selecting a model.
5579
5588
  */
5580
- intelligencePriority: z4.optional(z4.number().min(0).max(1))
5589
+ intelligencePriority: z5.optional(z5.number().min(0).max(1))
5581
5590
  }).passthrough();
5582
- SamplingMessageSchema = z4.object({
5583
- role: z4.enum(["user", "assistant"]),
5584
- content: z4.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
5591
+ SamplingMessageSchema = z5.object({
5592
+ role: z5.enum(["user", "assistant"]),
5593
+ content: z5.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
5585
5594
  }).passthrough();
5586
5595
  CreateMessageRequestSchema = RequestSchema.extend({
5587
- method: z4.literal("sampling/createMessage"),
5596
+ method: z5.literal("sampling/createMessage"),
5588
5597
  params: BaseRequestParamsSchema.extend({
5589
- messages: z4.array(SamplingMessageSchema),
5598
+ messages: z5.array(SamplingMessageSchema),
5590
5599
  /**
5591
5600
  * An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
5592
5601
  */
5593
- systemPrompt: z4.optional(z4.string()),
5602
+ systemPrompt: z5.optional(z5.string()),
5594
5603
  /**
5595
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.
5596
5605
  */
5597
- includeContext: z4.optional(z4.enum(["none", "thisServer", "allServers"])),
5598
- temperature: z4.optional(z4.number()),
5606
+ includeContext: z5.optional(z5.enum(["none", "thisServer", "allServers"])),
5607
+ temperature: z5.optional(z5.number()),
5599
5608
  /**
5600
5609
  * The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
5601
5610
  */
5602
- maxTokens: z4.number().int(),
5603
- stopSequences: z4.optional(z4.array(z4.string())),
5611
+ maxTokens: z5.number().int(),
5612
+ stopSequences: z5.optional(z5.array(z5.string())),
5604
5613
  /**
5605
5614
  * Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
5606
5615
  */
5607
- metadata: z4.optional(z4.object({}).passthrough()),
5616
+ metadata: z5.optional(z5.object({}).passthrough()),
5608
5617
  /**
5609
5618
  * The server's preferences for which model to select.
5610
5619
  */
5611
- modelPreferences: z4.optional(ModelPreferencesSchema)
5620
+ modelPreferences: z5.optional(ModelPreferencesSchema)
5612
5621
  })
5613
5622
  });
5614
5623
  CreateMessageResultSchema = ResultSchema.extend({
5615
5624
  /**
5616
5625
  * The name of the model that generated the message.
5617
5626
  */
5618
- model: z4.string(),
5627
+ model: z5.string(),
5619
5628
  /**
5620
5629
  * The reason why sampling stopped.
5621
5630
  */
5622
- stopReason: z4.optional(z4.enum(["endTurn", "stopSequence", "maxTokens"]).or(z4.string())),
5623
- role: z4.enum(["user", "assistant"]),
5624
- content: z4.discriminatedUnion("type", [
5625
- TextContentSchema,
5626
- ImageContentSchema,
5627
- AudioContentSchema
5628
- ])
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])
5629
5634
  });
5630
- BooleanSchemaSchema = z4.object({
5631
- type: z4.literal("boolean"),
5632
- title: z4.optional(z4.string()),
5633
- description: z4.optional(z4.string()),
5634
- 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())
5635
5640
  }).passthrough();
5636
- StringSchemaSchema = z4.object({
5637
- type: z4.literal("string"),
5638
- title: z4.optional(z4.string()),
5639
- description: z4.optional(z4.string()),
5640
- minLength: z4.optional(z4.number()),
5641
- maxLength: z4.optional(z4.number()),
5642
- 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"]))
5643
5648
  }).passthrough();
5644
- NumberSchemaSchema = z4.object({
5645
- type: z4.enum(["number", "integer"]),
5646
- title: z4.optional(z4.string()),
5647
- description: z4.optional(z4.string()),
5648
- minimum: z4.optional(z4.number()),
5649
- 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())
5650
5655
  }).passthrough();
5651
- EnumSchemaSchema = z4.object({
5652
- type: z4.literal("string"),
5653
- title: z4.optional(z4.string()),
5654
- description: z4.optional(z4.string()),
5655
- enum: z4.array(z4.string()),
5656
- 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()))
5657
5662
  }).passthrough();
5658
- PrimitiveSchemaDefinitionSchema = z4.union([
5659
- BooleanSchemaSchema,
5660
- StringSchemaSchema,
5661
- NumberSchemaSchema,
5662
- EnumSchemaSchema
5663
- ]);
5663
+ PrimitiveSchemaDefinitionSchema = z5.union([BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema]);
5664
5664
  ElicitRequestSchema = RequestSchema.extend({
5665
- method: z4.literal("elicitation/create"),
5665
+ method: z5.literal("elicitation/create"),
5666
5666
  params: BaseRequestParamsSchema.extend({
5667
5667
  /**
5668
5668
  * The message to present to the user.
5669
5669
  */
5670
- message: z4.string(),
5670
+ message: z5.string(),
5671
5671
  /**
5672
5672
  * The schema for the requested user input.
5673
5673
  */
5674
- requestedSchema: z4.object({
5675
- type: z4.literal("object"),
5676
- properties: z4.record(z4.string(), PrimitiveSchemaDefinitionSchema),
5677
- 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()))
5678
5678
  }).passthrough()
5679
5679
  })
5680
5680
  });
@@ -5682,92 +5682,92 @@ var init_types2 = __esm({
5682
5682
  /**
5683
5683
  * The user's response action.
5684
5684
  */
5685
- action: z4.enum(["accept", "decline", "cancel"]),
5685
+ action: z5.enum(["accept", "decline", "cancel"]),
5686
5686
  /**
5687
5687
  * The collected user input content (only present if action is "accept").
5688
5688
  */
5689
- content: z4.optional(z4.record(z4.string(), z4.unknown()))
5689
+ content: z5.optional(z5.record(z5.string(), z5.unknown()))
5690
5690
  });
5691
- ResourceTemplateReferenceSchema = z4.object({
5692
- type: z4.literal("ref/resource"),
5691
+ ResourceTemplateReferenceSchema = z5.object({
5692
+ type: z5.literal("ref/resource"),
5693
5693
  /**
5694
5694
  * The URI or URI template of the resource.
5695
5695
  */
5696
- uri: z4.string()
5696
+ uri: z5.string()
5697
5697
  }).passthrough();
5698
- PromptReferenceSchema = z4.object({
5699
- type: z4.literal("ref/prompt"),
5698
+ PromptReferenceSchema = z5.object({
5699
+ type: z5.literal("ref/prompt"),
5700
5700
  /**
5701
5701
  * The name of the prompt or prompt template
5702
5702
  */
5703
- name: z4.string()
5703
+ name: z5.string()
5704
5704
  }).passthrough();
5705
5705
  CompleteRequestSchema = RequestSchema.extend({
5706
- method: z4.literal("completion/complete"),
5706
+ method: z5.literal("completion/complete"),
5707
5707
  params: BaseRequestParamsSchema.extend({
5708
- ref: z4.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
5708
+ ref: z5.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
5709
5709
  /**
5710
5710
  * The argument's information
5711
5711
  */
5712
- argument: z4.object({
5712
+ argument: z5.object({
5713
5713
  /**
5714
5714
  * The name of the argument
5715
5715
  */
5716
- name: z4.string(),
5716
+ name: z5.string(),
5717
5717
  /**
5718
5718
  * The value of the argument to use for completion matching.
5719
5719
  */
5720
- value: z4.string()
5720
+ value: z5.string()
5721
5721
  }).passthrough(),
5722
- context: z4.optional(z4.object({
5722
+ context: z5.optional(z5.object({
5723
5723
  /**
5724
5724
  * Previously-resolved variables in a URI template or prompt.
5725
5725
  */
5726
- arguments: z4.optional(z4.record(z4.string(), z4.string()))
5726
+ arguments: z5.optional(z5.record(z5.string(), z5.string()))
5727
5727
  }))
5728
5728
  })
5729
5729
  });
5730
5730
  CompleteResultSchema = ResultSchema.extend({
5731
- completion: z4.object({
5731
+ completion: z5.object({
5732
5732
  /**
5733
5733
  * An array of completion values. Must not exceed 100 items.
5734
5734
  */
5735
- values: z4.array(z4.string()).max(100),
5735
+ values: z5.array(z5.string()).max(100),
5736
5736
  /**
5737
5737
  * The total number of completion options available. This can exceed the number of values actually sent in the response.
5738
5738
  */
5739
- total: z4.optional(z4.number().int()),
5739
+ total: z5.optional(z5.number().int()),
5740
5740
  /**
5741
5741
  * Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
5742
5742
  */
5743
- hasMore: z4.optional(z4.boolean())
5743
+ hasMore: z5.optional(z5.boolean())
5744
5744
  }).passthrough()
5745
5745
  });
5746
- RootSchema = z4.object({
5746
+ RootSchema = z5.object({
5747
5747
  /**
5748
5748
  * The URI identifying the root. This *must* start with file:// for now.
5749
5749
  */
5750
- uri: z4.string().startsWith("file://"),
5750
+ uri: z5.string().startsWith("file://"),
5751
5751
  /**
5752
5752
  * An optional name for the root.
5753
5753
  */
5754
- name: z4.optional(z4.string()),
5754
+ name: z5.optional(z5.string()),
5755
5755
  /**
5756
5756
  * See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
5757
5757
  * for notes on _meta usage.
5758
5758
  */
5759
- _meta: z4.optional(z4.object({}).passthrough())
5759
+ _meta: z5.optional(z5.object({}).passthrough())
5760
5760
  }).passthrough();
5761
5761
  ListRootsRequestSchema = RequestSchema.extend({
5762
- method: z4.literal("roots/list")
5762
+ method: z5.literal("roots/list")
5763
5763
  });
5764
5764
  ListRootsResultSchema = ResultSchema.extend({
5765
- roots: z4.array(RootSchema)
5765
+ roots: z5.array(RootSchema)
5766
5766
  });
5767
5767
  RootsListChangedNotificationSchema = NotificationSchema.extend({
5768
- method: z4.literal("notifications/roots/list_changed")
5768
+ method: z5.literal("notifications/roots/list_changed")
5769
5769
  });
5770
- ClientRequestSchema = z4.union([
5770
+ ClientRequestSchema = z5.union([
5771
5771
  PingRequestSchema,
5772
5772
  InitializeRequestSchema,
5773
5773
  CompleteRequestSchema,
@@ -5782,25 +5782,15 @@ var init_types2 = __esm({
5782
5782
  CallToolRequestSchema,
5783
5783
  ListToolsRequestSchema
5784
5784
  ]);
5785
- ClientNotificationSchema = z4.union([
5785
+ ClientNotificationSchema = z5.union([
5786
5786
  CancelledNotificationSchema,
5787
5787
  ProgressNotificationSchema,
5788
5788
  InitializedNotificationSchema,
5789
5789
  RootsListChangedNotificationSchema
5790
5790
  ]);
5791
- ClientResultSchema = z4.union([
5792
- EmptyResultSchema,
5793
- CreateMessageResultSchema,
5794
- ElicitResultSchema,
5795
- ListRootsResultSchema
5796
- ]);
5797
- ServerRequestSchema = z4.union([
5798
- PingRequestSchema,
5799
- CreateMessageRequestSchema,
5800
- ElicitRequestSchema,
5801
- ListRootsRequestSchema
5802
- ]);
5803
- ServerNotificationSchema = z4.union([
5791
+ ClientResultSchema = z5.union([EmptyResultSchema, CreateMessageResultSchema, ElicitResultSchema, ListRootsResultSchema]);
5792
+ ServerRequestSchema = z5.union([PingRequestSchema, CreateMessageRequestSchema, ElicitRequestSchema, ListRootsRequestSchema]);
5793
+ ServerNotificationSchema = z5.union([
5804
5794
  CancelledNotificationSchema,
5805
5795
  ProgressNotificationSchema,
5806
5796
  LoggingMessageNotificationSchema,
@@ -5809,7 +5799,7 @@ var init_types2 = __esm({
5809
5799
  ToolListChangedNotificationSchema,
5810
5800
  PromptListChangedNotificationSchema
5811
5801
  ]);
5812
- ServerResultSchema = z4.union([
5802
+ ServerResultSchema = z5.union([
5813
5803
  EmptyResultSchema,
5814
5804
  InitializeResultSchema,
5815
5805
  CompleteResultSchema,
@@ -5824,9 +5814,9 @@ var init_types2 = __esm({
5824
5814
  }
5825
5815
  });
5826
5816
 
5827
- // ../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
5828
5818
  var init_protocol = __esm({
5829
- "../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"() {
5830
5820
  "use strict";
5831
5821
  init_esm_shims();
5832
5822
  init_types2();
@@ -6698,7 +6688,7 @@ var require_uri_all = __commonJS({
6698
6688
  mailtoComponents.path = void 0;
6699
6689
  if (mailtoComponents.query) {
6700
6690
  var unknownHeaders = false;
6701
- var headers = {};
6691
+ var headers2 = {};
6702
6692
  var hfields = mailtoComponents.query.split("&");
6703
6693
  for (var x2 = 0, xl = hfields.length; x2 < xl; ++x2) {
6704
6694
  var hfield = hfields[x2].split("=");
@@ -6717,11 +6707,11 @@ var require_uri_all = __commonJS({
6717
6707
  break;
6718
6708
  default:
6719
6709
  unknownHeaders = true;
6720
- headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
6710
+ headers2[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
6721
6711
  break;
6722
6712
  }
6723
6713
  }
6724
- if (unknownHeaders) mailtoComponents.headers = headers;
6714
+ if (unknownHeaders) mailtoComponents.headers = headers2;
6725
6715
  }
6726
6716
  mailtoComponents.query = void 0;
6727
6717
  for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
@@ -6758,13 +6748,13 @@ var require_uri_all = __commonJS({
6758
6748
  }
6759
6749
  components.path = to.join(",");
6760
6750
  }
6761
- var headers = mailtoComponents.headers = mailtoComponents.headers || {};
6762
- if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
6763
- 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;
6764
6754
  var fields = [];
6765
- for (var name in headers) {
6766
- if (headers[name] !== O[name]) {
6767
- 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));
6768
6758
  }
6769
6759
  }
6770
6760
  if (fields.length) {
@@ -11755,33 +11745,33 @@ var require_ajv = __commonJS({
11755
11745
  var rules = require_rules();
11756
11746
  var $dataMetaSchema = require_data();
11757
11747
  var util = require_util();
11758
- module.exports = Ajv3;
11759
- Ajv3.prototype.validate = validate;
11760
- Ajv3.prototype.compile = compile;
11761
- Ajv3.prototype.addSchema = addSchema;
11762
- Ajv3.prototype.addMetaSchema = addMetaSchema;
11763
- Ajv3.prototype.validateSchema = validateSchema;
11764
- Ajv3.prototype.getSchema = getSchema;
11765
- Ajv3.prototype.removeSchema = removeSchema;
11766
- Ajv3.prototype.addFormat = addFormat;
11767
- Ajv3.prototype.errorsText = errorsText;
11768
- Ajv3.prototype._addSchema = _addSchema;
11769
- Ajv3.prototype._compile = _compile;
11770
- 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();
11771
11761
  var customKeyword = require_keyword();
11772
- Ajv3.prototype.addKeyword = customKeyword.add;
11773
- Ajv3.prototype.getKeyword = customKeyword.get;
11774
- Ajv3.prototype.removeKeyword = customKeyword.remove;
11775
- 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;
11776
11766
  var errorClasses = require_error_classes();
11777
- Ajv3.ValidationError = errorClasses.Validation;
11778
- Ajv3.MissingRefError = errorClasses.MissingRef;
11779
- Ajv3.$dataMetaSchema = $dataMetaSchema;
11767
+ Ajv4.ValidationError = errorClasses.Validation;
11768
+ Ajv4.MissingRefError = errorClasses.MissingRef;
11769
+ Ajv4.$dataMetaSchema = $dataMetaSchema;
11780
11770
  var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
11781
11771
  var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes", "strictDefaults"];
11782
11772
  var META_SUPPORT_DATA = ["/properties"];
11783
- function Ajv3(opts) {
11784
- if (!(this instanceof Ajv3)) return new Ajv3(opts);
11773
+ function Ajv4(opts) {
11774
+ if (!(this instanceof Ajv4)) return new Ajv4(opts);
11785
11775
  opts = this._opts = util.copy(opts) || {};
11786
11776
  setLogger(this);
11787
11777
  this._schemas = {};
@@ -12079,14 +12069,14 @@ var require_ajv = __commonJS({
12079
12069
  return metaOpts;
12080
12070
  }
12081
12071
  function setLogger(self) {
12082
- var logger13 = self._opts.logger;
12083
- if (logger13 === false) {
12072
+ var logger14 = self._opts.logger;
12073
+ if (logger14 === false) {
12084
12074
  self.logger = { log: noop, warn: noop, error: noop };
12085
12075
  } else {
12086
- if (logger13 === void 0) logger13 = console;
12087
- 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))
12088
12078
  throw new Error("logger must implement log, warn and error methods");
12089
- self.logger = logger13;
12079
+ self.logger = logger14;
12090
12080
  }
12091
12081
  }
12092
12082
  function noop() {
@@ -12094,10 +12084,10 @@ var require_ajv = __commonJS({
12094
12084
  }
12095
12085
  });
12096
12086
 
12097
- // ../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
12098
12088
  var import_ajv;
12099
12089
  var init_client2 = __esm({
12100
- "../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"() {
12101
12091
  "use strict";
12102
12092
  init_esm_shims();
12103
12093
  init_protocol();
@@ -12118,164 +12108,164 @@ var init_index_node = __esm({
12118
12108
  }
12119
12109
  });
12120
12110
 
12121
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
12122
- 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";
12123
12113
  var SafeUrlSchema, OAuthProtectedResourceMetadataSchema, OAuthMetadataSchema, OpenIdProviderMetadataSchema, OpenIdProviderDiscoveryMetadataSchema, OAuthTokensSchema, OAuthErrorResponseSchema, OAuthClientMetadataSchema, OAuthClientInformationSchema, OAuthClientInformationFullSchema, OAuthClientRegistrationErrorSchema, OAuthTokenRevocationRequestSchema;
12124
12114
  var init_auth = __esm({
12125
- "../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"() {
12126
12116
  "use strict";
12127
12117
  init_esm_shims();
12128
- SafeUrlSchema = z5.string().url().superRefine((val, ctx) => {
12118
+ SafeUrlSchema = z6.string().url().superRefine((val, ctx) => {
12129
12119
  if (!URL.canParse(val)) {
12130
12120
  ctx.addIssue({
12131
- code: z5.ZodIssueCode.custom,
12121
+ code: z6.ZodIssueCode.custom,
12132
12122
  message: "URL must be parseable",
12133
12123
  fatal: true
12134
12124
  });
12135
- return z5.NEVER;
12125
+ return z6.NEVER;
12136
12126
  }
12137
12127
  }).refine((url) => {
12138
12128
  const u2 = new URL(url);
12139
12129
  return u2.protocol !== "javascript:" && u2.protocol !== "data:" && u2.protocol !== "vbscript:";
12140
12130
  }, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
12141
- OAuthProtectedResourceMetadataSchema = z5.object({
12142
- resource: z5.string().url(),
12143
- authorization_servers: z5.array(SafeUrlSchema).optional(),
12144
- jwks_uri: z5.string().url().optional(),
12145
- scopes_supported: z5.array(z5.string()).optional(),
12146
- bearer_methods_supported: z5.array(z5.string()).optional(),
12147
- resource_signing_alg_values_supported: z5.array(z5.string()).optional(),
12148
- resource_name: z5.string().optional(),
12149
- resource_documentation: z5.string().optional(),
12150
- resource_policy_uri: z5.string().url().optional(),
12151
- resource_tos_uri: z5.string().url().optional(),
12152
- tls_client_certificate_bound_access_tokens: z5.boolean().optional(),
12153
- authorization_details_types_supported: z5.array(z5.string()).optional(),
12154
- dpop_signing_alg_values_supported: z5.array(z5.string()).optional(),
12155
- 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()
12156
12146
  }).passthrough();
12157
- OAuthMetadataSchema = z5.object({
12158
- issuer: z5.string(),
12147
+ OAuthMetadataSchema = z6.object({
12148
+ issuer: z6.string(),
12159
12149
  authorization_endpoint: SafeUrlSchema,
12160
12150
  token_endpoint: SafeUrlSchema,
12161
12151
  registration_endpoint: SafeUrlSchema.optional(),
12162
- scopes_supported: z5.array(z5.string()).optional(),
12163
- response_types_supported: z5.array(z5.string()),
12164
- response_modes_supported: z5.array(z5.string()).optional(),
12165
- grant_types_supported: z5.array(z5.string()).optional(),
12166
- token_endpoint_auth_methods_supported: z5.array(z5.string()).optional(),
12167
- 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(),
12168
12158
  service_documentation: SafeUrlSchema.optional(),
12169
12159
  revocation_endpoint: SafeUrlSchema.optional(),
12170
- revocation_endpoint_auth_methods_supported: z5.array(z5.string()).optional(),
12171
- revocation_endpoint_auth_signing_alg_values_supported: z5.array(z5.string()).optional(),
12172
- introspection_endpoint: z5.string().optional(),
12173
- introspection_endpoint_auth_methods_supported: z5.array(z5.string()).optional(),
12174
- introspection_endpoint_auth_signing_alg_values_supported: z5.array(z5.string()).optional(),
12175
- 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()
12176
12166
  }).passthrough();
12177
- OpenIdProviderMetadataSchema = z5.object({
12178
- issuer: z5.string(),
12167
+ OpenIdProviderMetadataSchema = z6.object({
12168
+ issuer: z6.string(),
12179
12169
  authorization_endpoint: SafeUrlSchema,
12180
12170
  token_endpoint: SafeUrlSchema,
12181
12171
  userinfo_endpoint: SafeUrlSchema.optional(),
12182
12172
  jwks_uri: SafeUrlSchema,
12183
12173
  registration_endpoint: SafeUrlSchema.optional(),
12184
- scopes_supported: z5.array(z5.string()).optional(),
12185
- response_types_supported: z5.array(z5.string()),
12186
- response_modes_supported: z5.array(z5.string()).optional(),
12187
- grant_types_supported: z5.array(z5.string()).optional(),
12188
- acr_values_supported: z5.array(z5.string()).optional(),
12189
- subject_types_supported: z5.array(z5.string()),
12190
- id_token_signing_alg_values_supported: z5.array(z5.string()),
12191
- id_token_encryption_alg_values_supported: z5.array(z5.string()).optional(),
12192
- id_token_encryption_enc_values_supported: z5.array(z5.string()).optional(),
12193
- userinfo_signing_alg_values_supported: z5.array(z5.string()).optional(),
12194
- userinfo_encryption_alg_values_supported: z5.array(z5.string()).optional(),
12195
- userinfo_encryption_enc_values_supported: z5.array(z5.string()).optional(),
12196
- request_object_signing_alg_values_supported: z5.array(z5.string()).optional(),
12197
- request_object_encryption_alg_values_supported: z5.array(z5.string()).optional(),
12198
- request_object_encryption_enc_values_supported: z5.array(z5.string()).optional(),
12199
- token_endpoint_auth_methods_supported: z5.array(z5.string()).optional(),
12200
- token_endpoint_auth_signing_alg_values_supported: z5.array(z5.string()).optional(),
12201
- display_values_supported: z5.array(z5.string()).optional(),
12202
- claim_types_supported: z5.array(z5.string()).optional(),
12203
- claims_supported: z5.array(z5.string()).optional(),
12204
- service_documentation: z5.string().optional(),
12205
- claims_locales_supported: z5.array(z5.string()).optional(),
12206
- ui_locales_supported: z5.array(z5.string()).optional(),
12207
- claims_parameter_supported: z5.boolean().optional(),
12208
- request_parameter_supported: z5.boolean().optional(),
12209
- request_uri_parameter_supported: z5.boolean().optional(),
12210
- 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(),
12211
12201
  op_policy_uri: SafeUrlSchema.optional(),
12212
12202
  op_tos_uri: SafeUrlSchema.optional()
12213
12203
  }).passthrough();
12214
12204
  OpenIdProviderDiscoveryMetadataSchema = OpenIdProviderMetadataSchema.merge(OAuthMetadataSchema.pick({
12215
12205
  code_challenge_methods_supported: true
12216
12206
  }));
12217
- OAuthTokensSchema = z5.object({
12218
- access_token: z5.string(),
12219
- id_token: z5.string().optional(),
12207
+ OAuthTokensSchema = z6.object({
12208
+ access_token: z6.string(),
12209
+ id_token: z6.string().optional(),
12220
12210
  // Optional for OAuth 2.1, but necessary in OpenID Connect
12221
- token_type: z5.string(),
12222
- expires_in: z5.number().optional(),
12223
- scope: z5.string().optional(),
12224
- 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()
12225
12215
  }).strip();
12226
- OAuthErrorResponseSchema = z5.object({
12227
- error: z5.string(),
12228
- error_description: z5.string().optional(),
12229
- 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()
12230
12220
  });
12231
- OAuthClientMetadataSchema = z5.object({
12232
- redirect_uris: z5.array(SafeUrlSchema),
12233
- token_endpoint_auth_method: z5.string().optional(),
12234
- grant_types: z5.array(z5.string()).optional(),
12235
- response_types: z5.array(z5.string()).optional(),
12236
- 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(),
12237
12227
  client_uri: SafeUrlSchema.optional(),
12238
12228
  logo_uri: SafeUrlSchema.optional(),
12239
- scope: z5.string().optional(),
12240
- contacts: z5.array(z5.string()).optional(),
12229
+ scope: z6.string().optional(),
12230
+ contacts: z6.array(z6.string()).optional(),
12241
12231
  tos_uri: SafeUrlSchema.optional(),
12242
- policy_uri: z5.string().optional(),
12232
+ policy_uri: z6.string().optional(),
12243
12233
  jwks_uri: SafeUrlSchema.optional(),
12244
- jwks: z5.any().optional(),
12245
- software_id: z5.string().optional(),
12246
- software_version: z5.string().optional(),
12247
- 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()
12248
12238
  }).strip();
12249
- OAuthClientInformationSchema = z5.object({
12250
- client_id: z5.string(),
12251
- client_secret: z5.string().optional(),
12252
- client_id_issued_at: z5.number().optional(),
12253
- 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()
12254
12244
  }).strip();
12255
12245
  OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
12256
- OAuthClientRegistrationErrorSchema = z5.object({
12257
- error: z5.string(),
12258
- error_description: z5.string().optional()
12246
+ OAuthClientRegistrationErrorSchema = z6.object({
12247
+ error: z6.string(),
12248
+ error_description: z6.string().optional()
12259
12249
  }).strip();
12260
- OAuthTokenRevocationRequestSchema = z5.object({
12261
- token: z5.string(),
12262
- token_type_hint: z5.string().optional()
12250
+ OAuthTokenRevocationRequestSchema = z6.object({
12251
+ token: z6.string(),
12252
+ token_type_hint: z6.string().optional()
12263
12253
  }).strip();
12264
12254
  }
12265
12255
  });
12266
12256
 
12267
- // ../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
12268
12258
  var init_auth_utils = __esm({
12269
- "../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"() {
12270
12260
  "use strict";
12271
12261
  init_esm_shims();
12272
12262
  }
12273
12263
  });
12274
12264
 
12275
- // ../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
12276
12266
  var OAuthError, InvalidRequestError, InvalidClientError, InvalidGrantError, UnauthorizedClientError, UnsupportedGrantTypeError, InvalidScopeError, AccessDeniedError, ServerError, TemporarilyUnavailableError, UnsupportedResponseTypeError, UnsupportedTokenTypeError, InvalidTokenError, MethodNotAllowedError, TooManyRequestsError, InvalidClientMetadataError, InsufficientScopeError, OAUTH_ERRORS;
12277
12267
  var init_errors = __esm({
12278
- "../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"() {
12279
12269
  "use strict";
12280
12270
  init_esm_shims();
12281
12271
  OAuthError = class extends Error {
@@ -12370,9 +12360,9 @@ var init_errors = __esm({
12370
12360
  }
12371
12361
  });
12372
12362
 
12373
- // ../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
12374
12364
  var init_auth2 = __esm({
12375
- "../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"() {
12376
12366
  "use strict";
12377
12367
  init_esm_shims();
12378
12368
  init_index_node();
@@ -12384,9 +12374,9 @@ var init_auth2 = __esm({
12384
12374
  }
12385
12375
  });
12386
12376
 
12387
- // ../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
12388
12378
  var init_sse = __esm({
12389
- "../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"() {
12390
12380
  "use strict";
12391
12381
  init_esm_shims();
12392
12382
  init_types2();
@@ -12394,9 +12384,9 @@ var init_sse = __esm({
12394
12384
  }
12395
12385
  });
12396
12386
 
12397
- // ../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
12398
12388
  var init_streamableHttp = __esm({
12399
- "../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"() {
12400
12390
  "use strict";
12401
12391
  init_esm_shims();
12402
12392
  init_types2();
@@ -12548,7 +12538,7 @@ var init_dist5 = __esm({
12548
12538
 
12549
12539
  // ../packages/agents-core/src/utils/mcp-client.ts
12550
12540
  import { tool } from "ai";
12551
- import { z as z7 } from "zod";
12541
+ import { z as z8 } from "zod";
12552
12542
  var init_mcp_client = __esm({
12553
12543
  "../packages/agents-core/src/utils/mcp-client.ts"() {
12554
12544
  "use strict";
@@ -12731,12 +12721,12 @@ var init_global_utils = __esm({
12731
12721
 
12732
12722
  // ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js
12733
12723
  function logProxy(funcName, namespace, args) {
12734
- var logger13 = getGlobal("diag");
12735
- if (!logger13) {
12724
+ var logger14 = getGlobal("diag");
12725
+ if (!logger14) {
12736
12726
  return;
12737
12727
  }
12738
12728
  args.unshift(namespace);
12739
- return logger13[funcName].apply(logger13, __spreadArray([], __read(args), false));
12729
+ return logger14[funcName].apply(logger14, __spreadArray([], __read(args), false));
12740
12730
  }
12741
12731
  var __read, __spreadArray, DiagComponentLogger;
12742
12732
  var init_ComponentLogger = __esm({
@@ -12834,17 +12824,17 @@ var init_types3 = __esm({
12834
12824
  });
12835
12825
 
12836
12826
  // ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
12837
- function createLogLevelDiagLogger(maxLevel, logger13) {
12827
+ function createLogLevelDiagLogger(maxLevel, logger14) {
12838
12828
  if (maxLevel < DiagLogLevel.NONE) {
12839
12829
  maxLevel = DiagLogLevel.NONE;
12840
12830
  } else if (maxLevel > DiagLogLevel.ALL) {
12841
12831
  maxLevel = DiagLogLevel.ALL;
12842
12832
  }
12843
- logger13 = logger13 || {};
12833
+ logger14 = logger14 || {};
12844
12834
  function _filterFunc(funcName, theLevel) {
12845
- var theFunc = logger13[funcName];
12835
+ var theFunc = logger14[funcName];
12846
12836
  if (typeof theFunc === "function" && maxLevel >= theLevel) {
12847
- return theFunc.bind(logger13);
12837
+ return theFunc.bind(logger14);
12848
12838
  }
12849
12839
  return function() {
12850
12840
  };
@@ -12911,19 +12901,19 @@ var init_diag = __esm({
12911
12901
  for (var _i = 0; _i < arguments.length; _i++) {
12912
12902
  args[_i] = arguments[_i];
12913
12903
  }
12914
- var logger13 = getGlobal("diag");
12915
- if (!logger13)
12904
+ var logger14 = getGlobal("diag");
12905
+ if (!logger14)
12916
12906
  return;
12917
- return logger13[funcName].apply(logger13, __spreadArray2([], __read2(args), false));
12907
+ return logger14[funcName].apply(logger14, __spreadArray2([], __read2(args), false));
12918
12908
  };
12919
12909
  }
12920
12910
  var self = this;
12921
- var setLogger = function(logger13, optionsOrLogLevel) {
12911
+ var setLogger = function(logger14, optionsOrLogLevel) {
12922
12912
  var _a, _b, _c;
12923
12913
  if (optionsOrLogLevel === void 0) {
12924
12914
  optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
12925
12915
  }
12926
- if (logger13 === self) {
12916
+ if (logger14 === self) {
12927
12917
  var err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
12928
12918
  self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
12929
12919
  return false;
@@ -12934,7 +12924,7 @@ var init_diag = __esm({
12934
12924
  };
12935
12925
  }
12936
12926
  var oldLogger = getGlobal("diag");
12937
- 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);
12938
12928
  if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
12939
12929
  var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
12940
12930
  oldLogger.warn("Current logger will be overwritten from " + stack);
@@ -13503,18 +13493,18 @@ function getTracer(serviceName, serviceVersion) {
13503
13493
  try {
13504
13494
  return trace.getTracer(serviceName, serviceVersion);
13505
13495
  } catch (_error) {
13506
- logger4.debug({}, "OpenTelemetry tracer not available, using no-op tracer");
13496
+ logger5.debug({}, "OpenTelemetry tracer not available, using no-op tracer");
13507
13497
  return noopTracer;
13508
13498
  }
13509
13499
  }
13510
- var logger4, createNoOpSpan, noopTracer;
13500
+ var logger5, createNoOpSpan, noopTracer;
13511
13501
  var init_tracer_factory = __esm({
13512
13502
  "../packages/agents-core/src/utils/tracer-factory.ts"() {
13513
13503
  "use strict";
13514
13504
  init_esm_shims();
13515
13505
  init_esm();
13516
13506
  init_utils();
13517
- logger4 = getLogger("tracer");
13507
+ logger5 = getLogger("tracer");
13518
13508
  createNoOpSpan = () => ({
13519
13509
  setAttributes: () => ({}),
13520
13510
  recordException: () => ({}),
@@ -13552,148 +13542,72 @@ var init_utils = __esm({
13552
13542
  "use strict";
13553
13543
  init_esm_shims();
13554
13544
  init_apiKeys();
13555
- init_auth_detection();
13556
- init_conversations();
13557
- init_credential_store_utils();
13558
- init_error();
13559
- init_execution();
13560
- init_logger();
13561
- init_mcp_client();
13562
- init_tracer_factory();
13563
- }
13564
- });
13565
-
13566
- // ../packages/agents-core/src/data-access/tools.ts
13567
- import { and as and12, count as count11, desc as desc11, eq as eq12 } from "drizzle-orm";
13568
- var logger5;
13569
- var init_tools = __esm({
13570
- "../packages/agents-core/src/data-access/tools.ts"() {
13571
- "use strict";
13572
- init_esm_shims();
13573
- init_context5();
13574
- init_credential_stuffer();
13575
- init_schema();
13576
- init_types();
13577
- init_utils();
13578
- init_logger();
13579
- init_mcp_client();
13580
- init_agentRelations();
13581
- init_credentialReferences();
13582
- logger5 = getLogger("tools");
13583
- }
13584
- });
13585
-
13586
- // ../packages/agents-core/src/data-access/graphFull.ts
13587
- import { and as and13, eq as eq13, inArray as inArray3, not } from "drizzle-orm";
13588
- var init_graphFull2 = __esm({
13589
- "../packages/agents-core/src/data-access/graphFull.ts"() {
13590
- "use strict";
13591
- init_esm_shims();
13592
- init_schema();
13593
- init_graphFull();
13594
- init_agentGraphs();
13595
- init_agentRelations();
13596
- init_agents();
13597
- init_artifactComponents();
13598
- init_contextConfigs();
13599
- init_dataComponents();
13600
- init_externalAgents();
13601
- init_tools();
13602
- }
13603
- });
13604
-
13605
- // ../packages/agents-core/src/data-access/ledgerArtifacts.ts
13606
- import { and as and14, count as count12, eq as eq14 } from "drizzle-orm";
13607
- var init_ledgerArtifacts = __esm({
13608
- "../packages/agents-core/src/data-access/ledgerArtifacts.ts"() {
13609
- "use strict";
13610
- init_esm_shims();
13611
- init_schema();
13612
- }
13613
- });
13614
-
13615
- // ../packages/agents-core/src/data-access/messages.ts
13616
- import { and as and15, asc as asc2, count as count13, desc as desc12, eq as eq15, inArray as inArray4 } from "drizzle-orm";
13617
- var init_messages = __esm({
13618
- "../packages/agents-core/src/data-access/messages.ts"() {
13619
- "use strict";
13620
- init_esm_shims();
13621
- init_schema();
13622
- }
13623
- });
13624
-
13625
- // ../packages/agents-core/src/data-access/projects.ts
13626
- import { and as and16, count as count14, desc as desc13, eq as eq16 } from "drizzle-orm";
13627
- var init_projects = __esm({
13628
- "../packages/agents-core/src/data-access/projects.ts"() {
13629
- "use strict";
13630
- init_esm_shims();
13631
- init_schema();
13632
- }
13633
- });
13634
-
13635
- // ../packages/agents-core/src/data-access/projectFull.ts
13636
- var defaultLogger;
13637
- var init_projectFull = __esm({
13638
- "../packages/agents-core/src/data-access/projectFull.ts"() {
13639
- "use strict";
13640
- init_esm_shims();
13641
- init_logger();
13642
- init_agentGraphs();
13643
- init_artifactComponents();
13644
- init_credentialReferences();
13645
- init_dataComponents();
13646
- init_graphFull2();
13647
- init_projects();
13648
- init_tools();
13649
- defaultLogger = getLogger("projectFull");
13545
+ init_auth_detection();
13546
+ init_conversations();
13547
+ init_credential_store_utils();
13548
+ init_error();
13549
+ init_execution();
13550
+ init_logger();
13551
+ init_mcp_client();
13552
+ init_schema_conversion();
13553
+ init_tracer_factory();
13650
13554
  }
13651
13555
  });
13652
13556
 
13653
- // ../packages/agents-core/src/data-access/tasks.ts
13654
- import { and as and17, eq as eq17 } from "drizzle-orm";
13655
- var init_tasks = __esm({
13656
- "../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"() {
13657
13561
  "use strict";
13658
13562
  init_esm_shims();
13659
13563
  init_schema();
13660
13564
  }
13661
13565
  });
13662
13566
 
13663
- // ../packages/agents-core/src/data-access/validation.ts
13664
- var init_validation = __esm({
13665
- "../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"() {
13666
13572
  "use strict";
13667
13573
  init_esm_shims();
13668
- 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");
13669
13584
  }
13670
13585
  });
13671
13586
 
13672
- // ../packages/agents-core/src/data-access/index.ts
13673
- var init_data_access = __esm({
13674
- "../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"() {
13675
13591
  "use strict";
13676
13592
  init_esm_shims();
13677
- init_client();
13678
- init_agentGraphs();
13593
+ init_schema();
13679
13594
  init_agentRelations();
13680
13595
  init_agents();
13681
- init_apiKeys2();
13682
- init_artifactComponents();
13683
- init_contextCache();
13684
13596
  init_contextConfigs();
13685
- init_conversations2();
13686
- init_credentialReferences();
13687
- init_dataComponents();
13688
13597
  init_externalAgents();
13689
- init_graphFull2();
13690
- init_ledgerArtifacts();
13691
- init_messages();
13692
- init_projectFull();
13693
- init_projects();
13694
- init_tasks();
13598
+ init_functions();
13695
13599
  init_tools();
13696
- 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();
13697
13611
  }
13698
13612
  });
13699
13613
 
@@ -14701,10 +14615,10 @@ var require_codegen = __commonJS({
14701
14615
  }
14702
14616
  exports.not = not2;
14703
14617
  var andCode = mappend(exports.operators.AND);
14704
- function and18(...args) {
14618
+ function and19(...args) {
14705
14619
  return args.reduce(andCode);
14706
14620
  }
14707
- exports.and = and18;
14621
+ exports.and = and19;
14708
14622
  var orCode = mappend(exports.operators.OR);
14709
14623
  function or(...args) {
14710
14624
  return args.reduce(orCode);
@@ -17598,7 +17512,7 @@ var require_core = __commonJS({
17598
17512
  uriResolver
17599
17513
  };
17600
17514
  }
17601
- var Ajv3 = class {
17515
+ var Ajv4 = class {
17602
17516
  constructor(opts = {}) {
17603
17517
  this.schemas = {};
17604
17518
  this.refs = {};
@@ -17968,9 +17882,9 @@ var require_core = __commonJS({
17968
17882
  }
17969
17883
  }
17970
17884
  };
17971
- Ajv3.ValidationError = validation_error_1.default;
17972
- Ajv3.MissingRefError = ref_error_1.default;
17973
- exports.default = Ajv3;
17885
+ Ajv4.ValidationError = validation_error_1.default;
17886
+ Ajv4.MissingRefError = ref_error_1.default;
17887
+ exports.default = Ajv4;
17974
17888
  function checkOptions(checkOpts, options, msg, log = "error") {
17975
17889
  for (const key in checkOpts) {
17976
17890
  const opt = key;
@@ -18022,13 +17936,13 @@ var require_core = __commonJS({
18022
17936
  }, warn() {
18023
17937
  }, error() {
18024
17938
  } };
18025
- function getLogger2(logger13) {
18026
- if (logger13 === false)
17939
+ function getLogger2(logger14) {
17940
+ if (logger14 === false)
18027
17941
  return noLogs;
18028
- if (logger13 === void 0)
17942
+ if (logger14 === void 0)
18029
17943
  return console;
18030
- if (logger13.log && logger13.warn && logger13.error)
18031
- return logger13;
17944
+ if (logger14.log && logger14.warn && logger14.error)
17945
+ return logger14;
18032
17946
  throw new Error("logger must implement log, warn and error methods");
18033
17947
  }
18034
17948
  var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
@@ -20112,7 +20026,7 @@ var require_ajv2 = __commonJS({
20112
20026
  var draft7MetaSchema = require_json_schema_draft_072();
20113
20027
  var META_SUPPORT_DATA = ["/properties"];
20114
20028
  var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
20115
- var Ajv3 = class extends core_1.default {
20029
+ var Ajv4 = class extends core_1.default {
20116
20030
  _addVocabularies() {
20117
20031
  super._addVocabularies();
20118
20032
  draft7_1.default.forEach((v2) => this.addVocabulary(v2));
@@ -20131,11 +20045,11 @@ var require_ajv2 = __commonJS({
20131
20045
  return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
20132
20046
  }
20133
20047
  };
20134
- exports.Ajv = Ajv3;
20135
- module.exports = exports = Ajv3;
20136
- module.exports.Ajv = Ajv3;
20048
+ exports.Ajv = Ajv4;
20049
+ module.exports = exports = Ajv4;
20050
+ module.exports.Ajv = Ajv4;
20137
20051
  Object.defineProperty(exports, "__esModule", { value: true });
20138
- exports.default = Ajv3;
20052
+ exports.default = Ajv4;
20139
20053
  var validate_1 = require_validate2();
20140
20054
  Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
20141
20055
  return validate_1.KeywordCxt;
@@ -20170,6 +20084,184 @@ var require_ajv2 = __commonJS({
20170
20084
  }
20171
20085
  });
20172
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
+
20173
20265
  // ../packages/agents-core/src/utils/tracer.ts
20174
20266
  var tracer;
20175
20267
  var init_tracer = __esm({
@@ -20183,20 +20275,20 @@ var init_tracer = __esm({
20183
20275
  });
20184
20276
 
20185
20277
  // ../packages/agents-core/src/context/contextCache.ts
20186
- var logger6;
20278
+ var logger7;
20187
20279
  var init_contextCache2 = __esm({
20188
20280
  "../packages/agents-core/src/context/contextCache.ts"() {
20189
20281
  "use strict";
20190
20282
  init_esm_shims();
20191
20283
  init_data_access();
20192
20284
  init_logger();
20193
- logger6 = getLogger("context-cache");
20285
+ logger7 = getLogger("context-cache");
20194
20286
  }
20195
20287
  });
20196
20288
 
20197
20289
  // ../packages/agents-core/src/context/ContextResolver.ts
20198
20290
  import crypto4 from "crypto";
20199
- var logger7;
20291
+ var logger8;
20200
20292
  var init_ContextResolver = __esm({
20201
20293
  "../packages/agents-core/src/context/ContextResolver.ts"() {
20202
20294
  "use strict";
@@ -20205,25 +20297,25 @@ var init_ContextResolver = __esm({
20205
20297
  init_tracer();
20206
20298
  init_ContextFetcher();
20207
20299
  init_contextCache2();
20208
- logger7 = getLogger("context-resolver");
20300
+ logger8 = getLogger("context-resolver");
20209
20301
  }
20210
20302
  });
20211
20303
 
20212
20304
  // ../packages/agents-core/src/middleware/contextValidation.ts
20213
- var import_ajv2, logger8, ajv;
20305
+ var import_ajv3, logger9, ajv;
20214
20306
  var init_contextValidation = __esm({
20215
20307
  "../packages/agents-core/src/middleware/contextValidation.ts"() {
20216
20308
  "use strict";
20217
20309
  init_esm_shims();
20218
- import_ajv2 = __toESM(require_ajv2(), 1);
20310
+ import_ajv3 = __toESM(require_ajv2(), 1);
20219
20311
  init_ContextResolver();
20220
20312
  init_agentGraphs();
20221
20313
  init_contextConfigs();
20222
20314
  init_error();
20223
20315
  init_execution();
20224
20316
  init_logger();
20225
- logger8 = getLogger("context-validation");
20226
- ajv = new import_ajv2.default({ allErrors: true, strict: false });
20317
+ logger9 = getLogger("context-validation");
20318
+ ajv = new import_ajv3.default({ allErrors: true, strict: false });
20227
20319
  }
20228
20320
  });
20229
20321
 
@@ -20237,7 +20329,7 @@ var init_middleware = __esm({
20237
20329
  });
20238
20330
 
20239
20331
  // ../packages/agents-core/src/context/ContextFetcher.ts
20240
- var import_jmespath2, logger9;
20332
+ var import_jmespath2, logger10;
20241
20333
  var init_ContextFetcher = __esm({
20242
20334
  "../packages/agents-core/src/context/ContextFetcher.ts"() {
20243
20335
  "use strict";
@@ -20248,12 +20340,12 @@ var init_ContextFetcher = __esm({
20248
20340
  init_middleware();
20249
20341
  init_logger();
20250
20342
  init_TemplateEngine();
20251
- logger9 = getLogger("context-fetcher");
20343
+ logger10 = getLogger("context-fetcher");
20252
20344
  }
20253
20345
  });
20254
20346
 
20255
20347
  // ../packages/agents-core/src/context/context.ts
20256
- var logger10;
20348
+ var logger11;
20257
20349
  var init_context4 = __esm({
20258
20350
  "../packages/agents-core/src/context/context.ts"() {
20259
20351
  "use strict";
@@ -20262,7 +20354,7 @@ var init_context4 = __esm({
20262
20354
  init_utils();
20263
20355
  init_tracer();
20264
20356
  init_ContextResolver();
20265
- logger10 = getLogger("context");
20357
+ logger11 = getLogger("context");
20266
20358
  }
20267
20359
  });
20268
20360
 
@@ -20354,8 +20446,8 @@ var init_dist6 = __esm({
20354
20446
  });
20355
20447
 
20356
20448
  // ../packages/agents-core/src/credential-stores/nango-store.ts
20357
- import { z as z8 } from "zod";
20358
- var logger11, CredentialKeySchema;
20449
+ import { z as z9 } from "zod";
20450
+ var logger12, CredentialKeySchema;
20359
20451
  var init_nango_store = __esm({
20360
20452
  "../packages/agents-core/src/credential-stores/nango-store.ts"() {
20361
20453
  "use strict";
@@ -20363,10 +20455,10 @@ var init_nango_store = __esm({
20363
20455
  init_dist6();
20364
20456
  init_types();
20365
20457
  init_logger();
20366
- logger11 = getLogger("nango-credential-store");
20367
- CredentialKeySchema = z8.object({
20368
- connectionId: z8.string().min(1, "connectionId must be a non-empty string"),
20369
- 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")
20370
20462
  });
20371
20463
  }
20372
20464
  });
@@ -20474,7 +20566,7 @@ import os from "os";
20474
20566
  import path2 from "path";
20475
20567
  import dotenv from "dotenv";
20476
20568
  import { findUpSync } from "find-up";
20477
- import { z as z9 } from "zod";
20569
+ import { z as z10 } from "zod";
20478
20570
  var import_dotenv_expand, loadEnvironmentFiles, envSchema, parseEnv, env;
20479
20571
  var init_env = __esm({
20480
20572
  "../packages/agents-core/src/env.ts"() {
@@ -20507,19 +20599,19 @@ var init_env = __esm({
20507
20599
  }
20508
20600
  };
20509
20601
  loadEnvironmentFiles();
20510
- envSchema = z9.object({
20511
- ENVIRONMENT: z9.enum(["development", "production", "pentest", "test"]).optional(),
20512
- DB_FILE_NAME: z9.string().optional(),
20513
- TURSO_DATABASE_URL: z9.string().optional(),
20514
- TURSO_AUTH_TOKEN: z9.string().optional(),
20515
- 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()
20516
20608
  });
20517
20609
  parseEnv = () => {
20518
20610
  try {
20519
20611
  const parsedEnv = envSchema.parse(process.env);
20520
20612
  return parsedEnv;
20521
20613
  } catch (error) {
20522
- if (error instanceof z9.ZodError) {
20614
+ if (error instanceof z10.ZodError) {
20523
20615
  const missingVars = error.issues.map((issue) => issue.path.join("."));
20524
20616
  throw new Error(
20525
20617
  `\u274C Invalid environment variables: ${missingVars.join(", ")}
@@ -20549,6 +20641,7 @@ var init_validation2 = __esm({
20549
20641
  init_esm_shims();
20550
20642
  init_graphFull();
20551
20643
  init_id_validation();
20644
+ init_props_validation();
20552
20645
  init_schemas();
20553
20646
  }
20554
20647
  });
@@ -20676,7 +20769,7 @@ function findConfigFile(startPath = process.cwd()) {
20676
20769
  return null;
20677
20770
  }
20678
20771
  async function loadConfigFromFile(configPath) {
20679
- logger12.info({ fromPath: configPath }, `Loading config file`);
20772
+ logger13.info({ fromPath: configPath }, `Loading config file`);
20680
20773
  let resolvedPath;
20681
20774
  if (configPath) {
20682
20775
  resolvedPath = resolve2(process.cwd(), configPath);
@@ -20696,7 +20789,7 @@ async function loadConfigFromFile(configPath) {
20696
20789
  throw new Error(`No config exported from ${resolvedPath}`);
20697
20790
  }
20698
20791
  const config = normalizeConfig(rawConfig);
20699
- logger12.info({ config: maskSensitiveConfig(config) }, `Loaded config values`);
20792
+ logger13.info({ config: maskSensitiveConfig(config) }, `Loaded config values`);
20700
20793
  return config;
20701
20794
  } catch (error) {
20702
20795
  console.warn(`Warning: Failed to load config file ${resolvedPath}:`, error);
@@ -20717,9 +20810,9 @@ async function loadConfig(configPath) {
20717
20810
  config[key] = value;
20718
20811
  }
20719
20812
  });
20720
- logger12.info({ mergedConfig: maskSensitiveConfig(config) }, `Config loaded from file`);
20813
+ logger13.info({ mergedConfig: maskSensitiveConfig(config) }, `Config loaded from file`);
20721
20814
  } else {
20722
- logger12.info(
20815
+ logger13.info(
20723
20816
  { config: maskSensitiveConfig(config) },
20724
20817
  `Using default config (no config file found)`
20725
20818
  );
@@ -20771,14 +20864,14 @@ Please add agentsRunApiUrl to your configuration file`
20771
20864
  sources
20772
20865
  };
20773
20866
  }
20774
- var logger12;
20867
+ var logger13;
20775
20868
  var init_config = __esm({
20776
20869
  "src/utils/config.ts"() {
20777
20870
  "use strict";
20778
20871
  init_esm_shims();
20779
20872
  init_src();
20780
20873
  init_tsx_loader();
20781
- logger12 = getLogger("config");
20874
+ logger13 = getLogger("config");
20782
20875
  }
20783
20876
  });
20784
20877
 
@@ -20810,15 +20903,15 @@ var init_api = __esm({
20810
20903
  * Wrapper around fetch that automatically includes Authorization header if API key is present
20811
20904
  */
20812
20905
  async authenticatedFetch(url, options = {}) {
20813
- const headers = {
20906
+ const headers2 = {
20814
20907
  ...options.headers || {}
20815
20908
  };
20816
20909
  if (this.apiKey) {
20817
- headers.Authorization = `Bearer ${this.apiKey}`;
20910
+ headers2.Authorization = `Bearer ${this.apiKey}`;
20818
20911
  }
20819
20912
  return apiFetch(url, {
20820
20913
  ...options,
20821
- headers
20914
+ headers: headers2
20822
20915
  });
20823
20916
  }
20824
20917
  getTenantId() {
@@ -21329,19 +21422,19 @@ init_esm_shims();
21329
21422
  // src/env.ts
21330
21423
  init_esm_shims();
21331
21424
  init_src();
21332
- import { z as z10 } from "zod";
21425
+ import { z as z11 } from "zod";
21333
21426
  loadEnvironmentFiles();
21334
- var envSchema2 = z10.object({
21335
- DEBUG: z10.string().optional(),
21427
+ var envSchema2 = z11.object({
21428
+ DEBUG: z11.string().optional(),
21336
21429
  // Secrets loaded from .env files (relative to where CLI is executed)
21337
- ANTHROPIC_API_KEY: z10.string().optional()
21430
+ ANTHROPIC_API_KEY: z11.string().optional()
21338
21431
  });
21339
21432
  var parseEnv2 = () => {
21340
21433
  try {
21341
21434
  const parsedEnv = envSchema2.parse(process.env);
21342
21435
  return parsedEnv;
21343
21436
  } catch (error) {
21344
- if (error instanceof z10.ZodError) {
21437
+ if (error instanceof z11.ZodError) {
21345
21438
  const missingVars = error.issues.map((issue) => issue.path.join("."));
21346
21439
  throw new Error(
21347
21440
  `\u274C Invalid environment variables: ${missingVars.join(", ")}
@@ -22044,6 +22137,7 @@ import { generateText } from "ai";
22044
22137
  // src/commands/pull.placeholder-system.ts
22045
22138
  init_esm_shims();
22046
22139
  import { randomBytes as randomBytes2 } from "crypto";
22140
+ import { jsonSchemaToZod } from "json-schema-to-zod";
22047
22141
  var MIN_REPLACEMENT_LENGTH = 50;
22048
22142
  function generateShortId(length = 8) {
22049
22143
  return randomBytes2(Math.ceil(length / 2)).toString("hex").slice(0, length);
@@ -22055,6 +22149,16 @@ function generatePlaceholder(jsonPath) {
22055
22149
  function shouldReplaceString(value, placeholder) {
22056
22150
  return value.length >= MIN_REPLACEMENT_LENGTH && placeholder.length < value.length;
22057
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
+ }
22058
22162
  function processObject(obj, tracker, path3 = "") {
22059
22163
  if (typeof obj === "string") {
22060
22164
  const existingPlaceholder = tracker.valueToPlaceholder.get(obj);
@@ -22069,12 +22173,19 @@ function processObject(obj, tracker, path3 = "") {
22069
22173
  `Placeholder collision detected: placeholder '${placeholder}' already exists with different value. Existing value length: ${existingValue.length}, New value length: ${obj.length}`
22070
22174
  );
22071
22175
  }
22072
- tracker.placeholderToValue.set(placeholder, obj);
22073
- tracker.valueToPlaceholder.set(obj, placeholder);
22176
+ updateTracker(tracker, placeholder, obj);
22074
22177
  return placeholder;
22075
22178
  }
22076
22179
  return obj;
22077
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
+ }
22078
22189
  if (Array.isArray(obj)) {
22079
22190
  return obj.map((item, index2) => processObject(item, tracker, `${path3}[${index2}]`));
22080
22191
  }
@@ -22472,6 +22583,7 @@ ${getTypeDefinitions()}
22472
22583
  IMPORTANT CONTEXT:
22473
22584
  - Agents reference resources (tools, components) by their imported variable names
22474
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
22475
22587
 
22476
22588
  ${NAMING_CONVENTION_RULES}
22477
22589
 
@@ -22488,6 +22600,8 @@ REQUIREMENTS:
22488
22600
  - IMPORTANT: ANY placeholder that starts with < and ends with > MUST be wrapped in template literals (backticks)
22489
22601
  - Placeholders contain multi-line content and require template literals
22490
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()
22491
22605
 
22492
22606
  PLACEHOLDER HANDLING EXAMPLES:
22493
22607
  // CORRECT - Placeholder wrapped in template literals:
@@ -22498,9 +22612,40 @@ prompt: '<{{agents.facts.prompt.abc12345}}>'
22498
22612
 
22499
22613
  FULL EXAMPLE:
22500
22614
  import { agent, agentGraph } from '@inkeep/agents-sdk';
22615
+ import { contextConfig, fetchDefinition } from '@inkeep/agents-core';
22501
22616
  import { userProfile } from '../data-components/user-profile';
22502
22617
  import { searchTool } from '../tools/search-tool';
22503
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
+ });
22504
22649
 
22505
22650
  const routerAgent = agent({
22506
22651
  id: 'router',
@@ -22568,6 +22713,7 @@ Generate ONLY the TypeScript code without any markdown or explanations.`;
22568
22713
  console.log(`[DEBUG] - Unique tools: ${toolIds.size}`);
22569
22714
  console.log(`[DEBUG] - Data components: ${dataComponentIds.size}`);
22570
22715
  console.log(`[DEBUG] - Artifact components: ${artifactComponentIds.size}`);
22716
+ console.log(`[DEBUG] - Context config: ${graphData.contextConfig ? "Yes" : "No"}`);
22571
22717
  console.log(
22572
22718
  `[DEBUG] - Has relations: ${graphData.relations ? Object.keys(graphData.relations).length : 0}`
22573
22719
  );
@@ -22738,24 +22884,42 @@ ${IMPORT_INSTRUCTIONS}
22738
22884
  REQUIREMENTS:
22739
22885
  1. Import artifactComponent from '@inkeep/agents-sdk'
22740
22886
  2. Create the artifact component using artifactComponent()
22741
- 3. Include summaryProps and fullProps from the component data
22742
- 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
22743
22891
 
22744
22892
  EXAMPLE:
22745
22893
  import { artifactComponent } from '@inkeep/agents-sdk';
22746
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'
22747
22913
  export const orderSummary = artifactComponent({
22748
22914
  id: 'order-summary',
22749
22915
  name: 'Order Summary',
22750
22916
  description: 'Summary of customer order',
22751
- summaryProps: {
22752
- orderId: { type: 'string', required: true },
22753
- total: { type: 'number', required: true }
22754
- },
22755
- fullProps: {
22756
- orderId: { type: 'string', required: true },
22757
- items: { type: 'array', required: true },
22758
- 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 },
22759
22923
  tax: { type: 'number' }
22760
22924
  }
22761
22925
  });
@@ -23620,9 +23784,7 @@ async function pushCommand(options) {
23620
23784
  for (const graph of graphs) {
23621
23785
  const graphStats = graph.getStats();
23622
23786
  console.log(
23623
- chalk8.gray(
23624
- ` \u2022 ${graph.getName()} (${graph.getId()}): ${graphStats.agentCount} agents, ${graphStats.toolCount} tools`
23625
- )
23787
+ chalk8.gray(` \u2022 ${graph.getName()} (${graph.getId()}): ${graphStats.agentCount} agents`)
23626
23788
  );
23627
23789
  }
23628
23790
  }