@thinkingai/ae-cli 6.1.28 → 6.1.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 (117) hide show
  1. package/README.md +24 -4
  2. package/README.zh.md +24 -4
  3. package/bin/ae-cli.js +5 -0
  4. package/bin/runtime-capabilities.json +5 -0
  5. package/cli-installation-guide.md +24 -3
  6. package/dist/{auth-NKD5Z5BQ.js → auth-ADZHUIJR.js} +30 -12
  7. package/dist/{automation-K32V2NKP.js → automation-FD2QZUP6.js} +6 -6
  8. package/dist/{capability-4CGSL7PK.js → capability-QXFRJYZD.js} +54 -26
  9. package/dist/{chunk-P6VFCH3P.js → chunk-2F64AZYH.js} +2 -2
  10. package/dist/{chunk-LMCYSVVA.js → chunk-4PSTYEG5.js} +50 -41
  11. package/dist/{chunk-KHS64JZQ.js → chunk-72NJKS7O.js} +4 -4
  12. package/dist/chunk-AVXDJAFC.js +132 -0
  13. package/dist/{chunk-GI5BMEZO.js → chunk-AWVZTN2B.js} +1 -1
  14. package/dist/chunk-CG773QXN.js +2289 -0
  15. package/dist/{chunk-UUD5RB36.js → chunk-E25OSZLJ.js} +3 -3
  16. package/dist/{chunk-UF244C5C.js → chunk-EUFP4M2A.js} +7 -7
  17. package/dist/{chunk-QW3R6O7L.js → chunk-HRUOV6EQ.js} +57 -15
  18. package/dist/{chunk-T44M3PLZ.js → chunk-JEUXDY3B.js} +1 -1
  19. package/dist/{chunk-2UWS5CUP.js → chunk-JSBLCLFE.js} +3 -3
  20. package/dist/{chunk-QSAR3GHY.js → chunk-OAWPT7VP.js} +2 -2
  21. package/dist/{chunk-2IYIYSUO.js → chunk-QVRIDN42.js} +2 -2
  22. package/dist/{chunk-P7KL7IOH.js → chunk-SOSFRU3O.js} +2 -2
  23. package/dist/{chunk-GTPWDLTE.js → chunk-TFORY6WY.js} +35 -14
  24. package/dist/{chunk-JJJIP2XQ.js → chunk-VDICGXCY.js} +2 -2
  25. package/dist/{chunk-UJ7UPRXK.js → chunk-Y3AM6LIO.js} +10 -8
  26. package/dist/chunk-YULUBP3R.js +222 -0
  27. package/dist/{chunk-X7DRLE62.js → chunk-YVG6QD3V.js} +1 -1
  28. package/dist/{chunk-ZW4VMY5H.js → chunk-Z3Q2AEIN.js} +152 -98
  29. package/dist/{community-report-client-S2K3A3Q6.js → community-report-client-TJVCLZ3K.js} +1 -1
  30. package/dist/compat-check-HERBTQZN.js +32 -0
  31. package/dist/{config-ASSAAIOI.js → config-E3KANXMK.js} +38 -6
  32. package/dist/{context-6RWLVOM5.js → context-CDB5H5PD.js} +4 -4
  33. package/dist/{data-integration-EXSUPUDZ.js → data-integration-QE37EQ3A.js} +207 -24
  34. package/dist/{evaluation-5YT4QLCL.js → evaluation-LR4YDYWL.js} +4 -4
  35. package/dist/index.js +297 -70
  36. package/dist/{local-data-upload-client-7HCPGIS3.js → local-data-upload-client-KCMG6J62.js} +1 -1
  37. package/dist/{memory-VCYLVPMI.js → memory-SNFR5M23.js} +6 -6
  38. package/dist/{metadata-YGI5M6OF.js → metadata-EXQYDZTH.js} +16 -8
  39. package/dist/{model-DPJHSD73.js → model-KEVCEXWD.js} +4 -4
  40. package/dist/{personal-semantic-preference-76TBKAPY.js → personal-semantic-preference-ETY3KU2O.js} +7 -6
  41. package/dist/{project-semantic-XOEBO2Q5.js → project-semantic-UHRMVOJF.js} +11 -10
  42. package/dist/{sync-7PP6KQ75.js → sync-XKEBXESC.js} +8 -7
  43. package/dist/{te-agent-PJVAPKBD.js → te-agent-S6UQR4IE.js} +11 -7
  44. package/dist/{te-analysis-OX62G5VD.js → te-analysis-WOFFCIBC.js} +185 -33
  45. package/dist/{te-community-QN3WMPNT.js → te-community-R7B6QYOO.js} +720 -228
  46. package/dist/{te-dataops-UKD2XN3E.js → te-dataops-KPILYVHA.js} +6 -5
  47. package/dist/{te-engage-X3DIXPRA.js → te-engage-IAUM6ONX.js} +13 -12
  48. package/dist/{te-experiment-MEIIK3DP.js → te-experiment-TMLRA7B3.js} +55 -21
  49. package/dist/{te-kb-73EWDFDF.js → te-kb-GKWPSLSY.js} +409 -85
  50. package/dist/{te-system-IE7NCKC3.js → te-system-CYWSK3UN.js} +6 -6
  51. package/dist/{te-team-MGQ5CNRW.js → te-team-ISN52YNG.js} +7 -6
  52. package/dist/{things-4JIBCA55.js → things-DDQ52Z3Q.js} +7 -7
  53. package/dist/{update-AX66IFMJ.js → update-CTLNTX35.js} +11 -7
  54. package/dist/{workspace-Q5NMEKEN.js → workspace-2CKQX2XL.js} +6 -6
  55. package/package.json +17 -7
  56. package/skills/ae-agent/references/resource-package.md +4 -0
  57. package/skills/ae-analysis/SKILL.md +14 -10
  58. package/skills/ae-analysis/references/agent_review_preflight.md +52 -11
  59. package/skills/ae-analysis/references/agent_review_priorities_comparisons.md +5 -3
  60. package/skills/ae-analysis/references/agent_review_submit_to_page.md +57 -25
  61. package/skills/ae-analysis/references/command_index.md +7 -3
  62. package/skills/ae-analysis/references/governance_recommendation_export.md +31 -17
  63. package/skills/ae-analysis/references/governance_recommendation_run_update.md +13 -0
  64. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +9 -1
  65. package/skills/ae-analysis/references/scenario_append.md +6 -0
  66. package/skills/ae-analysis/references/scenario_begin.md +11 -0
  67. package/skills/ae-analysis/references/scenario_collect.md +10 -2
  68. package/skills/ae-analysis/references/scenario_evaluation.md +6 -18
  69. package/skills/ae-analysis/references/scenario_get.md +15 -0
  70. package/skills/ae-analysis/references/scenario_list.md +64 -0
  71. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +14 -1
  72. package/skills/ae-community/SKILL.md +77 -27
  73. package/skills/ae-community/references/community-analyzing-theme-comment.md +10 -8
  74. package/skills/ae-community/references/community-data-quality.md +68 -0
  75. package/skills/ae-community/references/community-query-evidence.md +85 -0
  76. package/skills/ae-community/references/community-scenario-capabilities.md +137 -0
  77. package/skills/ae-community/references/community-weekly-report.md +6 -3
  78. package/skills/ae-community/references/get_channel_info.md +7 -4
  79. package/skills/ae-community/references/get_comment_tag_analysis.md +3 -3
  80. package/skills/ae-community/references/get_comments_summary.md +4 -4
  81. package/skills/ae-community/references/get_corpus_tags.md +3 -3
  82. package/skills/ae-community/references/get_daily_summary.md +3 -3
  83. package/skills/ae-community/references/get_hot_topics.md +3 -3
  84. package/skills/ae-community/references/get_livestream_analysis.md +3 -3
  85. package/skills/ae-community/references/get_livestream_detail.md +4 -4
  86. package/skills/ae-community/references/get_livestream_list.md +3 -3
  87. package/skills/ae-community/references/get_livestream_overview.md +3 -3
  88. package/skills/ae-community/references/get_livestream_room_metrics.md +3 -3
  89. package/skills/ae-community/references/get_livestream_rooms.md +3 -3
  90. package/skills/ae-community/references/get_overview_metrics.md +3 -3
  91. package/skills/ae-community/references/get_post_detail.md +4 -4
  92. package/skills/ae-community/references/get_risk_content.md +5 -5
  93. package/skills/ae-community/references/get_sentiment_overview.md +4 -4
  94. package/skills/ae-community/references/get_tag_trends.md +3 -3
  95. package/skills/ae-community/references/get_topic_detail.md +3 -3
  96. package/skills/ae-community/references/list_sources.md +28 -0
  97. package/skills/ae-community/references/list_spaces.md +39 -0
  98. package/skills/ae-community/references/search_posts.md +21 -7
  99. package/skills/ae-data-integration/SKILL.md +6 -4
  100. package/skills/ae-data-integration/references/error-handling.md +1 -0
  101. package/skills/ae-data-integration/references/handoff.md +1 -1
  102. package/skills/ae-data-integration/references/sink-upload.md +11 -0
  103. package/skills/ae-data-integration/references/source-inspect.md +2 -1
  104. package/skills/ae-data-integration/references/transform.md +1 -1
  105. package/skills/ae-data-integration/references/ue-mapping.md +1 -1
  106. package/skills/ae-experiment/SKILL.md +7 -1
  107. package/skills/ae-experiment/references/manage_experiment.md +18 -1
  108. package/skills/ae-experiment/references/query_experiment_detail.md +7 -0
  109. package/skills/ae-experiment/references/save_experiment.md +76 -2
  110. package/skills/ae-experiment/references/save_submit_experiment.md +7 -0
  111. package/skills/ae-kb/SKILL.md +37 -8
  112. package/skills/ae-kb/references/publication.md +81 -0
  113. package/skills/ae-kb/references/query-workflow.md +20 -6
  114. package/skills/ae-kb-discovery/SKILL.md +15 -6
  115. package/skills/ae-metadata/SKILL.md +2 -2
  116. package/skills/ae-metadata/references/metadata_data_table_get.md +35 -0
  117. package/dist/chunk-ELCR235M.js +0 -1429
