@thinkingai/ae-cli 6.1.18 → 6.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +2 -0
  2. package/README.zh.md +6 -0
  3. package/dist/{auth-ROB2EDYV.js → auth-QPEVVBKT.js} +13 -7
  4. package/dist/auth-UMJAA72O.js +15 -0
  5. package/dist/{capability-DKMYUTLC.js → capability-ASI62I4A.js} +11 -10
  6. package/dist/{chunk-UW5UN47B.js → chunk-533JK3YX.js} +2 -0
  7. package/dist/{chunk-4XXOWOTA.js → chunk-6QK7SYYY.js} +5 -4
  8. package/dist/{chunk-TUKQZTMI.js → chunk-7K24F7T2.js} +2 -0
  9. package/dist/{chunk-OO6XR6LK.js → chunk-AMBFK2K3.js} +2 -0
  10. package/dist/{sync-HKIOZXQE.js → chunk-B5HMQAOM.js} +31 -540
  11. package/dist/{chunk-Y3LOALAV.js → chunk-DKEXH6Q5.js} +4 -3
  12. package/dist/{chunk-VTWMIC5L.js → chunk-E2JKXMVO.js} +2 -0
  13. package/dist/{chunk-JHENBQ5B.js → chunk-FR2EDAQM.js} +1 -0
  14. package/dist/{chunk-ZQ47LWTI.js → chunk-GJXRF7Y6.js} +6 -5
  15. package/dist/{chunk-DWO43OIB.js → chunk-JQ3ENZZH.js} +2 -0
  16. package/dist/chunk-JYMGHGCE.js +191 -0
  17. package/dist/{chunk-BYYS3ANB.js → chunk-KEWVSO64.js} +5 -4
  18. package/dist/{chunk-3FY3RJ26.js → chunk-KZ6ZHF5J.js} +2 -1
  19. package/dist/{chunk-ZQKDZXDO.js → chunk-O6K2ODUE.js} +3 -2
  20. package/dist/chunk-QL6R6TSK.js +25215 -0
  21. package/dist/{chunk-J2DEBMRF.js → chunk-RWXIXOZG.js} +22 -9
  22. package/dist/{chunk-QZ3AS4KK.js → chunk-S5PONFBM.js} +5 -4
  23. package/dist/{chunk-4NN5IWVN.js → chunk-T6OSFQZD.js} +2 -0
  24. package/dist/{chunk-3KWQYGYI.js → chunk-TKHSULJT.js} +2 -0
  25. package/dist/{chunk-6EIJSNBD.js → chunk-Y74WTIKJ.js} +2 -0
  26. package/dist/{client-L2YDMHQ6.js → client-N7NGZUNI.js} +4 -3
  27. package/dist/{community-report-client-C7WDGET3.js → community-report-client-6OL6GBQW.js} +3 -2
  28. package/dist/{config-BMYZX2UE.js → config-XNMACCKX.js} +8 -7
  29. package/dist/{data-integration-QEKDWQDY.js → data-integration-4NZGZ45E.js} +913 -92
  30. package/dist/index.js +38 -36
  31. package/dist/{local-data-upload-client-4YYHSYD6.js → local-data-upload-client-EFHDLXFG.js} +3 -2
  32. package/dist/{memory-I2WXDTV2.js → memory-HBJQ2GC5.js} +8 -7
  33. package/dist/{metadata-I4C2EWUN.js → metadata-62EWBEIG.js} +12 -11
  34. package/dist/{model-HLHIEFMU.js → model-BHLJ2QMT.js} +10 -9
  35. package/dist/{personal-semantic-preference-LIPACBDX.js → personal-semantic-preference-JBVMAI7L.js} +11 -10
  36. package/dist/{project-semantic-RT3R2VQD.js → project-semantic-BQ4MPUS5.js} +12 -11
  37. package/dist/sync-MUWPRM5I.js +522 -0
  38. package/dist/{te-agent-BR6VDBNX.js → te-agent-WQZTMEK4.js} +10 -9
  39. package/dist/{te-analysis-7VUNUYWZ.js → te-analysis-MNCG65LU.js} +107 -20
  40. package/dist/{te-community-5DMNKJWY.js → te-community-BNE6KREL.js} +8 -7
  41. package/dist/{te-dataops-6P5IKWNJ.js → te-dataops-TXLKM2W6.js} +467 -67
  42. package/dist/{te-engage-KZPR5R22.js → te-engage-TPKLRVTL.js} +84 -10
  43. package/dist/{te-experiment-6BITX4RD.js → te-experiment-6BYKTCY7.js} +85 -12
  44. package/dist/{te-kb-RCLSSH2Q.js → te-kb-BUD6N3NI.js} +311 -24
  45. package/dist/{te-system-FXITO2JG.js → te-system-44LZJDTQ.js} +573 -37
  46. package/dist/{te-team-ADOC2ROP.js → te-team-XMP47YXE.js} +10 -7
  47. package/dist/{update-YCYCKJOO.js → update-UODFOZ4P.js} +7 -6
  48. package/package.json +18 -9
  49. package/skills/ae-analysis/references/analysis_gateway_assets.md +1 -1
  50. package/skills/ae-analysis/references/audience_models.md +18 -0
  51. package/skills/ae-analysis/references/command_index.md +2 -2
  52. package/skills/ae-analysis/references/project_timezone_update.md +13 -4
  53. package/skills/ae-analysis/references/property_create.md +2 -0
  54. package/skills/ae-analysis/references/super_metadata_batch_create.md +2 -0
  55. package/skills/ae-analysis/references/user_cluster_models.md +2 -0
  56. package/skills/ae-analysis/references/user_cluster_update.md +8 -4
  57. package/skills/ae-analysis/references/user_tag_create.md +7 -1
  58. package/skills/ae-analysis/references/user_tag_models.md +8 -2
  59. package/skills/ae-data-integration/SKILL.md +1 -0
  60. package/skills/ae-data-integration/references/error-handling.md +54 -1
  61. package/skills/ae-data-integration/references/source-inspect.md +18 -2
  62. package/skills/ae-data-integration/references/transform.md +3 -1
  63. package/skills/ae-data-integration/references/ue-routing.md +23 -0
  64. package/skills/ae-dataops/SKILL.md +11 -1
  65. package/skills/ae-dataops/references/dataops-backfill.md +135 -0
  66. package/skills/ae-engage/SKILL.md +5 -0
  67. package/skills/ae-engage/references/build-task-save-guide.md +5 -1
  68. package/skills/ae-engage/references/save-flow.md +37 -1
  69. package/skills/ae-engage/references/save-task.md +6 -0
  70. package/skills/ae-experiment/SKILL.md +6 -2
  71. package/skills/ae-experiment/references/save_metric.md +20 -8
  72. package/skills/ae-kb/SKILL.md +120 -9
  73. package/skills/ae-system/SKILL.md +28 -30
  74. package/skills/ae-system/references/channel-management.md +303 -0
  75. package/dist/auth-GBMV6TEJ.js +0 -14
  76. package/dist/capability-HYVVPG25.js +0 -352
  77. package/dist/chunk-EFH4XWYC.js +0 -556
  78. package/dist/chunk-JRJY5DMJ.js +0 -71
  79. package/dist/chunk-OMPRXM3V.js +0 -349
  80. package/dist/chunk-QNOLN2LJ.js +0 -509
  81. package/dist/chunk-RJDU7NYP.js +0 -1198
  82. package/dist/chunk-RNAALWJK.js +0 -98
  83. package/dist/chunk-SERWF6G5.js +0 -13
  84. package/dist/memory-3ORCR7JH.js +0 -893
  85. package/dist/metadata-VUOQJE26.js +0 -339
  86. package/dist/model-UGRDX4MW.js +0 -139
  87. package/dist/personal-semantic-preference-OEISBRHM.js +0 -239
  88. package/dist/project-semantic-FFPWFPIW.js +0 -1114
  89. package/dist/sync-TFHU2UTG.js +0 -10261
  90. package/dist/te-agent-VLYOV7S4.js +0 -3894
  91. package/dist/te-analysis-4YGQL5RC.js +0 -9357
  92. package/dist/te-community-ISDQWJU7.js +0 -1859
  93. package/dist/te-dataops-CVULXNVB.js +0 -2209
  94. package/dist/te-engage-N5WI32H6.js +0 -4898
  95. package/dist/te-experiment-UVR4HLND.js +0 -988
  96. package/dist/te-system-K2GYMCTB.js +0 -2213
