@thinkingai/ae-cli 6.0.22 → 6.0.27

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 (172) hide show
  1. package/dist/{auth-RDN6D5HU.js → auth-7TQRGLBC.js} +13 -15
  2. package/dist/auth-MEJ642P4.js +13 -0
  3. package/dist/chunk-2NDGFQHW.js +190 -0
  4. package/dist/{chunk-5FBLRSMU.js → chunk-7QQ4233A.js} +3 -3
  5. package/dist/{chunk-U6QPKCN3.js → chunk-AJTH7LT3.js} +10 -116
  6. package/dist/chunk-BXMXMUD7.js +254 -0
  7. package/dist/chunk-C4DH76LX.js +59 -0
  8. package/dist/chunk-GWZ5MYWE.js +209 -0
  9. package/dist/{chunk-E34XH4GW.js → chunk-KCA6BA5D.js} +8 -8
  10. package/dist/{chunk-XE2PI5DS.js → chunk-KGJQCYVC.js} +1 -1
  11. package/dist/chunk-LG5YT7P7.js +59 -0
  12. package/dist/{chunk-2W7HULUD.js → chunk-MDJGDI6K.js} +2 -2
  13. package/dist/{chunk-H52CSLJW.js → chunk-R77JT7XD.js} +53 -6
  14. package/dist/{chunk-WPXHCP4A.js → chunk-YCLVYFK7.js} +52 -9
  15. package/dist/{chunk-4EUZRJPO.js → chunk-YNQFYBDB.js} +102 -14
  16. package/dist/{chunk-YACCPUNQ.js → chunk-ZAOL36CG.js} +1 -1
  17. package/dist/cli-token-TVQRSE46.js +18 -0
  18. package/dist/{client-VTJMUZ4O.js → client-2643Z5AG.js} +3 -3
  19. package/dist/{config-2SDTLGOC.js → config-ZVPARN4R.js} +4 -9
  20. package/dist/index.js +27 -24
  21. package/dist/{metadata-JZ2OTWBK.js → metadata-IPSPQBX3.js} +56 -65
  22. package/dist/metadata-N5REJ7R7.js +411 -0
  23. package/dist/{model-ZYMRN4VS.js → model-T3KZJWLW.js} +2 -2
  24. package/dist/{raw-NGYHAL3F.js → raw-OHSUK42D.js} +4 -4
  25. package/dist/{sync-JVLX6TGW.js → sync-ULT5SECP.js} +3 -3
  26. package/dist/{te-agent-QPZTLHPH.js → te-agent-QLIVKRUN.js} +1146 -61
  27. package/dist/{te-analysis-WWX3Z6RP.js → te-analysis-2U5EPXQC.js} +1213 -341
  28. package/dist/te-analysis-QMZ2UH7F.js +2419 -0
  29. package/dist/{te-audience-UXGHUVBB.js → te-audience-PVMKQAFH.js} +5 -5
  30. package/dist/te-audience-XMRMVD2V.js +599 -0
  31. package/dist/{te-common-7XXH73MF.js → te-common-CFGQXTFV.js} +5 -5
  32. package/dist/te-common-SDB3O2QG.js +130 -0
  33. package/dist/{te-community-QKE67HR2.js → te-community-6A7LKYUH.js} +5 -5
  34. package/dist/te-community-GMWFGILT.js +687 -0
  35. package/dist/te-dataops-6LIPYNGH.js +1864 -0
  36. package/dist/{te-dataops-6W7NNYST.js → te-dataops-Z53CTG2U.js} +90 -68
  37. package/dist/{te-engage-NCFAQFX3.js → te-engage-AGREUOW7.js} +30 -15
  38. package/dist/te-engage-MIIUKY6M.js +1525 -0
  39. package/dist/{te-kb-K5BQYUCM.js → te-kb-KQJ53M3A.js} +4 -4
  40. package/dist/{te-meta-LJZBOSMO.js → te-meta-QLANJ4B4.js} +5 -5
  41. package/dist/te-meta-TOA6FWDE.js +595 -0
  42. package/dist/{te-team-DHK5R7MV.js → te-team-TQGMNHQQ.js} +5 -5
  43. package/package.json +3 -1
  44. package/skills/ae-agent/SKILL.md +158 -189
  45. package/skills/ae-agent/references/accept-skill-share.md +39 -0
  46. package/skills/ae-agent/references/add-attachment.md +57 -0
  47. package/skills/ae-agent/references/add-mcp.md +75 -0
  48. package/skills/ae-agent/references/add-model.md +70 -0
  49. package/skills/ae-agent/references/add-skill.md +71 -0
  50. package/skills/ae-agent/references/approve-skill.md +41 -0
  51. package/skills/ae-agent/references/attachment-stats.md +50 -0
  52. package/skills/ae-agent/references/auto-provision-mcp-credentials.md +57 -0
  53. package/skills/ae-agent/references/cancel-skill-submission.md +39 -0
  54. package/skills/ae-agent/references/copy-skill.md +53 -0
  55. package/skills/ae-agent/references/create-agent.md +71 -0
  56. package/skills/ae-agent/references/create-automation.md +99 -0
  57. package/skills/ae-agent/references/del-agent.md +38 -0
  58. package/skills/ae-agent/references/del-attachment.md +35 -0
  59. package/skills/ae-agent/references/del-mcp.md +35 -0
  60. package/skills/ae-agent/references/del-model.md +37 -0
  61. package/skills/ae-agent/references/del-skill-asset.md +41 -0
  62. package/skills/ae-agent/references/del-skill-reference.md +41 -0
  63. package/skills/ae-agent/references/del-skill-script.md +41 -0
  64. package/skills/ae-agent/references/del-skill.md +36 -0
  65. package/skills/ae-agent/references/edit-skill.md +64 -0
  66. package/skills/ae-agent/references/get-agent.md +37 -0
  67. package/skills/ae-agent/references/get-skill-content.md +36 -0
  68. package/skills/ae-agent/references/list-agents.md +40 -0
  69. package/skills/ae-agent/references/list-attachments.md +42 -0
  70. package/skills/ae-agent/references/list-automations.md +41 -0
  71. package/skills/ae-agent/references/list-mcp-credentials.md +65 -0
  72. package/skills/ae-agent/references/list-mcp-market.md +58 -0
  73. package/skills/ae-agent/references/list-mcps.md +37 -0
  74. package/skills/ae-agent/references/list-models.md +38 -0
  75. package/skills/ae-agent/references/list-skill-assets.md +35 -0
  76. package/skills/ae-agent/references/list-skill-market.md +59 -0
  77. package/skills/ae-agent/references/list-skill-references.md +36 -0
  78. package/skills/ae-agent/references/list-skill-scripts.md +35 -0
  79. package/skills/ae-agent/references/list-skill-shares.md +49 -0
  80. package/skills/ae-agent/references/list-skill-submissions.md +45 -0
  81. package/skills/ae-agent/references/list-skills.md +37 -0
  82. package/skills/ae-agent/references/mcp-auth-disconnect.md +50 -0
  83. package/skills/ae-agent/references/mcp-auth-start.md +61 -0
  84. package/skills/ae-agent/references/mcp-auth-status.md +56 -0
  85. package/skills/ae-agent/references/mcp-stats.md +68 -0
  86. package/skills/ae-agent/references/mcp-token.md +63 -0
  87. package/skills/ae-agent/references/mcp-tools.md +55 -0
  88. package/skills/ae-agent/references/read-skill-asset.md +51 -0
  89. package/skills/ae-agent/references/read-skill-reference.md +50 -0
  90. package/skills/ae-agent/references/read-skill-script.md +51 -0
  91. package/skills/ae-agent/references/reject-skill-share.md +37 -0
  92. package/skills/ae-agent/references/reject-skill.md +42 -0
  93. package/skills/ae-agent/references/rescan-skills.md +44 -0
  94. package/skills/ae-agent/references/set-mcp-credential.md +67 -0
  95. package/skills/ae-agent/references/set-mcp-meta.md +52 -0
  96. package/skills/ae-agent/references/set-skill-meta.md +51 -0
  97. package/skills/ae-agent/references/share-skill.md +50 -0
  98. package/skills/ae-agent/references/submit-skill.md +51 -0
  99. package/skills/ae-agent/references/test-model.md +61 -0
  100. package/skills/ae-agent/references/toggle-mcp.md +39 -0
  101. package/skills/ae-agent/references/toggle-model.md +37 -0
  102. package/skills/ae-agent/references/toggle-skill.md +37 -0
  103. package/skills/ae-agent/references/update-agent.md +71 -0
  104. package/skills/ae-agent/references/update-automation.md +83 -0
  105. package/skills/ae-agent/references/update-mcp.md +79 -0
  106. package/skills/ae-agent/references/update-model.md +77 -0
  107. package/skills/ae-agent/references/upload-skill-asset.md +49 -0
  108. package/skills/ae-agent/references/upload-skill-reference.md +51 -0
  109. package/skills/ae-agent/references/upload-skill-script.md +49 -0
  110. package/skills/ae-agent/references/upload-skill.md +89 -0
  111. package/skills/ae-analysis/SKILL.md +53 -25
  112. package/skills/ae-analysis/references/analysis_gateway_assets.md +129 -0
  113. package/skills/ae-analysis/references/artifact_download.md +17 -0
  114. package/skills/ae-analysis/references/bi_panel_copy.md +15 -0
  115. package/skills/ae-analysis/references/bi_panel_create.md +15 -0
  116. package/skills/ae-analysis/references/bi_panel_delete.md +15 -0
  117. package/skills/ae-analysis/references/bi_panel_get.md +18 -0
  118. package/skills/ae-analysis/references/bi_panel_list.md +15 -0
  119. package/skills/ae-analysis/references/bi_panel_page_data_export.md +25 -0
  120. package/skills/ae-analysis/references/bi_panel_page_data_run.md +15 -0
  121. package/skills/ae-analysis/references/bi_panel_share.md +15 -0
  122. package/skills/ae-analysis/references/bi_panel_update.md +15 -0
  123. package/skills/ae-analysis/references/dashboard_abnormal_get.md +15 -0
  124. package/skills/ae-analysis/references/dashboard_copy.md +17 -0
  125. package/skills/ae-analysis/references/dashboard_create.md +15 -0
  126. package/skills/ae-analysis/references/dashboard_daily_report_send.md +17 -0
  127. package/skills/ae-analysis/references/dashboard_daily_report_update.md +17 -0
  128. package/skills/ae-analysis/references/dashboard_definition_export.md +33 -0
  129. package/skills/ae-analysis/references/dashboard_definition_import.md +15 -0
  130. package/skills/ae-analysis/references/dashboard_delete.md +15 -0
  131. package/skills/ae-analysis/references/dashboard_freeze.md +15 -0
  132. package/skills/ae-analysis/references/dashboard_get.md +15 -0
  133. package/skills/ae-analysis/references/dashboard_handover.md +15 -0
  134. package/skills/ae-analysis/references/dashboard_list.md +15 -0
  135. package/skills/ae-analysis/references/dashboard_report_data_export.md +25 -0
  136. package/skills/ae-analysis/references/dashboard_report_data_run.md +15 -0
  137. package/skills/ae-analysis/references/dashboard_share.md +15 -0
  138. package/skills/ae-analysis/references/dashboard_share_info.md +15 -0
  139. package/skills/ae-analysis/references/dashboard_task_status.md +15 -0
  140. package/skills/ae-analysis/references/dashboard_update.md +16 -0
  141. package/skills/ae-analysis/references/favorite_add.md +15 -0
  142. package/skills/ae-analysis/references/favorite_remove.md +15 -0
  143. package/skills/ae-analysis/references/folder_create.md +15 -0
  144. package/skills/ae-analysis/references/folder_delete.md +15 -0
  145. package/skills/ae-analysis/references/folder_members.md +15 -0
  146. package/skills/ae-analysis/references/folder_share.md +15 -0
  147. package/skills/ae-analysis/references/project_space_create.md +15 -0
  148. package/skills/ae-analysis/references/project_space_delete.md +15 -0
  149. package/skills/ae-analysis/references/project_space_get.md +18 -0
  150. package/skills/ae-analysis/references/project_space_list.md +15 -0
  151. package/skills/ae-analysis/references/project_space_members.md +15 -0
  152. package/skills/ae-analysis/references/project_space_share.md +15 -0
  153. package/skills/ae-analysis/references/public_link_create.md +15 -0
  154. package/skills/ae-analysis/references/public_link_delete.md +15 -0
  155. package/skills/ae-analysis/references/public_link_list.md +15 -0
  156. package/skills/ae-analysis/references/public_link_offline.md +15 -0
  157. package/skills/ae-analysis/references/public_link_update.md +15 -0
  158. package/skills/ae-analysis/references/query_cancel.md +15 -0
  159. package/skills/ae-analysis/references/run_inspect.md +22 -0
  160. package/skills/ae-dataops/references/dataops-flow-create.md +2 -2
  161. package/skills/ae-dataops/references/dataops-flow-monitor.md +3 -3
  162. package/skills/ae-dataops/references/dataops-integration.md +1 -0
  163. package/skills/ae-engage/references/flow-node-config-schema.md +32 -8
  164. package/skills/ae-engage/references/save-flow.md +65 -29
  165. package/skills/ae-engage/references/validate-flow-node-config.md +28 -10
  166. package/skills/ae-generate-tracking-plan/SKILL.md +9 -7
  167. package/skills/ae-metadata/references/metadata_data_table_csv_write.md +5 -3
  168. package/skills/ae-metadata/references/metadata_data_table_sql_write.md +5 -4
  169. package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +5 -3
  170. package/dist/auth-I2G7OAU2.js +0 -19
  171. package/dist/chunk-FPE5LGVU.js +0 -105
  172. package/dist/cli-token-6AGEDJF4.js +0 -14
