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