@thinkingai/ae-cli 1.0.24 → 1.0.27
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 +17 -2
- package/README.zh.md +18 -2
- package/dist/{auth-4OPL4YWG.js → auth-TXFJHPXU.js} +3 -2
- package/dist/{auth-PBPAZQWP.js → auth-W2JZ3DKA.js} +7 -5
- package/dist/{chunk-OVHL4JAC.js → chunk-2NGWYMLB.js} +5 -3
- package/dist/chunk-6T7245YE.js +478 -0
- package/dist/{chunk-JJCRURTR.js → chunk-B4UL2VIJ.js} +1 -1
- package/dist/{chunk-DC66L5AM.js → chunk-BI5ZVD6T.js} +17 -90
- package/dist/chunk-MNHE6SSI.js +79 -0
- package/dist/chunk-MWWYGZ76.js +130 -0
- package/dist/{chunk-47MTN54I.js → chunk-SRRUNQIM.js} +29 -2
- package/dist/chunk-TG64AQV4.js +262 -0
- package/dist/{chunk-MZW6NOVS.js → chunk-VT6VC4PA.js} +9 -3
- package/dist/{client-TDH6MUWM.js → client-IU2E5IOL.js} +6 -3
- package/dist/{config-5ELRYAIH.js → config-WH3R3IRY.js} +3 -2
- package/dist/index.js +45 -17
- package/dist/model-CC7U5XOJ.js +131 -0
- package/dist/{raw-EM7AP3RT.js → raw-TUHZQ4UB.js} +5 -4
- package/dist/sync-EVEDS7YE.js +383 -0
- package/dist/te-agent-FLTDYV3L.js +522 -0
- package/dist/{te-analysis-3KFSNUCJ.js → te-analysis-CMXADIJM.js} +81 -11
- package/dist/{te-audience-GMYJFCSC.js → te-audience-LPZFFSXM.js} +4 -3
- package/dist/{te-common-YLERCMQI.js → te-common-BXQFKTB3.js} +4 -3
- package/dist/{te-community-PYDN5A6B.js → te-community-K5S3VOZY.js} +4 -3
- package/dist/{te-dataops-ETWS5O3X.js → te-dataops-567IMCQG.js} +4 -3
- package/dist/{te-engage-ROJVZHDA.js → te-engage-TBUTGW5F.js} +105 -49
- package/dist/{te-kb-VUNS2CC7.js → te-kb-XHVBWP5E.js} +225 -29
- package/dist/{te-meta-3EFWLM3A.js → te-meta-NQ4U3VJW.js} +4 -3
- package/dist/te-team-556APRIU.js +529 -0
- package/package.json +5 -1
- package/skills/ae-agent/SKILL.md +133 -0
- package/skills/ae-analysis/references/drilldown_user_events.md +1 -1
- package/skills/ae-analysis/references/drilldown_users.md +2 -2
- package/skills/ae-analysis/references/query_adhoc.md +3 -2
- package/skills/ae-analysis/references/query_entity_details.md +1 -1
- package/skills/ae-engage/SKILL.md +25 -2
- package/skills/ae-engage/references/build-task-save-guide.md +283 -0
- package/skills/ae-engage/references/save-task.md +304 -0
- package/skills/ae-kb/SKILL.md +283 -0
- package/skills/ae-team/SKILL.md +164 -0
- package/skills/ae-team/references/ai-generate.md +39 -0
- package/skills/ae-team/references/create.md +94 -0
- package/skills/ae-team/references/delete.md +39 -0
- package/skills/ae-team/references/list-projects.md +45 -0
- package/skills/ae-team/references/list-templates.md +38 -0
- package/skills/ae-team/references/list.md +39 -0
- package/skills/ae-team/references/run-artifacts.md +51 -0
- package/skills/ae-team/references/run-cancel.md +38 -0
- package/skills/ae-team/references/run-chat.md +57 -0
- package/skills/ae-team/references/run-reply.md +41 -0
- package/skills/ae-team/references/run-result.md +75 -0
- package/skills/ae-team/references/run-start.md +73 -0
- package/skills/ae-team/references/run-watch.md +82 -0
- package/skills/ae-team/references/update.md +47 -0
|
@@ -2,9 +2,10 @@ import {
|
|
|
2
2
|
callMcpTool,
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
resolveMcpUrl
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-2NGWYMLB.js";
|
|
6
|
+
import "./chunk-SRRUNQIM.js";
|
|
7
|
+
import "./chunk-BI5ZVD6T.js";
|
|
8
|
+
import "./chunk-MNHE6SSI.js";
|
|
8
9
|
|
|
9
10
|
// src/commands/te-analysis/shared.ts
|
|
10
11
|
function createMcpCommand(config) {
|
|
@@ -16,6 +17,7 @@ function createMcpCommand(config) {
|
|
|
16
17
|
description: config.description,
|
|
17
18
|
flags: config.flags,
|
|
18
19
|
risk: config.risk,
|
|
20
|
+
validate: config.validate,
|
|
19
21
|
dryRun: (ctx) => ({
|
|
20
22
|
method: "tools/call",
|
|
21
23
|
url: resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService),
|
|
@@ -54,6 +56,58 @@ function optionalJsonString(ctx, name) {
|
|
|
54
56
|
function requiredJsonString(ctx, name) {
|
|
55
57
|
return JSON.stringify(ctx.json(name));
|
|
56
58
|
}
|
|
59
|
+
var DEFAULT_QUERY_LIMIT = 1e3;
|
|
60
|
+
var MAX_QUERY_LIMIT = 1e5;
|
|
61
|
+
function assertLimitWithinCap(value, flagName) {
|
|
62
|
+
if (value === void 0) return;
|
|
63
|
+
if (!Number.isInteger(value) || value < 1 || value > MAX_QUERY_LIMIT) {
|
|
64
|
+
throw new Error(`--${flagName} must be an integer between 1 and ${MAX_QUERY_LIMIT} (got: ${value}).`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function extractTrailingSqlLimit(sql) {
|
|
68
|
+
const m = sql.match(/\blimit\s+(\d+)(?:\s*,\s*(\d+))?(?:\s+offset\s+\d+)?\s*;?\s*$/i);
|
|
69
|
+
if (!m) return void 0;
|
|
70
|
+
return m[2] !== void 0 ? Number(m[2]) : Number(m[1]);
|
|
71
|
+
}
|
|
72
|
+
function findSqlInQp(qp) {
|
|
73
|
+
let found;
|
|
74
|
+
const visit = (v) => {
|
|
75
|
+
if (found !== void 0) return;
|
|
76
|
+
if (typeof v === "string") {
|
|
77
|
+
if (/\bselect\b/i.test(v) && /\bfrom\b/i.test(v)) found = v;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (Array.isArray(v)) {
|
|
81
|
+
v.forEach(visit);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (v && typeof v === "object") {
|
|
85
|
+
Object.values(v).forEach(visit);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
visit(qp);
|
|
89
|
+
return found;
|
|
90
|
+
}
|
|
91
|
+
function assertSqlLimitConsistent(qp, providedLimit) {
|
|
92
|
+
if (providedLimit === void 0) return;
|
|
93
|
+
const sql = findSqlInQp(qp);
|
|
94
|
+
if (sql === void 0) return;
|
|
95
|
+
const sqlLimit = extractTrailingSqlLimit(sql);
|
|
96
|
+
if (sqlLimit === void 0) return;
|
|
97
|
+
if (sqlLimit !== providedLimit) {
|
|
98
|
+
throw new Error(
|
|
99
|
+
`Conflicting row limits: SQL "LIMIT ${sqlLimit}" != --limit ${providedLimit}. For model_type=sql, omit LIMIT from the SQL and use --limit, or keep the two equal.`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function resolveSqlAwareLimit(providedLimit, modelType, qp) {
|
|
104
|
+
if (providedLimit !== void 0) return providedLimit;
|
|
105
|
+
if (modelType === "sql") {
|
|
106
|
+
const sql = findSqlInQp(qp);
|
|
107
|
+
if (sql !== void 0 && extractTrailingSqlLimit(sql) !== void 0) return void 0;
|
|
108
|
+
}
|
|
109
|
+
return DEFAULT_QUERY_LIMIT;
|
|
110
|
+
}
|
|
57
111
|
|
|
58
112
|
// src/commands/te-analysis/meta/get-alert-definition-schema.ts
|
|
59
113
|
var getAlertDefinitionSchema = createMcpCommand({
|
|
@@ -506,11 +560,18 @@ var queryAdhoc = createMcpCommand({
|
|
|
506
560
|
{ name: "is_sort_by_columns", type: "boolean", required: false, desc: "Whether to sort query results by columns. Default: false" },
|
|
507
561
|
{ name: "resolve_recent_day", type: "boolean", required: false, desc: "Whether to resolve relative time expressions such as last 7 days. If omitted, the service auto-resolves when qp.eventView.recentDay exists and start/end time is incomplete; otherwise it defaults to false." },
|
|
508
562
|
{ name: "fields", type: "json", required: false, desc: "Optional fields to return. Must match column names in result." },
|
|
509
|
-
{ name: "limit", type: "number", required: false, desc: "Optional limit. Default:
|
|
563
|
+
{ name: "limit", type: "number", required: false, desc: "Optional limit. Default: 1000, maximum: 100000. For model_type=sql, either omit LIMIT in the SQL or keep it equal to --limit (the two must not differ)." },
|
|
510
564
|
{ name: "offset", type: "number", required: false, desc: "Optional offset. Default: 0." },
|
|
511
565
|
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
512
566
|
],
|
|
513
567
|
risk: "read",
|
|
568
|
+
validate: (ctx) => {
|
|
569
|
+
const limit = optionalNumber(ctx, "limit");
|
|
570
|
+
assertLimitWithinCap(limit, "limit");
|
|
571
|
+
if (ctx.str("model_type") === "sql") {
|
|
572
|
+
assertSqlLimitConsistent(ctx.json("qp"), limit);
|
|
573
|
+
}
|
|
574
|
+
},
|
|
514
575
|
buildArgs: (ctx) => ({
|
|
515
576
|
projectId: ctx.num("project_id"),
|
|
516
577
|
modelType: ctx.str("model_type"),
|
|
@@ -521,7 +582,7 @@ var queryAdhoc = createMcpCommand({
|
|
|
521
582
|
isSortByColumns: optionalBoolean(ctx, "is_sort_by_columns"),
|
|
522
583
|
resolveRecentDay: optionalBoolean(ctx, "resolve_recent_day"),
|
|
523
584
|
fields: optionalJson(ctx, "fields"),
|
|
524
|
-
limit: optionalNumber(ctx, "limit"),
|
|
585
|
+
limit: resolveSqlAwareLimit(optionalNumber(ctx, "limit"), ctx.str("model_type"), ctx.json("qp")),
|
|
525
586
|
offset: optionalNumber(ctx, "offset"),
|
|
526
587
|
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
527
588
|
})
|
|
@@ -632,11 +693,14 @@ var drilldownUsers = createMcpCommand({
|
|
|
632
693
|
{ name: "include_total", type: "boolean", required: false, desc: "Whether to query users from the total row. Default: false" },
|
|
633
694
|
{ name: "relation_val", type: "string", required: false, desc: "Relation value used in relation analysis scenarios" },
|
|
634
695
|
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
635
|
-
{ name: "limit", type: "number", required: false, desc: "Optional limit. Default:
|
|
696
|
+
{ name: "limit", type: "number", required: false, desc: "Optional limit. Default: 1000, maximum: 100000." },
|
|
636
697
|
{ name: "offset", type: "number", required: false, desc: "Optional offset. Default: 0." },
|
|
637
698
|
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
638
699
|
],
|
|
639
700
|
risk: "read",
|
|
701
|
+
validate: (ctx) => {
|
|
702
|
+
assertLimitWithinCap(optionalNumber(ctx, "limit"), "limit");
|
|
703
|
+
},
|
|
640
704
|
buildArgs: (ctx) => ({
|
|
641
705
|
projectId: ctx.num("project_id"),
|
|
642
706
|
modelType: ctx.str("model_type"),
|
|
@@ -656,7 +720,7 @@ var drilldownUsers = createMcpCommand({
|
|
|
656
720
|
includeTotal: optionalBoolean(ctx, "include_total"),
|
|
657
721
|
relationVal: optionalString(ctx, "relation_val"),
|
|
658
722
|
useCache: optionalBoolean(ctx, "use_cache"),
|
|
659
|
-
limit: optionalNumber(ctx, "limit"),
|
|
723
|
+
limit: optionalNumber(ctx, "limit") ?? DEFAULT_QUERY_LIMIT,
|
|
660
724
|
offset: optionalNumber(ctx, "offset"),
|
|
661
725
|
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
662
726
|
})
|
|
@@ -684,10 +748,13 @@ var drilldownUserEvents = createMcpCommand({
|
|
|
684
748
|
{ name: "entity_value", type: "string", required: false, desc: "Optional entity value for multi-entity scenarios" },
|
|
685
749
|
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
686
750
|
{ name: "page_num", type: "number", required: false, desc: "Start page number. Default: 1" },
|
|
687
|
-
{ name: "page_size", type: "number", required: false, desc: "Page size. Default:
|
|
751
|
+
{ name: "page_size", type: "number", required: false, desc: "Page size. Default: 1000, maximum: 100000." },
|
|
688
752
|
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
689
753
|
],
|
|
690
754
|
risk: "read",
|
|
755
|
+
validate: (ctx) => {
|
|
756
|
+
assertLimitWithinCap(optionalNumber(ctx, "page_size"), "page_size");
|
|
757
|
+
},
|
|
691
758
|
buildArgs: (ctx) => ({
|
|
692
759
|
projectId: ctx.num("project_id"),
|
|
693
760
|
userId: ctx.str("user_id"),
|
|
@@ -706,7 +773,7 @@ var drilldownUserEvents = createMcpCommand({
|
|
|
706
773
|
entityValue: optionalString(ctx, "entity_value"),
|
|
707
774
|
useCache: optionalBoolean(ctx, "use_cache"),
|
|
708
775
|
pageNum: optionalNumber(ctx, "page_num"),
|
|
709
|
-
pageSize: optionalNumber(ctx, "page_size"),
|
|
776
|
+
pageSize: optionalNumber(ctx, "page_size") ?? DEFAULT_QUERY_LIMIT,
|
|
710
777
|
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
711
778
|
})
|
|
712
779
|
});
|
|
@@ -834,11 +901,14 @@ var queryEntityDetails = createMcpCommand({
|
|
|
834
901
|
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
835
902
|
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
836
903
|
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
837
|
-
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default:
|
|
904
|
+
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000, maximum: 100000" },
|
|
838
905
|
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" },
|
|
839
906
|
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" }
|
|
840
907
|
],
|
|
841
908
|
risk: "read",
|
|
909
|
+
validate: (ctx) => {
|
|
910
|
+
assertLimitWithinCap(optionalNumber(ctx, "limit"), "limit");
|
|
911
|
+
},
|
|
842
912
|
buildArgs: (ctx) => ({
|
|
843
913
|
projectId: ctx.num("project_id"),
|
|
844
914
|
entityId: optionalNumber(ctx, "entity_id"),
|
|
@@ -846,7 +916,7 @@ var queryEntityDetails = createMcpCommand({
|
|
|
846
916
|
properties: optionalJsonString(ctx, "properties"),
|
|
847
917
|
sortBy: optionalString(ctx, "sort_by"),
|
|
848
918
|
sortOrder: optionalString(ctx, "sort_order"),
|
|
849
|
-
limit: optionalNumber(ctx, "limit"),
|
|
919
|
+
limit: optionalNumber(ctx, "limit") ?? DEFAULT_QUERY_LIMIT,
|
|
850
920
|
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
851
921
|
useCache: optionalBoolean(ctx, "use_cache")
|
|
852
922
|
})
|
|
@@ -2,9 +2,10 @@ import {
|
|
|
2
2
|
callMcpTool,
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
resolveMcpUrl
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-2NGWYMLB.js";
|
|
6
|
+
import "./chunk-SRRUNQIM.js";
|
|
7
|
+
import "./chunk-BI5ZVD6T.js";
|
|
8
|
+
import "./chunk-MNHE6SSI.js";
|
|
8
9
|
|
|
9
10
|
// src/commands/te-audience/shared.ts
|
|
10
11
|
function createMcpCommand(config) {
|
|
@@ -2,9 +2,10 @@ import {
|
|
|
2
2
|
callMcpTool,
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
resolveMcpUrl
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-2NGWYMLB.js";
|
|
6
|
+
import "./chunk-SRRUNQIM.js";
|
|
7
|
+
import "./chunk-BI5ZVD6T.js";
|
|
8
|
+
import "./chunk-MNHE6SSI.js";
|
|
8
9
|
|
|
9
10
|
// src/commands/te-common/shared.ts
|
|
10
11
|
function createMcpCommand(config) {
|
|
@@ -3,9 +3,10 @@ import {
|
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
registerMcpMappings,
|
|
5
5
|
resolveMcpUrl
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-2NGWYMLB.js";
|
|
7
|
+
import "./chunk-SRRUNQIM.js";
|
|
8
|
+
import "./chunk-BI5ZVD6T.js";
|
|
9
|
+
import "./chunk-MNHE6SSI.js";
|
|
9
10
|
|
|
10
11
|
// src/commands/te-community/get_channel_info.ts
|
|
11
12
|
var getChannelInfo = {
|
|
@@ -3,9 +3,10 @@ import {
|
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
registerMcpMappings,
|
|
5
5
|
resolveMcpUrl
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-2NGWYMLB.js";
|
|
7
|
+
import "./chunk-SRRUNQIM.js";
|
|
8
|
+
import "./chunk-BI5ZVD6T.js";
|
|
9
|
+
import "./chunk-MNHE6SSI.js";
|
|
9
10
|
|
|
10
11
|
// src/commands/te-dataops/datatable/list-tables-by-page.ts
|
|
11
12
|
var listTablesByPage = {
|
|
@@ -3,27 +3,28 @@ import {
|
|
|
3
3
|
parseMcpResult,
|
|
4
4
|
registerMcpMappings,
|
|
5
5
|
resolveMcpUrl
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-2NGWYMLB.js";
|
|
7
|
+
import "./chunk-SRRUNQIM.js";
|
|
8
|
+
import "./chunk-BI5ZVD6T.js";
|
|
9
|
+
import "./chunk-MNHE6SSI.js";
|
|
9
10
|
|
|
10
11
|
// src/commands/te-engage/utils.ts
|
|
11
|
-
function buildMcpDryRun(ctx,
|
|
12
|
+
function buildMcpDryRun(ctx, serviceName46, toolName46, args) {
|
|
12
13
|
const host = ctx.host();
|
|
13
14
|
return {
|
|
14
15
|
method: "MCP tools/call",
|
|
15
|
-
url: resolveMcpUrl(ctx.mcpUrl(), host,
|
|
16
|
+
url: resolveMcpUrl(ctx.mcpUrl(), host, serviceName46),
|
|
16
17
|
body: {
|
|
17
|
-
serviceName:
|
|
18
|
-
toolName:
|
|
18
|
+
serviceName: serviceName46,
|
|
19
|
+
toolName: toolName46,
|
|
19
20
|
arguments: args
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
|
-
async function executeMcpCommand(ctx,
|
|
24
|
+
async function executeMcpCommand(ctx, serviceName46, toolName46, args) {
|
|
24
25
|
const host = ctx.host();
|
|
25
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host,
|
|
26
|
-
const result = await callMcpTool(mcpUrl,
|
|
26
|
+
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, serviceName46);
|
|
27
|
+
const result = await callMcpTool(mcpUrl, toolName46, args, host);
|
|
27
28
|
return parseMcpResult(result);
|
|
28
29
|
}
|
|
29
30
|
function hasFlag(ctx, name) {
|
|
@@ -1144,10 +1145,35 @@ var commands3 = [
|
|
|
1144
1145
|
];
|
|
1145
1146
|
var setting_default = commands3;
|
|
1146
1147
|
|
|
1147
|
-
// src/commands/te-engage/task/
|
|
1148
|
+
// src/commands/te-engage/task/build-task-save-guide.ts
|
|
1148
1149
|
var serviceName36 = "engage_task";
|
|
1149
|
-
var toolName36 = "
|
|
1150
|
+
var toolName36 = "build_task_save_guide";
|
|
1150
1151
|
function buildArgs36(ctx) {
|
|
1152
|
+
return {
|
|
1153
|
+
projectId: ctx.num("project_id"),
|
|
1154
|
+
req: readRequiredJsonObject(ctx, "req")
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
var buildTaskSaveGuide = {
|
|
1158
|
+
service: "engage",
|
|
1159
|
+
command: "+build_task_save_guide",
|
|
1160
|
+
description: "Build a scenario-specific guide for constructing save_task req.",
|
|
1161
|
+
flags: [
|
|
1162
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
1163
|
+
{ name: "req", type: "json", required: true, desc: "Guide request as JSON object; use {} for a generic guide" }
|
|
1164
|
+
],
|
|
1165
|
+
risk: "read",
|
|
1166
|
+
validate: (ctx) => {
|
|
1167
|
+
readRequiredJsonObject(ctx, "req");
|
|
1168
|
+
},
|
|
1169
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName36, toolName36, buildArgs36(ctx)),
|
|
1170
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName36, toolName36, buildArgs36(ctx))
|
|
1171
|
+
};
|
|
1172
|
+
|
|
1173
|
+
// src/commands/te-engage/task/manage-task.ts
|
|
1174
|
+
var serviceName37 = "engage_task";
|
|
1175
|
+
var toolName37 = "manage_task";
|
|
1176
|
+
function buildArgs37(ctx) {
|
|
1151
1177
|
const args = {
|
|
1152
1178
|
projectId: ctx.num("project_id"),
|
|
1153
1179
|
taskId: ctx.str("task_id"),
|
|
@@ -1168,14 +1194,42 @@ var manageTask = {
|
|
|
1168
1194
|
{ name: "reason", type: "string", required: false, desc: "Reason for review actions" }
|
|
1169
1195
|
],
|
|
1170
1196
|
risk: "write",
|
|
1171
|
-
dryRun: (ctx) => buildMcpDryRun(ctx,
|
|
1172
|
-
execute: async (ctx) => executeMcpCommand(ctx,
|
|
1197
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName37, toolName37, buildArgs37(ctx)),
|
|
1198
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName37, toolName37, buildArgs37(ctx))
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
// src/commands/te-engage/task/save-task.ts
|
|
1202
|
+
var serviceName38 = "engage_task";
|
|
1203
|
+
var toolName38 = "save_task";
|
|
1204
|
+
function buildArgs38(ctx) {
|
|
1205
|
+
return {
|
|
1206
|
+
projectId: ctx.num("project_id"),
|
|
1207
|
+
req: {
|
|
1208
|
+
projectId: ctx.num("project_id"),
|
|
1209
|
+
...readRequiredJsonObject(ctx, "req")
|
|
1210
|
+
}
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
var saveTask = {
|
|
1214
|
+
service: "engage",
|
|
1215
|
+
command: "+save_task",
|
|
1216
|
+
description: "Create or update a task draft.",
|
|
1217
|
+
flags: [
|
|
1218
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
1219
|
+
{ name: "req", type: "json", required: true, desc: "Task save request as JSON object" }
|
|
1220
|
+
],
|
|
1221
|
+
risk: "write",
|
|
1222
|
+
validate: (ctx) => {
|
|
1223
|
+
readRequiredJsonObject(ctx, "req");
|
|
1224
|
+
},
|
|
1225
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName38, toolName38, buildArgs38(ctx)),
|
|
1226
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName38, toolName38, buildArgs38(ctx))
|
|
1173
1227
|
};
|
|
1174
1228
|
|
|
1175
1229
|
// src/commands/te-engage/task/task-data-detail.ts
|
|
1176
|
-
var
|
|
1177
|
-
var
|
|
1178
|
-
function
|
|
1230
|
+
var serviceName39 = "engage_task";
|
|
1231
|
+
var toolName39 = "query_task_data_detail";
|
|
1232
|
+
function buildArgs39(ctx) {
|
|
1179
1233
|
const args = {
|
|
1180
1234
|
projectId: ctx.num("project_id"),
|
|
1181
1235
|
taskId: ctx.str("task_id"),
|
|
@@ -1225,14 +1279,14 @@ var taskDataDetail = {
|
|
|
1225
1279
|
throw new Error("Flag --task_instance_id is required when --detail_type is instance_daily");
|
|
1226
1280
|
}
|
|
1227
1281
|
},
|
|
1228
|
-
dryRun: (ctx) => buildMcpDryRun(ctx,
|
|
1229
|
-
execute: async (ctx) => executeMcpCommand(ctx,
|
|
1282
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName39, toolName39, buildArgs39(ctx)),
|
|
1283
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName39, toolName39, buildArgs39(ctx))
|
|
1230
1284
|
};
|
|
1231
1285
|
|
|
1232
1286
|
// src/commands/te-engage/task/task-data-overview.ts
|
|
1233
|
-
var
|
|
1234
|
-
var
|
|
1235
|
-
function
|
|
1287
|
+
var serviceName40 = "engage_task";
|
|
1288
|
+
var toolName40 = "query_task_data_overview";
|
|
1289
|
+
function buildArgs40(ctx) {
|
|
1236
1290
|
const args = {
|
|
1237
1291
|
projectId: ctx.num("project_id"),
|
|
1238
1292
|
taskId: ctx.str("task_id")
|
|
@@ -1260,14 +1314,14 @@ var taskDataOverview = {
|
|
|
1260
1314
|
{ name: "show_time_zone", type: "string", required: false, desc: "Timezone offset" }
|
|
1261
1315
|
],
|
|
1262
1316
|
risk: "read",
|
|
1263
|
-
dryRun: (ctx) => buildMcpDryRun(ctx,
|
|
1264
|
-
execute: async (ctx) => executeMcpCommand(ctx,
|
|
1317
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName40, toolName40, buildArgs40(ctx)),
|
|
1318
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName40, toolName40, buildArgs40(ctx))
|
|
1265
1319
|
};
|
|
1266
1320
|
|
|
1267
1321
|
// src/commands/te-engage/task/task-detail.ts
|
|
1268
|
-
var
|
|
1269
|
-
var
|
|
1270
|
-
function
|
|
1322
|
+
var serviceName41 = "engage_task";
|
|
1323
|
+
var toolName41 = "query_task_detail";
|
|
1324
|
+
function buildArgs41(ctx) {
|
|
1271
1325
|
return {
|
|
1272
1326
|
projectId: ctx.num("project_id"),
|
|
1273
1327
|
taskId: ctx.str("task_id")
|
|
@@ -1282,14 +1336,14 @@ var taskDetail = {
|
|
|
1282
1336
|
{ name: "task_id", type: "string", required: true, desc: "Task ID" }
|
|
1283
1337
|
],
|
|
1284
1338
|
risk: "read",
|
|
1285
|
-
dryRun: (ctx) => buildMcpDryRun(ctx,
|
|
1286
|
-
execute: async (ctx) => executeMcpCommand(ctx,
|
|
1339
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName41, toolName41, buildArgs41(ctx)),
|
|
1340
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName41, toolName41, buildArgs41(ctx))
|
|
1287
1341
|
};
|
|
1288
1342
|
|
|
1289
1343
|
// src/commands/te-engage/task/task-experiment-report.ts
|
|
1290
|
-
var
|
|
1291
|
-
var
|
|
1292
|
-
function
|
|
1344
|
+
var serviceName42 = "engage_task";
|
|
1345
|
+
var toolName42 = "query_task_experiment_report";
|
|
1346
|
+
function buildArgs42(ctx) {
|
|
1293
1347
|
const args = {
|
|
1294
1348
|
projectId: ctx.num("project_id"),
|
|
1295
1349
|
taskId: ctx.str("task_id"),
|
|
@@ -1320,14 +1374,14 @@ var taskExperimentReport = {
|
|
|
1320
1374
|
validate: (ctx) => {
|
|
1321
1375
|
requireAllowedValue(ctx.str("report_type"), ["overview", "detail"], "report_type");
|
|
1322
1376
|
},
|
|
1323
|
-
dryRun: (ctx) => buildMcpDryRun(ctx,
|
|
1324
|
-
execute: async (ctx) => executeMcpCommand(ctx,
|
|
1377
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName42, toolName42, buildArgs42(ctx)),
|
|
1378
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName42, toolName42, buildArgs42(ctx))
|
|
1325
1379
|
};
|
|
1326
1380
|
|
|
1327
1381
|
// src/commands/te-engage/task/task-list.ts
|
|
1328
|
-
var
|
|
1329
|
-
var
|
|
1330
|
-
function
|
|
1382
|
+
var serviceName43 = "engage_task";
|
|
1383
|
+
var toolName43 = "query_task_list";
|
|
1384
|
+
function buildArgs43(ctx) {
|
|
1331
1385
|
return {
|
|
1332
1386
|
projectId: ctx.num("project_id"),
|
|
1333
1387
|
req: {
|
|
@@ -1348,14 +1402,14 @@ var taskList = {
|
|
|
1348
1402
|
validate: (ctx) => {
|
|
1349
1403
|
readRequiredJsonObject(ctx, "req");
|
|
1350
1404
|
},
|
|
1351
|
-
dryRun: (ctx) => buildMcpDryRun(ctx,
|
|
1352
|
-
execute: async (ctx) => executeMcpCommand(ctx,
|
|
1405
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName43, toolName43, buildArgs43(ctx)),
|
|
1406
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName43, toolName43, buildArgs43(ctx))
|
|
1353
1407
|
};
|
|
1354
1408
|
|
|
1355
1409
|
// src/commands/te-engage/task/task-metric-detail.ts
|
|
1356
|
-
var
|
|
1357
|
-
var
|
|
1358
|
-
function
|
|
1410
|
+
var serviceName44 = "engage_task";
|
|
1411
|
+
var toolName44 = "query_task_metric_detail";
|
|
1412
|
+
function buildArgs44(ctx) {
|
|
1359
1413
|
const args = {
|
|
1360
1414
|
projectId: ctx.num("project_id"),
|
|
1361
1415
|
taskId: ctx.str("task_id"),
|
|
@@ -1393,14 +1447,14 @@ var taskMetricDetail = {
|
|
|
1393
1447
|
validate: (ctx) => {
|
|
1394
1448
|
readOptionalJsonArray(ctx, "metric_id_list");
|
|
1395
1449
|
},
|
|
1396
|
-
dryRun: (ctx) => buildMcpDryRun(ctx,
|
|
1397
|
-
execute: async (ctx) => executeMcpCommand(ctx,
|
|
1450
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName44, toolName44, buildArgs44(ctx)),
|
|
1451
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName44, toolName44, buildArgs44(ctx))
|
|
1398
1452
|
};
|
|
1399
1453
|
|
|
1400
1454
|
// src/commands/te-engage/task/task-stats.ts
|
|
1401
|
-
var
|
|
1402
|
-
var
|
|
1403
|
-
function
|
|
1455
|
+
var serviceName45 = "engage_task";
|
|
1456
|
+
var toolName45 = "get_task_stats";
|
|
1457
|
+
function buildArgs45(ctx) {
|
|
1404
1458
|
return {
|
|
1405
1459
|
projectId: ctx.num("project_id"),
|
|
1406
1460
|
req: {
|
|
@@ -1421,8 +1475,8 @@ var taskStats = {
|
|
|
1421
1475
|
validate: (ctx) => {
|
|
1422
1476
|
readRequiredJsonObject(ctx, "req");
|
|
1423
1477
|
},
|
|
1424
|
-
dryRun: (ctx) => buildMcpDryRun(ctx,
|
|
1425
|
-
execute: async (ctx) => executeMcpCommand(ctx,
|
|
1478
|
+
dryRun: (ctx) => buildMcpDryRun(ctx, serviceName45, toolName45, buildArgs45(ctx)),
|
|
1479
|
+
execute: async (ctx) => executeMcpCommand(ctx, serviceName45, toolName45, buildArgs45(ctx))
|
|
1426
1480
|
};
|
|
1427
1481
|
|
|
1428
1482
|
// src/commands/te-engage/task/index.ts
|
|
@@ -1434,6 +1488,8 @@ var commands4 = [
|
|
|
1434
1488
|
taskDetail,
|
|
1435
1489
|
taskList,
|
|
1436
1490
|
taskStats,
|
|
1491
|
+
buildTaskSaveGuide,
|
|
1492
|
+
saveTask,
|
|
1437
1493
|
manageTask
|
|
1438
1494
|
];
|
|
1439
1495
|
var task_default = commands4;
|