@thinkingai/ae-cli 6.0.46 → 6.0.48-customer.1

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 (93) 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-GQ47BCFI.js → capability-RUSV77CO.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-BE73PUFX.js +25216 -0
  12. package/dist/{chunk-DQRPU6EE.js → chunk-BVDST5YT.js} +5 -4
  13. package/dist/{chunk-VTWMIC5L.js → chunk-E2JKXMVO.js} +2 -0
  14. package/dist/{chunk-JHENBQ5B.js → chunk-FR2EDAQM.js} +1 -0
  15. package/dist/{chunk-ZQ47LWTI.js → chunk-GJXRF7Y6.js} +6 -5
  16. package/dist/{chunk-DWO43OIB.js → chunk-JQ3ENZZH.js} +2 -0
  17. package/dist/chunk-JYMGHGCE.js +191 -0
  18. package/dist/{chunk-BYYS3ANB.js → chunk-KEWVSO64.js} +5 -4
  19. package/dist/{chunk-3FY3RJ26.js → chunk-KZ6ZHF5J.js} +2 -1
  20. package/dist/{chunk-2MN54X6H.js → chunk-NSIVXKJH.js} +4 -3
  21. package/dist/{chunk-ZQKDZXDO.js → chunk-O6K2ODUE.js} +3 -2
  22. package/dist/{chunk-J2DEBMRF.js → chunk-RWXIXOZG.js} +22 -9
  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-FZQQC3KW.js} +923 -98
  30. package/dist/index.js +36 -34
  31. package/dist/{local-data-upload-client-4YYHSYD6.js → local-data-upload-client-EFHDLXFG.js} +3 -2
  32. package/dist/{memory-3ORCR7JH.js → memory-HBJQ2GC5.js} +8 -7
  33. package/dist/{metadata-A6QLH3IS.js → metadata-PGDJE5RQ.js} +12 -11
  34. package/dist/{model-UGRDX4MW.js → model-BHLJ2QMT.js} +10 -9
  35. package/dist/{personal-semantic-preference-QZFAJWGE.js → personal-semantic-preference-E5NZ56DN.js} +11 -10
  36. package/dist/sync-MUWPRM5I.js +522 -0
  37. package/dist/{te-agent-BR6VDBNX.js → te-agent-WQZTMEK4.js} +10 -9
  38. package/dist/{te-analysis-MUKUXJL4.js → te-analysis-YWCSSLYL.js} +107 -20
  39. package/dist/{te-community-ISDQWJU7.js → te-community-BNE6KREL.js} +8 -7
  40. package/dist/{te-dataops-6P5IKWNJ.js → te-dataops-TXLKM2W6.js} +467 -67
  41. package/dist/{te-engage-ELA3C5BM.js → te-engage-VEW4CJHK.js} +26 -10
  42. package/dist/{te-kb-RCLSSH2Q.js → te-kb-BUD6N3NI.js} +311 -24
  43. package/dist/{te-system-FXITO2JG.js → te-system-44LZJDTQ.js} +573 -37
  44. package/dist/{te-team-ADOC2ROP.js → te-team-XMP47YXE.js} +10 -7
  45. package/dist/{update-YCYCKJOO.js → update-UODFOZ4P.js} +7 -6
  46. package/package.json +18 -9
  47. package/skills/ae-analysis/references/analysis_gateway_assets.md +1 -1
  48. package/skills/ae-analysis/references/audience_models.md +18 -0
  49. package/skills/ae-analysis/references/command_index.md +2 -2
  50. package/skills/ae-analysis/references/project_timezone_update.md +13 -4
  51. package/skills/ae-analysis/references/property_create.md +2 -0
  52. package/skills/ae-analysis/references/super_metadata_batch_create.md +2 -0
  53. package/skills/ae-analysis/references/user_cluster_models.md +2 -0
  54. package/skills/ae-analysis/references/user_cluster_update.md +8 -4
  55. package/skills/ae-analysis/references/user_tag_create.md +7 -1
  56. package/skills/ae-analysis/references/user_tag_models.md +8 -2
  57. package/skills/ae-data-integration/SKILL.md +1 -0
  58. package/skills/ae-data-integration/references/error-handling.md +54 -1
  59. package/skills/ae-data-integration/references/source-inspect.md +18 -2
  60. package/skills/ae-data-integration/references/tracking-plan.md +1 -1
  61. package/skills/ae-data-integration/references/transform.md +4 -2
  62. package/skills/ae-data-integration/references/ue-mapping.md +5 -2
  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 +3 -0
  67. package/skills/ae-engage/references/build-task-save-guide.md +5 -1
  68. package/skills/ae-engage/references/save-task.md +6 -0
  69. package/skills/ae-generate-tracking-plan/SKILL.md +9 -8
  70. package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +1 -1
  71. package/skills/ae-kb/SKILL.md +120 -9
  72. package/skills/ae-system/SKILL.md +28 -30
  73. package/skills/ae-system/references/channel-management.md +303 -0
  74. package/dist/auth-GBMV6TEJ.js +0 -14
  75. package/dist/capability-IINANQJA.js +0 -349
  76. package/dist/chunk-GJLGIMAO.js +0 -556
  77. package/dist/chunk-OMPRXM3V.js +0 -349
  78. package/dist/chunk-QNOLN2LJ.js +0 -509
  79. package/dist/chunk-RJDU7NYP.js +0 -1198
  80. package/dist/chunk-RNAALWJK.js +0 -98
  81. package/dist/chunk-SERWF6G5.js +0 -13
  82. package/dist/chunk-XNVMVIUI.js +0 -71
  83. package/dist/memory-I2WXDTV2.js +0 -893
  84. package/dist/metadata-HC7GBTTD.js +0 -339
  85. package/dist/model-HLHIEFMU.js +0 -139
  86. package/dist/personal-semantic-preference-YXAZBFVW.js +0 -239
  87. package/dist/sync-TFHU2UTG.js +0 -10261
  88. package/dist/te-agent-VLYOV7S4.js +0 -3894
  89. package/dist/te-analysis-JECYCV6K.js +0 -9357
  90. package/dist/te-community-5DMNKJWY.js +0 -1859
  91. package/dist/te-dataops-CVULXNVB.js +0 -2209
  92. package/dist/te-engage-MC5IQZIU.js +0 -4898
  93. 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
