@thinkingai/ae-cli 6.1.13 → 6.1.16
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/dist/{auth-GBMV6TEJ.js → auth-2WTQOP77.js} +3 -3
- package/dist/{auth-NDSXE54J.js → auth-77BUFLGC.js} +57 -13
- package/dist/{capability-TAMDRZYV.js → capability-72DTW5M2.js} +9 -9
- package/dist/{capability-U7TDEEEG.js → capability-PJHNI4GJ.js} +9 -9
- package/dist/{chunk-AFXA7BRK.js → chunk-4KVPKXFX.js} +5 -5
- package/dist/chunk-4SGZG4XY.js +311 -0
- package/dist/chunk-6EIJSNBD.js +8 -0
- package/dist/chunk-C4MGVGJW.js +13 -0
- package/dist/{chunk-WZRX4KOH.js → chunk-GT46FPXN.js} +4 -6
- package/dist/{chunk-5XUSIK27.js → chunk-ILIU36SU.js} +10 -7
- package/dist/{chunk-JHENBQ5B.js → chunk-LYVNONC4.js} +0 -35
- package/dist/{chunk-JUW4AJXN.js → chunk-P3FGXJTU.js} +12 -7
- package/dist/chunk-QGM4M3NI.js +37 -0
- package/dist/{chunk-753BUTNZ.js → chunk-RGKJGKT7.js} +2 -2
- package/dist/{chunk-UIHQJK5E.js → chunk-SAU3QFIQ.js} +3 -3
- package/dist/{chunk-VLWOLBGZ.js → chunk-UOUS37JQ.js} +149 -161
- package/dist/{chunk-AXDXJTPC.js → chunk-UW5UN47B.js} +19 -2
- package/dist/chunk-VPKZ7I72.js +509 -0
- package/dist/{chunk-QATA32VR.js → chunk-VR3LCBHW.js} +2 -2
- package/dist/{chunk-IBH3LDAH.js → chunk-YA6SMTXG.js} +3 -3
- package/dist/chunk-ZZUOD757.js +598 -0
- package/dist/{client-L2YDMHQ6.js → client-TKG4WBHN.js} +4 -5
- package/dist/{community-report-client-M2RW4MXD.js → community-report-client-FI4LNVYS.js} +3 -2
- package/dist/{config-OL2LWGBV.js → config-RE6CMGPK.js} +7 -7
- package/dist/data-integration-2MYMANJI.js +3383 -0
- package/dist/index.js +68 -34
- package/dist/local-data-upload-client-BWHSUQQK.js +167 -0
- package/dist/{memory-MUP7PPL7.js → memory-CHRU2F7W.js} +7 -6
- package/dist/{memory-U4O5PMXH.js → memory-YK33G4T7.js} +7 -6
- package/dist/{metadata-UORZTW3T.js → metadata-UILXHBWF.js} +22 -18
- package/dist/{metadata-VVQ3AQT5.js → metadata-XXR34N5P.js} +22 -18
- package/dist/{model-JTUEO5M4.js → model-K3KLWIW6.js} +7 -3
- package/dist/model-NR3JHFSJ.js +139 -0
- package/dist/{sync-MOSFNBVR.js → sync-DAVKYVMW.js} +8 -6
- package/dist/sync-FCKOVWWS.js +10261 -0
- package/dist/{te-agent-IFKZDHZI.js → te-agent-4BKBODMF.js} +686 -71
- package/dist/te-agent-HLW4VTQK.js +3893 -0
- package/dist/{te-analysis-KOKHJJPE.js → te-analysis-O6DCO6BS.js} +84 -61
- package/dist/{te-analysis-LLOCCBJ4.js → te-analysis-ZMNGOVNW.js} +84 -61
- package/dist/{te-community-HNKVTERD.js → te-community-6HPBWJUZ.js} +24 -19
- package/dist/{te-community-IWE5B7W6.js → te-community-HLC43QKH.js} +24 -20
- package/dist/{te-dataops-KXCEB4CS.js → te-dataops-EJP56W3K.js} +57 -34
- package/dist/{te-dataops-KQPYNAE3.js → te-dataops-HDRUXY4K.js} +59 -34
- package/dist/{te-engage-BRLSRVQT.js → te-engage-FGBGQ4IY.js} +398 -12
- package/dist/{te-engage-HE4OPZIT.js → te-engage-RAK5PESW.js} +398 -12
- package/dist/{te-experiment-K5US7RMG.js → te-experiment-SO5MPDMJ.js} +9 -8
- package/dist/{te-experiment-WA7TFMEL.js → te-experiment-VZF7BT6G.js} +9 -8
- package/dist/{te-kb-OIH3T6CS.js → te-kb-APXBWBDY.js} +6 -6
- package/dist/{te-system-AZ3URMUO.js → te-system-YARIK4S5.js} +7 -4
- package/dist/te-system-Z77IKZFN.js +2213 -0
- package/dist/{te-team-GZPU6UWA.js → te-team-EFKWYKMK.js} +7 -7
- package/dist/{update-TOBFXF2V.js → update-OGPSZM5A.js} +7 -7
- package/package.json +13 -3
- package/skills/ae-agent/SKILL.md +21 -11
- package/skills/ae-agent/references/approval-effect.md +44 -0
- package/skills/ae-agent/references/approval-request.md +46 -0
- package/skills/ae-agent/references/approval-task.md +45 -0
- package/skills/ae-agent/references/approval-type.md +32 -0
- package/skills/ae-agent/references/command_index.md +19 -0
- package/skills/ae-analysis/SKILL.md +11 -7
- package/skills/ae-analysis/references/adhoc_run.md +2 -0
- package/skills/ae-analysis/references/ai_models.md +31 -1
- package/skills/ae-analysis/references/alert_list.md +2 -3
- package/skills/ae-analysis/references/analysis_gateway_assets.md +8 -7
- package/skills/ae-analysis/references/bi_panel_list.md +2 -2
- package/skills/ae-analysis/references/command_index.md +18 -15
- package/skills/ae-analysis/references/dashboard_get.md +8 -2
- package/skills/ae-analysis/references/dashboard_list.md +2 -2
- package/skills/ae-analysis/references/dashboard_report_data_run.md +3 -1
- package/skills/ae-analysis/references/dashboard_update.md +4 -1
- package/skills/ae-analysis/references/favorite_add.md +2 -2
- package/skills/ae-analysis/references/favorite_remove.md +2 -2
- package/skills/ae-analysis/references/metric_create.md +7 -8
- package/skills/ae-analysis/references/project_space_business_filter_upsert.md +17 -0
- package/skills/ae-analysis/references/project_space_list.md +2 -2
- package/skills/ae-analysis/references/public_link_list.md +2 -2
- package/skills/ae-analysis/references/report_list.md +3 -3
- package/skills/ae-analysis/references/report_list_export.md +2 -2
- package/skills/ae-analysis/references/sql_table_list.md +3 -2
- package/skills/ae-analysis/references/user_cluster_update.md +4 -2
- package/skills/ae-analysis/references/user_tag_models.md +4 -4
- package/skills/ae-analysis/references/user_tag_update.md +4 -2
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +3 -3
- package/skills/ae-data-integration/SKILL.md +54 -0
- package/skills/ae-data-integration/references/handoff.md +43 -0
- package/skills/ae-data-integration/references/local-analysis.md +27 -0
- package/skills/ae-data-integration/references/reuse.md +41 -0
- package/skills/ae-data-integration/references/sink-upload.md +58 -0
- package/skills/ae-data-integration/references/source-inspect.md +55 -0
- package/skills/ae-data-integration/references/sync-json-upload.md +60 -0
- package/skills/ae-data-integration/references/tracking-plan.md +35 -0
- package/skills/ae-data-integration/references/transform.md +65 -0
- package/skills/ae-data-integration/references/ue-mapping.md +142 -0
- package/skills/ae-data-integration/references/ue-routing.md +35 -0
- package/skills/ae-data-integration-helper/SKILL.md +1 -1
- package/skills/ae-dataops/SKILL.md +1 -1
- package/skills/ae-dataops/references/dataops-query.md +4 -4
- package/skills/ae-engage/SKILL.md +10 -2
- package/skills/ae-engage/references/flow-metric-user.md +2 -1
- package/skills/ae-engage/references/flow-node-metric-user.md +2 -1
- package/skills/ae-engage/references/flow-node-user.md +2 -1
- package/skills/ae-engage/references/task-indicator-user.md +104 -0
- package/skills/ae-engage/references/task-user-detail-export.md +31 -0
- package/skills/ae-generate-tracking-plan/SKILL.md +54 -3
- package/skills/ae-metadata/SKILL.md +0 -1
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +1 -1
- package/dist/chunk-3FY3RJ26.js +0 -293
- package/dist/chunk-S5NTSDBS.js +0 -198
- package/dist/chunk-ZQKDZXDO.js +0 -317
- package/dist/cli-token-4UPER74P.js +0 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RGKJGKT7.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute,
|
|
6
6
|
resolveGatewayDomain
|
|
@@ -8,21 +8,22 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
printError,
|
|
10
10
|
withOutputMetadata
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GT46FPXN.js";
|
|
12
12
|
import {
|
|
13
13
|
CapabilityGatewayError,
|
|
14
14
|
buildCapabilityGatewayUrl,
|
|
15
15
|
fetchCapabilityGateway,
|
|
16
16
|
requestCapabilityGateway,
|
|
17
17
|
requestCapabilityGatewayWithEnvelope
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-P3FGXJTU.js";
|
|
19
|
+
import "./chunk-C4MGVGJW.js";
|
|
20
|
+
import "./chunk-4SGZG4XY.js";
|
|
21
|
+
import "./chunk-ZZUOD757.js";
|
|
22
22
|
import {
|
|
23
23
|
CliValidationError
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-UW5UN47B.js";
|
|
25
|
+
import "./chunk-LYVNONC4.js";
|
|
26
|
+
import "./chunk-QGM4M3NI.js";
|
|
26
27
|
|
|
27
28
|
// src/commands/te-engage/shared.ts
|
|
28
29
|
function createEngageCapabilityCommand(cliService, config) {
|
|
@@ -3918,6 +3919,319 @@ var groupUpdate = createEngageTaskCapabilityCommand({
|
|
|
3918
3919
|
})
|
|
3919
3920
|
});
|
|
3920
3921
|
|
|
3922
|
+
// src/commands/te-engage/engage-task/indicator-user/shared.ts
|
|
3923
|
+
var ISO_DATE3 = /^\d{4}-\d{2}-\d{2}$/;
|
|
3924
|
+
var DECIMAL_TIME_ZONE = /^[+-]?\d{1,2}(?:\.\d+)?$/;
|
|
3925
|
+
var taskIndicatorUserIndicators = [
|
|
3926
|
+
"original_trigger",
|
|
3927
|
+
"plan",
|
|
3928
|
+
"actual_trigger",
|
|
3929
|
+
"trigger_success",
|
|
3930
|
+
"view",
|
|
3931
|
+
"click",
|
|
3932
|
+
"main",
|
|
3933
|
+
"secondary",
|
|
3934
|
+
"metric",
|
|
3935
|
+
"click_activate",
|
|
3936
|
+
"main_activate",
|
|
3937
|
+
"secondary_activate"
|
|
3938
|
+
];
|
|
3939
|
+
var indicatorSet = new Set(taskIndicatorUserIndicators);
|
|
3940
|
+
var groupBySet = /* @__PURE__ */ new Set(["batch", "date", "trigger", "experiment"]);
|
|
3941
|
+
var retentionTypeSet = /* @__PURE__ */ new Set(["retention", "lost"]);
|
|
3942
|
+
var sourceSet = /* @__PURE__ */ new Set(["task", "experiment", "metric"]);
|
|
3943
|
+
var pushLanguageCodeSet = /* @__PURE__ */ new Set([
|
|
3944
|
+
"all",
|
|
3945
|
+
"default",
|
|
3946
|
+
"ar",
|
|
3947
|
+
"az",
|
|
3948
|
+
"bs",
|
|
3949
|
+
"ca",
|
|
3950
|
+
"zh-Hans",
|
|
3951
|
+
"zh-Hant",
|
|
3952
|
+
"hr",
|
|
3953
|
+
"cs",
|
|
3954
|
+
"da",
|
|
3955
|
+
"nl",
|
|
3956
|
+
"en",
|
|
3957
|
+
"et",
|
|
3958
|
+
"fi",
|
|
3959
|
+
"fr",
|
|
3960
|
+
"ka",
|
|
3961
|
+
"bg",
|
|
3962
|
+
"de",
|
|
3963
|
+
"el",
|
|
3964
|
+
"hi",
|
|
3965
|
+
"he",
|
|
3966
|
+
"hu",
|
|
3967
|
+
"id",
|
|
3968
|
+
"it",
|
|
3969
|
+
"ja",
|
|
3970
|
+
"ko",
|
|
3971
|
+
"lv",
|
|
3972
|
+
"lt",
|
|
3973
|
+
"ms",
|
|
3974
|
+
"nb",
|
|
3975
|
+
"fa",
|
|
3976
|
+
"pl",
|
|
3977
|
+
"pt",
|
|
3978
|
+
"pa",
|
|
3979
|
+
"ro",
|
|
3980
|
+
"ru",
|
|
3981
|
+
"sr",
|
|
3982
|
+
"sk",
|
|
3983
|
+
"es",
|
|
3984
|
+
"sv",
|
|
3985
|
+
"th",
|
|
3986
|
+
"tr",
|
|
3987
|
+
"uk",
|
|
3988
|
+
"vi"
|
|
3989
|
+
]);
|
|
3990
|
+
var lostUnsupportedIndicatorSet = /* @__PURE__ */ new Set([
|
|
3991
|
+
"original_trigger",
|
|
3992
|
+
"metric",
|
|
3993
|
+
"click_activate",
|
|
3994
|
+
"main_activate",
|
|
3995
|
+
"secondary_activate"
|
|
3996
|
+
]);
|
|
3997
|
+
var taskIndicatorUserFlags = [
|
|
3998
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
3999
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." },
|
|
4000
|
+
{
|
|
4001
|
+
name: "indicator",
|
|
4002
|
+
type: "string",
|
|
4003
|
+
required: true,
|
|
4004
|
+
desc: `Indicator segment. Values: ${taskIndicatorUserIndicators.join(", ")}.`
|
|
4005
|
+
},
|
|
4006
|
+
{ name: "start-time", type: "string", required: true, desc: "Segment start date in yyyy-MM-dd format." },
|
|
4007
|
+
{ name: "end-time", type: "string", required: true, desc: "Segment end date in yyyy-MM-dd format." },
|
|
4008
|
+
{
|
|
4009
|
+
name: "group-by",
|
|
4010
|
+
type: "string",
|
|
4011
|
+
required: false,
|
|
4012
|
+
desc: "Grouping context: batch, date, trigger, or experiment. Activate indicators require and default to experiment; others default to date."
|
|
4013
|
+
},
|
|
4014
|
+
{ name: "is-summary", type: "boolean", required: false, desc: "Whether to query a summary segment. Defaults to true." },
|
|
4015
|
+
{
|
|
4016
|
+
name: "retention-type",
|
|
4017
|
+
type: "string",
|
|
4018
|
+
required: false,
|
|
4019
|
+
desc: "Segment mode: retention or lost. Defaults to retention."
|
|
4020
|
+
},
|
|
4021
|
+
{
|
|
4022
|
+
name: "source",
|
|
4023
|
+
type: "string",
|
|
4024
|
+
required: false,
|
|
4025
|
+
desc: "Report source: task, experiment, or metric. Defaults to metric for metric indicators, experiment for activate indicators or experiment grouping, and task otherwise."
|
|
4026
|
+
},
|
|
4027
|
+
{ name: "secondary-index", type: "number", required: false, desc: "Secondary indicator index from 1 to 10." },
|
|
4028
|
+
{ name: "metric-id", type: "string", required: false, desc: "Metric setting ID; required when --indicator=metric." },
|
|
4029
|
+
{ name: "task-instance-id", type: "string", required: false, desc: "Optional non-triggered task instance ID." },
|
|
4030
|
+
{ name: "exp-group-id", type: "string", required: false, desc: "Optional experiment group ID." },
|
|
4031
|
+
{ name: "push-language-code", type: "string", required: false, desc: "Push language filter, such as all, default, en, zh-Hans, or zh-Hant." },
|
|
4032
|
+
{ name: "user-time-zone", type: "string", required: false, desc: "User timezone filter: all or a decimal offset available on the task." },
|
|
4033
|
+
{ name: "show-time-zone", type: "string", required: false, desc: "Display timezone offset from -12 to 14. Omitted or 99 uses the backend default." }
|
|
4034
|
+
];
|
|
4035
|
+
var taskIndicatorUserRequestFlag = {
|
|
4036
|
+
name: "request-id",
|
|
4037
|
+
type: "string",
|
|
4038
|
+
required: false,
|
|
4039
|
+
desc: "Query correlation ID. Generated when omitted."
|
|
4040
|
+
};
|
|
4041
|
+
var taskIndicatorUserLimitFlag = {
|
|
4042
|
+
name: "limit",
|
|
4043
|
+
type: "number",
|
|
4044
|
+
required: false,
|
|
4045
|
+
desc: "Maximum number of rows returned inline. Defaults to backend policy."
|
|
4046
|
+
};
|
|
4047
|
+
var taskIndicatorUserTimeoutFlag = {
|
|
4048
|
+
name: "timeout-seconds",
|
|
4049
|
+
type: "number",
|
|
4050
|
+
required: false,
|
|
4051
|
+
desc: "Query or export timeout in seconds. Defaults to backend policy."
|
|
4052
|
+
};
|
|
4053
|
+
var taskIndicatorUserFormatFlag = {
|
|
4054
|
+
name: "artifact-format",
|
|
4055
|
+
type: "string",
|
|
4056
|
+
required: false,
|
|
4057
|
+
desc: "Export artifact format: csv or jsonl. Defaults to jsonl."
|
|
4058
|
+
};
|
|
4059
|
+
function validateTaskIndicatorUserInput(ctx) {
|
|
4060
|
+
const indicator = ctx.str("indicator");
|
|
4061
|
+
if (!indicatorSet.has(indicator)) {
|
|
4062
|
+
fail2(`--indicator must be one of: ${taskIndicatorUserIndicators.join(", ")}`);
|
|
4063
|
+
}
|
|
4064
|
+
validateDate3(ctx.str("start-time"), "--start-time");
|
|
4065
|
+
validateDate3(ctx.str("end-time"), "--end-time");
|
|
4066
|
+
if (ctx.str("start-time") > ctx.str("end-time")) {
|
|
4067
|
+
fail2("--start-time must be earlier than or equal to --end-time");
|
|
4068
|
+
}
|
|
4069
|
+
validateOptionalSet(ctx.str("group-by"), "--group-by", groupBySet);
|
|
4070
|
+
validateOptionalSet(ctx.str("retention-type"), "--retention-type", retentionTypeSet);
|
|
4071
|
+
validateOptionalSet(ctx.str("source"), "--source", sourceSet);
|
|
4072
|
+
validateOptionalSet(ctx.str("push-language-code"), "--push-language-code", pushLanguageCodeSet);
|
|
4073
|
+
validateShowTimeZone(ctx.str("show-time-zone"));
|
|
4074
|
+
validateUserTimeZone(ctx.str("user-time-zone"));
|
|
4075
|
+
const secondary = indicator === "secondary" || indicator === "secondary_activate";
|
|
4076
|
+
const secondaryIndex = ctx.optionalNum("secondary-index");
|
|
4077
|
+
if (secondary && (secondaryIndex === void 0 || !Number.isInteger(secondaryIndex) || secondaryIndex < 1 || secondaryIndex > 10)) {
|
|
4078
|
+
fail2("--secondary-index must be an integer from 1 to 10 for secondary indicators");
|
|
4079
|
+
}
|
|
4080
|
+
if (!secondary && secondaryIndex !== void 0) {
|
|
4081
|
+
fail2("--secondary-index is only accepted for secondary indicators");
|
|
4082
|
+
}
|
|
4083
|
+
if (indicator === "metric" && !ctx.str("metric-id")) {
|
|
4084
|
+
fail2("--metric-id is required when --indicator=metric");
|
|
4085
|
+
}
|
|
4086
|
+
if (indicator !== "metric" && ctx.str("metric-id")) {
|
|
4087
|
+
fail2("--metric-id is only accepted when --indicator=metric");
|
|
4088
|
+
}
|
|
4089
|
+
const source = ctx.str("source");
|
|
4090
|
+
const metric = indicator === "metric";
|
|
4091
|
+
if (metric && source && source !== "metric") {
|
|
4092
|
+
fail2("--source must be metric when --indicator=metric");
|
|
4093
|
+
}
|
|
4094
|
+
if (!metric && source === "metric") {
|
|
4095
|
+
fail2("--source=metric requires --indicator=metric");
|
|
4096
|
+
}
|
|
4097
|
+
const activate = indicator === "click_activate" || indicator === "main_activate" || indicator === "secondary_activate";
|
|
4098
|
+
const groupBy = ctx.str("group-by");
|
|
4099
|
+
if (activate && source && source !== "experiment") {
|
|
4100
|
+
fail2("--source must be experiment for activate indicators");
|
|
4101
|
+
}
|
|
4102
|
+
if (activate && groupBy && groupBy !== "experiment") {
|
|
4103
|
+
fail2("--group-by must be experiment for activate indicators");
|
|
4104
|
+
}
|
|
4105
|
+
if (ctx.str("retention-type") === "lost" && lostUnsupportedIndicatorSet.has(indicator)) {
|
|
4106
|
+
fail2(`--retention-type=lost is not supported for --indicator=${indicator}`);
|
|
4107
|
+
}
|
|
4108
|
+
const isSummary = readOptionalBoolean(ctx, "is-summary");
|
|
4109
|
+
const effectiveGroupBy = groupBy || (activate ? "experiment" : "date");
|
|
4110
|
+
if (indicator === "plan" && ctx.str("exp-group-id")) {
|
|
4111
|
+
fail2("--exp-group-id is not supported when --indicator=plan");
|
|
4112
|
+
}
|
|
4113
|
+
if (indicator === "plan" && effectiveGroupBy === "experiment" && isSummary === false) {
|
|
4114
|
+
fail2("--is-summary=false is not supported for plan indicators grouped by experiment");
|
|
4115
|
+
}
|
|
4116
|
+
if (effectiveGroupBy === "experiment" && !metric && source && source !== "experiment") {
|
|
4117
|
+
fail2("--source must be experiment when --group-by=experiment");
|
|
4118
|
+
}
|
|
4119
|
+
if (effectiveGroupBy === "batch" && isSummary === false && !ctx.str("task-instance-id")) {
|
|
4120
|
+
fail2("--task-instance-id is required for a non-summary batch segment");
|
|
4121
|
+
}
|
|
4122
|
+
if (effectiveGroupBy === "experiment" && isSummary === false && !ctx.str("exp-group-id")) {
|
|
4123
|
+
fail2("--exp-group-id is required for a non-summary experiment segment");
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4126
|
+
function buildTaskIndicatorUserInput(ctx) {
|
|
4127
|
+
return {
|
|
4128
|
+
project_id: ctx.num("project-id"),
|
|
4129
|
+
task_id: ctx.str("task-id"),
|
|
4130
|
+
indicator: ctx.str("indicator"),
|
|
4131
|
+
start_time: ctx.str("start-time"),
|
|
4132
|
+
end_time: ctx.str("end-time"),
|
|
4133
|
+
group_by: ctx.str("group-by") || void 0,
|
|
4134
|
+
is_summary: readOptionalBoolean(ctx, "is-summary"),
|
|
4135
|
+
retention_type: ctx.str("retention-type") || void 0,
|
|
4136
|
+
source: ctx.str("source") || void 0,
|
|
4137
|
+
secondary_index: ctx.optionalNum("secondary-index"),
|
|
4138
|
+
metric_id: ctx.str("metric-id") || void 0,
|
|
4139
|
+
task_instance_id: ctx.str("task-instance-id") || void 0,
|
|
4140
|
+
exp_group_id: ctx.str("exp-group-id") || void 0,
|
|
4141
|
+
push_language_code: ctx.str("push-language-code") || void 0,
|
|
4142
|
+
user_time_zone: ctx.str("user-time-zone") || void 0,
|
|
4143
|
+
show_time_zone: ctx.str("show-time-zone") || void 0,
|
|
4144
|
+
request_id: ctx.str("request-id") || void 0,
|
|
4145
|
+
limit: ctx.optionalNum("limit"),
|
|
4146
|
+
format: ctx.str("artifact-format") || void 0,
|
|
4147
|
+
timeout_seconds: ctx.optionalNum("timeout-seconds")
|
|
4148
|
+
};
|
|
4149
|
+
}
|
|
4150
|
+
function validateDate3(value, flag) {
|
|
4151
|
+
if (!ISO_DATE3.test(value)) {
|
|
4152
|
+
fail2(`${flag} must be in yyyy-MM-dd format`);
|
|
4153
|
+
}
|
|
4154
|
+
}
|
|
4155
|
+
function validateOptionalSet(value, flag, allowed) {
|
|
4156
|
+
if (value && !allowed.has(value)) {
|
|
4157
|
+
fail2(`${flag} must be one of: ${[...allowed].join(", ")}`);
|
|
4158
|
+
}
|
|
4159
|
+
}
|
|
4160
|
+
function validateShowTimeZone(value) {
|
|
4161
|
+
if (!value) {
|
|
4162
|
+
return;
|
|
4163
|
+
}
|
|
4164
|
+
if (!DECIMAL_TIME_ZONE.test(value)) {
|
|
4165
|
+
fail2("--show-time-zone must use decimal hour-offset format like 8.0 or -5.0");
|
|
4166
|
+
}
|
|
4167
|
+
const offset = Number(value);
|
|
4168
|
+
if ((offset < -12 || offset > 14) && offset !== 99) {
|
|
4169
|
+
fail2("--show-time-zone must be between -12 and 14, or 99");
|
|
4170
|
+
}
|
|
4171
|
+
}
|
|
4172
|
+
function validateUserTimeZone(value) {
|
|
4173
|
+
if (!value || value === "all") {
|
|
4174
|
+
return;
|
|
4175
|
+
}
|
|
4176
|
+
if (!DECIMAL_TIME_ZONE.test(value)) {
|
|
4177
|
+
fail2("--user-time-zone must be all or a decimal hour offset like 8.0 or -5.0");
|
|
4178
|
+
}
|
|
4179
|
+
const offset = Number(value);
|
|
4180
|
+
if (offset < -12 || offset > 14) {
|
|
4181
|
+
fail2("--user-time-zone must be between -12 and 14, or all");
|
|
4182
|
+
}
|
|
4183
|
+
}
|
|
4184
|
+
function fail2(message) {
|
|
4185
|
+
printError("validation", message);
|
|
4186
|
+
process.exit(1);
|
|
4187
|
+
}
|
|
4188
|
+
|
|
4189
|
+
// src/commands/te-engage/engage-task/indicator-user/export.ts
|
|
4190
|
+
var taskIndicatorUserExport = createEngageTaskCapabilityCommand({
|
|
4191
|
+
resource: "indicator-user",
|
|
4192
|
+
command: "export",
|
|
4193
|
+
capabilityId: "engage-task.indicator-user.export",
|
|
4194
|
+
description: "Export users behind an engagement-task indicator segment.",
|
|
4195
|
+
flags: [
|
|
4196
|
+
...taskIndicatorUserFlags,
|
|
4197
|
+
taskIndicatorUserRequestFlag,
|
|
4198
|
+
taskIndicatorUserFormatFlag,
|
|
4199
|
+
taskIndicatorUserTimeoutFlag
|
|
4200
|
+
],
|
|
4201
|
+
risk: "read",
|
|
4202
|
+
validate: validateTaskIndicatorUserInput,
|
|
4203
|
+
buildInput: buildTaskIndicatorUserInput
|
|
4204
|
+
});
|
|
4205
|
+
|
|
4206
|
+
// src/commands/te-engage/engage-task/indicator-user/run.ts
|
|
4207
|
+
var taskIndicatorUserRun = createEngageTaskCapabilityCommand({
|
|
4208
|
+
resource: "indicator-user",
|
|
4209
|
+
command: "run",
|
|
4210
|
+
capabilityId: "engage-task.indicator-user.run",
|
|
4211
|
+
description: "Query users behind an engagement-task indicator segment inline.",
|
|
4212
|
+
flags: [
|
|
4213
|
+
...taskIndicatorUserFlags,
|
|
4214
|
+
taskIndicatorUserRequestFlag,
|
|
4215
|
+
taskIndicatorUserLimitFlag,
|
|
4216
|
+
taskIndicatorUserTimeoutFlag
|
|
4217
|
+
],
|
|
4218
|
+
risk: "read",
|
|
4219
|
+
validate: validateTaskIndicatorUserInput,
|
|
4220
|
+
buildInput: buildTaskIndicatorUserInput
|
|
4221
|
+
});
|
|
4222
|
+
|
|
4223
|
+
// src/commands/te-engage/engage-task/indicator-user/sql.ts
|
|
4224
|
+
var taskIndicatorUserSql = createEngageTaskCapabilityCommand({
|
|
4225
|
+
resource: "indicator-user",
|
|
4226
|
+
command: "sql",
|
|
4227
|
+
capabilityId: "engage-task.indicator-user.sql",
|
|
4228
|
+
description: "Build validated user-detail SQL for an engagement-task indicator segment.",
|
|
4229
|
+
flags: taskIndicatorUserFlags,
|
|
4230
|
+
risk: "read",
|
|
4231
|
+
validate: validateTaskIndicatorUserInput,
|
|
4232
|
+
buildInput: buildTaskIndicatorUserInput
|
|
4233
|
+
});
|
|
4234
|
+
|
|
3921
4235
|
// src/commands/te-engage/engage-task/metric/list.ts
|
|
3922
4236
|
var metricList = createEngageTaskCapabilityCommand({
|
|
3923
4237
|
resource: "metric",
|
|
@@ -3974,7 +4288,7 @@ var operationLogQuery2 = createEngageTaskCapabilityCommand({
|
|
|
3974
4288
|
});
|
|
3975
4289
|
|
|
3976
4290
|
// src/commands/te-engage/engage-task/push-record/query.ts
|
|
3977
|
-
var
|
|
4291
|
+
var ISO_DATE4 = /^\d{4}-\d{2}-\d{2}$/;
|
|
3978
4292
|
var pushRecordQuery = createEngageTaskCapabilityCommand({
|
|
3979
4293
|
resource: "push-record",
|
|
3980
4294
|
command: "query",
|
|
@@ -4002,11 +4316,11 @@ var pushRecordQuery = createEngageTaskCapabilityCommand({
|
|
|
4002
4316
|
validate: (ctx) => {
|
|
4003
4317
|
const startDate = ctx.str("start-date");
|
|
4004
4318
|
const endDate = ctx.str("end-date");
|
|
4005
|
-
if (startDate && !
|
|
4319
|
+
if (startDate && !ISO_DATE4.test(startDate)) {
|
|
4006
4320
|
printError("validation", "--start-date must be in yyyy-MM-dd format");
|
|
4007
4321
|
process.exit(1);
|
|
4008
4322
|
}
|
|
4009
|
-
if (endDate && !
|
|
4323
|
+
if (endDate && !ISO_DATE4.test(endDate)) {
|
|
4010
4324
|
printError("validation", "--end-date must be in yyyy-MM-dd format");
|
|
4011
4325
|
process.exit(1);
|
|
4012
4326
|
}
|
|
@@ -4317,6 +4631,74 @@ var taskStats = createEngageTaskCapabilityCommand({
|
|
|
4317
4631
|
buildInput: (ctx) => ({ project_id: ctx.num("project-id"), req: readRequiredJsonObject(ctx, "req") })
|
|
4318
4632
|
});
|
|
4319
4633
|
|
|
4634
|
+
// src/commands/te-engage/engage-task/user-detail/export.ts
|
|
4635
|
+
var taskUserDetailStatuses = [
|
|
4636
|
+
"frequency_control",
|
|
4637
|
+
"fatigue_control",
|
|
4638
|
+
"fail",
|
|
4639
|
+
"success",
|
|
4640
|
+
"sample",
|
|
4641
|
+
"exp_skip_push",
|
|
4642
|
+
"deduplicate",
|
|
4643
|
+
"push_plan",
|
|
4644
|
+
"push_actual"
|
|
4645
|
+
];
|
|
4646
|
+
var statusSet = new Set(taskUserDetailStatuses);
|
|
4647
|
+
var taskUserDetailExport = createEngageTaskCapabilityCommand({
|
|
4648
|
+
resource: "user-detail",
|
|
4649
|
+
command: "export",
|
|
4650
|
+
capabilityId: "engage-task.user-detail.export",
|
|
4651
|
+
description: "Export user details for one non-triggered task instance and user status.",
|
|
4652
|
+
flags: [
|
|
4653
|
+
{ name: "project-id", type: "number", required: true, alias: "p", desc: "Numeric project ID." },
|
|
4654
|
+
{ name: "task-id", type: "string", required: true, desc: "Engagement task ID." },
|
|
4655
|
+
{ name: "task-instance-id", type: "string", required: true, desc: "Non-triggered task instance ID." },
|
|
4656
|
+
{
|
|
4657
|
+
name: "task-exec-detail-id",
|
|
4658
|
+
type: "string",
|
|
4659
|
+
required: false,
|
|
4660
|
+
desc: "Optional execution detail ID used to narrow the task instance export."
|
|
4661
|
+
},
|
|
4662
|
+
{
|
|
4663
|
+
name: "user-status",
|
|
4664
|
+
type: "string",
|
|
4665
|
+
required: false,
|
|
4666
|
+
desc: `English user status. Defaults to fail. Values: ${taskUserDetailStatuses.join(", ")}.`
|
|
4667
|
+
},
|
|
4668
|
+
{ name: "request-id", type: "string", required: false, desc: "Export correlation ID. Generated when omitted." },
|
|
4669
|
+
{
|
|
4670
|
+
name: "artifact-format",
|
|
4671
|
+
type: "string",
|
|
4672
|
+
required: false,
|
|
4673
|
+
desc: "Export artifact format: csv or jsonl. Defaults to jsonl."
|
|
4674
|
+
},
|
|
4675
|
+
{
|
|
4676
|
+
name: "timeout-seconds",
|
|
4677
|
+
type: "number",
|
|
4678
|
+
required: false,
|
|
4679
|
+
desc: "Export timeout in seconds. Defaults to backend policy and cannot exceed 21600."
|
|
4680
|
+
}
|
|
4681
|
+
],
|
|
4682
|
+
risk: "read",
|
|
4683
|
+
validate: (ctx) => {
|
|
4684
|
+
const status = ctx.str("user-status") || "fail";
|
|
4685
|
+
if (!statusSet.has(status)) {
|
|
4686
|
+
printError("validation", `--user-status must be one of: ${taskUserDetailStatuses.join(", ")}`);
|
|
4687
|
+
process.exit(1);
|
|
4688
|
+
}
|
|
4689
|
+
},
|
|
4690
|
+
buildInput: (ctx) => ({
|
|
4691
|
+
project_id: ctx.num("project-id"),
|
|
4692
|
+
task_id: ctx.str("task-id"),
|
|
4693
|
+
task_instance_id: ctx.str("task-instance-id"),
|
|
4694
|
+
task_exec_detail_id: ctx.str("task-exec-detail-id") || void 0,
|
|
4695
|
+
user_status: ctx.str("user-status") || "fail",
|
|
4696
|
+
request_id: ctx.str("request-id") || void 0,
|
|
4697
|
+
format: ctx.str("artifact-format") || void 0,
|
|
4698
|
+
timeout_seconds: ctx.optionalNum("timeout-seconds")
|
|
4699
|
+
})
|
|
4700
|
+
});
|
|
4701
|
+
|
|
4320
4702
|
// src/commands/te-engage/engage-task/index.ts
|
|
4321
4703
|
var commands6 = [
|
|
4322
4704
|
taskList,
|
|
@@ -4332,6 +4714,9 @@ var commands6 = [
|
|
|
4332
4714
|
groupDelete,
|
|
4333
4715
|
groupList,
|
|
4334
4716
|
groupUpdate,
|
|
4717
|
+
taskIndicatorUserSql,
|
|
4718
|
+
taskIndicatorUserRun,
|
|
4719
|
+
taskIndicatorUserExport,
|
|
4335
4720
|
metricList,
|
|
4336
4721
|
metricUpdate,
|
|
4337
4722
|
operationLogQuery2,
|
|
@@ -4343,7 +4728,8 @@ var commands6 = [
|
|
|
4343
4728
|
segmentListSetVisibility,
|
|
4344
4729
|
taskDelete,
|
|
4345
4730
|
taskModifyGroup,
|
|
4346
|
-
taskSubmitApproval
|
|
4731
|
+
taskSubmitApproval,
|
|
4732
|
+
taskUserDetailExport
|
|
4347
4733
|
];
|
|
4348
4734
|
var engage_task_default = commands6;
|
|
4349
4735
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VR3LCBHW.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute
|
|
6
6
|
} from "./chunk-PTE56QPL.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-GT46FPXN.js";
|
|
8
|
+
import "./chunk-ILIU36SU.js";
|
|
9
|
+
import "./chunk-6EIJSNBD.js";
|
|
10
|
+
import "./chunk-4SGZG4XY.js";
|
|
11
|
+
import "./chunk-ZZUOD757.js";
|
|
12
|
+
import "./chunk-UW5UN47B.js";
|
|
13
|
+
import "./chunk-LYVNONC4.js";
|
|
14
|
+
import "./chunk-QGM4M3NI.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/te-experiment/capability-shared.ts
|
|
16
17
|
function createExperimentCapabilityCommand(config) {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCapabilityCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RGKJGKT7.js";
|
|
4
4
|
import {
|
|
5
5
|
registerCapabilityGatewayRoute
|
|
6
6
|
} from "./chunk-PTE56QPL.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-GT46FPXN.js";
|
|
8
|
+
import "./chunk-P3FGXJTU.js";
|
|
9
|
+
import "./chunk-C4MGVGJW.js";
|
|
10
|
+
import "./chunk-4SGZG4XY.js";
|
|
11
|
+
import "./chunk-ZZUOD757.js";
|
|
12
|
+
import "./chunk-UW5UN47B.js";
|
|
13
|
+
import "./chunk-LYVNONC4.js";
|
|
14
|
+
import "./chunk-QGM4M3NI.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/te-experiment/capability-shared.ts
|
|
16
17
|
function createExperimentCapabilityCommand(config) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
kbApi,
|
|
3
3
|
kbUpload
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-4KVPKXFX.js";
|
|
5
|
+
import "./chunk-4SGZG4XY.js";
|
|
6
|
+
import "./chunk-ZZUOD757.js";
|
|
7
|
+
import "./chunk-UW5UN47B.js";
|
|
8
|
+
import "./chunk-LYVNONC4.js";
|
|
9
|
+
import "./chunk-QGM4M3NI.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/te-kb/query.ts
|
|
12
12
|
var API_PATH = "/agent/api/external/knowledge-bases/query";
|
|
@@ -7,14 +7,17 @@ import {
|
|
|
7
7
|
putToMainApp,
|
|
8
8
|
tryLoadTeAgentSandboxCredentials,
|
|
9
9
|
uploadToMainApp
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UOUS37JQ.js";
|
|
11
|
+
import "./chunk-C4MGVGJW.js";
|
|
12
|
+
import "./chunk-4SGZG4XY.js";
|
|
11
13
|
import {
|
|
12
14
|
safeJsonParse
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZZUOD757.js";
|
|
14
16
|
import {
|
|
15
17
|
CliValidationError
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-UW5UN47B.js";
|
|
19
|
+
import "./chunk-LYVNONC4.js";
|
|
20
|
+
import "./chunk-QGM4M3NI.js";
|
|
18
21
|
|
|
19
22
|
// src/commands/te-system/shared.ts
|
|
20
23
|
import { readFileSync } from "fs";
|