@@ -3,7 +3,43 @@ import {
3
3
  logger,
4
4
  normalizeUrl,
5
5
  readExternalCliToken
6
- } from "./chunk-ZW4VMY5H.js";
6
+ } from "./chunk-Z3Q2AEIN.js";
7
+
8
+ // src/core/sandbox-runtime.ts
9
+ import { homedir } from "os";
10
+ import { join } from "path";
11
+ import fs from "fs";
12
+ var LINUX_SANDBOX_RUNTIME_ROOT = "/home/ta/te_agent_ta";
13
+ function getDefaultSandboxRuntimeRoot() {
14
+ if (process.platform === "linux") {
15
+ return LINUX_SANDBOX_RUNTIME_ROOT;
16
+ }
17
+ return homedir();
18
+ }
19
+ function getSandboxRuntimeRoot() {
20
+ return process.env.SANDBOX_RUNTIME_ROOT || getDefaultSandboxRuntimeRoot();
21
+ }
22
+ function getSandboxAeConfigDir() {
23
+ return join(getSandboxRuntimeRoot(), ".ae-config");
24
+ }
25
+ function getSandboxCliTokenFilePath() {
26
+ return join(getSandboxAeConfigDir(), "cli-token.json");
27
+ }
28
+ function isAeSandboxRuntime() {
29
+ if (process.env.SANDBOX_RUNTIME_ROOT) {
30
+ return true;
31
+ }
32
+ if (process.platform !== "linux") {
33
+ return false;
34
+ }
35
+ try {
36
+ if (fs.existsSync(getSandboxCliTokenFilePath())) {
37
+ return true;
38
+ }
39
+ } catch {
40
+ }
41
+ return false;
42
+ }
7
43
 
