@thinkingai/ae-cli 6.1.8 → 6.1.9
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 +219 -150
- package/README.zh.md +227 -159
- package/dist/{auth-B2BRSYMS.js → auth-56Z45UVR.js} +1 -1
- package/dist/{capability-6KPXYNO7.js → capability-2H6PAOA3.js} +1 -1
- package/dist/{capability-ROKYESAP.js → capability-YPOQX6PL.js} +1 -1
- package/dist/{chunk-JTKMDN4A.js → chunk-KTYR3U6D.js} +471 -31
- package/dist/{chunk-EBPXT3TN.js → chunk-LHVM35J4.js} +1 -1
- package/dist/{chunk-RRFK2W7I.js → chunk-PVBYJWC2.js} +1 -1
- package/dist/{config-DDYJPJX3.js → config-BSSALXEN.js} +1 -1
- package/dist/index.js +45 -15
- package/dist/{metadata-2ZFRMVOL.js → metadata-AN3YFZEV.js} +2 -2
- package/dist/{metadata-ABQCKU5P.js → metadata-JIQ77HFY.js} +2 -2
- package/dist/{raw-6HXFFHLV.js → raw-XJCAT3HX.js} +1 -1
- package/dist/{sync-BF3IWYFC.js → sync-QFP4XFN3.js} +1 -1
- package/dist/{te-agent-3GJ5H2XF.js → te-agent-JHUG6DVV.js} +27 -0
- package/dist/{te-analysis-PCGESPLW.js → te-analysis-IWQZO423.js} +2 -2
- package/dist/{te-analysis-DJ6KELTU.js → te-analysis-X222IRYR.js} +2 -2
- package/dist/{te-dataops-ROHUJOX5.js → te-dataops-PZQ5NQLY.js} +1 -1
- package/dist/{te-dataops-LXL5YULV.js → te-dataops-XTWVTJCA.js} +1 -1
- package/dist/{te-engage-2YDCA552.js → te-engage-E7F4HTXU.js} +2 -2
- package/dist/{te-engage-VW6NJZ5V.js → te-engage-NLZUPSBK.js} +2 -2
- package/dist/{te-experiment-OYK54B72.js → te-experiment-D32TB6ZB.js} +2 -2
- package/dist/{te-experiment-7JGJNDXO.js → te-experiment-N63WF7XA.js} +2 -2
- package/dist/{te-team-RRZI4WRI.js → te-team-BQ3SKSZV.js} +1 -1
- package/dist/{update-ER7VFU55.js → update-DKG6UXEM.js} +44 -22
- package/package.json +4 -3
- package/skills/ae-agent/SKILL.md +2 -2
- package/skills/ae-agent/references/create-automation.md +11 -0
- package/skills/ae-agent/references/update-automation.md +11 -3
- package/skills/ae-generate-tracking-code/SKILL.md +5 -5
- package/skills/ae-generate-tracking-code/references/autotrack-enum.md +4 -4
- package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +1 -1
- package/skills/ae-generate-tracking-code/references/debug-script.md +2 -2
- package/skills/ae-generate-tracking-code/references/logbus-config.md +1 -1
- package/skills/ae-generate-tracking-code/references/restful-call.md +1 -1
- package/skills/ae-generate-tracking-code/references/sdk-index.md +36 -36
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
printError,
|
|
19
19
|
printOutput,
|
|
20
20
|
runHostCompatCheck
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KTYR3U6D.js";
|
|
22
22
|
import {
|
|
23
23
|
clearCliToken,
|
|
24
24
|
getCliToken
|
|
@@ -3388,7 +3388,7 @@ program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE
|
|
|
3388
3388
|
async function loadCommands() {
|
|
3389
3389
|
const commands = [];
|
|
3390
3390
|
try {
|
|
3391
|
-
const teAnalysis = await import("./te-analysis-
|
|
3391
|
+
const teAnalysis = await import("./te-analysis-IWQZO423.js");
|
|
3392
3392
|
commands.push(...teAnalysis.default);
|
|
3393
3393
|
} catch {
|
|
3394
3394
|
}
|
|
@@ -3398,12 +3398,12 @@ async function loadCommands() {
|
|
|
3398
3398
|
} catch {
|
|
3399
3399
|
}
|
|
3400
3400
|
try {
|
|
3401
|
-
const engage = await import("./te-engage-
|
|
3401
|
+
const engage = await import("./te-engage-NLZUPSBK.js");
|
|
3402
3402
|
commands.push(...engage.default);
|
|
3403
3403
|
} catch {
|
|
3404
3404
|
}
|
|
3405
3405
|
try {
|
|
3406
|
-
const experiment = await import("./te-experiment-
|
|
3406
|
+
const experiment = await import("./te-experiment-N63WF7XA.js");
|
|
3407
3407
|
commands.push(...experiment.default);
|
|
3408
3408
|
} catch {
|
|
3409
3409
|
}
|
|
@@ -3413,7 +3413,7 @@ async function loadCommands() {
|
|
|
3413
3413
|
} catch {
|
|
3414
3414
|
}
|
|
3415
3415
|
try {
|
|
3416
|
-
const dataops = await import("./te-dataops-
|
|
3416
|
+
const dataops = await import("./te-dataops-XTWVTJCA.js");
|
|
3417
3417
|
commands.push(...dataops.default);
|
|
3418
3418
|
} catch {
|
|
3419
3419
|
}
|
|
@@ -3423,12 +3423,12 @@ async function loadCommands() {
|
|
|
3423
3423
|
} catch {
|
|
3424
3424
|
}
|
|
3425
3425
|
try {
|
|
3426
|
-
const teTeam = await import("./te-team-
|
|
3426
|
+
const teTeam = await import("./te-team-BQ3SKSZV.js");
|
|
3427
3427
|
commands.push(...teTeam.default);
|
|
3428
3428
|
} catch {
|
|
3429
3429
|
}
|
|
3430
3430
|
try {
|
|
3431
|
-
const teAgent = await import("./te-agent-
|
|
3431
|
+
const teAgent = await import("./te-agent-JHUG6DVV.js");
|
|
3432
3432
|
commands.push(...teAgent.default);
|
|
3433
3433
|
} catch {
|
|
3434
3434
|
}
|
|
@@ -3438,7 +3438,7 @@ async function loadCommands() {
|
|
|
3438
3438
|
} catch {
|
|
3439
3439
|
}
|
|
3440
3440
|
try {
|
|
3441
|
-
const metadata = await import("./metadata-
|
|
3441
|
+
const metadata = await import("./metadata-AN3YFZEV.js");
|
|
3442
3442
|
commands.push(...metadata.default);
|
|
3443
3443
|
} catch {
|
|
3444
3444
|
}
|
|
@@ -3446,35 +3446,35 @@ async function loadCommands() {
|
|
|
3446
3446
|
}
|
|
3447
3447
|
async function registerAuthCommands() {
|
|
3448
3448
|
try {
|
|
3449
|
-
const { registerAuth } = await import("./auth-
|
|
3449
|
+
const { registerAuth } = await import("./auth-56Z45UVR.js");
|
|
3450
3450
|
registerAuth(program);
|
|
3451
3451
|
} catch {
|
|
3452
3452
|
}
|
|
3453
3453
|
}
|
|
3454
3454
|
async function registerConfigCommands() {
|
|
3455
3455
|
try {
|
|
3456
|
-
const { registerConfig } = await import("./config-
|
|
3456
|
+
const { registerConfig } = await import("./config-BSSALXEN.js");
|
|
3457
3457
|
registerConfig(program);
|
|
3458
3458
|
} catch {
|
|
3459
3459
|
}
|
|
3460
3460
|
}
|
|
3461
3461
|
async function registerApiCommand() {
|
|
3462
3462
|
try {
|
|
3463
|
-
const { registerApi } = await import("./raw-
|
|
3463
|
+
const { registerApi } = await import("./raw-XJCAT3HX.js");
|
|
3464
3464
|
registerApi(program);
|
|
3465
3465
|
} catch {
|
|
3466
3466
|
}
|
|
3467
3467
|
}
|
|
3468
3468
|
async function registerCapabilityCommands() {
|
|
3469
3469
|
try {
|
|
3470
|
-
const { registerCapability } = await import("./capability-
|
|
3470
|
+
const { registerCapability } = await import("./capability-YPOQX6PL.js");
|
|
3471
3471
|
registerCapability(program);
|
|
3472
3472
|
} catch {
|
|
3473
3473
|
}
|
|
3474
3474
|
}
|
|
3475
3475
|
async function registerSyncCommand() {
|
|
3476
3476
|
try {
|
|
3477
|
-
const { registerSync } = await import("./sync-
|
|
3477
|
+
const { registerSync } = await import("./sync-QFP4XFN3.js");
|
|
3478
3478
|
registerSync(program);
|
|
3479
3479
|
} catch {
|
|
3480
3480
|
}
|
|
@@ -3488,7 +3488,7 @@ async function registerModelCommand() {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
async function registerUpdateCommand() {
|
|
3490
3490
|
try {
|
|
3491
|
-
const { registerUpdate } = await import("./update-
|
|
3491
|
+
const { registerUpdate } = await import("./update-DKG6UXEM.js");
|
|
3492
3492
|
registerUpdate(program);
|
|
3493
3493
|
} catch {
|
|
3494
3494
|
}
|
|
@@ -3496,7 +3496,29 @@ async function registerUpdateCommand() {
|
|
|
3496
3496
|
async function main() {
|
|
3497
3497
|
const pkgInfo = getLocalCliPackageInfo();
|
|
3498
3498
|
if (!isRootUpdateCommand(process.argv.slice(2))) {
|
|
3499
|
-
await runHostCompatCheck(
|
|
3499
|
+
const compat = await runHostCompatCheck(
|
|
3500
|
+
pkgInfo,
|
|
3501
|
+
globalOptionValue(process.argv.slice(2), "--host")
|
|
3502
|
+
);
|
|
3503
|
+
if (compat.status === "synced") {
|
|
3504
|
+
const message = compat.direction === "skills" ? `Skills were synchronized for ae-cli ${compat.expected}.` : `ae-cli changed from ${compat.current} to ${compat.expected} for this host.`;
|
|
3505
|
+
printError(
|
|
3506
|
+
"config",
|
|
3507
|
+
message,
|
|
3508
|
+
"Re-run the previous command to use the synchronized CLI and Skills.",
|
|
3509
|
+
"AE_CLI_VERSION_SYNCED",
|
|
3510
|
+
{
|
|
3511
|
+
current: compat.current,
|
|
3512
|
+
expected: compat.expected,
|
|
3513
|
+
cluster: compat.cluster,
|
|
3514
|
+
direction: compat.direction,
|
|
3515
|
+
retryOriginalCommand: true
|
|
3516
|
+
},
|
|
3517
|
+
{ log: false }
|
|
3518
|
+
);
|
|
3519
|
+
process.exitCode = 1;
|
|
3520
|
+
return;
|
|
3521
|
+
}
|
|
3500
3522
|
}
|
|
3501
3523
|
const commands = await loadCommands();
|
|
3502
3524
|
registerCommands(program, commands);
|
|
@@ -3546,6 +3568,14 @@ function optionConsumesValue(token) {
|
|
|
3546
3568
|
}
|
|
3547
3569
|
return token === "--host" || token === "--mcp-url" || token === "--format" || token === "--jq";
|
|
3548
3570
|
}
|
|
3571
|
+
function globalOptionValue(args, option) {
|
|
3572
|
+
for (let i = 0; i < args.length; i += 1) {
|
|
3573
|
+
const token = args[i];
|
|
3574
|
+
if (token === option) return args[i + 1];
|
|
3575
|
+
if (token.startsWith(`${option}=`)) return token.slice(option.length + 1);
|
|
3576
|
+
}
|
|
3577
|
+
return void 0;
|
|
3578
|
+
}
|
|
3549
3579
|
function isRootUpdateCommand(args) {
|
|
3550
3580
|
for (let i = 0; i < args.length; i += 1) {
|
|
3551
3581
|
const token = args[i];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PVBYJWC2.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute
|
|
6
6
|
} from "./chunk-PTE56QPL.js";
|
|
7
7
|
import "./chunk-HQ2A7ITL.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KTYR3U6D.js";
|
|
9
9
|
import "./chunk-E7UXXHO3.js";
|
|
10
10
|
import "./chunk-IR4ZLVPW.js";
|
|
11
11
|
import "./chunk-V6FR6WTW.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LHVM35J4.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute
|
|
6
6
|
} from "./chunk-PTE56QPL.js";
|
|
7
7
|
import "./chunk-RGXCNC4N.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KTYR3U6D.js";
|
|
9
9
|
import "./chunk-E7UXXHO3.js";
|
|
10
10
|
import "./chunk-IR4ZLVPW.js";
|
|
11
11
|
import "./chunk-V6FR6WTW.js";
|
|
@@ -2169,6 +2169,17 @@ function readEnabledOptional(ctx) {
|
|
|
2169
2169
|
}
|
|
2170
2170
|
return enabled;
|
|
2171
2171
|
}
|
|
2172
|
+
function readReuseConversation(ctx) {
|
|
2173
|
+
return readReuseConversationOptional(ctx) ?? false;
|
|
2174
|
+
}
|
|
2175
|
+
function readReuseConversationOptional(ctx) {
|
|
2176
|
+
const reuseConversation = ctx.json("reuseConversation");
|
|
2177
|
+
if (reuseConversation === void 0) return void 0;
|
|
2178
|
+
if (typeof reuseConversation !== "boolean") {
|
|
2179
|
+
throw new Error("--reuse-conversation must be true or false");
|
|
2180
|
+
}
|
|
2181
|
+
return reuseConversation;
|
|
2182
|
+
}
|
|
2172
2183
|
function buildSchedule(ctx) {
|
|
2173
2184
|
const kind = optional(ctx.str("scheduleKind"));
|
|
2174
2185
|
if (!kind) return void 0;
|
|
@@ -2248,6 +2259,7 @@ function buildCreateBody(ctx) {
|
|
|
2248
2259
|
schedule: buildSchedule(ctx),
|
|
2249
2260
|
triggerType: "scheduled",
|
|
2250
2261
|
model,
|
|
2262
|
+
reuseConversation: readReuseConversation(ctx),
|
|
2251
2263
|
status: enabled ? "active" : "paused"
|
|
2252
2264
|
};
|
|
2253
2265
|
}
|
|
@@ -2276,6 +2288,7 @@ function validateList(ctx) {
|
|
|
2276
2288
|
}
|
|
2277
2289
|
function buildUpdateBody2(ctx) {
|
|
2278
2290
|
const enabled = readEnabledOptional(ctx);
|
|
2291
|
+
const reuseConversation = readReuseConversationOptional(ctx);
|
|
2279
2292
|
const body = {};
|
|
2280
2293
|
const name = optional(ctx.str("name"));
|
|
2281
2294
|
const message = optional(ctx.str("message"));
|
|
@@ -2284,6 +2297,8 @@ function buildUpdateBody2(ctx) {
|
|
|
2284
2297
|
if (name) body.name = name;
|
|
2285
2298
|
if (message !== void 0) body.message = message;
|
|
2286
2299
|
if (enabled !== void 0) body.status = enabled ? "active" : "paused";
|
|
2300
|
+
if (reuseConversation !== void 0)
|
|
2301
|
+
body.reuseConversation = reuseConversation;
|
|
2287
2302
|
if (cron) body.cronExpression = cron;
|
|
2288
2303
|
if (schedule) body.schedule = schedule;
|
|
2289
2304
|
return body;
|
|
@@ -2405,6 +2420,12 @@ var createAutomation = {
|
|
|
2405
2420
|
required: false,
|
|
2406
2421
|
desc: "Whether to enable the automation immediately; defaults to true"
|
|
2407
2422
|
},
|
|
2423
|
+
{
|
|
2424
|
+
name: "reuse-conversation",
|
|
2425
|
+
type: "boolean",
|
|
2426
|
+
required: false,
|
|
2427
|
+
desc: "Continue future runs in the same conversation; defaults to false"
|
|
2428
|
+
},
|
|
2408
2429
|
{
|
|
2409
2430
|
name: "conversation-id",
|
|
2410
2431
|
type: "string",
|
|
@@ -2456,6 +2477,12 @@ var updateAutomation = {
|
|
|
2456
2477
|
required: false,
|
|
2457
2478
|
desc: "true to enable, false to pause"
|
|
2458
2479
|
},
|
|
2480
|
+
{
|
|
2481
|
+
name: "reuse-conversation",
|
|
2482
|
+
type: "boolean",
|
|
2483
|
+
required: false,
|
|
2484
|
+
desc: "true to reuse one conversation, false to create one per run"
|
|
2485
|
+
},
|
|
2459
2486
|
...scheduleFlags
|
|
2460
2487
|
],
|
|
2461
2488
|
risk: "write",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PVBYJWC2.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute,
|
|
6
6
|
resolveGatewayDomain
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-HQ2A7ITL.js";
|
|
19
19
|
import {
|
|
20
20
|
withOutputMetadata
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KTYR3U6D.js";
|
|
22
22
|
import "./chunk-E7UXXHO3.js";
|
|
23
23
|
import "./chunk-IR4ZLVPW.js";
|
|
24
24
|
import "./chunk-V6FR6WTW.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LHVM35J4.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute,
|
|
6
6
|
resolveGatewayDomain
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-RGXCNC4N.js";
|
|
19
19
|
import {
|
|
20
20
|
withOutputMetadata
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KTYR3U6D.js";
|
|
22
22
|
import "./chunk-E7UXXHO3.js";
|
|
23
23
|
import "./chunk-IR4ZLVPW.js";
|
|
24
24
|
import "./chunk-V6FR6WTW.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LHVM35J4.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute
|
|
6
6
|
} from "./chunk-PTE56QPL.js";
|
|
7
7
|
import "./chunk-RGXCNC4N.js";
|
|
8
8
|
import {
|
|
9
9
|
printError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KTYR3U6D.js";
|
|
11
11
|
import "./chunk-E7UXXHO3.js";
|
|
12
12
|
import "./chunk-IR4ZLVPW.js";
|
|
13
13
|
import "./chunk-V6FR6WTW.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PVBYJWC2.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute
|
|
6
6
|
} from "./chunk-PTE56QPL.js";
|
|
7
7
|
import "./chunk-HQ2A7ITL.js";
|
|
8
8
|
import {
|
|
9
9
|
printError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KTYR3U6D.js";
|
|
11
11
|
import "./chunk-E7UXXHO3.js";
|
|
12
12
|
import "./chunk-IR4ZLVPW.js";
|
|
13
13
|
import "./chunk-V6FR6WTW.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LHVM35J4.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute
|
|
6
6
|
} from "./chunk-PTE56QPL.js";
|
|
7
7
|
import "./chunk-RGXCNC4N.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KTYR3U6D.js";
|
|
9
9
|
import "./chunk-E7UXXHO3.js";
|
|
10
10
|
import "./chunk-IR4ZLVPW.js";
|
|
11
11
|
import "./chunk-V6FR6WTW.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PVBYJWC2.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute
|
|
6
6
|
} from "./chunk-PTE56QPL.js";
|
|
7
7
|
import "./chunk-HQ2A7ITL.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KTYR3U6D.js";
|
|
9
9
|
import "./chunk-E7UXXHO3.js";
|
|
10
10
|
import "./chunk-IR4ZLVPW.js";
|
|
11
11
|
import "./chunk-V6FR6WTW.js";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
OPEN_SOURCE_AE_CLI_PACKAGE,
|
|
2
|
+
buildVersionInstallPlan,
|
|
4
3
|
fetchCliConfig,
|
|
4
|
+
friendlyVersionSyncFailure,
|
|
5
5
|
getCachedCompatForHost,
|
|
6
|
+
installVersion,
|
|
6
7
|
printError,
|
|
7
|
-
printOutput
|
|
8
|
-
|
|
8
|
+
printOutput,
|
|
9
|
+
recordVersionSyncResult
|
|
10
|
+
} from "./chunk-KTYR3U6D.js";
|
|
9
11
|
import {
|
|
10
12
|
peekCliToken
|
|
11
13
|
} from "./chunk-E7UXXHO3.js";
|
|
@@ -17,7 +19,6 @@ import {
|
|
|
17
19
|
import "./chunk-LYVNONC4.js";
|
|
18
20
|
|
|
19
21
|
// src/commands/update.ts
|
|
20
|
-
import { spawnSync } from "child_process";
|
|
21
22
|
var HOST_OPTION_DESC = "Override active AE host URL (e.g., https://ta.thinkingdata.cn)";
|
|
22
23
|
var SEMVER_RE = /^\d+\.\d+\.\d+(?:[-+].*)?$/;
|
|
23
24
|
function registerUpdate(program) {
|
|
@@ -30,9 +31,40 @@ function registerUpdate(program) {
|
|
|
30
31
|
await printOutput({ action: "update", dryRun: true, ...plan }, program.opts().format || "json", program.opts().jq);
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const result = installVersion(target, {
|
|
35
|
+
progress: (message) => process.stderr.write(`${message}
|
|
36
|
+
`)
|
|
37
|
+
});
|
|
38
|
+
if (host) {
|
|
39
|
+
recordVersionSyncResult(host, target, result);
|
|
40
|
+
}
|
|
41
|
+
if (!result.ok) {
|
|
42
|
+
const message = result.skillsPending ? `ae-cli ${target} was installed, but Skills synchronization failed.` : `Could not install ae-cli ${target}.`;
|
|
43
|
+
printError(
|
|
44
|
+
"config",
|
|
45
|
+
message,
|
|
46
|
+
`${friendlyVersionSyncFailure(result)} Check access and run: ae-cli update`,
|
|
47
|
+
"AE_CLI_UPDATE_FAILED",
|
|
48
|
+
{
|
|
49
|
+
target,
|
|
50
|
+
stage: result.stage,
|
|
51
|
+
cause: result.cause,
|
|
52
|
+
skillsPending: result.skillsPending
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
process.exitCode = 1;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
await printOutput(
|
|
59
|
+
{
|
|
60
|
+
action: "update",
|
|
61
|
+
dryRun: false,
|
|
62
|
+
...plan,
|
|
63
|
+
skillsSource: result.skillsSource
|
|
64
|
+
},
|
|
65
|
+
program.opts().format || "json",
|
|
66
|
+
program.opts().jq
|
|
67
|
+
);
|
|
36
68
|
});
|
|
37
69
|
}
|
|
38
70
|
async function resolveTargetVersion(program, opts) {
|
|
@@ -74,24 +106,14 @@ function resolveUpdateHost(program, opts) {
|
|
|
74
106
|
return raw ? normalizeUrl(raw) : void 0;
|
|
75
107
|
}
|
|
76
108
|
function buildUpdatePlan(target, host) {
|
|
109
|
+
const installPlan = buildVersionInstallPlan(target);
|
|
77
110
|
return {
|
|
78
|
-
target,
|
|
111
|
+
target: installPlan.target,
|
|
79
112
|
...host ? { host } : {},
|
|
80
|
-
commands:
|
|
81
|
-
|
|
82
|
-
`npx skills add ${AE_CLI_SKILLS_REPO}#v${target} -g -y`
|
|
83
|
-
]
|
|
113
|
+
commands: installPlan.commands,
|
|
114
|
+
skillsSources: installPlan.skillsSources
|
|
84
115
|
};
|
|
85
116
|
}
|
|
86
|
-
function runCommand(command, args) {
|
|
87
|
-
const result = spawnSync(command, args, { stdio: "inherit" });
|
|
88
|
-
if (result.error) {
|
|
89
|
-
throw result.error;
|
|
90
|
-
}
|
|
91
|
-
if (result.status !== 0) {
|
|
92
|
-
process.exit(result.status ?? 1);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
117
|
function failUpdate(message, hint) {
|
|
96
118
|
printError("config", message, hint);
|
|
97
119
|
process.exitCode = 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thinkingai/ae-cli",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.9",
|
|
4
4
|
"description": "CLI tool for ThinkingAI (AE) analytics platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -45,10 +45,12 @@
|
|
|
45
45
|
"verify:tracking-tools": "node test/tracking-client.test.mjs && node test/tracking-skill-flow.test.mjs && node test/tracking-commands.test.mjs",
|
|
46
46
|
"verify:self-check-overlay": "node test/self-check-overlay.test.mjs",
|
|
47
47
|
"verify:update-check": "npx tsx test/update-check.test.mjs",
|
|
48
|
+
"verify:version-sync": "npx tsx tests/version-sync.test.ts",
|
|
48
49
|
"qa-changed": "node scripts/qa-changed.mjs",
|
|
49
50
|
"self-check": "node self-check/scan.mjs",
|
|
50
51
|
"check:release": "node self-check/release-gate.mjs",
|
|
51
|
-
"sync:skills-to-
|
|
52
|
+
"sync:skills-to-system": "node scripts/sync-skills-to-system.mjs",
|
|
53
|
+
"verify:system-skills-sync": "node --test test/sync-system-skills.test.mjs",
|
|
52
54
|
"check:agents-docs": "node scripts/check-agents-docs-sync.mjs",
|
|
53
55
|
"prepublishOnly": "npm run check:release && npm run build",
|
|
54
56
|
"start": "node dist/index.js",
|
|
@@ -87,7 +89,6 @@
|
|
|
87
89
|
"@types/turndown": "^5.0.6",
|
|
88
90
|
"@types/ws": "^8.5.0",
|
|
89
91
|
"jszip": "^3.10.1",
|
|
90
|
-
"mysql2": "^3.22.6",
|
|
91
92
|
"tsup": "^8.0.0",
|
|
92
93
|
"tsx": "^4.0.0",
|
|
93
94
|
"typescript": "^5.5.0"
|
package/skills/ae-agent/SKILL.md
CHANGED
|
@@ -76,8 +76,8 @@ If the user's intent is data analysis, audience management, metadata governance,
|
|
|
76
76
|
### Automations (3)
|
|
77
77
|
|
|
78
78
|
- `+list-automations` ([doc](references/list-automations.md)) — list current user's Agent automation tasks
|
|
79
|
-
- `+create-automation` ([doc](references/create-automation.md)) — create an Agent automation task (hourly/daily/weekly/monthly or cron)
|
|
80
|
-
- `+update-automation` ([doc](references/update-automation.md)) — update an automation's name, instruction, schedule, or
|
|
79
|
+
- `+create-automation` ([doc](references/create-automation.md)) — create an Agent automation task (hourly/daily/weekly/monthly or cron; optional continuous conversation)
|
|
80
|
+
- `+update-automation` ([doc](references/update-automation.md)) — update an automation's name, instruction, schedule, enabled state, or conversation mode
|
|
81
81
|
|
|
82
82
|
### Models (6)
|
|
83
83
|
|
|
@@ -8,6 +8,7 @@ Domain: **Automations / write**
|
|
|
8
8
|
- Create an Agent automation task that runs on a schedule (hourly / daily / weekly / monthly or cron).
|
|
9
9
|
- Returns the newly created automation object including its `id` and initial `status`.
|
|
10
10
|
- Automations are **enabled by default**; pass `--enabled false` only when the user explicitly asks to create the task without enabling it.
|
|
11
|
+
- Automations create a new conversation for every run by default. Pass `--reuse-conversation true` only when the user explicitly wants future runs to continue in one conversation.
|
|
11
12
|
|
|
12
13
|
## Mandatory Rules (MUST)
|
|
13
14
|
- `--name` and `--message` are required.
|
|
@@ -43,6 +44,14 @@ ae-cli agent +create-automation \
|
|
|
43
44
|
--message "Summarize yesterday's AI news" \
|
|
44
45
|
--enabled false
|
|
45
46
|
|
|
47
|
+
# Keep future runs in one visible conversation
|
|
48
|
+
ae-cli agent +create-automation \
|
|
49
|
+
--name "Daily AI Brief" \
|
|
50
|
+
--schedule-kind daily \
|
|
51
|
+
--time 09:00 \
|
|
52
|
+
--message "Summarize yesterday's AI news" \
|
|
53
|
+
--reuse-conversation true
|
|
54
|
+
|
|
46
55
|
# Weekly schedule on Sunday
|
|
47
56
|
ae-cli agent +create-automation \
|
|
48
57
|
--name "Weekly Report" \
|
|
@@ -76,6 +85,7 @@ ae-cli agent +create-automation --dry-run --name "Test" --message "x" --schedule
|
|
|
76
85
|
| `--agent-name` | No | Agent name; use only after `+list-agents` discovery |
|
|
77
86
|
| `--model` | No | Model record ID; defaults to current selected model |
|
|
78
87
|
| `--enabled` | No | `true` (default) \| `false` |
|
|
88
|
+
| `--reuse-conversation` | No | `true` to continue in one conversation; `false` (default) to create one per run |
|
|
79
89
|
| `--conversation-id` | No | Conversation ID fallback for resolving current Agent |
|
|
80
90
|
|
|
81
91
|
\* One of `--cron` or `--schedule-kind` is required.
|
|
@@ -84,6 +94,7 @@ ae-cli agent +create-automation --dry-run --name "Test" --message "x" --schedule
|
|
|
84
94
|
- If the user provides a natural-language schedule ("every day at 9am"), translate it to `--schedule-kind daily --time 09:00`.
|
|
85
95
|
- If the user wants a cron-only schedule not covered by the kinds, use `--cron`.
|
|
86
96
|
- If no Agent is specified, the automation targets the current conversation's Agent; verify with `+list-agents` when in doubt.
|
|
97
|
+
- Set `--reuse-conversation true` only when the user explicitly requests continuity across runs. The platform may rotate the underlying provider session while retaining the visible conversation history.
|
|
87
98
|
- Use `--dry-run` first to verify the request shape before executing.
|
|
88
99
|
|
|
89
100
|
## Next Steps on Failure
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
Domain: **Automations / write**
|
|
6
6
|
|
|
7
7
|
## Use Cases
|
|
8
|
-
- Update an existing Agent automation task's name, instruction, schedule, or
|
|
8
|
+
- Update an existing Agent automation task's name, instruction, schedule, enabled state, or conversation mode.
|
|
9
9
|
- Used to pause (`--enabled false`) or resume (`--enabled true`) an automation, or to change its schedule/message.
|
|
10
10
|
- Obtain the automation `id` via `+list-automations` — never guess.
|
|
11
11
|
|
|
12
12
|
## Mandatory Rules (MUST)
|
|
13
13
|
- `--id` is required. Obtain the real ID via `+list-automations` — do not guess.
|
|
14
|
-
- At least one update field must be provided (`--name`, `--message`, `--enabled`, `--cron`, or a `--schedule-kind` with its time/day fields).
|
|
14
|
+
- At least one update field must be provided (`--name`, `--message`, `--enabled`, `--reuse-conversation`, `--cron`, or a `--schedule-kind` with its time/day fields).
|
|
15
15
|
- `--cron` and `--schedule-kind` are mutually exclusive.
|
|
16
16
|
- This is an ordinary `write` operation and does not require CLI confirmation.
|
|
17
17
|
- Do not surface raw automation IDs, raw JSON, or concrete detail paths in user-facing replies.
|
|
@@ -32,6 +32,12 @@ ae-cli agent +update-automation --id <automation-id> --enabled false
|
|
|
32
32
|
# Resume an automation
|
|
33
33
|
ae-cli agent +update-automation --id <automation-id> --enabled true
|
|
34
34
|
|
|
35
|
+
# Reuse the most recent valid conversation on future runs
|
|
36
|
+
ae-cli agent +update-automation --id <automation-id> --reuse-conversation true
|
|
37
|
+
|
|
38
|
+
# Return to creating a new conversation for every run
|
|
39
|
+
ae-cli agent +update-automation --id <automation-id> --reuse-conversation false
|
|
40
|
+
|
|
35
41
|
# Rename and change the instruction
|
|
36
42
|
ae-cli agent +update-automation \
|
|
37
43
|
--id <automation-id> \
|
|
@@ -59,6 +65,7 @@ ae-cli agent +update-automation --dry-run --id <automation-id> --enabled false
|
|
|
59
65
|
| `--name` | No | New automation task name |
|
|
60
66
|
| `--message` | No | New instruction sent to the Agent |
|
|
61
67
|
| `--enabled` | No | `true` to enable, `false` to pause |
|
|
68
|
+
| `--reuse-conversation` | No | `true` to reuse one conversation, `false` to create one per run; omit to keep unchanged |
|
|
62
69
|
| `--cron` | No | Cron expression (mutually exclusive with `--schedule-kind`) |
|
|
63
70
|
| `--schedule-kind` | No | `hourly` \| `daily` \| `weekly` \| `monthly` |
|
|
64
71
|
| `--time` | No | Time in `HH:mm` for daily/weekly/monthly |
|
|
@@ -68,12 +75,13 @@ ae-cli agent +update-automation --dry-run --id <automation-id> --enabled false
|
|
|
68
75
|
|
|
69
76
|
## Decision Rules
|
|
70
77
|
- If the user wants to pause/resume, use `--enabled false` / `--enabled true` (no other fields needed).
|
|
78
|
+
- If the user wants future runs to share one conversation, use `--reuse-conversation true`; use `false` to restore one conversation per run.
|
|
71
79
|
- If the user wants to change the schedule, provide `--schedule-kind` with its required time/day fields, or `--cron`.
|
|
72
80
|
- At least one update field is required; a bare `--id` is rejected.
|
|
73
81
|
- Use `--dry-run` first to verify the request shape before executing.
|
|
74
82
|
|
|
75
83
|
## Next Steps on Failure
|
|
76
|
-
- `至少提供一个更新字段`: add at least one of `--name` / `--message` / `--enabled` / `--cron` / `--schedule-kind`.
|
|
84
|
+
- `至少提供一个更新字段`: add at least one of `--name` / `--message` / `--enabled` / `--reuse-conversation` / `--cron` / `--schedule-kind`.
|
|
77
85
|
- `必须提供 --cron 或 --schedule-kind`: if schedule detail flags (`--time` / `--minute` / `--weekday` / `--day-of-month`) are present, a `--schedule-kind` (or `--cron`) must accompany them.
|
|
78
86
|
- `--time 格式必须是 HH:mm`: use 24-hour `HH:mm` (e.g. `09:00`).
|
|
79
87
|
|
|
@@ -256,7 +256,7 @@ Without `.ae-cli/draft.json` or `.ae-cli/remote-plan.json`:
|
|
|
256
256
|
**SDK document paths**:
|
|
257
257
|
- Do not use hard-coded wiki paths from this section.
|
|
258
258
|
- Always read `references/sdk-index.md` first and use the path listed there for the selected SDK.
|
|
259
|
-
- If the path from `references/sdk-index.md` does not exist in the local wiki mirror, search under `~/.ae-cli/wiki/
|
|
259
|
+
- If the path from `references/sdk-index.md` does not exist in the local wiki mirror, search under `~/.ae-cli/wiki/raw/` with SDK-specific keywords and use the best matching latest main document.
|
|
260
260
|
|
|
261
261
|
---
|
|
262
262
|
|
|
@@ -669,14 +669,14 @@ All output mode rules are in `references/*.md`. This SKILL.md only handles phase
|
|
|
669
669
|
- User guide: https://docs-v2.thinkingdata.cn/?version=latest&code=logbus2_installation&lan=en-US
|
|
670
670
|
- Download link is in the official doc's "二、Download LogBus2" section
|
|
671
671
|
|
|
672
|
-
**Wiki directory structure** (see `~/.ae-cli/wiki/
|
|
673
|
-
- `~/.ae-cli/wiki/
|
|
674
|
-
- `~/.ae-cli/wiki/
|
|
672
|
+
**Wiki directory structure** (see `~/.ae-cli/wiki/schema.md`):
|
|
673
|
+
- `~/.ae-cli/wiki/raw/` — AE official documentation mirror (read-only, maintained by crawler)
|
|
674
|
+
- `~/.ae-cli/wiki/synthesis/` — LLM-synthesized overview documents
|
|
675
675
|
|
|
676
676
|
**Document reading order during code generation**:
|
|
677
677
|
1. Read `references/sdk-index.md` to find the selected SDK's main document and advanced guide paths.
|
|
678
678
|
2. Verify the main document path exists in the local wiki mirror before reading it.
|
|
679
|
-
3. If the indexed path is missing, search under `~/.ae-cli/wiki/
|
|
679
|
+
3. If the indexed path is missing, search under `~/.ae-cli/wiki/raw/` with SDK-specific keywords such as SDK name, platform name, language name, and `main doc`; choose the latest main document, not historical/versioned documents.
|
|
680
680
|
4. Read the wiki main doc first (initialization, imports, package names, basic API).
|
|
681
681
|
5. Read the advanced guide only after the main doc (LoggerConsumer, user properties, auto-track, preset properties, etc.).
|
|
682
682
|
6. Check advanced guide sub-documents if needed.
|