@@ -1,71 +1,76 @@
1
1
  import {
2
2
  printError
3
- } from "./chunk-YACCPUNQ.js";
3
+ } from "./chunk-ZAOL36CG.js";
4
+ import {
5
+ PermissionError
6
+ } from "./chunk-NOO24N7W.js";
7
+ import {
8
+ clearCliToken,
9
+ getCliToken
10
+ } from "./chunk-2NDGFQHW.js";
4
11
  import {
5
- clearToken,
6
- getToken,
7
12
  resolveHost
8
- } from "./chunk-U6QPKCN3.js";
13
+ } from "./chunk-AJTH7LT3.js";
9
14
  import {
10
15
  logger,
11
16
  safeJsonParse
12
- } from "./chunk-WPXHCP4A.js";
17
+ } from "./chunk-YCLVYFK7.js";
13
18
 
14
19
  // src/commands/te-dataops/shared.ts
15
20
  var TOOL_API_MAP = {
16
- repo_list_spaces: { method: "GET", path: "/v1/gaia/mcp/api/repo/spaces" },
17
- datatable_get_table_detail: { method: "GET", path: "/v1/gaia/mcp/api/datatable/table-detail" },
18
- datatable_dict_search_tables: { method: "GET", path: "/v1/gaia/mcp/api/datatable/dict-tables" },
19
- datatable_create_table: { method: "POST", path: "/v1/gaia/mcp/api/datatable/tables" },
20
- datatable_create_view: { method: "POST", path: "/v1/gaia/mcp/api/datatable/views" },
21
- datatable_publish_entity: { method: "POST", path: "/v1/gaia/mcp/api/datatable/publish" },
22
- flow_list_flows: { method: "GET", path: "/v1/gaia/mcp/api/workflow/flows" },
23
- flow_get_flow_overview: { method: "GET", path: "/v1/gaia/mcp/api/workflow/flow-overview" },
24
- flow_list_high_frequency_release_flows: { method: "GET", path: "/v1/gaia/mcp/api/workflow/flow-release/high-frequency" },
25
- flow_create_flow: { method: "POST", path: "/v1/gaia/mcp/api/workflow/flows" },
26
- flow_update_flow: { method: "POST", path: "/v1/gaia/mcp/api/workflow/flow-basic" },
27
- flow_save_schedule_config: { method: "POST", path: "/v1/gaia/mcp/api/workflow/schedule-config" },
28
- flow_execute_flow: { method: "POST", path: "/v1/gaia/mcp/api/workflow/flow-execution" },
29
- flow_preview_release_flow: { method: "GET", path: "/v1/gaia/mcp/api/workflow/flow-release/preview" },
30
- flow_release_flow: { method: "POST", path: "/v1/gaia/mcp/api/workflow/flow-release" },
31
- flow_create_sql_task: { method: "POST", path: "/v1/gaia/mcp/api/workflow/tasks" },
32
- flow_update_sql_task: { method: "POST", path: "/v1/gaia/mcp/api/workflow/sql-task-definition" },
33
- flow_create_integration_task: { method: "POST", path: "/v1/gaia/mcp/api/workflow/integration-tasks" },
34
- flow_update_integration_task: { method: "POST", path: "/v1/gaia/mcp/api/workflow/integration-task-definition" },
35
- flow_add_task_relation: { method: "POST", path: "/v1/gaia/mcp/api/workflow/task-relation" },
36
- flow_get_task_params: { method: "GET", path: "/v1/gaia/mcp/api/workflow/task-params" },
37
- operations_search_flow_instances: { method: "POST", path: "/v1/gaia/mcp/api/operations/flow-instances/search" },
38
- operations_get_flow_instance_detail: { method: "GET", path: "/v1/gaia/mcp/api/operations/flow-instances/detail" },
39
- operations_get_task_instance_detail: { method: "GET", path: "/v1/gaia/mcp/api/operations/task-instances/detail" },
40
- operations_stop_flow_instance: { method: "POST", path: "/v1/gaia/mcp/api/operations/flow-instances/stop" },
41
- integration_list_datasource_components: { method: "GET", path: "/v1/gaia/mcp/api/integration/datasource-components" },
42
- integration_get_datasource_component_template: { method: "GET", path: "/v1/gaia/mcp/api/integration/datasource-component-template" },
43
- integration_list_space_datasources: { method: "GET", path: "/v1/gaia/mcp/api/integration/datasources" },
44
- integration_get_datasource_detail: { method: "GET", path: "/v1/gaia/mcp/api/integration/datasource-detail" },
45
- integration_test_datasource_connect: { method: "POST", path: "/v1/gaia/mcp/api/integration/datasource-connect-test" },
46
- integration_list_datasource_databases: { method: "GET", path: "/v1/gaia/mcp/api/integration/datasource-databases" },
47
- integration_list_datasource_tables: { method: "GET", path: "/v1/gaia/mcp/api/integration/datasource-tables" },
48
- integration_get_table_structure: { method: "GET", path: "/v1/gaia/mcp/api/integration/table-structure" },
49
- integration_list_sync_datasources: { method: "GET", path: "/v1/gaia/mcp/api/integration/sync-datasources" },
50
- integration_add_datasource: { method: "POST", path: "/v1/gaia/mcp/api/integration/datasources" },
51
- integration_modify_datasource: { method: "POST", path: "/v1/gaia/mcp/api/integration/datasource-modification" },
52
- integration_online_datasource: { method: "POST", path: "/v1/gaia/mcp/api/integration/datasource-online" },
53
- integration_list_sync_solutions: { method: "GET", path: "/v1/gaia/mcp/api/integration/sync-solutions" },
54
- integration_get_sync_detail: { method: "GET", path: "/v1/gaia/mcp/api/integration/sync-detail" },
55
- integration_list_sync_runs: { method: "GET", path: "/v1/gaia/mcp/api/integration/sync-runs" },
56
- integration_add_sync_solution: { method: "POST", path: "/v1/gaia/mcp/api/integration/sync-solutions" },
57
- integration_save_sync_solution: { method: "POST", path: "/v1/gaia/mcp/api/integration/sync-solution-save" },
58
- integration_exec_sync_solution: { method: "POST", path: "/v1/gaia/mcp/api/integration/sync-execution" },
59
- integration_stop_sync_solution: { method: "POST", path: "/v1/gaia/mcp/api/integration/sync-stop" },
60
- ide_list_repos: { method: "GET", path: "/v1/gaia/mcp/api/ide/repos" },
61
- ide_list_catalogs: { method: "GET", path: "/v1/gaia/mcp/api/ide/catalogs" },
62
- ide_list_tables: { method: "GET", path: "/v1/gaia/mcp/api/ide/tables" },
63
- ide_search_tables: { method: "GET", path: "/v1/gaia/mcp/api/ide/table-search" },
64
- ide_get_table_detail: { method: "GET", path: "/v1/gaia/mcp/api/ide/table-detail" },
65
- ide_get_schema_info: { method: "GET", path: "/v1/gaia/mcp/api/ide/schema-info" },
66
- ide_submit_sql_query: { method: "POST", path: "/v1/gaia/mcp/api/ide/sql-query-submit" },
67
- ide_get_sql_query_status: { method: "GET", path: "/v1/gaia/mcp/api/ide/sql-query-status" },
68
- ide_cancel_sql_query: { method: "POST", path: "/v1/gaia/mcp/api/ide/sql-query-cancel" }
21
+ repo_list_spaces: { method: "GET", path: "/api/cli/dataops/v1/gaia/repo/spaces" },
22
+ datatable_get_table_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/datatable/table-detail" },
23
+ datatable_dict_search_tables: { method: "GET", path: "/api/cli/dataops/v1/gaia/datatable/dict-tables" },
24
+ datatable_create_table: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/tables" },
25
+ datatable_create_view: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/views" },
26
+ datatable_publish_entity: { method: "POST", path: "/api/cli/dataops/v1/gaia/datatable/publish" },
27
+ flow_list_flows: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flows" },
28
+ flow_get_flow_overview: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flow-overview" },
29
+ flow_list_high_frequency_release_flows: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flow-release/high-frequency" },
30
+ flow_create_flow: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flows" },
31
+ flow_update_flow: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flow-basic" },
32
+ flow_save_schedule_config: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/schedule-config" },
33
+ flow_execute_flow: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flow-execution" },
34
+ flow_preview_release_flow: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flow-release/preview" },
35
+ flow_release_flow: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flow-release" },
36
+ flow_create_sql_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/tasks" },
37
+ flow_update_sql_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/sql-task-definition" },
38
+ flow_create_integration_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/integration-tasks" },
39
+ flow_update_integration_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/integration-task-definition" },
40
+ flow_add_task_relation: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-relation" },
41
+ flow_get_task_params: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/task-params" },
42
+ operations_search_flow_instances: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/flow-instances/search" },
43
+ operations_get_flow_instance_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/flow-instances/detail" },
44
+ operations_get_task_instance_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/task-instances/detail" },
45
+ operations_stop_flow_instance: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/flow-instances/stop" },
46
+ integration_list_datasource_components: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-components" },
47
+ integration_get_datasource_component_template: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-component-template" },
48
+ integration_list_space_datasources: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasources" },
49
+ integration_get_datasource_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-detail" },
50
+ integration_test_datasource_connect: { method: "POST", path: "/api/cli/dataops/v1/gaia/integration/datasource-connect-test" },
51
+ integration_list_datasource_databases: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-databases" },
52
+ integration_list_datasource_tables: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-tables" },
53
+ integration_get_table_structure: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/table-structure" },
54
+ integration_list_sync_datasources: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/sync-datasources" },
55
+ integration_add_datasource: { method: "POST", path: "/api/cli/dataops/v1/gaia/integration/datasources" },
56
+ integration_modify_datasource: { method: "POST", path: "/api/cli/dataops/v1/gaia/integration/datasource-modification" },
57
+ integration_online_datasource: { method: "POST", path: "/api/cli/dataops/v1/gaia/integration/datasource-online" },
58
+ integration_list_sync_solutions: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/sync-solutions" },
59
+ integration_get_sync_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/sync-detail" },
60
+ integration_list_sync_runs: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/sync-runs" },
61
+ integration_add_sync_solution: { method: "POST", path: "/api/cli/dataops/v1/gaia/integration/sync-solutions" },
62
+ integration_save_sync_solution: { method: "POST", path: "/api/cli/dataops/v1/gaia/integration/sync-solution-save" },
63
+ integration_exec_sync_solution: { method: "POST", path: "/api/cli/dataops/v1/gaia/integration/sync-execution" },
64
+ integration_stop_sync_solution: { method: "POST", path: "/api/cli/dataops/v1/gaia/integration/sync-stop" },
65
+ ide_list_repos: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/repos" },
66
+ ide_list_catalogs: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/catalogs" },
67
+ ide_list_tables: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/tables" },
68
+ ide_search_tables: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/table-search" },
69
+ ide_get_table_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/table-detail" },
70
+ ide_get_schema_info: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/schema-info" },
71
+ ide_submit_sql_query: { method: "POST", path: "/api/cli/dataops/v1/gaia/ide/sql-query-submit" },
72
+ ide_get_sql_query_status: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/sql-query-status" },
73
+ ide_cancel_sql_query: { method: "POST", path: "/api/cli/dataops/v1/gaia/ide/sql-query-cancel" }
69
74
  };