8
44
  // src/core/config.ts
9
45
  import fs3 from "fs";
@@ -11,28 +47,29 @@ import path from "path";
11
47
  import os from "os";
12
48
 
13
49
  // src/core/json-utils.ts
14
- import fs from "fs";
50
+ import fs2 from "fs";
15
51
  import { createRequire } from "module";
16
52
  var require2 = createRequire(import.meta.url);
17
53
  var JSONbig = require2("json-bigint");
18
54
  var jsonParser = JSONbig({ storeAsString: true });
55
+ var requestJsonStringifier = JSONbig({ useNativeBigInt: true });
19
56
  var INTEGER_TOKEN = /^-?(?:0|[1-9]\d*)$/;
20
- function normalizeParsedNumbers(lossless, native) {
57
+ function normalizeParsedNumbers(lossless, native, useBigInt = false) {
21
58
  if (typeof lossless === "string" && typeof native === "number") {
22
59
  if (INTEGER_TOKEN.test(lossless) && !Number.isSafeInteger(native)) {
23
- return lossless;
60
+ return useBigInt ? BigInt(lossless) : lossless;
24
61
  }
25
62
  return native;
26
63
  }
27
64
  if (Array.isArray(lossless) && Array.isArray(native)) {
28
65
  for (let index = 0; index < lossless.length; index++) {
29
- lossless[index] = normalizeParsedNumbers(lossless[index], native[index]);
66
+ lossless[index] = normalizeParsedNumbers(lossless[index], native[index], useBigInt);
30
67
  }
31
68
  return lossless;
32
69
  }
33
70
  if (lossless !== null && native !== null && typeof lossless === "object" && typeof native === "object") {
34
71
  for (const key of Object.keys(lossless)) {
35
- lossless[key] = normalizeParsedNumbers(lossless[key], native[key]);
72
+ lossless[key] = normalizeParsedNumbers(lossless[key], native[key], useBigInt);
36
73
  }
37
74
  }
38
75
  return lossless;
@@ -42,44 +79,14 @@ function safeJsonParse(text) {
42
79
  return normalizeParsedNumbers(lossless, JSON.parse(text));
43
80
  }
44
81
  function safeReadJsonFile(filePath) {
45
- const content = fs.readFileSync(filePath, "utf-8");
82
+ const content = fs2.readFileSync(filePath, "utf-8");
46
83
  return safeJsonParse(content);
47
84
  }
48
-
49
- // src/core/sandbox-runtime.ts
50
- import { homedir } from "os";
51
- import { join } from "path";
52
- import fs2 from "fs";
53
- var LINUX_SANDBOX_RUNTIME_ROOT = "/home/ta/te_agent_ta";
54
- function getDefaultSandboxRuntimeRoot() {
55
- if (process.platform === "linux") {
56
- return LINUX_SANDBOX_RUNTIME_ROOT;
57
- }
58
- return homedir();
59
- }
60
- function getSandboxRuntimeRoot() {
61
- return process.env.SANDBOX_RUNTIME_ROOT || getDefaultSandboxRuntimeRoot();
85
+ function stringifyJsonRequest(obj) {
86
+ return requestJsonStringifier.stringify(obj);
62
87
  }
63
- function getSandboxAeConfigDir() {
64
- return join(getSandboxRuntimeRoot(), ".ae-config");
65
- }
66
- function getSandboxCliTokenFilePath() {
67
- return join(getSandboxAeConfigDir(), "cli-token.json");
68
- }
69
- function isAeSandboxRuntime() {
70
- if (process.env.SANDBOX_RUNTIME_ROOT) {
71
- return true;
72
- }
73
- if (process.platform !== "linux") {
74
- return false;
75
- }
76
- try {
77
- if (fs2.existsSync(getSandboxCliTokenFilePath())) {
78
- return true;
79
- }
80
- } catch {
81
- }
82
- return false;
88
+ function parseJsonRequest(text) {
89
+ return normalizeParsedNumbers(jsonParser.parse(text), JSON.parse(text), true);
83
90
  }
84
91
 
85
92
  // src/core/config.ts
@@ -280,6 +287,8 @@ function getConfigDir() {
280
287
  export {
281
288
  safeJsonParse,
282
289
  safeReadJsonFile,
290
+ stringifyJsonRequest,
291
+ parseJsonRequest,
283
292
  getSandboxRuntimeRoot,
284
293
  isAeSandboxRuntime,
285
294
  readSandboxCliTokenEntry,
@@ -1,20 +1,20 @@
1
1
  import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  require_lib
4
- } from "./chunk-2IYIYSUO.js";
4
+ } from "./chunk-QVRIDN42.js";
5
5
  import {
6
6
  require_archiver,
7
7
  require_string_decoder
8
- } from "./chunk-QSAR3GHY.js";
8
+ } from "./chunk-OAWPT7VP.js";
9
9
  import {
10
10
  require_inherits,
11
11
  require_node
12
- } from "./chunk-T44M3PLZ.js";
12
+ } from "./chunk-JEUXDY3B.js";
13
13
  import {
14
14
  __commonJS,
15
15
  __require,
16
16
  __toESM
17
- } from "./chunk-ZW4VMY5H.js";
17
+ } from "./chunk-Z3Q2AEIN.js";
18
18
 
19
19
  // node_modules/exceljs/lib/utils/under-dash.js
20
20
  var require_under_dash = __commonJS({
@@ -0,0 +1,132 @@
1
+ import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
2
+ import {
3
+ canManageGlobalSkills,
4
+ fetchCliConfig,
5
+ getLocalCliPackageInfo,
6
+ isBusinessSkillContextCurrent,
7
+ rememberBusinessConfig,
8
+ reserveBusinessSkillContext,
9
+ syncBusinessSkills
10
+ } from "./chunk-CG773QXN.js";
11
+ import {
12
+ peekCliToken
13
+ } from "./chunk-SOSFRU3O.js";
14
+ import {
15
+ getActiveHost,
16
+ getConfigDir
17
+ } from "./chunk-4PSTYEG5.js";
18
+ import {
19
+ normalizeUrl
20
+ } from "./chunk-Z3Q2AEIN.js";
21
+
22
+ // src/core/environment-refresh.ts
23
+ import crypto from "crypto";
24
+ import fs from "fs";
25
+ import path from "path";
26
+ function cliTokenFingerprint(token) {
27
+ return crypto.createHash("sha256").update(token).digest("hex");
28
+ }
29
+ function invalidateBusinessSkillSynchronization() {
30
+ if (canManageGlobalSkills()) reserveBusinessSkillContext({});
31
+ }
32
+ async function refreshEnvironmentConfig(host, options = {}) {
33
+ const normalized = normalizeUrl(host);
34
+ const skipped = (reason) => ({
35
+ host: normalized,
36
+ businesses: {},
37
+ source: "unavailable",
38
+ skills: { status: "skipped", reason }
39
+ });
40
+ let token;
41
+ try {
42
+ token = peekCliToken(normalized);
43
+ } catch {
44
+ return skipped("Credentials could not be read. Sign in before refreshing Skills.");
45
+ }
46
+ if (!token) return skipped("Sign in to this environment before refreshing its business configuration.");
47
+ const fingerprint = cliTokenFingerprint(token);
48
+ const localActiveEnvironment = () => {
49
+ try {
50
+ return canManageGlobalSkills() && normalizeUrl(getActiveHost()) === normalized && cliTokenFingerprint(peekCliToken(normalized) ?? "") === fingerprint;
51
+ } catch {
52
+ return false;
53
+ }
54
+ };
55
+ const synchronize = options.synchronizeSkills !== false && localActiveEnvironment();
56
+ const generation = synchronize ? reserveBusinessSkillContext({ host: normalized, tokenFingerprint: fingerprint }) : void 0;
57
+ let config;
58
+ try {
59
+ config = await (options.fetchConfig ?? fetchCliConfig)(normalized, token);
60
+ } catch {
61
+ config = null;
62
+ }
63
+ if (!config) return skipped("CLI configuration is unavailable; existing Skills were preserved.");
64
+ if (generation && !isBusinessSkillContextCurrent({
65
+ host: normalized,
66
+ tokenFingerprint: fingerprint,
67
+ generation,
68
+ isCurrentContext: localActiveEnvironment
69
+ })) {
70
+ return {
71
+ host: normalized,
72
+ businesses: {},
73
+ source: "remote",
74
+ skills: { status: "skipped", reason: "A newer environment refresh superseded this response." }
75
+ };
76
+ }
77
+ rememberBusinessConfig(normalized, token, config.businesses);
78
+ const result = {
79
+ host: normalized,
80
+ businesses: config.businesses ?? {},
81
+ source: "remote",
82
+ skills: { status: "skipped", reason: "Only an explicitly refreshed active local environment changes global Skills." }
83
+ };
84
+ if (config.businesses === void 0) {
85
+ result.skills = { status: "skipped", reason: "This server does not provide business states; existing Skills were preserved." };
86
+ return result;
87
+ }
88
+ if (!synchronize || !localActiveEnvironment()) return result;
89
+ try {
90
+ const syncOptions = {
91
+ skillsDirectory: path.join(getLocalCliPackageInfo().root, "skills"),
92
+ host: normalized,
93
+ tokenFingerprint: fingerprint,
94
+ businesses: config.businesses,
95
+ packageVersion: getLocalCliPackageInfo().version,
96
+ generation,
97
+ isCurrentContext: localActiveEnvironment
98
+ };
99
+ if (!fs.existsSync(path.join(getConfigDir(), "business-skills.json"))) {
100
+ const adoption = syncBusinessSkills({ ...syncOptions, mode: "adopt" });
101
+ if (["failed", "busy", "stale"].includes(adoption.status)) {
102
+ result.skills = adoption;
103
+ return result;
104
+ }
105
+ }
106
+ result.skills = syncBusinessSkills(syncOptions);
107
+ } catch {
108
+ result.skills = { status: "failed", reason: "Skill synchronization could not complete. Retry: ae-cli config refresh" };
109
+ }
110
+ return result;
111
+ }
112
+ async function refreshEnvironmentAfterLogin(host) {
113
+ try {
114
+ const result = await refreshEnvironmentConfig(host);
115
+ if (!["success", "skipped"].includes(result.skills.status)) {
116
+ process.stderr.write("[ae-cli] Some Skills could not be synchronized. Run: ae-cli config refresh\n");
117
+ }
118
+ if (result.source === "unavailable") {
119
+ process.stderr.write("[ae-cli] Business configuration could not be refreshed. Sign in if needed, then run: ae-cli config refresh\n");
120
+ }
121
+ return result;
122
+ } catch {
123
+ process.stderr.write("[ae-cli] Business configuration could not be refreshed. Retry: ae-cli config refresh\n");
124
+ return void 0;
125
+ }
126
+ }
127
+
128
+ export {
129
+ invalidateBusinessSkillSynchronization,
130
+ refreshEnvironmentConfig,
131
+ refreshEnvironmentAfterLogin
132
+ };
@@ -3,7 +3,7 @@ import {
3
3
  getAgentApi,
4
4
  patchAgentApi,
5
5
  postAgentApi
6
- } from "./chunk-JJJIP2XQ.js";
6
+ } from "./chunk-VDICGXCY.js";
7
7
 
8
8
  // src/commands/memory/cli-client.ts
9
9
  var DEFAULT_TE_CLAUDE_BASE_PATH = "/agent";