@thinkingai/ae-cli 6.1.4 → 6.1.6

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 (237) hide show
  1. package/README.md +3 -2
  2. package/README.zh.md +3 -2
  3. package/dist/{auth-MEJ642P4.js → auth-ENM3FE6L.js} +3 -2
  4. package/dist/{auth-7H3HAAJ3.js → auth-UPGUOKTW.js} +13 -6
  5. package/dist/{capability-QW4AVJHI.js → capability-AJC5CBRT.js} +49 -17
  6. package/dist/{capability-SCRFGODD.js → capability-TQ5KU5Q6.js} +49 -17
  7. package/dist/chunk-24BAVOX3.js +51 -0
  8. package/dist/{chunk-MDJGDI6K.js → chunk-3KI3RRXX.js} +5 -5
  9. package/dist/{chunk-PKRD2IEM.js → chunk-3P3562ZX.js} +9 -7
  10. package/dist/{chunk-R77JT7XD.js → chunk-4Q5TNP4Q.js} +4 -4
  11. package/dist/{chunk-7OLGDQQ2.js → chunk-6CHYBI64.js} +2 -2
  12. package/dist/{chunk-6LEYLOV3.js → chunk-CPVTECJ3.js} +9 -7
  13. package/dist/{chunk-KCA6BA5D.js → chunk-DB4Q3ANU.js} +5 -3
  14. package/dist/{chunk-2NDGFQHW.js → chunk-E7UXXHO3.js} +11 -3
  15. package/dist/{chunk-I4A62X3N.js → chunk-HQ2A7ITL.js} +23 -14
  16. package/dist/chunk-IMMGMU54.js +674 -0
  17. package/dist/{chunk-AJTH7LT3.js → chunk-IR4ZLVPW.js} +4 -2
  18. package/dist/{chunk-TBHBYKXZ.js → chunk-ISY6HMHM.js} +2 -2
  19. package/dist/{chunk-KGJQCYVC.js → chunk-LCXU3AAT.js} +4 -2
  20. package/dist/chunk-LYVNONC4.js +86 -0
  21. package/dist/{chunk-DYOS6YY7.js → chunk-RGXCNC4N.js} +23 -14
  22. package/dist/{chunk-YCLVYFK7.js → chunk-V6FR6WTW.js} +45 -87
  23. package/dist/chunk-VTWMIC5L.js +27 -0
  24. package/dist/{cli-token-TVQRSE46.js → cli-token-4SBMXAUK.js} +6 -3
  25. package/dist/{client-2643Z5AG.js → client-PP5FETMW.js} +4 -3
  26. package/dist/community-report-client-KK2QBANO.js +145 -0
  27. package/dist/{config-7UZWDE74.js → config-RCCGHHYA.js} +6 -3
  28. package/dist/index.js +506 -221
  29. package/dist/{metadata-BFDL6RUK.js → metadata-3M5F2AED.js} +14 -13
  30. package/dist/{metadata-FCLDBXX2.js → metadata-W2MEOI4Z.js} +14 -13
  31. package/dist/{model-T3KZJWLW.js → model-OYQLXCQY.js} +3 -2
  32. package/dist/{raw-CN542NGT.js → raw-TPB7KSZO.js} +6 -4
  33. package/dist/{sync-ERNHDPB5.js → sync-EFJKFZK2.js} +6 -3
  34. package/dist/{te-agent-FCCWUDTJ.js → te-agent-K2OWMZXT.js} +3 -2
  35. package/dist/{te-analysis-PUVF5IF4.js → te-analysis-I73ZS4NK.js} +903 -33
  36. package/dist/{te-analysis-UJDOKPAN.js → te-analysis-Q7AZCDU4.js} +903 -33
  37. package/dist/{te-common-XLAGWNIV.js → te-common-ST3QPSXJ.js} +7 -6
  38. package/dist/{te-common-VUX3VOXZ.js → te-common-WSLIKKPC.js} +7 -6
  39. package/dist/te-community-WXGB6IOX.js +1659 -0
  40. package/dist/te-community-X2AHXGCA.js +1659 -0
  41. package/dist/{te-dataops-ZNJBQ6VT.js → te-dataops-MJV54MNY.js} +10 -8
  42. package/dist/{te-dataops-F36T656A.js → te-dataops-OA7I6HBG.js} +10 -8
  43. package/dist/{te-engage-QBCCME22.js → te-engage-2FSDUOIZ.js} +973 -1585
  44. package/dist/{te-engage-K4AEUPK5.js → te-engage-BMJ6UOUU.js} +973 -1585
  45. package/dist/te-experiment-4JC7WUKW.js +590 -0
  46. package/dist/te-experiment-KYRWAUZY.js +590 -0
  47. package/dist/{te-kb-AYCODNU6.js → te-kb-E7NSCBRB.js} +74 -12
  48. package/dist/{te-meta-ARDIW3YI.js → te-meta-Q4L6EE3Q.js} +7 -6
  49. package/dist/{te-meta-UUROEODR.js → te-meta-VHCN4Q62.js} +7 -6
  50. package/dist/{te-team-OKCOX7OE.js → te-team-PDKKW7Q5.js} +7 -6
  51. package/dist/tracking/i18n/resources/cli/en.json +4 -3
  52. package/dist/tracking/i18n/resources/cli/ja.json +4 -3
  53. package/dist/tracking/i18n/resources/cli/ko.json +4 -3
  54. package/dist/tracking/i18n/resources/cli/zh.json +4 -3
  55. package/package.json +7 -3
  56. package/skills/ae-agent/SKILL.md +2 -1
  57. package/skills/ae-analysis/SKILL.md +12 -1
  58. package/skills/ae-analysis/references/adhoc_export.md +2 -0
  59. package/skills/ae-analysis/references/adhoc_run.md +2 -0
  60. package/skills/ae-analysis/references/alert_create.md +25 -0
  61. package/skills/ae-analysis/references/alert_definition_schema_get.md +24 -0
  62. package/skills/ae-analysis/references/alert_delete.md +26 -0
  63. package/skills/ae-analysis/references/alert_detail_list.md +27 -0
  64. package/skills/ae-analysis/references/alert_get.md +25 -0
  65. package/skills/ae-analysis/references/alert_job_list.md +24 -0
  66. package/skills/ae-analysis/references/alert_list.md +27 -0
  67. package/skills/ae-analysis/references/alert_notice_config_list.md +24 -0
  68. package/skills/ae-analysis/references/alert_start.md +25 -0
  69. package/skills/ae-analysis/references/alert_stop.md +25 -0
  70. package/skills/ae-analysis/references/alert_update.md +26 -0
  71. package/skills/ae-analysis/references/bi_panel_create.md +3 -3
  72. package/skills/ae-analysis/references/check_delete.md +27 -0
  73. package/skills/ae-analysis/references/check_export.md +27 -0
  74. package/skills/ae-analysis/references/check_get.md +27 -0
  75. package/skills/ae-analysis/references/check_list.md +24 -0
  76. package/skills/ae-analysis/references/check_retry.md +27 -0
  77. package/skills/ae-analysis/references/check_run.md +25 -0
  78. package/skills/ae-analysis/references/command_index.md +61 -27
  79. package/skills/ae-analysis/references/dashboard_create.md +3 -3
  80. package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -0
  81. package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
  82. package/skills/ae-analysis/references/dashboard_report_data_export.md +3 -3
  83. package/skills/ae-analysis/references/dashboard_report_data_run.md +3 -3
  84. package/skills/ae-analysis/references/event_blacklist_add.md +25 -0
  85. package/skills/ae-analysis/references/event_blacklist_list.md +24 -0
  86. package/skills/ae-analysis/references/event_blacklist_update.md +26 -0
  87. package/skills/ae-analysis/references/ingest_error_list.md +27 -0
  88. package/skills/ae-analysis/references/ingest_summary.md +26 -0
  89. package/skills/ae-analysis/references/live_data_export.md +27 -0
  90. package/skills/ae-analysis/references/live_data_list.md +27 -0
  91. package/skills/ae-analysis/references/plan_change_log_export.md +27 -0
  92. package/skills/ae-analysis/references/plan_change_log_list.md +24 -0
  93. package/skills/ae-analysis/references/plan_delete_items.md +30 -0
  94. package/skills/ae-analysis/references/plan_export.md +26 -0
  95. package/skills/ae-analysis/references/plan_generate.md +27 -0
  96. package/skills/ae-analysis/references/plan_get.md +24 -0
  97. package/skills/ae-analysis/references/plan_import_excel.md +26 -0
  98. package/skills/ae-analysis/references/plan_save_items.md +27 -0
  99. package/skills/ae-analysis/references/plan_sync_from_meta.md +24 -0
  100. package/skills/ae-analysis/references/project_role_delete.md +4 -3
  101. package/skills/ae-analysis/references/project_role_get.md +4 -3
  102. package/skills/ae-analysis/references/project_role_user_list.md +4 -3
  103. package/skills/ae-analysis/references/query_create_result_cluster.md +2 -1
  104. package/skills/ae-analysis/references/report_data_export.md +3 -1
  105. package/skills/ae-analysis/references/report_data_run.md +12 -2
  106. package/skills/ae-analysis/references/sdk_sample_generate.md +24 -0
  107. package/skills/ae-analysis/references/user_cluster_create.md +2 -0
  108. package/skills/ae-analysis/references/user_cluster_create_id.md +2 -0
  109. package/skills/ae-analysis/references/user_cluster_update.md +2 -0
  110. package/skills/ae-analysis/references/user_cluster_update_id.md +2 -0
  111. package/skills/ae-analysis/references/user_tag_create.md +2 -0
  112. package/skills/ae-analysis/references/user_tag_create_id.md +2 -0
  113. package/skills/ae-analysis/references/user_tag_update.md +2 -0
  114. package/skills/ae-analysis/references/user_tag_update_id.md +2 -0
  115. package/skills/ae-analysis-global/SKILL.md +2 -0
  116. package/skills/ae-capability/SKILL.md +7 -5
  117. package/skills/ae-community/SKILL.md +72 -8
  118. package/skills/ae-community/references/community-chat-analysis.md +341 -0
  119. package/skills/ae-community/references/community-data-report.md +301 -0
  120. package/skills/ae-dataops/SKILL.md +2 -1
  121. package/skills/ae-engage/SKILL.md +129 -105
  122. package/skills/ae-engage/references/activity-activity-type.md +1 -1
  123. package/skills/ae-engage/references/activity-activity.md +1 -1
  124. package/skills/ae-engage/references/activity-approval.md +5 -7
  125. package/skills/ae-engage/references/activity-task.md +12 -18
  126. package/skills/ae-engage/references/activity-topic.md +39 -22
  127. package/skills/ae-engage/references/add-approver.md +4 -4
  128. package/skills/ae-engage/references/add-channel.md +10 -5
  129. package/skills/ae-engage/references/approval-approver-delete.md +1 -1
  130. package/skills/ae-engage/references/approver-list.md +4 -4
  131. package/skills/ae-engage/references/build-task-save-guide.md +13 -13
  132. package/skills/ae-engage/references/cancel-query-by-request-id.md +7 -6
  133. package/skills/ae-engage/references/channel-detail.md +14 -9
  134. package/skills/ae-engage/references/channel-list.md +15 -10
  135. package/skills/ae-engage/references/channel-mgmt.md +109 -0
  136. package/skills/ae-engage/references/channel-test-send.md +1 -1
  137. package/skills/ae-engage/references/channel-update-config.md +1 -1
  138. package/skills/ae-engage/references/channel_touch_limits_list.md +1 -1
  139. package/skills/ae-engage/references/client-param.md +34 -16
  140. package/skills/ae-engage/references/common-metric.md +85 -18
  141. package/skills/ae-engage/references/config-item-analysis-report.md +8 -27
  142. package/skills/ae-engage/references/config-item-strategy-comparison.md +7 -18
  143. package/skills/ae-engage/references/config-item-trigger-report.md +8 -35
  144. package/skills/ae-engage/references/delete-channel.md +5 -5
  145. package/skills/ae-engage/references/delete-flow.md +5 -5
  146. package/skills/ae-engage/references/flow-ab-split-node-report.md +11 -45
  147. package/skills/ae-engage/references/flow-detail.md +15 -10
  148. package/skills/ae-engage/references/flow-list.md +9 -4
  149. package/skills/ae-engage/references/flow-node-config-schema.md +9 -8
  150. package/skills/ae-engage/references/flow-node-detail-report.md +11 -46
  151. package/skills/ae-engage/references/flow-node-overview-report.md +11 -43
  152. package/skills/ae-engage/references/flow-process-report.md +12 -50
  153. package/skills/ae-engage/references/flow-update-remark.md +19 -0
  154. package/skills/ae-engage/references/manage-flow.md +19 -19
  155. package/skills/ae-engage/references/manage-task.md +5 -5
  156. package/skills/ae-engage/references/modify-flow-base-info.md +8 -8
  157. package/skills/ae-engage/references/preset-event.md +1 -1
  158. package/skills/ae-engage/references/push-language.md +1 -1
  159. package/skills/ae-engage/references/save-flow.md +54 -52
  160. package/skills/ae-engage/references/save-task.md +23 -17
  161. package/skills/ae-engage/references/scene-config-channel.md +90 -10
  162. package/skills/ae-engage/references/scene-config-group.md +1 -1
  163. package/skills/ae-engage/references/scene-config-item.md +27 -4
  164. package/skills/ae-engage/references/scene-config-metric.md +1 -1
  165. package/skills/ae-engage/references/scene-config-param.md +2 -2
  166. package/skills/ae-engage/references/scene-preset-metric.md +1 -1
  167. package/skills/ae-engage/references/scene-strategy.md +19 -3
  168. package/skills/ae-engage/references/scene-template.md +10 -4
  169. package/skills/ae-engage/references/task-data-detail.md +5 -67
  170. package/skills/ae-engage/references/task-data-overview.md +5 -35
  171. package/skills/ae-engage/references/task-detail.md +5 -5
  172. package/skills/ae-engage/references/task-experiment-report.md +5 -38
  173. package/skills/ae-engage/references/task-list.md +4 -4
  174. package/skills/ae-engage/references/task-metric-detail.md +5 -43
  175. package/skills/ae-engage/references/task-stats.md +5 -5
  176. package/skills/ae-engage/references/update-channel-status.md +6 -6
  177. package/skills/ae-engage/references/validate-flow-node-config.md +12 -11
  178. package/skills/ae-engage/references/whitelist-list.md +4 -4
  179. package/skills/ae-engage/references/whitelist.md +1 -1
  180. package/skills/ae-engage/references/workbench-workbench.md +1 -1
  181. package/skills/ae-experiment/SKILL.md +30 -20
  182. package/skills/ae-experiment/references/batch_delete_experiment.md +4 -4
  183. package/skills/ae-experiment/references/batch_delete_feature.md +3 -3
  184. package/skills/ae-experiment/references/batch_delete_traffic_layer.md +4 -4
  185. package/skills/ae-experiment/references/cancel_experiment_query_by_request_id.md +5 -4
  186. package/skills/ae-experiment/references/check_experiment_ready.md +7 -5
  187. package/skills/ae-experiment/references/check_experiment_traffic_layer_conflict.md +37 -0
  188. package/skills/ae-experiment/references/delete_metric.md +4 -4
  189. package/skills/ae-experiment/references/manage_experiment.md +8 -6
  190. package/skills/ae-experiment/references/manage_feature_status.md +3 -3
  191. package/skills/ae-experiment/references/query_bucket_list.md +5 -3
  192. package/skills/ae-experiment/references/query_experiment_detail.md +6 -4
  193. package/skills/ae-experiment/references/query_experiment_list.md +12 -4
  194. package/skills/ae-experiment/references/query_experiment_list_archived.md +15 -0
  195. package/skills/ae-experiment/references/query_experiment_metric_trend.md +6 -10
  196. package/skills/ae-experiment/references/query_experiment_operation_log.md +17 -0
  197. package/skills/ae-experiment/references/query_experiment_report_summary.md +5 -6
  198. package/skills/ae-experiment/references/query_experiment_sample_size_report.md +6 -10
  199. package/skills/ae-experiment/references/query_feature_detail.md +6 -4
  200. package/skills/ae-experiment/references/query_feature_list.md +5 -3
  201. package/skills/ae-experiment/references/query_feature_operation_log.md +19 -0
  202. package/skills/ae-experiment/references/query_feature_version_list.md +20 -0
  203. package/skills/ae-experiment/references/query_metric_detail.md +6 -4
  204. package/skills/ae-experiment/references/query_metric_list.md +5 -3
  205. package/skills/ae-experiment/references/query_traffic_layer_detail.md +6 -4
  206. package/skills/ae-experiment/references/query_traffic_layer_list.md +5 -3
  207. package/skills/ae-experiment/references/save_experiment.md +148 -9
  208. package/skills/ae-experiment/references/save_feature.md +3 -3
  209. package/skills/ae-experiment/references/save_metric.md +3 -3
  210. package/skills/ae-experiment/references/save_submit_experiment.md +6 -6
  211. package/skills/ae-experiment/references/save_traffic_layer.md +3 -3
  212. package/skills/ae-experiment/references/update_experiment_group.md +20 -0
  213. package/skills/ae-generate-tracking-code/SKILL.md +4 -4
  214. package/skills/ae-generate-tracking-plan/SKILL.md +132 -11
  215. package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +98 -33
  216. package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +16 -14
  217. package/skills/ae-kb/SKILL.md +11 -6
  218. package/skills/ae-metadata/SKILL.md +2 -1
  219. package/skills/ae-team/SKILL.md +2 -1
  220. package/dist/chunk-NOO24N7W.js +0 -11
  221. package/dist/chunk-TNW2CI4W.js +0 -129
  222. package/dist/te-community-PEZ2VEF7.js +0 -687
  223. package/dist/te-community-TSKJ652U.js +0 -687
  224. package/dist/te-experiment-JINSMHMW.js +0 -606
  225. package/dist/te-experiment-NWNQHJS5.js +0 -606
  226. package/skills/ae-engage/references/config-channel-detail.md +0 -31
  227. package/skills/ae-engage/references/config-channel-list.md +0 -26
  228. package/skills/ae-engage/references/config-item-detail.md +0 -29
  229. package/skills/ae-engage/references/config-item-list.md +0 -18
  230. package/skills/ae-engage/references/copy-config-template.md +0 -28
  231. package/skills/ae-engage/references/delete-config-channel.md +0 -23
  232. package/skills/ae-engage/references/delete-config-item.md +0 -24
  233. package/skills/ae-engage/references/engage-scene-config-item.md +0 -69
  234. package/skills/ae-engage/references/manage-strategy.md +0 -73
  235. package/skills/ae-engage/references/strategy-detail.md +0 -72
  236. package/skills/ae-engage/references/strategy-list.md +0 -20
  237. package/skills/ae-engage/references/update-config-channel-status.md +0 -31
