@thinkingai/ae-cli 6.1.41 → 6.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/README.md +14 -4
  2. package/README.zh.md +14 -4
  3. package/bin/ae-cli.js +3 -0
  4. package/bin/heari/commander-LICENSE +22 -0
  5. package/bin/heari/engine.mjs +6136 -0
  6. package/bin/heari/package.json +6 -0
  7. package/bin/heari.mjs +29 -0
  8. package/cli-installation-guide.md +6 -7
  9. package/dist/{ai-monitor-OOOD4QDK.js → ai-monitor-4VPHXQTL.js} +7 -6
  10. package/dist/ai-monitor.js +10 -9
  11. package/dist/{auth-6BUUY5XS.js → auth-RDSS2LUT.js} +18 -16
  12. package/dist/{automation-IMDCJUML.js → automation-VLIWG2XY.js} +5 -4
  13. package/dist/{capability-XXFCANX7.js → capability-CUOEIB5F.js} +5 -4
  14. package/dist/{chunk-KE5WGBXS.js → chunk-3DTMWDJX.js} +1 -1
  15. package/dist/{chunk-FPPCXG6K.js → chunk-3FSYICDW.js} +6 -5
  16. package/dist/{chunk-BEVWMPCZ.js → chunk-3TV24AVQ.js} +10 -10
  17. package/dist/{chunk-DTODOQ6T.js → chunk-3U75VLCP.js} +1 -1
  18. package/dist/{chunk-6W56UQPO.js → chunk-4MOCV6HU.js} +1 -1
  19. package/dist/{chunk-M2OCZRVX.js → chunk-6VLHJKDD.js} +2 -2
  20. package/dist/{chunk-WG27BD67.js → chunk-7KBENPQF.js} +8 -16
  21. package/dist/{chunk-5YQSCMGS.js → chunk-BFSWGXM2.js} +3 -3
  22. package/dist/{chunk-UK7HQ4IL.js → chunk-CBNE2S44.js} +2 -2
  23. package/dist/{chunk-UWQXGF44.js → chunk-FEYZBUFQ.js} +4 -353
  24. package/dist/chunk-FKTVD63C.js +369 -0
  25. package/dist/{chunk-2H3SFJE3.js → chunk-FKVG7LOP.js} +5 -3
  26. package/dist/{chunk-I7H72CMN.js → chunk-IAZ4AMVY.js} +109 -85
  27. package/dist/{chunk-KDRE7SWM.js → chunk-LSELMDKQ.js} +2 -2
  28. package/dist/{chunk-2RORKIF6.js → chunk-NJGB4YOH.js} +2 -2
  29. package/dist/{chunk-L7MT53VM.js → chunk-PWG5IGCP.js} +1 -1
  30. package/dist/{chunk-EHH3ZF7D.js → chunk-TFEGYB4X.js} +2 -2
  31. package/dist/{chunk-DZRQGI2Z.js → chunk-ZPAOEDK7.js} +5 -3
  32. package/dist/{compat-check-AO3BFA3N.js → compat-check-L3C7HCVG.js} +4 -3
  33. package/dist/{config-N5V4VNER.js → config-LAF5MMYK.js} +6 -5
  34. package/dist/context-E4YKECC4.js +350 -0
  35. package/dist/{evaluation-OZM54MES.js → evaluation-I4IJ25CY.js} +4 -3
  36. package/dist/heari-cli-login.js +83 -0
  37. package/dist/index.js +43 -34
  38. package/dist/{memory-VPOPSU52.js → memory-Y7LPCRP4.js} +5 -4
  39. package/dist/{metadata-OUJPEMLD.js → metadata-T6HYAU7E.js} +7 -6
  40. package/dist/{model-2F2354QP.js → model-2BNN72MN.js} +7 -6
  41. package/dist/{personal-semantic-preference-WEAIZQXM.js → personal-semantic-preference-WCZBOA7V.js} +42 -16
  42. package/dist/{project-semantic-6VXUYU4A.js → project-semantic-WW5AZST3.js} +266 -17
  43. package/dist/{sync-BAV3UY46.js → sync-6PL25V42.js} +13 -12
  44. package/dist/{te-agent-QWZC36YS.js → te-agent-KXLDW4NE.js} +6 -5
  45. package/dist/{te-analysis-43RCOPUA.js → te-analysis-KKRECQ7F.js} +311 -52
  46. package/dist/{te-community-ECNTP35Z.js → te-community-6RGX7IWH.js} +8 -6
  47. package/dist/{te-dataops-ISEKYRLZ.js → te-dataops-RSPBC6WJ.js} +726 -220
  48. package/dist/{te-engage-LBKIZXZO.js → te-engage-FIPP5L2Z.js} +6 -5
  49. package/dist/{te-experiment-5TPQKN6B.js → te-experiment-KQ5CBYKI.js} +86 -10
  50. package/dist/{te-kb-SHL56BJ5.js → te-kb-XYSDXZUG.js} +32 -11
  51. package/dist/{te-system-Z4VEB6PL.js → te-system-QSOHAP7M.js} +7 -6
  52. package/dist/{te-team-EZ3TZTLV.js → te-team-R6MZ4RK2.js} +6 -5
  53. package/dist/{things-UBMLTY3S.js → things-DEONFUGS.js} +6 -5
  54. package/dist/{update-WE7VNRKZ.js → update-C6G4P3C7.js} +5 -4
  55. package/dist/{web-runtime-H53QKJS2.js → web-runtime-UGKPTBOK.js} +18 -12
  56. package/dist/{workspace-W5ZPVWJS.js → workspace-OBIIE5FN.js} +5 -4
  57. package/package.json +7 -5
  58. package/skills/ae-analysis/SKILL.md +41 -16
  59. package/skills/ae-analysis/references/adhoc_export.md +1 -1
  60. package/skills/ae-analysis/references/adhoc_run.md +8 -2
  61. package/skills/ae-analysis/references/analysis_drilldown_contract.md +1 -1
  62. package/skills/ae-analysis/references/audience_scheduling.md +30 -0
  63. package/skills/ae-analysis/references/business_semantics_workspace.md +57 -0
  64. package/skills/ae-analysis/references/command_index.md +18 -13
  65. package/skills/ae-analysis/references/context_prepare.md +49 -0
  66. package/skills/ae-analysis/references/drilldown_entities_export.md +1 -1
  67. package/skills/ae-analysis/references/drilldown_entities_run.md +1 -1
  68. package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -1
  69. package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -1
  70. package/skills/ae-analysis/references/governance_recommendation_export.md +1 -1
  71. package/skills/ae-analysis/references/personal_semantic_preference_add.md +5 -1
  72. package/skills/ae-analysis/references/personal_semantic_preference_get.md +4 -2
  73. package/skills/ae-analysis/references/personal_semantic_preference_list.md +7 -6
  74. package/skills/ae-analysis/references/personal_semantic_preference_submit.md +1 -1
  75. package/skills/ae-analysis/references/personal_semantic_preference_update.md +5 -1
  76. package/skills/ae-analysis/references/project_info_get.md +4 -0
  77. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +1 -1
  78. package/skills/ae-analysis/references/project_semantic_setup.md +60 -0
  79. package/skills/ae-analysis/references/report_get.md +2 -0
  80. package/skills/ae-analysis/references/report_presentation.md +55 -0
  81. package/skills/ae-analysis/references/report_update.md +4 -2
  82. package/skills/ae-analysis/references/system_openapi_token_batch_generate.md +20 -0
  83. package/skills/ae-analysis/references/system_openapi_token_get.md +14 -0
  84. package/skills/ae-analysis/references/user_cluster_create.md +3 -1
  85. package/skills/ae-analysis/references/user_cluster_models.md +2 -0
  86. package/skills/ae-analysis/references/user_cluster_update.md +5 -3
  87. package/skills/ae-analysis/references/user_tag_create.md +4 -22
  88. package/skills/ae-analysis/references/user_tag_models.md +8 -0
  89. package/skills/ae-analysis/references/user_tag_update.md +6 -14
  90. package/skills/ae-analysis/scripts/read-semantic-catalog.mjs +40 -0
  91. package/skills/ae-capability/SKILL.md +5 -1
  92. package/skills/ae-dataops/SKILL.md +9 -6
  93. package/skills/ae-dataops/references/dataops-flow-create.md +64 -47
  94. package/skills/ae-dataops/references/dataops-flow-monitor.md +4 -2
  95. package/skills/ae-dataops/references/dataops-flow-python.md +109 -0
  96. package/skills/ae-experiment/SKILL.md +9 -1
  97. package/skills/ae-experiment/references/manage_feature_fixed_value.md +73 -0
  98. package/skills/ae-experiment/references/save_feature.md +14 -1
  99. package/skills/ae-heari-research/SKILL.md +40 -0
  100. package/skills/ae-heari-research/references/design.md +35 -0
  101. package/skills/ae-heari-research/references/examples.md +46 -0
  102. package/skills/ae-heari-research/references/platform-auth.md +35 -0
  103. package/skills/ae-heari-research/references/platform-research.md +74 -0
  104. package/skills/ae-heari-research/references/platform-results.md +73 -0
  105. package/skills/ae-heari-research/references/platform.md +34 -0
  106. package/skills/ae-heari-research/references/probing-screening.md +31 -0
  107. package/skills/ae-heari-research/references/quality.md +44 -0
  108. package/skills/ae-kb/SKILL.md +10 -5
  109. package/skills/ae-kb/references/analysis-workflow.md +19 -10
  110. package/skills/ae-kb/references/query-workflow.md +34 -17
  111. package/skills/ae-kb-discovery/SKILL.md +4 -3
  112. package/skills/ae-onboarding/SKILL.md +4 -6
  113. package/skills/ae-onboarding/references/onboarding_run.md +5 -1
  114. package/dist/context-WJQGJD6F.js +0 -139
  115. package/dist/{data-integration-KMJWYAKK.js → data-integration-SCYYZLWI.js} +4 -4
@@ -4,16 +4,18 @@ import {
4
4
  } from "./chunk-Z6WSCIHM.js";
5
5
  import {
6
6
  printError
7
- } from "./chunk-6W56UQPO.js";
8
- import "./chunk-I7H72CMN.js";
7
+ } from "./chunk-4MOCV6HU.js";
8
+ import "./chunk-IAZ4AMVY.js";
9
9
  import {
10
10
  sourceLoggedFetch
11
- } from "./chunk-WG27BD67.js";
11
+ } from "./chunk-7KBENPQF.js";
12
12
  import {
13
- SecureStoreAuthError,
14
13
  getCliToken,
15
14
  internalCallSourceHeaders
16
- } from "./chunk-UWQXGF44.js";
15
+ } from "./chunk-FKTVD63C.js";
16
+ import {
17
+ SecureStoreAuthError
18
+ } from "./chunk-FEYZBUFQ.js";
17
19
  import {
18
20
  safeJsonParse
19
21
  } from "./chunk-IGU3R2JD.js";