@@ -1,98 +0,0 @@
1
- import {
2
- getCliToken
3
- } from "./chunk-J2DEBMRF.js";
4
- import {
5
- safeJsonParse
6
- } from "./chunk-3FY3RJ26.js";
7
- import {
8
- PermissionError
9
- } from "./chunk-UW5UN47B.js";
10
-
11
- // src/core/mcp-access.ts
12
- function buildUrl(host, path, params = {}) {
13
- const base = host.replace(/\/$/, "");
14
- const p = path.startsWith("/") ? path : `/${path}`;
15
- const url = new URL(`${base}${p}`);
16
- for (const [key, value] of Object.entries(params)) {
17
- if (value !== void 0 && value !== null) {
18
- url.searchParams.set(key, String(value));
19
- }
20
- }
21
- return url.toString();
22
- }
23
- function parseKbResponse(resp, text) {
24
- if (resp.status === 403) {
25
- let msg = "Permission denied for this resource (HTTP 403)";
26
- try {
27
- const d = safeJsonParse(text);
28
- const m = d && (typeof d.error === "string" ? d.error : d.error?.message || d.message);
29
- if (m && typeof m === "string") msg = m;
30
- } catch {
31
- }
32
- throw new PermissionError(msg);
33
- }
34
- if (resp.status === 401) {
35
- throw new Error(
36
- `KB API token auth failed: HTTP ${resp.status} ${resp.statusText}`
37
- );
38
- }
39
- const data = safeJsonParse(text);
40
- if (data.return_code === -1001) {
41
- throw new Error(
42
- `KB API token auth failed: ${data.return_message || "unauthorized"} (code: ${data.return_code})`
43
- );
44
- }
45
- if (data.return_code !== 0 && data.return_code !== void 0) {
46
- throw new Error(
47
- `AE API error: ${data.return_message || "unknown"} (code: ${data.return_code})`
48
- );
49
- }
50
- if (data && typeof data === "object" && typeof data.error === "string" && data.error.trim() && data.return_code === void 0 && data.success === void 0) {
51
- throw new Error(data.error);
52
- }
53
- return data.data !== void 0 ? data.data : data;
54
- }
55
- async function fetchWithCliToken(input, init, cliToken) {
56
- const headers = new Headers(init.headers);
57
- headers.set("cli-token", cliToken);
58
- const resp = await fetch(input, { ...init, headers });
59
- return parseKbResponse(resp, await resp.text());
60
- }
61
- async function getAuthHeaders(ctx) {
62
- const cliToken = await getCliToken(ctx.host());
63
- return { "cli-token": cliToken };
64
- }
65
- async function kbApi(ctx, method, path, params = {}, body) {
66
- const host = ctx.host();
67
- const cliToken = await getCliToken(host);
68
- const upperMethod = method.toUpperCase();
69
- return fetchWithCliToken(
70
- buildUrl(host, path, params),
71
- {
72
- method: upperMethod,
73
- headers: {
74
- "Content-Type": "application/json"
75
- },
76
- body: upperMethod === "GET" ? void 0 : JSON.stringify(body ?? {})
77
- },
78
- cliToken
79
- );
80
- }
81
- async function kbUpload(ctx, path, form, params = {}) {
82
- const host = ctx.host();
83
- const cliToken = await getCliToken(host);
84
- return fetchWithCliToken(
85
- buildUrl(host, path, params),
86
- {
87
- method: "POST",
88
- body: form
89
- },
90
- cliToken
91
- );
92
- }
93
-
94
- export {
95
- getAuthHeaders,
96
- kbApi,
97
- kbUpload
98
- };
@@ -1,13 +0,0 @@
1
- import {
2
- isAeSandboxRuntime
3
- } from "./chunk-3FY3RJ26.js";
4
-
5
- // src/core/internal-call-source.ts
6
- function internalCallSourceHeaders() {
7
- const source = isAeSandboxRuntime() ? "te-agent" : "ae-cli";
8
- return { "X-Source": source };
9
- }
10
-
11
- export {
12
- internalCallSourceHeaders
13
- };