package/README.md CHANGED
@@ -52,7 +52,8 @@ ae-cli kb +add --name engineering-handbook --files '["./docs/guide.md","https://
52
52
  ae-cli kb +schema --name engineering-handbook
53
53
  ae-cli kb +compile --name engineering-handbook
54
54
  ae-cli kb +query -q "How to configure sandbox?" \
55
- --sources '[{"scope":"company","name":"engineering-handbook"}]'
55
+ --sources '[{"scope":"company","name":"engineering-handbook"}]' \
56
+ --top-k 10
56
57
 
57
58
  # Retrieval primitives for external agents (read index → grep → read page)
58
59
  ae-cli kb +index --sources '[{"scope":"company","name":"engineering-handbook"}]'
@@ -107,7 +108,7 @@ Knowledge base lifecycle (`+new` → `+add` → `+schema` → `+compile` → `+s
107
108
  - **Schema** (`+schema`): `--name`, optional `--force`, `--model`
108
109
  - **Compile** (`+compile`): `--name`, `--mode incremental|full` (default: incremental)
109
110
  - **Status** (`+status`): `--name`
110
- - **Query** (`+query`): `--query` / `-q`, `--sources` JSON refs e.g. `[{"scope":"company","name":"engineering-handbook"}]`
111
+ - **Query** (`+query`): `--query` / `-q`, optional `--sources` JSON refs (omit to search all accessible KBs), `--top-k` (1-50, default 10), `--locale`
111
112
  - **Remove source** (`+rm-source`): `--name`, `--display-name`
112
113
  - **Remove KB** (`+remove`): `--name`
113
114
 
package/README.zh.md CHANGED
@@ -52,7 +52,8 @@ ae-cli kb +add --name engineering-handbook --files '["./docs/guide.md","https://
52
52
  ae-cli kb +schema --name engineering-handbook
53
53
  ae-cli kb +compile --name engineering-handbook
54
54
  ae-cli kb +query -q "如何配置 sandbox 容器?" \
55
- --sources '[{"scope":"company","name":"engineering-handbook"}]'
55
+ --sources '[{"scope":"company","name":"engineering-handbook"}]' \
56
+ --top-k 10
56
57
 
57
58
  # 面向外部 agent 的检索原语(读 index → grep 定位 → read 翻页)
58
59
  ae-cli kb +index --sources '[{"scope":"company","name":"engineering-handbook"}]'
@@ -108,7 +109,7 @@ ae-cli auth logout
108
109
  - **生成 schema** (`+schema`):`--name`,可选 `--force`、`--model`
109
110
  - **编译** (`+compile`):`--name`,`--mode incremental|full`(默认 incremental)
110
111
  - **查询状态** (`+status`):`--name`
111
- - **查询** (`+query`):`--query` / `-q`,`--sources` JSON 引用,如 `[{"scope":"company","name":"engineering-handbook"}]`
112
+ - **查询** (`+query`):`--query` / `-q`,可选 `--sources` JSON 引用(省略则搜索全部可访问知识库)、`--top-k`(1-50,默认 10)、`--locale`
112
113
  - **删除源** (`+rm-source`):`--name`,`--display-name`
113
114
  - **删除知识库** (`+remove`):`--name`
114
115
 
@@ -3,8 +3,9 @@ import {
3
3
  invalidateAccessTokenForRetry,
4
4
  resolveHost,
5
5
  validateToken
6
- } from "./chunk-AJTH7LT3.js";
7
- import "./chunk-YCLVYFK7.js";
6
+ } from "./chunk-IR4ZLVPW.js";
7
+ import "./chunk-V6FR6WTW.js";
8
+ import "./chunk-LYVNONC4.js";
8
9
  export {
9
10
  getToken,
10
11
  invalidateAccessTokenForRetry,
@@ -1,25 +1,31 @@
1
+ import {
2
+ getLocalCliPackageInfo
3
+ } from "./chunk-VTWMIC5L.js";
1
4
  import {
2
5
  printError,
3
- printOutput
4
- } from "./chunk-TNW2CI4W.js";
6
+ printOutput,
7
+ runHostCompatCheck
8
+ } from "./chunk-IMMGMU54.js";
5
9
  import {
6
10
  clearCliToken,
7
11
  mintCliToken
8
- } from "./chunk-2NDGFQHW.js";
12
+ } from "./chunk-E7UXXHO3.js";
9
13
  import {
10
14
  clear,
11
15
  load,
12
16
  resolveHost,
13
17
  save
14
- } from "./chunk-AJTH7LT3.js";
18
+ } from "./chunk-IR4ZLVPW.js";
15
19
  import {
16
20
  getFallbackCliToken,
17
21
  loadConfig,
18
- logger,
19
22
  normalizeUrl,
20
23
  removeHost,
21
24
  saveConfig
22
- } from "./chunk-YCLVYFK7.js";
25
+ } from "./chunk-V6FR6WTW.js";
26
+ import {
27
+ logger
28
+ } from "./chunk-LYVNONC4.js";
23
29
 
24
30
  // src/core/device-auth.ts
25
31
  import { execFileSync } from "child_process";
@@ -257,6 +263,7 @@ async function persistDeviceTokens(host, tokens) {
257
263
  accessExpiresAt: expiresAt
258
264
  });
259
265
  await mintCliToken(host);
266
+ await runHostCompatCheck(getLocalCliPackageInfo(), host);
260
267
  }
261
268
  function loginSummary(host, tokens) {
262
269
  return {
@@ -12,22 +12,23 @@ import {
12
12
  inspectCapability,
13
13
  listCapabilities,
14
14
  validateCapability
15
- } from "./chunk-DYOS6YY7.js";
15
+ } from "./chunk-HQ2A7ITL.js";
16
16
  import {
17
17
  printError,
18
18
  printOutput
19
- } from "./chunk-TNW2CI4W.js";
20
- import {
21
- PermissionError
22
- } from "./chunk-NOO24N7W.js";
23
- import "./chunk-2NDGFQHW.js";
19
+ } from "./chunk-IMMGMU54.js";
20
+ import "./chunk-E7UXXHO3.js";
24
21
  import {
25
22
  SecureStoreAuthError,
26
23
  resolveHost
27
- } from "./chunk-AJTH7LT3.js";
24
+ } from "./chunk-IR4ZLVPW.js";
28
25
  import {
29
26
  safeJsonParse
30
- } from "./chunk-YCLVYFK7.js";
27
+ } from "./chunk-V6FR6WTW.js";
28
+ import {
29
+ PermissionError
30
+ } from "./chunk-24BAVOX3.js";
31
+ import "./chunk-LYVNONC4.js";
31
32
 
32
33
  // src/commands/capability/index.ts
33
34
  import * as readline from "readline";
@@ -55,6 +56,26 @@ function resolveCapabilityGatewayDomain(capabilityId, domainOverride) {
55
56
  }
56
57
  return findGatewayDomain(cliDomain) ?? cliDomain;
57
58
  }
59
+ function parseOptionalProjectId(raw) {
60
+ if (raw === void 0) {
61
+ return void 0;
62
+ }
63
+ const value = raw.trim();
64
+ if (!/^[1-9]\d*$/.test(value)) {
65
+ throw new CapabilityCommandValidationError(
66
+ "--project-id must be a positive integer.",
67
+ "Example: --project-id 1"
68
+ );
69
+ }
70
+ const projectId = Number(value);
71
+ if (!Number.isSafeInteger(projectId)) {
72
+ throw new CapabilityCommandValidationError(
73
+ "--project-id is outside the supported integer range.",
74
+ "Pass a positive safe integer."
75
+ );
76
+ }
77
+ return projectId;
78
+ }
58
79
  function normalizeCapabilityList(value) {
59
80
  if (!Array.isArray(value)) {
60
81
  throw new Error("Capability gateway returned an invalid catalog: expected an array.");
@@ -114,28 +135,39 @@ function registerCapability(program) {
114
135
  printError("validation", "Missing subcommand.", "Run: ae-cli capability --help");
115
136
  process.exitCode = 1;
116
137
  });
117
- capability.command("list").description("List capability summaries in a domain").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").action(async (opts) => {
138
+ capability.command("list").description("List capability summaries in a domain").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (opts) => {
118
139
  await executeAndPrint(program, async (host) => {
119
140
  const gatewayDomain = findGatewayDomain(opts.domain) ?? opts.domain;
120
- const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain));
141
+ const projectId = parseOptionalProjectId(opts.projectId);
142
+ const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain, projectId));
121
143
  const capabilities = filterCapabilities(catalog, opts.domain);
122
144
  return { domain: opts.domain, count: capabilities.length, capabilities };
123
145
  });
124
- }).addHelpText("after", "\nExample:\n ae-cli capability list --domain analysis");
125
- capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").action(async (query, opts) => {
146
+ }).addHelpText(
147
+ "after",
148
+ "\nExamples:\n ae-cli capability list --domain analysis\n ae-cli capability list --domain analysis --project-id 1"
149
+ );
150
+ capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (query, opts) => {
126
151
  await executeAndPrint(program, async (host) => {
127
152
  const gatewayDomain = findGatewayDomain(opts.domain) ?? opts.domain;
128
- const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain));
153
+ const projectId = parseOptionalProjectId(opts.projectId);
154
+ const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain, projectId));
129
155
  const capabilities = filterCapabilities(catalog, opts.domain, query);
130
156
  return { domain: opts.domain, query, count: capabilities.length, capabilities };
131
157
  });
132
- }).addHelpText("after", '\nExample:\n ae-cli capability search "dashboard list" --domain analysis');
133
- capability.command("inspect").description("Inspect one capability schema, risk, auth, and output metadata").argument("<capability-id>", "Capability ID, such as analysis.report.list").option("--domain <domain>", "Override the capability namespace used for gateway routing").action(async (capabilityId, opts) => {
158
+ }).addHelpText(
159
+ "after",
160
+ '\nExamples:\n ae-cli capability search "dashboard list" --domain analysis\n ae-cli capability search "dashboard list" --domain analysis --project-id 1'
161
+ );
162
+ capability.command("inspect").description("Inspect one capability schema, risk, auth, and output metadata").argument("<capability-id>", "Capability ID, such as analysis.report.list").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--project-id <project-id>", "Check availability in a project before returning metadata").action(async (capabilityId, opts) => {
134
163
  await executeAndPrint(program, async (host) => {
135
164
  const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
136
- return inspectCapability(host, gatewayDomain, capabilityId);
165
+ return inspectCapability(host, gatewayDomain, capabilityId, parseOptionalProjectId(opts.projectId));
137
166
  });
138
- }).addHelpText("after", "\nExample:\n ae-cli capability inspect analysis.dashboard.list");
167
+ }).addHelpText(
168
+ "after",
169
+ "\nExamples:\n ae-cli capability inspect analysis.dashboard.list\n ae-cli capability inspect analysis.dashboard.list --project-id 1"
170
+ );
139
171
  capability.command("validate").description(
140
172
  "Validate and normalize capability input only (schema/params). Does not execute business logic. Use when crafting complex payloads (nested objects, qp, share/member payloads) before dry-run/run. Success data: valid, capability_id, normalized_input. Unlike dry-run, does not return risk/output_mode/supports_cancel preview."
141
173
  ).argument("<capability-id>", "Capability ID, such as metadata.data_table.sql_write").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--input <json-or-path>", "Input JSON object, file path, @<path>, or - for stdin").action(async (capabilityId, opts) => {
@@ -12,22 +12,23 @@ import {
12
12
  inspectCapability,
13
13
  listCapabilities,
14
14
  validateCapability
15
- } from "./chunk-I4A62X3N.js";
15
+ } from "./chunk-RGXCNC4N.js";
16
16
  import {
17
17
  printError,
18
18
  printOutput
19
- } from "./chunk-TNW2CI4W.js";
20
- import {
21
- PermissionError
22
- } from "./chunk-NOO24N7W.js";
23
- import "./chunk-2NDGFQHW.js";
19
+ } from "./chunk-IMMGMU54.js";
20
+ import "./chunk-E7UXXHO3.js";
24
21
  import {
25
22
  SecureStoreAuthError,
26
23
  resolveHost
27
- } from "./chunk-AJTH7LT3.js";
24
+ } from "./chunk-IR4ZLVPW.js";
28
25
  import {
29
26
  safeJsonParse
30
- } from "./chunk-YCLVYFK7.js";
27
+ } from "./chunk-V6FR6WTW.js";
28
+ import {
29
+ PermissionError
30
+ } from "./chunk-24BAVOX3.js";
31
+ import "./chunk-LYVNONC4.js";
31
32
 
32
33
  // src/commands/capability/index.ts
33
34
  import * as readline from "readline";
@@ -55,6 +56,26 @@ function resolveCapabilityGatewayDomain(capabilityId, domainOverride) {
55
56
  }
56
57
  return findGatewayDomain(cliDomain) ?? cliDomain;
57
58
  }
59
+ function parseOptionalProjectId(raw) {
60
+ if (raw === void 0) {
61
+ return void 0;
62
+ }
63
+ const value = raw.trim();
64
+ if (!/^[1-9]\d*$/.test(value)) {
65
+ throw new CapabilityCommandValidationError(
66
+ "--project-id must be a positive integer.",
67
+ "Example: --project-id 1"
68
+ );
69
+ }
70
+ const projectId = Number(value);
71
+ if (!Number.isSafeInteger(projectId)) {
72
+ throw new CapabilityCommandValidationError(
73
+ "--project-id is outside the supported integer range.",
74
+ "Pass a positive safe integer."
75
+ );
76
+ }
77
+ return projectId;
78
+ }
58
79
  function normalizeCapabilityList(value) {
59
80
  if (!Array.isArray(value)) {
60
81
  throw new Error("Capability gateway returned an invalid catalog: expected an array.");
@@ -114,28 +135,39 @@ function registerCapability(program) {
114
135
  printError("validation", "Missing subcommand.", "Run: ae-cli capability --help");
115
136
  process.exitCode = 1;
116
137
  });
117
- capability.command("list").description("List capability summaries in a domain").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").action(async (opts) => {
138
+ capability.command("list").description("List capability summaries in a domain").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (opts) => {
118
139
  await executeAndPrint(program, async (host) => {
119
140
  const gatewayDomain = findGatewayDomain(opts.domain) ?? opts.domain;
120
- const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain));
141
+ const projectId = parseOptionalProjectId(opts.projectId);
142
+ const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain, projectId));
121
143
  const capabilities = filterCapabilities(catalog, opts.domain);
122
144
  return { domain: opts.domain, count: capabilities.length, capabilities };
123
145
  });
124
- }).addHelpText("after", "\nExample:\n ae-cli capability list --domain analysis");
125
- capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").action(async (query, opts) => {
146
+ }).addHelpText(
147
+ "after",
148
+ "\nExamples:\n ae-cli capability list --domain analysis\n ae-cli capability list --domain analysis --project-id 1"
149
+ );
150
+ capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (query, opts) => {
126
151
  await executeAndPrint(program, async (host) => {
127
152
  const gatewayDomain = findGatewayDomain(opts.domain) ?? opts.domain;
128
- const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain));
153
+ const projectId = parseOptionalProjectId(opts.projectId);
154
+ const catalog = normalizeCapabilityList(await listCapabilities(host, gatewayDomain, projectId));
129
155
  const capabilities = filterCapabilities(catalog, opts.domain, query);
130
156
  return { domain: opts.domain, query, count: capabilities.length, capabilities };
131
157
  });
132
- }).addHelpText("after", '\nExample:\n ae-cli capability search "dashboard list" --domain analysis');
133
- capability.command("inspect").description("Inspect one capability schema, risk, auth, and output metadata").argument("<capability-id>", "Capability ID, such as analysis.report.list").option("--domain <domain>", "Override the capability namespace used for gateway routing").action(async (capabilityId, opts) => {
158
+ }).addHelpText(
159
+ "after",
160
+ '\nExamples:\n ae-cli capability search "dashboard list" --domain analysis\n ae-cli capability search "dashboard list" --domain analysis --project-id 1'
161
+ );
162
+ capability.command("inspect").description("Inspect one capability schema, risk, auth, and output metadata").argument("<capability-id>", "Capability ID, such as analysis.report.list").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--project-id <project-id>", "Check availability in a project before returning metadata").action(async (capabilityId, opts) => {
134
163
  await executeAndPrint(program, async (host) => {
135
164
  const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
136
- return inspectCapability(host, gatewayDomain, capabilityId);
165
+ return inspectCapability(host, gatewayDomain, capabilityId, parseOptionalProjectId(opts.projectId));
137
166
  });
138
- }).addHelpText("after", "\nExample:\n ae-cli capability inspect analysis.dashboard.list");
167
+ }).addHelpText(
168
+ "after",
169
+ "\nExamples:\n ae-cli capability inspect analysis.dashboard.list\n ae-cli capability inspect analysis.dashboard.list --project-id 1"
170
+ );
139
171
  capability.command("validate").description(
140
172
  "Validate and normalize capability input only (schema/params). Does not execute business logic. Use when crafting complex payloads (nested objects, qp, share/member payloads) before dry-run/run. Success data: valid, capability_id, normalized_input. Unlike dry-run, does not return risk/output_mode/supports_cancel preview."
141
173
  ).argument("<capability-id>", "Capability ID, such as metadata.data_table.sql_write").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--input <json-or-path>", "Input JSON object, file path, @<path>, or - for stdin").action(async (capabilityId, opts) => {
@@ -0,0 +1,51 @@
1
+ // src/core/errors.ts
2
+ var PermissionError = class extends Error {
3
+ constructor(message) {
4
+ super(message);
5
+ this.name = "PermissionError";
6
+ }
7
+ };
8
+ var CliValidationError = class extends Error {
9
+ code;
10
+ hint;
11
+ location;
12
+ constructor(message, options = {}) {
13
+ super(message);
14
+ this.name = "CliValidationError";
15
+ this.code = options.code;
16
+ this.hint = options.hint;
17
+ if (options.location) {
18
+ const location = {};
19
+ if (typeof options.location.segment === "number" && Number.isFinite(options.location.segment)) {
20
+ location.segment = options.location.segment;
21
+ }
22
+ if (typeof options.location.record === "number" && Number.isFinite(options.location.record)) {
23
+ location.record = options.location.record;
24
+ }
25
+ if (typeof options.location.field === "string" && options.location.field.length > 0) {
26
+ location.field = options.location.field;
27
+ }
28
+ if (Object.keys(location).length > 0) this.location = location;
29
+ }
30
+ }
31
+ };
32
+ var CommunityReportError = class extends Error {
33
+ code;
34
+ httpStatus;
35
+ hint;
36
+ meta;
37
+ constructor(message, options = {}) {
38
+ super(message, options.cause === void 0 ? void 0 : { cause: options.cause });
39
+ this.name = "CommunityReportError";
40
+ this.code = options.code;
41
+ this.httpStatus = options.httpStatus;
42
+ this.hint = options.hint;
43
+ this.meta = options.meta;
44
+ }
45
+ };
46
+
47
+ export {
48
+ PermissionError,
49
+ CliValidationError,
50
+ CommunityReportError
51
+ };
@@ -1,12 +1,12 @@
1
- import {
2
- PermissionError
3
- } from "./chunk-NOO24N7W.js";
4
1
  import {
5
2
  getCliToken
6
- } from "./chunk-2NDGFQHW.js";
3
+ } from "./chunk-E7UXXHO3.js";
7
4
  import {
8
5
  safeJsonParse
9
- } from "./chunk-YCLVYFK7.js";
6
+ } from "./chunk-V6FR6WTW.js";
7
+ import {
8
+ PermissionError
9
+ } from "./chunk-24BAVOX3.js";
10
10
 
11
11
  // src/core/mcp-access.ts
12
12
  function buildUrl(host, path, params = {}) {
@@ -1,18 +1,20 @@
1
1
  import {
2
2
  getAnalysisMappingPathForClusterMode
3
- } from "./chunk-KGJQCYVC.js";
4
- import {
5
- PermissionError
6
- } from "./chunk-NOO24N7W.js";
3
+ } from "./chunk-LCXU3AAT.js";
7
4
  import {
8
5
  clearCliToken,
9
6
  getCliToken
10
- } from "./chunk-2NDGFQHW.js";
7
+ } from "./chunk-E7UXXHO3.js";
11
8
  import {
12
9
  getActiveHost,
13
- logger,
14
10
  safeJsonParse
15
- } from "./chunk-YCLVYFK7.js";
11
+ } from "./chunk-V6FR6WTW.js";
12
+ import {
13
+ PermissionError
14
+ } from "./chunk-24BAVOX3.js";
15
+ import {
16
+ logger
17
+ } from "./chunk-LYVNONC4.js";
16
18
 
17
19
  // src/core/mcp.ts
18
20
  async function permissionMessage(resp) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getActiveHost,
3
3
  getSandboxRuntimeRoot
4
- } from "./chunk-YCLVYFK7.js";
4
+ } from "./chunk-V6FR6WTW.js";
5
5
 
6
6
  // src/core/te-agent-credentials.ts
7
7
  import { readFileSync } from "fs";
@@ -147,8 +147,8 @@ async function signRequest(method, path, rawBody) {
147
147
  rawBody
148
148
  };
149
149
  }
150
- const { getToken } = await import("./auth-MEJ642P4.js");
151
- const { getCliToken } = await import("./cli-token-TVQRSE46.js");
150
+ const { getToken } = await import("./auth-ENM3FE6L.js");
151
+ const { getCliToken } = await import("./cli-token-4SBMXAUK.js");
152
152
  const baseUrl = sandboxCred?.url || teClaudeBaseFromActiveHost();
153
153
  const hostForToken = getActiveHost() || baseUrl;
154
154
  if (!baseUrl) {
@@ -338,7 +338,7 @@ async function uploadToMainApp(path, formData) {
338
338
  "X-Sandbox-Secret-Key": sandboxCred.sandboxSecretKey
339
339
  };
340
340
  } else {
341
- const { getToken } = await import("./auth-MEJ642P4.js");
341
+ const { getToken } = await import("./auth-ENM3FE6L.js");
342
342
  baseUrl = (sandboxCred?.url || teClaudeBaseFromActiveHost() || "").replace(/\/$/, "");
343
343
  if (!baseUrl) {
344
344
  throw new TeAgentCredentialsError(
@@ -5,10 +5,10 @@ import {
5
5
  dryRunCapability,
6
6
  executeCapabilityWithEnvelope,
7
7
  validateCapability
8
- } from "./chunk-DYOS6YY7.js";
8
+ } from "./chunk-RGXCNC4N.js";
9
9
  import {
10
10
  withOutputMetadata
11
- } from "./chunk-TNW2CI4W.js";
11
+ } from "./chunk-IMMGMU54.js";
12
12
 
13
13
  // src/core/capability-command.ts
14
14
  import { randomBytes } from "crypto";
@@ -1,18 +1,20 @@
1
1
  import {
2
2
  getAnalysisMappingPathForClusterMode
3
- } from "./chunk-KGJQCYVC.js";
4
- import {
5
- PermissionError
6
- } from "./chunk-NOO24N7W.js";
3
+ } from "./chunk-LCXU3AAT.js";
7
4
  import {
8
5
  clearCliToken,
9
6
  getCliToken
10
- } from "./chunk-2NDGFQHW.js";
7
+ } from "./chunk-E7UXXHO3.js";
11
8
  import {
12
9
  getActiveHost,
13
- logger,
14
10
  safeJsonParse
15
- } from "./chunk-YCLVYFK7.js";
11
+ } from "./chunk-V6FR6WTW.js";
12
+ import {
13
+ PermissionError
14
+ } from "./chunk-24BAVOX3.js";
15
+ import {
16
+ logger
17
+ } from "./chunk-LYVNONC4.js";
16
18
 
17
19
  // src/core/mcp.ts
18
20
  async function permissionMessage(resp) {
@@ -3,11 +3,13 @@ import {
3
3
  getToken,
4
4
  invalidateAccessTokenForRetry,
5
5
  resolveHost
6
- } from "./chunk-AJTH7LT3.js";
6
+ } from "./chunk-IR4ZLVPW.js";
7
7
  import {
8
- logger,
9
8
  safeJsonParse
10
- } from "./chunk-YCLVYFK7.js";
9
+ } from "./chunk-V6FR6WTW.js";
10
+ import {
11
+ logger
12
+ } from "./chunk-LYVNONC4.js";
11
13
 
12
14
  // src/core/client.ts
13
15
  import WebSocket from "ws";
@@ -3,17 +3,19 @@ import {
3
3
  load,
4
4
  loadCliToken,
5
5
  save
6
- } from "./chunk-AJTH7LT3.js";
6
+ } from "./chunk-IR4ZLVPW.js";
7
7
  import {
8
8
  getActiveHost,
9
9
  getConfigDir,
10
10
  getFallbackCliToken,
11
11
  listHosts,
12
- logger,
13
12
  normalizeUrl,
14
13
  safeJsonParse,
15
14
  safeReadJsonFile
16
- } from "./chunk-YCLVYFK7.js";
15
+ } from "./chunk-V6FR6WTW.js";
16
+ import {
17
+ logger
18
+ } from "./chunk-LYVNONC4.js";
17
19
 
18
20
  // src/core/cli-token.ts
19
21
  import fs from "fs";
@@ -125,6 +127,11 @@ function clearPersistedCliToken(hostUrl) {
125
127
  save(hostUrl, { ...existing, cliToken: void 0 });
126
128
  }
127
129
  }
130
+ function peekCliToken(hostOverride) {
131
+ const hostUrl = hostOverride || getActiveHost();
132
+ if (!hostUrl) return void 0;
133
+ return _cliTokenCache.get(hostUrl) || loadCliToken(hostUrl) || getFallbackCliToken(hostUrl) || void 0;
134
+ }
128
135
  async function getCliToken(hostOverride) {
129
136
  const hostUrl = hostOverride || getActiveHost();
130
137
  let token = _cliTokenCache.get(hostUrl);
@@ -182,6 +189,7 @@ function _resetRenewMemoryForTest() {
182
189
 
183
190
  export {
184
191
  localRenewDate,
192
+ peekCliToken,
185
193
  getCliToken,
186
194
  mintCliToken,
187
195
  clearCliToken,
@@ -1,14 +1,16 @@
1
- import {
2
- PermissionError
3
- } from "./chunk-NOO24N7W.js";
4
1
  import {
5
2
  clearCliToken,
6
3
  getCliToken
7
- } from "./chunk-2NDGFQHW.js";
4
+ } from "./chunk-E7UXXHO3.js";
8
5
  import {
9
- logger,
10
6
  safeJsonParse
11
- } from "./chunk-YCLVYFK7.js";
7
+ } from "./chunk-V6FR6WTW.js";
8
+ import {
9
+ PermissionError
10
+ } from "./chunk-24BAVOX3.js";
11
+ import {
12
+ logger
13
+ } from "./chunk-LYVNONC4.js";
12
14
 
13
15
  // src/core/capability-api.ts
14
16
  import { readFile } from "fs/promises";
@@ -145,11 +147,11 @@ async function requestMultipartOnce(url, token, form) {
145
147
  body: form
146
148
  });
147
149
  }
148
- async function callGateway(host, domain, pathAfterV1, method, body) {
149
- return (await callGatewayWithEnvelope(host, domain, pathAfterV1, method, body)).data;
150
+ async function callGateway(host, domain, pathAfterV1, method, body, queryParams = {}) {
151
+ return (await callGatewayWithEnvelope(host, domain, pathAfterV1, method, body, queryParams)).data;
150
152
  }
151
- async function callGatewayWithEnvelope(host, domain, pathAfterV1, method, body) {
152
- const url = buildCapabilityGatewayUrl(host, domain, pathAfterV1);
153
+ async function callGatewayWithEnvelope(host, domain, pathAfterV1, method, body, queryParams = {}) {
154
+ const url = buildCapabilityGatewayUrl(host, domain, pathAfterV1, queryParams);
153
155
  const token = await getCliToken(host);
154
156
  let resp = await requestOnce(url, method, token, body);
155
157
  let permissionMsg;
@@ -210,11 +212,18 @@ async function requestCapabilityGatewayWithEnvelope(host, domain, pathAfterV1, m
210
212
  const resp = await fetchCapabilityGateway(host, domain, pathAfterV1, method, body);
211
213
  return parseCapabilityEnvelope(parseCapabilityResponse(await resp.text()));
212
214
  }
213
- async function listCapabilities(host, domain) {
214
- return callGateway(host, domain, "capabilities", "GET");
215
+ async function listCapabilities(host, domain, projectId) {
216
+ return callGateway(host, domain, "capabilities", "GET", void 0, { project_id: projectId });
215
217
  }
216
- async function inspectCapability(host, domain, capabilityId) {
217
- return callGateway(host, domain, `capabilities/${capabilityId}`, "GET");
218
+ async function inspectCapability(host, domain, capabilityId, projectId) {
219
+ return callGateway(
220
+ host,
221
+ domain,
222
+ `capabilities/${capabilityId}`,
223
+ "GET",
224
+ void 0,
225
+ { project_id: projectId }
226
+ );
218
227
  }
219
228
  async function executeCapability(host, domain, capabilityId, input = {}) {
220
229
  return callGateway(host, domain, `capabilities/${capabilityId}/execute`, "POST", { input });