@thinkingai/ae-cli 6.1.17 → 6.1.19
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-77BUFLGC.js → auth-QPEVVBKT.js} +20 -15
- package/dist/auth-UMJAA72O.js +15 -0
- package/dist/{capability-72DTW5M2.js → capability-ASI62I4A.js} +53 -15
- package/dist/{chunk-UW5UN47B.js → chunk-533JK3YX.js} +2 -0
- package/dist/{chunk-UOUS37JQ.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-DAVKYVMW.js → chunk-B5HMQAOM.js} +31 -540
- package/dist/{chunk-VR3LCBHW.js → chunk-DKEXH6Q5.js} +6 -5
- package/dist/{chunk-VTWMIC5L.js → chunk-E2JKXMVO.js} +2 -0
- package/dist/{chunk-LYVNONC4.js → chunk-FR2EDAQM.js} +36 -0
- package/dist/{chunk-ILIU36SU.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-GT46FPXN.js → chunk-KEWVSO64.js} +18 -8
- package/dist/chunk-KZ6ZHF5J.js +294 -0
- package/dist/chunk-O6K2ODUE.js +318 -0
- package/dist/chunk-QL6R6TSK.js +25215 -0
- package/dist/{chunk-4SGZG4XY.js → chunk-RWXIXOZG.js} +28 -13
- package/dist/{chunk-YA6SMTXG.js → chunk-S5PONFBM.js} +5 -4
- package/dist/{chunk-4NN5IWVN.js → chunk-T6OSFQZD.js} +2 -0
- package/dist/{chunk-PTE56QPL.js → chunk-TKHSULJT.js} +6 -0
- package/dist/{chunk-6EIJSNBD.js → chunk-Y74WTIKJ.js} +2 -0
- package/dist/{client-TKG4WBHN.js → client-N7NGZUNI.js} +6 -4
- package/dist/{community-report-client-FI4LNVYS.js → community-report-client-6OL6GBQW.js} +3 -3
- package/dist/{config-RE6CMGPK.js → config-XNMACCKX.js} +10 -8
- package/dist/{data-integration-XQYB4X4F.js → data-integration-4NZGZ45E.js} +2502 -272
- package/dist/index.js +137 -1245
- package/dist/{local-data-upload-client-BWHSUQQK.js → local-data-upload-client-EFHDLXFG.js} +3 -3
- package/dist/{memory-YK33G4T7.js → memory-HBJQ2GC5.js} +8 -7
- package/dist/{metadata-UILXHBWF.js → metadata-62EWBEIG.js} +12 -11
- package/dist/{model-NR3JHFSJ.js → model-BHLJ2QMT.js} +10 -9
- package/dist/personal-semantic-preference-JBVMAI7L.js +240 -0
- package/dist/project-semantic-BQ4MPUS5.js +1115 -0
- package/dist/sync-MUWPRM5I.js +522 -0
- package/dist/{te-agent-4BKBODMF.js → te-agent-WQZTMEK4.js} +12 -10
- package/dist/{te-analysis-O6DCO6BS.js → te-analysis-MNCG65LU.js} +534 -48
- package/dist/{te-community-HLC43QKH.js → te-community-BNE6KREL.js} +8 -7
- package/dist/{te-dataops-EJP56W3K.js → te-dataops-TXLKM2W6.js} +469 -68
- package/dist/{te-engage-FGBGQ4IY.js → te-engage-TPKLRVTL.js} +84 -10
- package/dist/{te-experiment-SO5MPDMJ.js → te-experiment-6BYKTCY7.js} +303 -12
- package/dist/{te-kb-SQCLHG6X.js → te-kb-BUD6N3NI.js} +312 -25
- package/dist/{te-system-YARIK4S5.js → te-system-44LZJDTQ.js} +573 -37
- package/dist/{te-team-EFKWYKMK.js → te-team-XMP47YXE.js} +10 -7
- package/dist/{update-OGPSZM5A.js → update-UODFOZ4P.js} +9 -7
- package/package.json +18 -9
- package/skills/ae-agent/SKILL.md +3 -4
- package/skills/ae-agent/references/edit-skill.md +3 -0
- package/skills/ae-agent/references/get-skill-content.md +1 -1
- package/skills/ae-agent/references/rescan-skills.md +15 -13
- package/skills/ae-agent/references/upload-skill.md +7 -4
- package/skills/ae-analysis/SKILL.md +45 -4
- package/skills/ae-analysis/metadata_resolution.md +38 -4
- package/skills/ae-analysis/references/analysis_data_retrieval.md +29 -0
- package/skills/ae-analysis/references/analysis_gateway_assets.md +1 -1
- package/skills/ae-analysis/references/asset_authentication_export.md +22 -0
- package/skills/ae-analysis/references/asset_authentication_list.md +18 -14
- package/skills/ae-analysis/references/asset_authentication_update.md +29 -14
- package/skills/ae-analysis/references/audience_models.md +18 -0
- package/skills/ae-analysis/references/command_index.md +19 -11
- package/skills/ae-analysis/references/dashboard_get.md +18 -1
- package/skills/ae-analysis/references/dashboard_update.md +3 -0
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +23 -0
- package/skills/ae-analysis/references/personal_semantic_preference_delete.md +17 -0
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +19 -0
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +21 -0
- package/skills/ae-analysis/references/personal_semantic_preference_update.md +19 -0
- 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 +24 -4
- package/skills/ae-data-integration/references/custom-layer.md +93 -0
- package/skills/ae-data-integration/references/error-handling.md +145 -0
- package/skills/ae-data-integration/references/handoff.md +77 -18
- package/skills/ae-data-integration/references/local-analysis.md +1 -1
- package/skills/ae-data-integration/references/reuse.md +9 -5
- package/skills/ae-data-integration/references/sink-upload.md +1 -1
- package/skills/ae-data-integration/references/source-inspect.md +35 -13
- package/skills/ae-data-integration/references/tracking-plan.md +7 -5
- package/skills/ae-data-integration/references/transform.md +12 -10
- package/skills/ae-data-integration/references/ue-mapping.md +33 -11
- 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 +5 -0
- package/skills/ae-engage/references/build-task-save-guide.md +14 -1
- package/skills/ae-engage/references/save-flow.md +37 -1
- package/skills/ae-engage/references/save-task.md +88 -0
- package/skills/ae-experiment/SKILL.md +14 -4
- package/skills/ae-experiment/references/manage_feature_whitelist.md +66 -0
- package/skills/ae-experiment/references/manage_guardrail_metrics.md +26 -0
- package/skills/ae-experiment/references/save_experiment.md +1 -1
- package/skills/ae-experiment/references/save_metric.md +20 -8
- package/skills/ae-kb/SKILL.md +121 -10
- package/skills/ae-project-semantic/SKILL.md +193 -0
- package/skills/ae-project-semantic/references/query-routing-v5.md +165 -0
- package/skills/ae-project-semantic/references/recommendation-quality.md +68 -0
- package/skills/ae-system/SKILL.md +28 -30
- package/skills/ae-system/references/channel-management.md +303 -0
- package/dist/auth-2WTQOP77.js +0 -14
- package/dist/capability-PJHNI4GJ.js +0 -315
- package/dist/chunk-4KVPKXFX.js +0 -98
- package/dist/chunk-C4MGVGJW.js +0 -13
- package/dist/chunk-P3FGXJTU.js +0 -349
- package/dist/chunk-QGM4M3NI.js +0 -37
- package/dist/chunk-RGKJGKT7.js +0 -71
- package/dist/chunk-SAU3QFIQ.js +0 -556
- package/dist/chunk-VPKZ7I72.js +0 -509
- package/dist/chunk-ZZUOD757.js +0 -598
- package/dist/memory-CHRU2F7W.js +0 -893
- package/dist/metadata-XXR34N5P.js +0 -339
- package/dist/model-K3KLWIW6.js +0 -139
- package/dist/sync-FCKOVWWS.js +0 -10261
- package/dist/te-agent-HLW4VTQK.js +0 -3893
- package/dist/te-analysis-ZMNGOVNW.js +0 -8958
- package/dist/te-community-6HPBWJUZ.js +0 -1859
- package/dist/te-dataops-HDRUXY4K.js +0 -2208
- package/dist/te-engage-RAK5PESW.js +0 -4898
- package/dist/te-experiment-VZF7BT6G.js +0 -770
- package/dist/te-system-Z77IKZFN.js +0 -2213
|
@@ -1,25 +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";
|
|
12
|
+
import {
|
|
13
|
+
resolveHost
|
|
14
|
+
} from "./chunk-O6K2ODUE.js";
|
|
11
15
|
import {
|
|
12
|
-
resolveHost,
|
|
13
16
|
safeJsonParse
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KZ6ZHF5J.js";
|
|
15
18
|
import {
|
|
16
19
|
CliValidationError,
|
|
17
20
|
PermissionError
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-533JK3YX.js";
|
|
19
22
|
import {
|
|
20
23
|
logger
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-QGM4M3NI.js";
|
|
24
|
+
} from "./chunk-FR2EDAQM.js";
|
|
23
25
|
|
|
24
26
|
// src/commands/te-dataops/shared.ts
|
|
25
27
|
import { randomBytes } from "crypto";
|
|
@@ -59,6 +61,15 @@ var TOOL_API_MAP = {
|
|
|
59
61
|
operations_get_flow_instance_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/flow-instances/detail" },
|
|
60
62
|
operations_get_task_instance_detail: { method: "GET", path: "/api/cli/dataops/v1/gaia/operations/task-instances/detail" },
|
|
61
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" },
|
|
62
73
|
integration_list_datasource_components: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-components" },
|
|
63
74
|
integration_get_datasource_component_template: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasource-component-template" },
|
|
64
75
|
integration_list_space_datasources: { method: "GET", path: "/api/cli/dataops/v1/gaia/integration/datasources" },
|
|
@@ -88,10 +99,10 @@ var TOOL_API_MAP = {
|
|
|
88
99
|
ide_get_sql_query_status: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/sql-query-status" },
|
|
89
100
|
ide_cancel_sql_query: { method: "POST", path: "/api/cli/dataops/v1/gaia/ide/sql-query-cancel" }
|
|
90
101
|
};
|
|
91
|
-
async function callDataopsApi(ctx,
|
|
92
|
-
const spec = TOOL_API_MAP[
|
|
102
|
+
async function callDataopsApi(ctx, toolName68, args = {}) {
|
|
103
|
+
const spec = TOOL_API_MAP[toolName68];
|
|
93
104
|
if (!spec) {
|
|
94
|
-
throw new Error(`DataOps API mapping not found for tool: ${
|
|
105
|
+
throw new Error(`DataOps API mapping not found for tool: ${toolName68}`);
|
|
95
106
|
}
|
|
96
107
|
const params = compactArgs(args);
|
|
97
108
|
if (spec.method === "GET") {
|
|
@@ -99,10 +110,10 @@ async function callDataopsApi(ctx, toolName59, args = {}) {
|
|
|
99
110
|
}
|
|
100
111
|
return dataopsRequest(ctx, spec.method, spec.path, {}, params);
|
|
101
112
|
}
|
|
102
|
-
function buildDataopsApiDryRun(ctx,
|
|
103
|
-
const spec = TOOL_API_MAP[
|
|
113
|
+
function buildDataopsApiDryRun(ctx, toolName68, args = {}) {
|
|
114
|
+
const spec = TOOL_API_MAP[toolName68];
|
|
104
115
|
if (!spec) {
|
|
105
|
-
throw new Error(`DataOps API mapping not found for tool: ${
|
|
116
|
+
throw new Error(`DataOps API mapping not found for tool: ${toolName68}`);
|
|
106
117
|
}
|
|
107
118
|
const params = compactArgs(args);
|
|
108
119
|
if (spec.method === "GET") {
|
|
@@ -1688,8 +1699,223 @@ var commands3 = [
|
|
|
1688
1699
|
];
|
|
1689
1700
|
var integration_default = commands3;
|
|
1690
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
|
+
|
|
1691
1917
|
// src/commands/te-dataops/operations/get-flow-instance-detail.ts
|
|
1692
|
-
var
|
|
1918
|
+
var toolName47 = "operations_get_flow_instance_detail";
|
|
1693
1919
|
function buildArgs42(ctx) {
|
|
1694
1920
|
return {
|
|
1695
1921
|
spaceCode: ctx.str("spaceCode"),
|
|
@@ -1707,14 +1933,27 @@ var getFlowInstanceDetail = {
|
|
|
1707
1933
|
{ name: "flowInstanceId", type: "number", required: true, desc: "Workflow instance ID from +search_flow_instances" }
|
|
1708
1934
|
],
|
|
1709
1935
|
risk: "read",
|
|
1710
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1936
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName47, buildArgs42(ctx)),
|
|
1711
1937
|
execute: async (ctx) => {
|
|
1712
|
-
return callDataopsApi(ctx,
|
|
1938
|
+
return callDataopsApi(ctx, toolName47, buildArgs42(ctx));
|
|
1713
1939
|
}
|
|
1714
1940
|
};
|
|
1715
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
|
+
|
|
1716
1955
|
// src/commands/te-dataops/operations/get-task-instance-detail.ts
|
|
1717
|
-
var
|
|
1956
|
+
var toolName49 = "operations_get_task_instance_detail";
|
|
1718
1957
|
function optionalBool2(ctx, name) {
|
|
1719
1958
|
return ctx.str(name) === "" ? void 0 : ctx.bool(name);
|
|
1720
1959
|
}
|
|
@@ -1743,15 +1982,127 @@ var getTaskInstanceDetail = {
|
|
|
1743
1982
|
{ name: "includeLog", type: "boolean", required: false, desc: "Whether to include task logs. Default false" }
|
|
1744
1983
|
],
|
|
1745
1984
|
risk: "read",
|
|
1746
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1985
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName49, buildArgs43(ctx)),
|
|
1747
1986
|
execute: async (ctx) => {
|
|
1748
|
-
return callDataopsApi(ctx,
|
|
1987
|
+
return callDataopsApi(ctx, toolName49, buildArgs43(ctx));
|
|
1749
1988
|
}
|
|
1750
1989
|
};
|
|
1751
1990
|
|
|
1752
|
-
// src/commands/te-dataops/operations/
|
|
1753
|
-
var
|
|
1991
|
+
// src/commands/te-dataops/operations/list-backfill-flows.ts
|
|
1992
|
+
var toolName50 = "operations_list_backfill_flows";
|
|
1754
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) {
|
|
1755
2106
|
return {
|
|
1756
2107
|
spaceCode: ctx.str("spaceCode"),
|
|
1757
2108
|
keyword: ctx.str("keyword"),
|
|
@@ -1776,15 +2127,28 @@ var searchFlowInstances = {
|
|
|
1776
2127
|
{ name: "pageSize", type: "number", required: false, desc: "Optional page size; default 20, max 100" }
|
|
1777
2128
|
],
|
|
1778
2129
|
risk: "read",
|
|
1779
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2130
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName54, buildArgs46(ctx)),
|
|
1780
2131
|
execute: async (ctx) => {
|
|
1781
|
-
return callDataopsApi(ctx,
|
|
2132
|
+
return callDataopsApi(ctx, toolName54, buildArgs46(ctx));
|
|
1782
2133
|
}
|
|
1783
2134
|
};
|
|
1784
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
|
+
|
|
1785
2149
|
// src/commands/te-dataops/operations/stop-flow-instance.ts
|
|
1786
|
-
var
|
|
1787
|
-
function
|
|
2150
|
+
var toolName56 = "operations_stop_flow_instance";
|
|
2151
|
+
function buildArgs47(ctx) {
|
|
1788
2152
|
const executeId = ctx.optionalNum("executeId");
|
|
1789
2153
|
const flowInstanceId = ctx.optionalNum("flowInstanceId");
|
|
1790
2154
|
if (executeId == null && flowInstanceId == null || executeId != null && flowInstanceId != null) {
|
|
@@ -1811,32 +2175,69 @@ var stopFlowInstance = {
|
|
|
1811
2175
|
{ name: "flowInstanceId", type: "number", required: false, desc: "Workflow instance ID returned by dataops_operations +search_flow_instances" }
|
|
1812
2176
|
],
|
|
1813
2177
|
risk: "write",
|
|
1814
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2178
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName56, buildArgs47(ctx)),
|
|
1815
2179
|
execute: async (ctx) => {
|
|
1816
|
-
return callDataopsApi(ctx,
|
|
2180
|
+
return callDataopsApi(ctx, toolName56, buildArgs47(ctx));
|
|
1817
2181
|
}
|
|
1818
2182
|
};
|
|
1819
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
|
+
|
|
1820
2212
|
// src/commands/te-dataops/operations/index.ts
|
|
1821
2213
|
var commands4 = [
|
|
1822
2214
|
searchFlowInstances,
|
|
1823
2215
|
getFlowInstanceDetail,
|
|
1824
2216
|
getTaskInstanceDetail,
|
|
1825
|
-
stopFlowInstance
|
|
2217
|
+
stopFlowInstance,
|
|
2218
|
+
listBackfillFlows,
|
|
2219
|
+
createBackfillJob,
|
|
2220
|
+
updateBackfillJob,
|
|
2221
|
+
deleteBackfillJob,
|
|
2222
|
+
runBackfillJob,
|
|
2223
|
+
searchBackfillJobs,
|
|
2224
|
+
getBackfillJobDetail,
|
|
2225
|
+
stopBackfillJob,
|
|
2226
|
+
rerunBackfillJob
|
|
1826
2227
|
];
|
|
1827
2228
|
var operations_default = commands4;
|
|
1828
2229
|
|
|
1829
2230
|
// src/commands/te-dataops/repo/list-spaces.ts
|
|
1830
|
-
var
|
|
2231
|
+
var toolName58 = "repo_list_spaces";
|
|
1831
2232
|
var listSpaces = {
|
|
1832
2233
|
service: "dataops_repo",
|
|
1833
2234
|
command: "+list_spaces",
|
|
1834
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.",
|
|
1835
2236
|
flags: [],
|
|
1836
2237
|
risk: "read",
|
|
1837
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2238
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName58, {}),
|
|
1838
2239
|
execute: async (ctx) => {
|
|
1839
|
-
return callDataopsApi(ctx,
|
|
2240
|
+
return callDataopsApi(ctx, toolName58, {});
|
|
1840
2241
|
}
|
|
1841
2242
|
};
|
|
1842
2243
|
|
|
@@ -1847,12 +2248,12 @@ var commands5 = [
|
|
|
1847
2248
|
var repo_default = commands5;
|
|
1848
2249
|
|
|
1849
2250
|
// src/commands/te-dataops/ide/cancel-sql-query.ts
|
|
1850
|
-
var
|
|
2251
|
+
var toolName59 = "ide_cancel_sql_query";
|
|
1851
2252
|
function optionalString4(ctx, name) {
|
|
1852
2253
|
const value = ctx.str(name);
|
|
1853
2254
|
return value === "" ? void 0 : value;
|
|
1854
2255
|
}
|
|
1855
|
-
function
|
|
2256
|
+
function buildArgs49(ctx) {
|
|
1856
2257
|
return {
|
|
1857
2258
|
spaceCode: ctx.str("spaceCode"),
|
|
1858
2259
|
downloadTaskId: ctx.num("downloadTaskId"),
|
|
@@ -1869,18 +2270,18 @@ var cancelSqlQuery = {
|
|
|
1869
2270
|
{ name: "requestId", type: "string", required: false, desc: "Optional request ID returned by +submit_sql_query, used only for trace display" }
|
|
1870
2271
|
],
|
|
1871
2272
|
risk: "write",
|
|
1872
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1873
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2273
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName59, buildArgs49(ctx)),
|
|
2274
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName59, buildArgs49(ctx))
|
|
1874
2275
|
};
|
|
1875
2276
|
|
|
1876
2277
|
// src/commands/te-dataops/ide/get-sql-query-status.ts
|
|
1877
|
-
var
|
|
2278
|
+
var toolName60 = "ide_get_sql_query_status";
|
|
1878
2279
|
var downloadPath = "/api/cli/dataops/v1/gaia/ide/sql-query-download";
|
|
1879
2280
|
function optionalString5(ctx, name) {
|
|
1880
2281
|
const value = ctx.str(name);
|
|
1881
2282
|
return value === "" ? void 0 : value;
|
|
1882
2283
|
}
|
|
1883
|
-
function
|
|
2284
|
+
function buildArgs50(ctx) {
|
|
1884
2285
|
return {
|
|
1885
2286
|
spaceCode: ctx.str("spaceCode"),
|
|
1886
2287
|
downloadTaskId: ctx.num("downloadTaskId"),
|
|
@@ -1908,9 +2309,9 @@ var getSqlQueryStatus = {
|
|
|
1908
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." }
|
|
1909
2310
|
],
|
|
1910
2311
|
risk: "read",
|
|
1911
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2312
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName60, buildArgs50(ctx)),
|
|
1912
2313
|
execute: async (ctx) => {
|
|
1913
|
-
const data = await callDataopsApi(ctx,
|
|
2314
|
+
const data = await callDataopsApi(ctx, toolName60, buildArgs50(ctx));
|
|
1914
2315
|
const downloadTo = optionalString5(ctx, "downloadTo");
|
|
1915
2316
|
if (downloadTo && isDownloadReady(data)) {
|
|
1916
2317
|
return { ...data, localFile: await downloadResult(ctx, data, downloadTo) };
|
|
@@ -1920,12 +2321,12 @@ var getSqlQueryStatus = {
|
|
|
1920
2321
|
};
|
|
1921
2322
|
|
|
1922
2323
|
// src/commands/te-dataops/ide/list-catalogs.ts
|
|
1923
|
-
var
|
|
2324
|
+
var toolName61 = "ide_list_catalogs";
|
|
1924
2325
|
function optionalString6(ctx, name) {
|
|
1925
2326
|
const value = ctx.str(name);
|
|
1926
2327
|
return value === "" ? void 0 : value;
|
|
1927
2328
|
}
|
|
1928
|
-
function
|
|
2329
|
+
function buildArgs51(ctx) {
|
|
1929
2330
|
return {
|
|
1930
2331
|
spaceCode: ctx.str("spaceCode"),
|
|
1931
2332
|
connType: optionalString6(ctx, "connType"),
|
|
@@ -1942,19 +2343,19 @@ var listCatalogs = {
|
|
|
1942
2343
|
{ name: "repoCode", type: "string", required: false, desc: "Optional repository code. Default te_etl" }
|
|
1943
2344
|
],
|
|
1944
2345
|
risk: "read",
|
|
1945
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2346
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName61, buildArgs51(ctx)),
|
|
1946
2347
|
execute: async (ctx) => {
|
|
1947
|
-
return callDataopsApi(ctx,
|
|
2348
|
+
return callDataopsApi(ctx, toolName61, buildArgs51(ctx));
|
|
1948
2349
|
}
|
|
1949
2350
|
};
|
|
1950
2351
|
|
|
1951
2352
|
// src/commands/te-dataops/ide/get-schema-info.ts
|
|
1952
|
-
var
|
|
2353
|
+
var toolName62 = "ide_get_schema_info";
|
|
1953
2354
|
function optionalString7(ctx, name) {
|
|
1954
2355
|
const value = ctx.str(name);
|
|
1955
2356
|
return value === "" ? void 0 : value;
|
|
1956
2357
|
}
|
|
1957
|
-
function
|
|
2358
|
+
function buildArgs52(ctx) {
|
|
1958
2359
|
return {
|
|
1959
2360
|
spaceCode: ctx.str("spaceCode"),
|
|
1960
2361
|
connType: optionalString7(ctx, "connType"),
|
|
@@ -1986,14 +2387,14 @@ var getSchemaInfo = {
|
|
|
1986
2387
|
{ name: "schema", type: "string", required: true, desc: "Schema name" }
|
|
1987
2388
|
],
|
|
1988
2389
|
risk: "read",
|
|
1989
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2390
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName62, buildArgs52(ctx)),
|
|
1990
2391
|
execute: async (ctx) => {
|
|
1991
|
-
return schemaStats(await callDataopsApi(ctx,
|
|
2392
|
+
return schemaStats(await callDataopsApi(ctx, toolName62, buildArgs52(ctx)));
|
|
1992
2393
|
}
|
|
1993
2394
|
};
|
|
1994
2395
|
|
|
1995
2396
|
// src/commands/te-dataops/ide/get-table-detail.ts
|
|
1996
|
-
var
|
|
2397
|
+
var toolName63 = "ide_get_table_detail";
|
|
1997
2398
|
function optionalString8(ctx, name) {
|
|
1998
2399
|
const value = ctx.str(name);
|
|
1999
2400
|
return value === "" ? void 0 : value;
|
|
@@ -2006,7 +2407,7 @@ function optionalEntityType(ctx) {
|
|
|
2006
2407
|
const value = optionalString8(ctx, "entityType");
|
|
2007
2408
|
return value === void 0 ? void 0 : value.toUpperCase();
|
|
2008
2409
|
}
|
|
2009
|
-
function
|
|
2410
|
+
function buildArgs53(ctx) {
|
|
2010
2411
|
return {
|
|
2011
2412
|
spaceCode: ctx.str("spaceCode"),
|
|
2012
2413
|
connType: optionalString8(ctx, "connType"),
|
|
@@ -2041,19 +2442,19 @@ var getTableDetail2 = {
|
|
|
2041
2442
|
throw new Error("entityType must be TABLE or VIEW");
|
|
2042
2443
|
}
|
|
2043
2444
|
},
|
|
2044
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2445
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName63, buildArgs53(ctx)),
|
|
2045
2446
|
execute: async (ctx) => {
|
|
2046
|
-
return callDataopsApi(ctx,
|
|
2447
|
+
return callDataopsApi(ctx, toolName63, buildArgs53(ctx));
|
|
2047
2448
|
}
|
|
2048
2449
|
};
|
|
2049
2450
|
|
|
2050
2451
|
// src/commands/te-dataops/ide/search-tables.ts
|
|
2051
|
-
var
|
|
2452
|
+
var toolName64 = "ide_search_tables";
|
|
2052
2453
|
function optionalString9(ctx, name) {
|
|
2053
2454
|
const value = ctx.str(name);
|
|
2054
2455
|
return value === "" ? void 0 : value;
|
|
2055
2456
|
}
|
|
2056
|
-
function
|
|
2457
|
+
function buildArgs54(ctx) {
|
|
2057
2458
|
return {
|
|
2058
2459
|
spaceCode: ctx.str("spaceCode"),
|
|
2059
2460
|
connType: optionalString9(ctx, "connType"),
|
|
@@ -2074,15 +2475,15 @@ var searchTables = {
|
|
|
2074
2475
|
{ name: "size", type: "number", required: false, desc: "Optional maximum results. Default 20" }
|
|
2075
2476
|
],
|
|
2076
2477
|
risk: "read",
|
|
2077
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2478
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName64, buildArgs54(ctx)),
|
|
2078
2479
|
execute: async (ctx) => {
|
|
2079
|
-
return callDataopsApi(ctx,
|
|
2480
|
+
return callDataopsApi(ctx, toolName64, buildArgs54(ctx));
|
|
2080
2481
|
}
|
|
2081
2482
|
};
|
|
2082
2483
|
|
|
2083
2484
|
// src/commands/te-dataops/ide/list-repos.ts
|
|
2084
|
-
var
|
|
2085
|
-
function
|
|
2485
|
+
var toolName65 = "ide_list_repos";
|
|
2486
|
+
function buildArgs55(ctx) {
|
|
2086
2487
|
return {
|
|
2087
2488
|
spaceCode: ctx.str("spaceCode")
|
|
2088
2489
|
};
|
|
@@ -2095,14 +2496,14 @@ var listRepos = {
|
|
|
2095
2496
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
2096
2497
|
],
|
|
2097
2498
|
risk: "read",
|
|
2098
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2499
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName65, buildArgs55(ctx)),
|
|
2099
2500
|
execute: async (ctx) => {
|
|
2100
|
-
return callDataopsApi(ctx,
|
|
2501
|
+
return callDataopsApi(ctx, toolName65, buildArgs55(ctx));
|
|
2101
2502
|
}
|
|
2102
2503
|
};
|
|
2103
2504
|
|
|
2104
2505
|
// src/commands/te-dataops/ide/list-tables.ts
|
|
2105
|
-
var
|
|
2506
|
+
var toolName66 = "ide_list_tables";
|
|
2106
2507
|
function optionalString10(ctx, name) {
|
|
2107
2508
|
const value = ctx.str(name);
|
|
2108
2509
|
return value === "" ? void 0 : value;
|
|
@@ -2111,7 +2512,7 @@ function optionalEntityType2(ctx) {
|
|
|
2111
2512
|
const value = optionalString10(ctx, "entityType");
|
|
2112
2513
|
return value === void 0 ? void 0 : value.toUpperCase();
|
|
2113
2514
|
}
|
|
2114
|
-
function
|
|
2515
|
+
function buildArgs56(ctx) {
|
|
2115
2516
|
return {
|
|
2116
2517
|
spaceCode: ctx.str("spaceCode"),
|
|
2117
2518
|
connType: optionalString10(ctx, "connType"),
|
|
@@ -2144,19 +2545,19 @@ var listTables = {
|
|
|
2144
2545
|
throw new Error("entityType must be TABLE or VIEW");
|
|
2145
2546
|
}
|
|
2146
2547
|
},
|
|
2147
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2548
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName66, buildArgs56(ctx)),
|
|
2148
2549
|
execute: async (ctx) => {
|
|
2149
|
-
return callDataopsApi(ctx,
|
|
2550
|
+
return callDataopsApi(ctx, toolName66, buildArgs56(ctx));
|
|
2150
2551
|
}
|
|
2151
2552
|
};
|
|
2152
2553
|
|
|
2153
2554
|
// src/commands/te-dataops/ide/submit-sql-query.ts
|
|
2154
|
-
var
|
|
2555
|
+
var toolName67 = "ide_submit_sql_query";
|
|
2155
2556
|
function optionalString11(ctx, name) {
|
|
2156
2557
|
const value = ctx.str(name);
|
|
2157
2558
|
return value === "" ? void 0 : value;
|
|
2158
2559
|
}
|
|
2159
|
-
function
|
|
2560
|
+
function buildArgs57(ctx) {
|
|
2160
2561
|
return {
|
|
2161
2562
|
spaceCode: ctx.str("spaceCode"),
|
|
2162
2563
|
repoCode: optionalString11(ctx, "repoCode"),
|
|
@@ -2175,8 +2576,8 @@ var submitSqlQuery = {
|
|
|
2175
2576
|
{ name: "engineType", type: "string", required: false, desc: "SQL execution engine. Defaults to TASK_ENGINE_TRINO. Optional: TASK_ENGINE_STARROCKS." }
|
|
2176
2577
|
],
|
|
2177
2578
|
risk: "read",
|
|
2178
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2179
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2579
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName67, buildArgs57(ctx)),
|
|
2580
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName67, buildArgs57(ctx))
|
|
2180
2581
|
};
|
|
2181
2582
|
|
|
2182
2583
|
// src/commands/te-dataops/ide/index.ts
|