@thinkingai/ae-cli 6.1.18 → 6.1.20
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/README.md +97 -38
- package/README.zh.md +101 -38
- package/dist/{auth-ROB2EDYV.js → auth-FUM37MHF.js} +241 -126
- package/dist/{capability-DKMYUTLC.js → capability-AXFQW5WM.js} +49 -35
- package/dist/{chunk-JHENBQ5B.js → chunk-4P355ZWB.js} +70 -1
- package/dist/chunk-6ZIQV5GW.js +26 -0
- package/dist/{chunk-TUKQZTMI.js → chunk-7K24F7T2.js} +2 -0
- package/dist/{chunk-OO6XR6LK.js → chunk-AMBFK2K3.js} +2 -0
- package/dist/chunk-ATSM5XAW.js +623 -0
- package/dist/{chunk-4XXOWOTA.js → chunk-BBEFP4SB.js} +31 -38
- package/dist/{chunk-BYYS3ANB.js → chunk-CZU3V3DQ.js} +5 -15
- package/dist/{chunk-VTWMIC5L.js → chunk-E2JKXMVO.js} +2 -0
- package/dist/chunk-ECBLHAZO.js +15 -0
- package/dist/{sync-HKIOZXQE.js → chunk-I4WQAEYB.js} +31 -540
- package/dist/{chunk-DWO43OIB.js → chunk-JQ3ENZZH.js} +2 -0
- package/dist/chunk-LNZBEQXW.js +25216 -0
- package/dist/{chunk-ZQ47LWTI.js → chunk-QJQZH5GQ.js} +49 -79
- package/dist/{chunk-QZ3AS4KK.js → chunk-RSG4ONOI.js} +9 -8
- package/dist/{chunk-4NN5IWVN.js → chunk-T6OSFQZD.js} +2 -0
- package/dist/{chunk-Y3LOALAV.js → chunk-TAL6CZH6.js} +8 -7
- package/dist/{chunk-3KWQYGYI.js → chunk-TKHSULJT.js} +2 -0
- package/dist/chunk-VXNMYUXU.js +202 -0
- package/dist/{chunk-3FY3RJ26.js → chunk-WZ6YVQSF.js} +15 -14
- package/dist/{chunk-6EIJSNBD.js → chunk-Y74WTIKJ.js} +2 -0
- package/dist/{community-report-client-C7WDGET3.js → community-report-client-XXWGSBSD.js} +3 -4
- package/dist/{config-BMYZX2UE.js → config-EXUGQN5T.js} +10 -10
- package/dist/{data-integration-QEKDWQDY.js → data-integration-4NZ53OMT.js} +920 -97
- package/dist/index.js +56 -81
- package/dist/{local-data-upload-client-4YYHSYD6.js → local-data-upload-client-KYOKVYZV.js} +3 -4
- package/dist/{memory-I2WXDTV2.js → memory-ATNKZNW5.js} +6 -7
- package/dist/{metadata-I4C2EWUN.js → metadata-VZVC7YMH.js} +10 -11
- package/dist/{model-HLHIEFMU.js → model-E4JMQ4V2.js} +8 -9
- package/dist/{personal-semantic-preference-LIPACBDX.js → personal-semantic-preference-7S2SQ3UV.js} +9 -10
- package/dist/{project-semantic-RT3R2VQD.js → project-semantic-2SZP2OPO.js} +13 -14
- package/dist/sync-YV3E66IF.js +520 -0
- package/dist/{te-agent-BR6VDBNX.js → te-agent-JB5T3PO7.js} +396 -92
- package/dist/{te-analysis-7VUNUYWZ.js → te-analysis-3YJAAT2D.js} +196 -43
- package/dist/{te-community-5DMNKJWY.js → te-community-UDBI672N.js} +12 -34
- package/dist/{te-dataops-6P5IKWNJ.js → te-dataops-ZLYOCXZ4.js} +480 -81
- package/dist/{te-engage-KZPR5R22.js → te-engage-4XG6OJML.js} +88 -16
- package/dist/{te-experiment-6BITX4RD.js → te-experiment-VXUWPINJ.js} +83 -12
- package/dist/te-kb-WYQWHFSC.js +1732 -0
- package/dist/{te-system-FXITO2JG.js → te-system-7G6F2LJA.js} +569 -35
- package/dist/{te-team-ADOC2ROP.js → te-team-E7FBBXMQ.js} +8 -7
- package/dist/{update-YCYCKJOO.js → update-D47BUG25.js} +8 -8
- package/package.json +22 -10
- package/skills/ae-agent/SKILL.md +30 -13
- package/skills/ae-agent/references/agent-distribution.md +94 -0
- package/skills/ae-agent/references/approval-request.md +4 -0
- package/skills/ae-agent/references/command_index.md +9 -2
- package/skills/ae-agent/references/create-automation.md +20 -2
- package/skills/ae-agent/references/get-agent-context.md +70 -0
- package/skills/ae-agent/references/list-automations.md +18 -3
- package/skills/ae-agent/references/list-mcp-credentials.md +1 -1
- package/skills/ae-agent/references/mcp-token.md +3 -3
- package/skills/ae-agent/references/set-mcp-credential.md +0 -1
- package/skills/ae-agent/references/update-automation.md +18 -0
- package/skills/ae-analysis/SKILL.md +11 -2
- package/skills/ae-analysis/references/adhoc_run.md +2 -0
- package/skills/ae-analysis/references/ai_models.md +23 -3
- package/skills/ae-analysis/references/analysis_gateway_assets.md +3 -3
- package/skills/ae-analysis/references/audience_models.md +18 -0
- package/skills/ae-analysis/references/command_index.md +9 -9
- package/skills/ae-analysis/references/cross_source_config.md +84 -0
- package/skills/ae-analysis/references/dashboard_update.md +1 -1
- package/skills/ae-analysis/references/project_timezone_update.md +13 -4
- package/skills/ae-analysis/references/property_create.md +2 -0
- package/skills/ae-analysis/references/super_metadata_batch_create.md +2 -0
- package/skills/ae-analysis/references/user_cluster_models.md +2 -0
- package/skills/ae-analysis/references/user_cluster_update.md +8 -4
- package/skills/ae-analysis/references/user_tag_create.md +30 -2
- package/skills/ae-analysis/references/user_tag_models.md +17 -3
- package/skills/ae-analysis/references/user_tag_update.md +14 -2
- package/skills/ae-data-integration/SKILL.md +3 -1
- package/skills/ae-data-integration/references/dimension-routing.md +36 -0
- package/skills/ae-data-integration/references/error-handling.md +54 -1
- package/skills/ae-data-integration/references/local-analysis.md +2 -0
- package/skills/ae-data-integration/references/source-inspect.md +18 -2
- package/skills/ae-data-integration/references/tracking-plan.md +1 -1
- package/skills/ae-data-integration/references/transform.md +4 -2
- package/skills/ae-data-integration/references/ue-mapping.md +5 -2
- package/skills/ae-data-integration/references/ue-routing.md +40 -1
- package/skills/ae-dataops/SKILL.md +11 -1
- package/skills/ae-dataops/references/dataops-backfill.md +135 -0
- package/skills/ae-engage/SKILL.md +5 -0
- package/skills/ae-engage/references/build-task-save-guide.md +5 -1
- package/skills/ae-engage/references/save-flow.md +37 -1
- package/skills/ae-engage/references/save-task.md +6 -0
- package/skills/ae-experiment/SKILL.md +6 -2
- package/skills/ae-experiment/references/save_metric.md +20 -8
- package/skills/ae-generate-tracking-plan/SKILL.md +25 -13
- package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +1 -1
- package/skills/ae-kb/SKILL.md +218 -36
- package/skills/ae-kb/references/query-workflow.md +59 -29
- package/skills/ae-kb/references/versions.md +46 -0
- package/skills/ae-system/SKILL.md +29 -31
- package/skills/ae-system/references/channel-management.md +303 -0
- package/skills/ae-use-agent/SKILL.md +42 -0
- package/skills/ae-use-agent/references/local-agent.md +114 -0
- package/dist/auth-GBMV6TEJ.js +0 -14
- package/dist/capability-HYVVPG25.js +0 -352
- package/dist/chunk-EFH4XWYC.js +0 -556
- package/dist/chunk-J2DEBMRF.js +0 -313
- package/dist/chunk-JRJY5DMJ.js +0 -71
- package/dist/chunk-OMPRXM3V.js +0 -349
- package/dist/chunk-QNOLN2LJ.js +0 -509
- package/dist/chunk-RJDU7NYP.js +0 -1198
- package/dist/chunk-RNAALWJK.js +0 -98
- package/dist/chunk-SERWF6G5.js +0 -13
- package/dist/chunk-UW5UN47B.js +0 -70
- package/dist/chunk-ZQKDZXDO.js +0 -317
- package/dist/client-L2YDMHQ6.js +0 -203
- package/dist/memory-3ORCR7JH.js +0 -893
- package/dist/metadata-VUOQJE26.js +0 -339
- package/dist/model-UGRDX4MW.js +0 -139
- package/dist/personal-semantic-preference-OEISBRHM.js +0 -239
- package/dist/project-semantic-FFPWFPIW.js +0 -1114
- package/dist/sync-TFHU2UTG.js +0 -10261
- package/dist/te-agent-VLYOV7S4.js +0 -3894
- package/dist/te-analysis-4YGQL5RC.js +0 -9357
- package/dist/te-community-ISDQWJU7.js +0 -1859
- package/dist/te-dataops-CVULXNVB.js +0 -2209
- package/dist/te-engage-N5WI32H6.js +0 -4898
- package/dist/te-experiment-UVR4HLND.js +0 -988
- package/dist/te-kb-RCLSSH2Q.js +0 -935
- package/dist/te-system-K2GYMCTB.js +0 -2213
- package/skills/ae-agent/references/auto-provision-mcp-credentials.md +0 -57
|
@@ -1,26 +1,25 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
resolveHost
|
|
4
|
+
} from "./chunk-ECBLHAZO.js";
|
|
1
5
|
import {
|
|
2
6
|
printError
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CZU3V3DQ.js";
|
|
4
8
|
import {
|
|
5
9
|
internalCallSourceHeaders
|
|
6
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y74WTIKJ.js";
|
|
7
11
|
import {
|
|
8
|
-
|
|
12
|
+
SecureStoreAuthError,
|
|
9
13
|
getCliToken
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
resolveHost
|
|
13
|
-
} from "./chunk-ZQKDZXDO.js";
|
|
14
|
+
} from "./chunk-ATSM5XAW.js";
|
|
14
15
|
import {
|
|
15
16
|
safeJsonParse
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WZ6YVQSF.js";
|
|
17
18
|
import {
|
|
18
19
|
CliValidationError,
|
|
19
|
-
PermissionError
|
|
20
|
-
} from "./chunk-UW5UN47B.js";
|
|
21
|
-
import {
|
|
20
|
+
PermissionError,
|
|
22
21
|
logger
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4P355ZWB.js";
|
|
24
23
|
|
|
25
24
|
// src/commands/te-dataops/shared.ts
|
|
26
25
|
import { randomBytes } from "crypto";
|
|
@@ -60,6 +59,15 @@ var TOOL_API_MAP = {
|
|
|
60
59
|
operations_get_flow_instance_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/flow-instances/detail" },
|
|
61
60
|
operations_get_task_instance_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/task-instances/detail" },
|
|
62
61
|
operations_stop_flow_instance: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/flow-instances/stop" },
|
|
62
|
+
operations_list_backfill_flows: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/backfill/flows" },
|
|
63
|
+
operations_create_backfill_job: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/backfill/jobs" },
|
|
64
|
+
operations_update_backfill_job: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/backfill/jobs/update" },
|
|
65
|
+
operations_delete_backfill_job: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/backfill/jobs/delete" },
|
|
66
|
+
operations_run_backfill_job: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/backfill/jobs/run" },
|
|
67
|
+
operations_search_backfill_jobs: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/backfill/jobs/search" },
|
|
68
|
+
operations_get_backfill_job_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/backfill/jobs/detail" },
|
|
69
|
+
operations_stop_backfill_job: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/backfill/jobs/stop" },
|
|
70
|
+
operations_rerun_backfill_job: { method: "POST", path: "/api/cli/dataops/v1/gaia/operations/backfill/jobs/rerun" },
|
|
63
71
|
integration_list_datasource_components: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-components" },
|
|
64
72
|
integration_get_datasource_component_template: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-component-template" },
|
|
65
73
|
integration_list_space_datasources: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasources" },
|
|
@@ -89,10 +97,10 @@ var TOOL_API_MAP = {
|
|
|
89
97
|
ide_get_sql_query_status: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/sql-query-status" },
|
|
90
98
|
ide_cancel_sql_query: { method: "POST", path: "/api/cli/dataops/v1/gaia/ide/sql-query-cancel" }
|
|
91
99
|
};
|
|
92
|
-
async function callDataopsApi(ctx,
|
|
93
|
-
const spec = TOOL_API_MAP[
|
|
100
|
+
async function callDataopsApi(ctx, toolName68, args = {}) {
|
|
101
|
+
const spec = TOOL_API_MAP[toolName68];
|
|
94
102
|
if (!spec) {
|
|
95
|
-
throw new Error(`DataOps API mapping not found for tool: ${
|
|
103
|
+
throw new Error(`DataOps API mapping not found for tool: ${toolName68}`);
|
|
96
104
|
}
|
|
97
105
|
const params = compactArgs(args);
|
|
98
106
|
if (spec.method === "GET") {
|
|
@@ -100,10 +108,10 @@ async function callDataopsApi(ctx, toolName59, args = {}) {
|
|
|
100
108
|
}
|
|
101
109
|
return dataopsRequest(ctx, spec.method, spec.path, {}, params);
|
|
102
110
|
}
|
|
103
|
-
function buildDataopsApiDryRun(ctx,
|
|
104
|
-
const spec = TOOL_API_MAP[
|
|
111
|
+
function buildDataopsApiDryRun(ctx, toolName68, args = {}) {
|
|
112
|
+
const spec = TOOL_API_MAP[toolName68];
|
|
105
113
|
if (!spec) {
|
|
106
|
-
throw new Error(`DataOps API mapping not found for tool: ${
|
|
114
|
+
throw new Error(`DataOps API mapping not found for tool: ${toolName68}`);
|
|
107
115
|
}
|
|
108
116
|
const params = compactArgs(args);
|
|
109
117
|
if (spec.method === "GET") {
|
|
@@ -119,7 +127,7 @@ function buildDataopsApiDryRun(ctx, toolName59, args = {}) {
|
|
|
119
127
|
body: params
|
|
120
128
|
};
|
|
121
129
|
}
|
|
122
|
-
async function downloadDataopsApi(ctx, path, params, targetPath
|
|
130
|
+
async function downloadDataopsApi(ctx, path, params, targetPath) {
|
|
123
131
|
const host = resolveHost(ctx.host());
|
|
124
132
|
const token = await getCliToken(host);
|
|
125
133
|
const url = buildUrl(host, path, compactArgs(params));
|
|
@@ -135,9 +143,10 @@ async function downloadDataopsApi(ctx, path, params, targetPath, retry = true) {
|
|
|
135
143
|
const data = parseResponseBody(await resp.text(), url, resp.status, true);
|
|
136
144
|
throw new PermissionError(permissionMessage(data));
|
|
137
145
|
}
|
|
138
|
-
if (resp.status === 401
|
|
139
|
-
|
|
140
|
-
|
|
146
|
+
if (resp.status === 401) {
|
|
147
|
+
throw new SecureStoreAuthError(
|
|
148
|
+
`The stored CLI token for ${host} is invalid or expired. Run: ae-cli auth login --host ${host}`
|
|
149
|
+
);
|
|
141
150
|
}
|
|
142
151
|
if (!resp.ok) {
|
|
143
152
|
const data = parseResponseBody(await resp.text(), url, resp.status, true);
|
|
@@ -166,7 +175,7 @@ async function downloadDataopsApi(ctx, path, params, targetPath, retry = true) {
|
|
|
166
175
|
if (tempPresent) await unlink(tempPath).catch(() => void 0);
|
|
167
176
|
}
|
|
168
177
|
}
|
|
169
|
-
async function dataopsRequest(ctx, method, path, params = {}, body
|
|
178
|
+
async function dataopsRequest(ctx, method, path, params = {}, body) {
|
|
170
179
|
const host = resolveHost(ctx.host());
|
|
171
180
|
const token = await getCliToken(host);
|
|
172
181
|
const url = buildUrl(host, path, params);
|
|
@@ -187,10 +196,10 @@ async function dataopsRequest(ctx, method, path, params = {}, body, retry = true
|
|
|
187
196
|
if (resp.status === 403) {
|
|
188
197
|
throw new PermissionError(permissionMessage(data));
|
|
189
198
|
}
|
|
190
|
-
if (resp.status === 401
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
199
|
+
if (resp.status === 401) {
|
|
200
|
+
throw new SecureStoreAuthError(
|
|
201
|
+
`The stored CLI token for ${host} is invalid or expired. Run: ae-cli auth login --host ${host}`
|
|
202
|
+
);
|
|
194
203
|
}
|
|
195
204
|
if (!resp.ok) {
|
|
196
205
|
throw new Error(formatHttpError(resp.status, resp.statusText, data));
|
|
@@ -1689,8 +1698,223 @@ var commands3 = [
|
|
|
1689
1698
|
];
|
|
1690
1699
|
var integration_default = commands3;
|
|
1691
1700
|
|
|
1701
|
+
// src/commands/te-dataops/operations/backfill-options.ts
|
|
1702
|
+
var ISO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
1703
|
+
function backfillJobFlags() {
|
|
1704
|
+
return [
|
|
1705
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1706
|
+
{ name: "jobId", type: "number", required: true, desc: "Backfill job ID" }
|
|
1707
|
+
];
|
|
1708
|
+
}
|
|
1709
|
+
function buildBackfillJobArgs(ctx) {
|
|
1710
|
+
return {
|
|
1711
|
+
spaceCode: ctx.str("spaceCode"),
|
|
1712
|
+
jobId: ctx.num("jobId")
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
function validateBackfillJobId(ctx) {
|
|
1716
|
+
validatePositiveSafeInteger(ctx, "jobId");
|
|
1717
|
+
}
|
|
1718
|
+
function validatePositiveSafeInteger(ctx, name, required = true) {
|
|
1719
|
+
const raw = ctx.str(name).trim();
|
|
1720
|
+
if (!required && raw === "") return;
|
|
1721
|
+
if (!/^[1-9]\d*$/.test(raw) || !Number.isSafeInteger(Number(raw))) {
|
|
1722
|
+
throw new CliValidationError(`--${name} must be a positive safe integer`, {
|
|
1723
|
+
location: { field: name }
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
function optionalBoolean(ctx, name, defaultValue) {
|
|
1728
|
+
return ctx.str(name) === "" ? defaultValue : ctx.bool(name);
|
|
1729
|
+
}
|
|
1730
|
+
function hasValue(ctx, name) {
|
|
1731
|
+
return ctx.str(name) !== "";
|
|
1732
|
+
}
|
|
1733
|
+
function validateEnum(ctx, name, allowed) {
|
|
1734
|
+
const value = ctx.str(name).trim();
|
|
1735
|
+
if (value !== "" && !allowed.includes(value)) {
|
|
1736
|
+
throw new CliValidationError(`--${name} must be ${formatAllowed(allowed)}`, {
|
|
1737
|
+
location: { field: name }
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
function validateIsoDate(value, name) {
|
|
1742
|
+
if (!ISO_DATE_PATTERN.test(value)) {
|
|
1743
|
+
throw invalidDate(name);
|
|
1744
|
+
}
|
|
1745
|
+
const [year, month, day] = value.split("-").map(Number);
|
|
1746
|
+
const timestamp = Date.UTC(year, month - 1, day);
|
|
1747
|
+
const parsed = new Date(timestamp);
|
|
1748
|
+
if (parsed.getUTCFullYear() !== year || parsed.getUTCMonth() !== month - 1 || parsed.getUTCDate() !== day) {
|
|
1749
|
+
throw invalidDate(name);
|
|
1750
|
+
}
|
|
1751
|
+
return timestamp;
|
|
1752
|
+
}
|
|
1753
|
+
function validateDateRange(startDate, endDate) {
|
|
1754
|
+
const start = validateIsoDate(startDate, "startDate");
|
|
1755
|
+
const end = validateIsoDate(endDate, "endDate");
|
|
1756
|
+
if (start > end) {
|
|
1757
|
+
throw new CliValidationError("--startDate must not be after --endDate", {
|
|
1758
|
+
location: { field: "startDate" }
|
|
1759
|
+
});
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
function invalidDate(name) {
|
|
1763
|
+
return new CliValidationError(`--${name} must be a valid date in yyyy-MM-dd format`, {
|
|
1764
|
+
location: { field: name }
|
|
1765
|
+
});
|
|
1766
|
+
}
|
|
1767
|
+
function formatAllowed(allowed) {
|
|
1768
|
+
if (allowed.length === 1) return allowed[0];
|
|
1769
|
+
if (allowed.length === 2) return `${allowed[0]} or ${allowed[1]}`;
|
|
1770
|
+
return `${allowed.slice(0, -1).join(", ")}, or ${allowed.at(-1)}`;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
// src/commands/te-dataops/operations/create-backfill-job.ts
|
|
1774
|
+
var toolName45 = "operations_create_backfill_job";
|
|
1775
|
+
var JOB_TYPES = ["TASK_ALL", "TASK_ONLY", "TASK_PRE", "TASK_POST"];
|
|
1776
|
+
var FAILURE_STRATEGIES = ["END", "CONTINUE"];
|
|
1777
|
+
var INTERVAL_UNITS = ["DAY", "WEEK", "MONTH"];
|
|
1778
|
+
var ST_TIME_PATTERN = /^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/;
|
|
1779
|
+
function buildBackfillDraftArgs(ctx) {
|
|
1780
|
+
const customDates = hasValue(ctx, "completeDates");
|
|
1781
|
+
return {
|
|
1782
|
+
spaceCode: ctx.str("spaceCode"),
|
|
1783
|
+
jobName: ctx.str("jobName"),
|
|
1784
|
+
flowCode: ctx.num("flowCode"),
|
|
1785
|
+
jobType: ctx.str("jobType") || "TASK_ALL",
|
|
1786
|
+
startNode: ctx.optionalNum("startNode"),
|
|
1787
|
+
failureStrategy: ctx.str("failureStrategy") || "END",
|
|
1788
|
+
parallel: optionalBoolean(ctx, "parallel", true),
|
|
1789
|
+
completeDates: customDates ? ctx.json("completeDates") : void 0,
|
|
1790
|
+
startDate: ctx.str("startDate"),
|
|
1791
|
+
endDate: ctx.str("endDate"),
|
|
1792
|
+
step: customDates ? void 0 : ctx.optionalNum("step") ?? 1,
|
|
1793
|
+
unit: customDates ? void 0 : ctx.str("unit") || "DAY",
|
|
1794
|
+
reverse: optionalBoolean(ctx, "reverse", false),
|
|
1795
|
+
stTime: ctx.str("stTime")
|
|
1796
|
+
};
|
|
1797
|
+
}
|
|
1798
|
+
function validateBackfillDraft(ctx) {
|
|
1799
|
+
validatePositiveSafeInteger(ctx, "flowCode");
|
|
1800
|
+
if (ctx.str("jobName").trim() === "") {
|
|
1801
|
+
throw new CliValidationError("--jobName must be non-empty", {
|
|
1802
|
+
location: { field: "jobName" }
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
validateEnum(ctx, "jobType", JOB_TYPES);
|
|
1806
|
+
validateEnum(ctx, "failureStrategy", FAILURE_STRATEGIES);
|
|
1807
|
+
const jobType = ctx.str("jobType") || "TASK_ALL";
|
|
1808
|
+
const hasStartNode = hasValue(ctx, "startNode");
|
|
1809
|
+
if (jobType !== "TASK_ALL" && !hasStartNode) {
|
|
1810
|
+
throw new CliValidationError("--startNode is required when --jobType is not TASK_ALL", {
|
|
1811
|
+
location: { field: "startNode" }
|
|
1812
|
+
});
|
|
1813
|
+
}
|
|
1814
|
+
if (hasStartNode) validatePositiveSafeInteger(ctx, "startNode");
|
|
1815
|
+
const stTime = ctx.str("stTime");
|
|
1816
|
+
if (stTime !== "" && !ST_TIME_PATTERN.test(stTime)) {
|
|
1817
|
+
throw new CliValidationError("--stTime must use HH:mm:ss in 24-hour time", {
|
|
1818
|
+
location: { field: "stTime" }
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
const hasCustomDates = hasValue(ctx, "completeDates");
|
|
1822
|
+
const hasStartDate = hasValue(ctx, "startDate");
|
|
1823
|
+
const hasEndDate = hasValue(ctx, "endDate");
|
|
1824
|
+
if (!hasStartDate || !hasEndDate) {
|
|
1825
|
+
throw new CliValidationError("Pass both --startDate and --endDate");
|
|
1826
|
+
}
|
|
1827
|
+
const startDate = ctx.str("startDate");
|
|
1828
|
+
const endDate = ctx.str("endDate");
|
|
1829
|
+
validateDateRange(startDate, endDate);
|
|
1830
|
+
if (hasCustomDates) {
|
|
1831
|
+
const dates = validateCompleteDates(ctx.json("completeDates"));
|
|
1832
|
+
if (dates.some((date) => date < startDate || date > endDate)) {
|
|
1833
|
+
throw new CliValidationError("--completeDates values must be inside --startDate and --endDate", {
|
|
1834
|
+
location: { field: "completeDates" }
|
|
1835
|
+
});
|
|
1836
|
+
}
|
|
1837
|
+
return;
|
|
1838
|
+
}
|
|
1839
|
+
const step = ctx.optionalNum("step") ?? 1;
|
|
1840
|
+
if (!Number.isInteger(step) || step < 1) {
|
|
1841
|
+
throw new CliValidationError("--step must be a positive integer", {
|
|
1842
|
+
location: { field: "step" }
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
validateEnumValue(ctx.str("unit") || "DAY", "unit", INTERVAL_UNITS);
|
|
1846
|
+
}
|
|
1847
|
+
function validateCompleteDates(value) {
|
|
1848
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
1849
|
+
throw new CliValidationError("--completeDates must be a non-empty JSON array of yyyy-MM-dd strings", {
|
|
1850
|
+
location: { field: "completeDates" }
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
const dates = value;
|
|
1854
|
+
if (!dates.every((date) => typeof date === "string")) {
|
|
1855
|
+
throw new CliValidationError("--completeDates must contain only yyyy-MM-dd strings", {
|
|
1856
|
+
location: { field: "completeDates" }
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
for (const date of dates) validateIsoDate(date, "completeDates");
|
|
1860
|
+
if (new Set(dates).size !== dates.length) {
|
|
1861
|
+
throw new CliValidationError("--completeDates must not contain duplicate dates", {
|
|
1862
|
+
location: { field: "completeDates" }
|
|
1863
|
+
});
|
|
1864
|
+
}
|
|
1865
|
+
return dates;
|
|
1866
|
+
}
|
|
1867
|
+
function validateEnumValue(value, name, allowed) {
|
|
1868
|
+
if (!allowed.includes(value)) {
|
|
1869
|
+
throw new CliValidationError(`--${name} must be DAY, WEEK, or MONTH`, {
|
|
1870
|
+
location: { field: name }
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
var createBackfillJob = {
|
|
1875
|
+
service: "dataops_operations",
|
|
1876
|
+
command: "+create_backfill_job",
|
|
1877
|
+
description: "Create a DRAFT backfill job for one PROD task flow. Always pass a date range; completeDates optionally selects dates inside it. Creation never starts the job.",
|
|
1878
|
+
flags: backfillDraftFlags(),
|
|
1879
|
+
risk: "write",
|
|
1880
|
+
validate: validateBackfillDraft,
|
|
1881
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName45, buildBackfillDraftArgs(ctx)),
|
|
1882
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName45, buildBackfillDraftArgs(ctx))
|
|
1883
|
+
};
|
|
1884
|
+
function backfillDraftFlags() {
|
|
1885
|
+
return [
|
|
1886
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1887
|
+
{ name: "jobName", type: "string", required: true, maxLength: 50, desc: "Backfill job name, up to 50 characters" },
|
|
1888
|
+
{ name: "flowCode", type: "number", required: true, desc: "PROD task flow code from +list_backfill_flows" },
|
|
1889
|
+
{ name: "jobType", type: "string", required: false, default: "TASK_ALL", desc: "Backfill scope: TASK_ALL, TASK_ONLY, TASK_PRE, or TASK_POST. Default TASK_ALL" },
|
|
1890
|
+
{ name: "startNode", type: "number", required: false, desc: "Start task code. Required when jobType is not TASK_ALL" },
|
|
1891
|
+
{ name: "failureStrategy", type: "string", required: false, default: "END", desc: "Failure strategy: END or CONTINUE. Default END" },
|
|
1892
|
+
{ name: "parallel", type: "boolean", required: false, default: true, desc: "Whether plans may run in parallel. Default true" },
|
|
1893
|
+
{ name: "completeDates", type: "json", required: false, desc: "Optional non-empty JSON array of unique base dates inside the configured range" },
|
|
1894
|
+
{ name: "startDate", type: "string", required: true, desc: "Range start date in yyyy-MM-dd format" },
|
|
1895
|
+
{ name: "endDate", type: "string", required: true, desc: "Range end date in yyyy-MM-dd format" },
|
|
1896
|
+
{ name: "step", type: "number", required: false, default: 1, min: 1, desc: "Positive interval step for range mode. Default 1" },
|
|
1897
|
+
{ name: "unit", type: "string", required: false, default: "DAY", desc: "Range interval unit: DAY, WEEK, or MONTH. Default DAY" },
|
|
1898
|
+
{ name: "reverse", type: "boolean", required: false, default: false, desc: "Generate plans in reverse date order. Default false" },
|
|
1899
|
+
{ name: "stTime", type: "string", required: false, desc: "Scheduler time in HH:mm:ss; required when the selected flow reports hasSt=true" }
|
|
1900
|
+
];
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
// src/commands/te-dataops/operations/delete-backfill-job.ts
|
|
1904
|
+
var toolName46 = "operations_delete_backfill_job";
|
|
1905
|
+
var deleteBackfillJob = {
|
|
1906
|
+
service: "dataops_operations",
|
|
1907
|
+
command: "+delete_backfill_job",
|
|
1908
|
+
description: "Delete one backfill job. The server permits deletion only in supported terminal or draft states.",
|
|
1909
|
+
flags: backfillJobFlags(),
|
|
1910
|
+
risk: "high-risk-write",
|
|
1911
|
+
validate: validateBackfillJobId,
|
|
1912
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName46, buildBackfillJobArgs(ctx)),
|
|
1913
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName46, buildBackfillJobArgs(ctx))
|
|
1914
|
+
};
|
|
1915
|
+
|
|
1692
1916
|
// src/commands/te-dataops/operations/get-flow-instance-detail.ts
|
|
1693
|
-
var
|
|
1917
|
+
var toolName47 = "operations_get_flow_instance_detail";
|
|
1694
1918
|
function buildArgs42(ctx) {
|
|
1695
1919
|
return {
|
|
1696
1920
|
spaceCode: ctx.str("spaceCode"),
|
|
@@ -1708,14 +1932,27 @@ var getFlowInstanceDetail = {
|
|
|
1708
1932
|
{ name: "flowInstanceId", type: "number", required: true, desc: "Workflow instance ID from +search_flow_instances" }
|
|
1709
1933
|
],
|
|
1710
1934
|
risk: "read",
|
|
1711
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1935
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName47, buildArgs42(ctx)),
|
|
1712
1936
|
execute: async (ctx) => {
|
|
1713
|
-
return callDataopsApi(ctx,
|
|
1937
|
+
return callDataopsApi(ctx, toolName47, buildArgs42(ctx));
|
|
1714
1938
|
}
|
|
1715
1939
|
};
|
|
1716
1940
|
|
|
1941
|
+
// src/commands/te-dataops/operations/get-backfill-job-detail.ts
|
|
1942
|
+
var toolName48 = "operations_get_backfill_job_detail";
|
|
1943
|
+
var getBackfillJobDetail = {
|
|
1944
|
+
service: "dataops_operations",
|
|
1945
|
+
command: "+get_backfill_job_detail",
|
|
1946
|
+
description: "Get one backfill job and its plans. A DRAFT job has an empty plans list because it has not run yet.",
|
|
1947
|
+
flags: backfillJobFlags(),
|
|
1948
|
+
risk: "read",
|
|
1949
|
+
validate: validateBackfillJobId,
|
|
1950
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName48, buildBackfillJobArgs(ctx)),
|
|
1951
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName48, buildBackfillJobArgs(ctx))
|
|
1952
|
+
};
|
|
1953
|
+
|
|
1717
1954
|
// src/commands/te-dataops/operations/get-task-instance-detail.ts
|
|
1718
|
-
var
|
|
1955
|
+
var toolName49 = "operations_get_task_instance_detail";
|
|
1719
1956
|
function optionalBool2(ctx, name) {
|
|
1720
1957
|
return ctx.str(name) === "" ? void 0 : ctx.bool(name);
|
|
1721
1958
|
}
|
|
@@ -1744,15 +1981,127 @@ var getTaskInstanceDetail = {
|
|
|
1744
1981
|
{ name: "includeLog", type: "boolean", required: false, desc: "Whether to include task logs. Default false" }
|
|
1745
1982
|
],
|
|
1746
1983
|
risk: "read",
|
|
1747
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1984
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName49, buildArgs43(ctx)),
|
|
1748
1985
|
execute: async (ctx) => {
|
|
1749
|
-
return callDataopsApi(ctx,
|
|
1986
|
+
return callDataopsApi(ctx, toolName49, buildArgs43(ctx));
|
|
1750
1987
|
}
|
|
1751
1988
|
};
|
|
1752
1989
|
|
|
1753
|
-
// src/commands/te-dataops/operations/
|
|
1754
|
-
var
|
|
1990
|
+
// src/commands/te-dataops/operations/list-backfill-flows.ts
|
|
1991
|
+
var toolName50 = "operations_list_backfill_flows";
|
|
1755
1992
|
function buildArgs44(ctx) {
|
|
1993
|
+
return { spaceCode: ctx.str("spaceCode") };
|
|
1994
|
+
}
|
|
1995
|
+
var listBackfillFlows = {
|
|
1996
|
+
service: "dataops_operations",
|
|
1997
|
+
command: "+list_backfill_flows",
|
|
1998
|
+
description: "List PROD task flows that can be used to create a backfill job. Returns each flow code, name, and backfill eligibility information such as canRun and hasSt.",
|
|
1999
|
+
flags: [
|
|
2000
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
2001
|
+
],
|
|
2002
|
+
risk: "read",
|
|
2003
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName50, buildArgs44(ctx)),
|
|
2004
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName50, buildArgs44(ctx))
|
|
2005
|
+
};
|
|
2006
|
+
|
|
2007
|
+
// src/commands/te-dataops/operations/rerun-backfill-job.ts
|
|
2008
|
+
var toolName51 = "operations_rerun_backfill_job";
|
|
2009
|
+
var rerunBackfillJob = {
|
|
2010
|
+
service: "dataops_operations",
|
|
2011
|
+
command: "+rerun_backfill_job",
|
|
2012
|
+
description: "Rerun every plan in an existing terminal backfill job. This reuses the job and does not rerun only failed plans.",
|
|
2013
|
+
flags: backfillJobFlags(),
|
|
2014
|
+
risk: "write",
|
|
2015
|
+
validate: validateBackfillJobId,
|
|
2016
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName51, buildBackfillJobArgs(ctx)),
|
|
2017
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName51, buildBackfillJobArgs(ctx))
|
|
2018
|
+
};
|
|
2019
|
+
|
|
2020
|
+
// src/commands/te-dataops/operations/run-backfill-job.ts
|
|
2021
|
+
var toolName52 = "operations_run_backfill_job";
|
|
2022
|
+
var runBackfillJob = {
|
|
2023
|
+
service: "dataops_operations",
|
|
2024
|
+
command: "+run_backfill_job",
|
|
2025
|
+
description: "Run an existing DRAFT backfill job. This is separate from creation and generates the job plans on the server.",
|
|
2026
|
+
flags: backfillJobFlags(),
|
|
2027
|
+
risk: "write",
|
|
2028
|
+
validate: validateBackfillJobId,
|
|
2029
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName52, buildBackfillJobArgs(ctx)),
|
|
2030
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName52, buildBackfillJobArgs(ctx))
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
// src/commands/te-dataops/operations/search-backfill-jobs.ts
|
|
2034
|
+
var toolName53 = "operations_search_backfill_jobs";
|
|
2035
|
+
var JOB_TYPES2 = ["TASK_ALL", "TASK_ONLY", "TASK_PRE", "TASK_POST"];
|
|
2036
|
+
var JOB_STATUSES = ["DRAFT", "RUNNING", "STOP", "FAIL", "SUCCESS", "READY_STOP"];
|
|
2037
|
+
var JOB_SORTS = ["ID", "JOB_NAME", "CREATE_TIME", "UPDATE_TIME", "START_DATE", "END_DATE"];
|
|
2038
|
+
function buildArgs45(ctx) {
|
|
2039
|
+
return {
|
|
2040
|
+
spaceCode: ctx.str("spaceCode"),
|
|
2041
|
+
keyword: ctx.str("keyword"),
|
|
2042
|
+
startDate: ctx.str("startDate"),
|
|
2043
|
+
endDate: ctx.str("endDate"),
|
|
2044
|
+
jobType: ctx.str("jobType"),
|
|
2045
|
+
status: ctx.str("status"),
|
|
2046
|
+
owners: hasValue(ctx, "owners") ? ctx.json("owners") : void 0,
|
|
2047
|
+
sort: ctx.str("sort"),
|
|
2048
|
+
sortAscending: optionalBoolean(ctx, "sortAscending"),
|
|
2049
|
+
pageNum: ctx.optionalNum("pageNum"),
|
|
2050
|
+
pageSize: ctx.optionalNum("pageSize")
|
|
2051
|
+
};
|
|
2052
|
+
}
|
|
2053
|
+
function validateSearch(ctx) {
|
|
2054
|
+
const startDate = ctx.str("startDate");
|
|
2055
|
+
const endDate = ctx.str("endDate");
|
|
2056
|
+
if (startDate !== "") validateIsoDate(startDate, "startDate");
|
|
2057
|
+
if (endDate !== "") validateIsoDate(endDate, "endDate");
|
|
2058
|
+
if (startDate !== "" && endDate !== "") validateDateRange(startDate, endDate);
|
|
2059
|
+
validateEnum(ctx, "jobType", JOB_TYPES2);
|
|
2060
|
+
validateEnum(ctx, "sort", JOB_SORTS);
|
|
2061
|
+
const status = ctx.str("status");
|
|
2062
|
+
if (status !== "") {
|
|
2063
|
+
const statuses = status.split(",").map((value) => value.trim());
|
|
2064
|
+
if (statuses.some((value) => !JOB_STATUSES.includes(value))) {
|
|
2065
|
+
throw new CliValidationError(`--status must contain only: ${JOB_STATUSES.join(", ")}`, {
|
|
2066
|
+
location: { field: "status" }
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
if (hasValue(ctx, "owners")) {
|
|
2071
|
+
const owners = ctx.json("owners");
|
|
2072
|
+
if (!Array.isArray(owners) || owners.some((owner) => typeof owner !== "string" || owner.trim() === "")) {
|
|
2073
|
+
throw new CliValidationError("--owners must be a JSON array of non-empty strings", {
|
|
2074
|
+
location: { field: "owners" }
|
|
2075
|
+
});
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
var searchBackfillJobs = {
|
|
2080
|
+
service: "dataops_operations",
|
|
2081
|
+
command: "+search_backfill_jobs",
|
|
2082
|
+
description: "Search backfill jobs in a space. Filters and pagination are optional; use jobId from the result for detail and lifecycle actions.",
|
|
2083
|
+
flags: [
|
|
2084
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
2085
|
+
{ name: "keyword", type: "string", required: false, desc: "Optional job ID, job name, flow name, or remark keyword" },
|
|
2086
|
+
{ name: "startDate", type: "string", required: false, desc: "Optional execution start date in yyyy-MM-dd format" },
|
|
2087
|
+
{ name: "endDate", type: "string", required: false, desc: "Optional execution end date in yyyy-MM-dd format" },
|
|
2088
|
+
{ name: "jobType", type: "string", required: false, desc: "Optional job type: TASK_ALL, TASK_ONLY, TASK_PRE, or TASK_POST" },
|
|
2089
|
+
{ name: "status", type: "string", required: false, desc: "Optional comma-separated statuses: DRAFT,RUNNING,STOP,FAIL,SUCCESS,READY_STOP" },
|
|
2090
|
+
{ name: "owners", type: "json", required: false, desc: "Optional JSON array of owner open IDs" },
|
|
2091
|
+
{ name: "sort", type: "string", required: false, desc: "Optional sort field: ID, JOB_NAME, CREATE_TIME, UPDATE_TIME, START_DATE, or END_DATE" },
|
|
2092
|
+
{ name: "sortAscending", type: "boolean", required: false, desc: "Sort ascending when true; server default is descending" },
|
|
2093
|
+
{ name: "pageNum", type: "number", required: false, min: 1, desc: "Optional page number; server default 1" },
|
|
2094
|
+
{ name: "pageSize", type: "number", required: false, min: 1, max: 100, desc: "Optional page size; server default 20, max 100" }
|
|
2095
|
+
],
|
|
2096
|
+
risk: "read",
|
|
2097
|
+
validate: validateSearch,
|
|
2098
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName53, buildArgs45(ctx)),
|
|
2099
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName53, buildArgs45(ctx))
|
|
2100
|
+
};
|
|
2101
|
+
|
|
2102
|
+
// src/commands/te-dataops/operations/search-flow-instances.ts
|
|
2103
|
+
var toolName54 = "operations_search_flow_instances";
|
|
2104
|
+
function buildArgs46(ctx) {
|
|
1756
2105
|
return {
|
|
1757
2106
|
spaceCode: ctx.str("spaceCode"),
|
|
1758
2107
|
keyword: ctx.str("keyword"),
|
|
@@ -1777,15 +2126,28 @@ var searchFlowInstances = {
|
|
|
1777
2126
|
{ name: "pageSize", type: "number", required: false, desc: "Optional page size; default 20, max 100" }
|
|
1778
2127
|
],
|
|
1779
2128
|
risk: "read",
|
|
1780
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2129
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName54, buildArgs46(ctx)),
|
|
1781
2130
|
execute: async (ctx) => {
|
|
1782
|
-
return callDataopsApi(ctx,
|
|
2131
|
+
return callDataopsApi(ctx, toolName54, buildArgs46(ctx));
|
|
1783
2132
|
}
|
|
1784
2133
|
};
|
|
1785
2134
|
|
|
2135
|
+
// src/commands/te-dataops/operations/stop-backfill-job.ts
|
|
2136
|
+
var toolName55 = "operations_stop_backfill_job";
|
|
2137
|
+
var stopBackfillJob = {
|
|
2138
|
+
service: "dataops_operations",
|
|
2139
|
+
command: "+stop_backfill_job",
|
|
2140
|
+
description: "Stop a RUNNING backfill job and its unfinished plans. This is a high-impact operation and requires confirmation.",
|
|
2141
|
+
flags: backfillJobFlags(),
|
|
2142
|
+
risk: "high-risk-write",
|
|
2143
|
+
validate: validateBackfillJobId,
|
|
2144
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName55, buildBackfillJobArgs(ctx)),
|
|
2145
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName55, buildBackfillJobArgs(ctx))
|
|
2146
|
+
};
|
|
2147
|
+
|
|
1786
2148
|
// src/commands/te-dataops/operations/stop-flow-instance.ts
|
|
1787
|
-
var
|
|
1788
|
-
function
|
|
2149
|
+
var toolName56 = "operations_stop_flow_instance";
|
|
2150
|
+
function buildArgs47(ctx) {
|
|
1789
2151
|
const executeId = ctx.optionalNum("executeId");
|
|
1790
2152
|
const flowInstanceId = ctx.optionalNum("flowInstanceId");
|
|
1791
2153
|
if (executeId == null && flowInstanceId == null || executeId != null && flowInstanceId != null) {
|
|
@@ -1812,32 +2174,69 @@ var stopFlowInstance = {
|
|
|
1812
2174
|
{ name: "flowInstanceId", type: "number", required: false, desc: "Workflow instance ID returned by dataops_operations +search_flow_instances" }
|
|
1813
2175
|
],
|
|
1814
2176
|
risk: "write",
|
|
1815
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2177
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName56, buildArgs47(ctx)),
|
|
1816
2178
|
execute: async (ctx) => {
|
|
1817
|
-
return callDataopsApi(ctx,
|
|
2179
|
+
return callDataopsApi(ctx, toolName56, buildArgs47(ctx));
|
|
1818
2180
|
}
|
|
1819
2181
|
};
|
|
1820
2182
|
|
|
2183
|
+
// src/commands/te-dataops/operations/update-backfill-job.ts
|
|
2184
|
+
var toolName57 = "operations_update_backfill_job";
|
|
2185
|
+
function buildArgs48(ctx) {
|
|
2186
|
+
return {
|
|
2187
|
+
...buildBackfillDraftArgs(ctx),
|
|
2188
|
+
jobId: ctx.num("jobId")
|
|
2189
|
+
};
|
|
2190
|
+
}
|
|
2191
|
+
function validateUpdate(ctx) {
|
|
2192
|
+
validateBackfillJobId(ctx);
|
|
2193
|
+
validateBackfillDraft(ctx);
|
|
2194
|
+
}
|
|
2195
|
+
var [spaceCodeFlag, ...draftFlags] = backfillDraftFlags();
|
|
2196
|
+
var updateBackfillJob = {
|
|
2197
|
+
service: "dataops_operations",
|
|
2198
|
+
command: "+update_backfill_job",
|
|
2199
|
+
description: "Replace the complete configuration of a DRAFT backfill job. This does not start the job.",
|
|
2200
|
+
flags: [
|
|
2201
|
+
spaceCodeFlag,
|
|
2202
|
+
{ name: "jobId", type: "number", required: true, desc: "DRAFT backfill job ID" },
|
|
2203
|
+
...draftFlags
|
|
2204
|
+
],
|
|
2205
|
+
risk: "write",
|
|
2206
|
+
validate: validateUpdate,
|
|
2207
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName57, buildArgs48(ctx)),
|
|
2208
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName57, buildArgs48(ctx))
|
|
2209
|
+
};
|
|
2210
|
+
|
|
1821
2211
|
// src/commands/te-dataops/operations/index.ts
|
|
1822
2212
|
var commands4 = [
|
|
1823
2213
|
searchFlowInstances,
|
|
1824
2214
|
getFlowInstanceDetail,
|
|
1825
2215
|
getTaskInstanceDetail,
|
|
1826
|
-
stopFlowInstance
|
|
2216
|
+
stopFlowInstance,
|
|
2217
|
+
listBackfillFlows,
|
|
2218
|
+
createBackfillJob,
|
|
2219
|
+
updateBackfillJob,
|
|
2220
|
+
deleteBackfillJob,
|
|
2221
|
+
runBackfillJob,
|
|
2222
|
+
searchBackfillJobs,
|
|
2223
|
+
getBackfillJobDetail,
|
|
2224
|
+
stopBackfillJob,
|
|
2225
|
+
rerunBackfillJob
|
|
1827
2226
|
];
|
|
1828
2227
|
var operations_default = commands4;
|
|
1829
2228
|
|
|
1830
2229
|
// src/commands/te-dataops/repo/list-spaces.ts
|
|
1831
|
-
var
|
|
2230
|
+
var toolName58 = "repo_list_spaces";
|
|
1832
2231
|
var listSpaces = {
|
|
1833
2232
|
service: "dataops_repo",
|
|
1834
2233
|
command: "+list_spaces",
|
|
1835
2234
|
description: "List DataOps spaces accessible to the current user. Use this first when spaceCode is unknown. Returns createTime, spaceCode, and spaceDisplayName. No flags are required.",
|
|
1836
2235
|
flags: [],
|
|
1837
2236
|
risk: "read",
|
|
1838
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2237
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName58, {}),
|
|
1839
2238
|
execute: async (ctx) => {
|
|
1840
|
-
return callDataopsApi(ctx,
|
|
2239
|
+
return callDataopsApi(ctx, toolName58, {});
|
|
1841
2240
|
}
|
|
1842
2241
|
};
|
|
1843
2242
|
|
|
@@ -1848,12 +2247,12 @@ var commands5 = [
|
|
|
1848
2247
|
var repo_default = commands5;
|
|
1849
2248
|
|
|
1850
2249
|
// src/commands/te-dataops/ide/cancel-sql-query.ts
|
|
1851
|
-
var
|
|
2250
|
+
var toolName59 = "ide_cancel_sql_query";
|
|
1852
2251
|
function optionalString4(ctx, name) {
|
|
1853
2252
|
const value = ctx.str(name);
|
|
1854
2253
|
return value === "" ? void 0 : value;
|
|
1855
2254
|
}
|
|
1856
|
-
function
|
|
2255
|
+
function buildArgs49(ctx) {
|
|
1857
2256
|
return {
|
|
1858
2257
|
spaceCode: ctx.str("spaceCode"),
|
|
1859
2258
|
downloadTaskId: ctx.num("downloadTaskId"),
|
|
@@ -1870,18 +2269,18 @@ var cancelSqlQuery = {
|
|
|
1870
2269
|
{ name: "requestId", type: "string", required: false, desc: "Optional request ID returned by +submit_sql_query, used only for trace display" }
|
|
1871
2270
|
],
|
|
1872
2271
|
risk: "write",
|
|
1873
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1874
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2272
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName59, buildArgs49(ctx)),
|
|
2273
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName59, buildArgs49(ctx))
|
|
1875
2274
|
};
|
|
1876
2275
|
|
|
1877
2276
|
// src/commands/te-dataops/ide/get-sql-query-status.ts
|
|
1878
|
-
var
|
|
2277
|
+
var toolName60 = "ide_get_sql_query_status";
|
|
1879
2278
|
var downloadPath = "/api/cli/dataops/v1/gaia/ide/sql-query-download";
|
|
1880
2279
|
function optionalString5(ctx, name) {
|
|
1881
2280
|
const value = ctx.str(name);
|
|
1882
2281
|
return value === "" ? void 0 : value;
|
|
1883
2282
|
}
|
|
1884
|
-
function
|
|
2283
|
+
function buildArgs50(ctx) {
|
|
1885
2284
|
return {
|
|
1886
2285
|
spaceCode: ctx.str("spaceCode"),
|
|
1887
2286
|
downloadTaskId: ctx.num("downloadTaskId"),
|
|
@@ -1909,9 +2308,9 @@ var getSqlQueryStatus = {
|
|
|
1909
2308
|
{ name: "downloadTo", type: "string", required: false, desc: "Optional local file path. After SUCCESS, stream the result zip and replace this path only when the download completes; use a .zip suffix, for example ./result.zip." }
|
|
1910
2309
|
],
|
|
1911
2310
|
risk: "read",
|
|
1912
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2311
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName60, buildArgs50(ctx)),
|
|
1913
2312
|
execute: async (ctx) => {
|
|
1914
|
-
const data = await callDataopsApi(ctx,
|
|
2313
|
+
const data = await callDataopsApi(ctx, toolName60, buildArgs50(ctx));
|
|
1915
2314
|
const downloadTo = optionalString5(ctx, "downloadTo");
|
|
1916
2315
|
if (downloadTo && isDownloadReady(data)) {
|
|
1917
2316
|
return { ...data, localFile: await downloadResult(ctx, data, downloadTo) };
|
|
@@ -1921,12 +2320,12 @@ var getSqlQueryStatus = {
|
|
|
1921
2320
|
};
|
|
1922
2321
|
|
|
1923
2322
|
// src/commands/te-dataops/ide/list-catalogs.ts
|
|
1924
|
-
var
|
|
2323
|
+
var toolName61 = "ide_list_catalogs";
|
|
1925
2324
|
function optionalString6(ctx, name) {
|
|
1926
2325
|
const value = ctx.str(name);
|
|
1927
2326
|
return value === "" ? void 0 : value;
|
|
1928
2327
|
}
|
|
1929
|
-
function
|
|
2328
|
+
function buildArgs51(ctx) {
|
|
1930
2329
|
return {
|
|
1931
2330
|
spaceCode: ctx.str("spaceCode"),
|
|
1932
2331
|
connType: optionalString6(ctx, "connType"),
|
|
@@ -1943,19 +2342,19 @@ var listCatalogs = {
|
|
|
1943
2342
|
{ name: "repoCode", type: "string", required: false, desc: "Optional repository code. Default te_etl" }
|
|
1944
2343
|
],
|
|
1945
2344
|
risk: "read",
|
|
1946
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2345
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName61, buildArgs51(ctx)),
|
|
1947
2346
|
execute: async (ctx) => {
|
|
1948
|
-
return callDataopsApi(ctx,
|
|
2347
|
+
return callDataopsApi(ctx, toolName61, buildArgs51(ctx));
|
|
1949
2348
|
}
|
|
1950
2349
|
};
|
|
1951
2350
|
|
|
1952
2351
|
// src/commands/te-dataops/ide/get-schema-info.ts
|
|
1953
|
-
var
|
|
2352
|
+
var toolName62 = "ide_get_schema_info";
|
|
1954
2353
|
function optionalString7(ctx, name) {
|
|
1955
2354
|
const value = ctx.str(name);
|
|
1956
2355
|
return value === "" ? void 0 : value;
|
|
1957
2356
|
}
|
|
1958
|
-
function
|
|
2357
|
+
function buildArgs52(ctx) {
|
|
1959
2358
|
return {
|
|
1960
2359
|
spaceCode: ctx.str("spaceCode"),
|
|
1961
2360
|
connType: optionalString7(ctx, "connType"),
|
|
@@ -1987,14 +2386,14 @@ var getSchemaInfo = {
|
|
|
1987
2386
|
{ name: "schema", type: "string", required: true, desc: "Schema name" }
|
|
1988
2387
|
],
|
|
1989
2388
|
risk: "read",
|
|
1990
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2389
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName62, buildArgs52(ctx)),
|
|
1991
2390
|
execute: async (ctx) => {
|
|
1992
|
-
return schemaStats(await callDataopsApi(ctx,
|
|
2391
|
+
return schemaStats(await callDataopsApi(ctx, toolName62, buildArgs52(ctx)));
|
|
1993
2392
|
}
|
|
1994
2393
|
};
|
|
1995
2394
|
|
|
1996
2395
|
// src/commands/te-dataops/ide/get-table-detail.ts
|
|
1997
|
-
var
|
|
2396
|
+
var toolName63 = "ide_get_table_detail";
|
|
1998
2397
|
function optionalString8(ctx, name) {
|
|
1999
2398
|
const value = ctx.str(name);
|
|
2000
2399
|
return value === "" ? void 0 : value;
|
|
@@ -2007,7 +2406,7 @@ function optionalEntityType(ctx) {
|
|
|
2007
2406
|
const value = optionalString8(ctx, "entityType");
|
|
2008
2407
|
return value === void 0 ? void 0 : value.toUpperCase();
|
|
2009
2408
|
}
|
|
2010
|
-
function
|
|
2409
|
+
function buildArgs53(ctx) {
|
|
2011
2410
|
return {
|
|
2012
2411
|
spaceCode: ctx.str("spaceCode"),
|
|
2013
2412
|
connType: optionalString8(ctx, "connType"),
|
|
@@ -2042,19 +2441,19 @@ var getTableDetail2 = {
|
|
|
2042
2441
|
throw new Error("entityType must be TABLE or VIEW");
|
|
2043
2442
|
}
|
|
2044
2443
|
},
|
|
2045
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2444
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName63, buildArgs53(ctx)),
|
|
2046
2445
|
execute: async (ctx) => {
|
|
2047
|
-
return callDataopsApi(ctx,
|
|
2446
|
+
return callDataopsApi(ctx, toolName63, buildArgs53(ctx));
|
|
2048
2447
|
}
|
|
2049
2448
|
};
|
|
2050
2449
|
|
|
2051
2450
|
// src/commands/te-dataops/ide/search-tables.ts
|
|
2052
|
-
var
|
|
2451
|
+
var toolName64 = "ide_search_tables";
|
|
2053
2452
|
function optionalString9(ctx, name) {
|
|
2054
2453
|
const value = ctx.str(name);
|
|
2055
2454
|
return value === "" ? void 0 : value;
|
|
2056
2455
|
}
|
|
2057
|
-
function
|
|
2456
|
+
function buildArgs54(ctx) {
|
|
2058
2457
|
return {
|
|
2059
2458
|
spaceCode: ctx.str("spaceCode"),
|
|
2060
2459
|
connType: optionalString9(ctx, "connType"),
|
|
@@ -2075,15 +2474,15 @@ var searchTables = {
|
|
|
2075
2474
|
{ name: "size", type: "number", required: false, desc: "Optional maximum results. Default 20" }
|
|
2076
2475
|
],
|
|
2077
2476
|
risk: "read",
|
|
2078
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2477
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName64, buildArgs54(ctx)),
|
|
2079
2478
|
execute: async (ctx) => {
|
|
2080
|
-
return callDataopsApi(ctx,
|
|
2479
|
+
return callDataopsApi(ctx, toolName64, buildArgs54(ctx));
|
|
2081
2480
|
}
|
|
2082
2481
|
};
|
|
2083
2482
|
|
|
2084
2483
|
// src/commands/te-dataops/ide/list-repos.ts
|
|
2085
|
-
var
|
|
2086
|
-
function
|
|
2484
|
+
var toolName65 = "ide_list_repos";
|
|
2485
|
+
function buildArgs55(ctx) {
|
|
2087
2486
|
return {
|
|
2088
2487
|
spaceCode: ctx.str("spaceCode")
|
|
2089
2488
|
};
|
|
@@ -2096,14 +2495,14 @@ var listRepos = {
|
|
|
2096
2495
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
2097
2496
|
],
|
|
2098
2497
|
risk: "read",
|
|
2099
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2498
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName65, buildArgs55(ctx)),
|
|
2100
2499
|
execute: async (ctx) => {
|
|
2101
|
-
return callDataopsApi(ctx,
|
|
2500
|
+
return callDataopsApi(ctx, toolName65, buildArgs55(ctx));
|
|
2102
2501
|
}
|
|
2103
2502
|
};
|
|
2104
2503
|
|
|
2105
2504
|
// src/commands/te-dataops/ide/list-tables.ts
|
|
2106
|
-
var
|
|
2505
|
+
var toolName66 = "ide_list_tables";
|
|
2107
2506
|
function optionalString10(ctx, name) {
|
|
2108
2507
|
const value = ctx.str(name);
|
|
2109
2508
|
return value === "" ? void 0 : value;
|
|
@@ -2112,7 +2511,7 @@ function optionalEntityType2(ctx) {
|
|
|
2112
2511
|
const value = optionalString10(ctx, "entityType");
|
|
2113
2512
|
return value === void 0 ? void 0 : value.toUpperCase();
|
|
2114
2513
|
}
|
|
2115
|
-
function
|
|
2514
|
+
function buildArgs56(ctx) {
|
|
2116
2515
|
return {
|
|
2117
2516
|
spaceCode: ctx.str("spaceCode"),
|
|
2118
2517
|
connType: optionalString10(ctx, "connType"),
|
|
@@ -2145,19 +2544,19 @@ var listTables = {
|
|
|
2145
2544
|
throw new Error("entityType must be TABLE or VIEW");
|
|
2146
2545
|
}
|
|
2147
2546
|
},
|
|
2148
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2547
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName66, buildArgs56(ctx)),
|
|
2149
2548
|
execute: async (ctx) => {
|
|
2150
|
-
return callDataopsApi(ctx,
|
|
2549
|
+
return callDataopsApi(ctx, toolName66, buildArgs56(ctx));
|
|
2151
2550
|
}
|
|
2152
2551
|
};
|
|
2153
2552
|
|
|
2154
2553
|
// src/commands/te-dataops/ide/submit-sql-query.ts
|
|
2155
|
-
var
|
|
2554
|
+
var toolName67 = "ide_submit_sql_query";
|
|
2156
2555
|
function optionalString11(ctx, name) {
|
|
2157
2556
|
const value = ctx.str(name);
|
|
2158
2557
|
return value === "" ? void 0 : value;
|
|
2159
2558
|
}
|
|
2160
|
-
function
|
|
2559
|
+
function buildArgs57(ctx) {
|
|
2161
2560
|
return {
|
|
2162
2561
|
spaceCode: ctx.str("spaceCode"),
|
|
2163
2562
|
repoCode: optionalString11(ctx, "repoCode"),
|
|
@@ -2176,8 +2575,8 @@ var submitSqlQuery = {
|
|
|
2176
2575
|
{ name: "engineType", type: "string", required: false, desc: "SQL execution engine. Defaults to TASK_ENGINE_TRINO. Optional: TASK_ENGINE_STARROCKS." }
|
|
2177
2576
|
],
|
|
2178
2577
|
risk: "read",
|
|
2179
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2180
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2578
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName67, buildArgs57(ctx)),
|
|
2579
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName67, buildArgs57(ctx))
|
|
2181
2580
|
};
|
|
2182
2581
|
|
|
2183
2582
|
// src/commands/te-dataops/ide/index.ts
|