@thinkingai/ae-cli 6.0.24 → 6.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{auth-A2XXG5K4.js → auth-7TQRGLBC.js} +10 -8
- package/dist/{auth-IDPKDFSY.js → auth-MEJ642P4.js} +2 -2
- package/dist/chunk-2NDGFQHW.js +190 -0
- package/dist/{chunk-NGJDCOYA.js → chunk-7QQ4233A.js} +3 -3
- package/dist/{chunk-PFJFZVCK.js → chunk-AJTH7LT3.js} +3 -2
- package/dist/{chunk-V5R5UIRM.js → chunk-BXMXMUD7.js} +65 -6
- package/dist/{chunk-AKORWVHJ.js → chunk-C4DH76LX.js} +1 -1
- package/dist/{chunk-NXJP4CES.js → chunk-GWZ5MYWE.js} +3 -3
- package/dist/{chunk-F3ZDMC2W.js → chunk-KCA6BA5D.js} +2 -2
- package/dist/{chunk-WXBCP6SD.js → chunk-KGJQCYVC.js} +1 -1
- package/dist/{chunk-FIT4CFIN.js → chunk-LG5YT7P7.js} +1 -1
- package/dist/{chunk-IDXW6MEJ.js → chunk-MDJGDI6K.js} +2 -2
- package/dist/{chunk-4FQ36OGO.js → chunk-R77JT7XD.js} +53 -6
- package/dist/{chunk-65DKFJZB.js → chunk-YCLVYFK7.js} +49 -6
- package/dist/{chunk-2OW2RENH.js → chunk-YNQFYBDB.js} +64 -6
- package/dist/{chunk-ONOA6DYB.js → chunk-ZAOL36CG.js} +1 -1
- package/dist/cli-token-TVQRSE46.js +18 -0
- package/dist/{client-7L735LVY.js → client-2643Z5AG.js} +3 -3
- package/dist/{config-SXD2JKSL.js → config-ZVPARN4R.js} +4 -9
- package/dist/index.js +24 -24
- package/dist/{metadata-QWUAX625.js → metadata-IPSPQBX3.js} +5 -5
- package/dist/{metadata-XWTEGEN2.js → metadata-N5REJ7R7.js} +5 -5
- package/dist/{model-3OVX42DA.js → model-T3KZJWLW.js} +2 -2
- package/dist/{raw-IANB4AV5.js → raw-OHSUK42D.js} +4 -4
- package/dist/{sync-4HQ3CXSK.js → sync-ULT5SECP.js} +3 -3
- package/dist/{te-agent-OYNNTJDU.js → te-agent-QLIVKRUN.js} +1146 -61
- package/dist/{te-analysis-JX3V76OI.js → te-analysis-5WZKVFHI.js} +1332 -338
- package/dist/{te-analysis-CRPFK3LX.js → te-analysis-KAEZXLNS.js} +1332 -338
- package/dist/{te-audience-RO2IZOUC.js → te-audience-PVMKQAFH.js} +5 -5
- package/dist/{te-audience-77FGNG5E.js → te-audience-XMRMVD2V.js} +5 -5
- package/dist/{te-common-4TRJPRC5.js → te-common-CFGQXTFV.js} +5 -5
- package/dist/{te-common-PUXBUPOL.js → te-common-SDB3O2QG.js} +5 -5
- package/dist/{te-community-XKE526DS.js → te-community-6A7LKYUH.js} +5 -5
- package/dist/{te-community-NPDZQKMY.js → te-community-GMWFGILT.js} +5 -5
- package/dist/{te-dataops-PW74WP76.js → te-dataops-6LIPYNGH.js} +90 -68
- package/dist/{te-dataops-6KWLFNV4.js → te-dataops-Z53CTG2U.js} +90 -68
- package/dist/{te-engage-HTLMUN7G.js → te-engage-AGREUOW7.js} +30 -15
- package/dist/{te-engage-YPQIVF5H.js → te-engage-MIIUKY6M.js} +30 -15
- package/dist/{te-kb-DOGDQIU4.js → te-kb-KQJ53M3A.js} +4 -4
- package/dist/{te-meta-5ESSQ5B3.js → te-meta-QLANJ4B4.js} +5 -5
- package/dist/{te-meta-Z47X4VT3.js → te-meta-TOA6FWDE.js} +5 -5
- package/dist/{te-team-SOVKZIDD.js → te-team-TQGMNHQQ.js} +5 -5
- package/package.json +3 -1
- package/skills/ae-agent/SKILL.md +158 -189
- package/skills/ae-agent/references/accept-skill-share.md +39 -0
- package/skills/ae-agent/references/add-attachment.md +57 -0
- package/skills/ae-agent/references/add-mcp.md +75 -0
- package/skills/ae-agent/references/add-model.md +70 -0
- package/skills/ae-agent/references/add-skill.md +71 -0
- package/skills/ae-agent/references/approve-skill.md +41 -0
- package/skills/ae-agent/references/attachment-stats.md +50 -0
- package/skills/ae-agent/references/auto-provision-mcp-credentials.md +57 -0
- package/skills/ae-agent/references/cancel-skill-submission.md +39 -0
- package/skills/ae-agent/references/copy-skill.md +53 -0
- package/skills/ae-agent/references/create-agent.md +71 -0
- package/skills/ae-agent/references/create-automation.md +99 -0
- package/skills/ae-agent/references/del-agent.md +38 -0
- package/skills/ae-agent/references/del-attachment.md +35 -0
- package/skills/ae-agent/references/del-mcp.md +35 -0
- package/skills/ae-agent/references/del-model.md +37 -0
- package/skills/ae-agent/references/del-skill-asset.md +41 -0
- package/skills/ae-agent/references/del-skill-reference.md +41 -0
- package/skills/ae-agent/references/del-skill-script.md +41 -0
- package/skills/ae-agent/references/del-skill.md +36 -0
- package/skills/ae-agent/references/edit-skill.md +64 -0
- package/skills/ae-agent/references/get-agent.md +37 -0
- package/skills/ae-agent/references/get-skill-content.md +36 -0
- package/skills/ae-agent/references/list-agents.md +40 -0
- package/skills/ae-agent/references/list-attachments.md +42 -0
- package/skills/ae-agent/references/list-automations.md +41 -0
- package/skills/ae-agent/references/list-mcp-credentials.md +65 -0
- package/skills/ae-agent/references/list-mcp-market.md +58 -0
- package/skills/ae-agent/references/list-mcps.md +37 -0
- package/skills/ae-agent/references/list-models.md +38 -0
- package/skills/ae-agent/references/list-skill-assets.md +35 -0
- package/skills/ae-agent/references/list-skill-market.md +59 -0
- package/skills/ae-agent/references/list-skill-references.md +36 -0
- package/skills/ae-agent/references/list-skill-scripts.md +35 -0
- package/skills/ae-agent/references/list-skill-shares.md +49 -0
- package/skills/ae-agent/references/list-skill-submissions.md +45 -0
- package/skills/ae-agent/references/list-skills.md +37 -0
- package/skills/ae-agent/references/mcp-auth-disconnect.md +50 -0
- package/skills/ae-agent/references/mcp-auth-start.md +61 -0
- package/skills/ae-agent/references/mcp-auth-status.md +56 -0
- package/skills/ae-agent/references/mcp-stats.md +68 -0
- package/skills/ae-agent/references/mcp-token.md +63 -0
- package/skills/ae-agent/references/mcp-tools.md +55 -0
- package/skills/ae-agent/references/read-skill-asset.md +51 -0
- package/skills/ae-agent/references/read-skill-reference.md +50 -0
- package/skills/ae-agent/references/read-skill-script.md +51 -0
- package/skills/ae-agent/references/reject-skill-share.md +37 -0
- package/skills/ae-agent/references/reject-skill.md +42 -0
- package/skills/ae-agent/references/rescan-skills.md +44 -0
- package/skills/ae-agent/references/set-mcp-credential.md +67 -0
- package/skills/ae-agent/references/set-mcp-meta.md +52 -0
- package/skills/ae-agent/references/set-skill-meta.md +51 -0
- package/skills/ae-agent/references/share-skill.md +50 -0
- package/skills/ae-agent/references/submit-skill.md +51 -0
- package/skills/ae-agent/references/test-model.md +61 -0
- package/skills/ae-agent/references/toggle-mcp.md +39 -0
- package/skills/ae-agent/references/toggle-model.md +37 -0
- package/skills/ae-agent/references/toggle-skill.md +37 -0
- package/skills/ae-agent/references/update-agent.md +71 -0
- package/skills/ae-agent/references/update-automation.md +83 -0
- package/skills/ae-agent/references/update-mcp.md +79 -0
- package/skills/ae-agent/references/update-model.md +77 -0
- package/skills/ae-agent/references/upload-skill-asset.md +49 -0
- package/skills/ae-agent/references/upload-skill-reference.md +51 -0
- package/skills/ae-agent/references/upload-skill-script.md +49 -0
- package/skills/ae-agent/references/upload-skill.md +89 -0
- package/skills/ae-analysis/SKILL.md +60 -6
- package/skills/ae-analysis/references/analysis_gateway_assets.md +27 -10
- package/skills/ae-analysis/references/artifact_download.md +17 -0
- package/skills/ae-analysis/references/asset_abnormal_get.md +27 -0
- package/skills/ae-analysis/references/asset_abnormal_list.md +24 -0
- package/skills/ae-analysis/references/asset_authentication_list.md +23 -0
- package/skills/ae-analysis/references/asset_authentication_update.md +24 -0
- package/skills/ae-analysis/references/asset_recent_list.md +24 -0
- package/skills/ae-analysis/references/asset_search.md +24 -0
- package/skills/ae-analysis/references/bi_panel_get.md +5 -0
- package/skills/ae-analysis/references/bi_panel_page_data_export.md +11 -1
- package/skills/ae-analysis/references/bi_panel_share.md +6 -0
- package/skills/ae-analysis/references/bi_panel_update.md +4 -1
- package/skills/ae-analysis/references/bi_panel_version_get.md +23 -0
- package/skills/ae-analysis/references/bi_panel_version_publish.md +20 -0
- package/skills/ae-analysis/references/dashboard_copy.md +3 -1
- package/skills/ae-analysis/references/dashboard_daily_report_send.md +9 -2
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +3 -1
- package/skills/ae-analysis/references/dashboard_definition_export.md +21 -3
- package/skills/ae-analysis/references/dashboard_report_data_export.md +17 -1
- package/skills/ae-analysis/references/dashboard_report_data_run.md +6 -0
- package/skills/ae-analysis/references/datatable_columns_get.md +24 -0
- package/skills/ae-analysis/references/datatable_influence_list.md +24 -0
- package/skills/ae-analysis/references/datatable_version_get.md +24 -0
- package/skills/ae-analysis/references/datatable_version_list.md +24 -0
- package/skills/ae-analysis/references/event_changelog_list.md +24 -0
- package/skills/ae-analysis/references/event_create.md +24 -0
- package/skills/ae-analysis/references/event_delete.md +24 -0
- package/skills/ae-analysis/references/event_get.md +24 -0
- package/skills/ae-analysis/references/event_hide_update.md +25 -0
- package/skills/ae-analysis/references/event_influence_list.md +24 -0
- package/skills/ae-analysis/references/event_list.md +23 -0
- package/skills/ae-analysis/references/event_relation_update.md +24 -0
- package/skills/ae-analysis/references/event_update.md +26 -0
- package/skills/ae-analysis/references/exchange_config_update.md +24 -0
- package/skills/ae-analysis/references/exchange_rate_refresh.md +23 -0
- package/skills/ae-analysis/references/exchange_rule_list.md +23 -0
- package/skills/ae-analysis/references/exchange_rule_update.md +24 -0
- package/skills/ae-analysis/references/exchange_rule_validate.md +24 -0
- package/skills/ae-analysis/references/metric_create.md +24 -0
- package/skills/ae-analysis/references/metric_delete.md +24 -0
- package/skills/ae-analysis/references/metric_get.md +24 -0
- package/skills/ae-analysis/references/metric_list.md +24 -0
- package/skills/ae-analysis/references/metric_update.md +24 -0
- package/skills/ae-analysis/references/project_space_create.md +1 -1
- package/skills/ae-analysis/references/property_changelog_list.md +25 -0
- package/skills/ae-analysis/references/property_create.md +25 -0
- package/skills/ae-analysis/references/property_delete.md +25 -0
- package/skills/ae-analysis/references/property_get.md +25 -0
- package/skills/ae-analysis/references/property_hide_update.md +26 -0
- package/skills/ae-analysis/references/property_influence_list.md +25 -0
- package/skills/ae-analysis/references/property_list.md +24 -0
- package/skills/ae-analysis/references/property_related_events.md +24 -0
- package/skills/ae-analysis/references/property_relation_update.md +25 -0
- package/skills/ae-analysis/references/property_update.md +27 -0
- package/skills/ae-analysis/references/run_inspect.md +22 -0
- package/skills/ae-analysis/references/super_metadata_export.md +36 -0
- package/skills/ae-analysis/references/super_metadata_import.md +24 -0
- package/skills/ae-analysis/references/virtual_event_create.md +25 -0
- package/skills/ae-analysis/references/virtual_event_delete.md +24 -0
- package/skills/ae-analysis/references/virtual_event_get.md +24 -0
- package/skills/ae-analysis/references/virtual_property_create.md +24 -0
- package/skills/ae-analysis/references/virtual_property_sql_rule_delete.md +25 -0
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +24 -0
- package/skills/ae-dataops/references/dataops-flow-create.md +2 -2
- package/skills/ae-dataops/references/dataops-flow-monitor.md +3 -3
- package/skills/ae-dataops/references/dataops-integration.md +1 -0
- package/skills/ae-engage/references/flow-node-config-schema.md +32 -8
- package/skills/ae-engage/references/save-flow.md +65 -29
- package/skills/ae-engage/references/validate-flow-node-config.md +28 -10
- package/skills/ae-generate-tracking-code/SKILL.md +16 -1
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +17 -1
- package/skills/ae-generate-tracking-plan/SKILL.md +36 -12
- package/dist/chunk-OCQPQYHZ.js +0 -105
- package/dist/cli-token-OZXHC3U2.js +0 -14
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
callMcpTool,
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
resolveMcpUrl
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-7QQ4233A.js";
|
|
6
|
+
import "./chunk-KGJQCYVC.js";
|
|
7
7
|
import "./chunk-NOO24N7W.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-2NDGFQHW.js";
|
|
9
|
+
import "./chunk-AJTH7LT3.js";
|
|
10
|
+
import "./chunk-YCLVYFK7.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/te-audience/shared.ts
|
|
13
13
|
function createMcpCommand(config) {
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
callMcpTool,
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
resolveMcpUrl
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-GWZ5MYWE.js";
|
|
6
|
+
import "./chunk-KGJQCYVC.js";
|
|
7
7
|
import "./chunk-NOO24N7W.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-2NDGFQHW.js";
|
|
9
|
+
import "./chunk-AJTH7LT3.js";
|
|
10
|
+
import "./chunk-YCLVYFK7.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/te-audience/shared.ts
|
|
13
13
|
function createMcpCommand(config) {
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
callMcpTool,
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
resolveMcpUrl
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-7QQ4233A.js";
|
|
6
|
+
import "./chunk-KGJQCYVC.js";
|
|
7
7
|
import "./chunk-NOO24N7W.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-2NDGFQHW.js";
|
|
9
|
+
import "./chunk-AJTH7LT3.js";
|
|
10
|
+
import "./chunk-YCLVYFK7.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/te-common/shared.ts
|
|
13
13
|
function createMcpCommand(config) {
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
callMcpTool,
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
resolveMcpUrl
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-GWZ5MYWE.js";
|
|
6
|
+
import "./chunk-KGJQCYVC.js";
|
|
7
7
|
import "./chunk-NOO24N7W.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-2NDGFQHW.js";
|
|
9
|
+
import "./chunk-AJTH7LT3.js";
|
|
10
|
+
import "./chunk-YCLVYFK7.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/te-common/shared.ts
|
|
13
13
|
function createMcpCommand(config) {
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
registerMcpMappings,
|
|
5
5
|
resolveMcpUrl
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-7QQ4233A.js";
|
|
7
|
+
import "./chunk-KGJQCYVC.js";
|
|
8
8
|
import "./chunk-NOO24N7W.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-2NDGFQHW.js";
|
|
10
|
+
import "./chunk-AJTH7LT3.js";
|
|
11
|
+
import "./chunk-YCLVYFK7.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/te-community/get_channel_info.ts
|
|
14
14
|
var getChannelInfo = {
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
registerMcpMappings,
|
|
5
5
|
resolveMcpUrl
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-GWZ5MYWE.js";
|
|
7
|
+
import "./chunk-KGJQCYVC.js";
|
|
8
8
|
import "./chunk-NOO24N7W.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-2NDGFQHW.js";
|
|
10
|
+
import "./chunk-AJTH7LT3.js";
|
|
11
|
+
import "./chunk-YCLVYFK7.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/te-community/get_channel_info.ts
|
|
14
14
|
var getChannelInfo = {
|
|
@@ -1,71 +1,76 @@
|
|
|
1
1
|
import {
|
|
2
2
|
printError
|
|
3
|
-
} from "./chunk-
|
|
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
|
-
getToken,
|
|
6
|
-
invalidateAccessTokenForRetry,
|
|
7
12
|
resolveHost
|
|
8
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AJTH7LT3.js";
|
|
9
14
|
import {
|
|
10
15
|
logger,
|
|
11
16
|
safeJsonParse
|
|
12
|
-
} from "./chunk-
|
|
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/
|
|
17
|
-
datatable_get_table_detail: { method: "GET", path: "/v1/gaia/
|
|
18
|
-
datatable_dict_search_tables: { method: "GET", path: "/v1/gaia/
|
|
19
|
-
datatable_create_table: { method: "POST", path: "/v1/gaia/
|
|
20
|
-
datatable_create_view: { method: "POST", path: "/v1/gaia/
|
|
21
|
-
datatable_publish_entity: { method: "POST", path: "/v1/gaia/
|
|
22
|
-
flow_list_flows: { method: "GET", path: "/v1/gaia/
|
|
23
|
-
flow_get_flow_overview: { method: "GET", path: "/v1/gaia/
|
|
24
|
-
flow_list_high_frequency_release_flows: { method: "GET", path: "/v1/gaia/
|
|
25
|
-
flow_create_flow: { method: "POST", path: "/v1/gaia/
|
|
26
|
-
flow_update_flow: { method: "POST", path: "/v1/gaia/
|
|
27
|
-
flow_save_schedule_config: { method: "POST", path: "/v1/gaia/
|
|
28
|
-
flow_execute_flow: { method: "POST", path: "/v1/gaia/
|
|
29
|
-
flow_preview_release_flow: { method: "GET", path: "/v1/gaia/
|
|
30
|
-
flow_release_flow: { method: "POST", path: "/v1/gaia/
|
|
31
|
-
flow_create_sql_task: { method: "POST", path: "/v1/gaia/
|
|
32
|
-
flow_update_sql_task: { method: "POST", path: "/v1/gaia/
|
|
33
|
-
flow_create_integration_task: { method: "POST", path: "/v1/gaia/
|
|
34
|
-
flow_update_integration_task: { method: "POST", path: "/v1/gaia/
|
|
35
|
-
flow_add_task_relation: { method: "POST", path: "/v1/gaia/
|
|
36
|
-
flow_get_task_params: { method: "GET", path: "/v1/gaia/
|
|
37
|
-
operations_search_flow_instances: { method: "POST", path: "/v1/gaia/
|
|
38
|
-
operations_get_flow_instance_detail: { method: "GET", path: "/v1/gaia/
|
|
39
|
-
operations_get_task_instance_detail: { method: "GET", path: "/v1/gaia/
|
|
40
|
-
operations_stop_flow_instance: { method: "POST", path: "/v1/gaia/
|
|
41
|
-
integration_list_datasource_components: { method: "GET", path: "/v1/gaia/
|
|
42
|
-
integration_get_datasource_component_template: { method: "GET", path: "/v1/gaia/
|
|
43
|
-
integration_list_space_datasources: { method: "GET", path: "/v1/gaia/
|
|
44
|
-
integration_get_datasource_detail: { method: "GET", path: "/v1/gaia/
|
|
45
|
-
integration_test_datasource_connect: { method: "POST", path: "/v1/gaia/
|
|
46
|
-
integration_list_datasource_databases: { method: "GET", path: "/v1/gaia/
|
|
47
|
-
integration_list_datasource_tables: { method: "GET", path: "/v1/gaia/
|
|
48
|
-
integration_get_table_structure: { method: "GET", path: "/v1/gaia/
|
|
49
|
-
integration_list_sync_datasources: { method: "GET", path: "/v1/gaia/
|
|
50
|
-
integration_add_datasource: { method: "POST", path: "/v1/gaia/
|
|
51
|
-
integration_modify_datasource: { method: "POST", path: "/v1/gaia/
|
|
52
|
-
integration_online_datasource: { method: "POST", path: "/v1/gaia/
|
|
53
|
-
integration_list_sync_solutions: { method: "GET", path: "/v1/gaia/
|
|
54
|
-
integration_get_sync_detail: { method: "GET", path: "/v1/gaia/
|
|
55
|
-
integration_list_sync_runs: { method: "GET", path: "/v1/gaia/
|
|
56
|
-
integration_add_sync_solution: { method: "POST", path: "/v1/gaia/
|
|
57
|
-
integration_save_sync_solution: { method: "POST", path: "/v1/gaia/
|
|
58
|
-
integration_exec_sync_solution: { method: "POST", path: "/v1/gaia/
|
|
59
|
-
integration_stop_sync_solution: { method: "POST", path: "/v1/gaia/
|
|
60
|
-
ide_list_repos: { method: "GET", path: "/v1/gaia/
|
|
61
|
-
ide_list_catalogs: { method: "GET", path: "/v1/gaia/
|
|
62
|
-
ide_list_tables: { method: "GET", path: "/v1/gaia/
|
|
63
|
-
ide_search_tables: { method: "GET", path: "/v1/gaia/
|
|
64
|
-
ide_get_table_detail: { method: "GET", path: "/v1/gaia/
|
|
65
|
-
ide_get_schema_info: { method: "GET", path: "/v1/gaia/
|
|
66
|
-
ide_submit_sql_query: { method: "POST", path: "/v1/gaia/
|
|
67
|
-
ide_get_sql_query_status: { method: "GET", path: "/v1/gaia/
|
|
68
|
-
ide_cancel_sql_query: { method: "POST", path: "/v1/gaia/
|
|
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
|
|
107
|
+
const token = await getCliToken(host);
|
|
103
108
|
const url = buildUrl(host, path2, params);
|
|
104
109
|
const headers = {
|
|
105
|
-
|
|
110
|
+
"cli-token": token,
|
|
111
|
+
"Accept": "application/json",
|
|
106
112
|
"Content-Type": "application/json",
|
|
107
113
|
"X-Source": "ae-cli"
|
|
108
114
|
};
|
|
@@ -112,10 +118,14 @@ async function dataopsRequest(ctx, method, path2, params = {}, body, retry = tru
|
|
|
112
118
|
}
|
|
113
119
|
const resp = await fetch(url, options);
|
|
114
120
|
const text = await resp.text();
|
|
115
|
-
const data = parseResponseBody(text, url, resp.status);
|
|
121
|
+
const data = parseResponseBody(text, url, resp.status, !resp.ok);
|
|
116
122
|
logger.api(method, url, resp.status, body, data);
|
|
117
|
-
if (
|
|
118
|
-
|
|
123
|
+
if (resp.status === 403) {
|
|
124
|
+
throw new PermissionError(permissionMessage(data));
|
|
125
|
+
}
|
|
126
|
+
if (resp.status === 401 && retry) {
|
|
127
|
+
logger.warn(`DataOps request failed (HTTP 401) for ${host}, refreshing CLI token`);
|
|
128
|
+
clearCliToken(host);
|
|
119
129
|
return dataopsRequest(ctx, method, path2, params, body, false);
|
|
120
130
|
}
|
|
121
131
|
if (!resp.ok) {
|
|
@@ -155,16 +165,26 @@ function unwrapDataResponse(data) {
|
|
|
155
165
|
}
|
|
156
166
|
return data;
|
|
157
167
|
}
|
|
158
|
-
function parseResponseBody(text, url, status) {
|
|
168
|
+
function parseResponseBody(text, url, status, allowPlainText = false) {
|
|
159
169
|
try {
|
|
160
170
|
return safeJsonParse(text);
|
|
161
171
|
} catch {
|
|
172
|
+
if (allowPlainText) {
|
|
173
|
+
return text;
|
|
174
|
+
}
|
|
162
175
|
const preview = text.trim().slice(0, 120);
|
|
163
176
|
throw new Error(`AE API error: non-JSON response from ${url} (HTTP ${status}): ${preview || "<empty>"}`);
|
|
164
177
|
}
|
|
165
178
|
}
|
|
179
|
+
function permissionMessage(data) {
|
|
180
|
+
const detail = data?.error?.message || data?.message || data?.error || data?.return_message || data?.returnMessage;
|
|
181
|
+
if (detail && typeof detail === "string") {
|
|
182
|
+
return detail;
|
|
183
|
+
}
|
|
184
|
+
return "Permission denied for this resource (HTTP 403)";
|
|
185
|
+
}
|
|
166
186
|
function formatHttpError(status, statusText, data) {
|
|
167
|
-
const detail = data?.message || data?.error || data?.return_message || data?.returnMessage;
|
|
187
|
+
const detail = typeof data === "string" ? data : data?.message || data?.error || data?.return_message || data?.returnMessage;
|
|
168
188
|
const path2 = data?.path ? ` path: ${data.path}` : "";
|
|
169
189
|
return `AE API error: HTTP ${status} ${statusText}${detail ? ` - ${detail}` : ""}${path2}`;
|
|
170
190
|
}
|
|
@@ -1348,6 +1368,7 @@ function buildArgs38(ctx) {
|
|
|
1348
1368
|
spaceCode: ctx.str("spaceCode"),
|
|
1349
1369
|
flowCode: ctx.num("flowCode"),
|
|
1350
1370
|
flowInstanceId: ctx.num("flowInstanceId"),
|
|
1371
|
+
taskInstanceId: ctx.optionalNum("taskInstanceId"),
|
|
1351
1372
|
taskCode: ctx.optionalNum("taskCode"),
|
|
1352
1373
|
taskName: ctx.str("taskName"),
|
|
1353
1374
|
includeLog: optionalBool2(ctx, "includeLog")
|
|
@@ -1356,13 +1377,14 @@ function buildArgs38(ctx) {
|
|
|
1356
1377
|
var getTaskInstanceDetail = {
|
|
1357
1378
|
service: "dataops_operations",
|
|
1358
1379
|
command: "+get_task_instance_detail",
|
|
1359
|
-
description: "Get one task instance detail. Requires spaceCode, flowCode, flowInstanceId, and
|
|
1380
|
+
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.",
|
|
1360
1381
|
flags: [
|
|
1361
1382
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1362
1383
|
{ name: "flowCode", type: "number", required: true, desc: "Task flow code from +search_flow_instances" },
|
|
1363
1384
|
{ name: "flowInstanceId", type: "number", required: true, desc: "Workflow instance ID from +search_flow_instances" },
|
|
1364
|
-
{ name: "
|
|
1365
|
-
{ name: "
|
|
1385
|
+
{ name: "taskInstanceId", type: "number", required: false, desc: "Task instance ID; preferred selector for retried tasks" },
|
|
1386
|
+
{ name: "taskCode", type: "number", required: false, desc: "Task code; used when taskInstanceId is omitted" },
|
|
1387
|
+
{ name: "taskName", type: "string", required: false, desc: "Exact task name, case-insensitive; used only when taskInstanceId and taskCode are omitted" },
|
|
1366
1388
|
{ name: "includeLog", type: "boolean", required: false, desc: "Whether to include task logs. Default false" }
|
|
1367
1389
|
],
|
|
1368
1390
|
risk: "read",
|
|
@@ -1,71 +1,76 @@
|
|
|
1
1
|
import {
|
|
2
2
|
printError
|
|
3
|
-
} from "./chunk-
|
|
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
|
-
getToken,
|
|
6
|
-
invalidateAccessTokenForRetry,
|
|
7
12
|
resolveHost
|
|
8
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AJTH7LT3.js";
|
|
9
14
|
import {
|
|
10
15
|
logger,
|
|
11
16
|
safeJsonParse
|
|
12
|
-
} from "./chunk-
|
|
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/
|
|
17
|
-
datatable_get_table_detail: { method: "GET", path: "/v1/gaia/
|
|
18
|
-
datatable_dict_search_tables: { method: "GET", path: "/v1/gaia/
|
|
19
|
-
datatable_create_table: { method: "POST", path: "/v1/gaia/
|
|
20
|
-
datatable_create_view: { method: "POST", path: "/v1/gaia/
|
|
21
|
-
datatable_publish_entity: { method: "POST", path: "/v1/gaia/
|
|
22
|
-
flow_list_flows: { method: "GET", path: "/v1/gaia/
|
|
23
|
-
flow_get_flow_overview: { method: "GET", path: "/v1/gaia/
|
|
24
|
-
flow_list_high_frequency_release_flows: { method: "GET", path: "/v1/gaia/
|
|
25
|
-
flow_create_flow: { method: "POST", path: "/v1/gaia/
|
|
26
|
-
flow_update_flow: { method: "POST", path: "/v1/gaia/
|
|
27
|
-
flow_save_schedule_config: { method: "POST", path: "/v1/gaia/
|
|
28
|
-
flow_execute_flow: { method: "POST", path: "/v1/gaia/
|
|
29
|
-
flow_preview_release_flow: { method: "GET", path: "/v1/gaia/
|
|
30
|
-
flow_release_flow: { method: "POST", path: "/v1/gaia/
|
|
31
|
-
flow_create_sql_task: { method: "POST", path: "/v1/gaia/
|
|
32
|
-
flow_update_sql_task: { method: "POST", path: "/v1/gaia/
|
|
33
|
-
flow_create_integration_task: { method: "POST", path: "/v1/gaia/
|
|
34
|
-
flow_update_integration_task: { method: "POST", path: "/v1/gaia/
|
|
35
|
-
flow_add_task_relation: { method: "POST", path: "/v1/gaia/
|
|
36
|
-
flow_get_task_params: { method: "GET", path: "/v1/gaia/
|
|
37
|
-
operations_search_flow_instances: { method: "POST", path: "/v1/gaia/
|
|
38
|
-
operations_get_flow_instance_detail: { method: "GET", path: "/v1/gaia/
|
|
39
|
-
operations_get_task_instance_detail: { method: "GET", path: "/v1/gaia/
|
|
40
|
-
operations_stop_flow_instance: { method: "POST", path: "/v1/gaia/
|
|
41
|
-
integration_list_datasource_components: { method: "GET", path: "/v1/gaia/
|
|
42
|
-
integration_get_datasource_component_template: { method: "GET", path: "/v1/gaia/
|
|
43
|
-
integration_list_space_datasources: { method: "GET", path: "/v1/gaia/
|
|
44
|
-
integration_get_datasource_detail: { method: "GET", path: "/v1/gaia/
|
|
45
|
-
integration_test_datasource_connect: { method: "POST", path: "/v1/gaia/
|
|
46
|
-
integration_list_datasource_databases: { method: "GET", path: "/v1/gaia/
|
|
47
|
-
integration_list_datasource_tables: { method: "GET", path: "/v1/gaia/
|
|
48
|
-
integration_get_table_structure: { method: "GET", path: "/v1/gaia/
|
|
49
|
-
integration_list_sync_datasources: { method: "GET", path: "/v1/gaia/
|
|
50
|
-
integration_add_datasource: { method: "POST", path: "/v1/gaia/
|
|
51
|
-
integration_modify_datasource: { method: "POST", path: "/v1/gaia/
|
|
52
|
-
integration_online_datasource: { method: "POST", path: "/v1/gaia/
|
|
53
|
-
integration_list_sync_solutions: { method: "GET", path: "/v1/gaia/
|
|
54
|
-
integration_get_sync_detail: { method: "GET", path: "/v1/gaia/
|
|
55
|
-
integration_list_sync_runs: { method: "GET", path: "/v1/gaia/
|
|
56
|
-
integration_add_sync_solution: { method: "POST", path: "/v1/gaia/
|
|
57
|
-
integration_save_sync_solution: { method: "POST", path: "/v1/gaia/
|
|
58
|
-
integration_exec_sync_solution: { method: "POST", path: "/v1/gaia/
|
|
59
|
-
integration_stop_sync_solution: { method: "POST", path: "/v1/gaia/
|
|
60
|
-
ide_list_repos: { method: "GET", path: "/v1/gaia/
|
|
61
|
-
ide_list_catalogs: { method: "GET", path: "/v1/gaia/
|
|
62
|
-
ide_list_tables: { method: "GET", path: "/v1/gaia/
|
|
63
|
-
ide_search_tables: { method: "GET", path: "/v1/gaia/
|
|
64
|
-
ide_get_table_detail: { method: "GET", path: "/v1/gaia/
|
|
65
|
-
ide_get_schema_info: { method: "GET", path: "/v1/gaia/
|
|
66
|
-
ide_submit_sql_query: { method: "POST", path: "/v1/gaia/
|
|
67
|
-
ide_get_sql_query_status: { method: "GET", path: "/v1/gaia/
|
|
68
|
-
ide_cancel_sql_query: { method: "POST", path: "/v1/gaia/
|
|
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
|
|
107
|
+
const token = await getCliToken(host);
|
|
103
108
|
const url = buildUrl(host, path2, params);
|
|
104
109
|
const headers = {
|
|
105
|
-
|
|
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 (
|
|
117
|
-
|
|
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
|
|
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: "
|
|
1364
|
-
{ name: "
|
|
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",
|