@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.
- package/README.md +1 -16
- package/README.zh.md +1 -16
- package/dist/{auth-5NSDQFQB.js → auth-H3GJD55A.js} +8 -5
- package/dist/{auth-H2376DEF.js → auth-U25QJU5D.js} +2 -1
- package/dist/{chunk-IMBKVXKY.js → chunk-EGEIXA2Z.js} +82 -10
- package/dist/{chunk-WCHI7725.js → chunk-GLNZSDKO.js} +48 -5
- package/dist/{chunk-LU7SXK4Q.js → chunk-I42JGQ2J.js} +4 -2
- package/dist/{chunk-CAQYQA4R.js → chunk-JM34JPCO.js} +3 -163
- package/dist/chunk-NOO24N7W.js +11 -0
- package/dist/chunk-SF3KTPIC.js +98 -0
- package/dist/chunk-U6TKB3IV.js +171 -0
- package/dist/{chunk-AD5V3ZPJ.js → chunk-VJFUB3H3.js} +97 -9
- package/dist/{client-FCMK3XEK.js → client-IN42F223.js} +3 -2
- package/dist/index.js +42 -20
- package/dist/{model-EZ6K7FXI.js → model-VZCYNIOG.js} +4 -6
- package/dist/{raw-VEF3D6UD.js → raw-WJIWC6YP.js} +5 -3
- package/dist/{sync-NRODEVNH.js → sync-NVASAISS.js} +118 -21
- package/dist/{te-agent-7U7JLJKU.js → te-agent-YV4DXEXK.js} +1 -2
- package/dist/{te-analysis-A2OSGHQ4.js → te-analysis-CB3DA5I5.js} +4 -2
- package/dist/{te-audience-LI67PPGO.js → te-audience-W7SCQFC7.js} +4 -2
- package/dist/{te-common-35WVU3C5.js → te-common-FBXVWBSI.js} +4 -2
- package/dist/{te-community-LEAP6PWT.js → te-community-LNVDZSGW.js} +4 -2
- package/dist/{te-dataops-N2LGZBOX.js → te-dataops-IPCSSWYH.js} +27 -25
- package/dist/{te-engage-H7C72Z46.js → te-engage-KARARMIR.js} +4 -2
- package/dist/{te-kb-I2OKTBAI.js → te-kb-2Z2CARN3.js} +5 -3
- package/dist/{te-meta-HBTIEDRO.js → te-meta-PDKLMWXN.js} +4 -2
- package/dist/{te-team-EM5OWRQL.js → te-team-SW5B7DHO.js} +14 -9
- package/package.json +1 -1
- package/skills/ae-agent/SKILL.md +1 -1
- package/dist/chunk-KAEZTSXN.js +0 -99
- package/dist/chunk-OJDNO5QY.js +0 -63
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SecureStoreAuthError,
|
|
3
|
+
getValidAccessToken
|
|
4
|
+
} from "./chunk-JM34JPCO.js";
|
|
5
|
+
import {
|
|
6
|
+
getActiveHost,
|
|
7
|
+
getConfigDir,
|
|
8
|
+
logger,
|
|
9
|
+
safeJsonParse,
|
|
10
|
+
safeReadJsonFile
|
|
11
|
+
} from "./chunk-SRJIAOBN.js";
|
|
12
|
+
|
|
13
|
+
// src/core/auth.ts
|
|
14
|
+
import fs from "fs";
|
|
15
|
+
import path from "path";
|
|
16
|
+
var TOKENS_FILE = path.join(getConfigDir(), "tokens.json");
|
|
17
|
+
var LEGACY_MCP_TOKENS_FILE = path.join(getConfigDir(), "mcp-tokens.json");
|
|
18
|
+
var LEGACY_DIR = path.join(process.env.HOME || "", ".te-mcp");
|
|
19
|
+
(function removeLegacyMcpTokens() {
|
|
20
|
+
try {
|
|
21
|
+
if (fs.existsSync(LEGACY_MCP_TOKENS_FILE)) {
|
|
22
|
+
fs.rmSync(LEGACY_MCP_TOKENS_FILE);
|
|
23
|
+
logger.info("auth: removed legacy mcp-tokens.json (plaintext MCP token file)");
|
|
24
|
+
}
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
})();
|
|
28
|
+
function ensureDir() {
|
|
29
|
+
const dir = getConfigDir();
|
|
30
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
31
|
+
}
|
|
32
|
+
function resolveHost(hostOverride) {
|
|
33
|
+
if (hostOverride) return hostOverride;
|
|
34
|
+
return getActiveHost();
|
|
35
|
+
}
|
|
36
|
+
async function validateToken(token, hostUrl) {
|
|
37
|
+
const url = `${hostUrl}/v1/oauth/checkToken`;
|
|
38
|
+
try {
|
|
39
|
+
const resp = await fetch(url, {
|
|
40
|
+
method: "POST",
|
|
41
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
42
|
+
body: new URLSearchParams({ accessToken: token }).toString()
|
|
43
|
+
});
|
|
44
|
+
const respJson = safeJsonParse(await resp.text());
|
|
45
|
+
return respJson?.return_code === 0;
|
|
46
|
+
} catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function loadAllTokens() {
|
|
51
|
+
try {
|
|
52
|
+
const legacyTokens = path.join(LEGACY_DIR, "tokens.json");
|
|
53
|
+
if (fs.existsSync(legacyTokens) && !fs.existsSync(TOKENS_FILE)) {
|
|
54
|
+
const data = safeReadJsonFile(legacyTokens);
|
|
55
|
+
const migrated = {};
|
|
56
|
+
for (const [key, val] of Object.entries(data)) {
|
|
57
|
+
const url = key.startsWith("http") ? key : `https://${key}`;
|
|
58
|
+
migrated[url] = val;
|
|
59
|
+
}
|
|
60
|
+
ensureDir();
|
|
61
|
+
fs.writeFileSync(TOKENS_FILE, JSON.stringify(migrated, null, 2));
|
|
62
|
+
return migrated;
|
|
63
|
+
}
|
|
64
|
+
if (fs.existsSync(TOKENS_FILE)) {
|
|
65
|
+
const data = safeReadJsonFile(TOKENS_FILE);
|
|
66
|
+
let needsMigration = false;
|
|
67
|
+
const migrated = {};
|
|
68
|
+
for (const [key, val] of Object.entries(data)) {
|
|
69
|
+
if (!key.startsWith("http")) {
|
|
70
|
+
migrated[`https://${key}`] = val;
|
|
71
|
+
needsMigration = true;
|
|
72
|
+
} else {
|
|
73
|
+
migrated[key] = val;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (needsMigration) {
|
|
77
|
+
fs.writeFileSync(TOKENS_FILE, JSON.stringify(migrated, null, 2));
|
|
78
|
+
return migrated;
|
|
79
|
+
}
|
|
80
|
+
return data;
|
|
81
|
+
}
|
|
82
|
+
} catch {
|
|
83
|
+
}
|
|
84
|
+
return {};
|
|
85
|
+
}
|
|
86
|
+
function saveAllTokens(tokens) {
|
|
87
|
+
ensureDir();
|
|
88
|
+
fs.writeFileSync(TOKENS_FILE, JSON.stringify(tokens, null, 2));
|
|
89
|
+
try {
|
|
90
|
+
fs.chmodSync(TOKENS_FILE, 384);
|
|
91
|
+
} catch {
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function loadToken(hostUrl) {
|
|
95
|
+
const tokens = loadAllTokens();
|
|
96
|
+
const entry = tokens[hostUrl];
|
|
97
|
+
if (!entry || !entry.token) return null;
|
|
98
|
+
return { host: hostUrl, token: entry.token, updatedAt: entry.updatedAt };
|
|
99
|
+
}
|
|
100
|
+
function saveToken(token, hostUrl) {
|
|
101
|
+
const tokens = loadAllTokens();
|
|
102
|
+
tokens[hostUrl] = { token, updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
103
|
+
saveAllTokens(tokens);
|
|
104
|
+
logger.info(`Token saved for ${hostUrl}`);
|
|
105
|
+
}
|
|
106
|
+
function clearToken(hostUrl) {
|
|
107
|
+
const tokens = loadAllTokens();
|
|
108
|
+
delete tokens[hostUrl];
|
|
109
|
+
saveAllTokens(tokens);
|
|
110
|
+
}
|
|
111
|
+
function setTokenManual(token, hostUrl) {
|
|
112
|
+
saveToken(token, hostUrl);
|
|
113
|
+
}
|
|
114
|
+
function getAuthStatus(hostUrl) {
|
|
115
|
+
if (process.env.TE_TOKEN) {
|
|
116
|
+
return { authenticated: true, host: hostUrl, source: "env:TE_TOKEN" };
|
|
117
|
+
}
|
|
118
|
+
const cached = loadToken(hostUrl);
|
|
119
|
+
if (cached) {
|
|
120
|
+
const ageMs = Date.now() - new Date(cached.updatedAt).getTime();
|
|
121
|
+
const hours = Math.round(ageMs / 36e5);
|
|
122
|
+
return { authenticated: true, host: hostUrl, tokenAge: `${hours}h ago`, source: "cache" };
|
|
123
|
+
}
|
|
124
|
+
return { authenticated: false, host: hostUrl };
|
|
125
|
+
}
|
|
126
|
+
async function getToken(hostUrl) {
|
|
127
|
+
if (!hostUrl) {
|
|
128
|
+
throw new Error(
|
|
129
|
+
`No AE host configured.
|
|
130
|
+
Run: ae-cli config set-host <url>`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
if (process.env.TE_TOKEN) {
|
|
134
|
+
logger.info("Using token from env:TE_TOKEN");
|
|
135
|
+
return process.env.TE_TOKEN;
|
|
136
|
+
}
|
|
137
|
+
const cached = loadToken(hostUrl);
|
|
138
|
+
if (cached && cached.token) {
|
|
139
|
+
logger.info(`Using cached token for ${hostUrl}`);
|
|
140
|
+
return cached.token;
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
const secureToken = await getValidAccessToken(hostUrl);
|
|
144
|
+
logger.info(`Using secure-store token for ${hostUrl}`);
|
|
145
|
+
return secureToken;
|
|
146
|
+
} catch (e) {
|
|
147
|
+
if (e instanceof SecureStoreAuthError) {
|
|
148
|
+
logger.info(`secure-store: ${e.message}`);
|
|
149
|
+
} else {
|
|
150
|
+
logger.warn(`secure-store unexpected error: ${e.message}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
throw new Error(
|
|
154
|
+
`Cannot obtain token for ${hostUrl}.
|
|
155
|
+
Options:
|
|
156
|
+
1. ae-cli auth login (device code flow, cross-platform)
|
|
157
|
+
2. ae-cli auth set-token <token>
|
|
158
|
+
3. export TE_TOKEN=<token> (CI/headless)`
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export {
|
|
163
|
+
resolveHost,
|
|
164
|
+
validateToken,
|
|
165
|
+
loadToken,
|
|
166
|
+
saveToken,
|
|
167
|
+
clearToken,
|
|
168
|
+
setTokenManual,
|
|
169
|
+
getAuthStatus,
|
|
170
|
+
getToken
|
|
171
|
+
};
|
|
@@ -1,11 +1,98 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-KAEZTSXN.js";
|
|
5
|
-
import {
|
|
6
|
-
getActiveHost
|
|
2
|
+
getActiveHost,
|
|
3
|
+
getSandboxRuntimeRoot
|
|
7
4
|
} from "./chunk-SRJIAOBN.js";
|
|
8
5
|
|
|
6
|
+
// src/core/te-agent-credentials.ts
|
|
7
|
+
import { readFileSync } from "fs";
|
|
8
|
+
import { homedir } from "os";
|
|
9
|
+
import { join } from "path";
|
|
10
|
+
function getCredentialsPath() {
|
|
11
|
+
return join(process.env.HOME || homedir(), ".te-agent", "credentials.json");
|
|
12
|
+
}
|
|
13
|
+
function getPersistentEnvPath() {
|
|
14
|
+
return join(getSandboxRuntimeRoot(), ".env");
|
|
15
|
+
}
|
|
16
|
+
function parseDotEnv(raw) {
|
|
17
|
+
const result = {};
|
|
18
|
+
for (const line of raw.split("\n")) {
|
|
19
|
+
if (/^\s*#/.test(line) || line.trim() === "") continue;
|
|
20
|
+
const match = /^\s*([^=]+)=(.*)$/.exec(line);
|
|
21
|
+
if (!match) continue;
|
|
22
|
+
const key = match[1].trim();
|
|
23
|
+
let value = match[2].trim();
|
|
24
|
+
if (value.startsWith('"') && value.endsWith('"')) {
|
|
25
|
+
value = value.slice(1, -1).replace(/\\"/g, '"');
|
|
26
|
+
}
|
|
27
|
+
if (value !== "") result[key] = value;
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
function readPersistentEnv() {
|
|
32
|
+
const envPath = getPersistentEnvPath();
|
|
33
|
+
try {
|
|
34
|
+
const raw = readFileSync(envPath, "utf8");
|
|
35
|
+
return parseDotEnv(raw);
|
|
36
|
+
} catch (err) {
|
|
37
|
+
if (err?.code === "ENOENT") return null;
|
|
38
|
+
throw new TeAgentCredentialsError(
|
|
39
|
+
`Failed to read ${envPath}: ${err?.message ?? err}`,
|
|
40
|
+
"Check file permissions, or inject runtime credentials via TE_CLAUDE_BASE_URL / SANDBOX_ID / SECRET_KEY"
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
var TeAgentCredentialsError = class extends Error {
|
|
45
|
+
constructor(message, hint) {
|
|
46
|
+
super(message);
|
|
47
|
+
this.hint = hint;
|
|
48
|
+
this.name = "TeAgentCredentialsError";
|
|
49
|
+
}
|
|
50
|
+
hint;
|
|
51
|
+
};
|
|
52
|
+
function readLegacyCredentials() {
|
|
53
|
+
const credPath = getCredentialsPath();
|
|
54
|
+
try {
|
|
55
|
+
const raw = readFileSync(credPath, "utf8");
|
|
56
|
+
const parsed = JSON.parse(raw);
|
|
57
|
+
const main = parsed?.mainApp;
|
|
58
|
+
return main && typeof main === "object" ? main : null;
|
|
59
|
+
} catch (err) {
|
|
60
|
+
if (err?.code === "ENOENT") return null;
|
|
61
|
+
if (err instanceof SyntaxError) {
|
|
62
|
+
throw new TeAgentCredentialsError(
|
|
63
|
+
`Failed to parse ${credPath}: ${err.message}`,
|
|
64
|
+
"The credentials file may be corrupted; alternatively inject runtime credentials via TE_CLAUDE_BASE_URL / SANDBOX_ID / SECRET_KEY"
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
throw new TeAgentCredentialsError(
|
|
68
|
+
`Failed to read ${credPath}: ${err?.message ?? err}`,
|
|
69
|
+
"Check file permissions, or inject runtime credentials via TE_CLAUDE_BASE_URL / SANDBOX_ID / SECRET_KEY"
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function tryLoadTeAgentSandboxCredentials() {
|
|
74
|
+
const legacy = readLegacyCredentials();
|
|
75
|
+
const persistent = readPersistentEnv();
|
|
76
|
+
const url = process.env.TE_CLAUDE_BASE_URL || persistent?.TE_CLAUDE_BASE_URL || legacy?.url;
|
|
77
|
+
if (typeof url !== "string" || !url) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
const sandboxId = process.env.SANDBOX_ID || persistent?.SANDBOX_ID || legacy?.sandboxId || null;
|
|
81
|
+
const sandboxSecretKey = process.env.SECRET_KEY || process.env.SANDBOX_SECRET_KEY || persistent?.SECRET_KEY || persistent?.SANDBOX_SECRET_KEY || legacy?.sandboxSecretKey || legacy?.secretKey || null;
|
|
82
|
+
return {
|
|
83
|
+
url,
|
|
84
|
+
sandboxId: typeof sandboxId === "string" ? sandboxId : null,
|
|
85
|
+
sandboxSecretKey: typeof sandboxSecretKey === "string" ? sandboxSecretKey : null
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function getClaudeConfigDir() {
|
|
89
|
+
const fromEnv = process.env.CLAUDE_CONFIG_DIR;
|
|
90
|
+
if (typeof fromEnv === "string" && fromEnv.length > 0) {
|
|
91
|
+
return fromEnv;
|
|
92
|
+
}
|
|
93
|
+
return join(homedir(), ".claude");
|
|
94
|
+
}
|
|
95
|
+
|
|
9
96
|
// src/core/te-agent-client.ts
|
|
10
97
|
var TeAgentApiError = class extends Error {
|
|
11
98
|
constructor(message, status, code, body) {
|
|
@@ -60,7 +147,7 @@ async function signRequest(method, path, rawBody) {
|
|
|
60
147
|
rawBody
|
|
61
148
|
};
|
|
62
149
|
}
|
|
63
|
-
const { getToken } = await import("./auth-
|
|
150
|
+
const { getToken } = await import("./auth-U25QJU5D.js");
|
|
64
151
|
const baseUrl = sandboxCred?.url || teClaudeBaseFromActiveHost();
|
|
65
152
|
if (!baseUrl) {
|
|
66
153
|
throw new TeAgentCredentialsError(
|
|
@@ -147,8 +234,7 @@ async function postSandboxSyncPull(args) {
|
|
|
147
234
|
kind: args.kind,
|
|
148
235
|
skills: args.skills,
|
|
149
236
|
mcp: args.mcp,
|
|
150
|
-
mode: "merge"
|
|
151
|
-
ifUnmodifiedSince: args.ifUnmodifiedSince
|
|
237
|
+
mode: "merge"
|
|
152
238
|
});
|
|
153
239
|
}
|
|
154
240
|
async function deleteFromMainApp(path) {
|
|
@@ -180,7 +266,7 @@ async function uploadToMainApp(path, formData) {
|
|
|
180
266
|
"X-Sandbox-Secret-Key": sandboxCred.sandboxSecretKey
|
|
181
267
|
};
|
|
182
268
|
} else {
|
|
183
|
-
const { getToken } = await import("./auth-
|
|
269
|
+
const { getToken } = await import("./auth-U25QJU5D.js");
|
|
184
270
|
baseUrl = (sandboxCred?.url || teClaudeBaseFromActiveHost() || "").replace(/\/$/, "");
|
|
185
271
|
if (!baseUrl) {
|
|
186
272
|
throw new TeAgentCredentialsError(
|
|
@@ -204,6 +290,8 @@ async function uploadToMainApp(path, formData) {
|
|
|
204
290
|
}
|
|
205
291
|
|
|
206
292
|
export {
|
|
293
|
+
TeAgentCredentialsError,
|
|
294
|
+
getClaudeConfigDir,
|
|
207
295
|
TeAgentApiError,
|
|
208
296
|
postToMainApp,
|
|
209
297
|
getFromMainApp,
|
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
queryReportData,
|
|
8
8
|
querySql,
|
|
9
9
|
wsQuery
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-I42JGQ2J.js";
|
|
11
|
+
import "./chunk-U6TKB3IV.js";
|
|
12
|
+
import "./chunk-JM34JPCO.js";
|
|
12
13
|
import "./chunk-SRJIAOBN.js";
|
|
13
14
|
export {
|
|
14
15
|
httpDelete,
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
+
TeAgentApiError,
|
|
2
3
|
TeAgentCredentialsError
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VJFUB3H3.js";
|
|
4
5
|
import {
|
|
5
6
|
printError,
|
|
6
7
|
printOutput
|
|
7
8
|
} from "./chunk-CLJF7MQA.js";
|
|
9
|
+
import {
|
|
10
|
+
PermissionError
|
|
11
|
+
} from "./chunk-NOO24N7W.js";
|
|
12
|
+
import {
|
|
13
|
+
SecureStoreAuthError
|
|
14
|
+
} from "./chunk-JM34JPCO.js";
|
|
8
15
|
import {
|
|
9
16
|
getActiveHost,
|
|
10
17
|
logger,
|
|
@@ -57,21 +64,36 @@ async function runCommand(cmd, opts, globalOpts) {
|
|
|
57
64
|
logger.error(`Command failed: ${message}`);
|
|
58
65
|
if (err instanceof TeAgentCredentialsError) {
|
|
59
66
|
printError("config", message, err.hint);
|
|
60
|
-
} else if (
|
|
67
|
+
} else if (err instanceof PermissionError) {
|
|
68
|
+
printError("permission", message);
|
|
69
|
+
} else if (err instanceof SecureStoreAuthError) {
|
|
70
|
+
printError("auth", message, "Run: ae-cli auth login");
|
|
71
|
+
} else if (err instanceof TeAgentApiError) {
|
|
72
|
+
if (err.status === 403) {
|
|
73
|
+
printError("permission", message);
|
|
74
|
+
} else if (err.status === 401) {
|
|
75
|
+
printError("auth", message, "Run: ae-cli auth login");
|
|
76
|
+
} else {
|
|
77
|
+
printError("api", message);
|
|
78
|
+
}
|
|
79
|
+
} else if (looksLikeAuthFailure(message)) {
|
|
61
80
|
printError("auth", message, "Run: ae-cli auth login");
|
|
62
|
-
} else if (message.includes("AE API error")) {
|
|
63
|
-
printError("api", message);
|
|
64
81
|
} else {
|
|
65
82
|
printError("api", message);
|
|
66
83
|
}
|
|
67
84
|
process.exit(1);
|
|
68
85
|
}
|
|
69
86
|
}
|
|
87
|
+
function looksLikeAuthFailure(message) {
|
|
88
|
+
const m = message.toLowerCase();
|
|
89
|
+
if (m.includes("403") || m.includes("forbidden") || m.includes("permission")) return false;
|
|
90
|
+
return m.includes("401") || m.includes("unauthorized") || m.includes("session expired") || m.includes("invalid access token") || m.includes("-1001") || m.includes("\u767B\u5F55") || m.includes("ae-cli auth login");
|
|
91
|
+
}
|
|
70
92
|
function createRuntimeContext(cmd, opts, globalOpts) {
|
|
71
93
|
let _clientModule = null;
|
|
72
94
|
async function getClient() {
|
|
73
95
|
if (!_clientModule) {
|
|
74
|
-
_clientModule = await import("./client-
|
|
96
|
+
_clientModule = await import("./client-IN42F223.js");
|
|
75
97
|
}
|
|
76
98
|
return _clientModule;
|
|
77
99
|
}
|
|
@@ -114,7 +136,7 @@ function createRuntimeContext(cmd, opts, globalOpts) {
|
|
|
114
136
|
return client.queryReportData(projectId, reportId, qp, eventModel, options, ctx.host());
|
|
115
137
|
},
|
|
116
138
|
async token() {
|
|
117
|
-
const { getToken } = await import("./auth-
|
|
139
|
+
const { getToken } = await import("./auth-U25QJU5D.js");
|
|
118
140
|
return getToken(ctx.host());
|
|
119
141
|
},
|
|
120
142
|
host() {
|
|
@@ -363,52 +385,52 @@ program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE
|
|
|
363
385
|
async function loadCommands() {
|
|
364
386
|
const commands = [];
|
|
365
387
|
try {
|
|
366
|
-
const teAnalysis = await import("./te-analysis-
|
|
388
|
+
const teAnalysis = await import("./te-analysis-CB3DA5I5.js");
|
|
367
389
|
commands.push(...teAnalysis.default);
|
|
368
390
|
} catch {
|
|
369
391
|
}
|
|
370
392
|
try {
|
|
371
|
-
const teAudience = await import("./te-audience-
|
|
393
|
+
const teAudience = await import("./te-audience-W7SCQFC7.js");
|
|
372
394
|
commands.push(...teAudience.default);
|
|
373
395
|
} catch {
|
|
374
396
|
}
|
|
375
397
|
try {
|
|
376
|
-
const teMeta = await import("./te-meta-
|
|
398
|
+
const teMeta = await import("./te-meta-PDKLMWXN.js");
|
|
377
399
|
commands.push(...teMeta.default);
|
|
378
400
|
} catch {
|
|
379
401
|
}
|
|
380
402
|
try {
|
|
381
|
-
const teCommon = await import("./te-common-
|
|
403
|
+
const teCommon = await import("./te-common-FBXVWBSI.js");
|
|
382
404
|
commands.push(...teCommon.default);
|
|
383
405
|
} catch {
|
|
384
406
|
}
|
|
385
407
|
try {
|
|
386
|
-
const engage = await import("./te-engage-
|
|
408
|
+
const engage = await import("./te-engage-KARARMIR.js");
|
|
387
409
|
commands.push(...engage.default);
|
|
388
410
|
} catch {
|
|
389
411
|
}
|
|
390
412
|
try {
|
|
391
|
-
const community = await import("./te-community-
|
|
413
|
+
const community = await import("./te-community-LNVDZSGW.js");
|
|
392
414
|
commands.push(...community.default);
|
|
393
415
|
} catch {
|
|
394
416
|
}
|
|
395
417
|
try {
|
|
396
|
-
const dataops = await import("./te-dataops-
|
|
418
|
+
const dataops = await import("./te-dataops-IPCSSWYH.js");
|
|
397
419
|
commands.push(...dataops.default);
|
|
398
420
|
} catch {
|
|
399
421
|
}
|
|
400
422
|
try {
|
|
401
|
-
const teKb = await import("./te-kb-
|
|
423
|
+
const teKb = await import("./te-kb-2Z2CARN3.js");
|
|
402
424
|
commands.push(...teKb.default);
|
|
403
425
|
} catch {
|
|
404
426
|
}
|
|
405
427
|
try {
|
|
406
|
-
const teTeam = await import("./te-team-
|
|
428
|
+
const teTeam = await import("./te-team-SW5B7DHO.js");
|
|
407
429
|
commands.push(...teTeam.default);
|
|
408
430
|
} catch {
|
|
409
431
|
}
|
|
410
432
|
try {
|
|
411
|
-
const teAgent = await import("./te-agent-
|
|
433
|
+
const teAgent = await import("./te-agent-YV4DXEXK.js");
|
|
412
434
|
commands.push(...teAgent.default);
|
|
413
435
|
} catch {
|
|
414
436
|
}
|
|
@@ -416,7 +438,7 @@ async function loadCommands() {
|
|
|
416
438
|
}
|
|
417
439
|
async function registerAuthCommands() {
|
|
418
440
|
try {
|
|
419
|
-
const { registerAuth } = await import("./auth-
|
|
441
|
+
const { registerAuth } = await import("./auth-H3GJD55A.js");
|
|
420
442
|
registerAuth(program);
|
|
421
443
|
} catch {
|
|
422
444
|
}
|
|
@@ -430,21 +452,21 @@ async function registerConfigCommands() {
|
|
|
430
452
|
}
|
|
431
453
|
async function registerApiCommand() {
|
|
432
454
|
try {
|
|
433
|
-
const { registerApi } = await import("./raw-
|
|
455
|
+
const { registerApi } = await import("./raw-WJIWC6YP.js");
|
|
434
456
|
registerApi(program);
|
|
435
457
|
} catch {
|
|
436
458
|
}
|
|
437
459
|
}
|
|
438
460
|
async function registerSyncCommand() {
|
|
439
461
|
try {
|
|
440
|
-
const { registerSync } = await import("./sync-
|
|
462
|
+
const { registerSync } = await import("./sync-NVASAISS.js");
|
|
441
463
|
registerSync(program);
|
|
442
464
|
} catch {
|
|
443
465
|
}
|
|
444
466
|
}
|
|
445
467
|
async function registerModelCommand() {
|
|
446
468
|
try {
|
|
447
|
-
const { registerModel } = await import("./model-
|
|
469
|
+
const { registerModel } = await import("./model-VZCYNIOG.js");
|
|
448
470
|
registerModel(program);
|
|
449
471
|
} catch {
|
|
450
472
|
}
|
|
@@ -2,16 +2,14 @@ import {
|
|
|
2
2
|
MultiselectCancelled,
|
|
3
3
|
getCurrentWorkspace,
|
|
4
4
|
promptSingleCheckboxSelect
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EGEIXA2Z.js";
|
|
6
6
|
import {
|
|
7
7
|
TeAgentApiError,
|
|
8
|
+
TeAgentCredentialsError,
|
|
9
|
+
getClaudeConfigDir,
|
|
8
10
|
getSandboxModels,
|
|
9
11
|
postSandboxModelSelection
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
TeAgentCredentialsError,
|
|
13
|
-
getClaudeConfigDir
|
|
14
|
-
} from "./chunk-KAEZTSXN.js";
|
|
12
|
+
} from "./chunk-VJFUB3H3.js";
|
|
15
13
|
import "./chunk-SRJIAOBN.js";
|
|
16
14
|
|
|
17
15
|
// src/commands/model/index.ts
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
httpGet,
|
|
7
7
|
httpPost
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I42JGQ2J.js";
|
|
9
9
|
import {
|
|
10
|
-
SecureStoreAuthError,
|
|
11
10
|
resolveHost
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U6TKB3IV.js";
|
|
12
|
+
import {
|
|
13
|
+
SecureStoreAuthError
|
|
14
|
+
} from "./chunk-JM34JPCO.js";
|
|
13
15
|
import {
|
|
14
16
|
safeJsonParse
|
|
15
17
|
} from "./chunk-SRJIAOBN.js";
|