@thinkingai/ae-cli 6.1.13 → 6.1.16

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 (110) hide show
  1. package/dist/{auth-GBMV6TEJ.js → auth-2WTQOP77.js} +3 -3
  2. package/dist/{auth-NDSXE54J.js → auth-77BUFLGC.js} +57 -13
  3. package/dist/{capability-TAMDRZYV.js → capability-72DTW5M2.js} +9 -9
  4. package/dist/{capability-U7TDEEEG.js → capability-PJHNI4GJ.js} +9 -9
  5. package/dist/{chunk-AFXA7BRK.js → chunk-4KVPKXFX.js} +5 -5
  6. package/dist/chunk-4SGZG4XY.js +311 -0
  7. package/dist/chunk-6EIJSNBD.js +8 -0
  8. package/dist/chunk-C4MGVGJW.js +13 -0
  9. package/dist/{chunk-WZRX4KOH.js → chunk-GT46FPXN.js} +4 -6
  10. package/dist/{chunk-5XUSIK27.js → chunk-ILIU36SU.js} +10 -7
  11. package/dist/{chunk-JHENBQ5B.js → chunk-LYVNONC4.js} +0 -35
  12. package/dist/{chunk-JUW4AJXN.js → chunk-P3FGXJTU.js} +12 -7
  13. package/dist/chunk-QGM4M3NI.js +37 -0
  14. package/dist/{chunk-753BUTNZ.js → chunk-RGKJGKT7.js} +2 -2
  15. package/dist/{chunk-UIHQJK5E.js → chunk-SAU3QFIQ.js} +3 -3
  16. package/dist/{chunk-VLWOLBGZ.js → chunk-UOUS37JQ.js} +149 -161
  17. package/dist/{chunk-AXDXJTPC.js → chunk-UW5UN47B.js} +19 -2
  18. package/dist/chunk-VPKZ7I72.js +509 -0
  19. package/dist/{chunk-QATA32VR.js → chunk-VR3LCBHW.js} +2 -2
  20. package/dist/{chunk-IBH3LDAH.js → chunk-YA6SMTXG.js} +3 -3
  21. package/dist/chunk-ZZUOD757.js +598 -0
  22. package/dist/{client-L2YDMHQ6.js → client-TKG4WBHN.js} +4 -5
  23. package/dist/{community-report-client-M2RW4MXD.js → community-report-client-FI4LNVYS.js} +3 -2
  24. package/dist/{config-OL2LWGBV.js → config-RE6CMGPK.js} +7 -7
  25. package/dist/data-integration-2MYMANJI.js +3383 -0
  26. package/dist/index.js +68 -34
  27. package/dist/local-data-upload-client-BWHSUQQK.js +167 -0
  28. package/dist/{memory-MUP7PPL7.js → memory-CHRU2F7W.js} +7 -6
  29. package/dist/{memory-U4O5PMXH.js → memory-YK33G4T7.js} +7 -6
  30. package/dist/{metadata-UORZTW3T.js → metadata-UILXHBWF.js} +22 -18
  31. package/dist/{metadata-VVQ3AQT5.js → metadata-XXR34N5P.js} +22 -18
  32. package/dist/{model-JTUEO5M4.js → model-K3KLWIW6.js} +7 -3
  33. package/dist/model-NR3JHFSJ.js +139 -0
  34. package/dist/{sync-MOSFNBVR.js → sync-DAVKYVMW.js} +8 -6
  35. package/dist/sync-FCKOVWWS.js +10261 -0
  36. package/dist/{te-agent-IFKZDHZI.js → te-agent-4BKBODMF.js} +686 -71
  37. package/dist/te-agent-HLW4VTQK.js +3893 -0
  38. package/dist/{te-analysis-KOKHJJPE.js → te-analysis-O6DCO6BS.js} +84 -61
  39. package/dist/{te-analysis-LLOCCBJ4.js → te-analysis-ZMNGOVNW.js} +84 -61
  40. package/dist/{te-community-HNKVTERD.js → te-community-6HPBWJUZ.js} +24 -19
  41. package/dist/{te-community-IWE5B7W6.js → te-community-HLC43QKH.js} +24 -20
  42. package/dist/{te-dataops-KXCEB4CS.js → te-dataops-EJP56W3K.js} +57 -34
  43. package/dist/{te-dataops-KQPYNAE3.js → te-dataops-HDRUXY4K.js} +59 -34
  44. package/dist/{te-engage-BRLSRVQT.js → te-engage-FGBGQ4IY.js} +398 -12
  45. package/dist/{te-engage-HE4OPZIT.js → te-engage-RAK5PESW.js} +398 -12
  46. package/dist/{te-experiment-K5US7RMG.js → te-experiment-SO5MPDMJ.js} +9 -8
  47. package/dist/{te-experiment-WA7TFMEL.js → te-experiment-VZF7BT6G.js} +9 -8
  48. package/dist/{te-kb-OIH3T6CS.js → te-kb-APXBWBDY.js} +6 -6
  49. package/dist/{te-system-AZ3URMUO.js → te-system-YARIK4S5.js} +7 -4
  50. package/dist/te-system-Z77IKZFN.js +2213 -0
  51. package/dist/{te-team-GZPU6UWA.js → te-team-EFKWYKMK.js} +7 -7
  52. package/dist/{update-TOBFXF2V.js → update-OGPSZM5A.js} +7 -7
  53. package/package.json +13 -3
  54. package/skills/ae-agent/SKILL.md +21 -11
  55. package/skills/ae-agent/references/approval-effect.md +44 -0
  56. package/skills/ae-agent/references/approval-request.md +46 -0
  57. package/skills/ae-agent/references/approval-task.md +45 -0
  58. package/skills/ae-agent/references/approval-type.md +32 -0
  59. package/skills/ae-agent/references/command_index.md +19 -0
  60. package/skills/ae-analysis/SKILL.md +11 -7
  61. package/skills/ae-analysis/references/adhoc_run.md +2 -0
  62. package/skills/ae-analysis/references/ai_models.md +31 -1
  63. package/skills/ae-analysis/references/alert_list.md +2 -3
  64. package/skills/ae-analysis/references/analysis_gateway_assets.md +8 -7
  65. package/skills/ae-analysis/references/bi_panel_list.md +2 -2
  66. package/skills/ae-analysis/references/command_index.md +18 -15
  67. package/skills/ae-analysis/references/dashboard_get.md +8 -2
  68. package/skills/ae-analysis/references/dashboard_list.md +2 -2
  69. package/skills/ae-analysis/references/dashboard_report_data_run.md +3 -1
  70. package/skills/ae-analysis/references/dashboard_update.md +4 -1
  71. package/skills/ae-analysis/references/favorite_add.md +2 -2
  72. package/skills/ae-analysis/references/favorite_remove.md +2 -2
  73. package/skills/ae-analysis/references/metric_create.md +7 -8
  74. package/skills/ae-analysis/references/project_space_business_filter_upsert.md +17 -0
  75. package/skills/ae-analysis/references/project_space_list.md +2 -2
  76. package/skills/ae-analysis/references/public_link_list.md +2 -2
  77. package/skills/ae-analysis/references/report_list.md +3 -3
  78. package/skills/ae-analysis/references/report_list_export.md +2 -2
  79. package/skills/ae-analysis/references/sql_table_list.md +3 -2
  80. package/skills/ae-analysis/references/user_cluster_update.md +4 -2
  81. package/skills/ae-analysis/references/user_tag_models.md +4 -4
  82. package/skills/ae-analysis/references/user_tag_update.md +4 -2
  83. package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +3 -3
  84. package/skills/ae-data-integration/SKILL.md +54 -0
  85. package/skills/ae-data-integration/references/handoff.md +43 -0
  86. package/skills/ae-data-integration/references/local-analysis.md +27 -0
  87. package/skills/ae-data-integration/references/reuse.md +41 -0
  88. package/skills/ae-data-integration/references/sink-upload.md +58 -0
  89. package/skills/ae-data-integration/references/source-inspect.md +55 -0
  90. package/skills/ae-data-integration/references/sync-json-upload.md +60 -0
  91. package/skills/ae-data-integration/references/tracking-plan.md +35 -0
  92. package/skills/ae-data-integration/references/transform.md +65 -0
  93. package/skills/ae-data-integration/references/ue-mapping.md +142 -0
  94. package/skills/ae-data-integration/references/ue-routing.md +35 -0
  95. package/skills/ae-data-integration-helper/SKILL.md +1 -1
  96. package/skills/ae-dataops/SKILL.md +1 -1
  97. package/skills/ae-dataops/references/dataops-query.md +4 -4
  98. package/skills/ae-engage/SKILL.md +10 -2
  99. package/skills/ae-engage/references/flow-metric-user.md +2 -1
  100. package/skills/ae-engage/references/flow-node-metric-user.md +2 -1
  101. package/skills/ae-engage/references/flow-node-user.md +2 -1
  102. package/skills/ae-engage/references/task-indicator-user.md +104 -0
  103. package/skills/ae-engage/references/task-user-detail-export.md +31 -0
  104. package/skills/ae-generate-tracking-plan/SKILL.md +54 -3
  105. package/skills/ae-metadata/SKILL.md +0 -1
  106. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
  107. package/dist/chunk-3FY3RJ26.js +0 -293
  108. package/dist/chunk-S5NTSDBS.js +0 -198
  109. package/dist/chunk-ZQKDZXDO.js +0 -317
  110. package/dist/cli-token-4UPER74P.js +0 -21