@@ -58,12 +60,20 @@ var TOOL_API_MAP = {
58
60
  flow_release_flow: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flow-release" },
59
61
  flow_create_sql_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/tasks" },
60
62
  flow_update_sql_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/sql-task-definition" },
63
+ flow_get_sql_task: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/sql-task-definition" },
61
64
  flow_create_integration_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/integration-tasks" },
62
65
  flow_update_integration_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/integration-task-definition" },
63
66
  flow_create_workflow_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/workflow-instance-check-tasks" },
64
67
  flow_update_workflow_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/workflow-instance-check-task-definition" },
65
68
  flow_create_task_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-instance-check-tasks" },
66
69
  flow_update_task_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-instance-check-task-definition" },
70
+ flow_create_python_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/python-tasks" },
71
+ flow_update_python_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/python-task-definition" },
72
+ flow_get_python_task: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-task-definition" },
73
+ flow_list_python_versions: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-versions" },
74
+ flow_list_python_package_sources: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-package-sources" },
75
+ flow_list_python_directories: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-directories" },
76
+ flow_browse_python_directory: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-directory-tree" },
67
77
  flow_delete_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-deletion" },
68
78
  flow_add_task_relation: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-relation" },
69
79
  flow_get_flow_params: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flow-params" },
@@ -112,22 +122,22 @@ var TOOL_API_MAP = {
112
122
  ide_get_sql_query_status: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/sql-query-status" },
113
123
  ide_cancel_sql_query: { method: "POST", path: "/api/cli/dataops/v1/gaia/ide/sql-query-cancel" }
114
124
  };
115
- async function callDataopsApi(ctx, toolName77, args = {}) {
116
- const spec = TOOL_API_MAP[toolName77];
125
+ async function callDataopsApi(ctx, toolName85, args = {}) {
126
+ const spec = TOOL_API_MAP[toolName85];
117
127
  if (!spec) {
118
- throw new Error(`DataOps API mapping not found for tool: ${toolName77}`);
128
+ throw new Error(`DataOps API mapping not found for tool: ${toolName85}`);
119
129
  }
120
- const params = compactArgs(args, toolName77);
130
+ const params = compactArgs(args, toolName85);
121
131
  if (spec.method === "GET") {
122
132
  return dataopsRequest(ctx, spec.method, spec.path, params);
123
133
  }
124
134
  return dataopsRequest(ctx, spec.method, spec.path, {}, params);
125
135
  }
126
- async function callDataopsFieldMutationApi(ctx, toolName77, args) {
127
- return callDataopsMutationApi(ctx, toolName77, args, "DataOps table field mutation failed.");
136
+ async function callDataopsFieldMutationApi(ctx, toolName85, args) {
137
+ return callDataopsMutationApi(ctx, toolName85, args, "DataOps table field mutation failed.");
128
138
  }
129
- async function callDataopsMutationApi(ctx, toolName77, args, defaultMessage = "DataOps entity mutation failed.") {
130
- const response = await callDataopsApi(ctx, toolName77, args);
139
+ async function callDataopsMutationApi(ctx, toolName85, args, defaultMessage = "DataOps entity mutation failed.") {
140
+ const response = await callDataopsApi(ctx, toolName85, args);
131
141
  const envelope = asRecord(response);
132
142
  const result = asRecord(envelope?.result);
133
143
  const outcome = result?.outcome;
@@ -152,12 +162,12 @@ async function callDataopsMutationApi(ctx, toolName77, args, defaultMessage = "D
152
162
  meta
153
163
  });
154
164
  }
155
- function buildDataopsApiDryRun(ctx, toolName77, args = {}) {
156
- const spec = TOOL_API_MAP[toolName77];
165
+ function buildDataopsApiDryRun(ctx, toolName85, args = {}) {
166
+ const spec = TOOL_API_MAP[toolName85];
157
167
  if (!spec) {
158
- throw new Error(`DataOps API mapping not found for tool: ${toolName77}`);
168
+ throw new Error(`DataOps API mapping not found for tool: ${toolName85}`);
159
169
  }
160
- const params = compactArgs(args, toolName77);
170
+ const params = compactArgs(args, toolName85);
161
171
  if (spec.method === "GET") {
162
172
  return {
163
173
  method: spec.method,
@@ -262,10 +272,11 @@ function buildUrl(host, path, params = {}) {
262
272
  }
263
273
  return url.toString();
264
274
  }
265
- function compactArgs(args, toolName77) {
275
+ function compactArgs(args, toolName85) {
266
276
  const result = {};
267
277
  for (const [key, value] of Object.entries(args)) {
268
- if (value === void 0 || value === null || value === "" && !(toolName77 === "flow_update_flow_param" && key === "remark")) {
278
+ const allowEmptyClear = toolName85 === "flow_update_flow_param" && key === "remark" || toolName85 === "flow_update_sql_task" && (key === "preSql" || key === "postSql") || toolName85 === "flow_update_python_task" && (key === "requirementsTxt" || key === "remark");
279
+ if (value === void 0 || value !== value || value === null || value === "" && !allowEmptyClear) {
269
280
  continue;
270
281
  }
271
282
  result[key] = value;
@@ -275,9 +286,17 @@ function compactArgs(args, toolName77) {
275
286
  function asRecord(value) {
276
287
  return typeof value === "object" && value !== null ? value : void 0;
277
288
  }
289
+ var DATAOPS_NO_AUTH_CODE = -10;
278
290
  function unwrapDataResponse(data) {
279
291
  const returnCode = data?.returnCode ?? data?.return_code;
280
292
  const returnMessage = data?.returnMessage ?? data?.return_message;
293
+ if (returnCode === DATAOPS_NO_AUTH_CODE || returnCode === String(DATAOPS_NO_AUTH_CODE)) {
294
+ throw new PermissionError(
295
+ `AE API error: ${returnMessage || "Permission denied"} (code: ${returnCode})`,
296
+ String(returnCode),
297
+ "Check your space membership and required DataOps permissions with a space administrator; re-login will not resolve this error."
298
+ );
299
+ }
281
300
  if (returnCode !== void 0 && returnCode !== 0) {
282
301
  throw new Error(`AE API error: ${returnMessage || "unknown"} (code: ${returnCode})`);
283
302
  }
@@ -1109,6 +1128,87 @@ function optionalString2(ctx, name) {
1109
1128
  return value === "" ? void 0 : value;
1110
1129
  }
1111
1130
 
1131
+ // src/commands/te-dataops/flow/task-output-param-options.ts
1132
+ var MAX_OUTPUT_PARAM_REMARK_LENGTH = 200;
1133
+ var PARAM_KEY_PATTERN = /^[a-z][a-z0-9_]{0,39}$/;
1134
+ function createOutputParamsFlag(desc) {
1135
+ return { name: "outputParams", type: "json", required: false, desc };
1136
+ }
1137
+ function requireSpaceCode(ctx) {
1138
+ const spaceCode = ctx.str("spaceCode");
1139
+ if (!spaceCode.trim()) {
1140
+ throw new CliValidationError("--spaceCode must be a non-empty string");
1141
+ }
1142
+ return spaceCode;
1143
+ }
1144
+ function requirePositiveSafeInt(ctx, name) {
1145
+ const raw = ctx.str(name).trim();
1146
+ const num = Number(raw);
1147
+ if (!/^[1-9]\d*$/.test(raw) || !Number.isSafeInteger(num)) {
1148
+ throw new CliValidationError(`--${name} must be a positive safe integer`, {
1149
+ location: { field: name }
1150
+ });
1151
+ }
1152
+ return num;
1153
+ }
1154
+ function explicitString(ctx, name) {
1155
+ const items = ctx.list ? ctx.list(name) : void 0;
1156
+ if (items && items.length > 0) {
1157
+ return items[0];
1158
+ }
1159
+ if (ctx.has?.(name)) {
1160
+ return ctx.str(name);
1161
+ }
1162
+ const value = ctx.str(name);
1163
+ return value === "" ? void 0 : value;
1164
+ }
1165
+ function resolveTaskOutputParams(ctx) {
1166
+ const raw = ctx.json("outputParams");
1167
+ if (raw === void 0) {
1168
+ return void 0;
1169
+ }
1170
+ if (!Array.isArray(raw)) {
1171
+ throw new CliValidationError("--outputParams must be a JSON array");
1172
+ }
1173
+ const seen = /* @__PURE__ */ new Set();
1174
+ return raw.map((entry, idx) => {
1175
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
1176
+ throw new CliValidationError(`--outputParams[${idx}] must be an object with paramKey and optional remark`);
1177
+ }
1178
+ const record = entry;
1179
+ for (const key of Object.keys(record)) {
1180
+ if (key !== "paramKey" && key !== "remark") {
1181
+ throw new CliValidationError(
1182
+ `--outputParams[${idx}] has unsupported field "${key}"; only paramKey and remark are allowed`
1183
+ );
1184
+ }
1185
+ }
1186
+ const paramKey = record.paramKey;
1187
+ if (typeof paramKey !== "string" || !PARAM_KEY_PATTERN.test(paramKey) || paramKey.startsWith("ws_") || paramKey === "env") {
1188
+ throw new CliValidationError(
1189
+ `--outputParams[${idx}].paramKey must be 1-40 lowercase letters, digits, or underscores, start with a letter, and must not be env or start with ws_`
1190
+ );
1191
+ }
1192
+ if (seen.has(paramKey)) {
1193
+ throw new CliValidationError(`--outputParams contains duplicate paramKey "${paramKey}"`);
1194
+ }
1195
+ seen.add(paramKey);
1196
+ const remark = record.remark;
1197
+ if (remark !== void 0 && remark !== null) {
1198
+ if (typeof remark !== "string") {
1199
+ throw new CliValidationError(`--outputParams[${idx}].remark must be a string`);
1200
+ }
1201
+ if (remark.length > MAX_OUTPUT_PARAM_REMARK_LENGTH) {
1202
+ throw new CliValidationError(
1203
+ `--outputParams[${idx}].remark must not exceed ${MAX_OUTPUT_PARAM_REMARK_LENGTH} characters`
1204
+ );
1205
+ }
1206
+ return { paramKey, remark };
1207
+ }
1208
+ return { paramKey };
1209
+ });
1210
+ }
1211
+
1112
1212
  // src/commands/te-dataops/flow/create-sql-task.ts
1113
1213
  var toolName25 = "flow_create_sql_task";
1114
1214
  function buildArgs25(ctx) {
@@ -1119,6 +1219,7 @@ function buildArgs25(ctx) {
1119
1219
  sql: ctx.str("sql"),
1120
1220
  preSql: ctx.str("preSql"),
1121
1221
  postSql: ctx.str("postSql"),
1222
+ outputParams: resolveTaskOutputParams(ctx),
1122
1223
  remark: ctx.str("remark"),
1123
1224
  ...buildTaskWriteArgs(ctx)
1124
1225
  };
@@ -1126,7 +1227,7 @@ function buildArgs25(ctx) {
1126
1227
  var createSqlTask = {
1127
1228
  service: "dataops_flow",
1128
1229
  command: "+create_sql_task",
1129
- description: "Create a DEV Trino SQL task and save its SQL. Requires spaceCode, flowCode, taskName, and sql; SQL hooks, dependencies, retry policy, and remark are optional. Returns action/result/status; result includes flowCode, taskCode, taskName, taskType=TRINO_SQL, and sqlSaved=true",
1230
+ description: "Create a DEV Trino SQL task and save its SQL. Requires spaceCode, flowCode, taskName, and sql; SQL hooks, OUT parameter declarations (outputParams, requires SELECT query SQL), dependencies, retry policy, and remark are optional. Returns action/result/status; result includes flowCode, taskCode, taskName, taskType=TRINO_SQL, and sqlSaved=true",
1130
1231
  flags: [
1131
1232
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1132
1233
  { name: "flowCode", type: "number", required: true, desc: "Task flow code" },
@@ -1134,11 +1235,15 @@ var createSqlTask = {
1134
1235
  { name: "sql", type: "string", required: true, desc: "Trino SQL content for the task" },
1135
1236
  { name: "preSql", type: "string", required: false, desc: "Optional SQL to run before the main SQL" },
1136
1237
  { name: "postSql", type: "string", required: false, desc: "Optional SQL to run after the main SQL" },
1238
+ createOutputParamsFlag('Optional JSON array of OUT parameter declarations [{"paramKey":"out_dt","remark":"optional"}] (VARCHAR only; requires a query SQL such as SELECT)'),
1137
1239
  { name: "remark", type: "string", required: false, desc: "Description" },
1138
1240
  ...createTaskWriteFlags
1139
1241
  ],
1140
1242
  risk: "write",
1141
- validate: validateTaskWriteArgs,
1243
+ validate: (ctx) => {
1244
+ validateTaskWriteArgs(ctx);
1245
+ resolveTaskOutputParams(ctx);
1246
+ },
1142
1247
  dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName25, buildArgs25(ctx)),
1143
1248
  execute: async (ctx) => {
1144
1249
  return callDataopsApi(ctx, toolName25, buildArgs25(ctx));
@@ -1148,46 +1253,97 @@ var createSqlTask = {
1148
1253
  // src/commands/te-dataops/flow/update-sql-task.ts
1149
1254
  var toolName26 = "flow_update_sql_task";
1150
1255
  function buildArgs26(ctx) {
1256
+ const sql = explicitString(ctx, "sql");
1257
+ if (sql !== void 0 && !sql.trim()) {
1258
+ throw new CliValidationError("--sql must not be empty");
1259
+ }
1260
+ const preSql = explicitString(ctx, "preSql");
1261
+ const postSql = explicitString(ctx, "postSql");
1262
+ const outputParams = resolveTaskOutputParams(ctx);
1263
+ const taskWriteArgs = buildTaskWriteArgs(ctx);
1264
+ const mutableValues = [
1265
+ sql,
1266
+ preSql,
1267
+ postSql,
1268
+ outputParams,
1269
+ ...Object.values(taskWriteArgs)
1270
+ ];
1271
+ if (mutableValues.every((value) => value === void 0)) {
1272
+ throw new CliValidationError(
1273
+ "Pass at least one update field (--sql, --preSql, --postSql, --outputParams, --preTasks, or retry flags)"
1274
+ );
1275
+ }
1151
1276
  return {
1152
1277
  spaceCode: ctx.str("spaceCode"),
1153
1278
  flowCode: ctx.num("flowCode"),
1154
1279
  taskCode: ctx.num("taskCode"),
1155
- sql: ctx.str("sql"),
1156
- preSql: ctx.str("preSql"),
1157
- postSql: ctx.str("postSql"),
1158
- ...buildTaskWriteArgs(ctx)
1280
+ sql,
1281
+ preSql,
1282
+ postSql,
1283
+ outputParams,
1284
+ ...taskWriteArgs
1159
1285
  };
1160
1286
  }
1161
1287
  var updateSqlTask = {
1162
1288
  service: "dataops_flow",
1163
1289
  command: "+update_sql_task",
1164
- description: "Update an existing DEV Trino SQL task. Requires spaceCode, flowCode, taskCode, and sql; omitted SQL hooks, dependencies, and retry fields keep existing values. Returns action/result/status; result includes sqlSaved, flowCode, taskCode, taskType=TRINO_SQL, and task",
1290
+ description: 'Partially update an existing DEV Trino SQL task. Requires spaceCode, flowCode, taskCode, and at least one mutable field; omitted sql, preSql, postSql, outputParams, dependencies, and retry fields keep existing values. Pass --preSql "" or --postSql "" to clear hooks; outputParams and preTasks use three-state semantics (omit to keep, [] clears, non-empty replaces). Returns action/result/status; result includes sqlSaved, flowCode, taskCode, taskType=TRINO_SQL, and task',
1165
1291
  flags: [
1166
1292
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1167
1293
  { name: "flowCode", type: "number", required: true, desc: "Task flow code" },
1168
1294
  { name: "taskCode", type: "number", required: true, desc: "Trino SQL task code" },
1169
- { name: "sql", type: "string", required: true, desc: "Main Trino SQL content" },
1170
- { name: "preSql", type: "string", required: false, desc: "Optional SQL to run before the main SQL. Omit to keep existing preSql" },
1171
- { name: "postSql", type: "string", required: false, desc: "Optional SQL to run after the main SQL. Omit to keep existing postSql" },
1295
+ { name: "sql", type: "string", required: false, desc: "Optional main Trino SQL content. Omit to keep existing SQL" },
1296
+ { name: "preSql", type: "string", required: false, desc: 'Optional SQL to run before the main SQL. Omit to keep existing preSql; pass "" to clear' },
1297
+ { name: "postSql", type: "string", required: false, desc: 'Optional SQL to run after the main SQL. Omit to keep existing postSql; pass "" to clear' },
1298
+ createOutputParamsFlag('Optional JSON array of OUT parameter declarations [{"paramKey":"out_dt","remark":"optional"}]. Omit to keep existing; pass [] to clear; non-empty replaces (requires SELECT query SQL)'),
1172
1299
  ...updateTaskWriteFlags
1173
1300
  ],
1174
1301
  risk: "write",
1175
- validate: validateTaskWriteArgs,
1302
+ validate: (ctx) => {
1303
+ validateTaskWriteArgs(ctx);
1304
+ buildArgs26(ctx);
1305
+ },
1176
1306
  dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName26, buildArgs26(ctx)),
1177
1307
  execute: async (ctx) => {
1178
1308
  return callDataopsApi(ctx, toolName26, buildArgs26(ctx));
1179
1309
  }
1180
1310
  };
1181
1311
 
1312
+ // src/commands/te-dataops/flow/get-sql-task.ts
1313
+ var toolName27 = "flow_get_sql_task";
1314
+ function buildArgs27(ctx) {
1315
+ return {
1316
+ spaceCode: requireSpaceCode(ctx),
1317
+ flowCode: requirePositiveSafeInt(ctx, "flowCode"),
1318
+ taskCode: requirePositiveSafeInt(ctx, "taskCode")
1319
+ };
1320
+ }
1321
+ var getSqlTask = {
1322
+ service: "dataops_flow",
1323
+ command: "+get_sql_task",
1324
+ description: "Get the DEV definition of one Trino SQL task node (taskType=TRINO_SQL). Requires spaceCode, flowCode, and taskCode. Returns sqlTask (sql, preSql, postSql), preTasks, retry policy, outputParams, taskParams, and paramSources. For historical PROD execution snapshots, use dataops_operations +get_task_instance_detail.",
1325
+ flags: [
1326
+ { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1327
+ { name: "flowCode", type: "number", required: true, desc: "Task flow code" },
1328
+ { name: "taskCode", type: "number", required: true, desc: "Trino SQL task node code" }
1329
+ ],
1330
+ risk: "read",
1331
+ validate: (ctx) => {
1332
+ buildArgs27(ctx);
1333
+ },
1334
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName27, buildArgs27(ctx)),
1335
+ execute: async (ctx) => callDataopsApi(ctx, toolName27, buildArgs27(ctx))
1336
+ };
1337
+
1182
1338
  // src/commands/te-dataops/flow/create-integration-task.ts
1183
- var toolName27 = "flow_create_integration_task";
1339
+ var toolName28 = "flow_create_integration_task";
1184
1340
  function validateInteger(ctx, name) {
1185
1341
  const value = ctx.str(name).trim();
1186
1342
  if (!/^\d+$/.test(value)) {
1187
1343
  throw new Error(`Invalid --${name}: expected an integer, got "${value}"`);
1188
1344
  }
1189
1345
  }
1190
- function buildArgs27(ctx) {
1346
+ function buildArgs28(ctx) {
1191
1347
  return {
1192
1348
  spaceCode: ctx.str("spaceCode"),
1193
1349
  flowCode: ctx.num("flowCode"),
@@ -1214,19 +1370,19 @@ var createIntegrationTask = {
1214
1370
  validateInteger(ctx, "flowCode");
1215
1371
  validateTaskWriteArgs(ctx);
1216
1372
  },
1217
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName27, buildArgs27(ctx)),
1218
- execute: async (ctx) => callDataopsApi(ctx, toolName27, buildArgs27(ctx))
1373
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName28, buildArgs28(ctx)),
1374
+ execute: async (ctx) => callDataopsApi(ctx, toolName28, buildArgs28(ctx))
1219
1375
  };
1220
1376
 
1221
1377
  // src/commands/te-dataops/flow/update-integration-task.ts
1222
- var toolName28 = "flow_update_integration_task";
1378
+ var toolName29 = "flow_update_integration_task";
1223
1379
  function validateInteger2(ctx, name) {
1224
1380
  const value = ctx.str(name).trim();
1225
1381
  if (!/^\d+$/.test(value)) {
1226
1382
  throw new Error(`Invalid --${name}: expected an integer, got "${value}"`);
1227
1383
  }
1228
1384
  }
1229
- function buildArgs28(ctx) {
1385
+ function buildArgs29(ctx) {
1230
1386
  return {
1231
1387
  spaceCode: ctx.str("spaceCode"),
1232
1388
  flowCode: ctx.num("flowCode"),
@@ -1252,8 +1408,8 @@ var updateIntegrationTask = {
1252
1408
  validateInteger2(ctx, "taskCode");
1253
1409
  validateTaskWriteArgs(ctx);
1254
1410
  },
1255
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName28, buildArgs28(ctx)),
1256
- execute: async (ctx) => callDataopsApi(ctx, toolName28, buildArgs28(ctx))
1411
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName29, buildArgs29(ctx)),
1412
+ execute: async (ctx) => callDataopsApi(ctx, toolName29, buildArgs29(ctx))
1257
1413
  };
1258
1414
 
1259
1415
  // src/commands/te-dataops/flow/workflow-instance-check-task-options.ts
@@ -1318,8 +1474,8 @@ function optionalString3(ctx, name) {
1318
1474
  }
1319
1475
 
1320
1476
  // src/commands/te-dataops/flow/create-workflow-instance-check-task.ts
1321
- var toolName29 = "flow_create_workflow_instance_check_task";
1322
- function buildArgs29(ctx) {
1477
+ var toolName30 = "flow_create_workflow_instance_check_task";
1478
+ function buildArgs30(ctx) {
1323
1479
  return {
1324
1480
  spaceCode: ctx.str("spaceCode"),
1325
1481
  flowCode: ctx.num("flowCode"),
@@ -1349,13 +1505,13 @@ var createWorkflowInstanceCheckTask = {
1349
1505
  validateCheckArgs(ctx);
1350
1506
  validateTaskWriteArgs(ctx);
1351
1507
  },
1352
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName29, buildArgs29(ctx)),
1353
- execute: async (ctx) => callDataopsApi(ctx, toolName29, buildArgs29(ctx))
1508
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName30, buildArgs30(ctx)),
1509
+ execute: async (ctx) => callDataopsApi(ctx, toolName30, buildArgs30(ctx))
1354
1510
  };
1355
1511
 
1356
1512
  // src/commands/te-dataops/flow/update-workflow-instance-check-task.ts
1357
- var toolName30 = "flow_update_workflow_instance_check_task";
1358
- function buildArgs30(ctx) {
1513
+ var toolName31 = "flow_update_workflow_instance_check_task";
1514
+ function buildArgs31(ctx) {
1359
1515
  return {
1360
1516
  spaceCode: ctx.str("spaceCode"),
1361
1517
  flowCode: ctx.num("flowCode"),
@@ -1383,13 +1539,13 @@ var updateWorkflowInstanceCheckTask = {
1383
1539
  validateCheckArgs(ctx);
1384
1540
  validateTaskWriteArgs(ctx);
1385
1541
  },
1386
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName30, buildArgs30(ctx)),
1387
- execute: async (ctx) => callDataopsApi(ctx, toolName30, buildArgs30(ctx))
1542
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName31, buildArgs31(ctx)),
1543
+ execute: async (ctx) => callDataopsApi(ctx, toolName31, buildArgs31(ctx))
1388
1544
  };
1389
1545
 
1390
1546
  // src/commands/te-dataops/flow/create-task-instance-check-task.ts
1391
- var toolName31 = "flow_create_task_instance_check_task";
1392
- function buildArgs31(ctx) {
1547
+ var toolName32 = "flow_create_task_instance_check_task";
1548
+ function buildArgs32(ctx) {
1393
1549
  return {
1394
1550
  spaceCode: ctx.str("spaceCode"),
1395
1551
  flowCode: ctx.num("flowCode"),
@@ -1419,13 +1575,13 @@ var createTaskInstanceCheckTask = {
1419
1575
  validateCheckArgs(ctx, true);
1420
1576
  validateTaskWriteArgs(ctx);
1421
1577
  },
1422
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName31, buildArgs31(ctx)),
1423
- execute: async (ctx) => callDataopsApi(ctx, toolName31, buildArgs31(ctx))
1578
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName32, buildArgs32(ctx)),
1579
+ execute: async (ctx) => callDataopsApi(ctx, toolName32, buildArgs32(ctx))
1424
1580
  };
1425
1581
 
1426
1582
  // src/commands/te-dataops/flow/update-task-instance-check-task.ts
1427
- var toolName32 = "flow_update_task_instance_check_task";
1428
- function buildArgs32(ctx) {
1583
+ var toolName33 = "flow_update_task_instance_check_task";
1584
+ function buildArgs33(ctx) {
1429
1585
  return {
1430
1586
  spaceCode: ctx.str("spaceCode"),
1431
1587
  flowCode: ctx.num("flowCode"),
@@ -1453,12 +1609,354 @@ var updateTaskInstanceCheckTask = {
1453
1609
  validateCheckArgs(ctx, true);
1454
1610
  validateTaskWriteArgs(ctx);
1455
1611
  },
1456
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName32, buildArgs32(ctx)),
1457
- execute: async (ctx) => callDataopsApi(ctx, toolName32, buildArgs32(ctx))
1612
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName33, buildArgs33(ctx)),
1613
+ execute: async (ctx) => callDataopsApi(ctx, toolName33, buildArgs33(ctx))
1614
+ };
1615
+
1616
+ // src/commands/te-dataops/flow/python-task-options.ts
1617
+ import { existsSync, readFileSync, statSync } from "fs";
1618
+ import { resolve as resolve2 } from "path";
1619
+ var MAX_PYTHON_CONTENT_BYTES = 512 * 1024;
1620
+ var pythonScriptInputFlags = [
1621
+ { name: "scriptFile", type: "string", required: false, desc: "Path to a single local UTF-8 .py file used as main.py (recommended; mutually exclusive with --script)" },
1622
+ { name: "script", type: "string", required: false, desc: "Inline Python script content for main.py (mutually exclusive with --scriptFile)" },
1623
+ { name: "requirementsFile", type: "string", required: false, desc: "Path to a local UTF-8 requirements.txt file (recommended; mutually exclusive with --requirements)" },
1624
+ { name: "requirements", type: "string", required: false, desc: 'Inline pip requirements.txt text (mutually exclusive with --requirementsFile; pass "" on update to clear)' },
1625
+ { name: "pythonVersion", type: "string", required: false, desc: "Python version from +list_python_versions. Omit on create to use the platform default (3.11); omit on update to keep existing" },
1626
+ { name: "packageSourceId", type: "string", required: false, desc: "Enabled pip package source key from +list_python_package_sources. Omit on create to use the cluster default source; omit on update to keep existing" },
1627
+ createOutputParamsFlag('JSON array of OUT parameter declarations [{"paramKey":"out_dt","remark":"optional"}]. Omit on update to keep existing; pass [] to clear')
1628
+ ];
1629
+ function readRegularUtf8File(rawPath, flagName) {
1630
+ if (!rawPath.trim()) {
1631
+ throw new CliValidationError(`--${flagName} must point to a regular file`);
1632
+ }
1633
+ const resolved = resolve2(rawPath);
1634
+ if (!existsSync(resolved)) {
1635
+ throw new CliValidationError(`--${flagName} file not found: ${rawPath}`);
1636
+ }
1637
+ let stat;
1638
+ try {
1639
+ stat = statSync(resolved);
1640
+ } catch (err) {
1641
+ throw new CliValidationError(
1642
+ `Unable to inspect --${flagName} "${rawPath}": ${err instanceof Error ? err.message : String(err)}`
1643
+ );
1644
+ }
1645
+ if (!stat.isFile()) {
1646
+ throw new CliValidationError(`--${flagName} must point to a single regular file, not a directory: ${rawPath}`);
1647
+ }
1648
+ if (stat.size > MAX_PYTHON_CONTENT_BYTES) {
1649
+ throw new CliValidationError(
1650
+ `--${flagName} exceeds the ${MAX_PYTHON_CONTENT_BYTES}-byte limit (got ${stat.size} bytes)`
1651
+ );
1652
+ }
1653
+ return readFileSync(resolved, "utf8");
1654
+ }
1655
+ function resolveScriptContent(ctx, required) {
1656
+ const inlineScript = explicitString(ctx, "script");
1657
+ const scriptFile = explicitString(ctx, "scriptFile");
1658
+ if (inlineScript !== void 0 && scriptFile !== void 0) {
1659
+ throw new CliValidationError("Pass either --scriptFile or --script, not both");
1660
+ }
1661
+ if (scriptFile !== void 0) {
1662
+ const content = readRegularUtf8File(scriptFile, "scriptFile");
1663
+ if (!content.trim()) {
1664
+ throw new CliValidationError("Python script content in --scriptFile must not be empty");
1665
+ }
1666
+ return content;
1667
+ }
1668
+ if (inlineScript !== void 0) {
1669
+ if (!inlineScript.trim()) {
1670
+ throw new CliValidationError("--script must not be empty");
1671
+ }
1672
+ return inlineScript;
1673
+ }
1674
+ if (required) {
1675
+ throw new CliValidationError("Pass --scriptFile or --script");
1676
+ }
1677
+ return void 0;
1678
+ }
1679
+ function resolveRequirementsContent(ctx) {
1680
+ const inlineReq = explicitString(ctx, "requirements");
1681
+ const reqFile = explicitString(ctx, "requirementsFile");
1682
+ if (inlineReq !== void 0 && reqFile !== void 0) {
1683
+ throw new CliValidationError("Pass either --requirementsFile or --requirements, not both");
1684
+ }
1685
+ if (reqFile !== void 0) {
1686
+ return readRegularUtf8File(reqFile, "requirementsFile");
1687
+ }
1688
+ return inlineReq;
1689
+ }
1690
+ function resolveOptionalNonBlank(ctx, name) {
1691
+ const val = explicitString(ctx, name);
1692
+ if (val !== void 0 && !val.trim()) {
1693
+ throw new CliValidationError(`--${name} must not be empty`);
1694
+ }
1695
+ return val;
1696
+ }
1697
+ function resolveRemark(ctx, allowEmptyClear) {
1698
+ const val = explicitString(ctx, "remark");
1699
+ if (val === void 0) {
1700
+ return void 0;
1701
+ }
1702
+ if (val.length > MAX_OUTPUT_PARAM_REMARK_LENGTH) {
1703
+ throw new CliValidationError(`--remark must not exceed ${MAX_OUTPUT_PARAM_REMARK_LENGTH} characters`);
1704
+ }
1705
+ if (!allowEmptyClear && val === "") {
1706
+ return void 0;
1707
+ }
1708
+ return val;
1709
+ }
1710
+ function validateCombinedSize(scriptContent, requirementsTxt) {
1711
+ const totalBytes = Buffer.byteLength(scriptContent ?? "", "utf8") + Buffer.byteLength(requirementsTxt ?? "", "utf8");
1712
+ if (totalBytes > MAX_PYTHON_CONTENT_BYTES) {
1713
+ throw new CliValidationError(
1714
+ `Combined scriptContent and requirementsTxt size (${totalBytes} UTF-8 bytes) exceeds the ${MAX_PYTHON_CONTENT_BYTES}-byte limit`
1715
+ );
1716
+ }
1717
+ }
1718
+ function buildCreatePythonTaskArgs(ctx) {
1719
+ const spaceCode = requireSpaceCode(ctx);
1720
+ const flowCode = requirePositiveSafeInt(ctx, "flowCode");
1721
+ const taskName = ctx.str("taskName");
1722
+ if (!taskName.trim()) {
1723
+ throw new CliValidationError("--taskName must be a non-empty string");
1724
+ }
1725
+ validateTaskWriteArgs(ctx);
1726
+ const scriptContent = resolveScriptContent(ctx, true);
1727
+ const requirementsTxt = resolveRequirementsContent(ctx);
1728
+ validateCombinedSize(scriptContent, requirementsTxt);
1729
+ const pythonVersion = resolveOptionalNonBlank(ctx, "pythonVersion");
1730
+ const packageSourceId = resolveOptionalNonBlank(ctx, "packageSourceId");
1731
+ const outputParams = resolveTaskOutputParams(ctx);
1732
+ const remark = resolveRemark(ctx, false);
1733
+ return {
1734
+ spaceCode,
1735
+ flowCode,
1736
+ taskName,
1737
+ scriptContent,
1738
+ requirementsTxt,
1739
+ pythonVersion,
1740
+ packageSourceId,
1741
+ outputParams,
1742
+ remark,
1743
+ ...buildTaskWriteArgs(ctx)
1744
+ };
1745
+ }
1746
+ function buildUpdatePythonTaskArgs(ctx) {
1747
+ const spaceCode = requireSpaceCode(ctx);
1748
+ const flowCode = requirePositiveSafeInt(ctx, "flowCode");
1749
+ const taskCode = requirePositiveSafeInt(ctx, "taskCode");
1750
+ validateTaskWriteArgs(ctx);
1751
+ const scriptContent = resolveScriptContent(ctx, false);
1752
+ const requirementsTxt = resolveRequirementsContent(ctx);
1753
+ validateCombinedSize(scriptContent, requirementsTxt);
1754
+ const pythonVersion = resolveOptionalNonBlank(ctx, "pythonVersion");
1755
+ const packageSourceId = resolveOptionalNonBlank(ctx, "packageSourceId");
1756
+ const outputParams = resolveTaskOutputParams(ctx);
1757
+ const remark = resolveRemark(ctx, true);
1758
+ const taskWriteArgs = buildTaskWriteArgs(ctx);
1759
+ const mutableValues = [
1760
+ scriptContent,
1761
+ requirementsTxt,
1762
+ pythonVersion,
1763
+ packageSourceId,
1764
+ outputParams,
1765
+ remark,
1766
+ ...Object.values(taskWriteArgs)
1767
+ ];
1768
+ if (mutableValues.every((value) => value === void 0)) {
1769
+ throw new CliValidationError(
1770
+ "Pass at least one update field (--scriptFile, --script, --requirementsFile, --requirements, --pythonVersion, --packageSourceId, --outputParams, --remark, --preTasks, or retry flags)"
1771
+ );
1772
+ }
1773
+ return {
1774
+ spaceCode,
1775
+ flowCode,
1776
+ taskCode,
1777
+ scriptContent,
1778
+ requirementsTxt,
1779
+ pythonVersion,
1780
+ packageSourceId,
1781
+ outputParams,
1782
+ remark,
1783
+ ...taskWriteArgs
1784
+ };
1785
+ }
1786
+
1787
+ // src/commands/te-dataops/flow/create-python-task.ts
1788
+ var toolName34 = "flow_create_python_task";
1789
+ var createPythonTask = {
1790
+ service: "dataops_flow",
1791
+ command: "+create_python_task",
1792
+ description: "Create a DEV single-file Python task node (taskType=PYTHON) and save its definition. Requires spaceCode, flowCode, taskName, and either --scriptFile or --script. Combined script and requirements must not exceed 524288 UTF-8 bytes. Returns action/result/status; result includes pythonTaskSaved=true, flowCode, taskCode, taskName, taskType=PYTHON, pythonVersion, and packageSourceId.",
1793
+ flags: [
1794
+ { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1795
+ { name: "flowCode", type: "number", required: true, desc: "Task flow code" },
1796
+ { name: "taskName", type: "string", required: true, desc: "Task name" },
1797
+ ...pythonScriptInputFlags,
1798
+ { name: "remark", type: "string", required: false, desc: "Optional task remark, up to 200 characters" },
1799
+ ...createTaskWriteFlags
1800
+ ],
1801
+ risk: "write",
1802
+ validate: (ctx) => {
1803
+ buildCreatePythonTaskArgs(ctx);
1804
+ },
1805
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName34, buildCreatePythonTaskArgs(ctx)),
1806
+ execute: async (ctx) => callDataopsApi(ctx, toolName34, buildCreatePythonTaskArgs(ctx))
1807
+ };
1808
+
1809
+ // src/commands/te-dataops/flow/update-python-task.ts
1810
+ var toolName35 = "flow_update_python_task";
1811
+ var updatePythonTask = {
1812
+ service: "dataops_flow",
1813
+ command: "+update_python_task",
1814
+ description: 'Partially update an existing DEV Python task node (taskType=PYTHON). Requires spaceCode, flowCode, taskCode, and at least one update field. Omitted fields keep existing values; --requirements "" (or an empty --requirementsFile) clears dependencies; --remark "" clears remark; --outputParams and --preTasks use three-state semantics (omit keeps, [] clears, non-empty replaces).',
1815
+ flags: [
1816
+ { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1817
+ { name: "flowCode", type: "number", required: true, desc: "Task flow code" },
1818
+ { name: "taskCode", type: "number", required: true, desc: "Python task node code to update" },
1819
+ ...pythonScriptInputFlags,
1820
+ { name: "remark", type: "string", required: false, desc: 'Optional task remark, up to 200 characters; omit to keep existing, or pass "" to clear' },
1821
+ ...updateTaskWriteFlags
1822
+ ],
1823
+ risk: "write",
1824
+ validate: (ctx) => {
1825
+ buildUpdatePythonTaskArgs(ctx);
1826
+ },
1827
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName35, buildUpdatePythonTaskArgs(ctx)),
1828
+ execute: async (ctx) => callDataopsApi(ctx, toolName35, buildUpdatePythonTaskArgs(ctx))
1829
+ };
1830
+
1831
+ // src/commands/te-dataops/flow/get-python-task.ts
1832
+ var toolName36 = "flow_get_python_task";
1833
+ function buildArgs34(ctx) {
1834
+ return {
1835
+ spaceCode: requireSpaceCode(ctx),
1836
+ flowCode: requirePositiveSafeInt(ctx, "flowCode"),
1837
+ taskCode: requirePositiveSafeInt(ctx, "taskCode")
1838
+ };
1839
+ }
1840
+ var getPythonTask = {
1841
+ service: "dataops_flow",
1842
+ command: "+get_python_task",
1843
+ description: "Get the DEV definition of one Python task node (taskType=PYTHON). Requires spaceCode, flowCode, and taskCode. Returns pythonTask (scriptContent, pythonVersion, requirementsTxt, packageSourceId, runtimeMode), preTasks, retry policy, outputParams, taskParams, and paramSources. For historical PROD execution snapshots, use dataops_operations +get_task_instance_detail.",
1844
+ flags: [
1845
+ { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1846
+ { name: "flowCode", type: "number", required: true, desc: "Task flow code" },
1847
+ { name: "taskCode", type: "number", required: true, desc: "Python task node code" }
1848
+ ],
1849
+ risk: "read",
1850
+ validate: (ctx) => {
1851
+ buildArgs34(ctx);
1852
+ },
1853
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName36, buildArgs34(ctx)),
1854
+ execute: async (ctx) => callDataopsApi(ctx, toolName36, buildArgs34(ctx))
1855
+ };
1856
+
1857
+ // src/commands/te-dataops/flow/list-python-versions.ts
1858
+ var toolName37 = "flow_list_python_versions";
1859
+ function buildArgs35(ctx) {
1860
+ return { spaceCode: requireSpaceCode(ctx) };
1861
+ }
1862
+ var listPythonVersions = {
1863
+ service: "dataops_flow",
1864
+ command: "+list_python_versions",
1865
+ description: "List supported Python versions for workflow Python tasks in the space. Returns versions and defaultVersion (the first configured version, e.g. 3.11).",
1866
+ flags: [
1867
+ { name: "spaceCode", type: "string", required: true, desc: "Space code" }
1868
+ ],
1869
+ risk: "read",
1870
+ validate: (ctx) => {
1871
+ buildArgs35(ctx);
1872
+ },
1873
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName37, buildArgs35(ctx)),
1874
+ execute: async (ctx) => callDataopsApi(ctx, toolName37, buildArgs35(ctx))
1875
+ };
1876
+
1877
+ // src/commands/te-dataops/flow/list-python-package-sources.ts
1878
+ var toolName38 = "flow_list_python_package_sources";
1879
+ function buildArgs36(ctx) {
1880
+ return { spaceCode: requireSpaceCode(ctx) };
1881
+ }
1882
+ var listPythonPackageSources = {
1883
+ service: "dataops_flow",
1884
+ command: "+list_python_package_sources",
1885
+ description: "List cluster-enabled pip package sources available for workflow Python tasks. Returns packageSources (sourceKey, name, url, defaultSource) and defaultSourceKey.",
1886
+ flags: [
1887
+ { name: "spaceCode", type: "string", required: true, desc: "Space code" }
1888
+ ],
1889
+ risk: "read",
1890
+ validate: (ctx) => {
1891
+ buildArgs36(ctx);
1892
+ },
1893
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName38, buildArgs36(ctx)),
1894
+ execute: async (ctx) => callDataopsApi(ctx, toolName38, buildArgs36(ctx))
1895
+ };
1896
+
1897
+ // src/commands/te-dataops/flow/list-python-directories.ts
1898
+ var toolName39 = "flow_list_python_directories";
1899
+ function buildArgs37(ctx) {
1900
+ return { spaceCode: requireSpaceCode(ctx) };
1901
+ }
1902
+ var listPythonDirectories = {
1903
+ service: "dataops_flow",
1904
+ command: "+list_python_directories",
1905
+ description: "List container mount root paths authorized for Python tasks in the space (own rw product/exchange and incoming cross-space ro exchange). Shared path contract across DEV and PROD without querying physical storage.",
1906
+ flags: [
1907
+ { name: "spaceCode", type: "string", required: true, desc: "Space code" }
1908
+ ],
1909
+ risk: "read",
1910
+ validate: (ctx) => {
1911
+ buildArgs37(ctx);
1912
+ },
1913
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName39, buildArgs37(ctx)),
1914
+ execute: async (ctx) => callDataopsApi(ctx, toolName39, buildArgs37(ctx))
1915
+ };
1916
+
1917
+ // src/commands/te-dataops/flow/browse-python-directory.ts
1918
+ var toolName40 = "flow_browse_python_directory";
1919
+ function buildArgs38(ctx) {
1920
+ const spaceCode = requireSpaceCode(ctx);
1921
+ const rawPath = ctx.str("path");
1922
+ if (rawPath !== "" && !rawPath.trim()) {
1923
+ throw new CliValidationError("--path must not be whitespace only");
1924
+ }
1925
+ const maxDepth = ctx.optionalNum("maxDepth");
1926
+ if (maxDepth !== void 0 && (!Number.isInteger(maxDepth) || maxDepth < 1 || maxDepth > 3)) {
1927
+ throw new CliValidationError("--maxDepth must be an integer between 1 and 3");
1928
+ }
1929
+ const maxEntries = ctx.optionalNum("maxEntries");
1930
+ if (maxEntries !== void 0 && (!Number.isInteger(maxEntries) || maxEntries < 1 || maxEntries > 500)) {
1931
+ throw new CliValidationError("--maxEntries must be an integer between 1 and 500");
1932
+ }
1933
+ return {
1934
+ spaceCode,
1935
+ path: rawPath || void 0,
1936
+ maxDepth,
1937
+ maxEntries
1938
+ };
1939
+ }
1940
+ var browsePythonDirectory = {
1941
+ service: "dataops_flow",
1942
+ command: "+browse_python_directory",
1943
+ description: "Bounded browse of DEV Python workspace directories and files. Omit --path to skip virtual parent folders and expand directly from all authorized mount roots. Reflects DEV storage only, not PROD.",
1944
+ flags: [
1945
+ { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1946
+ { name: "path", type: "string", required: false, desc: "Optional absolute POSIX path to browse (e.g. /dw/<space>/product/subdir). Omit to expand from all authorized mount roots" },
1947
+ { name: "maxDepth", type: "number", required: false, default: 2, min: 1, max: 3, desc: "Expansion depth (1-3). Default 2" },
1948
+ { name: "maxEntries", type: "number", required: false, default: 200, min: 1, max: 500, desc: "Maximum entries returned (1-500). Default 200" }
1949
+ ],
1950
+ risk: "read",
1951
+ validate: (ctx) => {
1952
+ buildArgs38(ctx);
1953
+ },
1954
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName40, buildArgs38(ctx)),
1955
+ execute: async (ctx) => callDataopsApi(ctx, toolName40, buildArgs38(ctx))
1458
1956
  };
1459
1957
 
1460
1958
  // src/commands/te-dataops/flow/delete-task.ts
1461
- var toolName33 = "flow_delete_task";
1959
+ var toolName41 = "flow_delete_task";
1462
1960
  function validateIdentifier(ctx, name) {
1463
1961
  const raw = ctx.str(name).trim();
1464
1962
  if (!/^[1-9]\d*$/.test(raw) || !Number.isSafeInteger(Number(raw))) {
@@ -1467,7 +1965,7 @@ function validateIdentifier(ctx, name) {
1467
1965
  });
1468
1966
  }
1469
1967
  }
1470
- function buildArgs33(ctx) {
1968
+ function buildArgs39(ctx) {
1471
1969
  return {
1472
1970
  spaceCode: ctx.str("spaceCode"),
1473
1971
  flowCode: ctx.num("flowCode"),
@@ -1488,13 +1986,13 @@ var deleteTask = {
1488
1986
  validateIdentifier(ctx, "flowCode");
1489
1987
  validateIdentifier(ctx, "taskCode");
1490
1988
  },
1491
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName33, buildArgs33(ctx)),
1492
- execute: async (ctx) => callDataopsApi(ctx, toolName33, buildArgs33(ctx))
1989
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName41, buildArgs39(ctx)),
1990
+ execute: async (ctx) => callDataopsApi(ctx, toolName41, buildArgs39(ctx))
1493
1991
  };
1494
1992
 
1495
1993
  // src/commands/te-dataops/flow/list-high-frequency-release-flows.ts
1496
- var toolName34 = "flow_list_high_frequency_release_flows";
1497
- function buildArgs34(ctx) {
1994
+ var toolName42 = "flow_list_high_frequency_release_flows";
1995
+ function buildArgs40(ctx) {
1498
1996
  return {
1499
1997
  spaceCode: ctx.str("spaceCode"),
1500
1998
  days: ctx.optionalNum("days"),
@@ -1515,9 +2013,9 @@ var listHighFrequencyReleaseFlows = {
1515
2013
  { name: "status", type: "string", required: false, desc: "Optional release status: SUCCESS, FAIL, PART_SUCCESS, or ALL; default SUCCESS" }
1516
2014
  ],
1517
2015
  risk: "read",
1518
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName34, buildArgs34(ctx)),
2016
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName42, buildArgs40(ctx)),
1519
2017
  execute: async (ctx) => {
1520
- return callDataopsApi(ctx, toolName34, buildArgs34(ctx));
2018
+ return callDataopsApi(ctx, toolName42, buildArgs40(ctx));
1521
2019
  }
1522
2020
  };
1523
2021
 
@@ -1540,32 +2038,40 @@ var commands2 = [
1540
2038
  updateIntegrationTask,
1541
2039
  updateWorkflowInstanceCheckTask,
1542
2040
  updateTaskInstanceCheckTask,
2041
+ updatePythonTask,
1543
2042
  addTaskRelation,
1544
2043
  createSqlTask,
2044
+ getSqlTask,
1545
2045
  createIntegrationTask,
1546
2046
  createWorkflowInstanceCheckTask,
1547
2047
  createTaskInstanceCheckTask,
2048
+ createPythonTask,
2049
+ getPythonTask,
2050
+ listPythonVersions,
2051
+ listPythonPackageSources,
2052
+ listPythonDirectories,
2053
+ browsePythonDirectory,
1548
2054
  deleteTask
1549
2055
  ];
1550
2056
  var flow_default = commands2;
1551
2057
 
1552
2058
  // src/commands/te-dataops/integration/list-datasource-components.ts
1553
- var toolName35 = "integration_list_datasource_components";
2059
+ var toolName43 = "integration_list_datasource_components";
1554
2060
  var listDatasourceComponents = {
1555
2061
  service: "dataops_integration",
1556
2062
  command: "+list_datasource_components",
1557
2063
  description: "List supported datasource components. Requires no arguments. Returns componentName, componentType, and description. Use +get_datasource_component_template before creating a datasource.",
1558
2064
  flags: [],
1559
2065
  risk: "read",
1560
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName35, {}),
2066
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName43, {}),
1561
2067
  execute: async (ctx) => {
1562
- return callDataopsApi(ctx, toolName35, {});
2068
+ return callDataopsApi(ctx, toolName43, {});
1563
2069
  }
1564
2070
  };
1565
2071
 
1566
2072
  // src/commands/te-dataops/integration/get-datasource-component-template.ts
1567
- var toolName36 = "integration_get_datasource_component_template";
1568
- function buildArgs35(ctx) {
2073
+ var toolName44 = "integration_get_datasource_component_template";
2074
+ function buildArgs41(ctx) {
1569
2075
  return {
1570
2076
  componentName: ctx.str("componentName")
1571
2077
  };
@@ -1578,15 +2084,15 @@ var getDatasourceComponentTemplate = {
1578
2084
  { name: "componentName", type: "string", required: true, desc: "Exact componentName returned by +list_datasource_components, e.g. MySQL, ClickHouse, DatabricksJdbc, LarkBitable, OSS, S3, HDFS" }
1579
2085
  ],
1580
2086
  risk: "read",
1581
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName36, buildArgs35(ctx)),
2087
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName44, buildArgs41(ctx)),
1582
2088
  execute: async (ctx) => {
1583
- return callDataopsApi(ctx, toolName36, buildArgs35(ctx));
2089
+ return callDataopsApi(ctx, toolName44, buildArgs41(ctx));
1584
2090
  }
1585
2091
  };
1586
2092
 
1587
2093
  // src/commands/te-dataops/integration/list-space-datasources.ts
1588
- var toolName37 = "integration_list_space_datasources";
1589
- function buildArgs36(ctx) {
2094
+ var toolName45 = "integration_list_space_datasources";
2095
+ function buildArgs42(ctx) {
1590
2096
  return {
1591
2097
  spaceCode: ctx.str("spaceCode"),
1592
2098
  dataSourceName: ctx.str("datasourceName"),
@@ -1603,15 +2109,15 @@ var listSpaceDatasources = {
1603
2109
  { name: "componentName", type: "string", required: false, desc: "Optional component type filter, e.g. MySQL or ClickHouse" }
1604
2110
  ],
1605
2111
  risk: "read",
1606
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName37, buildArgs36(ctx)),
2112
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName45, buildArgs42(ctx)),
1607
2113
  execute: async (ctx) => {
1608
- return callDataopsApi(ctx, toolName37, buildArgs36(ctx));
2114
+ return callDataopsApi(ctx, toolName45, buildArgs42(ctx));
1609
2115
  }
1610
2116
  };
1611
2117
 
1612
2118
  // src/commands/te-dataops/integration/get-datasource-detail.ts
1613
- var toolName38 = "integration_get_datasource_detail";
1614
- function buildArgs37(ctx) {
2119
+ var toolName46 = "integration_get_datasource_detail";
2120
+ function buildArgs43(ctx) {
1615
2121
  return {
1616
2122
  spaceCode: ctx.str("spaceCode"),
1617
2123
  dataSourceName: ctx.str("datasourceName")
@@ -1626,14 +2132,14 @@ var getDatasourceDetail = {
1626
2132
  { name: "datasourceName", type: "string", required: true, desc: "Exact datasource name within the space" }
1627
2133
  ],
1628
2134
  risk: "read",
1629
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName38, buildArgs37(ctx)),
2135
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName46, buildArgs43(ctx)),
1630
2136
  execute: async (ctx) => {
1631
- return callDataopsApi(ctx, toolName38, buildArgs37(ctx));
2137
+ return callDataopsApi(ctx, toolName46, buildArgs43(ctx));
1632
2138
  }
1633
2139
  };
1634
2140
 
1635
2141
  // src/commands/te-dataops/integration/test-datasource-connect.ts
1636
- var toolName39 = "integration_test_datasource_connect";
2142
+ var toolName47 = "integration_test_datasource_connect";
1637
2143
  var testDatasourceConnect = {
1638
2144
  service: "dataops_integration",
1639
2145
  command: "+test_datasource_connect",
@@ -1643,12 +2149,12 @@ var testDatasourceConnect = {
1643
2149
  { name: "datasourceName", type: "string", required: true, desc: "Existing datasource name, exact match within the space" }
1644
2150
  ],
1645
2151
  risk: "read",
1646
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName39, {
2152
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName47, {
1647
2153
  spaceCode: ctx.str("spaceCode"),
1648
2154
  datasourceName: ctx.str("datasourceName")
1649
2155
  }),
1650
2156
  execute: async (ctx) => {
1651
- return callDataopsApi(ctx, toolName39, {
2157
+ return callDataopsApi(ctx, toolName47, {
1652
2158
  spaceCode: ctx.str("spaceCode"),
1653
2159
  datasourceName: ctx.str("datasourceName")
1654
2160
  });
@@ -1656,8 +2162,8 @@ var testDatasourceConnect = {
1656
2162
  };
1657
2163
 
1658
2164
  // src/commands/te-dataops/integration/list-datasource-tables.ts
1659
- var toolName40 = "integration_list_datasource_tables";
1660
- function buildArgs38(ctx) {
2165
+ var toolName48 = "integration_list_datasource_tables";
2166
+ function buildArgs44(ctx) {
1661
2167
  return {
1662
2168
  spaceCode: ctx.str("spaceCode"),
1663
2169
  datasourceId: ctx.str("datasourceId"),
@@ -1678,15 +2184,15 @@ var listDatasourceTables = {
1678
2184
  { name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
1679
2185
  ],
1680
2186
  risk: "read",
1681
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName40, buildArgs38(ctx)),
2187
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName48, buildArgs44(ctx)),
1682
2188
  execute: async (ctx) => {
1683
- return callDataopsApi(ctx, toolName40, buildArgs38(ctx));
2189
+ return callDataopsApi(ctx, toolName48, buildArgs44(ctx));
1684
2190
  }
1685
2191
  };
1686
2192
 
1687
2193
  // src/commands/te-dataops/integration/get-table-structure.ts
1688
- var toolName41 = "integration_get_table_structure";
1689
- function buildArgs39(ctx) {
2194
+ var toolName49 = "integration_get_table_structure";
2195
+ function buildArgs45(ctx) {
1690
2196
  return {
1691
2197
  spaceCode: ctx.str("spaceCode"),
1692
2198
  datasourceId: ctx.str("datasourceId"),
@@ -1709,15 +2215,15 @@ var getTableStructure = {
1709
2215
  { name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
1710
2216
  ],
1711
2217
  risk: "read",
1712
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName41, buildArgs39(ctx)),
2218
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName49, buildArgs45(ctx)),
1713
2219
  execute: async (ctx) => {
1714
- return callDataopsApi(ctx, toolName41, buildArgs39(ctx));
2220
+ return callDataopsApi(ctx, toolName49, buildArgs45(ctx));
1715
2221
  }
1716
2222
  };
1717
2223
 
1718
2224
  // src/commands/te-dataops/integration/list-sync-datasources.ts
1719
- var toolName42 = "integration_list_sync_datasources";
1720
- function buildArgs40(ctx) {
2225
+ var toolName50 = "integration_list_sync_datasources";
2226
+ function buildArgs46(ctx) {
1721
2227
  return {
1722
2228
  spaceCode: ctx.str("spaceCode"),
1723
2229
  env: ctx.str("env")
@@ -1732,15 +2238,15 @@ var listSyncDatasources = {
1732
2238
  { name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
1733
2239
  ],
1734
2240
  risk: "read",
1735
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName42, buildArgs40(ctx)),
2241
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName50, buildArgs46(ctx)),
1736
2242
  execute: async (ctx) => {
1737
- return callDataopsApi(ctx, toolName42, buildArgs40(ctx));
2243
+ return callDataopsApi(ctx, toolName50, buildArgs46(ctx));
1738
2244
  }
1739
2245
  };
1740
2246
 
1741
2247
  // src/commands/te-dataops/integration/list-datasource-databases.ts
1742
- var toolName43 = "integration_list_datasource_databases";
1743
- function buildArgs41(ctx) {
2248
+ var toolName51 = "integration_list_datasource_databases";
2249
+ function buildArgs47(ctx) {
1744
2250
  return {
1745
2251
  spaceCode: ctx.str("spaceCode"),
1746
2252
  datasourceId: ctx.str("datasourceId"),
@@ -1759,15 +2265,15 @@ var listDatasourceDatabases = {
1759
2265
  { name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
1760
2266
  ],
1761
2267
  risk: "read",
1762
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName43, buildArgs41(ctx)),
2268
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName51, buildArgs47(ctx)),
1763
2269
  execute: async (ctx) => {
1764
- return callDataopsApi(ctx, toolName43, buildArgs41(ctx));
2270
+ return callDataopsApi(ctx, toolName51, buildArgs47(ctx));
1765
2271
  }
1766
2272
  };
1767
2273
 
1768
2274
  // src/commands/te-dataops/integration/online-datasource.ts
1769
- var toolName44 = "integration_online_datasource";
1770
- function buildArgs42(ctx) {
2275
+ var toolName52 = "integration_online_datasource";
2276
+ function buildArgs48(ctx) {
1771
2277
  return {
1772
2278
  spaceCode: ctx.str("spaceCode"),
1773
2279
  dataSourceNames: ctx.str("dataSourceNames")
@@ -1782,15 +2288,15 @@ var onlineDatasource = {
1782
2288
  { name: "dataSourceNames", type: "string", required: true, desc: "Datasource name list (comma-separated)" }
1783
2289
  ],
1784
2290
  risk: "write",
1785
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName44, buildArgs42(ctx)),
2291
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName52, buildArgs48(ctx)),
1786
2292
  execute: async (ctx) => {
1787
- return callDataopsApi(ctx, toolName44, buildArgs42(ctx));
2293
+ return callDataopsApi(ctx, toolName52, buildArgs48(ctx));
1788
2294
  }
1789
2295
  };
1790
2296
 
1791
2297
  // src/commands/te-dataops/integration/add-datasource.ts
1792
- var toolName45 = "integration_add_datasource";
1793
- function buildArgs43(ctx) {
2298
+ var toolName53 = "integration_add_datasource";
2299
+ function buildArgs49(ctx) {
1794
2300
  return {
1795
2301
  spaceCode: ctx.str("spaceCode"),
1796
2302
  componentName: ctx.str("componentName"),
@@ -1813,14 +2319,14 @@ var addDatasource = {
1813
2319
  { name: "envJsonList", type: "string", required: true, desc: "JSON array string of component connection fields. Keys must match requiredFields from +get_datasource_component_template" }
1814
2320
  ],
1815
2321
  risk: "write",
1816
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName45, buildArgs43(ctx)),
2322
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName53, buildArgs49(ctx)),
1817
2323
  execute: async (ctx) => {
1818
- return callDataopsApi(ctx, toolName45, buildArgs43(ctx));
2324
+ return callDataopsApi(ctx, toolName53, buildArgs49(ctx));
1819
2325
  }
1820
2326
  };
1821
2327
 
1822
2328
  // src/commands/te-dataops/integration/modify-datasource.ts
1823
- var toolName46 = "integration_modify_datasource";
2329
+ var toolName54 = "integration_modify_datasource";
1824
2330
  function optionalBool(ctx, name) {
1825
2331
  const flagName = `--${name}`;
1826
2332
  const hasFlag = process.argv.some((arg) => arg === flagName || arg.startsWith(`${flagName}=`));
@@ -1828,7 +2334,7 @@ function optionalBool(ctx, name) {
1828
2334
  const raw = ctx.str(name);
1829
2335
  return raw === "true" || raw === "1" || raw === "yes";
1830
2336
  }
1831
- function buildArgs44(ctx) {
2337
+ function buildArgs50(ctx) {
1832
2338
  return {
1833
2339
  spaceCode: ctx.str("spaceCode"),
1834
2340
  dataSourceName: ctx.str("dataSourceName"),
@@ -1849,15 +2355,15 @@ var modifyDatasource = {
1849
2355
  { name: "envJsonList", type: "string", required: false, desc: "New environment config JSON array string (not passed means not modified)" }
1850
2356
  ],
1851
2357
  risk: "write",
1852
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName46, buildArgs44(ctx)),
2358
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName54, buildArgs50(ctx)),
1853
2359
  execute: async (ctx) => {
1854
- return callDataopsApi(ctx, toolName46, buildArgs44(ctx));
2360
+ return callDataopsApi(ctx, toolName54, buildArgs50(ctx));
1855
2361
  }
1856
2362
  };
1857
2363
 
1858
2364
  // src/commands/te-dataops/integration/list-sync-solutions.ts
1859
- var toolName47 = "integration_list_sync_solutions";
1860
- function buildArgs45(ctx) {
2365
+ var toolName55 = "integration_list_sync_solutions";
2366
+ function buildArgs51(ctx) {
1861
2367
  return {
1862
2368
  spaceCode: ctx.str("spaceCode")
1863
2369
  };
@@ -1870,15 +2376,15 @@ var listSyncSolutions = {
1870
2376
  { name: "spaceCode", type: "string", required: true, desc: "Space code" }
1871
2377
  ],
1872
2378
  risk: "read",
1873
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName47, buildArgs45(ctx)),
2379
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName55, buildArgs51(ctx)),
1874
2380
  execute: async (ctx) => {
1875
- return callDataopsApi(ctx, toolName47, buildArgs45(ctx));
2381
+ return callDataopsApi(ctx, toolName55, buildArgs51(ctx));
1876
2382
  }
1877
2383
  };
1878
2384
 
1879
2385
  // src/commands/te-dataops/integration/get-sync-detail.ts
1880
- var toolName48 = "integration_get_sync_detail";
1881
- function buildArgs46(ctx) {
2386
+ var toolName56 = "integration_get_sync_detail";
2387
+ function buildArgs52(ctx) {
1882
2388
  return {
1883
2389
  spaceCode: ctx.str("spaceCode"),
1884
2390
  syncId: ctx.str("syncId"),
@@ -1895,13 +2401,13 @@ var getSyncDetail = {
1895
2401
  { name: "withParams", type: "boolean", required: false, desc: "Also return usedParams; defaults to false" }
1896
2402
  ],
1897
2403
  risk: "read",
1898
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName48, buildArgs46(ctx)),
1899
- execute: async (ctx) => callDataopsApi(ctx, toolName48, buildArgs46(ctx))
2404
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName56, buildArgs52(ctx)),
2405
+ execute: async (ctx) => callDataopsApi(ctx, toolName56, buildArgs52(ctx))
1900
2406
  };
1901
2407
 
1902
2408
  // src/commands/te-dataops/integration/list-sync-runs.ts
1903
- var toolName49 = "integration_list_sync_runs";
1904
- function buildArgs47(ctx) {
2409
+ var toolName57 = "integration_list_sync_runs";
2410
+ function buildArgs53(ctx) {
1905
2411
  return {
1906
2412
  spaceCode: ctx.str("spaceCode"),
1907
2413
  syncId: ctx.str("syncId"),
@@ -1918,12 +2424,12 @@ var listSyncRuns = {
1918
2424
  { name: "limit", type: "number", required: false, desc: "Number of results to return, defaults to 20 if not provided" }
1919
2425
  ],
1920
2426
  risk: "read",
1921
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName49, buildArgs47(ctx)),
1922
- execute: async (ctx) => callDataopsApi(ctx, toolName49, buildArgs47(ctx))
2427
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName57, buildArgs53(ctx)),
2428
+ execute: async (ctx) => callDataopsApi(ctx, toolName57, buildArgs53(ctx))
1923
2429
  };
1924
2430
 
1925
2431
  // src/commands/te-dataops/integration/exec-sync-solution.ts
1926
- var toolName50 = "integration_exec_sync_solution";
2432
+ var toolName58 = "integration_exec_sync_solution";
1927
2433
  var execSyncSolution = {
1928
2434
  service: "dataops_integration",
1929
2435
  command: "+exec_sync_solution",
@@ -1935,14 +2441,14 @@ var execSyncSolution = {
1935
2441
  { name: "comment", type: "string", required: false, desc: "Optional execution remark" }
1936
2442
  ],
1937
2443
  risk: "write",
1938
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName50, {
2444
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName58, {
1939
2445
  spaceCode: ctx.str("spaceCode"),
1940
2446
  syncId: ctx.str("syncId"),
1941
2447
  baseDate: ctx.str("baseDate"),
1942
2448
  comment: ctx.str("comment")
1943
2449
  }),
1944
2450
  execute: async (ctx) => {
1945
- return callDataopsApi(ctx, toolName50, {
2451
+ return callDataopsApi(ctx, toolName58, {
1946
2452
  spaceCode: ctx.str("spaceCode"),
1947
2453
  syncId: ctx.str("syncId"),
1948
2454
  baseDate: ctx.str("baseDate"),
@@ -1952,8 +2458,8 @@ var execSyncSolution = {
1952
2458
  };
1953
2459
 
1954
2460
  // src/commands/te-dataops/integration/add-sync-solution.ts
1955
- var toolName51 = "integration_add_sync_solution";
1956
- function buildArgs48(ctx) {
2461
+ var toolName59 = "integration_add_sync_solution";
2462
+ function buildArgs54(ctx) {
1957
2463
  return {
1958
2464
  spaceCode: ctx.str("spaceCode"),
1959
2465
  syncName: ctx.str("syncName"),
@@ -1986,15 +2492,15 @@ var addSyncSolution = {
1986
2492
  { name: "remark", type: "string", required: false, desc: "Remark" }
1987
2493
  ],
1988
2494
  risk: "write",
1989
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName51, buildArgs48(ctx)),
2495
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName59, buildArgs54(ctx)),
1990
2496
  execute: async (ctx) => {
1991
- return callDataopsApi(ctx, toolName51, buildArgs48(ctx));
2497
+ return callDataopsApi(ctx, toolName59, buildArgs54(ctx));
1992
2498
  }
1993
2499
  };
1994
2500
 
1995
2501
  // src/commands/te-dataops/integration/save-sync-solution.ts
1996
- var toolName52 = "integration_save_sync_solution";
1997
- function buildArgs49(ctx) {
2502
+ var toolName60 = "integration_save_sync_solution";
2503
+ function buildArgs55(ctx) {
1998
2504
  return {
1999
2505
  spaceCode: ctx.str("spaceCode"),
2000
2506
  syncId: ctx.str("syncId"),
@@ -2021,13 +2527,13 @@ var saveSyncSolution = {
2021
2527
  { name: "remark", type: "string", required: false, desc: "Updated remark" }
2022
2528
  ],
2023
2529
  risk: "write",
2024
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName52, buildArgs49(ctx)),
2025
- execute: async (ctx) => callDataopsApi(ctx, toolName52, buildArgs49(ctx))
2530
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName60, buildArgs55(ctx)),
2531
+ execute: async (ctx) => callDataopsApi(ctx, toolName60, buildArgs55(ctx))
2026
2532
  };
2027
2533
 
2028
2534
  // src/commands/te-dataops/integration/stop-sync-solution.ts
2029
- var toolName53 = "integration_stop_sync_solution";
2030
- function buildArgs50(ctx) {
2535
+ var toolName61 = "integration_stop_sync_solution";
2536
+ function buildArgs56(ctx) {
2031
2537
  return {
2032
2538
  spaceCode: ctx.str("spaceCode"),
2033
2539
  syncId: ctx.str("syncId"),
@@ -2044,8 +2550,8 @@ var stopSyncSolution = {
2044
2550
  { name: "taskId", type: "string", required: true, desc: "Running execution task ID from +list_sync_runs" }
2045
2551
  ],
2046
2552
  risk: "write",
2047
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName53, buildArgs50(ctx)),
2048
- execute: async (ctx) => callDataopsApi(ctx, toolName53, buildArgs50(ctx))
2553
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName61, buildArgs56(ctx)),
2554
+ execute: async (ctx) => callDataopsApi(ctx, toolName61, buildArgs56(ctx))
2049
2555
  };
2050
2556
 
2051
2557
  // src/commands/te-dataops/integration/index.ts
@@ -2145,7 +2651,7 @@ function formatAllowed(allowed) {
2145
2651
  }
2146
2652
 
2147
2653
  // src/commands/te-dataops/operations/create-backfill-job.ts
2148
- var toolName54 = "operations_create_backfill_job";
2654
+ var toolName62 = "operations_create_backfill_job";
2149
2655
  var JOB_TYPES = ["TASK_ALL", "TASK_ONLY", "TASK_PRE", "TASK_POST"];
2150
2656
  var FAILURE_STRATEGIES = ["END", "CONTINUE"];
2151
2657
  var INTERVAL_UNITS = ["DAY", "WEEK", "MONTH"];
@@ -2252,8 +2758,8 @@ var createBackfillJob = {
2252
2758
  flags: backfillDraftFlags(),
2253
2759
  risk: "write",
2254
2760
  validate: validateBackfillDraft,
2255
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName54, buildBackfillDraftArgs(ctx)),
2256
- execute: async (ctx) => callDataopsApi(ctx, toolName54, buildBackfillDraftArgs(ctx))
2761
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName62, buildBackfillDraftArgs(ctx)),
2762
+ execute: async (ctx) => callDataopsApi(ctx, toolName62, buildBackfillDraftArgs(ctx))
2257
2763
  };
2258
2764
  function backfillDraftFlags() {
2259
2765
  return [
@@ -2275,7 +2781,7 @@ function backfillDraftFlags() {
2275
2781
  }
2276
2782
 
2277
2783
  // src/commands/te-dataops/operations/delete-backfill-job.ts
2278
- var toolName55 = "operations_delete_backfill_job";
2784
+ var toolName63 = "operations_delete_backfill_job";
2279
2785
  var deleteBackfillJob = {
2280
2786
  service: "dataops_operations",
2281
2787
  command: "+delete_backfill_job",
@@ -2283,13 +2789,13 @@ var deleteBackfillJob = {
2283
2789
  flags: backfillJobFlags(),
2284
2790
  risk: "high-risk-write",
2285
2791
  validate: validateBackfillJobId,
2286
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName55, buildBackfillJobArgs(ctx)),
2287
- execute: async (ctx) => callDataopsApi(ctx, toolName55, buildBackfillJobArgs(ctx))
2792
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName63, buildBackfillJobArgs(ctx)),
2793
+ execute: async (ctx) => callDataopsApi(ctx, toolName63, buildBackfillJobArgs(ctx))
2288
2794
  };
2289
2795
 
2290
2796
  // src/commands/te-dataops/operations/get-flow-instance-detail.ts
2291
- var toolName56 = "operations_get_flow_instance_detail";
2292
- function buildArgs51(ctx) {
2797
+ var toolName64 = "operations_get_flow_instance_detail";
2798
+ function buildArgs57(ctx) {
2293
2799
  return {
2294
2800
  spaceCode: ctx.str("spaceCode"),
2295
2801
  flowCode: ctx.num("flowCode"),
@@ -2306,14 +2812,14 @@ var getFlowInstanceDetail = {
2306
2812
  { name: "flowInstanceId", type: "number", required: true, desc: "Workflow instance ID from +search_flow_instances" }
2307
2813
  ],
2308
2814
  risk: "read",
2309
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName56, buildArgs51(ctx)),
2815
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName64, buildArgs57(ctx)),
2310
2816
  execute: async (ctx) => {
2311
- return callDataopsApi(ctx, toolName56, buildArgs51(ctx));
2817
+ return callDataopsApi(ctx, toolName64, buildArgs57(ctx));
2312
2818
  }
2313
2819
  };
2314
2820
 
2315
2821
  // src/commands/te-dataops/operations/get-backfill-job-detail.ts
2316
- var toolName57 = "operations_get_backfill_job_detail";
2822
+ var toolName65 = "operations_get_backfill_job_detail";
2317
2823
  var getBackfillJobDetail = {
2318
2824
  service: "dataops_operations",
2319
2825
  command: "+get_backfill_job_detail",
@@ -2321,16 +2827,16 @@ var getBackfillJobDetail = {
2321
2827
  flags: backfillJobFlags(),
2322
2828
  risk: "read",
2323
2829
  validate: validateBackfillJobId,
2324
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName57, buildBackfillJobArgs(ctx)),
2325
- execute: async (ctx) => callDataopsApi(ctx, toolName57, buildBackfillJobArgs(ctx))
2830
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName65, buildBackfillJobArgs(ctx)),
2831
+ execute: async (ctx) => callDataopsApi(ctx, toolName65, buildBackfillJobArgs(ctx))
2326
2832
  };
2327
2833
 
2328
2834
  // src/commands/te-dataops/operations/get-task-instance-detail.ts
2329
- var toolName58 = "operations_get_task_instance_detail";
2835
+ var toolName66 = "operations_get_task_instance_detail";
2330
2836
  function optionalBool2(ctx, name) {
2331
2837
  return ctx.str(name) === "" ? void 0 : ctx.bool(name);
2332
2838
  }
2333
- function buildArgs52(ctx) {
2839
+ function buildArgs58(ctx) {
2334
2840
  return {
2335
2841
  spaceCode: ctx.str("spaceCode"),
2336
2842
  flowCode: ctx.num("flowCode"),
@@ -2355,15 +2861,15 @@ var getTaskInstanceDetail = {
2355
2861
  { name: "includeLog", type: "boolean", required: false, desc: "Whether to include task logs. Default false" }
2356
2862
  ],
2357
2863
  risk: "read",
2358
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName58, buildArgs52(ctx)),
2864
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName66, buildArgs58(ctx)),
2359
2865
  execute: async (ctx) => {
2360
- return callDataopsApi(ctx, toolName58, buildArgs52(ctx));
2866
+ return callDataopsApi(ctx, toolName66, buildArgs58(ctx));
2361
2867
  }
2362
2868
  };
2363
2869
 
2364
2870
  // src/commands/te-dataops/operations/list-backfill-flows.ts
2365
- var toolName59 = "operations_list_backfill_flows";
2366
- function buildArgs53(ctx) {
2871
+ var toolName67 = "operations_list_backfill_flows";
2872
+ function buildArgs59(ctx) {
2367
2873
  return { spaceCode: ctx.str("spaceCode") };
2368
2874
  }
2369
2875
  var listBackfillFlows = {
@@ -2374,12 +2880,12 @@ var listBackfillFlows = {
2374
2880
  { name: "spaceCode", type: "string", required: true, desc: "Space code" }
2375
2881
  ],
2376
2882
  risk: "read",
2377
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName59, buildArgs53(ctx)),
2378
- execute: async (ctx) => callDataopsApi(ctx, toolName59, buildArgs53(ctx))
2883
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName67, buildArgs59(ctx)),
2884
+ execute: async (ctx) => callDataopsApi(ctx, toolName67, buildArgs59(ctx))
2379
2885
  };
2380
2886
 
2381
2887
  // src/commands/te-dataops/operations/rerun-backfill-job.ts
2382
- var toolName60 = "operations_rerun_backfill_job";
2888
+ var toolName68 = "operations_rerun_backfill_job";
2383
2889
  var rerunBackfillJob = {
2384
2890
  service: "dataops_operations",
2385
2891
  command: "+rerun_backfill_job",
@@ -2387,12 +2893,12 @@ var rerunBackfillJob = {
2387
2893
  flags: backfillJobFlags(),
2388
2894
  risk: "write",
2389
2895
  validate: validateBackfillJobId,
2390
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName60, buildBackfillJobArgs(ctx)),
2391
- execute: async (ctx) => callDataopsApi(ctx, toolName60, buildBackfillJobArgs(ctx))
2896
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName68, buildBackfillJobArgs(ctx)),
2897
+ execute: async (ctx) => callDataopsApi(ctx, toolName68, buildBackfillJobArgs(ctx))
2392
2898
  };
2393
2899
 
2394
2900
  // src/commands/te-dataops/operations/run-backfill-job.ts
2395
- var toolName61 = "operations_run_backfill_job";
2901
+ var toolName69 = "operations_run_backfill_job";
2396
2902
  var runBackfillJob = {
2397
2903
  service: "dataops_operations",
2398
2904
  command: "+run_backfill_job",
@@ -2400,16 +2906,16 @@ var runBackfillJob = {
2400
2906
  flags: backfillJobFlags(),
2401
2907
  risk: "write",
2402
2908
  validate: validateBackfillJobId,
2403
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName61, buildBackfillJobArgs(ctx)),
2404
- execute: async (ctx) => callDataopsApi(ctx, toolName61, buildBackfillJobArgs(ctx))
2909
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName69, buildBackfillJobArgs(ctx)),
2910
+ execute: async (ctx) => callDataopsApi(ctx, toolName69, buildBackfillJobArgs(ctx))
2405
2911
  };
2406
2912
 
2407
2913
  // src/commands/te-dataops/operations/search-backfill-jobs.ts
2408
- var toolName62 = "operations_search_backfill_jobs";
2914
+ var toolName70 = "operations_search_backfill_jobs";
2409
2915
  var JOB_TYPES2 = ["TASK_ALL", "TASK_ONLY", "TASK_PRE", "TASK_POST"];
2410
2916
  var JOB_STATUSES = ["DRAFT", "RUNNING", "STOP", "FAIL", "SUCCESS", "READY_STOP"];
2411
2917
  var JOB_SORTS = ["ID", "JOB_NAME", "CREATE_TIME", "UPDATE_TIME", "START_DATE", "END_DATE"];
2412
- function buildArgs54(ctx) {
2918
+ function buildArgs60(ctx) {
2413
2919
  return {
2414
2920
  spaceCode: ctx.str("spaceCode"),
2415
2921
  keyword: ctx.str("keyword"),
@@ -2469,13 +2975,13 @@ var searchBackfillJobs = {
2469
2975
  ],
2470
2976
  risk: "read",
2471
2977
  validate: validateSearch,
2472
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName62, buildArgs54(ctx)),
2473
- execute: async (ctx) => callDataopsApi(ctx, toolName62, buildArgs54(ctx))
2978
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName70, buildArgs60(ctx)),
2979
+ execute: async (ctx) => callDataopsApi(ctx, toolName70, buildArgs60(ctx))
2474
2980
  };
2475
2981
 
2476
2982
  // src/commands/te-dataops/operations/search-flow-instances.ts
2477
- var toolName63 = "operations_search_flow_instances";
2478
- function buildArgs55(ctx) {
2983
+ var toolName71 = "operations_search_flow_instances";
2984
+ function buildArgs61(ctx) {
2479
2985
  return {
2480
2986
  spaceCode: ctx.str("spaceCode"),
2481
2987
  keyword: ctx.str("keyword"),
@@ -2500,14 +3006,14 @@ var searchFlowInstances = {
2500
3006
  { name: "pageSize", type: "number", required: false, desc: "Optional page size; default 20, max 100" }
2501
3007
  ],
2502
3008
  risk: "read",
2503
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName63, buildArgs55(ctx)),
3009
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName71, buildArgs61(ctx)),
2504
3010
  execute: async (ctx) => {
2505
- return callDataopsApi(ctx, toolName63, buildArgs55(ctx));
3011
+ return callDataopsApi(ctx, toolName71, buildArgs61(ctx));
2506
3012
  }
2507
3013
  };
2508
3014
 
2509
3015
  // src/commands/te-dataops/operations/stop-backfill-job.ts
2510
- var toolName64 = "operations_stop_backfill_job";
3016
+ var toolName72 = "operations_stop_backfill_job";
2511
3017
  var stopBackfillJob = {
2512
3018
  service: "dataops_operations",
2513
3019
  command: "+stop_backfill_job",
@@ -2515,13 +3021,13 @@ var stopBackfillJob = {
2515
3021
  flags: backfillJobFlags(),
2516
3022
  risk: "high-risk-write",
2517
3023
  validate: validateBackfillJobId,
2518
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName64, buildBackfillJobArgs(ctx)),
2519
- execute: async (ctx) => callDataopsApi(ctx, toolName64, buildBackfillJobArgs(ctx))
3024
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName72, buildBackfillJobArgs(ctx)),
3025
+ execute: async (ctx) => callDataopsApi(ctx, toolName72, buildBackfillJobArgs(ctx))
2520
3026
  };
2521
3027
 
2522
3028
  // src/commands/te-dataops/operations/stop-flow-instance.ts
2523
- var toolName65 = "operations_stop_flow_instance";
2524
- function buildArgs56(ctx) {
3029
+ var toolName73 = "operations_stop_flow_instance";
3030
+ function buildArgs62(ctx) {
2525
3031
  const executeId = ctx.optionalNum("executeId");
2526
3032
  const flowInstanceId = ctx.optionalNum("flowInstanceId");
2527
3033
  if (executeId == null && flowInstanceId == null || executeId != null && flowInstanceId != null) {
@@ -2548,15 +3054,15 @@ var stopFlowInstance = {
2548
3054
  { name: "flowInstanceId", type: "number", required: false, desc: "Workflow instance ID returned by dataops_operations +search_flow_instances" }
2549
3055
  ],
2550
3056
  risk: "write",
2551
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName65, buildArgs56(ctx)),
3057
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName73, buildArgs62(ctx)),
2552
3058
  execute: async (ctx) => {
2553
- return callDataopsApi(ctx, toolName65, buildArgs56(ctx));
3059
+ return callDataopsApi(ctx, toolName73, buildArgs62(ctx));
2554
3060
  }
2555
3061
  };
2556
3062
 
2557
3063
  // src/commands/te-dataops/operations/update-backfill-job.ts
2558
- var toolName66 = "operations_update_backfill_job";
2559
- function buildArgs57(ctx) {
3064
+ var toolName74 = "operations_update_backfill_job";
3065
+ function buildArgs63(ctx) {
2560
3066
  return {
2561
3067
  ...buildBackfillDraftArgs(ctx),
2562
3068
  jobId: ctx.num("jobId")
@@ -2578,8 +3084,8 @@ var updateBackfillJob = {
2578
3084
  ],
2579
3085
  risk: "write",
2580
3086
  validate: validateUpdate,
2581
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName66, buildArgs57(ctx)),
2582
- execute: async (ctx) => callDataopsApi(ctx, toolName66, buildArgs57(ctx))
3087
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName74, buildArgs63(ctx)),
3088
+ execute: async (ctx) => callDataopsApi(ctx, toolName74, buildArgs63(ctx))
2583
3089
  };
2584
3090
 
2585
3091
  // src/commands/te-dataops/operations/index.ts
@@ -2601,16 +3107,16 @@ var commands4 = [
2601
3107
  var operations_default = commands4;
2602
3108
 
2603
3109
  // src/commands/te-dataops/repo/list-spaces.ts
2604
- var toolName67 = "repo_list_spaces";
3110
+ var toolName75 = "repo_list_spaces";
2605
3111
  var listSpaces = {
2606
3112
  service: "dataops_repo",
2607
3113
  command: "+list_spaces",
2608
3114
  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.",
2609
3115
  flags: [],
2610
3116
  risk: "read",
2611
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName67, {}),
3117
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName75, {}),
2612
3118
  execute: async (ctx) => {
2613
- return callDataopsApi(ctx, toolName67, {});
3119
+ return callDataopsApi(ctx, toolName75, {});
2614
3120
  }
2615
3121
  };
2616
3122
 
@@ -2621,12 +3127,12 @@ var commands5 = [
2621
3127
  var repo_default = commands5;
2622
3128
 
2623
3129
  // src/commands/te-dataops/ide/cancel-sql-query.ts
2624
- var toolName68 = "ide_cancel_sql_query";
3130
+ var toolName76 = "ide_cancel_sql_query";
2625
3131
  function optionalString4(ctx, name) {
2626
3132
  const value = ctx.str(name);
2627
3133
  return value === "" ? void 0 : value;
2628
3134
  }
2629
- function buildArgs58(ctx) {
3135
+ function buildArgs64(ctx) {
2630
3136
  return {
2631
3137
  spaceCode: ctx.str("spaceCode"),
2632
3138
  downloadTaskId: ctx.num("downloadTaskId"),
@@ -2643,18 +3149,18 @@ var cancelSqlQuery = {
2643
3149
  { name: "requestId", type: "string", required: false, desc: "Optional request ID returned by +submit_sql_query, used only for trace display" }
2644
3150
  ],
2645
3151
  risk: "write",
2646
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName68, buildArgs58(ctx)),
2647
- execute: async (ctx) => callDataopsApi(ctx, toolName68, buildArgs58(ctx))
3152
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName76, buildArgs64(ctx)),
3153
+ execute: async (ctx) => callDataopsApi(ctx, toolName76, buildArgs64(ctx))
2648
3154
  };
2649
3155
 
2650
3156
  // src/commands/te-dataops/ide/get-sql-query-status.ts
2651
- var toolName69 = "ide_get_sql_query_status";
3157
+ var toolName77 = "ide_get_sql_query_status";
2652
3158
  var downloadPath = "/api/cli/dataops/v1/gaia/ide/sql-query-download";
2653
3159
  function optionalString5(ctx, name) {
2654
3160
  const value = ctx.str(name);
2655
3161
  return value === "" ? void 0 : value;
2656
3162
  }
2657
- function buildArgs59(ctx) {
3163
+ function buildArgs65(ctx) {
2658
3164
  return {
2659
3165
  spaceCode: ctx.str("spaceCode"),
2660
3166
  downloadTaskId: ctx.num("downloadTaskId"),
@@ -2682,9 +3188,9 @@ var getSqlQueryStatus = {
2682
3188
  { 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." }
2683
3189
  ],
2684
3190
  risk: "read",
2685
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName69, buildArgs59(ctx)),
3191
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName77, buildArgs65(ctx)),
2686
3192
  execute: async (ctx) => {
2687
- const data = await callDataopsApi(ctx, toolName69, buildArgs59(ctx));
3193
+ const data = await callDataopsApi(ctx, toolName77, buildArgs65(ctx));
2688
3194
  const downloadTo = optionalString5(ctx, "downloadTo");
2689
3195
  if (downloadTo && isDownloadReady(data)) {
2690
3196
  return { ...data, localFile: await downloadResult(ctx, data, downloadTo) };
@@ -2694,12 +3200,12 @@ var getSqlQueryStatus = {
2694
3200
  };
2695
3201
 
2696
3202
  // src/commands/te-dataops/ide/list-catalogs.ts
2697
- var toolName70 = "ide_list_catalogs";
3203
+ var toolName78 = "ide_list_catalogs";
2698
3204
  function optionalString6(ctx, name) {
2699
3205
  const value = ctx.str(name);
2700
3206
  return value === "" ? void 0 : value;
2701
3207
  }
2702
- function buildArgs60(ctx) {
3208
+ function buildArgs66(ctx) {
2703
3209
  return {
2704
3210
  spaceCode: ctx.str("spaceCode"),
2705
3211
  connType: optionalString6(ctx, "connType"),
@@ -2716,19 +3222,19 @@ var listCatalogs = {
2716
3222
  { name: "repoCode", type: "string", required: false, desc: "Optional repository code. Default te_etl" }
2717
3223
  ],
2718
3224
  risk: "read",
2719
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName70, buildArgs60(ctx)),
3225
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName78, buildArgs66(ctx)),
2720
3226
  execute: async (ctx) => {
2721
- return callDataopsApi(ctx, toolName70, buildArgs60(ctx));
3227
+ return callDataopsApi(ctx, toolName78, buildArgs66(ctx));
2722
3228
  }
2723
3229
  };
2724
3230
 
2725
3231
  // src/commands/te-dataops/ide/get-schema-info.ts
2726
- var toolName71 = "ide_get_schema_info";
3232
+ var toolName79 = "ide_get_schema_info";
2727
3233
  function optionalString7(ctx, name) {
2728
3234
  const value = ctx.str(name);
2729
3235
  return value === "" ? void 0 : value;
2730
3236
  }
2731
- function buildArgs61(ctx) {
3237
+ function buildArgs67(ctx) {
2732
3238
  return {
2733
3239
  spaceCode: ctx.str("spaceCode"),
2734
3240
  connType: optionalString7(ctx, "connType"),
@@ -2760,14 +3266,14 @@ var getSchemaInfo = {
2760
3266
  { name: "schema", type: "string", required: true, desc: "Schema name" }
2761
3267
  ],
2762
3268
  risk: "read",
2763
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName71, buildArgs61(ctx)),
3269
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName79, buildArgs67(ctx)),
2764
3270
  execute: async (ctx) => {
2765
- return schemaStats(await callDataopsApi(ctx, toolName71, buildArgs61(ctx)));
3271
+ return schemaStats(await callDataopsApi(ctx, toolName79, buildArgs67(ctx)));
2766
3272
  }
2767
3273
  };
2768
3274
 
2769
3275
  // src/commands/te-dataops/ide/get-table-detail.ts
2770
- var toolName72 = "ide_get_table_detail";
3276
+ var toolName80 = "ide_get_table_detail";
2771
3277
  function optionalString8(ctx, name) {
2772
3278
  const value = ctx.str(name);
2773
3279
  return value === "" ? void 0 : value;
@@ -2780,7 +3286,7 @@ function optionalEntityType(ctx) {
2780
3286
  const value = optionalString8(ctx, "entityType");
2781
3287
  return value === void 0 ? void 0 : value.toUpperCase();
2782
3288
  }
2783
- function buildArgs62(ctx) {
3289
+ function buildArgs68(ctx) {
2784
3290
  return {
2785
3291
  spaceCode: ctx.str("spaceCode"),
2786
3292
  connType: optionalString8(ctx, "connType"),
@@ -2815,19 +3321,19 @@ var getTableDetail2 = {
2815
3321
  throw new Error("entityType must be TABLE or VIEW");
2816
3322
  }
2817
3323
  },
2818
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName72, buildArgs62(ctx)),
3324
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName80, buildArgs68(ctx)),
2819
3325
  execute: async (ctx) => {
2820
- return callDataopsApi(ctx, toolName72, buildArgs62(ctx));
3326
+ return callDataopsApi(ctx, toolName80, buildArgs68(ctx));
2821
3327
  }
2822
3328
  };
2823
3329
 
2824
3330
  // src/commands/te-dataops/ide/search-tables.ts
2825
- var toolName73 = "ide_search_tables";
3331
+ var toolName81 = "ide_search_tables";
2826
3332
  function optionalString9(ctx, name) {
2827
3333
  const value = ctx.str(name);
2828
3334
  return value === "" ? void 0 : value;
2829
3335
  }
2830
- function buildArgs63(ctx) {
3336
+ function buildArgs69(ctx) {
2831
3337
  return {
2832
3338
  spaceCode: ctx.str("spaceCode"),
2833
3339
  connType: optionalString9(ctx, "connType"),
@@ -2848,15 +3354,15 @@ var searchTables = {
2848
3354
  { name: "size", type: "number", required: false, desc: "Optional maximum results. Default 20" }
2849
3355
  ],
2850
3356
  risk: "read",
2851
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName73, buildArgs63(ctx)),
3357
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName81, buildArgs69(ctx)),
2852
3358
  execute: async (ctx) => {
2853
- return callDataopsApi(ctx, toolName73, buildArgs63(ctx));
3359
+ return callDataopsApi(ctx, toolName81, buildArgs69(ctx));
2854
3360
  }
2855
3361
  };
2856
3362
 
2857
3363
  // src/commands/te-dataops/ide/list-repos.ts
2858
- var toolName74 = "ide_list_repos";
2859
- function buildArgs64(ctx) {
3364
+ var toolName82 = "ide_list_repos";
3365
+ function buildArgs70(ctx) {
2860
3366
  return {
2861
3367
  spaceCode: ctx.str("spaceCode")
2862
3368
  };
@@ -2869,14 +3375,14 @@ var listRepos = {
2869
3375
  { name: "spaceCode", type: "string", required: true, desc: "Space code" }
2870
3376
  ],
2871
3377
  risk: "read",
2872
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName74, buildArgs64(ctx)),
3378
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName82, buildArgs70(ctx)),
2873
3379
  execute: async (ctx) => {
2874
- return callDataopsApi(ctx, toolName74, buildArgs64(ctx));
3380
+ return callDataopsApi(ctx, toolName82, buildArgs70(ctx));
2875
3381
  }
2876
3382
  };
2877
3383
 
2878
3384
  // src/commands/te-dataops/ide/list-tables.ts
2879
- var toolName75 = "ide_list_tables";
3385
+ var toolName83 = "ide_list_tables";
2880
3386
  function optionalString10(ctx, name) {
2881
3387
  const value = ctx.str(name);
2882
3388
  return value === "" ? void 0 : value;
@@ -2885,7 +3391,7 @@ function optionalEntityType2(ctx) {
2885
3391
  const value = optionalString10(ctx, "entityType");
2886
3392
  return value === void 0 ? void 0 : value.toUpperCase();
2887
3393
  }
2888
- function buildArgs65(ctx) {
3394
+ function buildArgs71(ctx) {
2889
3395
  return {
2890
3396
  spaceCode: ctx.str("spaceCode"),
2891
3397
  connType: optionalString10(ctx, "connType"),
@@ -2918,19 +3424,19 @@ var listTables = {
2918
3424
  throw new Error("entityType must be TABLE or VIEW");
2919
3425
  }
2920
3426
  },
2921
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName75, buildArgs65(ctx)),
3427
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName83, buildArgs71(ctx)),
2922
3428
  execute: async (ctx) => {
2923
- return callDataopsApi(ctx, toolName75, buildArgs65(ctx));
3429
+ return callDataopsApi(ctx, toolName83, buildArgs71(ctx));
2924
3430
  }
2925
3431
  };
2926
3432
 
2927
3433
  // src/commands/te-dataops/ide/submit-sql-query.ts
2928
- var toolName76 = "ide_submit_sql_query";
3434
+ var toolName84 = "ide_submit_sql_query";
2929
3435
  function optionalString11(ctx, name) {
2930
3436
  const value = ctx.str(name);
2931
3437
  return value === "" ? void 0 : value;
2932
3438
  }
2933
- function buildArgs66(ctx) {
3439
+ function buildArgs72(ctx) {
2934
3440
  return {
2935
3441
  spaceCode: ctx.str("spaceCode"),
2936
3442
  repoCode: optionalString11(ctx, "repoCode"),
@@ -2949,8 +3455,8 @@ var submitSqlQuery = {
2949
3455
  { name: "engineType", type: "string", required: false, desc: "SQL execution engine. Defaults to TASK_ENGINE_TRINO. Optional: TASK_ENGINE_STARROCKS." }
2950
3456
  ],
2951
3457
  risk: "read",
2952
- dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName76, buildArgs66(ctx)),
2953
- execute: async (ctx) => callDataopsApi(ctx, toolName76, buildArgs66(ctx))
3458
+ dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName84, buildArgs72(ctx)),
3459
+ execute: async (ctx) => callDataopsApi(ctx, toolName84, buildArgs72(ctx))
2954
3460
  };
2955
3461
 
2956
3462
  // src/commands/te-dataops/ide/index.ts