70
75
  async function callDataopsApi(ctx, toolName54, args = {}) {
71
76
  const spec = TOOL_API_MAP[toolName54];
@@ -99,10 +104,11 @@ function buildDataopsApiDryRun(ctx, toolName54, args = {}) {
99
104
  }
100
105
  async function dataopsRequest(ctx, method, path2, params = {}, body, retry = true) {
101
106
  const host = resolveHost(ctx.host());
102
- const token = await getToken(host);
107
+ const token = await getCliToken(host);
103
108
  const url = buildUrl(host, path2, params);
104
109
  const headers = {
105
- Authorization: `bearer ${token}`,
110
+ "cli-token": token,
111
+ "Accept": "application/json",
106
112
  "Content-Type": "application/json"
107
113
  };
108
114
  const options = { method, headers };
@@ -111,10 +117,14 @@ async function dataopsRequest(ctx, method, path2, params = {}, body, retry = tru
111
117
  }
112
118
  const resp = await fetch(url, options);
113
119
  const text = await resp.text();
114
- const data = parseResponseBody(text, url, resp.status);
120
+ const data = parseResponseBody(text, url, resp.status, !resp.ok);
115
121
  logger.api(method, url, resp.status, body, data);
116
- if ((resp.status === 401 || resp.status === 403) && retry) {
117
- clearToken(host);
122
+ if (resp.status === 403) {
123
+ throw new PermissionError(permissionMessage(data));
124
+ }
125
+ if (resp.status === 401 && retry) {
126
+ logger.warn(`DataOps request failed (HTTP 401) for ${host}, refreshing CLI token`);
127
+ clearCliToken(host);
118
128
  return dataopsRequest(ctx, method, path2, params, body, false);
119
129
  }
120
130
  if (!resp.ok) {
@@ -154,16 +164,26 @@ function unwrapDataResponse(data) {
154
164
  }
155
165
  return data;
156
166
  }
157
- function parseResponseBody(text, url, status) {
167
+ function parseResponseBody(text, url, status, allowPlainText = false) {
158
168
  try {
159
169
  return safeJsonParse(text);
160
170
  } catch {
171
+ if (allowPlainText) {
172
+ return text;
173
+ }
161
174
  const preview = text.trim().slice(0, 120);
162
175
  throw new Error(`AE API error: non-JSON response from ${url} (HTTP ${status}): ${preview || "<empty>"}`);
163
176
  }
164
177
  }
178
+ function permissionMessage(data) {
179
+ const detail = data?.error?.message || data?.message || data?.error || data?.return_message || data?.returnMessage;
180
+ if (detail && typeof detail === "string") {
181
+ return detail;
182
+ }
183
+ return "Permission denied for this resource (HTTP 403)";
184
+ }
165
185
  function formatHttpError(status, statusText, data) {
166
- const detail = data?.message || data?.error || data?.return_message || data?.returnMessage;
186
+ const detail = typeof data === "string" ? data : data?.message || data?.error || data?.return_message || data?.returnMessage;
167
187
  const path2 = data?.path ? ` path: ${data.path}` : "";
168
188
  return `AE API error: HTTP ${status} ${statusText}${detail ? ` - ${detail}` : ""}${path2}`;
169
189
  }
@@ -1347,6 +1367,7 @@ function buildArgs38(ctx) {
1347
1367
  spaceCode: ctx.str("spaceCode"),
1348
1368
  flowCode: ctx.num("flowCode"),
1349
1369
  flowInstanceId: ctx.num("flowInstanceId"),
1370
+ taskInstanceId: ctx.optionalNum("taskInstanceId"),
1350
1371
  taskCode: ctx.optionalNum("taskCode"),
1351
1372
  taskName: ctx.str("taskName"),
1352
1373
  includeLog: optionalBool2(ctx, "includeLog")
@@ -1355,13 +1376,14 @@ function buildArgs38(ctx) {
1355
1376
  var getTaskInstanceDetail = {
1356
1377
  service: "dataops_operations",
1357
1378
  command: "+get_task_instance_detail",
1358
- description: "Get one task instance detail. Requires spaceCode, flowCode, flowInstanceId, and either taskCode or exact taskName. taskCode wins when both are passed. includeLog defaults to false. Returns task, taskInstance, definition, and optional log.",
1379
+ description: "Get one task instance detail. Requires spaceCode, flowCode, flowInstanceId, and one selector: taskInstanceId, taskCode, or exact taskName. taskInstanceId is the precise selector for retried tasks and wins when passed. includeLog defaults to false.",
1359
1380
  flags: [
1360
1381
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1361
1382
  { name: "flowCode", type: "number", required: true, desc: "Task flow code from +search_flow_instances" },
1362
1383
  { name: "flowInstanceId", type: "number", required: true, desc: "Workflow instance ID from +search_flow_instances" },
1363
- { name: "taskCode", type: "number", required: false, desc: "Task code; preferred selector when known" },
1364
- { name: "taskName", type: "string", required: false, desc: "Exact task name, case-insensitive; used only when taskCode is omitted" },
1384
+ { name: "taskInstanceId", type: "number", required: false, desc: "Task instance ID; preferred selector for retried tasks" },
1385
+ { name: "taskCode", type: "number", required: false, desc: "Task code; used when taskInstanceId is omitted" },
1386
+ { name: "taskName", type: "string", required: false, desc: "Exact task name, case-insensitive; used only when taskInstanceId and taskCode are omitted" },
1365
1387
  { name: "includeLog", type: "boolean", required: false, desc: "Whether to include task logs. Default false" }
1366
1388
  ],
1367
1389
  risk: "read",
@@ -3,12 +3,12 @@ import {
3
3
  parseMcpResult,
4
4
  registerMcpMappings,
5
5
  resolveMcpUrl
6
- } from "./chunk-5FBLRSMU.js";
7
- import "./chunk-XE2PI5DS.js";
6
+ } from "./chunk-7QQ4233A.js";
7
+ import "./chunk-KGJQCYVC.js";
8
8
  import "./chunk-NOO24N7W.js";
9
- import "./chunk-FPE5LGVU.js";
10
- import "./chunk-U6QPKCN3.js";
11
- import "./chunk-WPXHCP4A.js";
9
+ import "./chunk-2NDGFQHW.js";
10
+ import "./chunk-AJTH7LT3.js";
11
+ import "./chunk-YCLVYFK7.js";
12
12
 
13
13
  // src/commands/te-engage/utils.ts
14
14
  function buildMcpDryRun(ctx, serviceName46, toolName46, args) {
@@ -532,8 +532,8 @@ function buildArgs15(ctx) {
532
532
  var flowNodeConfigSchema = {
533
533
  service: "engage",
534
534
  command: "+flow_node_config_schema",
535
- description: "Query the config schema for one flow node type.",
536
- flags: [{ name: "node_type", type: "string", required: true, desc: "Node type" }],
535
+ description: "Query one type-specific node config schema before constructing save_flow nodes or nodeConfigs.",
536
+ flags: [{ name: "node_type", type: "string", required: true, desc: "Flow node type, for example single_trigger, event_trigger, event_split_flow, or message_push" }],
537
537
  risk: "read",
538
538
  dryRun: (ctx) => buildMcpDryRun(ctx, serviceName15, toolName15, buildArgs15(ctx)),
539
539
  execute: async (ctx) => executeMcpCommand(ctx, serviceName15, toolName15, buildArgs15(ctx))
@@ -779,26 +779,41 @@ var modifyFlowBaseInfo = {
779
779
  // src/commands/te-engage/flow/save-flow.ts
780
780
  var serviceName21 = "engage_flow";
781
781
  var toolName21 = "save_flow";
782
+ var allowedOperations = ["build", "preview", "commit"];
783
+ function readAndValidateReq(ctx) {
784
+ const req = readRequiredJsonObject(ctx, "req");
785
+ const operation = typeof req.operation === "string" ? req.operation.trim().toLowerCase() : "";
786
+ if (!allowedOperations.includes(operation)) {
787
+ throw new Error(`Flag --req.operation must be one of: ${allowedOperations.join(", ")}`);
788
+ }
789
+ if ("nodeList" in req || "edgeList" in req) {
790
+ throw new Error("Flag --req must use nodes/edges instead of legacy nodeList/edgeList");
791
+ }
792
+ if ("sourceFlowUuid" in req) {
793
+ throw new Error("Flag --req.sourceFlowUuid is no longer supported; call +flow_detail and build nodes/edges instead");
794
+ }
795
+ return req;
796
+ }
782
797
  function buildArgs21(ctx) {
783
798
  return {
784
799
  projectId: ctx.num("project_id"),
785
800
  req: {
786
801
  projectId: ctx.num("project_id"),
787
- ...readRequiredJsonObject(ctx, "req")
802
+ ...readAndValidateReq(ctx)
788
803
  }
789
804
  };
790
805
  }
791
806
  var saveFlow = {
792
807
  service: "engage",
793
808
  command: "+save_flow",
794
- description: "Create or update a flow draft.",
809
+ description: "Create, preview, or commit an operation-based flow draft with req.operation=build, preview, or commit. Copy existing flows by querying detail first, then building nodes/edges.",
795
810
  flags: [
796
811
  { name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
797
- { name: "req", type: "json", required: true, desc: "Flow save request as JSON object" }
812
+ { name: "req", type: "json", required: true, desc: "Operation-based flow save request JSON object. Use operation=build with nodes/edges, operation=preview with draftId, or operation=commit with draftVersion and confirmToken. Do not use sourceFlowUuid clone mode." }
798
813
  ],
799
814
  risk: "write",
800
815
  validate: (ctx) => {
801
- readRequiredJsonObject(ctx, "req");
816
+ readAndValidateReq(ctx);
802
817
  },
803
818
  dryRun: (ctx) => buildMcpDryRun(ctx, serviceName21, toolName21, buildArgs21(ctx)),
804
819
  execute: async (ctx) => executeMcpCommand(ctx, serviceName21, toolName21, buildArgs21(ctx))
@@ -817,11 +832,11 @@ function buildArgs22(ctx) {
817
832
  var validateFlowNodeConfig = {
818
833
  service: "engage",
819
834
  command: "+validate_flow_node_config",
820
- description: "Validate one node config before save_flow.",
835
+ description: "Validate and normalize one candidate node config before placing it into save_flow.",
821
836
  flags: [
822
- { name: "node_type", type: "string", required: true, desc: "Node type" },
823
- { name: "config", type: "string", required: true, desc: "Node config JSON string" },
824
- { name: "operation_mode", type: "string", required: true, desc: "Validation mode" }
837
+ { name: "node_type", type: "string", required: true, desc: "Flow node type, for example single_trigger, event_trigger, event_split_flow, or message_push" },
838
+ { name: "config", type: "string", required: true, desc: "Node config JSON object encoded as a string" },
839
+ { name: "operation_mode", type: "string", required: true, desc: "Validation mode. Use save_flow for the current exposed MCP protocol; save_submit_flow applies stricter submit-time checks" }
825
840
  ],
826
841
  risk: "read",
827
842
  dryRun: (ctx) => buildMcpDryRun(ctx, serviceName22, toolName22, buildArgs22(ctx)),