@@ -6,17 +6,17 @@ import {
6
6
  waitForAnalysisRun,
7
7
  withAsyncArtifactLifecycle,
8
8
  withInterruptSignal
9
- } from "./chunk-UIHQJK5E.js";
9
+ } from "./chunk-SAU3QFIQ.js";
10
10
  import {
11
11
  createCapabilityCommand
12
- } from "./chunk-753BUTNZ.js";
12
+ } from "./chunk-RGKJGKT7.js";
13
13
  import {
14
14
  registerCapabilityGatewayRoute,
15
15
  resolveGatewayDomain
16
16
  } from "./chunk-PTE56QPL.js";
17
17
  import {
18
18
  withOutputMetadata
19
- } from "./chunk-WZRX4KOH.js";
19
+ } from "./chunk-GT46FPXN.js";
20
20
  import {
21
21
  CapabilityGatewayError,
22
22
  buildCapabilityGatewayUrl,
@@ -27,16 +27,17 @@ import {
27
27
  requestCapabilityGatewayWithEnvelope,
28
28
  uploadInputFile,
29
29
  validateCapability
30
- } from "./chunk-5XUSIK27.js";
30
+ } from "./chunk-P3FGXJTU.js";
31
+ import "./chunk-C4MGVGJW.js";
31
32
  import {
32
33
  getCliToken
33
- } from "./chunk-S5NTSDBS.js";
34
- import "./chunk-ZQKDZXDO.js";
35
- import "./chunk-3FY3RJ26.js";
34
+ } from "./chunk-4SGZG4XY.js";
35
+ import "./chunk-ZZUOD757.js";
36
36
  import {
37
37
  CliValidationError
38
- } from "./chunk-AXDXJTPC.js";
39
- import "./chunk-JHENBQ5B.js";
38
+ } from "./chunk-UW5UN47B.js";
39
+ import "./chunk-LYVNONC4.js";
40
+ import "./chunk-QGM4M3NI.js";
40
41
 
