@inkeep/agents-cli 0.12.0 → 0.13.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.
package/dist/config.d.ts CHANGED
@@ -1,10 +1,28 @@
1
- interface InkeepConfig {
1
+ interface ApiConfig {
2
+ url: string;
3
+ apiKey?: string;
4
+ }
5
+ interface FlatInkeepConfig {
2
6
  tenantId: string;
7
+ /**
8
+ * @deprecated Use the nested `agentsManageApi.url` format instead
9
+ */
3
10
  agentsManageApiUrl: string;
11
+ /**
12
+ * @deprecated Use the nested `agentsRunApi.url` format instead
13
+ */
4
14
  agentsRunApiUrl: string;
5
15
  manageUiUrl?: string;
6
16
  outputDirectory?: string;
7
17
  }
18
+ interface NestedInkeepConfig {
19
+ tenantId: string;
20
+ agentsManageApi: ApiConfig;
21
+ agentsRunApi: ApiConfig;
22
+ manageUiUrl?: string;
23
+ outputDirectory?: string;
24
+ }
25
+ type InkeepConfig = FlatInkeepConfig | NestedInkeepConfig;
8
26
  declare function defineConfig(config: InkeepConfig): InkeepConfig;
9
27
 
10
- export { type InkeepConfig, defineConfig };
28
+ export { type ApiConfig, type FlatInkeepConfig, type InkeepConfig, type NestedInkeepConfig, defineConfig };
package/dist/index.js CHANGED
@@ -32,11 +32,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
32
  mod
33
33
  ));
34
34
 
35
- // ../node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_tsx@4.20.5_typescript@5.9.2_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js
35
+ // ../node_modules/.pnpm/tsup@8.5.0_jiti@2.6.1_postcss@8.5.6_tsx@4.20.6_typescript@5.9.3_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js
36
36
  import path from "path";
37
37
  import { fileURLToPath } from "url";
