@thinkingai/ae-cli 1.0.28 → 1.0.30

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 (31) hide show
  1. package/README.md +1 -16
  2. package/README.zh.md +1 -16
  3. package/dist/{auth-5NSDQFQB.js → auth-H3GJD55A.js} +8 -5
  4. package/dist/{auth-H2376DEF.js → auth-U25QJU5D.js} +2 -1
  5. package/dist/{chunk-IMBKVXKY.js → chunk-EGEIXA2Z.js} +82 -10
  6. package/dist/{chunk-WCHI7725.js → chunk-GLNZSDKO.js} +48 -5
  7. package/dist/{chunk-LU7SXK4Q.js → chunk-I42JGQ2J.js} +4 -2
  8. package/dist/{chunk-CAQYQA4R.js → chunk-JM34JPCO.js} +3 -163
  9. package/dist/chunk-NOO24N7W.js +11 -0
  10. package/dist/chunk-SF3KTPIC.js +98 -0
  11. package/dist/chunk-U6TKB3IV.js +171 -0
  12. package/dist/{chunk-AD5V3ZPJ.js → chunk-VJFUB3H3.js} +97 -9
  13. package/dist/{client-FCMK3XEK.js → client-IN42F223.js} +3 -2
  14. package/dist/index.js +42 -20
  15. package/dist/{model-EZ6K7FXI.js → model-VZCYNIOG.js} +4 -6
  16. package/dist/{raw-VEF3D6UD.js → raw-WJIWC6YP.js} +5 -3
  17. package/dist/{sync-NRODEVNH.js → sync-NVASAISS.js} +118 -21
  18. package/dist/{te-agent-7U7JLJKU.js → te-agent-YV4DXEXK.js} +1 -2
  19. package/dist/{te-analysis-A2OSGHQ4.js → te-analysis-CB3DA5I5.js} +4 -2
  20. package/dist/{te-audience-LI67PPGO.js → te-audience-W7SCQFC7.js} +4 -2
  21. package/dist/{te-common-35WVU3C5.js → te-common-FBXVWBSI.js} +4 -2
  22. package/dist/{te-community-LEAP6PWT.js → te-community-LNVDZSGW.js} +4 -2
  23. package/dist/{te-dataops-N2LGZBOX.js → te-dataops-IPCSSWYH.js} +27 -25
  24. package/dist/{te-engage-H7C72Z46.js → te-engage-KARARMIR.js} +4 -2
  25. package/dist/{te-kb-I2OKTBAI.js → te-kb-2Z2CARN3.js} +5 -3
  26. package/dist/{te-meta-HBTIEDRO.js → te-meta-PDKLMWXN.js} +4 -2
  27. package/dist/{te-team-EM5OWRQL.js → te-team-SW5B7DHO.js} +14 -9
  28. package/package.json +1 -1
  29. package/skills/ae-agent/SKILL.md +1 -1
  30. package/dist/chunk-KAEZTSXN.js +0 -99
  31. package/dist/chunk-OJDNO5QY.js +0 -63
@@ -1,6 +1,8 @@
1
1
  import {
2
2
  MultiselectCancelled,
3
3
  SKILL_MANIFEST_FILE,
4
+ assertValidMcpName,
5
+ assertValidSkillSlug,
4
6
  describeSource,
5
7
  getCurrentWorkspace,
6
8
  promptMultiselect,
@@ -8,17 +10,16 @@ import {
8
10
  readSkillManifestEntries,
9
11
  scanMcps,
10
12
  scanSkills,
13
+ splitPushableMcps,
11
14
  writeSkillManifestEntries
12
- } from "./chunk-IMBKVXKY.js";
15
+ } from "./chunk-EGEIXA2Z.js";
13
16
  import {
14
17
  TeAgentApiError,
18
+ TeAgentCredentialsError,
15
19
  getSandboxSyncPullCandidates,
16
20
  postSandboxSyncPull,
17
21
  postToMainApp
18
- } from "./chunk-AD5V3ZPJ.js";
19
- import {
20
- TeAgentCredentialsError
21
- } from "./chunk-KAEZTSXN.js";
22
+ } from "./chunk-VJFUB3H3.js";
22
23
  import {
23
24
  printError
24
25
  } from "./chunk-CLJF7MQA.js";
@@ -32,16 +33,54 @@ import {
32
33
  cpSync,
33
34
  existsSync,
34
35
  mkdirSync,
36
+ readFileSync,
35
37
  realpathSync,
36
38
  rmSync,
37
- statSync
39
+ statSync,
40
+ writeFileSync
38
41
  } from "fs";
