@thinkingai/ae-cli 6.0.52 → 6.0.54
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 +35 -10
- package/README.zh.md +32 -10
- package/bin/ae-cli.js +6 -1
- package/cli-installation-guide.md +91 -0
- package/dist/{auth-XZNXFRJS.js → auth-MBWRZTB6.js} +171 -13
- package/dist/automation-NWWVLWG2.js +459 -0
- package/dist/{capability-RJZ4KRGP.js → capability-7SSN6PNZ.js} +11 -6
- package/dist/chunk-4655PUNX.js +43 -0
- package/dist/{chunk-4NRCTUZJ.js → chunk-5XJYLEVC.js} +4 -4
- package/dist/{chunk-JOCDD4ON.js → chunk-7QXISROD.js} +1 -1
- package/dist/{chunk-EQ255HKO.js → chunk-AP7YP2NX.js} +2 -2
- package/dist/{chunk-DVMLWQD4.js → chunk-CT7QDJS6.js} +2 -2
- package/dist/chunk-D6ACFILC.js +56 -0
- package/dist/{chunk-HFGZGYCG.js → chunk-EOYSKMXN.js} +264 -10
- package/dist/{chunk-57RRFUEZ.js → chunk-FMNNGNYO.js} +43 -8
- package/dist/{chunk-7XGFSUOM.js → chunk-GIK6EDUG.js} +291 -84
- package/dist/{chunk-WEPZ5M3Z.js → chunk-HBLK3ZHW.js} +7 -4
- package/dist/chunk-HVHR4SCP.js +133 -0
- package/dist/{chunk-DX5CDO34.js → chunk-KFNMQTZI.js} +580 -214
- package/dist/{chunk-HBGADCKA.js → chunk-PLE722AJ.js} +28 -11
- package/dist/chunk-RK6GLDGI.js +27 -0
- package/dist/{chunk-V2NUHPXF.js → chunk-S6M42KND.js} +1 -1
- package/dist/{chunk-7FTTULED.js → chunk-UQ77JXYH.js} +7 -3
- package/dist/{chunk-MAPZ7VB6.js → chunk-WNGFSIOB.js} +20 -1
- package/dist/{chunk-L2QUIZTS.js → chunk-ZIQWCZTS.js} +3 -3
- package/dist/{community-report-client-CU22W53K.js → community-report-client-PEERQCX2.js} +1 -1
- package/dist/{config-XO3LI3SA.js → config-FF6YVJKI.js} +29 -10
- package/dist/context-YAE3QXP3.js +136 -0
- package/dist/{data-integration-HNGUKFIC.js → data-integration-HESZET7E.js} +6 -6
- package/dist/index.js +169 -55
- package/dist/{local-data-upload-client-GTRIT64F.js → local-data-upload-client-TWMHFLUA.js} +1 -1
- package/dist/memory-62BJOULV.js +580 -0
- package/dist/{metadata-JAQW7KGZ.js → metadata-7CUMWIB4.js} +7 -7
- package/dist/{model-RNPQXIBI.js → model-SBV2JFJI.js} +9 -5
- package/dist/{personal-semantic-preference-QCZ2IZTK.js → personal-semantic-preference-6SRCYPGE.js} +119 -11
- package/dist/{project-semantic-64JURXKF.js → project-semantic-YYEM4OSU.js} +7 -7
- package/dist/{sync-O45NXEQY.js → sync-SU33KYX7.js} +12 -8
- package/dist/{te-agent-K5MSPNHJ.js → te-agent-F5QBZSQA.js} +423 -494
- package/dist/{te-analysis-KQKCAI5H.js → te-analysis-U4I2W2WC.js} +1090 -67
- package/dist/{te-community-4OYU3BDA.js → te-community-PFLDLPP4.js} +3 -3
- package/dist/{te-dataops-NFIPB6FX.js → te-dataops-FOQSRIAZ.js} +644 -276
- package/dist/{te-engage-HSVSRW22.js → te-engage-ZX76CNAB.js} +6 -6
- package/dist/{te-kb-3TS73NO6.js → te-kb-MHDOST62.js} +666 -244
- package/dist/{te-system-STMHLS5J.js → te-system-J2FQF5ER.js} +6 -6
- package/dist/{te-team-3I5AOX3N.js → te-team-5UOZPTU3.js} +6 -6
- package/dist/things-VPPXXLHB.js +1091 -0
- package/dist/{update-RZXLPCRH.js → update-EEUTEI6R.js} +59 -51
- package/dist/workspace-O3EEIYQM.js +554 -0
- package/package.json +30 -11
- package/skills/ae-agent/SKILL.md +95 -140
- package/skills/ae-agent/references/add-model.md +1 -1
- package/skills/ae-agent/references/create-agent.md +1 -1
- package/skills/ae-agent/references/find-archived-conversations.md +12 -5
- package/skills/ae-agent/references/get-agent.md +1 -1
- package/skills/ae-agent/references/list-agents.md +2 -2
- package/skills/ae-agent/references/list-models.md +2 -2
- package/skills/ae-agent/references/notification.md +40 -0
- package/skills/ae-agent/references/restore-conversation.md +3 -1
- package/skills/ae-analysis/SKILL.md +76 -15
- package/skills/ae-analysis/references/agent_review_submit_to_page.md +2 -0
- package/skills/ae-analysis/references/ai_models/event.md +6 -1
- package/skills/ae-analysis/references/ai_models/funnel.md +12 -4
- package/skills/ae-analysis/references/ai_models/heat_map.md +23 -0
- package/skills/ae-analysis/references/ai_models/interval.md +24 -0
- package/skills/ae-analysis/references/ai_models/path.md +20 -0
- package/skills/ae-analysis/references/ai_models/prop_analysis.md +2 -0
- package/skills/ae-analysis/references/ai_models/rank_list.md +30 -0
- package/skills/ae-analysis/references/ai_models/retention.md +45 -1
- package/skills/ae-analysis/references/ai_models/revenue.md +20 -2
- package/skills/ae-analysis/references/ai_models/tag.md +2 -0
- package/skills/ae-analysis/references/ai_models.md +96 -0
- package/skills/ae-analysis/references/analysis_data_retrieval.md +4 -0
- package/skills/ae-analysis/references/asset_batch_info_export.md +10 -0
- package/skills/ae-analysis/references/asset_batch_sql_export.md +13 -1
- package/skills/ae-analysis/references/asset_export.md +12 -1
- package/skills/ae-analysis/references/asset_list.md +1 -0
- package/skills/ae-analysis/references/asset_search.md +11 -5
- package/skills/ae-analysis/references/bi_panel_list.md +1 -1
- package/skills/ae-analysis/references/catalog_list.md +1 -1
- package/skills/ae-analysis/references/collaboration.md +48 -0
- package/skills/ae-analysis/references/command_index.md +26 -17
- package/skills/ae-analysis/references/dashboard_list.md +4 -4
- package/skills/ae-analysis/references/dashboard_move.md +21 -0
- package/skills/ae-analysis/references/dashboard_report_add.md +2 -0
- package/skills/ae-analysis/references/dashboard_report_data_export.md +2 -0
- package/skills/ae-analysis/references/dashboard_report_get.md +19 -0
- package/skills/ae-analysis/references/dashboard_report_update.md +27 -0
- package/skills/ae-analysis/references/dashboard_update.md +1 -1
- package/skills/ae-analysis/references/event_export.md +3 -1
- package/skills/ae-analysis/references/event_report_presentation.md +76 -0
- package/skills/ae-analysis/references/feedback_submit.md +37 -0
- package/skills/ae-analysis/references/governance_recommendation_auto_review.md +71 -0
- package/skills/ae-analysis/references/governance_recommendation_export.md +11 -0
- package/skills/ae-analysis/references/metadata_resolution.md +18 -3
- package/skills/ae-analysis/references/metric_export.md +3 -1
- package/skills/ae-analysis/references/metric_list.md +1 -1
- package/skills/ae-analysis/references/operation_record_export.md +10 -0
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +2 -2
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +6 -4
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +5 -3
- package/skills/ae-analysis/references/personal_semantic_preference_review.md +9 -0
- package/skills/ae-analysis/references/personal_semantic_preference_review_list.md +7 -0
- package/skills/ae-analysis/references/personal_semantic_preference_submit.md +7 -0
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +91 -32
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +99 -1
- package/skills/ae-analysis/references/property_export.md +3 -1
- package/skills/ae-analysis/references/report_create.md +17 -3
- package/skills/ae-analysis/references/report_data_export.md +6 -0
- package/skills/ae-analysis/references/report_get.md +7 -1
- package/skills/ae-analysis/references/report_list.md +5 -5
- package/skills/ae-analysis/references/report_update.md +20 -3
- package/skills/ae-analysis/references/sql_table_columns.md +4 -4
- package/skills/ae-analysis/references/sql_table_list.md +5 -5
- package/skills/ae-analysis/references/system_query_monitor_overview.md +2 -0
- package/skills/ae-analysis/references/system_query_task_cancel.md +2 -0
- package/skills/ae-analysis/references/system_query_task_export.md +6 -2
- package/skills/ae-analysis/references/system_query_task_get.md +2 -0
- package/skills/ae-analysis/references/system_query_task_list.md +7 -3
- package/skills/ae-analysis/references/system_query_task_options.md +2 -2
- package/skills/ae-analysis/references/system_query_task_realtime_list.md +15 -0
- package/skills/ae-analysis/references/user_cluster_models.md +8 -0
- package/skills/ae-analysis/references/user_tag_create.md +7 -1
- package/skills/ae-analysis/references/user_tag_get.md +1 -1
- package/skills/ae-analysis/references/user_tag_models.md +20 -2
- package/skills/ae-analysis/references/user_tag_refresh.md +1 -1
- package/skills/ae-analysis/references/user_tag_update.md +2 -2
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-empty-skeleton.mjs +105 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +669 -29
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +21 -8
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +28 -10
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +66 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +285 -24
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-source-zip.mjs +262 -30
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/plan-kb-source-sync.mjs +1 -1
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/precompiled-source.mjs +46 -2
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/prepare-compile-schema.mjs +64 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/refresh-state-parts.mjs +91 -0
- package/skills/ae-automation/SKILL.md +16 -0
- package/skills/ae-automation/references/cli.md +53 -0
- package/skills/ae-automation/references/command_index.md +17 -0
- package/skills/ae-capability/SKILL.md +73 -2
- package/skills/ae-capability/references/collaboration.md +48 -0
- package/skills/ae-community/SKILL.md +5 -1
- package/skills/ae-community/references/collaboration.md +48 -0
- package/skills/ae-current-context/SKILL.md +3 -2
- package/skills/ae-data-integration/SKILL.md +4 -0
- package/skills/ae-data-integration/references/collaboration.md +48 -0
- package/skills/ae-dataops/SKILL.md +54 -74
- package/skills/ae-dataops/references/collaboration.md +48 -0
- package/skills/ae-dataops/references/dataops-backfill.md +23 -18
- package/skills/ae-dataops/references/dataops-flow-create.md +74 -23
- package/skills/ae-dataops/references/dataops-flow-monitor.md +45 -13
- package/skills/ae-dataops/references/dataops-integration.md +57 -30
- package/skills/ae-dataops/references/dataops-query.md +21 -4
- package/skills/ae-dataops/references/dataops-table.md +143 -11
- package/skills/ae-engage/SKILL.md +21 -6
- package/skills/ae-engage/references/channel-mgmt.md +3 -3
- package/skills/ae-engage/references/collaboration.md +48 -0
- package/skills/ae-engage/references/scene-config-channel.md +4 -4
- package/skills/ae-generate-tracking-plan/SKILL.md +4 -0
- package/skills/ae-generate-tracking-plan/references/collaboration.md +48 -0
- package/skills/ae-kb/SKILL.md +70 -12
- package/skills/ae-kb/references/analysis-workflow.md +73 -36
- package/skills/ae-kb/references/collaboration.md +48 -0
- package/skills/ae-kb/references/query-workflow.md +67 -33
- package/skills/ae-kb/references/schema-import.md +32 -0
- package/skills/ae-kb/references/source-mutations.md +6 -4
- package/skills/ae-kb/references/text-sources.md +53 -0
- package/skills/ae-kb-discovery/SKILL.md +8 -3
- package/skills/ae-kb-discovery/references/collaboration.md +48 -0
- package/skills/ae-metadata/SKILL.md +20 -12
- package/skills/ae-metadata/references/collaboration.md +48 -0
- package/skills/ae-team/SKILL.md +23 -17
- package/skills/ae-things/SKILL.md +85 -0
- package/skills/ae-things/references/cli.md +103 -0
- package/skills/ae-things-progress/SKILL.md +43 -0
- package/skills/ae-things-review/SKILL.md +42 -0
- package/skills/ae-workspace/SKILL.md +43 -0
- package/skills/ae-workspace/references/commands.md +51 -0
- package/dist/chunk-E2JKXMVO.js +0 -29
- package/dist/context-IFJI3LIT.js +0 -46
- package/dist/memory-QGPSNCQS.js +0 -892
- package/skills/ae-agent/references/create-automation.md +0 -125
- package/skills/ae-agent/references/list-automations.md +0 -56
- package/skills/ae-agent/references/update-automation.md +0 -107
package/dist/index.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
getLocalCliPackageInfo
|
|
4
|
-
} from "./chunk-E2JKXMVO.js";
|
|
5
|
-
import {
|
|
6
|
-
requiresConfirmation
|
|
7
|
-
} from "./chunk-AMBFK2K3.js";
|
|
8
2
|
import {
|
|
9
3
|
allHeaderNames,
|
|
10
4
|
allSheetNames,
|
|
@@ -20,48 +14,61 @@ import {
|
|
|
20
14
|
validateAndFix,
|
|
21
15
|
validateDraft,
|
|
22
16
|
writeDraftXlsx
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
} from "./chunk-5XJYLEVC.js";
|
|
18
|
+
import {
|
|
19
|
+
requiresConfirmation
|
|
20
|
+
} from "./chunk-AMBFK2K3.js";
|
|
21
|
+
import "./chunk-CT7QDJS6.js";
|
|
22
|
+
import "./chunk-AP7YP2NX.js";
|
|
23
|
+
import "./chunk-S6M42KND.js";
|
|
27
24
|
import {
|
|
28
25
|
resolveHost
|
|
29
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7QXISROD.js";
|
|
30
27
|
import {
|
|
31
28
|
TeAgentApiError,
|
|
32
29
|
TeAgentCredentialsError
|
|
33
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PLE722AJ.js";
|
|
34
31
|
import {
|
|
35
32
|
CapabilityGatewayError,
|
|
36
33
|
executeCapability,
|
|
37
34
|
uploadInputFileBytes
|
|
38
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-EOYSKMXN.js";
|
|
39
36
|
import {
|
|
37
|
+
failInstallation,
|
|
38
|
+
fetchCliConfig,
|
|
40
39
|
formatCapabilityMissCompatHint,
|
|
40
|
+
getLocalCliPackageInfo,
|
|
41
|
+
installVersion,
|
|
42
|
+
newInstallationReport,
|
|
41
43
|
printError,
|
|
42
44
|
printOutput,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
resolveKbAutoDiscoveryFeature,
|
|
46
|
+
runHostCompatCheck,
|
|
47
|
+
shouldSkipAutoSync
|
|
48
|
+
} from "./chunk-KFNMQTZI.js";
|
|
45
49
|
import "./chunk-Y74WTIKJ.js";
|
|
46
50
|
import {
|
|
51
|
+
CredentialStoreUnreadableError,
|
|
47
52
|
SecureStoreAuthError,
|
|
48
|
-
getCliToken
|
|
49
|
-
|
|
53
|
+
getCliToken,
|
|
54
|
+
peekCliToken
|
|
55
|
+
} from "./chunk-GIK6EDUG.js";
|
|
50
56
|
import {
|
|
51
57
|
getActiveHost,
|
|
52
58
|
getConfigDir,
|
|
53
59
|
safeJsonParse
|
|
54
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-UQ77JXYH.js";
|
|
55
61
|
import {
|
|
62
|
+
CliApiError,
|
|
56
63
|
CliValidationError,
|
|
57
64
|
CommunityReportError,
|
|
58
65
|
LocalDataUploadError,
|
|
59
66
|
PermissionError,
|
|
60
67
|
logger
|
|
61
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-WNGFSIOB.js";
|
|
62
69
|
|
|
63
70
|
// src/index.ts
|
|
64
|
-
import { Command as CommanderCommand } from "commander";
|
|
71
|
+
import { Command as CommanderCommand, Option } from "commander";
|
|
65
72
|
import { createRequire } from "module";
|
|
66
73
|
|
|
67
74
|
// src/framework/runner.ts
|
|
@@ -73,6 +80,9 @@ function missingRequiredFlagsError(cmdName, missing) {
|
|
|
73
80
|
const hint = hintParts.length > 0 ? hintParts.join(" ") : `Usage: ae-cli ${cmdName} ${names.map((name) => `${name} <value>`).join(" ")}`;
|
|
74
81
|
return { message, hint };
|
|
75
82
|
}
|
|
83
|
+
function canPromptForConfirmation(input = process.stdin, output = process.stderr) {
|
|
84
|
+
return input.isTTY === true && output.isTTY === true;
|
|
85
|
+
}
|
|
76
86
|
function readSkillCurrentVersion(body) {
|
|
77
87
|
if (!body || typeof body !== "object" || Array.isArray(body)) return void 0;
|
|
78
88
|
const currentVersion = body.currentVersion;
|
|
@@ -202,6 +212,15 @@ async function runCommand(cmd, opts, globalOpts) {
|
|
|
202
212
|
if (requiresConfirmation(cmd.risk)) {
|
|
203
213
|
cmd.preflight?.(ctx);
|
|
204
214
|
if (!globalOpts.yes) {
|
|
215
|
+
if (!canPromptForConfirmation()) {
|
|
216
|
+
throw new CliValidationError(
|
|
217
|
+
"Non-interactive high-risk writes require global --yes.",
|
|
218
|
+
{
|
|
219
|
+
code: "CONFIRMATION_REQUIRED",
|
|
220
|
+
hint: "After explicit authorization, retry with the global --yes flag."
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
}
|
|
205
224
|
const confirmed = await confirm(`This is a high-risk-write operation (${cmdName}). Continue?`);
|
|
206
225
|
if (!confirmed) {
|
|
207
226
|
process.stderr.write("Aborted.\n");
|
|
@@ -231,28 +250,33 @@ async function runCommand(cmd, opts, globalOpts) {
|
|
|
231
250
|
} else if (err instanceof TeAgentCredentialsError) {
|
|
232
251
|
printError("config", message, err.hint);
|
|
233
252
|
} else if (err instanceof PermissionError) {
|
|
234
|
-
printError("permission", message, err.hint, err.code);
|
|
253
|
+
printError("permission", message, err.hint, err.code, void 0, { details: err.details });
|
|
254
|
+
} else if (err instanceof CliApiError) {
|
|
255
|
+
printError("api", message, err.hint, err.code, err.meta);
|
|
235
256
|
} else if (err instanceof CapabilityGatewayError) {
|
|
236
257
|
printError(err.type, message, err.hint ?? capabilityGatewayHint(err), err.code, err.meta);
|
|
237
258
|
} else if (err instanceof CommunityReportError) {
|
|
238
259
|
printError("api", message, err.hint, err.code, err.meta, { log: false });
|
|
239
260
|
} else if (err instanceof LocalDataUploadError) {
|
|
240
261
|
printError("api", message, err.hint, err.code, err.meta, { log: false });
|
|
262
|
+
} else if (err instanceof CredentialStoreUnreadableError) {
|
|
263
|
+
printError("config", message, err.hint, err.code);
|
|
241
264
|
} else if (err instanceof SecureStoreAuthError) {
|
|
242
|
-
printError("auth", message, "Run: ae-cli auth login");
|
|
265
|
+
printError("auth", message, "Run: ae-cli auth login", err.code);
|
|
243
266
|
} else if (err instanceof TeAgentApiError) {
|
|
244
267
|
if (err.status === 403) {
|
|
245
|
-
printError("permission", message);
|
|
268
|
+
printError("permission", message, err.hint, err.code, void 0, { details: err.details });
|
|
246
269
|
} else if (err.status === 401) {
|
|
247
|
-
printError("auth", message, "Run: ae-cli auth login");
|
|
270
|
+
printError("auth", message, err.hint ?? "Run: ae-cli auth login", err.code, void 0, { details: err.details });
|
|
248
271
|
} else {
|
|
249
272
|
const presentation = teAgentApiErrorPresentation(err);
|
|
250
273
|
printError(
|
|
251
|
-
|
|
274
|
+
err.errorType,
|
|
252
275
|
presentation.message ?? message,
|
|
253
|
-
presentation.hint,
|
|
276
|
+
presentation.hint ?? err.hint,
|
|
254
277
|
presentation.code ?? err.code,
|
|
255
|
-
presentation.meta
|
|
278
|
+
presentation.meta,
|
|
279
|
+
{ details: err.details }
|
|
256
280
|
);
|
|
257
281
|
}
|
|
258
282
|
} else if (looksLikeAuthFailure(message)) {
|
|
@@ -302,14 +326,14 @@ function createRuntimeContext(cmd, opts, globalOpts) {
|
|
|
302
326
|
let _communityReportModule = null;
|
|
303
327
|
async function getCommunityReportClient() {
|
|
304
328
|
if (!_communityReportModule) {
|
|
305
|
-
_communityReportModule = await import("./community-report-client-
|
|
329
|
+
_communityReportModule = await import("./community-report-client-PEERQCX2.js");
|
|
306
330
|
}
|
|
307
331
|
return _communityReportModule;
|
|
308
332
|
}
|
|
309
333
|
let _localDataUploadModule = null;
|
|
310
334
|
async function getLocalDataUploadClient() {
|
|
311
335
|
if (!_localDataUploadModule) {
|
|
312
|
-
_localDataUploadModule = await import("./local-data-upload-client-
|
|
336
|
+
_localDataUploadModule = await import("./local-data-upload-client-TWMHFLUA.js");
|
|
313
337
|
}
|
|
314
338
|
return _localDataUploadModule;
|
|
315
339
|
}
|
|
@@ -346,7 +370,7 @@ function createRuntimeContext(cmd, opts, globalOpts) {
|
|
|
346
370
|
list(name) {
|
|
347
371
|
const val = opts[camelCase(name)];
|
|
348
372
|
if (Array.isArray(val)) return val.map(String);
|
|
349
|
-
if (val === void 0 || val === null
|
|
373
|
+
if (val === void 0 || val === null) return [];
|
|
350
374
|
return [String(val)];
|
|
351
375
|
},
|
|
352
376
|
async communityReport(endpoint, rawBody) {
|
|
@@ -357,6 +381,9 @@ function createRuntimeContext(cmd, opts, globalOpts) {
|
|
|
357
381
|
const client = await getLocalDataUploadClient();
|
|
358
382
|
return client.localDataUpload(endpoint, rawBody, options);
|
|
359
383
|
},
|
|
384
|
+
hostOverride() {
|
|
385
|
+
return globalOpts.host;
|
|
386
|
+
},
|
|
360
387
|
host() {
|
|
361
388
|
if (globalOpts.host) return globalOpts.host;
|
|
362
389
|
return getActiveHost();
|
|
@@ -368,7 +395,7 @@ function createRuntimeContext(cmd, opts, globalOpts) {
|
|
|
368
395
|
return cmd.service;
|
|
369
396
|
},
|
|
370
397
|
async out(data) {
|
|
371
|
-
await printOutput(data, globalOpts.format, globalOpts.jq);
|
|
398
|
+
await printOutput(data, globalOpts.format, globalOpts.jq, { redactErrors: cmd.sensitiveOutput });
|
|
372
399
|
}
|
|
373
400
|
};
|
|
374
401
|
return ctx;
|
|
@@ -482,6 +509,20 @@ function extractGlobalOptions(program2) {
|
|
|
482
509
|
};
|
|
483
510
|
}
|
|
484
511
|
|
|
512
|
+
// src/core/feature-config-check.ts
|
|
513
|
+
async function runFeatureConfigCheck(hostOverride, argv = process.argv) {
|
|
514
|
+
if (shouldSkipAutoSync(argv) || argv.slice(2).some((arg) => arg === "--help" || arg === "-h" || arg === "--version" || arg === "-V")) return void 0;
|
|
515
|
+
try {
|
|
516
|
+
const host = hostOverride || getActiveHost();
|
|
517
|
+
if (!host) return void 0;
|
|
518
|
+
const token = peekCliToken(host);
|
|
519
|
+
if (!token) return void 0;
|
|
520
|
+
return await resolveKbAutoDiscoveryFeature(host, token, () => fetchCliConfig(host, token));
|
|
521
|
+
} catch {
|
|
522
|
+
return void 0;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
485
526
|
// src/commands/tracking/plan.ts
|
|
486
527
|
import { readFile, writeFile, cp } from "fs/promises";
|
|
487
528
|
import path2, { resolve as resolve2 } from "path";
|
|
@@ -1502,7 +1543,10 @@ async function detectProject(cwd) {
|
|
|
1502
1543
|
// src/tracking/xlsx/read.ts
|
|
1503
1544
|
import * as nodeFs from "fs";
|
|
1504
1545
|
import path3 from "path";
|
|
1505
|
-
set_fs
|
|
1546
|
+
var setXlsxFs = set_fs;
|
|
1547
|
+
if (typeof setXlsxFs === "function") {
|
|
1548
|
+
setXlsxFs(nodeFs);
|
|
1549
|
+
}
|
|
1506
1550
|
var VALID_PROP_TYPES = /* @__PURE__ */ new Set(["string", "number", "bool", "datetime", "object", "array_row", "array_string"]);
|
|
1507
1551
|
var VALID_UPDATE_TYPES = /* @__PURE__ */ new Set(["user_set", "user_setOnce", "user_add", "user_append"]);
|
|
1508
1552
|
function normalizeHeader(h) {
|
|
@@ -2258,7 +2302,13 @@ function getOrCreateCommand(parent, name, description) {
|
|
|
2258
2302
|
|
|
2259
2303
|
// src/framework/program-lifecycle.ts
|
|
2260
2304
|
async function parseProgram(program2, argv = process.argv) {
|
|
2261
|
-
|
|
2305
|
+
try {
|
|
2306
|
+
await program2.parseAsync(normalizeSubcommandVersionOption(program2, argv));
|
|
2307
|
+
} catch (error) {
|
|
2308
|
+
if (!(error instanceof CredentialStoreUnreadableError)) throw error;
|
|
2309
|
+
printError("config", error.message, error.hint, error.code);
|
|
2310
|
+
process.exitCode = 1;
|
|
2311
|
+
}
|
|
2262
2312
|
}
|
|
2263
2313
|
function normalizeSubcommandVersionOption(program2, argv) {
|
|
2264
2314
|
const normalized = [...argv];
|
|
@@ -2315,6 +2365,51 @@ function findOption(command, flag) {
|
|
|
2315
2365
|
return void 0;
|
|
2316
2366
|
}
|
|
2317
2367
|
|
|
2368
|
+
// src/commands/install.ts
|
|
2369
|
+
function registerInstall(program2) {
|
|
2370
|
+
program2.command("install").description("Install and verify this CLI distribution and its matching global Skills").option("--host <url>", "Check authentication for this AE host after installation").addHelpText("after", "\nExamples:\n npx @thinkingai/ae-cli@latest install\n ae-cli install --dry-run --format json\n ae-cli install --host https://your-ae-host.example.com\n\nSkills are installed globally in ~/.agents/skills with client adaptation handled automatically.\nGlobal options: --dry-run, --format json|table. Supports macOS, Linux, and native Windows.\n").action(async (opts) => {
|
|
2371
|
+
const pkg2 = getLocalCliPackageInfo();
|
|
2372
|
+
const global = program2.opts();
|
|
2373
|
+
const format = program2.getOptionValueSource("format") === "default" && process.stdout.isTTY ? "table" : global.format;
|
|
2374
|
+
let report = newInstallationReport(pkg2.name, pkg2.version, Boolean(global.dryRun));
|
|
2375
|
+
try {
|
|
2376
|
+
if (!["json", "table"].includes(format) || global.jq || global.validate) {
|
|
2377
|
+
throw new Error("Installation supports --format json|table and --dry-run; --jq and --validate are not supported.");
|
|
2378
|
+
}
|
|
2379
|
+
const result = installVersion(pkg2.version, {
|
|
2380
|
+
packageName: pkg2.name,
|
|
2381
|
+
host: opts.host || global.host,
|
|
2382
|
+
dryRun: global.dryRun,
|
|
2383
|
+
progress: (message) => process.stderr.write(`${message}
|
|
2384
|
+
`)
|
|
2385
|
+
});
|
|
2386
|
+
report = result.report ?? failInstallation(
|
|
2387
|
+
report,
|
|
2388
|
+
result.ok ? "environment" : result.stage,
|
|
2389
|
+
result.ok ? "Installation result is unavailable." : result.message,
|
|
2390
|
+
result.ok ? "unknown" : result.cause
|
|
2391
|
+
);
|
|
2392
|
+
} catch (error) {
|
|
2393
|
+
report = failInstallation(report, "environment", error instanceof Error ? error.message : "Installation failed.");
|
|
2394
|
+
}
|
|
2395
|
+
const output = format === "table" ? [
|
|
2396
|
+
report.dry_run ? "AE CLI installation plan (no changes)" : report.ok ? "AE CLI installation complete" : "AE CLI installation incomplete",
|
|
2397
|
+
`CLI: ${report.cli.package}@${report.cli.version} (${report.cli.verified ? "verified" : "not verified"})`,
|
|
2398
|
+
`Command: ${report.cli.path ?? "pending"}`,
|
|
2399
|
+
`Global Skills: ${report.skills.installed_count}/${report.skills.expected_count} verified in ${report.skills.directory}`,
|
|
2400
|
+
...report.skills.failures.map((failure) => `- ${failure.skill}: ${failure.reason}`),
|
|
2401
|
+
...report.cli.warnings,
|
|
2402
|
+
...report.auth.warnings,
|
|
2403
|
+
...report.error ? [report.error.message] : [],
|
|
2404
|
+
...report.commands ?? [],
|
|
2405
|
+
...report.next_steps
|
|
2406
|
+
].join("\n") : JSON.stringify(report, null, 2);
|
|
2407
|
+
process.stdout.write(`${output}
|
|
2408
|
+
`);
|
|
2409
|
+
if (!report.ok) process.exitCode = 1;
|
|
2410
|
+
});
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2318
2413
|
// src/index.ts
|
|
2319
2414
|
var require2 = createRequire(import.meta.url);
|
|
2320
2415
|
var pkg = require2("../package.json");
|
|
@@ -2329,6 +2424,9 @@ program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE
|
|
|
2329
2424
|
"Optional: pre-execution preview without business logic (gateway /dry-run; other transports preview). Use alone to confirm a run; do not stack with --validate",
|
|
2330
2425
|
false
|
|
2331
2426
|
).option("--yes", "Skip confirmation for high-risk write operations", false).option("--no-update-check", "Skip host compatibility checks", false);
|
|
2427
|
+
program.addOption(
|
|
2428
|
+
new Option("--agent-context <base64url-json>", "Internal agent context payload for gateway telemetry").hideHelp()
|
|
2429
|
+
);
|
|
2332
2430
|
function warnLoadFailure(label, err) {
|
|
2333
2431
|
const reason = err instanceof Error ? err.message : String(err);
|
|
2334
2432
|
process.stderr.write(`warning: failed to load ${label}: ${reason}
|
|
@@ -2337,85 +2435,99 @@ function warnLoadFailure(label, err) {
|
|
|
2337
2435
|
async function loadCommands() {
|
|
2338
2436
|
const commands = [];
|
|
2339
2437
|
try {
|
|
2340
|
-
const teAnalysis = await import("./te-analysis-
|
|
2438
|
+
const teAnalysis = await import("./te-analysis-U4I2W2WC.js");
|
|
2341
2439
|
commands.push(...teAnalysis.default);
|
|
2342
2440
|
} catch (err) {
|
|
2343
2441
|
warnLoadFailure("domain te-analysis", err);
|
|
2344
2442
|
}
|
|
2345
2443
|
try {
|
|
2346
|
-
const engage = await import("./te-engage-
|
|
2444
|
+
const engage = await import("./te-engage-ZX76CNAB.js");
|
|
2347
2445
|
commands.push(...engage.default);
|
|
2348
2446
|
} catch (err) {
|
|
2349
2447
|
warnLoadFailure("domain te-engage", err);
|
|
2350
2448
|
}
|
|
2351
2449
|
try {
|
|
2352
|
-
const community = await import("./te-community-
|
|
2450
|
+
const community = await import("./te-community-PFLDLPP4.js");
|
|
2353
2451
|
commands.push(...community.default);
|
|
2354
2452
|
} catch (err) {
|
|
2355
2453
|
warnLoadFailure("domain te-community", err);
|
|
2356
2454
|
}
|
|
2357
2455
|
try {
|
|
2358
|
-
const dataops = await import("./te-dataops-
|
|
2456
|
+
const dataops = await import("./te-dataops-FOQSRIAZ.js");
|
|
2359
2457
|
commands.push(...dataops.default);
|
|
2360
2458
|
} catch (err) {
|
|
2361
2459
|
warnLoadFailure("domain te-dataops", err);
|
|
2362
2460
|
}
|
|
2363
2461
|
try {
|
|
2364
|
-
const teKb = await import("./te-kb-
|
|
2462
|
+
const teKb = await import("./te-kb-MHDOST62.js");
|
|
2365
2463
|
commands.push(...teKb.default);
|
|
2366
2464
|
} catch (err) {
|
|
2367
2465
|
warnLoadFailure("domain te-kb", err);
|
|
2368
2466
|
}
|
|
2369
2467
|
try {
|
|
2370
|
-
const teTeam = await import("./te-team-
|
|
2468
|
+
const teTeam = await import("./te-team-5UOZPTU3.js");
|
|
2371
2469
|
commands.push(...teTeam.default);
|
|
2372
2470
|
} catch (err) {
|
|
2373
2471
|
warnLoadFailure("domain te-team", err);
|
|
2374
2472
|
}
|
|
2375
2473
|
try {
|
|
2376
|
-
const teAgent = await import("./te-agent-
|
|
2474
|
+
const teAgent = await import("./te-agent-F5QBZSQA.js");
|
|
2377
2475
|
commands.push(...teAgent.default);
|
|
2378
2476
|
} catch (err) {
|
|
2379
2477
|
warnLoadFailure("domain te-agent", err);
|
|
2380
2478
|
}
|
|
2381
2479
|
try {
|
|
2382
|
-
const memory = await import("./memory-
|
|
2480
|
+
const memory = await import("./memory-62BJOULV.js");
|
|
2383
2481
|
commands.push(...memory.default);
|
|
2384
2482
|
} catch (err) {
|
|
2385
2483
|
warnLoadFailure("domain memory", err);
|
|
2386
2484
|
}
|
|
2485
|
+
const automation = await import("./automation-NWWVLWG2.js");
|
|
2486
|
+
commands.push(...automation.default);
|
|
2487
|
+
try {
|
|
2488
|
+
const things = await import("./things-VPPXXLHB.js");
|
|
2489
|
+
commands.push(...things.default);
|
|
2490
|
+
} catch (err) {
|
|
2491
|
+
warnLoadFailure("domain things", err);
|
|
2492
|
+
}
|
|
2493
|
+
try {
|
|
2494
|
+
const workspace = await import("./workspace-O3EEIYQM.js");
|
|
2495
|
+
commands.push(...workspace.default);
|
|
2496
|
+
} catch (err) {
|
|
2497
|
+
warnLoadFailure("domain workspace", err);
|
|
2498
|
+
}
|
|
2387
2499
|
try {
|
|
2388
|
-
const teSystem = await import("./te-system-
|
|
2500
|
+
const teSystem = await import("./te-system-J2FQF5ER.js");
|
|
2389
2501
|
commands.push(...teSystem.default);
|
|
2390
2502
|
} catch (err) {
|
|
2391
2503
|
warnLoadFailure("domain te-system", err);
|
|
2392
2504
|
}
|
|
2393
2505
|
try {
|
|
2394
|
-
const metadata = await import("./metadata-
|
|
2506
|
+
const metadata = await import("./metadata-7CUMWIB4.js");
|
|
2395
2507
|
commands.push(...metadata.default);
|
|
2396
2508
|
} catch (err) {
|
|
2397
2509
|
warnLoadFailure("domain metadata", err);
|
|
2398
2510
|
}
|
|
2399
2511
|
try {
|
|
2400
|
-
const personalSemanticPreference = await import("./personal-semantic-preference-
|
|
2512
|
+
const personalSemanticPreference = await import("./personal-semantic-preference-6SRCYPGE.js");
|
|
2401
2513
|
commands.push(...personalSemanticPreference.default);
|
|
2402
2514
|
} catch (err) {
|
|
2403
2515
|
warnLoadFailure("domain personal-semantic-preference", err);
|
|
2404
2516
|
}
|
|
2405
2517
|
try {
|
|
2406
|
-
const projectSemantic = await import("./project-semantic-
|
|
2518
|
+
const projectSemantic = await import("./project-semantic-YYEM4OSU.js");
|
|
2407
2519
|
commands.push(...projectSemantic.default);
|
|
2408
2520
|
} catch (err) {
|
|
2409
2521
|
warnLoadFailure("domain project-semantic", err);
|
|
2410
2522
|
}
|
|
2411
2523
|
try {
|
|
2412
|
-
const dataIntegration = await import("./data-integration-
|
|
2524
|
+
const dataIntegration = await import("./data-integration-HESZET7E.js");
|
|
2413
2525
|
commands.push(...dataIntegration.default);
|
|
2414
2526
|
} catch (err) {
|
|
2415
2527
|
warnLoadFailure("domain data-integration", err);
|
|
2416
2528
|
}
|
|
2417
2529
|
try {
|
|
2418
|
-
const context = await import("./context-
|
|
2530
|
+
const context = await import("./context-YAE3QXP3.js");
|
|
2419
2531
|
commands.push(...context.default);
|
|
2420
2532
|
} catch (err) {
|
|
2421
2533
|
warnLoadFailure("domain context", err);
|
|
@@ -2424,7 +2536,7 @@ async function loadCommands() {
|
|
|
2424
2536
|
}
|
|
2425
2537
|
async function registerAuthCommands() {
|
|
2426
2538
|
try {
|
|
2427
|
-
const { registerAuth } = await import("./auth-
|
|
2539
|
+
const { registerAuth } = await import("./auth-MBWRZTB6.js");
|
|
2428
2540
|
registerAuth(program);
|
|
2429
2541
|
} catch (err) {
|
|
2430
2542
|
warnLoadFailure("auth commands", err);
|
|
@@ -2432,7 +2544,7 @@ async function registerAuthCommands() {
|
|
|
2432
2544
|
}
|
|
2433
2545
|
async function registerConfigCommands() {
|
|
2434
2546
|
try {
|
|
2435
|
-
const { registerConfig } = await import("./config-
|
|
2547
|
+
const { registerConfig } = await import("./config-FF6YVJKI.js");
|
|
2436
2548
|
registerConfig(program);
|
|
2437
2549
|
} catch (err) {
|
|
2438
2550
|
warnLoadFailure("config commands", err);
|
|
@@ -2440,7 +2552,7 @@ async function registerConfigCommands() {
|
|
|
2440
2552
|
}
|
|
2441
2553
|
async function registerCapabilityCommands() {
|
|
2442
2554
|
try {
|
|
2443
|
-
const { registerCapability } = await import("./capability-
|
|
2555
|
+
const { registerCapability } = await import("./capability-7SSN6PNZ.js");
|
|
2444
2556
|
registerCapability(program);
|
|
2445
2557
|
} catch (err) {
|
|
2446
2558
|
warnLoadFailure("capability commands", err);
|
|
@@ -2448,7 +2560,7 @@ async function registerCapabilityCommands() {
|
|
|
2448
2560
|
}
|
|
2449
2561
|
async function registerSyncCommand() {
|
|
2450
2562
|
try {
|
|
2451
|
-
const { registerSync } = await import("./sync-
|
|
2563
|
+
const { registerSync } = await import("./sync-SU33KYX7.js");
|
|
2452
2564
|
registerSync(program);
|
|
2453
2565
|
} catch (err) {
|
|
2454
2566
|
warnLoadFailure("sync commands", err);
|
|
@@ -2456,7 +2568,7 @@ async function registerSyncCommand() {
|
|
|
2456
2568
|
}
|
|
2457
2569
|
async function registerModelCommand() {
|
|
2458
2570
|
try {
|
|
2459
|
-
const { registerModel } = await import("./model-
|
|
2571
|
+
const { registerModel } = await import("./model-SBV2JFJI.js");
|
|
2460
2572
|
registerModel(program);
|
|
2461
2573
|
} catch (err) {
|
|
2462
2574
|
warnLoadFailure("model commands", err);
|
|
@@ -2464,7 +2576,7 @@ async function registerModelCommand() {
|
|
|
2464
2576
|
}
|
|
2465
2577
|
async function registerUpdateCommand() {
|
|
2466
2578
|
try {
|
|
2467
|
-
const { registerUpdate } = await import("./update-
|
|
2579
|
+
const { registerUpdate } = await import("./update-EEUTEI6R.js");
|
|
2468
2580
|
registerUpdate(program);
|
|
2469
2581
|
} catch (err) {
|
|
2470
2582
|
warnLoadFailure("update commands", err);
|
|
@@ -2497,6 +2609,7 @@ async function main() {
|
|
|
2497
2609
|
return;
|
|
2498
2610
|
}
|
|
2499
2611
|
}
|
|
2612
|
+
await runFeatureConfigCheck(globalOptionValue(process.argv.slice(2), "--host"));
|
|
2500
2613
|
const commands = await loadCommands();
|
|
2501
2614
|
registerCommands(program, commands);
|
|
2502
2615
|
await registerAuthCommands();
|
|
@@ -2505,6 +2618,7 @@ async function main() {
|
|
|
2505
2618
|
await registerSyncCommand();
|
|
2506
2619
|
await registerModelCommand();
|
|
2507
2620
|
await registerUpdateCommand();
|
|
2621
|
+
registerInstall(program);
|
|
2508
2622
|
registerTracking(program);
|
|
2509
2623
|
rejectUnknownHelpCommandPath(program, process.argv.slice(2));
|
|
2510
2624
|
await parseProgram(program);
|
|
@@ -2542,7 +2656,7 @@ function optionConsumesValue(token) {
|
|
|
2542
2656
|
if (token.includes("=")) {
|
|
2543
2657
|
return false;
|
|
2544
2658
|
}
|
|
2545
|
-
return token === "--host" || token === "--mcp-url" || token === "--format" || token === "--jq";
|
|
2659
|
+
return token === "--host" || token === "--mcp-url" || token === "--format" || token === "--jq" || token === "--agent-context";
|
|
2546
2660
|
}
|
|
2547
2661
|
function globalOptionValue(args, option) {
|
|
2548
2662
|
for (let i = 0; i < args.length; i += 1) {
|
|
@@ -2562,7 +2676,7 @@ function isRootUpdateCommand(args) {
|
|
|
2562
2676
|
}
|
|
2563
2677
|
continue;
|
|
2564
2678
|
}
|
|
2565
|
-
return token === "update";
|
|
2679
|
+
return token === "update" || token === "install";
|
|
2566
2680
|
}
|
|
2567
2681
|
return false;
|
|
2568
2682
|
}
|
|
@@ -2,7 +2,7 @@ import { createRequire as __createRequire } from 'node:module'; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
LocalDataUploadError,
|
|
4
4
|
logger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WNGFSIOB.js";
|
|
6
6
|
|
|
7
7
|
// src/core/local-data-upload-client.ts
|
|
8
8
|
import { createHash } from "crypto";
|