38
38
  var init_esm_shims = __esm({
39
- "../node_modules/.pnpm/tsup@8.5.0_jiti@2.6.0_postcss@8.5.6_tsx@4.20.5_typescript@5.9.2_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js"() {
39
+ "../node_modules/.pnpm/tsup@8.5.0_jiti@2.6.1_postcss@8.5.6_tsx@4.20.6_typescript@5.9.3_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js"() {
40
40
  "use strict";
41
41
  }
42
42
  });
@@ -177,22 +177,22 @@ var init_logger = __esm({
177
177
  */
178
178
  getLogger(name) {
179
179
  if (this.loggers.has(name)) {
180
- const logger13 = this.loggers.get(name);
181
- if (!logger13) {
180
+ const logger14 = this.loggers.get(name);
181
+ if (!logger14) {
182
182
  throw new Error(`Logger '${name}' not found in cache`);
183
183
  }
184
- return logger13;
184
+ return logger14;
185
185
  }
186
- let logger12;
186
+ let logger13;
187
187
  if (this.config.loggerFactory) {
188
- logger12 = this.config.loggerFactory(name);
188
+ logger13 = this.config.loggerFactory(name);
189
189
  } else if (this.config.defaultLogger) {
190
- logger12 = this.config.defaultLogger;
190
+ logger13 = this.config.defaultLogger;
191
191
  } else {
192
- logger12 = new PinoLogger(name, this.config.pinoConfig);
192
+ logger13 = new PinoLogger(name, this.config.pinoConfig);
193
193
  }
194
- this.loggers.set(name, logger12);
195
- return logger12;
194
+ this.loggers.set(name, logger13);
195
+ return logger13;
196
196
  }
197
197
  /**
198
198
  * Reset factory to default state
@@ -531,10 +531,10 @@ var init_dist = __esm({
531
531
  }
532
532
  });
533
533
 
534
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/url.js
534
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/url.js
535
535
  var tryDecode, _decodeURI, _getQueryParam, getQueryParam, getQueryParams, decodeURIComponent_;
536
536
  var init_url = __esm({
537
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/url.js"() {
537
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/url.js"() {
538
538
  "use strict";
539
539
  init_esm_shims();
540
540
  tryDecode = (str, decoder) => {
@@ -631,52 +631,52 @@ var init_url = __esm({
631
631
  }
632
632
  });
633
633
 
634
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/cookie.js
634
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/cookie.js
635
635
  var init_cookie = __esm({
636
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/cookie.js"() {
636
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/cookie.js"() {
637
637
  "use strict";
638
638
  init_esm_shims();
639
639
  init_url();
640
640
  }
641
641
  });
642
642
 
643
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/helper/cookie/index.js
643
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/helper/cookie/index.js
644
644
  var init_cookie2 = __esm({
645
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/helper/cookie/index.js"() {
645
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/helper/cookie/index.js"() {
646
646
  "use strict";
647
647
  init_esm_shims();
648
648
  init_cookie();
649
649
  }
650
650
  });
651
651
 
652
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/http-exception.js
652
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/http-exception.js
653
653
  var init_http_exception = __esm({
654
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/http-exception.js"() {
654
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/http-exception.js"() {
655
655
  "use strict";
656
656
  init_esm_shims();
657
657
  }
658
658
  });
659
659
 
660
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/crypto.js
660
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/crypto.js
661
661
  var init_crypto = __esm({
662
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/crypto.js"() {
662
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/crypto.js"() {
663
663
  "use strict";
664
664
  init_esm_shims();
665
665
  }
666
666
  });
667
667
 
668
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/buffer.js
668
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/buffer.js
669
669
  var init_buffer = __esm({
670
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/buffer.js"() {
670
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/buffer.js"() {
671
671
  "use strict";
672
672
  init_esm_shims();
673
673
  init_crypto();
674
674
  }
675
675
  });
676
676
 
677
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/validator/validator.js
677
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/validator/validator.js
678
678
  var init_validator = __esm({
679
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/validator/validator.js"() {
679
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/validator/validator.js"() {
680
680
  "use strict";
681
681
  init_esm_shims();
682
682
  init_cookie2();
@@ -685,43 +685,43 @@ var init_validator = __esm({
685
685
  }
686
686
  });
687
687
 
688
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/validator/index.js
688
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/validator/index.js
689
689
  var init_validator2 = __esm({
690
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/validator/index.js"() {
690
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/validator/index.js"() {
691
691
  "use strict";
692
692
  init_esm_shims();
693
693
  init_validator();
694
694
  }
695
695
  });
696
696
 
697
- // ../node_modules/.pnpm/@hono+zod-validator@0.7.3_hono@4.9.8_zod@4.1.11/node_modules/@hono/zod-validator/dist/index.js
697
+ // ../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
698
698
  var init_dist2 = __esm({
699
- "../node_modules/.pnpm/@hono+zod-validator@0.7.3_hono@4.9.8_zod@4.1.11/node_modules/@hono/zod-validator/dist/index.js"() {
699
+ "../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"() {
700
700
  "use strict";
701
701
  init_esm_shims();
702
702
  init_validator2();
703
703
  }
704
704
  });
705
705
 
706
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/compose.js
706
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/compose.js
707
707
  var init_compose = __esm({
708
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/compose.js"() {
708
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/compose.js"() {
709
709
  "use strict";
710
710
  init_esm_shims();
711
711
  }
712
712
  });
713
713
 
714
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/request/constants.js
714
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/request/constants.js
715
715
  var GET_MATCH_RESULT;
716
716
  var init_constants = __esm({
717
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/request/constants.js"() {
717
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/request/constants.js"() {
718
718
  "use strict";
719
719
  init_esm_shims();
720
720
  GET_MATCH_RESULT = Symbol();
721
721
  }
722
722
  });
723
723
 
724
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/body.js
724
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/body.js
725
725
  async function parseFormData(request, options) {
726
726
  const formData = await request.formData();
727
727
  if (formData) {
@@ -752,7 +752,7 @@ function convertFormDataToBodyData(formData, options) {
752
752
  }
753
753
  var parseBody, handleParsingAllValues, handleParsingNestedValues;
754
754
  var init_body = __esm({
755
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/body.js"() {
755
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/body.js"() {
756
756
  "use strict";
757
757
  init_esm_shims();
758
758
  init_request();
@@ -798,10 +798,10 @@ var init_body = __esm({
798
798
  }
799
799
  });
800
800
 
801
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/request.js
801
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/request.js
802
802
  var tryDecodeURIComponent, HonoRequest;
803
803
  var init_request = __esm({
804
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/request.js"() {
804
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/request.js"() {
805
805
  "use strict";
806
806
  init_esm_shims();
807
807
  init_constants();
@@ -919,17 +919,17 @@ var init_request = __esm({
919
919
  }
920
920
  });
921
921
 
922
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/html.js
922
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/html.js
923
923
  var init_html = __esm({
924
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/html.js"() {
924
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/html.js"() {
925
925
  "use strict";
926
926
  init_esm_shims();
927
927
  }
928
928
  });
929
929
 
930
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/context.js
930
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/context.js
931
931
  var init_context = __esm({
932
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/context.js"() {
932
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/context.js"() {
933
933
  "use strict";
934
934
  init_esm_shims();
935
935
  init_request();
@@ -937,25 +937,25 @@ var init_context = __esm({
937
937
  }
938
938
  });
939
939
 
940
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router.js
940
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router.js
941
941
  var init_router = __esm({
942
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router.js"() {
942
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router.js"() {
943
943
  "use strict";
944
944
  init_esm_shims();
945
945
  }
946
946
  });
947
947
 
948
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/constants.js
948
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/constants.js
949
949
  var init_constants2 = __esm({
950
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/utils/constants.js"() {
950
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/utils/constants.js"() {
951
951
  "use strict";
952
952
  init_esm_shims();
953
953
  }
954
954
  });
955
955
 
956
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/hono-base.js
956
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/hono-base.js
957
957
  var init_hono_base = __esm({
958
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/hono-base.js"() {
958
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/hono-base.js"() {
959
959
  "use strict";
960
960
  init_esm_shims();
961
961
  init_compose();
@@ -966,10 +966,10 @@ var init_hono_base = __esm({
966
966
  }
967
967
  });
968
968
 
969
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/reg-exp-router/node.js
969
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/node.js
970
970
  var PATH_ERROR, regExpMetaChars;
971
971
  var init_node = __esm({
972
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/reg-exp-router/node.js"() {
972
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/node.js"() {
973
973
  "use strict";
974
974
  init_esm_shims();
975
975
  PATH_ERROR = Symbol();
@@ -977,18 +977,18 @@ var init_node = __esm({
977
977
  }
978
978
  });
979
979
 
980
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/reg-exp-router/trie.js
980
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/trie.js
981
981
  var init_trie = __esm({
982
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/reg-exp-router/trie.js"() {
982
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/trie.js"() {
983
983
  "use strict";
984
984
  init_esm_shims();
985
985
  init_node();
986
986
  }
987
987
  });
988
988
 
989
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/reg-exp-router/router.js
989
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/router.js
990
990
  var init_router2 = __esm({
991
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/reg-exp-router/router.js"() {
991
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/router.js"() {
992
992
  "use strict";
993
993
  init_esm_shims();
994
994
  init_router();
@@ -998,36 +998,36 @@ var init_router2 = __esm({
998
998
  }
999
999
  });
1000
1000
 
1001
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/reg-exp-router/index.js
1001
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/index.js
1002
1002
  var init_reg_exp_router = __esm({
1003
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/reg-exp-router/index.js"() {
1003
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/reg-exp-router/index.js"() {
1004
1004
  "use strict";
1005
1005
  init_esm_shims();
1006
1006
  init_router2();
1007
1007
  }
1008
1008
  });
1009
1009
 
1010
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/smart-router/router.js
1010
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/smart-router/router.js
1011
1011
  var init_router3 = __esm({
1012
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/smart-router/router.js"() {
1012
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/smart-router/router.js"() {
1013
1013
  "use strict";
1014
1014
  init_esm_shims();
1015
1015
  init_router();
1016
1016
  }
1017
1017
  });
1018
1018
 
1019
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/smart-router/index.js
1019
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/smart-router/index.js
1020
1020
  var init_smart_router = __esm({
1021
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/smart-router/index.js"() {
1021
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/smart-router/index.js"() {
1022
1022
  "use strict";
1023
1023
  init_esm_shims();
1024
1024
  init_router3();
1025
1025
  }
1026
1026
  });
1027
1027
 
1028
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/trie-router/node.js
1028
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/node.js
1029
1029
  var init_node2 = __esm({
1030
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/trie-router/node.js"() {
1030
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/node.js"() {
1031
1031
  "use strict";
1032
1032
  init_esm_shims();
1033
1033
  init_router();
@@ -1035,9 +1035,9 @@ var init_node2 = __esm({
1035
1035
  }
1036
1036
  });
1037
1037
 
1038
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/trie-router/router.js
1038
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/router.js
1039
1039
  var init_router4 = __esm({
1040
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/trie-router/router.js"() {
1040
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/router.js"() {
1041
1041
  "use strict";
1042
1042
  init_esm_shims();
1043
1043
  init_url();
@@ -1045,18 +1045,18 @@ var init_router4 = __esm({
1045
1045
  }
1046
1046
  });
1047
1047
 
1048
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/trie-router/index.js
1048
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/index.js
1049
1049
  var init_trie_router = __esm({
1050
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/router/trie-router/index.js"() {
1050
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/router/trie-router/index.js"() {
1051
1051
  "use strict";
1052
1052
  init_esm_shims();
1053
1053
  init_router4();
1054
1054
  }
1055
1055
  });
1056
1056
 
1057
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/hono.js
1057
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/hono.js
1058
1058
  var init_hono = __esm({
1059
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/hono.js"() {
1059
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/hono.js"() {
1060
1060
  "use strict";
1061
1061
  init_esm_shims();
1062
1062
  init_hono_base();
@@ -1066,19 +1066,19 @@ var init_hono = __esm({
1066
1066
  }
1067
1067
  });
1068
1068
 
1069
- // ../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/index.js
1069
+ // ../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/index.js
1070
1070
  var init_dist3 = __esm({
1071
- "../node_modules/.pnpm/hono@4.9.8/node_modules/hono/dist/index.js"() {
1071
+ "../node_modules/.pnpm/hono@4.9.9/node_modules/hono/dist/index.js"() {
1072
1072
  "use strict";
1073
1073
  init_esm_shims();
1074
1074
  init_hono();
1075
1075
  }
1076
1076
  });
1077
1077
 
1078
- // ../node_modules/.pnpm/@hono+zod-openapi@1.1.3_hono@4.9.8_zod@4.1.11/node_modules/@hono/zod-openapi/dist/index.js
1078
+ // ../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
1079
1079
  import { z } from "zod";
1080
1080
  var init_dist4 = __esm({
1081
- "../node_modules/.pnpm/@hono+zod-openapi@1.1.3_hono@4.9.8_zod@4.1.11/node_modules/@hono/zod-openapi/dist/index.js"() {
1081
+ "../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"() {
1082
1082
  "use strict";
1083
1083
  init_esm_shims();
1084
1084
  init_dist();
@@ -2714,7 +2714,7 @@ var init_schemas = __esm({
2714
2714
  });
2715
2715
  ProjectSelectSchema = createSelectSchema(projects);
2716
2716
  ProjectInsertSchema = createInsertSchema(projects).extend({
2717
- models: ProjectModelSchema.optional(),
2717
+ models: ProjectModelSchema,
2718
2718
  stopWhen: StopWhenSchema.optional()
2719
2719
  }).omit({
2720
2720
  createdAt: true,
@@ -4803,11 +4803,11 @@ var init_execution = __esm({
4803
4803
  }
4804
4804
  });
4805
4805
 
4806
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
4806
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
4807
4807
  import { z as z4 } from "zod";
4808
4808
  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;
4809
4809
  var init_types2 = __esm({
4810
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"() {
4810
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"() {
4811
4811
  "use strict";
4812
4812
  init_esm_shims();
4813
4813
  JSONRPC_VERSION = "2.0";
@@ -5780,9 +5780,9 @@ var init_types2 = __esm({
5780
5780
  }
5781
5781
  });
5782
5782
 
5783
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
5783
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
5784
5784
  var init_protocol = __esm({
5785
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js"() {
5785
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js"() {
5786
5786
  "use strict";
5787
5787
  init_esm_shims();
5788
5788
  init_types2();
@@ -12035,14 +12035,14 @@ var require_ajv = __commonJS({
12035
12035
  return metaOpts;
12036
12036
  }
12037
12037
  function setLogger(self) {
12038
- var logger12 = self._opts.logger;
12039
- if (logger12 === false) {
12038
+ var logger13 = self._opts.logger;
12039
+ if (logger13 === false) {
12040
12040
  self.logger = { log: noop, warn: noop, error: noop };
12041
12041
  } else {
12042
- if (logger12 === void 0) logger12 = console;
12043
- if (!(typeof logger12 == "object" && logger12.log && logger12.warn && logger12.error))
12042
+ if (logger13 === void 0) logger13 = console;
12043
+ if (!(typeof logger13 == "object" && logger13.log && logger13.warn && logger13.error))
12044
12044
  throw new Error("logger must implement log, warn and error methods");
12045
- self.logger = logger12;
12045
+ self.logger = logger13;
12046
12046
  }
12047
12047
  }
12048
12048
  function noop() {
@@ -12050,10 +12050,10 @@ var require_ajv = __commonJS({
12050
12050
  }
12051
12051
  });
12052
12052
 
12053
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js
12053
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js
12054
12054
  var import_ajv;
12055
12055
  var init_client2 = __esm({
12056
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js"() {
12056
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js"() {
12057
12057
  "use strict";
12058
12058
  init_esm_shims();
12059
12059
  init_protocol();
@@ -12074,11 +12074,11 @@ var init_index_node = __esm({
12074
12074
  }
12075
12075
  });
12076
12076
 
12077
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
12077
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
12078
12078
  import { z as z5 } from "zod";
12079
12079
  var SafeUrlSchema, OAuthProtectedResourceMetadataSchema, OAuthMetadataSchema, OpenIdProviderMetadataSchema, OpenIdProviderDiscoveryMetadataSchema, OAuthTokensSchema, OAuthErrorResponseSchema, OAuthClientMetadataSchema, OAuthClientInformationSchema, OAuthClientInformationFullSchema, OAuthClientRegistrationErrorSchema, OAuthTokenRevocationRequestSchema;
12080
12080
  var init_auth = __esm({
12081
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js"() {
12081
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js"() {
12082
12082
  "use strict";
12083
12083
  init_esm_shims();
12084
12084
  SafeUrlSchema = z5.string().url().superRefine((val, ctx) => {
@@ -12220,18 +12220,18 @@ var init_auth = __esm({
12220
12220
  }
12221
12221
  });
12222
12222
 
12223
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
12223
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
12224
12224
  var init_auth_utils = __esm({
12225
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js"() {
12225
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js"() {
12226
12226
  "use strict";
12227
12227
  init_esm_shims();
12228
12228
  }
12229
12229
  });
12230
12230
 
12231
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js
12231
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js
12232
12232
  var OAuthError, InvalidRequestError, InvalidClientError, InvalidGrantError, UnauthorizedClientError, UnsupportedGrantTypeError, InvalidScopeError, AccessDeniedError, ServerError, TemporarilyUnavailableError, UnsupportedResponseTypeError, UnsupportedTokenTypeError, InvalidTokenError, MethodNotAllowedError, TooManyRequestsError, InvalidClientMetadataError, InsufficientScopeError, OAUTH_ERRORS;
12233
12233
  var init_errors = __esm({
12234
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js"() {
12234
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js"() {
12235
12235
  "use strict";
12236
12236
  init_esm_shims();
12237
12237
  OAuthError = class extends Error {
@@ -12326,9 +12326,9 @@ var init_errors = __esm({
12326
12326
  }
12327
12327
  });
12328
12328
 
12329
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js
12329
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js
12330
12330
  var init_auth2 = __esm({
12331
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js"() {
12331
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js"() {
12332
12332
  "use strict";
12333
12333
  init_esm_shims();
12334
12334
  init_index_node();
@@ -12340,9 +12340,9 @@ var init_auth2 = __esm({
12340
12340
  }
12341
12341
  });
12342
12342
 
12343
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js
12343
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js
12344
12344
  var init_sse = __esm({
12345
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js"() {
12345
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js"() {
12346
12346
  "use strict";
12347
12347
  init_esm_shims();
12348
12348
  init_types2();
@@ -12350,9 +12350,9 @@ var init_sse = __esm({
12350
12350
  }
12351
12351
  });
12352
12352
 
12353
- // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js
12353
+ // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js
12354
12354
  var init_streamableHttp = __esm({
12355
- "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.1/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js"() {
12355
+ "../node_modules/.pnpm/@modelcontextprotocol+sdk@1.18.2/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js"() {
12356
12356
  "use strict";
12357
12357
  init_esm_shims();
12358
12358
  init_types2();
@@ -12687,12 +12687,12 @@ var init_global_utils = __esm({
12687
12687
 
12688
12688
  // ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js
12689
12689
  function logProxy(funcName, namespace, args) {
12690
- var logger12 = getGlobal("diag");
12691
- if (!logger12) {
12690
+ var logger13 = getGlobal("diag");
12691
+ if (!logger13) {
12692
12692
  return;
12693
12693
  }
12694
12694
  args.unshift(namespace);
12695
- return logger12[funcName].apply(logger12, __spreadArray([], __read(args), false));
12695
+ return logger13[funcName].apply(logger13, __spreadArray([], __read(args), false));
12696
12696
  }
12697
12697
  var __read, __spreadArray, DiagComponentLogger;
12698
12698
  var init_ComponentLogger = __esm({
@@ -12790,17 +12790,17 @@ var init_types3 = __esm({
12790
12790
  });
12791
12791
 
12792
12792
  // ../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
12793
- function createLogLevelDiagLogger(maxLevel, logger12) {
12793
+ function createLogLevelDiagLogger(maxLevel, logger13) {
12794
12794
  if (maxLevel < DiagLogLevel.NONE) {
12795
12795
  maxLevel = DiagLogLevel.NONE;
12796
12796
  } else if (maxLevel > DiagLogLevel.ALL) {
12797
12797
  maxLevel = DiagLogLevel.ALL;
12798
12798
  }
12799
- logger12 = logger12 || {};
12799
+ logger13 = logger13 || {};
12800
12800
  function _filterFunc(funcName, theLevel) {
12801
- var theFunc = logger12[funcName];
12801
+ var theFunc = logger13[funcName];
12802
12802
  if (typeof theFunc === "function" && maxLevel >= theLevel) {
12803
- return theFunc.bind(logger12);
12803
+ return theFunc.bind(logger13);
12804
12804
  }
12805
12805
  return function() {
12806
12806
  };
@@ -12867,19 +12867,19 @@ var init_diag = __esm({
12867
12867
  for (var _i = 0; _i < arguments.length; _i++) {
12868
12868
  args[_i] = arguments[_i];
12869
12869
  }
12870
- var logger12 = getGlobal("diag");
12871
- if (!logger12)
12870
+ var logger13 = getGlobal("diag");
12871
+ if (!logger13)
12872
12872
  return;
12873
- return logger12[funcName].apply(logger12, __spreadArray2([], __read2(args), false));
12873
+ return logger13[funcName].apply(logger13, __spreadArray2([], __read2(args), false));
12874
12874
  };
12875
12875
  }
12876
12876
  var self = this;
12877
- var setLogger = function(logger12, optionsOrLogLevel) {
12877
+ var setLogger = function(logger13, optionsOrLogLevel) {
12878
12878
  var _a, _b, _c;
12879
12879
  if (optionsOrLogLevel === void 0) {
12880
12880
  optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
12881
12881
  }
12882
- if (logger12 === self) {
12882
+ if (logger13 === self) {
12883
12883
  var err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
12884
12884
  self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
12885
12885
  return false;
@@ -12890,7 +12890,7 @@ var init_diag = __esm({
12890
12890
  };
12891
12891
  }
12892
12892
  var oldLogger = getGlobal("diag");
12893
- var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger12);
12893
+ var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger13);
12894
12894
  if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
12895
12895
  var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
12896
12896
  oldLogger.warn("Current logger will be overwritten from " + stack);
@@ -17978,13 +17978,13 @@ var require_core = __commonJS({
17978
17978
  }, warn() {
17979
17979
  }, error() {
17980
17980
  } };
17981
- function getLogger2(logger12) {
17982
- if (logger12 === false)
17981
+ function getLogger2(logger13) {
17982
+ if (logger13 === false)
17983
17983
  return noLogs;
17984
- if (logger12 === void 0)
17984
+ if (logger13 === void 0)
17985
17985
  return console;
17986
- if (logger12.log && logger12.warn && logger12.error)
17987
- return logger12;
17986
+ if (logger13.log && logger13.warn && logger13.error)
17987
+ return logger13;
17988
17988
  throw new Error("logger must implement log, warn and error methods");
17989
17989
  }
17990
17990
  var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
@@ -20529,42 +20529,6 @@ var init_src = __esm({
20529
20529
  }
20530
20530
  });
20531
20531
 
20532
- // src/env.ts
20533
- import { z as z10 } from "zod";
20534
- var envSchema2, parseEnv2, env2;
20535
- var init_env2 = __esm({
20536
- "src/env.ts"() {
20537
- "use strict";
20538
- init_esm_shims();
20539
- init_src();
20540
- loadEnvironmentFiles();
20541
- envSchema2 = z10.object({
20542
- DEBUG: z10.string().optional(),
20543
- INKEEP_AGENTS_MANAGE_API_URL: z10.string().optional(),
20544
- INKEEP_AGENTS_RUN_API_URL: z10.string().optional(),
20545
- INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET: z10.string().optional(),
20546
- INKEEP_AGENTS_RUN_API_BYPASS_SECRET: z10.string().optional(),
20547
- ANTHROPIC_API_KEY: z10.string().optional()
20548
- });
20549
- parseEnv2 = () => {
20550
- try {
20551
- const parsedEnv = envSchema2.parse(process.env);
20552
- return parsedEnv;
20553
- } catch (error) {
20554
- if (error instanceof z10.ZodError) {
20555
- const missingVars = error.issues.map((issue) => issue.path.join("."));
20556
- throw new Error(
20557
- `\u274C Invalid environment variables: ${missingVars.join(", ")}
20558
- ${error.message}`
20559
- );
20560
- }
20561
- throw error;
20562
- }
20563
- };
20564
- env2 = parseEnv2();
20565
- }
20566
- });
20567
-
20568
20532
  // src/utils/tsx-loader.ts
20569
20533
  import { extname } from "path";
20570
20534
  import { pathToFileURL } from "url";
@@ -20602,8 +20566,41 @@ var init_tsx_loader = __esm({
20602
20566
  });
20603
20567
 
20604
20568
  // src/utils/config.ts
20569
+ var config_exports = {};
20570
+ __export(config_exports, {
20571
+ getAgentsManageApiUrl: () => getAgentsManageApiUrl,
20572
+ getAgentsRunApiUrl: () => getAgentsRunApiUrl,
20573
+ getProjectId: () => getProjectId,
20574
+ getTenantId: () => getTenantId,
20575
+ loadConfig: () => loadConfig,
20576
+ validateConfiguration: () => validateConfiguration
20577
+ });
20605
20578
  import { existsSync as existsSync4 } from "fs";
20606
20579
  import { dirname as dirname3, join as join4, resolve as resolve2 } from "path";
20580
+ function isNestedConfig(config) {
20581
+ return config && (config.agentsManageApi !== void 0 || config.agentsRunApi !== void 0);
20582
+ }
20583
+ function normalizeConfig(config) {
20584
+ if (isNestedConfig(config)) {
20585
+ return {
20586
+ tenantId: config.tenantId,
20587
+ agentsManageApiUrl: config.agentsManageApi?.url,
20588
+ agentsRunApiUrl: config.agentsRunApi?.url,
20589
+ agentsManageApiKey: config.agentsManageApi?.apiKey,
20590
+ agentsRunApiKey: config.agentsRunApi?.apiKey,
20591
+ manageUiUrl: config.manageUiUrl,
20592
+ outputDirectory: config.outputDirectory
20593
+ };
20594
+ } else {
20595
+ return {
20596
+ tenantId: config.tenantId,
20597
+ agentsManageApiUrl: config.agentsManageApiUrl,
20598
+ agentsRunApiUrl: config.agentsRunApiUrl,
20599
+ manageUiUrl: config.manageUiUrl,
20600
+ outputDirectory: config.outputDirectory
20601
+ };
20602
+ }
20603
+ }
20607
20604
  function findConfigFile(startPath = process.cwd()) {
20608
20605
  let currentPath = resolve2(startPath);
20609
20606
  const root = "/";
@@ -20624,6 +20621,7 @@ function findConfigFile(startPath = process.cwd()) {
20624
20621
  return null;
20625
20622
  }
20626
20623
  async function loadConfigFromFile(configPath) {
20624
+ logger12.info({ fromPath: configPath }, `Loading config file`);
20627
20625
  let resolvedPath;
20628
20626
  if (configPath) {
20629
20627
  resolvedPath = resolve2(process.cwd(), configPath);
@@ -20638,10 +20636,12 @@ async function loadConfigFromFile(configPath) {
20638
20636
  }
20639
20637
  try {
20640
20638
  const module = await importWithTypeScriptSupport(resolvedPath);
20641
- const config = module.default || module.config;
20642
- if (!config) {
20639
+ const rawConfig = module.default || module.config;
20640
+ if (!rawConfig) {
20643
20641
  throw new Error(`No config exported from ${resolvedPath}`);
20644
20642
  }
20643
+ const config = normalizeConfig(rawConfig);
20644
+ logger12.info({ config }, `Loaded config values`);
20645
20645
  return config;
20646
20646
  } catch (error) {
20647
20647
  console.warn(`Warning: Failed to load config file ${resolvedPath}:`, error);
@@ -20649,20 +20649,20 @@ async function loadConfigFromFile(configPath) {
20649
20649
  }
20650
20650
  }
20651
20651
  async function loadConfig(configPath) {
20652
- const config = {
20652
+ let config = {
20653
20653
  agentsManageApiUrl: "http://localhost:3002",
20654
20654
  agentsRunApiUrl: "http://localhost:3003",
20655
20655
  manageUiUrl: "http://localhost:3000"
20656
20656
  };
20657
20657
  const fileConfig = await loadConfigFromFile(configPath);
20658
20658
  if (fileConfig) {
20659
- Object.assign(config, fileConfig);
20660
- }
20661
- if (process.env.INKEEP_AGENTS_MANAGE_API_URL) {
20662
- config.agentsManageApiUrl = process.env.INKEEP_AGENTS_MANAGE_API_URL;
20663
- }
20664
- if (process.env.INKEEP_AGENTS_RUN_API_URL) {
20665
- config.agentsRunApiUrl = process.env.INKEEP_AGENTS_RUN_API_URL;
20659
+ config = {
20660
+ ...config,
20661
+ ...fileConfig
20662
+ };
20663
+ logger12.info({ mergedConfig: config }, `Config loaded from file`);
20664
+ } else {
20665
+ logger12.info({ config }, `Using default config (no config file found)`);
20666
20666
  }
20667
20667
  return config;
20668
20668
  }
@@ -20703,6 +20703,8 @@ async function validateConfiguration(tenantIdFlag, agentsManageApiUrlFlag, agent
20703
20703
  tenantId: tenantIdFlag,
20704
20704
  agentsManageApiUrl: agentsManageApiUrlFlag,
20705
20705
  agentsRunApiUrl: agentsRunApiUrlFlag,
20706
+ agentsManageApiKey: config.agentsManageApiKey,
20707
+ agentsRunApiKey: config.agentsRunApiKey,
20706
20708
  manageUiUrl: config.manageUiUrl,
20707
20709
  sources: sources2
20708
20710
  };
@@ -20721,18 +20723,18 @@ Please ensure your config file exports a valid configuration with tenantId.`
20721
20723
  }
20722
20724
  if (!agentsManageApiUrl) {
20723
20725
  throw new Error(
20724
- "Agents Management API URL is missing. Please either:\n 1. Provide --agents-manage-api-url flag\n 2. Set INKEEP_AGENTS_MANAGE_API_URL environment variable\n 3. Add agentsManageApiUrl to your configuration file"
20726
+ "Agents Management API URL is missing. Please either:\n 1. Provide --agents-manage-api-url flag\n 2. Add agentsManageApiUrl to your configuration file"
20725
20727
  );
20726
20728
  }
20727
20729
  if (!agentsRunApiUrl) {
20728
20730
  throw new Error(
20729
- "Agents Run API URL is missing. Please either:\n 1. Provide --agents-run-api-url flag\n 2. Set INKEEP_AGENTS_RUN_API_URL environment variable\n 3. Add agentsRunApiUrl to your configuration file"
20731
+ "Agents Run API URL is missing. Please either:\n 1. Provide --agents-run-api-url flag\n 2. Add agentsRunApiUrl to your configuration file"
20730
20732
  );
20731
20733
  }
20732
20734
  const sources = {
20733
20735
  tenantId: tenantIdFlag ? "command-line flag (--tenant-id)" : actualConfigFile ? `config file (${actualConfigFile})` : "default",
20734
- agentsManageApiUrl: agentsManageApiUrlFlag ? "command-line flag (--agents-manage-api-url)" : process.env.INKEEP_AGENTS_MANAGE_API_URL === agentsManageApiUrl ? "environment variable (INKEEP_AGENTS_MANAGE_API_URL)" : actualConfigFile ? `config file (${actualConfigFile})` : "default value",
20735
- agentsRunApiUrl: agentsRunApiUrlFlag ? "command-line flag (--agents-run-api-url)" : process.env.INKEEP_AGENTS_RUN_API_URL === agentsRunApiUrl ? "environment variable (INKEEP_AGENTS_RUN_API_URL)" : actualConfigFile ? `config file (${actualConfigFile})` : "default value"
20736
+ agentsManageApiUrl: agentsManageApiUrlFlag ? "command-line flag (--agents-manage-api-url)" : actualConfigFile ? `config file (${actualConfigFile})` : "default value",
20737
+ agentsRunApiUrl: agentsRunApiUrlFlag ? "command-line flag (--agents-run-api-url)" : actualConfigFile ? `config file (${actualConfigFile})` : "default value"
20736
20738
  };
20737
20739
  if (actualConfigFile) {
20738
20740
  sources.configFile = actualConfigFile;
@@ -20741,15 +20743,20 @@ Please ensure your config file exports a valid configuration with tenantId.`
20741
20743
  tenantId,
20742
20744
  agentsManageApiUrl,
20743
20745
  agentsRunApiUrl,
20746
+ agentsManageApiKey: config.agentsManageApiKey,
20747
+ agentsRunApiKey: config.agentsRunApiKey,
20744
20748
  manageUiUrl: config.manageUiUrl,
20745
20749
  sources
20746
20750
  };
20747
20751
  }
20752
+ var logger12;
20748
20753
  var init_config = __esm({
20749
20754
  "src/utils/config.ts"() {
20750
20755
  "use strict";
20751
20756
  init_esm_shims();
20757
+ init_src();
20752
20758
  init_tsx_loader();
20759
+ logger12 = getLogger("config");
20753
20760
  }
20754
20761
  });
20755
20762
 
@@ -20759,16 +20766,17 @@ var init_api = __esm({
20759
20766
  "src/api.ts"() {
20760
20767
  "use strict";
20761
20768
  init_esm_shims();
20762
- init_env2();
20763
20769
  init_config();
20764
20770
  BaseApiClient = class {
20765
20771
  apiUrl;
20766
20772
  tenantId;
20767
20773
  projectId;
20768
- constructor(apiUrl, tenantId, projectId) {
20774
+ apiKey;
20775
+ constructor(apiUrl, tenantId, projectId, apiKey) {
20769
20776
  this.apiUrl = apiUrl;
20770
20777
  this.tenantId = tenantId;
20771
20778
  this.projectId = projectId;
20779
+ this.apiKey = apiKey;
20772
20780
  }
20773
20781
  checkTenantId() {
20774
20782
  if (!this.tenantId) {
@@ -20787,14 +20795,16 @@ var init_api = __esm({
20787
20795
  }
20788
20796
  };
20789
20797
  ManagementApiClient = class _ManagementApiClient extends BaseApiClient {
20790
- constructor(apiUrl, tenantId, projectId) {
20791
- super(apiUrl, tenantId, projectId);
20798
+ constructor(apiUrl, tenantId, projectId, apiKey) {
20799
+ super(apiUrl, tenantId, projectId, apiKey);
20792
20800
  }
20793
20801
  static async create(apiUrl, configPath, tenantIdOverride, projectIdOverride) {
20794
20802
  const resolvedApiUrl = await getAgentsManageApiUrl(apiUrl, configPath);
20795
20803
  const tenantId = tenantIdOverride || await getTenantId(configPath);
20796
20804
  const projectId = projectIdOverride || await getProjectId(configPath);
20797
- return new _ManagementApiClient(resolvedApiUrl, tenantId, projectId);
20805
+ const { validateConfiguration: validateConfiguration2 } = await Promise.resolve().then(() => (init_config(), config_exports));
20806
+ const config = await validateConfiguration2(tenantIdOverride, apiUrl, void 0, configPath);
20807
+ return new _ManagementApiClient(resolvedApiUrl, tenantId, projectId, config.agentsManageApiKey);
20798
20808
  }
20799
20809
  async listGraphs() {
20800
20810
  const tenantId = this.checkTenantId();
@@ -20805,8 +20815,8 @@ var init_api = __esm({
20805
20815
  method: "GET",
20806
20816
  headers: {
20807
20817
  "Content-Type": "application/json",
20808
- ...env2.INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET && {
20809
- Authorization: `Bearer ${env2.INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET}`
20818
+ ...this.apiKey && {
20819
+ Authorization: `Bearer ${this.apiKey}`
20810
20820
  }
20811
20821
  }
20812
20822
  }
@@ -20836,8 +20846,8 @@ var init_api = __esm({
20836
20846
  method: "PUT",
20837
20847
  headers: {
20838
20848
  "Content-Type": "application/json",
20839
- ...env2.INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET && {
20840
- Authorization: `Bearer ${env2.INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET}`
20849
+ ...this.apiKey && {
20850
+ Authorization: `Bearer ${this.apiKey}`
20841
20851
  }
20842
20852
  },
20843
20853
  body: JSON.stringify(graphDefinition)
@@ -20853,14 +20863,16 @@ ${errorText}`);
20853
20863
  }
20854
20864
  };
20855
20865
  ExecutionApiClient = class _ExecutionApiClient extends BaseApiClient {
20856
- constructor(apiUrl, tenantId, projectId) {
20857
- super(apiUrl, tenantId, projectId);
20866
+ constructor(apiUrl, tenantId, projectId, apiKey) {
20867
+ super(apiUrl, tenantId, projectId, apiKey);
20858
20868
  }
20859
20869
  static async create(apiUrl, configPath, tenantIdOverride, projectIdOverride) {
20860
20870
  const resolvedApiUrl = await getAgentsRunApiUrl(apiUrl, configPath);
20861
20871
  const tenantId = tenantIdOverride || await getTenantId(configPath);
20862
20872
  const projectId = projectIdOverride || await getProjectId(configPath);
20863
- return new _ExecutionApiClient(resolvedApiUrl, tenantId, projectId);
20873
+ const { validateConfiguration: validateConfiguration2 } = await Promise.resolve().then(() => (init_config(), config_exports));
20874
+ const config = await validateConfiguration2(tenantIdOverride, void 0, apiUrl, configPath);
20875
+ return new _ExecutionApiClient(resolvedApiUrl, tenantId, projectId, config.agentsRunApiKey);
20864
20876
  }
20865
20877
  async chatCompletion(graphId, messages2, conversationId) {
20866
20878
  const response = await fetch(`${this.apiUrl}/v1/chat/completions`, {
@@ -20868,8 +20880,8 @@ ${errorText}`);
20868
20880
  headers: {
20869
20881
  "Content-Type": "application/json",
20870
20882
  Accept: "text/event-stream",
20871
- ...env2.INKEEP_AGENTS_RUN_API_BYPASS_SECRET && {
20872
- Authorization: `Bearer ${env2.INKEEP_AGENTS_RUN_API_BYPASS_SECRET}`
20883
+ ...this.apiKey && {
20884
+ Authorization: `Bearer ${this.apiKey}`
20873
20885
  },
20874
20886
  "x-inkeep-tenant-id": this.tenantId || "test-tenant-id",
20875
20887
  "x-inkeep-project-id": this.projectId,
@@ -21214,7 +21226,35 @@ var init_chat_enhanced = __esm({
21214
21226
 
21215
21227
  // src/index.ts
21216
21228
  init_esm_shims();
21217
- init_env2();
21229
+
21230
+ // src/env.ts
21231
+ init_esm_shims();
21232
+ init_src();
21233
+ import { z as z10 } from "zod";
21234
+ loadEnvironmentFiles();
21235
+ var envSchema2 = z10.object({
21236
+ DEBUG: z10.string().optional(),
21237
+ // Secrets loaded from .env files (relative to where CLI is executed)
21238
+ ANTHROPIC_API_KEY: z10.string().optional()
21239
+ });
21240
+ var parseEnv2 = () => {
21241
+ try {
21242
+ const parsedEnv = envSchema2.parse(process.env);
21243
+ return parsedEnv;
21244
+ } catch (error) {
21245
+ if (error instanceof z10.ZodError) {
21246
+ const missingVars = error.issues.map((issue) => issue.path.join("."));
21247
+ throw new Error(
21248
+ `\u274C Invalid environment variables: ${missingVars.join(", ")}
21249
+ ${error.message}`
21250
+ );
21251
+ }
21252
+ throw error;
21253
+ }
21254
+ };
21255
+ var env2 = parseEnv2();
21256
+
21257
+ // src/index.ts
21218
21258
  import { readFileSync as readFileSync3 } from "fs";
21219
21259
  import { dirname as dirname5, join as join10 } from "path";
21220
21260
  import { fileURLToPath as fileURLToPath2 } from "url";
@@ -21744,8 +21784,12 @@ async function initCommand(options) {
21744
21784
 
21745
21785
  export default defineConfig({
21746
21786
  tenantId: '${answers.tenantId}',
21747
- agentsManageApiUrl: '${answers.apiUrl}',
21748
- agentsRunApiUrl: '${answers.apiUrl}',
21787
+ agentsManageApi: {
21788
+ url: '${answers.apiUrl}',
21789
+ },
21790
+ agentsRunApi: {
21791
+ url: '${answers.apiUrl}',
21792
+ },
21749
21793
  });
21750
21794
  `;
21751
21795
  try {
@@ -21843,13 +21887,12 @@ ${table.toString()}`);
21843
21887
 
21844
21888
  // src/commands/pull.ts
21845
21889
  init_esm_shims();
21846
- init_env2();
21847
- init_tsx_loader();
21848
21890
  import { existsSync as existsSync6, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync4 } from "fs";
21849
21891
  import { dirname as dirname4, join as join7, resolve as resolve4 } from "path";
21850
21892
  import chalk6 from "chalk";
21851
21893
  import ora4 from "ora";
21852
21894
  import prompts from "prompts";
21895
+ init_tsx_loader();
21853
21896
 
21854
21897
  // src/utils/project-directory.ts
21855
21898
  init_esm_shims();
@@ -23195,12 +23238,11 @@ async function pullProjectCommand(options) {
23195
23238
 
23196
23239
  // src/commands/push.ts
23197
23240
  init_esm_shims();
23198
- init_env2();
23199
- init_config();
23200
23241
  import { existsSync as existsSync8 } from "fs";
23201
23242
  import { join as join9, resolve as resolve5 } from "path";
23202
23243
  import chalk7 from "chalk";
23203
23244
  import ora5 from "ora";
23245
+ init_config();
23204
23246
 
23205
23247
  // src/utils/environment-loader.ts
23206
23248
  init_esm_shims();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -45,8 +45,8 @@
45
45
  "recast": "^0.23.0",
46
46
  "ts-morph": "^26.0.0",
47
47
  "tsx": "^4.20.5",
48
- "@inkeep/agents-core": "^0.12.0",
49
- "@inkeep/agents-manage-ui": "^0.12.0"
48
+ "@inkeep/agents-core": "^0.13.0",
49
+ "@inkeep/agents-manage-ui": "^0.13.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/degit": "^2.8.6",
@@ -61,7 +61,7 @@
61
61
  "pino-pretty": "^13.1.1"
62
62
  },
63
63
  "peerDependencies": {
64
- "zod": "^4.1.5"
64
+ "zod": "^4.1.11"
65
65
  },
66
66
  "engines": {
67
67
  "node": ">=22.0.0"