- };
@@ -1,71 +0,0 @@
1
- import {
2
- withOutputMetadata
3
- } from "./chunk-BYYS3ANB.js";
4
- import {
5
- dryRunCapability,
6
- executeCapabilityWithEnvelope,
7
- validateCapability
8
- } from "./chunk-ZQ47LWTI.js";
9
- import {
10
- resolveGatewayDomain
11
- } from "./chunk-3KWQYGYI.js";
12
-
13
- // src/core/capability-command.ts
14
- import { randomBytes } from "crypto";
15
- function createCapabilityCommand(config) {
16
- return {
17
- service: config.cliService,
18
- resource: config.resource,
19
- command: config.command,
20
- capabilityId: config.capabilityId,
21
- description: config.description,
22
- flags: config.flags,
23
- risk: config.risk,
24
- validate: config.validate,
25
- preflight: (ctx) => {
26
- config.buildInput(ctx);
27
- },
28
- validateInput: async (ctx) => {
29
- const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
30
- const requestHost = config.requestHost ?? ctx.host();
31
- const input = withLifecycleRequestId(config, config.buildInput(ctx));
32
- return validateCapability(requestHost, gatewayDomain, config.capabilityId, input);
33
- },
34
- dryRun: async (ctx) => {
35
- const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
36
- const requestHost = config.requestHost ?? ctx.host();
37
- const input = withLifecycleRequestId(config, config.buildInput(ctx));
38
- return dryRunCapability(requestHost, gatewayDomain, config.capabilityId, input);
39
- },
40
- execute: async (ctx) => {
41
- const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
42
- const requestHost = config.requestHost ?? ctx.host();
43
- const input = withLifecycleRequestId(config, config.buildInput(ctx));
44
- announceDispatch(config.capabilityId, input);
45
- const result = await executeCapabilityWithEnvelope(requestHost, gatewayDomain, config.capabilityId, input);
46
- const data = config.postProcess ? await config.postProcess(result.data, input, ctx) : result.data;
47
- return withOutputMetadata(data, result.meta);
48
- }
49
- };
50
- }
51
- function withLifecycleRequestId(config, input) {
52
- if (!config.flags.some((flag) => flag.name === "request-id")) {
53
- return input;
54
- }
55
- const supplied = input.request_id;
56
- const requestId = typeof supplied === "string" && supplied.length > 0 ? supplied : `cli_${randomBytes(16).toString("hex")}`;
57
- return { ...input, request_id: requestId };
58
- }
59
- function announceDispatch(capabilityId, input) {
60
- if (typeof input.request_id !== "string") {
61
- return;
62
- }
63
- process.stderr.write(
64
- `[ae-cli] dispatching capability=${capabilityId} request_id=${input.request_id}
65
- `
66
- );
67
- }
68
-
69
- export {
70
- createCapabilityCommand
71
- };