41
42
  // src/commands/te-analysis/capability-shared.ts
42
43
  var ANALYSIS_GATEWAY_CLI_SERVICES = /* @__PURE__ */ new Set(["project", "system"]);
@@ -258,7 +259,7 @@ function projectInput(ctx) {
258
259
  function listInput(ctx) {
259
260
  return compactInput({
260
261
  ...projectInput(ctx),
261
- query: optionalString(ctx, "query"),
262
+ queries: optionalJson(ctx, "queries"),
262
263
  fields: optionalJson(ctx, "fields"),
263
264
  limit: optionalNumber(ctx, "limit"),
264
265
  offset: optionalNumber(ctx, "offset")
@@ -1281,7 +1282,7 @@ var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
1281
1282
  flags: [
1282
1283
  projectIdFlag,
1283
1284
  { name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
1284
- { name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id/property fields." },
1285
+ { name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id beside property." },
1285
1286
  { name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
1286
1287
  { name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
1287
1288
  { name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
@@ -1396,16 +1397,7 @@ var metadataMetricGet = createAnalysisMetaCapabilityCommand({
1396
1397
 
1397
1398
  // src/commands/te-analysis/meta/metric/shared.ts
1398
1399
  function metricMode(ctx) {
1399
- const mode = optionalNumber(ctx, "metric-mode");
1400
- const modelType = optionalString(ctx, "model-type");
1401
- const mapped = modelType === void 0 ? void 0 : modelTypeToMetricMode(modelType);
1402
- if (mode === void 0 && mapped === void 0) {
1403
- throw new Error("Pass one of --model-type or --metric-mode");
1404
- }
1405
- if (mode !== void 0 && mapped !== void 0 && mode !== mapped) {
1406
- throw new Error("--metric-mode must match --model-type when both are provided");
1407
- }
1408
- return mode ?? mapped;
1400
+ return modelTypeToMetricMode(ctx.str("model-type"));
1409
1401
  }
1410
1402
  function optionalMetricMode(ctx) {
1411
1403
  const mode = optionalNumber(ctx, "metric-mode");
@@ -1438,9 +1430,8 @@ var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
1438
1430
  { name: "metric-name", type: "string", required: true, desc: "Metric technical name, for example pay_count." },
1439
1431
  { name: "metric-desc", type: "string", required: true, desc: "Metric display name." },
1440
1432
  { name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
1441
- { name: "metric-mode", type: "number", required: false, desc: "Metric model mode, for example 0 for event analysis." },
1442
- { name: "model-type", type: "string", required: false, desc: "Semantic metric model type: event or retention. Prefer this over metric-mode." },
1443
- { name: "metric-events", type: "json", required: true, desc: "Metric event-analysis QP JSON array." },
1433
+ { name: "model-type", type: "string", required: true, desc: "Semantic metric model type: event or retention." },
1434
+ { name: "metric-events", type: "json", required: true, desc: "One semantic event-analysis definition, or a native snake_case QP array for compatibility." },
1444
1435
  { name: "metric-params", type: "json", required: false, desc: "Metric params JSON object. Defaults to {} in common when omitted." }
1445
1436
  ],
1446
1437
  risk: "write",
@@ -2329,8 +2320,9 @@ var reportList = createAnalysisCapabilityCommand({
2329
2320
  command: "list",
2330
2321
  capabilityId: "analysis.report.list",
2331
2322
  description: "List analysis reports visible to the current user through the capability gateway.",
2332
- flags: [projectIdFlag, queryFlag, fieldsFlag, reportModelTypesFlag, reportListLimitFlag, directoryOffsetFlag],
2323
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, reportModelTypesFlag, reportListLimitFlag, directoryOffsetFlag],
2333
2324
  risk: "read",
2325
+ validate: validateQueriesFlag,
2334
2326
  buildInput: reportListInput
2335
2327
  });
2336
2328
 
@@ -2343,7 +2335,7 @@ var reportListExport = createAnalysisCapabilityCommand({
2343
2335
  description: "Export the accessible report catalog as a gzip artifact.",
2344
2336
  flags: [
2345
2337
  projectIdFlag,
2346
- queryFlag,
2338
+ queriesFlag,
2347
2339
  fieldsFlag,
2348
2340
  reportModelTypesFlag,
2349
2341
  requestIdFlag,
@@ -2351,9 +2343,10 @@ var reportListExport = createAnalysisCapabilityCommand({
2351
2343
  asyncTimeoutSecondsFlag
2352
2344
  ],
2353
2345
  risk: "read",
2346
+ validate: validateQueriesFlag,
2354
2347
  buildInput: (ctx) => compactInput({
2355
2348
  ...projectInput(ctx),
2356
- query: optionalString(ctx, "query"),
2349
+ queries: optionalQueries(ctx),
2357
2350
  fields: optionalJson(ctx, "fields"),
2358
2351
  model_types: optionalJson(ctx, "model-types"),
2359
2352
  ...exportLifecycleInput(ctx)
@@ -2736,7 +2729,7 @@ var dashboardList = createAnalysisCapabilityCommand({
2736
2729
  description: "List dashboards visible to the current user through the capability gateway.",
2737
2730
  flags: [
2738
2731
  projectIdFlag,
2739
- queryFlag,
2732
+ queriesFlag,
2740
2733
  {
2741
2734
  name: "fields",
2742
2735
  type: "json",
@@ -2748,6 +2741,7 @@ var dashboardList = createAnalysisCapabilityCommand({
2748
2741
  directoryOffsetFlag
2749
2742
  ],
2750
2743
  risk: "read",
2744
+ validate: validateQueriesFlag,
2751
2745
  buildInput: listInput
2752
2746
  });
2753
2747
 
@@ -2781,7 +2775,7 @@ var dashboardGet = createAnalysisCapabilityCommand({
2781
2775
  resource: "dashboard",
2782
2776
  command: "get",
2783
2777
  capabilityId: "analysis.dashboard.get",
2784
- description: "Get one dashboard detail, including creator, create/update time, settings, reports, notes, and share information.",
2778
+ description: "Get one dashboard detail, including location, creator, create/update time, settings, reports, notes, and share information.",
2785
2779
  flags: [
2786
2780
  projectIdFlag,
2787
2781
  { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
@@ -2800,10 +2794,10 @@ var dashboardUpdate = createAnalysisCapabilityCommand({
2800
2794
  resource: "dashboard",
2801
2795
  command: "update",
2802
2796
  capabilityId: "analysis.dashboard.update",
2803
- description: "Update dashboard settings or create/update a dashboard note. Use --operation settings or note-upsert.",
2797
+ description: "Update dashboard settings, create/update a dashboard note, or replace the dashboard-level business filter. Use --operation settings, note-upsert, or business-filter.",
2804
2798
  flags: [
2805
2799
  projectIdFlag,
2806
- { name: "operation", type: "string", required: true, desc: "Update operation: settings or note-upsert." },
2800
+ { name: "operation", type: "string", required: true, desc: "Update operation: settings, note-upsert, or business-filter." },
2807
2801
  { name: "dashboard-id", type: "number", required: false, desc: "Dashboard ID for a single-dashboard update." },
2808
2802
  { name: "dashboard-ids", type: "json", required: false, desc: "Dashboard ID array for batch settings updates." },
2809
2803
  { name: "dashboard-name", type: "string", required: false, desc: "Dashboard name for single rename." },
@@ -2814,6 +2808,7 @@ var dashboardUpdate = createAnalysisCapabilityCommand({
2814
2808
  { name: "note-title", type: "string", required: false, desc: "Dashboard note title." },
2815
2809
  { name: "description", type: "string", required: false, desc: "Dashboard note description." },
2816
2810
  { name: "ui-config", type: "string", required: false, desc: "Dashboard or note UI config string." },
2811
+ { name: "filter", type: "json", required: false, desc: 'Dashboard-level business filter in snake_case QP form. Required with --operation business-filter. Pass {"junction_kind":"and","ta_filters":[]} to clear it.' },
2817
2812
  payloadFlag
2818
2813
  ],
2819
2814
  risk: "write",
@@ -2830,6 +2825,7 @@ var dashboardUpdate = createAnalysisCapabilityCommand({
2830
2825
  note_title: optionalString(ctx, "note-title"),
2831
2826
  description: optionalString(ctx, "description"),
2832
2827
  ui_config: optionalString(ctx, "ui-config"),
2828
+ filter: optionalJson(ctx, "filter"),
2833
2829
  payload: optionalJson(ctx, "payload")
2834
2830
  })
2835
2831
  });
@@ -3713,8 +3709,9 @@ var biPanelList = createAnalysisCapabilityCommand({
3713
3709
  command: "list",
3714
3710
  capabilityId: "analysis.bi_panel.list",
3715
3711
  description: "List BI panels visible to the current user through the capability gateway.",
3716
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3712
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3717
3713
  risk: "read",
3714
+ validate: validateQueriesFlag,
3718
3715
  buildInput: listInput
3719
3716
  });
3720
3717
 
@@ -3958,8 +3955,9 @@ var projectSpaceList = createAnalysisCapabilityCommand({
3958
3955
  command: "list",
3959
3956
  capabilityId: "analysis.project_space.list",
3960
3957
  description: "List project spaces visible to the current user.",
3961
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3958
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
3962
3959
  risk: "read",
3960
+ validate: validateQueriesFlag,
3963
3961
  buildInput: listInput
3964
3962
  });
3965
3963
 
@@ -3978,10 +3976,30 @@ var projectSpaceGet = createAnalysisCapabilityCommand({
3978
3976
  })
3979
3977
  });
3980
3978
 
3979
+ // src/commands/te-analysis/project-space/business-filter-upsert.ts
3980
+ var projectSpaceBusinessFilterUpsert = createAnalysisCapabilityCommand({
3981
+ resource: "project-space",
3982
+ command: "business-filter-upsert",
3983
+ capabilityId: "analysis.project_space.business_filter_upsert",
3984
+ description: "Create or replace the space-level business filter inherited by dashboards in a project space.",
3985
+ flags: [
3986
+ projectIdFlag,
3987
+ { name: "space-id", type: "number", required: true, desc: "Project space ID." },
3988
+ { name: "filter", type: "json", required: true, desc: 'Space-level business filter in snake_case QP form. Pass {"junction_kind":"and","ta_filters":[]} to clear it.' }
3989
+ ],
3990
+ risk: "write",
3991
+ buildInput: (ctx) => compactInput({
3992
+ ...projectInput(ctx),
3993
+ space_id: ctx.num("space-id"),
3994
+ filter: ctx.json("filter")
3995
+ })
3996
+ });
3997
+
3981
3998
  // src/commands/te-analysis/project-space/index.ts
3982
3999
  var commands31 = [
3983
4000
  projectSpaceList,
3984
- projectSpaceGet
4001
+ projectSpaceGet,
4002
+ projectSpaceBusinessFilterUpsert
3985
4003
  ];
3986
4004
  var project_space_default = commands31;
3987
4005
 
@@ -3993,20 +4011,16 @@ var favoriteAdd = createAnalysisCapabilityCommand({
3993
4011
  description: "Favorite one dashboard, BI panel, or folder.",
3994
4012
  flags: [
3995
4013
  projectIdFlag,
3996
- { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
3997
- { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
3998
- { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
3999
- { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
4000
- payloadFlag
4014
+ { name: "asset-id", type: "number", required: true, desc: "Dashboard, BI panel, or folder ID." },
4015
+ { name: "asset-type", type: "string", required: true, desc: "Asset type: dashboard, bi_panel, or folder." },
4016
+ { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." }
4001
4017
  ],
4002
4018
  risk: "write",
4003
4019
  buildInput: (ctx) => compactInput({
4004
4020
  ...projectInput(ctx),
4005
- asset_id: optionalNumber(ctx, "asset-id"),
4006
- asset_type: optionalString(ctx, "asset-type"),
4007
- space_id: optionalNumber(ctx, "space-id"),
4008
- id: optionalNumber(ctx, "id"),
4009
- payload: optionalJson(ctx, "payload")
4021
+ asset_id: ctx.num("asset-id"),
4022
+ asset_type: ctx.str("asset-type"),
4023
+ space_id: optionalNumber(ctx, "space-id")
4010
4024
  })
4011
4025
  });
4012
4026
 
@@ -4018,20 +4032,16 @@ var favoriteRemove = createAnalysisCapabilityCommand({
4018
4032
  description: "Remove favorite from one dashboard, BI panel, or folder.",
4019
4033
  flags: [
4020
4034
  projectIdFlag,
4021
- { name: "asset-id", type: "number", required: false, desc: "Asset ID." },
4022
- { name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
4023
- { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
4024
- { name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
4025
- payloadFlag
4035
+ { name: "asset-id", type: "number", required: true, desc: "Dashboard, BI panel, or folder ID." },
4036
+ { name: "asset-type", type: "string", required: true, desc: "Asset type: dashboard, bi_panel, or folder." },
4037
+ { name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." }
4026
4038
  ],
4027
4039
  risk: "write",
4028
4040
  buildInput: (ctx) => compactInput({
4029
4041
  ...projectInput(ctx),
4030
- asset_id: optionalNumber(ctx, "asset-id"),
4031
- asset_type: optionalString(ctx, "asset-type"),
4032
- space_id: optionalNumber(ctx, "space-id"),
4033
- id: optionalNumber(ctx, "id"),
4034
- payload: optionalJson(ctx, "payload")
4042
+ asset_id: ctx.num("asset-id"),
4043
+ asset_type: ctx.str("asset-type"),
4044
+ space_id: optionalNumber(ctx, "space-id")
4035
4045
  })
4036
4046
  });
4037
4047
 
@@ -4079,8 +4089,9 @@ var publicLinkList = createAnalysisCapabilityCommand({
4079
4089
  command: "list",
4080
4090
  capabilityId: "analysis.public_link.list",
4081
4091
  description: "List public links in a project.",
4082
- flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
4092
+ flags: [projectIdFlag, queriesFlag, fieldsFlag, directoryLimitFlag, directoryOffsetFlag],
4083
4093
  risk: "read",
4094
+ validate: validateQueriesFlag,
4084
4095
  buildInput: listInput
4085
4096
  });
4086
4097
 
@@ -4747,6 +4758,12 @@ var zoneOffsetFlag3 = {
4747
4758
  required: false,
4748
4759
  desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5."
4749
4760
  };
4761
+ var autoRefreshCronFlag = {
4762
+ name: "auto-refresh-cron",
4763
+ type: "string",
4764
+ required: false,
4765
+ desc: "Optional Quartz cron expression for an existing enabled auto-refresh schedule. This does not enable auto refresh."
4766
+ };
4750
4767
  var entityIdFlag = {
4751
4768
  name: "entity-id",
4752
4769
  type: "number",
@@ -4988,6 +5005,7 @@ function clusterWriteInput(ctx, create) {
4988
5005
  authenticated_only: optionalBoolean(ctx, "authenticated-only"),
4989
5006
  remark: create ? void 0 : optionalString(ctx, "remark"),
4990
5007
  zone_offset: optionalNumber(ctx, "zone-offset"),
5008
+ auto_refresh_cron: create ? void 0 : optionalString(ctx, "auto-refresh-cron"),
4991
5009
  entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
4992
5010
  });
4993
5011
  }
@@ -5002,6 +5020,7 @@ function tagWriteInput(ctx, create) {
5002
5020
  authenticated_only: optionalBoolean(ctx, "authenticated-only"),
5003
5021
  remark: create ? void 0 : optionalString(ctx, "remark"),
5004
5022
  zone_offset: optionalNumber(ctx, "zone-offset"),
5023
+ auto_refresh_cron: create ? void 0 : optionalString(ctx, "auto-refresh-cron"),
5005
5024
  entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
5006
5025
  });
5007
5026
  }
@@ -5180,7 +5199,8 @@ var commands40 = [
5180
5199
  optionalClusterDefinitionRequestFlag,
5181
5200
  authenticatedOnlyFlag,
5182
5201
  remarkFlag,
5183
- zoneOffsetFlag3
5202
+ zoneOffsetFlag3,
5203
+ autoRefreshCronFlag
5184
5204
  ], "write", (ctx) => clusterWriteInput(ctx, false)),
5185
5205
  idImportCapability(capability("user-cluster", "create-id", "analysis.user_cluster.create_id", "Create a cluster by mapping imported values to an analysis entity.", [
5186
5206
  projectIdFlag,
@@ -5272,7 +5292,8 @@ var commands40 = [
5272
5292
  optionalTagDefinitionRequestFlag,
5273
5293
  authenticatedOnlyFlag,
5274
5294
  remarkFlag,
5275
- zoneOffsetFlag3
5295
+ zoneOffsetFlag3,
5296
+ autoRefreshCronFlag
5276
5297
  ], "write", (ctx) => tagWriteInput(ctx, false)),
5277
5298
  capability("user-tag", "refresh", "analysis.user_tag.refresh", "Refresh a user tag by exact tag_name.", [
5278
5299
  projectIdFlag,
@@ -5422,11 +5443,12 @@ var sqlTableList = createAnalysisCapabilityCommand({
5422
5443
  command: "list",
5423
5444
  capabilityId: "analysis.sql_table.list",
5424
5445
  description: "List server-authoritative SQL table references queryable by the current user in a project.",
5425
- flags: [projectIdFlag, queryFlag, directoryLimitFlag, directoryOffsetFlag, sqlTableUsageFlag],
5446
+ flags: [projectIdFlag, queriesFlag, directoryLimitFlag, directoryOffsetFlag, sqlTableUsageFlag],
5426
5447
  risk: "read",
5448
+ validate: validateQueriesFlag,
5427
5449
  buildInput: (ctx) => compactInput({
5428
5450
  project_id: ctx.num("project-id"),
5429
- query: optionalString(ctx, "query"),
5451
+ queries: optionalQueries(ctx),
5430
5452
  limit: optionalNumber(ctx, "limit"),
5431
5453
  offset: optionalNumber(ctx, "offset"),
5432
5454
  usage: optionalString(ctx, "usage")
@@ -7674,9 +7696,10 @@ var analysisAlertList = createAnalysisCapabilityCommand({
7674
7696
  command: "list",
7675
7697
  capabilityId: "analysis.alert.list",
7676
7698
  description: "List project alerts.",
7677
- flags: [projectIdFlag, queryFlag, directoryLimitFlag, directoryOffsetFlag],
7699
+ flags: [projectIdFlag, queriesFlag, directoryLimitFlag, directoryOffsetFlag],
7678
7700
  risk: "read",
7679
- buildInput: (ctx) => compactInput({ ...projectInput3(ctx), query: optionalString(ctx, "query"), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
7701
+ validate: validateQueriesFlag,
7702
+ buildInput: (ctx) => compactInput({ ...projectInput3(ctx), queries: optionalQueries(ctx), limit: optionalNumber(ctx, "limit"), offset: optionalNumber(ctx, "offset") })
7680
7703
  });
7681
7704
 
7682
7705
  // src/commands/te-analysis/alert/get.ts
@@ -1,36 +1,42 @@
1
1
  import {
2
2
  registerCapabilityGatewayRoute
3
3
  } from "./chunk-PTE56QPL.js";
4
+ import {
5
+ internalCallSourceHeaders
6
+ } from "./chunk-C4MGVGJW.js";
4
7
  import {
5
8
  clearCliToken,
6
9
  getCliToken
7
- } from "./chunk-S5NTSDBS.js";
8
- import "./chunk-ZQKDZXDO.js";
10
+ } from "./chunk-4SGZG4XY.js";
9
11
  import {
10
12
  getActiveHost,
11
13
  safeJsonParse
12
- } from "./chunk-3FY3RJ26.js";
14
+ } from "./chunk-ZZUOD757.js";
13
15
  import {
14
16
  CliValidationError,
15
17
  PermissionError
16
- } from "./chunk-AXDXJTPC.js";
18
+ } from "./chunk-UW5UN47B.js";
17
19
  import {
18
20
  logger
19
- } from "./chunk-JHENBQ5B.js";
21
+ } from "./chunk-LYVNONC4.js";
22
+ import "./chunk-QGM4M3NI.js";
20
23
 
21
24
  // src/core/mcp.ts
22
- async function permissionMessage(resp) {
25
+ async function permissionDetails(resp) {
23
26
  const text = await resp.text().catch(() => "");
24
27
  try {
25
28
  const d = safeJsonParse(text);
26
29
  const msg = d && (d.error?.message || (typeof d.error === "string" ? d.error : void 0) || d.message);
27
- if (msg && typeof msg === "string") return msg;
30
+ if (msg && typeof msg === "string") {
31
+ return {
32
+ message: msg,
33
+ code: typeof d.code === "string" ? d.code : typeof d.error?.code === "string" ? d.error.code : void 0,
34
+ hint: typeof d.hint === "string" ? d.hint : typeof d.error?.hint === "string" ? d.error.hint : void 0
35
+ };
36
+ }
28
37
  } catch {
29
38
  }
30
- return "Permission denied for this resource (HTTP 403)";
31
- }
32
- function isInvalidCliTokenMessage(message) {
33
- return /\b(cli[-_\s]?token|token)\b.*\binvalid\b/i.test(message) || /\binvalid\b.*\b(cli[-_\s]?token|token)\b/i.test(message);
39
+ return { message: "Permission denied for this resource (HTTP 403)" };
34
40
  }
35
41
  var MCP_PROTOCOL_VERSION = "2025-11-25";
36
42
  var JSONRPC_VERSION = "2.0";
@@ -85,6 +91,7 @@ async function mcpRequest(url, method, params = {}, hostOverride) {
85
91
  "Content-Type": "application/json",
86
92
  "Accept": "application/json, text/event-stream",
87
93
  "mcp-protocol-version": MCP_PROTOCOL_VERSION,
94
+ ...internalCallSourceHeaders(),
88
95
  ...buildAuthHeaders(token)
89
96
  };
90
97
  const resp = await fetch(url, {
@@ -93,15 +100,12 @@ async function mcpRequest(url, method, params = {}, hostOverride) {
93
100
  body: JSON.stringify(body)
94
101
  });
95
102
  if (!resp.ok) {
96
- let permissionMsg;
97
103
  if (resp.status === 403) {
98
- permissionMsg = await permissionMessage(resp);
99
- if (!isInvalidCliTokenMessage(permissionMsg)) {
100
- throw new PermissionError(permissionMsg);
101
- }
104
+ const permission = await permissionDetails(resp);
105
+ throw new PermissionError(permission.message, permission.code, permission.hint);
102
106
  }
103
- if (resp.status === 401 || resp.status === 403 && permissionMsg) {
104
- logger.warn(`MCP request failed (${resp.status === 403 ? permissionMsg : "HTTP 401"}) for ${hostUrl}, refreshing CLI token`);
107
+ if (resp.status === 401) {
108
+ logger.warn(`MCP request failed (HTTP 401) for ${hostUrl}, refreshing CLI token`);
105
109
  clearCliToken(hostUrl);
106
110
  const newToken = await getCliToken(hostUrl);
107
111
  logger.info(`CLI token refreshed for ${hostUrl}`);
@@ -114,7 +118,8 @@ async function mcpRequest(url, method, params = {}, hostOverride) {
114
118
  body: JSON.stringify(body)
115
119
  });
116
120
  if (retryResp.status === 403) {
117
- throw new PermissionError(await permissionMessage(retryResp));
121
+ const permission = await permissionDetails(retryResp);
122
+ throw new PermissionError(permission.message, permission.code, permission.hint);
118
123
  }
119
124
  if (!retryResp.ok) {
120
125
  throw new Error(`MCP HTTP error: ${retryResp.status} ${retryResp.statusText}`);
@@ -1,36 +1,42 @@
1
1
  import {
2
2
  registerCapabilityGatewayRoute
3
3
  } from "./chunk-PTE56QPL.js";
4
+ import {
5
+ internalCallSourceHeaders
6
+ } from "./chunk-6EIJSNBD.js";
4
7
  import {
5
8
  clearCliToken,
6
9
  getCliToken
7
- } from "./chunk-S5NTSDBS.js";
8
- import "./chunk-ZQKDZXDO.js";
10
+ } from "./chunk-4SGZG4XY.js";
9
11
  import {
10
12
  getActiveHost,
11
13
  safeJsonParse
12
- } from "./chunk-3FY3RJ26.js";
14
+ } from "./chunk-ZZUOD757.js";
13
15
  import {
14
16
  CliValidationError,
15
17
  PermissionError
16
- } from "./chunk-AXDXJTPC.js";
18
+ } from "./chunk-UW5UN47B.js";
17
19
  import {
18
20
  logger
19
- } from "./chunk-JHENBQ5B.js";
21
+ } from "./chunk-LYVNONC4.js";
22
+ import "./chunk-QGM4M3NI.js";
20
23
 
21
24
  // src/core/mcp.ts
22
- async function permissionMessage(resp) {
25
+ async function permissionDetails(resp) {
23
26
  const text = await resp.text().catch(() => "");
24
27
  try {
25
28
  const d = safeJsonParse(text);
26
29
  const msg = d && (d.error?.message || (typeof d.error === "string" ? d.error : void 0) || d.message);
27
- if (msg && typeof msg === "string") return msg;
30
+ if (msg && typeof msg === "string") {
31
+ return {
32
+ message: msg,
33
+ code: typeof d.code === "string" ? d.code : typeof d.error?.code === "string" ? d.error.code : void 0,
34
+ hint: typeof d.hint === "string" ? d.hint : typeof d.error?.hint === "string" ? d.error.hint : void 0
35
+ };
36
+ }
28
37
  } catch {
29
38
  }
30
- return "Permission denied for this resource (HTTP 403)";
31
- }
32
- function isInvalidCliTokenMessage(message) {
33
- return /\b(cli[-_\s]?token|token)\b.*\binvalid\b/i.test(message) || /\binvalid\b.*\b(cli[-_\s]?token|token)\b/i.test(message);
39
+ return { message: "Permission denied for this resource (HTTP 403)" };
34
40
  }
35
41
  var MCP_PROTOCOL_VERSION = "2025-11-25";
36
42
  var JSONRPC_VERSION = "2.0";
@@ -85,7 +91,7 @@ async function mcpRequest(url, method, params = {}, hostOverride) {
85
91
  "Content-Type": "application/json",
86
92
  "Accept": "application/json, text/event-stream",
87
93
  "mcp-protocol-version": MCP_PROTOCOL_VERSION,
88
- "X-Source": "ae-cli",
94
+ ...internalCallSourceHeaders(),
89
95
  ...buildAuthHeaders(token)
90
96
  };
91
97
  const resp = await fetch(url, {
@@ -94,15 +100,12 @@ async function mcpRequest(url, method, params = {}, hostOverride) {
94
100
  body: JSON.stringify(body)
95
101
  });
96
102
  if (!resp.ok) {
97
- let permissionMsg;
98
103
  if (resp.status === 403) {
99
- permissionMsg = await permissionMessage(resp);
100
- if (!isInvalidCliTokenMessage(permissionMsg)) {
101
- throw new PermissionError(permissionMsg);
102
- }
104
+ const permission = await permissionDetails(resp);
105
+ throw new PermissionError(permission.message, permission.code, permission.hint);
103
106
  }
104
- if (resp.status === 401 || resp.status === 403 && permissionMsg) {
105
- logger.warn(`MCP request failed (${resp.status === 403 ? permissionMsg : "HTTP 401"}) for ${hostUrl}, refreshing CLI token`);
107
+ if (resp.status === 401) {
108
+ logger.warn(`MCP request failed (HTTP 401) for ${hostUrl}, refreshing CLI token`);
106
109
  clearCliToken(hostUrl);
107
110
  const newToken = await getCliToken(hostUrl);
108
111
  logger.info(`CLI token refreshed for ${hostUrl}`);
@@ -115,7 +118,8 @@ async function mcpRequest(url, method, params = {}, hostOverride) {
115
118
  body: JSON.stringify(body)
116
119
  });
117
120
  if (retryResp.status === 403) {
118
- throw new PermissionError(await permissionMessage(retryResp));
121
+ const permission = await permissionDetails(retryResp);
122
+ throw new PermissionError(permission.message, permission.code, permission.hint);
119
123
  }
120
124
  if (!retryResp.ok) {
121
125
  throw new Error(`MCP HTTP error: ${retryResp.status} ${retryResp.statusText}`);