39
42
  import path from "path";
40
- var SKILL_SLUG_RE = /^[a-z0-9-]+$/;
41
- function updateSkillManifestForSource(sourceDir, slug) {
42
- if (!SKILL_SLUG_RE.test(slug)) {
43
- throw new Error(`Invalid Skill slug: ${slug}`);
43
+ var MCP_MANIFEST_FILE = ".mcp-manifest.json";
44
+ function isMcpScope(value) {
45
+ return value === "personal" || value === "company" || value === "system";
46
+ }
47
+ function uniqueMcpEntries(entries) {
48
+ const seen = /* @__PURE__ */ new Set();
49
+ const out = [];
50
+ for (const entry of entries) {
51
+ if (seen.has(entry.name)) continue;
52
+ seen.add(entry.name);
53
+ out.push(entry);
44
54
  }
55
+ return out;
56
+ }
57
+ function readMcpManifestEntries(manifestPath) {
58
+ if (!existsSync(manifestPath)) return [];
59
+ let parsed;
60
+ try {
61
+ parsed = JSON.parse(readFileSync(manifestPath, "utf8"));
62
+ } catch {
63
+ return [];
64
+ }
65
+ if (!Array.isArray(parsed)) return [];
66
+ const entries = [];
67
+ for (const item of parsed) {
68
+ if (!item || typeof item !== "object") continue;
69
+ const entry = item;
70
+ if (typeof entry.name !== "string" || !isMcpScope(entry.scope)) continue;
71
+ entries.push({ name: entry.name, scope: entry.scope });
72
+ }
73
+ return uniqueMcpEntries(entries);
74
+ }
75
+ function writeMcpManifestEntries(manifestPath, entries) {
76
+ writeFileSync(
77
+ manifestPath,
78
+ JSON.stringify(uniqueMcpEntries(entries), null, 2) + "\n",
79
+ "utf8"
80
+ );
81
+ }
82
+ function updateSkillManifestForSource(sourceDir, slug) {
83
+ assertValidSkillSlug(slug);
45
84
  const sourceAbs = path.resolve(sourceDir);
46
85
  if (!statSync(sourceAbs).isDirectory()) {
47
86
  throw new Error(`Skill source path is not a directory: ${sourceDir}`);
@@ -62,10 +101,30 @@ function updateSkillManifestForSource(sourceDir, slug) {
62
101
  writeSkillManifestEntries(manifestPath, nextManifest);
63
102
  return { manifestPath, changed: true };
64
103
  }
65
- function copySkillPackageToTarget(args) {
66
- if (!SKILL_SLUG_RE.test(args.slug)) {
67
- throw new Error(`Invalid Skill slug: ${args.slug}`);
104
+ function updateMcpManifestForProjectSource(workspaceDir, name) {
105
+ assertValidMcpName(name);
106
+ const workspaceAbs = path.resolve(workspaceDir);
107
+ if (!statSync(workspaceAbs).isDirectory()) {
108
+ throw new Error(`MCP workspace path is not a directory: ${workspaceDir}`);
109
+ }
110
+ const manifestPath = path.join(workspaceAbs, MCP_MANIFEST_FILE);
111
+ const manifest = readMcpManifestEntries(manifestPath);
112
+ const nextEntry = { name, scope: "personal" };
113
+ const existingIndex = manifest.findIndex((entry) => entry.name === name);
114
+ if (existingIndex >= 0 && manifest[existingIndex].scope === nextEntry.scope) {
115
+ return { manifestPath, changed: false };
116
+ }
117
+ const nextManifest = manifest.slice();
118
+ if (existingIndex >= 0) {
119
+ nextManifest[existingIndex] = nextEntry;
120
+ } else {
121
+ nextManifest.push(nextEntry);
68
122
  }
123
+ writeMcpManifestEntries(manifestPath, nextManifest);
124
+ return { manifestPath, changed: true };
125
+ }
126
+ function copySkillPackageToTarget(args) {
127
+ assertValidSkillSlug(args.slug);
69
128
  if (!path.isAbsolute(args.targetRoot)) {
70
129
  throw new Error(`skillTargetRoot must be an absolute path: ${args.targetRoot}`);
71
130
  }
@@ -103,6 +162,13 @@ function redactEnv(env) {
103
162
  }
104
163
  return out;
105
164
  }
165
+ var SOURCE_ORDER = {
166
+ global: 0,
167
+ workspace: 1,
168
+ project: 0,
169
+ local: 1,
170
+ user: 2
171
+ };
106
172
  function skillToItem(s) {
107
173
  return {
108
174
  kind: "skill",
@@ -124,6 +190,7 @@ function mcpToItem(m, includeSecrets) {
124
190
  scope: "personal",
125
191
  source: m.source,
126
192
  workspacePath: m.workspacePath,
193
+ workspaceDir: m.workspaceDir,
127
194
  event: "upsert",
128
195
  transport: m.transport,
129
196
  url: m.url,
@@ -140,7 +207,7 @@ async function selectSkills() {
140
207
  return [];
141
208
  }
142
209
  all.sort((a, b) => {
143
- if (a.source !== b.source) return a.source === "global" ? -1 : 1;
210
+ if (a.source !== b.source) return SOURCE_ORDER[a.source] - SOURCE_ORDER[b.source];
144
211
  return a.slug.localeCompare(b.slug);
145
212
  });
146
213
  const items = all.map((s) => ({
@@ -158,11 +225,21 @@ async function selectMcps(includeSecrets) {
158
225
  process.stderr.write("No MCPs found (scanned current workspace .mcp.json / .claude/.claude.json and global ~/.claude.json)\n");
159
226
  return [];
160
227
  }
161
- all.sort((a, b) => {
162
- if (a.source !== b.source) return a.source === "global" ? -1 : 1;
228
+ const { supported, unsupportedStdio } = splitPushableMcps(all);
229
+ if (unsupportedStdio.length > 0) {
230
+ const names = unsupportedStdio.map((m) => m.slug).sort().join(", ");
231
+ process.stderr.write(`ae-cli sync push only supports http/sse MCPs; skipped stdio MCPs: ${names}
232
+ `);
233
+ }
234
+ if (supported.length === 0) {
235
+ process.stderr.write("No syncable MCPs found. ae-cli sync push only supports http/sse.\n");
236
+ return [];
237
+ }
238
+ supported.sort((a, b) => {
239
+ if (a.source !== b.source) return SOURCE_ORDER[a.source] - SOURCE_ORDER[b.source];
163
240
  return a.slug.localeCompare(b.slug);
164
241
  });
165
- const items = all.map((m) => ({
242
+ const items = supported.map((m) => ({
166
243
  value: m,
167
244
  label: m.slug,
168
245
  group: describeSource(m),
@@ -212,7 +289,7 @@ function toHttpItems(items) {
212
289
  const { kind: _kind2, dirPath: _dirPath, ...rest2 } = item;
213
290
  return rest2;
214
291
  }
215
- const { kind: _kind, ...rest } = item;
292
+ const { kind: _kind, workspaceDir: _workspaceDir, ...rest } = item;
216
293
  return rest;
217
294
  });
218
295
  }
@@ -266,6 +343,26 @@ function copySyncedSkillPackages(skillItems, resp) {
266
343
  }
267
344
  }
268
345
  }
346
+ function updateSyncedProjectMcpManifest(mcpItems, resp) {
347
+ if (mcpItems.length === 0) return;
348
+ const bySlug = new Map(mcpItems.map((item) => [item.slug, item]));
349
+ for (const result of resp.results) {
350
+ if (result.kind !== "mcp" || result.status !== "synced") continue;
351
+ const item = bySlug.get(result.slug);
352
+ if (!item || item.source !== "project") continue;
353
+ if (!item.workspaceDir) {
354
+ result.status = "failed";
355
+ result.message = "Main app synced the MCP, but local MCP manifest update failed: missing workspaceDir";
356
+ continue;
357
+ }
358
+ try {
359
+ updateMcpManifestForProjectSource(item.workspaceDir, item.slug);
360
+ } catch (err) {
361
+ result.status = "failed";
362
+ result.message = `Main app synced the MCP, but local MCP manifest update failed: ${err?.message ?? String(err)}`;
363
+ }
364
+ }
365
+ }
269
366
  async function selectDirection(optsDirection) {
270
367
  if (optsDirection === "push" || optsDirection === "pull") return optsDirection;
271
368
  if (optsDirection) {
@@ -310,6 +407,7 @@ async function runPush(kind, includeSecrets) {
310
407
  }
311
408
  if (mcpItems.length > 0) {
312
409
  const mcpResp = await pushItems("mcp", mcpItems);
410
+ updateSyncedProjectMcpManifest(mcpItems, mcpResp);
313
411
  allResults.push(...mcpResp.results);
314
412
  }
315
413
  renderResults(allResults);
@@ -333,7 +431,7 @@ async function runPull(kind) {
333
431
  });
334
432
  const skillItems = kind !== "mcp" ? await selectPullResources({
335
433
  title: "Select Skills to sync to workspace",
336
- candidates: candidates.skills ?? []
434
+ candidates: (candidates.skills ?? []).filter((candidate) => candidate.scope !== "system")
337
435
  }) : [];
338
436
  const mcpItems = kind !== "skill" ? await selectPullResources({
339
437
  title: "Select MCPs to sync to workspace",
@@ -349,8 +447,7 @@ async function runPull(kind) {
349
447
  workspacePath: workspace.name,
350
448
  kind,
351
449
  skills: skillItems.map((item) => item.id),
352
- mcp: mcpItems.map((item) => item.id),
353
- ifUnmodifiedSince: candidates.mtime
450
+ mcp: mcpItems.map((item) => item.id)
354
451
  });
355
452
  renderResults(pullResultRows(resp));
356
453
  }
@@ -4,8 +4,7 @@ import {
4
4
  patchToMainApp,
5
5
  postToMainApp,
6
6
  uploadToMainApp
7
- } from "./chunk-AD5V3ZPJ.js";
8
- import "./chunk-KAEZTSXN.js";
7
+ } from "./chunk-VJFUB3H3.js";
9
8
  import "./chunk-SRJIAOBN.js";
10
9
 
11
10
  // src/commands/te-agent/models.ts
@@ -2,11 +2,13 @@ import {
2
2
  callMcpTool,
3
3
  parseMcpResult,
4
4
  resolveMcpUrl
5
- } from "./chunk-WCHI7725.js";
5
+ } from "./chunk-GLNZSDKO.js";
6
6
  import {
7
7
  isGlobalQueryModeEnabled
8
8
  } from "./chunk-GSJGPNKK.js";
9
- import "./chunk-CAQYQA4R.js";
9
+ import "./chunk-NOO24N7W.js";
10
+ import "./chunk-U6TKB3IV.js";
11
+ import "./chunk-JM34JPCO.js";
10
12
  import "./chunk-SRJIAOBN.js";
11
13
 
12
14
  // src/commands/te-analysis/shared.ts
@@ -2,9 +2,11 @@ import {
2
2
  callMcpTool,
3
3
  parseMcpResult,
4
4
  resolveMcpUrl
5
- } from "./chunk-WCHI7725.js";
5
+ } from "./chunk-GLNZSDKO.js";
6
6
  import "./chunk-GSJGPNKK.js";
7
- import "./chunk-CAQYQA4R.js";
7
+ import "./chunk-NOO24N7W.js";
8
+ import "./chunk-U6TKB3IV.js";
9
+ import "./chunk-JM34JPCO.js";
8
10
  import "./chunk-SRJIAOBN.js";
9
11
 
10
12
  // src/commands/te-audience/shared.ts
@@ -2,9 +2,11 @@ import {
2
2
  callMcpTool,
3
3
  parseMcpResult,
4
4
  resolveMcpUrl
5
- } from "./chunk-WCHI7725.js";
5
+ } from "./chunk-GLNZSDKO.js";
6
6
  import "./chunk-GSJGPNKK.js";
7
- import "./chunk-CAQYQA4R.js";
7
+ import "./chunk-NOO24N7W.js";
8
+ import "./chunk-U6TKB3IV.js";
9
+ import "./chunk-JM34JPCO.js";
8
10
  import "./chunk-SRJIAOBN.js";
9
11
 
10
12
  // src/commands/te-common/shared.ts
@@ -3,9 +3,11 @@ import {
3
3
  parseMcpResult,
4
4
  registerMcpMappings,
5
5
  resolveMcpUrl
6
- } from "./chunk-WCHI7725.js";
6
+ } from "./chunk-GLNZSDKO.js";
7
7
  import "./chunk-GSJGPNKK.js";
8
- import "./chunk-CAQYQA4R.js";
8
+ import "./chunk-NOO24N7W.js";
9
+ import "./chunk-U6TKB3IV.js";
10
+ import "./chunk-JM34JPCO.js";
9
11
  import "./chunk-SRJIAOBN.js";
10
12
 
11
13
  // src/commands/te-community/get_channel_info.ts
@@ -3,9 +3,11 @@ import {
3
3
  parseMcpResult,
4
4
  registerMcpMappings,
5
5
  resolveMcpUrl
6
- } from "./chunk-WCHI7725.js";
6
+ } from "./chunk-GLNZSDKO.js";
7
7
  import "./chunk-GSJGPNKK.js";
8
- import "./chunk-CAQYQA4R.js";
8
+ import "./chunk-NOO24N7W.js";
9
+ import "./chunk-U6TKB3IV.js";
10
+ import "./chunk-JM34JPCO.js";
9
11
  import "./chunk-SRJIAOBN.js";
10
12
 
11
13
  // src/commands/te-dataops/datatable/list-tables-by-page.ts
@@ -1534,7 +1536,7 @@ var executeSql2 = {
1534
1536
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1535
1537
  { name: "repoCode", type: "string", required: true, desc: "Repository code" },
1536
1538
  { name: "sql", type: "string", required: true, desc: "SQL statement" },
1537
- { name: "engineType", type: "string", required: true, desc: "SQL execution engine: TASK_ENGINE_TRINO(default, suitable for interactive queries), TASK_ENGINE_STARROCKS(suitable for real-time analytics and high-concurrency queries)" },
1539
+ { name: "engineType", type: "string", required: false, default: "TASK_ENGINE_TRINO", desc: "SQL execution engine: TASK_ENGINE_TRINO(default, suitable for interactive queries), TASK_ENGINE_STARROCKS(suitable for real-time analytics and high-concurrency queries)" },
1538
1540
  { name: "confirmed", type: "boolean", required: true, desc: "Whether confirmed to execute. First call: omit or pass false for preview, then pass true to execute" }
1539
1541
  ],
1540
1542
  risk: "write",
@@ -1558,8 +1560,8 @@ var listCatalogs2 = {
1558
1560
  description: "Lists all catalogs and their schemas in the repository. Returns: catalogs(list containing catalogName and schemas sub-list). Requires repoCode (obtainable via ide_list_repos)",
1559
1561
  flags: [
1560
1562
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1561
- { name: "connType", type: "string", required: true, desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1562
- { name: "repoCode", type: "string", required: true, desc: "Repository code, defaults to te_etl if not provided" }
1563
+ { name: "connType", type: "string", required: false, default: "SPACE", desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1564
+ { name: "repoCode", type: "string", required: false, default: "te_etl", desc: "Repository code, defaults to te_etl if not provided" }
1563
1565
  ],
1564
1566
  risk: "read",
1565
1567
  execute: async (ctx) => {
@@ -1580,8 +1582,8 @@ var getSchemaInfo = {
1580
1582
  description: "Gets schema statistics, including table count and view count. Returns: tableCount, viewCount",
1581
1583
  flags: [
1582
1584
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1583
- { name: "connType", type: "string", required: true, desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1584
- { name: "repoCode", type: "string", required: true, desc: "Repository code, defaults to te_etl if not provided" },
1585
+ { name: "connType", type: "string", required: false, default: "SPACE", desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1586
+ { name: "repoCode", type: "string", required: false, default: "te_etl", desc: "Repository code, defaults to te_etl if not provided" },
1585
1587
  { name: "catalog", type: "string", required: true, desc: "Catalog name" },
1586
1588
  { name: "schema", type: "string", required: true, desc: "Schema name" }
1587
1589
  ],
@@ -1606,12 +1608,12 @@ var searchColumns = {
1606
1608
  description: "Fuzzy search column names across tables. Returns: columnName, columnType, tableName, catalogName, schemaName. Useful for finding which tables contain a specific field",
1607
1609
  flags: [
1608
1610
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1609
- { name: "repoCode", type: "string", required: true, desc: "Repository code, defaults to te_etl if not provided" },
1611
+ { name: "repoCode", type: "string", required: false, default: "te_etl", desc: "Repository code, defaults to te_etl if not provided" },
1610
1612
  { name: "searchKey", type: "string", required: true, desc: "Column name search keyword" },
1611
1613
  { name: "tables", type: "string", required: true, desc: "List of tables to search (JSON array format, each item contains catalog, schema, tableName fields)" },
1612
- { name: "engineType", type: "string", required: true, desc: "SQL execution engine: TASK_ENGINE_TRINO(default), TASK_ENGINE_STARROCKS" },
1613
- { name: "pageNum", type: "number", required: true, desc: "Page number, default 1" },
1614
- { name: "pageSize", type: "number", required: true, desc: "Page size, default 100" }
1614
+ { name: "engineType", type: "string", required: false, default: "TASK_ENGINE_TRINO", desc: "SQL execution engine: TASK_ENGINE_TRINO(default), TASK_ENGINE_STARROCKS" },
1615
+ { name: "pageNum", type: "number", required: false, default: 1, desc: "Page number, default 1" },
1616
+ { name: "pageSize", type: "number", required: false, default: 100, desc: "Page size, default 100" }
1615
1617
  ],
1616
1618
  risk: "read",
1617
1619
  execute: async (ctx) => {
@@ -1636,12 +1638,12 @@ var getTableDetail2 = {
1636
1638
  description: "Gets real-time table metadata from the data warehouse engine, including column definitions, DDL, partition information. Returns: columns(name/type/comment), ddl, partitions, rowCount, dataSize. Difference from datatable_get_table_detail: This tool directly queries real-time metadata from the data warehouse engine, datatable queries dataops platform registered information(including data lineage). Difference from integration_get_table_structure: integration queries external data source metadata",
1637
1639
  flags: [
1638
1640
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1639
- { name: "connType", type: "string", required: true, desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1640
- { name: "repoCode", type: "string", required: true, desc: "Repository code, defaults to te_etl if not provided" },
1641
+ { name: "connType", type: "string", required: false, default: "SPACE", desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1642
+ { name: "repoCode", type: "string", required: false, default: "te_etl", desc: "Repository code, defaults to te_etl if not provided" },
1641
1643
  { name: "catalog", type: "string", required: true, desc: "Catalog name" },
1642
1644
  { name: "schema", type: "string", required: true, desc: "Schema name" },
1643
1645
  { name: "tableName", type: "string", required: true, desc: "Table name" },
1644
- { name: "engineType", type: "string", required: true, desc: "SQL execution engine: TASK_ENGINE_TRINO(default), TASK_ENGINE_STARROCKS" },
1646
+ { name: "engineType", type: "string", required: false, default: "TASK_ENGINE_TRINO", desc: "SQL execution engine: TASK_ENGINE_TRINO(default), TASK_ENGINE_STARROCKS" },
1645
1647
  { name: "isView", type: "boolean", required: true, desc: "Whether it is a view, auto-detect if not provided" }
1646
1648
  ],
1647
1649
  risk: "read",
@@ -1668,11 +1670,11 @@ var generateSql = {
1668
1670
  description: "Generates SELECT SQL statement based on table name and column names. Returns: Executable SELECT SQL string. Related tools: ide_execute_sql (execute the generated SQL)",
1669
1671
  flags: [
1670
1672
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1671
- { name: "repoCode", type: "string", required: true, desc: "Repository code, defaults to te_etl if not provided" },
1673
+ { name: "repoCode", type: "string", required: false, default: "te_etl", desc: "Repository code, defaults to te_etl if not provided" },
1672
1674
  { name: "catalog", type: "string", required: true, desc: "Catalog name" },
1673
1675
  { name: "schema", type: "string", required: true, desc: "Schema name" },
1674
1676
  { name: "tableName", type: "string", required: true, desc: "Table name" },
1675
- { name: "engineType", type: "string", required: true, desc: "SQL execution engine: TASK_ENGINE_TRINO(default), TASK_ENGINE_STARROCKS" },
1677
+ { name: "engineType", type: "string", required: false, default: "TASK_ENGINE_TRINO", desc: "SQL execution engine: TASK_ENGINE_TRINO(default), TASK_ENGINE_STARROCKS" },
1676
1678
  { name: "selectColumns", type: "string", required: true, desc: "List of column names to query, queries all columns if not provided" }
1677
1679
  ],
1678
1680
  risk: "read",
@@ -1698,8 +1700,8 @@ var searchTables = {
1698
1700
  description: "Fuzzy search tables by keyword across catalog/schema. Returns: tableName, catalogName, schemaName, tableType. Difference from datatable_search_tables: This tool queries real-time metadata from the data warehouse engine, datatable queries dataops platform registered metadata(including business descriptions)",
1699
1701
  flags: [
1700
1702
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1701
- { name: "connType", type: "string", required: true, desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1702
- { name: "repoCode", type: "string", required: true, desc: "Repository code, defaults to te_etl if not provided" },
1703
+ { name: "connType", type: "string", required: false, default: "SPACE", desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1704
+ { name: "repoCode", type: "string", required: false, default: "te_etl", desc: "Repository code, defaults to te_etl if not provided" },
1703
1705
  { name: "searchKey", type: "string", required: true, desc: "Search keyword" },
1704
1706
  { name: "size", type: "number", required: true, desc: "Maximum number of results to return" }
1705
1707
  ],
@@ -1742,13 +1744,13 @@ var listTables = {
1742
1744
  description: "Paginated list of tables/views under a schema. Returns: tableName, tableType. Defaults to physical tables, set isView=true to return views",
1743
1745
  flags: [
1744
1746
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1745
- { name: "connType", type: "string", required: true, desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1746
- { name: "repoCode", type: "string", required: true, desc: "Repository code, defaults to te_etl if not provided" },
1747
+ { name: "connType", type: "string", required: false, default: "SPACE", desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1748
+ { name: "repoCode", type: "string", required: false, default: "te_etl", desc: "Repository code, defaults to te_etl if not provided" },
1747
1749
  { name: "catalog", type: "string", required: true, desc: "Catalog name" },
1748
1750
  { name: "schema", type: "string", required: true, desc: "Schema name" },
1749
- { name: "isView", type: "boolean", required: true, desc: "Whether to query views, default false returns physical tables, set true to return views" },
1750
- { name: "pageNum", type: "number", required: true, desc: "Page number, default 1" },
1751
- { name: "pageSize", type: "number", required: true, desc: "Page size, default 100" }
1751
+ { name: "isView", type: "boolean", required: false, desc: "Whether to query views, default false returns physical tables, set true to return views" },
1752
+ { name: "pageNum", type: "number", required: false, default: 1, desc: "Page number, default 1" },
1753
+ { name: "pageSize", type: "number", required: false, default: 100, desc: "Page size, default 100" }
1752
1754
  ],
1753
1755
  risk: "read",
1754
1756
  execute: async (ctx) => {
@@ -1774,8 +1776,8 @@ var getQueryResult = {
1774
1776
  description: "Gets result data details (column names + row data) for a specific query record. Returns: columns(column definitions), rows(data rows). Requires recordId (obtainable via ide_list_query_history). Note: Only queries with SUCCESS status have result data",
1775
1777
  flags: [
1776
1778
  { name: "spaceCode", type: "string", required: true, desc: "Space code" },
1777
- { name: "connType", type: "string", required: true, desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1778
- { name: "repoCode", type: "string", required: true, desc: "Repository code, defaults to te_etl if not provided" },
1779
+ { name: "connType", type: "string", required: false, default: "SPACE", desc: "Connection type: SPACE(data warehouse for daily queries, default), ETL(ETL engine for data processing), APP(app warehouse for external services)" },
1780
+ { name: "repoCode", type: "string", required: false, default: "te_etl", desc: "Repository code, defaults to te_etl if not provided" },
1779
1781
  { name: "recordId", type: "number", required: true, desc: "Query record ID (obtainable via ide_list_query_history)" }
1780
1782
  ],
1781
1783
  risk: "read",
@@ -3,9 +3,11 @@ import {
3
3
  parseMcpResult,
4
4
  registerMcpMappings,
5
5
  resolveMcpUrl
6
- } from "./chunk-WCHI7725.js";
6
+ } from "./chunk-GLNZSDKO.js";
7
7
  import "./chunk-GSJGPNKK.js";
8
- import "./chunk-CAQYQA4R.js";
8
+ import "./chunk-NOO24N7W.js";
9
+ import "./chunk-U6TKB3IV.js";
10
+ import "./chunk-JM34JPCO.js";
9
11
  import "./chunk-SRJIAOBN.js";
10
12
 
11
13
  // src/commands/te-engage/utils.ts
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  kbApi,
3
3
  kbUpload
4
- } from "./chunk-OJDNO5QY.js";
5
- import "./chunk-WCHI7725.js";
4
+ } from "./chunk-SF3KTPIC.js";
5
+ import "./chunk-GLNZSDKO.js";
6
6
  import "./chunk-GSJGPNKK.js";
7
- import "./chunk-CAQYQA4R.js";
7
+ import "./chunk-NOO24N7W.js";
8
+ import "./chunk-U6TKB3IV.js";
9
+ import "./chunk-JM34JPCO.js";
8
10
  import "./chunk-SRJIAOBN.js";
9
11
 
10
12
  // src/commands/te-kb/query.ts
@@ -2,9 +2,11 @@ import {
2
2
  callMcpTool,
3
3
  parseMcpResult,
4
4
  resolveMcpUrl
5
- } from "./chunk-WCHI7725.js";
5
+ } from "./chunk-GLNZSDKO.js";
6
6
  import "./chunk-GSJGPNKK.js";
7
- import "./chunk-CAQYQA4R.js";
7
+ import "./chunk-NOO24N7W.js";
8
+ import "./chunk-U6TKB3IV.js";
9
+ import "./chunk-JM34JPCO.js";
8
10
  import "./chunk-SRJIAOBN.js";
9
11
 
10
12
  // src/commands/te-meta/shared.ts
@@ -1,13 +1,16 @@
1
1
  import {
2
+ getAuthHeaders,
2
3
  kbApi
3
- } from "./chunk-OJDNO5QY.js";
4
+ } from "./chunk-SF3KTPIC.js";
4
5
  import {
5
6
  printError,
6
7
  printOutput
7
8
  } from "./chunk-CLJF7MQA.js";
8
- import "./chunk-WCHI7725.js";
9
+ import "./chunk-GLNZSDKO.js";
9
10
  import "./chunk-GSJGPNKK.js";
10
- import "./chunk-CAQYQA4R.js";
11
+ import "./chunk-NOO24N7W.js";
12
+ import "./chunk-U6TKB3IV.js";
13
+ import "./chunk-JM34JPCO.js";
11
14
  import "./chunk-SRJIAOBN.js";
12
15
 
13
16
  // src/commands/te-team/shared.ts
@@ -176,17 +179,19 @@ var listTemplates = {
176
179
  };
177
180
 
178
181
  // src/commands/te-team/team/list-projects.ts
179
- var OAUTH_CHECK_PATH = `${API_PREFIX}/api/oauth/check`;
182
+ var OAUTH_CHECK_PATH = "/agent/api/external/team/oauth/check";
180
183
  var listProjects = {
181
184
  service: "team",
182
185
  command: "+list-projects",
183
186
  description: "List all projects available to the current user (from /api/oauth/check).",
184
187
  flags: [],
185
188
  risk: "read",
186
- dryRun: (ctx) => ({ method: "POST", url: `${ctx.host().replace(/\/$/, "")}${OAUTH_CHECK_PATH}` }),
189
+ dryRun: (ctx) => ({
190
+ method: "POST",
191
+ url: `${ctx.host().replace(/\/$/, "")}${OAUTH_CHECK_PATH}`
192
+ }),
187
193
  execute: async (ctx) => {
188
- const accessToken = await ctx.token();
189
- const data = await kbApi(ctx, "POST", OAUTH_CHECK_PATH, {}, { accessToken });
194
+ const data = await kbApi(ctx, "POST", OAUTH_CHECK_PATH, {});
190
195
  return data?.projectInfoList ?? data;
191
196
  }
192
197
  };
@@ -393,7 +398,7 @@ var watchRun = {
393
398
  execute: async (ctx) => {
394
399
  const runId = ctx.str("id");
395
400
  const quiet = ctx.bool("quiet");
396
- const token = await ctx.token();
401
+ const authHeaders = await getAuthHeaders(ctx);
397
402
  const host = ctx.host().replace(/\/$/, "");
398
403
  let lastLogTs = ctx.num("after-log") || void 0;
399
404
  let reconnects = 0;
@@ -404,7 +409,7 @@ var watchRun = {
404
409
  try {
405
410
  resp = await fetch(url.toString(), {
406
411
  headers: {
407
- Authorization: `bearer ${token}`,
412
+ ...authHeaders,
408
413
  Accept: "text/event-stream",
409
414
  "Cache-Control": "no-cache"
410
415
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkingai/ae-cli",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "CLI tool for ThinkingAI (AE) analytics platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -128,7 +128,7 @@ ae-cli agent +toggle-model --id <model-cuid> --enabled false
128
128
  ## Notes
129
129
 
130
130
  - Only `personal` scope resources can be created or deleted via CLI.
131
- - MCP creation automatically validates server connectivity.
131
+ - MCP creation does NOT validate server connectivity — an unreachable URL is accepted at create time and only fails when the agent actually calls the MCP at runtime. Double-check the URL.
132
132
  - Attachment upload supports files up to 50MB each, with a 1GB user quota.
133
133
  - Batch attachment uploads support partial success — individual file failures don't affect others.
134
134
  - Skill `--instructions @-` reads from stdin, useful for piping long instruction text.