@thinkingai/ae-cli 6.1.4 → 6.1.6
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 +3 -2
- package/README.zh.md +3 -2
- package/dist/{auth-MEJ642P4.js → auth-ENM3FE6L.js} +3 -2
- package/dist/{auth-7H3HAAJ3.js → auth-UPGUOKTW.js} +13 -6
- package/dist/{capability-QW4AVJHI.js → capability-AJC5CBRT.js} +49 -17
- package/dist/{capability-SCRFGODD.js → capability-TQ5KU5Q6.js} +49 -17
- package/dist/chunk-24BAVOX3.js +51 -0
- package/dist/{chunk-MDJGDI6K.js → chunk-3KI3RRXX.js} +5 -5
- package/dist/{chunk-PKRD2IEM.js → chunk-3P3562ZX.js} +9 -7
- package/dist/{chunk-R77JT7XD.js → chunk-4Q5TNP4Q.js} +4 -4
- package/dist/{chunk-7OLGDQQ2.js → chunk-6CHYBI64.js} +2 -2
- package/dist/{chunk-6LEYLOV3.js → chunk-CPVTECJ3.js} +9 -7
- package/dist/{chunk-KCA6BA5D.js → chunk-DB4Q3ANU.js} +5 -3
- package/dist/{chunk-2NDGFQHW.js → chunk-E7UXXHO3.js} +11 -3
- package/dist/{chunk-I4A62X3N.js → chunk-HQ2A7ITL.js} +23 -14
- package/dist/chunk-IMMGMU54.js +674 -0
- package/dist/{chunk-AJTH7LT3.js → chunk-IR4ZLVPW.js} +4 -2
- package/dist/{chunk-TBHBYKXZ.js → chunk-ISY6HMHM.js} +2 -2
- package/dist/{chunk-KGJQCYVC.js → chunk-LCXU3AAT.js} +4 -2
- package/dist/chunk-LYVNONC4.js +86 -0
- package/dist/{chunk-DYOS6YY7.js → chunk-RGXCNC4N.js} +23 -14
- package/dist/{chunk-YCLVYFK7.js → chunk-V6FR6WTW.js} +45 -87
- package/dist/chunk-VTWMIC5L.js +27 -0
- package/dist/{cli-token-TVQRSE46.js → cli-token-4SBMXAUK.js} +6 -3
- package/dist/{client-2643Z5AG.js → client-PP5FETMW.js} +4 -3
- package/dist/community-report-client-KK2QBANO.js +145 -0
- package/dist/{config-7UZWDE74.js → config-RCCGHHYA.js} +6 -3
- package/dist/index.js +506 -221
- package/dist/{metadata-BFDL6RUK.js → metadata-3M5F2AED.js} +14 -13
- package/dist/{metadata-FCLDBXX2.js → metadata-W2MEOI4Z.js} +14 -13
- package/dist/{model-T3KZJWLW.js → model-OYQLXCQY.js} +3 -2
- package/dist/{raw-CN542NGT.js → raw-TPB7KSZO.js} +6 -4
- package/dist/{sync-ERNHDPB5.js → sync-EFJKFZK2.js} +6 -3
- package/dist/{te-agent-FCCWUDTJ.js → te-agent-K2OWMZXT.js} +3 -2
- package/dist/{te-analysis-PUVF5IF4.js → te-analysis-I73ZS4NK.js} +903 -33
- package/dist/{te-analysis-UJDOKPAN.js → te-analysis-Q7AZCDU4.js} +903 -33
- package/dist/{te-common-XLAGWNIV.js → te-common-ST3QPSXJ.js} +7 -6
- package/dist/{te-common-VUX3VOXZ.js → te-common-WSLIKKPC.js} +7 -6
- package/dist/te-community-WXGB6IOX.js +1659 -0
- package/dist/te-community-X2AHXGCA.js +1659 -0
- package/dist/{te-dataops-ZNJBQ6VT.js → te-dataops-MJV54MNY.js} +10 -8
- package/dist/{te-dataops-F36T656A.js → te-dataops-OA7I6HBG.js} +10 -8
- package/dist/{te-engage-QBCCME22.js → te-engage-2FSDUOIZ.js} +973 -1585
- package/dist/{te-engage-K4AEUPK5.js → te-engage-BMJ6UOUU.js} +973 -1585
- package/dist/te-experiment-4JC7WUKW.js +590 -0
- package/dist/te-experiment-KYRWAUZY.js +590 -0
- package/dist/{te-kb-AYCODNU6.js → te-kb-E7NSCBRB.js} +74 -12
- package/dist/{te-meta-ARDIW3YI.js → te-meta-Q4L6EE3Q.js} +7 -6
- package/dist/{te-meta-UUROEODR.js → te-meta-VHCN4Q62.js} +7 -6
- package/dist/{te-team-OKCOX7OE.js → te-team-PDKKW7Q5.js} +7 -6
- package/dist/tracking/i18n/resources/cli/en.json +4 -3
- package/dist/tracking/i18n/resources/cli/ja.json +4 -3
- package/dist/tracking/i18n/resources/cli/ko.json +4 -3
- package/dist/tracking/i18n/resources/cli/zh.json +4 -3
- package/package.json +7 -3
- package/skills/ae-agent/SKILL.md +2 -1
- package/skills/ae-analysis/SKILL.md +12 -1
- package/skills/ae-analysis/references/adhoc_export.md +2 -0
- package/skills/ae-analysis/references/adhoc_run.md +2 -0
- package/skills/ae-analysis/references/alert_create.md +25 -0
- package/skills/ae-analysis/references/alert_definition_schema_get.md +24 -0
- package/skills/ae-analysis/references/alert_delete.md +26 -0
- package/skills/ae-analysis/references/alert_detail_list.md +27 -0
- package/skills/ae-analysis/references/alert_get.md +25 -0
- package/skills/ae-analysis/references/alert_job_list.md +24 -0
- package/skills/ae-analysis/references/alert_list.md +27 -0
- package/skills/ae-analysis/references/alert_notice_config_list.md +24 -0
- package/skills/ae-analysis/references/alert_start.md +25 -0
- package/skills/ae-analysis/references/alert_stop.md +25 -0
- package/skills/ae-analysis/references/alert_update.md +26 -0
- package/skills/ae-analysis/references/bi_panel_create.md +3 -3
- package/skills/ae-analysis/references/check_delete.md +27 -0
- package/skills/ae-analysis/references/check_export.md +27 -0
- package/skills/ae-analysis/references/check_get.md +27 -0
- package/skills/ae-analysis/references/check_list.md +24 -0
- package/skills/ae-analysis/references/check_retry.md +27 -0
- package/skills/ae-analysis/references/check_run.md +25 -0
- package/skills/ae-analysis/references/command_index.md +61 -27
- package/skills/ae-analysis/references/dashboard_create.md +3 -3
- package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -0
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
- package/skills/ae-analysis/references/dashboard_report_data_export.md +3 -3
- package/skills/ae-analysis/references/dashboard_report_data_run.md +3 -3
- package/skills/ae-analysis/references/event_blacklist_add.md +25 -0
- package/skills/ae-analysis/references/event_blacklist_list.md +24 -0
- package/skills/ae-analysis/references/event_blacklist_update.md +26 -0
- package/skills/ae-analysis/references/ingest_error_list.md +27 -0
- package/skills/ae-analysis/references/ingest_summary.md +26 -0
- package/skills/ae-analysis/references/live_data_export.md +27 -0
- package/skills/ae-analysis/references/live_data_list.md +27 -0
- package/skills/ae-analysis/references/plan_change_log_export.md +27 -0
- package/skills/ae-analysis/references/plan_change_log_list.md +24 -0
- package/skills/ae-analysis/references/plan_delete_items.md +30 -0
- package/skills/ae-analysis/references/plan_export.md +26 -0
- package/skills/ae-analysis/references/plan_generate.md +27 -0
- package/skills/ae-analysis/references/plan_get.md +24 -0
- package/skills/ae-analysis/references/plan_import_excel.md +26 -0
- package/skills/ae-analysis/references/plan_save_items.md +27 -0
- package/skills/ae-analysis/references/plan_sync_from_meta.md +24 -0
- package/skills/ae-analysis/references/project_role_delete.md +4 -3
- package/skills/ae-analysis/references/project_role_get.md +4 -3
- package/skills/ae-analysis/references/project_role_user_list.md +4 -3
- package/skills/ae-analysis/references/query_create_result_cluster.md +2 -1
- package/skills/ae-analysis/references/report_data_export.md +3 -1
- package/skills/ae-analysis/references/report_data_run.md +12 -2
- package/skills/ae-analysis/references/sdk_sample_generate.md +24 -0
- package/skills/ae-analysis/references/user_cluster_create.md +2 -0
- package/skills/ae-analysis/references/user_cluster_create_id.md +2 -0
- package/skills/ae-analysis/references/user_cluster_update.md +2 -0
- package/skills/ae-analysis/references/user_cluster_update_id.md +2 -0
- package/skills/ae-analysis/references/user_tag_create.md +2 -0
- package/skills/ae-analysis/references/user_tag_create_id.md +2 -0
- package/skills/ae-analysis/references/user_tag_update.md +2 -0
- package/skills/ae-analysis/references/user_tag_update_id.md +2 -0
- package/skills/ae-analysis-global/SKILL.md +2 -0
- package/skills/ae-capability/SKILL.md +7 -5
- package/skills/ae-community/SKILL.md +72 -8
- package/skills/ae-community/references/community-chat-analysis.md +341 -0
- package/skills/ae-community/references/community-data-report.md +301 -0
- package/skills/ae-dataops/SKILL.md +2 -1
- package/skills/ae-engage/SKILL.md +129 -105
- package/skills/ae-engage/references/activity-activity-type.md +1 -1
- package/skills/ae-engage/references/activity-activity.md +1 -1
- package/skills/ae-engage/references/activity-approval.md +5 -7
- package/skills/ae-engage/references/activity-task.md +12 -18
- package/skills/ae-engage/references/activity-topic.md +39 -22
- package/skills/ae-engage/references/add-approver.md +4 -4
- package/skills/ae-engage/references/add-channel.md +10 -5
- package/skills/ae-engage/references/approval-approver-delete.md +1 -1
- package/skills/ae-engage/references/approver-list.md +4 -4
- package/skills/ae-engage/references/build-task-save-guide.md +13 -13
- package/skills/ae-engage/references/cancel-query-by-request-id.md +7 -6
- package/skills/ae-engage/references/channel-detail.md +14 -9
- package/skills/ae-engage/references/channel-list.md +15 -10
- package/skills/ae-engage/references/channel-mgmt.md +109 -0
- package/skills/ae-engage/references/channel-test-send.md +1 -1
- package/skills/ae-engage/references/channel-update-config.md +1 -1
- package/skills/ae-engage/references/channel_touch_limits_list.md +1 -1
- package/skills/ae-engage/references/client-param.md +34 -16
- package/skills/ae-engage/references/common-metric.md +85 -18
- package/skills/ae-engage/references/config-item-analysis-report.md +8 -27
- package/skills/ae-engage/references/config-item-strategy-comparison.md +7 -18
- package/skills/ae-engage/references/config-item-trigger-report.md +8 -35
- package/skills/ae-engage/references/delete-channel.md +5 -5
- package/skills/ae-engage/references/delete-flow.md +5 -5
- package/skills/ae-engage/references/flow-ab-split-node-report.md +11 -45
- package/skills/ae-engage/references/flow-detail.md +15 -10
- package/skills/ae-engage/references/flow-list.md +9 -4
- package/skills/ae-engage/references/flow-node-config-schema.md +9 -8
- package/skills/ae-engage/references/flow-node-detail-report.md +11 -46
- package/skills/ae-engage/references/flow-node-overview-report.md +11 -43
- package/skills/ae-engage/references/flow-process-report.md +12 -50
- package/skills/ae-engage/references/flow-update-remark.md +19 -0
- package/skills/ae-engage/references/manage-flow.md +19 -19
- package/skills/ae-engage/references/manage-task.md +5 -5
- package/skills/ae-engage/references/modify-flow-base-info.md +8 -8
- package/skills/ae-engage/references/preset-event.md +1 -1
- package/skills/ae-engage/references/push-language.md +1 -1
- package/skills/ae-engage/references/save-flow.md +54 -52
- package/skills/ae-engage/references/save-task.md +23 -17
- package/skills/ae-engage/references/scene-config-channel.md +90 -10
- package/skills/ae-engage/references/scene-config-group.md +1 -1
- package/skills/ae-engage/references/scene-config-item.md +27 -4
- package/skills/ae-engage/references/scene-config-metric.md +1 -1
- package/skills/ae-engage/references/scene-config-param.md +2 -2
- package/skills/ae-engage/references/scene-preset-metric.md +1 -1
- package/skills/ae-engage/references/scene-strategy.md +19 -3
- package/skills/ae-engage/references/scene-template.md +10 -4
- package/skills/ae-engage/references/task-data-detail.md +5 -67
- package/skills/ae-engage/references/task-data-overview.md +5 -35
- package/skills/ae-engage/references/task-detail.md +5 -5
- package/skills/ae-engage/references/task-experiment-report.md +5 -38
- package/skills/ae-engage/references/task-list.md +4 -4
- package/skills/ae-engage/references/task-metric-detail.md +5 -43
- package/skills/ae-engage/references/task-stats.md +5 -5
- package/skills/ae-engage/references/update-channel-status.md +6 -6
- package/skills/ae-engage/references/validate-flow-node-config.md +12 -11
- package/skills/ae-engage/references/whitelist-list.md +4 -4
- package/skills/ae-engage/references/whitelist.md +1 -1
- package/skills/ae-engage/references/workbench-workbench.md +1 -1
- package/skills/ae-experiment/SKILL.md +30 -20
- package/skills/ae-experiment/references/batch_delete_experiment.md +4 -4
- package/skills/ae-experiment/references/batch_delete_feature.md +3 -3
- package/skills/ae-experiment/references/batch_delete_traffic_layer.md +4 -4
- package/skills/ae-experiment/references/cancel_experiment_query_by_request_id.md +5 -4
- package/skills/ae-experiment/references/check_experiment_ready.md +7 -5
- package/skills/ae-experiment/references/check_experiment_traffic_layer_conflict.md +37 -0
- package/skills/ae-experiment/references/delete_metric.md +4 -4
- package/skills/ae-experiment/references/manage_experiment.md +8 -6
- package/skills/ae-experiment/references/manage_feature_status.md +3 -3
- package/skills/ae-experiment/references/query_bucket_list.md +5 -3
- package/skills/ae-experiment/references/query_experiment_detail.md +6 -4
- package/skills/ae-experiment/references/query_experiment_list.md +12 -4
- package/skills/ae-experiment/references/query_experiment_list_archived.md +15 -0
- package/skills/ae-experiment/references/query_experiment_metric_trend.md +6 -10
- package/skills/ae-experiment/references/query_experiment_operation_log.md +17 -0
- package/skills/ae-experiment/references/query_experiment_report_summary.md +5 -6
- package/skills/ae-experiment/references/query_experiment_sample_size_report.md +6 -10
- package/skills/ae-experiment/references/query_feature_detail.md +6 -4
- package/skills/ae-experiment/references/query_feature_list.md +5 -3
- package/skills/ae-experiment/references/query_feature_operation_log.md +19 -0
- package/skills/ae-experiment/references/query_feature_version_list.md +20 -0
- package/skills/ae-experiment/references/query_metric_detail.md +6 -4
- package/skills/ae-experiment/references/query_metric_list.md +5 -3
- package/skills/ae-experiment/references/query_traffic_layer_detail.md +6 -4
- package/skills/ae-experiment/references/query_traffic_layer_list.md +5 -3
- package/skills/ae-experiment/references/save_experiment.md +148 -9
- package/skills/ae-experiment/references/save_feature.md +3 -3
- package/skills/ae-experiment/references/save_metric.md +3 -3
- package/skills/ae-experiment/references/save_submit_experiment.md +6 -6
- package/skills/ae-experiment/references/save_traffic_layer.md +3 -3
- package/skills/ae-experiment/references/update_experiment_group.md +20 -0
- package/skills/ae-generate-tracking-code/SKILL.md +4 -4
- package/skills/ae-generate-tracking-plan/SKILL.md +132 -11
- package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +98 -33
- package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +16 -14
- package/skills/ae-kb/SKILL.md +11 -6
- package/skills/ae-metadata/SKILL.md +2 -1
- package/skills/ae-team/SKILL.md +2 -1
- package/dist/chunk-NOO24N7W.js +0 -11
- package/dist/chunk-TNW2CI4W.js +0 -129
- package/dist/te-community-PEZ2VEF7.js +0 -687
- package/dist/te-community-TSKJ652U.js +0 -687
- package/dist/te-experiment-JINSMHMW.js +0 -606
- package/dist/te-experiment-NWNQHJS5.js +0 -606
- package/skills/ae-engage/references/config-channel-detail.md +0 -31
- package/skills/ae-engage/references/config-channel-list.md +0 -26
- package/skills/ae-engage/references/config-item-detail.md +0 -29
- package/skills/ae-engage/references/config-item-list.md +0 -18
- package/skills/ae-engage/references/copy-config-template.md +0 -28
- package/skills/ae-engage/references/delete-config-channel.md +0 -23
- package/skills/ae-engage/references/delete-config-item.md +0 -24
- package/skills/ae-engage/references/engage-scene-config-item.md +0 -69
- package/skills/ae-engage/references/manage-strategy.md +0 -73
- package/skills/ae-engage/references/strategy-detail.md +0 -72
- package/skills/ae-engage/references/strategy-list.md +0 -20
- package/skills/ae-engage/references/update-config-channel-status.md +0 -31
|
@@ -1,687 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
callMcpTool,
|
|
3
|
-
parseMcpResult,
|
|
4
|
-
registerMcpMappings,
|
|
5
|
-
resolveMcpUrl
|
|
6
|
-
} from "./chunk-PKRD2IEM.js";
|
|
7
|
-
import "./chunk-KGJQCYVC.js";
|
|
8
|
-
import "./chunk-NOO24N7W.js";
|
|
9
|
-
import "./chunk-2NDGFQHW.js";
|
|
10
|
-
import "./chunk-AJTH7LT3.js";
|
|
11
|
-
import "./chunk-YCLVYFK7.js";
|
|
12
|
-
|
|
13
|
-
// src/commands/te-community/get_channel_info.ts
|
|
14
|
-
var getChannelInfo = {
|
|
15
|
-
service: "community",
|
|
16
|
-
command: "+get_channel_info",
|
|
17
|
-
description: "Valid channel list for a community space (channel id and name).",
|
|
18
|
-
flags: [
|
|
19
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
20
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" }
|
|
21
|
-
],
|
|
22
|
-
risk: "read",
|
|
23
|
-
execute: async (ctx) => {
|
|
24
|
-
const spaceId = ctx.num("space-id");
|
|
25
|
-
const gameId = ctx.num("game-id");
|
|
26
|
-
const host = ctx.host();
|
|
27
|
-
const param = { gameId };
|
|
28
|
-
const args = { spaceId, param };
|
|
29
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_analysis");
|
|
30
|
-
const result = await callMcpTool(mcpUrl, "get_channel_info", args, host);
|
|
31
|
-
return parseMcpResult(result);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// src/commands/te-community/search_posts.ts
|
|
36
|
-
var searchPosts = {
|
|
37
|
-
service: "community",
|
|
38
|
-
command: "+search_posts",
|
|
39
|
-
description: "Search social posts/videos/feeds in a community space.",
|
|
40
|
-
flags: [
|
|
41
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
42
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
43
|
-
{ name: "channel-id-list", type: "string", required: false, desc: "Channel IDs from +get_channel_info (channelId). Comma-separated." },
|
|
44
|
-
{ name: "keywords", type: "string", required: false, desc: "Keyword filter list. Comma-separated." },
|
|
45
|
-
{ name: "start-time", type: "string", required: true, desc: "Content publish time lower bound. Format: yyyy-MM-dd." },
|
|
46
|
-
{ name: "end-time", type: "string", required: true, desc: "Content publish time upper bound. Format: yyyy-MM-dd." },
|
|
47
|
-
{ name: "official", type: "boolean", required: false, desc: "If true, only official accounts." },
|
|
48
|
-
{ name: "resource-type", type: "string", required: false, desc: "Resource types: 0 post, 1 video. Comma-separated." },
|
|
49
|
-
{ name: "search-mode", type: "number", required: false, desc: 'Search mode: 0 tokenized (default), 1 exact substring (e.g. \\"#tag\\" matches only posts containing that full string), 2 author name.' },
|
|
50
|
-
{ name: "search-word", type: "string", required: false, desc: "Full-text query; used together with searchMode." },
|
|
51
|
-
{ name: "sentiment-types", type: "string", required: false, desc: "Sentiment filter: 0 negative, 1 positive, 2 neutral. Comma-separated." },
|
|
52
|
-
{ name: "order-by", type: "number", required: false, desc: "Sort: 0 publish time desc, 1 weight desc, 2 publish time asc, 3 reply count desc, 4 heat desc." },
|
|
53
|
-
{ name: "page-num", type: "number", required: false, desc: "Page number, starting at 1." },
|
|
54
|
-
{ name: "page-size", type: "number", required: false, desc: "Page size. Max 10000." }
|
|
55
|
-
],
|
|
56
|
-
risk: "read",
|
|
57
|
-
execute: async (ctx) => {
|
|
58
|
-
const spaceId = ctx.num("space-id");
|
|
59
|
-
const gameId = ctx.num("game-id");
|
|
60
|
-
const startTime = ctx.str("start-time");
|
|
61
|
-
const endTime = ctx.str("end-time");
|
|
62
|
-
const host = ctx.host();
|
|
63
|
-
const param = { gameId, startTime, endTime };
|
|
64
|
-
const channelIdList = ctx.str("channel-id-list");
|
|
65
|
-
if (channelIdList) param.channelIdList = channelIdList.split(",").map(Number);
|
|
66
|
-
const keywords = ctx.str("keywords");
|
|
67
|
-
if (keywords) param.keywords = keywords.split(",");
|
|
68
|
-
const official = ctx.bool("official");
|
|
69
|
-
if (official !== void 0) param.official = official;
|
|
70
|
-
const resourceType = ctx.str("resource-type");
|
|
71
|
-
if (resourceType) param.resourceType = resourceType.split(",").map(Number);
|
|
72
|
-
const searchMode = ctx.num("search-mode");
|
|
73
|
-
if (searchMode !== void 0) param.searchMode = searchMode;
|
|
74
|
-
const searchWord = ctx.str("search-word");
|
|
75
|
-
if (searchWord) param.searchWord = searchWord;
|
|
76
|
-
const sentimentTypes = ctx.str("sentiment-types");
|
|
77
|
-
if (sentimentTypes) param.sentimentTypes = sentimentTypes.split(",").map(Number);
|
|
78
|
-
const orderBy = ctx.num("order-by");
|
|
79
|
-
const pageNum = ctx.num("page-num");
|
|
80
|
-
const pageSize = ctx.num("page-size");
|
|
81
|
-
if (orderBy !== void 0 || pageNum || pageSize) {
|
|
82
|
-
param.pagerHeader = {};
|
|
83
|
-
if (orderBy !== void 0) param.pagerHeader.orderBy = orderBy;
|
|
84
|
-
if (pageNum) param.pagerHeader.pageNum = pageNum;
|
|
85
|
-
if (pageSize) param.pagerHeader.pageSize = pageSize;
|
|
86
|
-
}
|
|
87
|
-
const args = { spaceId, param };
|
|
88
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
89
|
-
const result = await callMcpTool(mcpUrl, "search_posts", args, host);
|
|
90
|
-
return parseMcpResult(result);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
// src/commands/te-community/get_post_detail.ts
|
|
95
|
-
var getPostDetail = {
|
|
96
|
-
service: "community",
|
|
97
|
-
command: "+get_post_detail",
|
|
98
|
-
description: "Full detail for one post/video: body, media, subtitles, danmu, sentiment, keywords, topics, tag values, and comment pager.",
|
|
99
|
-
flags: [
|
|
100
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
101
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
102
|
-
{ name: "channel-id", type: "number", required: true, desc: "Channel ID." },
|
|
103
|
-
{ name: "uuid", type: "string", required: true, desc: "Content UUID (unique id)." },
|
|
104
|
-
{ name: "resource-type", type: "number", required: true, desc: "Resource type: 0 post, 1 video." },
|
|
105
|
-
{ name: "danmu-order-by", type: "number", required: false, desc: "Sort for danmu: 0 video timestamp desc, 1 publish time desc." },
|
|
106
|
-
{ name: "danmu-page-num", type: "number", required: false, desc: "Page number for danmu pagination, starting at 1." },
|
|
107
|
-
{ name: "danmu-page-size", type: "number", required: false, desc: "Page size for danmu pagination. Max 10000." },
|
|
108
|
-
{ name: "reply-order-by", type: "number", required: false, desc: "Sort for comments: 0 publish time desc, 1 publish time asc." },
|
|
109
|
-
{ name: "reply-page-num", type: "number", required: false, desc: "Page number for comments, starting at 1." },
|
|
110
|
-
{ name: "reply-page-size", type: "number", required: false, desc: "Page size for comments. Max 10000." }
|
|
111
|
-
],
|
|
112
|
-
risk: "read",
|
|
113
|
-
execute: async (ctx) => {
|
|
114
|
-
const spaceId = ctx.num("space-id");
|
|
115
|
-
const gameId = ctx.num("game-id");
|
|
116
|
-
const channelId = ctx.num("channel-id");
|
|
117
|
-
const uuid = ctx.str("uuid");
|
|
118
|
-
const resourceType = ctx.num("resource-type");
|
|
119
|
-
const host = ctx.host();
|
|
120
|
-
const param = { gameId, channelId, uuid, resourceType };
|
|
121
|
-
const danmuOrderBy = ctx.num("danmu-order-by");
|
|
122
|
-
const danmuPageNum = ctx.num("danmu-page-num");
|
|
123
|
-
const danmuPageSize = ctx.num("danmu-page-size");
|
|
124
|
-
if (danmuOrderBy !== void 0 || danmuPageNum || danmuPageSize) {
|
|
125
|
-
param.danmuPagerHeader = {};
|
|
126
|
-
if (danmuOrderBy !== void 0) param.danmuPagerHeader.orderBy = danmuOrderBy;
|
|
127
|
-
if (danmuPageNum) param.danmuPagerHeader.pageNum = danmuPageNum;
|
|
128
|
-
if (danmuPageSize) param.danmuPagerHeader.pageSize = danmuPageSize;
|
|
129
|
-
}
|
|
130
|
-
const replyOrderBy = ctx.num("reply-order-by");
|
|
131
|
-
const replyPageNum = ctx.num("reply-page-num");
|
|
132
|
-
const replyPageSize = ctx.num("reply-page-size");
|
|
133
|
-
if (replyOrderBy !== void 0 || replyPageNum || replyPageSize) {
|
|
134
|
-
param.replyPagerHeader = {};
|
|
135
|
-
if (replyOrderBy !== void 0) param.replyPagerHeader.orderBy = replyOrderBy;
|
|
136
|
-
if (replyPageNum) param.replyPagerHeader.pageNum = replyPageNum;
|
|
137
|
-
if (replyPageSize) param.replyPagerHeader.pageSize = replyPageSize;
|
|
138
|
-
}
|
|
139
|
-
const args = { spaceId, param };
|
|
140
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
141
|
-
const result = await callMcpTool(mcpUrl, "get_post_detail", args, host);
|
|
142
|
-
return parseMcpResult(result);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
// src/commands/te-community/get_overview_metrics.ts
|
|
147
|
-
var getOverviewMetrics = {
|
|
148
|
-
service: "community",
|
|
149
|
-
command: "+get_overview_metrics",
|
|
150
|
-
description: "Overall community metrics in a date range: post/reply counts, sentiment counts, per-channel breakdown.",
|
|
151
|
-
flags: [
|
|
152
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
153
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
154
|
-
{ name: "channel-id-list", type: "string", required: false, desc: "Channel IDs from +get_channel_info (channelId)." },
|
|
155
|
-
{ name: "start-time", type: "string", required: true, desc: "Statistics range start (inclusive). Format: yyyy-MM-dd." },
|
|
156
|
-
{ name: "end-time", type: "string", required: true, desc: "Statistics range end (inclusive). Format: yyyy-MM-dd." }
|
|
157
|
-
],
|
|
158
|
-
risk: "read",
|
|
159
|
-
execute: async (ctx) => {
|
|
160
|
-
const spaceId = ctx.num("space-id");
|
|
161
|
-
const gameId = ctx.num("game-id");
|
|
162
|
-
const startTime = ctx.str("start-time");
|
|
163
|
-
const endTime = ctx.str("end-time");
|
|
164
|
-
const host = ctx.host();
|
|
165
|
-
const param = { gameId, startTime, endTime };
|
|
166
|
-
const channelIdList = ctx.str("channel-id-list");
|
|
167
|
-
if (channelIdList) param.channelIdList = channelIdList.split(",").map(Number);
|
|
168
|
-
const args = { spaceId, param };
|
|
169
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_analysis");
|
|
170
|
-
const result = await callMcpTool(mcpUrl, "get_overview_metrics", args, host);
|
|
171
|
-
return parseMcpResult(result);
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
// src/commands/te-community/get_sentiment_overview.ts
|
|
176
|
-
var getSentimentOverview = {
|
|
177
|
-
service: "community",
|
|
178
|
-
command: "+get_sentiment_overview",
|
|
179
|
-
description: "Sentiment distribution and hot-keyword overview: top keywords per sentiment with trends, plus overall keyword ranking.",
|
|
180
|
-
flags: [
|
|
181
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
182
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
183
|
-
{ name: "channel-id-list", type: "string", required: false, desc: "Channel IDs from +get_channel_info (channelId)." },
|
|
184
|
-
{ name: "start-time", type: "string", required: true, desc: "Statistics range start (inclusive). Format: yyyy-MM-dd." },
|
|
185
|
-
{ name: "end-time", type: "string", required: true, desc: "Statistics range end (inclusive). Format: yyyy-MM-dd." },
|
|
186
|
-
{ name: "is-merged", type: "boolean", required: false, desc: "Whether to aggregate merged keywords." },
|
|
187
|
-
{ name: "limit", type: "number", required: false, desc: "Max number of keywords to return. Max 10000." }
|
|
188
|
-
],
|
|
189
|
-
risk: "read",
|
|
190
|
-
execute: async (ctx) => {
|
|
191
|
-
const spaceId = ctx.num("space-id");
|
|
192
|
-
const gameId = ctx.num("game-id");
|
|
193
|
-
const startTime = ctx.str("start-time");
|
|
194
|
-
const endTime = ctx.str("end-time");
|
|
195
|
-
const host = ctx.host();
|
|
196
|
-
const param = { gameId, startTime, endTime };
|
|
197
|
-
const channelIdList = ctx.str("channel-id-list");
|
|
198
|
-
if (channelIdList) param.channelIdList = channelIdList.split(",").map(Number);
|
|
199
|
-
const isMerged = ctx.bool("is-merged");
|
|
200
|
-
if (isMerged !== void 0) param.isMerged = isMerged;
|
|
201
|
-
const limit = ctx.num("limit");
|
|
202
|
-
if (limit) param.limit = limit;
|
|
203
|
-
const args = { spaceId, param };
|
|
204
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_analysis");
|
|
205
|
-
const result = await callMcpTool(mcpUrl, "get_sentiment_overview", args, host);
|
|
206
|
-
return parseMcpResult(result);
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
// src/commands/te-community/get_tag_trends.ts
|
|
211
|
-
var getTagTrends = {
|
|
212
|
-
service: "community",
|
|
213
|
-
command: "+get_tag_trends",
|
|
214
|
-
description: "Daily tag trends: given tagCode and date range, returns counts and time series per tag value.",
|
|
215
|
-
flags: [
|
|
216
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
217
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
218
|
-
{ name: "tag-code", type: "string", required: true, desc: "Tag code (tagCode) from +get_corpus_tags." },
|
|
219
|
-
{ name: "channel-id-list", type: "string", required: false, desc: "Channel IDs from +get_channel_info." },
|
|
220
|
-
{ name: "start-time", type: "string", required: false, desc: "Statistics range start (inclusive). Format: yyyy-MM-dd." },
|
|
221
|
-
{ name: "end-time", type: "string", required: false, desc: "Statistics range end (inclusive). Format: yyyy-MM-dd." }
|
|
222
|
-
],
|
|
223
|
-
risk: "read",
|
|
224
|
-
execute: async (ctx) => {
|
|
225
|
-
const spaceId = ctx.num("space-id");
|
|
226
|
-
const gameId = ctx.num("game-id");
|
|
227
|
-
const tagCode = ctx.str("tag-code");
|
|
228
|
-
const host = ctx.host();
|
|
229
|
-
const param = { gameId, tagCode };
|
|
230
|
-
const channelIdList = ctx.str("channel-id-list");
|
|
231
|
-
if (channelIdList) param.channelIdList = channelIdList.split(",").map(Number);
|
|
232
|
-
const startTime = ctx.str("start-time");
|
|
233
|
-
if (startTime) param.startTime = startTime;
|
|
234
|
-
const endTime = ctx.str("end-time");
|
|
235
|
-
if (endTime) param.endTime = endTime;
|
|
236
|
-
const args = { spaceId, param };
|
|
237
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_analysis");
|
|
238
|
-
const result = await callMcpTool(mcpUrl, "get_tag_trends", args, host);
|
|
239
|
-
return parseMcpResult(result);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
// src/commands/te-community/get_daily_summary.ts
|
|
244
|
-
var getDailySummary = {
|
|
245
|
-
service: "community",
|
|
246
|
-
command: "+get_daily_summary",
|
|
247
|
-
description: "Daily community summary for a given date: hot topic rankings and highlighted opinions (positive/negative).",
|
|
248
|
-
flags: [
|
|
249
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
250
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
251
|
-
{ name: "date", type: "string", required: true, desc: "Summary date. Format: yyyy-MM-dd." }
|
|
252
|
-
],
|
|
253
|
-
risk: "read",
|
|
254
|
-
execute: async (ctx) => {
|
|
255
|
-
const spaceId = ctx.num("space-id");
|
|
256
|
-
const gameId = ctx.num("game-id");
|
|
257
|
-
const date = ctx.str("date");
|
|
258
|
-
const host = ctx.host();
|
|
259
|
-
const param = { gameId, date };
|
|
260
|
-
const args = { spaceId, param };
|
|
261
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_hot");
|
|
262
|
-
const result = await callMcpTool(mcpUrl, "get_daily_summary", args, host);
|
|
263
|
-
return parseMcpResult(result);
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
// src/commands/te-community/get_hot_topics.ts
|
|
268
|
-
var getHotTopics = {
|
|
269
|
-
service: "community",
|
|
270
|
-
command: "+get_hot_topics",
|
|
271
|
-
description: "Hot topics leaderboard over a time range.",
|
|
272
|
-
flags: [
|
|
273
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
274
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
275
|
-
{ name: "start-time", type: "string", required: false, desc: "Topic statistics range start (inclusive). Format: yyyy-MM-dd." },
|
|
276
|
-
{ name: "end-time", type: "string", required: false, desc: "Topic statistics range end (inclusive). Format: yyyy-MM-dd." },
|
|
277
|
-
{ name: "order-by", type: "number", required: false, desc: "Sort: 0 by topic heat desc, 1 by topic start time desc." }
|
|
278
|
-
],
|
|
279
|
-
risk: "read",
|
|
280
|
-
execute: async (ctx) => {
|
|
281
|
-
const spaceId = ctx.num("space-id");
|
|
282
|
-
const gameId = ctx.num("game-id");
|
|
283
|
-
const host = ctx.host();
|
|
284
|
-
const param = { gameId };
|
|
285
|
-
const startTime = ctx.str("start-time");
|
|
286
|
-
if (startTime) param.startTime = startTime;
|
|
287
|
-
const endTime = ctx.str("end-time");
|
|
288
|
-
if (endTime) param.endTime = endTime;
|
|
289
|
-
const orderBy = ctx.num("order-by");
|
|
290
|
-
if (orderBy !== void 0) param.orderBy = orderBy;
|
|
291
|
-
const args = { spaceId, param };
|
|
292
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_hot");
|
|
293
|
-
const result = await callMcpTool(mcpUrl, "get_hot_topics", args, host);
|
|
294
|
-
return parseMcpResult(result);
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
// src/commands/te-community/get_topic_detail.ts
|
|
299
|
-
var getTopicDetail = {
|
|
300
|
-
service: "community",
|
|
301
|
-
command: "+get_topic_detail",
|
|
302
|
-
description: "Deep stats for one topic in a range: content/reply totals, sentiment, per-channel daily trends, hot keywords.",
|
|
303
|
-
flags: [
|
|
304
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
305
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
306
|
-
{ name: "topic-id", type: "string", required: true, desc: "Topic ID from +get_hot_topics (topicId)." },
|
|
307
|
-
{ name: "start-time", type: "string", required: true, desc: "Statistics start date. Format: yyyy-MM-dd. Prefer topic startTime from +get_hot_topics." },
|
|
308
|
-
{ name: "end-time", type: "string", required: true, desc: "Statistics end date. Format: yyyy-MM-dd. Prefer topic endTime from +get_hot_topics." }
|
|
309
|
-
],
|
|
310
|
-
risk: "read",
|
|
311
|
-
execute: async (ctx) => {
|
|
312
|
-
const spaceId = ctx.num("space-id");
|
|
313
|
-
const gameId = ctx.num("game-id");
|
|
314
|
-
const topicId = ctx.str("topic-id");
|
|
315
|
-
const startTime = ctx.str("start-time");
|
|
316
|
-
const endTime = ctx.str("end-time");
|
|
317
|
-
const host = ctx.host();
|
|
318
|
-
const param = { gameId, topicId, startTime, endTime };
|
|
319
|
-
const args = { spaceId, param };
|
|
320
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_hot");
|
|
321
|
-
const result = await callMcpTool(mcpUrl, "get_topic_detail", args, host);
|
|
322
|
-
return parseMcpResult(result);
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
// src/commands/te-community/get_livestream_overview.ts
|
|
327
|
-
var getLivestreamOverview = {
|
|
328
|
-
service: "community",
|
|
329
|
-
command: "+get_livestream_overview",
|
|
330
|
-
description: "Livestream overview trends: active rooms, session count, interactions, and streamed duration.",
|
|
331
|
-
flags: [
|
|
332
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
333
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
334
|
-
{ name: "start-time", type: "string", required: false, desc: "Statistics range start (inclusive). Format: yyyy-MM-dd." },
|
|
335
|
-
{ name: "end-time", type: "string", required: false, desc: "Statistics range end (inclusive). Format: yyyy-MM-dd." }
|
|
336
|
-
],
|
|
337
|
-
risk: "read",
|
|
338
|
-
execute: async (ctx) => {
|
|
339
|
-
const spaceId = ctx.num("space-id");
|
|
340
|
-
const gameId = ctx.num("game-id");
|
|
341
|
-
const host = ctx.host();
|
|
342
|
-
const param = { gameId };
|
|
343
|
-
const startTime = ctx.str("start-time");
|
|
344
|
-
if (startTime) param.startTime = startTime;
|
|
345
|
-
const endTime = ctx.str("end-time");
|
|
346
|
-
if (endTime) param.endTime = endTime;
|
|
347
|
-
const args = { spaceId, param };
|
|
348
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
349
|
-
const result = await callMcpTool(mcpUrl, "get_livestream_overview", args, host);
|
|
350
|
-
return parseMcpResult(result);
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
// src/commands/te-community/get_livestream_rooms.ts
|
|
355
|
-
var getLivestreamRooms = {
|
|
356
|
-
service: "community",
|
|
357
|
-
command: "+get_livestream_rooms",
|
|
358
|
-
description: "Search live rooms by time range and channels; returns room list with stats.",
|
|
359
|
-
flags: [
|
|
360
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
361
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
362
|
-
{ name: "channel-id-list", type: "string", required: false, desc: "Channel ID list." },
|
|
363
|
-
{ name: "start-time", type: "string", required: false, desc: "Statistics range start (inclusive). Format: yyyy-MM-dd." },
|
|
364
|
-
{ name: "end-time", type: "string", required: false, desc: "Statistics range end (inclusive). Format: yyyy-MM-dd." }
|
|
365
|
-
],
|
|
366
|
-
risk: "read",
|
|
367
|
-
execute: async (ctx) => {
|
|
368
|
-
const spaceId = ctx.num("space-id");
|
|
369
|
-
const gameId = ctx.num("game-id");
|
|
370
|
-
const host = ctx.host();
|
|
371
|
-
const param = { gameId };
|
|
372
|
-
const channelIdList = ctx.str("channel-id-list");
|
|
373
|
-
if (channelIdList) param.channelIdList = channelIdList.split(",").map(Number);
|
|
374
|
-
const startTime = ctx.str("start-time");
|
|
375
|
-
if (startTime) param.startTime = startTime;
|
|
376
|
-
const endTime = ctx.str("end-time");
|
|
377
|
-
if (endTime) param.endTime = endTime;
|
|
378
|
-
const args = { spaceId, param };
|
|
379
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
380
|
-
const result = await callMcpTool(mcpUrl, "get_livestream_rooms", args, host);
|
|
381
|
-
return parseMcpResult(result);
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
// src/commands/te-community/get_livestream_room_metrics.ts
|
|
386
|
-
var getLivestreamRoomMetrics = {
|
|
387
|
-
service: "community",
|
|
388
|
-
command: "+get_livestream_room_metrics",
|
|
389
|
-
description: "Core metrics and yearly calendar for one room: overview KPIs plus daily streamed-duration calendar.",
|
|
390
|
-
flags: [
|
|
391
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
392
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
393
|
-
{ name: "channel-id", type: "number", required: true, desc: "Channel ID from +get_livestream_rooms." },
|
|
394
|
-
{ name: "room-id", type: "string", required: true, desc: "Live room ID (roomId) from +get_livestream_rooms." },
|
|
395
|
-
{ name: "year", type: "string", required: false, desc: "Calendar year (yyyy)." }
|
|
396
|
-
],
|
|
397
|
-
risk: "read",
|
|
398
|
-
execute: async (ctx) => {
|
|
399
|
-
const spaceId = ctx.num("space-id");
|
|
400
|
-
const gameId = ctx.num("game-id");
|
|
401
|
-
const channelId = ctx.num("channel-id");
|
|
402
|
-
const roomId = ctx.str("room-id");
|
|
403
|
-
const host = ctx.host();
|
|
404
|
-
const param = { gameId, channelId, roomId };
|
|
405
|
-
const year = ctx.str("year");
|
|
406
|
-
if (year) param.year = year;
|
|
407
|
-
const args = { spaceId, param };
|
|
408
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
409
|
-
const result = await callMcpTool(mcpUrl, "get_livestream_room_metrics", args, host);
|
|
410
|
-
return parseMcpResult(result);
|
|
411
|
-
}
|
|
412
|
-
};
|
|
413
|
-
|
|
414
|
-
// src/commands/te-community/get_livestream_list.ts
|
|
415
|
-
var getLivestreamList = {
|
|
416
|
-
service: "community",
|
|
417
|
-
command: "+get_livestream_list",
|
|
418
|
-
description: "List live sessions for a room in a time range (stream records).",
|
|
419
|
-
flags: [
|
|
420
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
421
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
422
|
-
{ name: "channel-id", type: "number", required: false, desc: "Channel ID from +get_livestream_rooms." },
|
|
423
|
-
{ name: "room-id", type: "string", required: false, desc: "Live room ID (roomId) from +get_livestream_rooms." },
|
|
424
|
-
{ name: "start-time", type: "string", required: false, desc: "Statistics range start (inclusive). Format: yyyy-MM-dd." },
|
|
425
|
-
{ name: "end-time", type: "string", required: false, desc: "Statistics range end (inclusive). Format: yyyy-MM-dd." }
|
|
426
|
-
],
|
|
427
|
-
risk: "read",
|
|
428
|
-
execute: async (ctx) => {
|
|
429
|
-
const spaceId = ctx.num("space-id");
|
|
430
|
-
const gameId = ctx.num("game-id");
|
|
431
|
-
const host = ctx.host();
|
|
432
|
-
const param = { gameId };
|
|
433
|
-
const channelId = ctx.num("channel-id");
|
|
434
|
-
if (channelId) param.channelId = channelId;
|
|
435
|
-
const roomId = ctx.str("room-id");
|
|
436
|
-
if (roomId) param.roomId = roomId;
|
|
437
|
-
const startTime = ctx.str("start-time");
|
|
438
|
-
if (startTime) param.startTime = startTime;
|
|
439
|
-
const endTime = ctx.str("end-time");
|
|
440
|
-
if (endTime) param.endTime = endTime;
|
|
441
|
-
const args = { spaceId, param };
|
|
442
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
443
|
-
const result = await callMcpTool(mcpUrl, "get_livestream_list", args, host);
|
|
444
|
-
return parseMcpResult(result);
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
// src/commands/te-community/get_livestream_detail.ts
|
|
449
|
-
var getLivestreamDetail = {
|
|
450
|
-
service: "community",
|
|
451
|
-
command: "+get_livestream_detail",
|
|
452
|
-
description: "One live session detail: interaction leaderboards and paginated interaction feed.",
|
|
453
|
-
flags: [
|
|
454
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
455
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
456
|
-
{ name: "stream-id", type: "string", required: true, desc: "Live session ID (streamId) from +get_livestream_list." },
|
|
457
|
-
{ name: "activity-types", type: "string", required: false, desc: "Activity type codes to filter details: 0 danmu, 1 gift, 2 superchat, 3 premium. Comma-separated." },
|
|
458
|
-
{ name: "anchor-time", type: "string", required: false, desc: "Anchor time for interactions. Format: yyyy-MM-dd HH:mm." },
|
|
459
|
-
{ name: "search-word", type: "string", required: false, desc: "Keyword to filter interaction detail rows." },
|
|
460
|
-
{ name: "order-by", type: "number", required: false, desc: "Sort: 0 interaction time desc, 1 interaction time asc." },
|
|
461
|
-
{ name: "page-num", type: "number", required: false, desc: "Page number, starting at 1." },
|
|
462
|
-
{ name: "page-size", type: "number", required: false, desc: "Page size. Max 10000." }
|
|
463
|
-
],
|
|
464
|
-
risk: "read",
|
|
465
|
-
execute: async (ctx) => {
|
|
466
|
-
const spaceId = ctx.num("space-id");
|
|
467
|
-
const gameId = ctx.num("game-id");
|
|
468
|
-
const streamId = ctx.str("stream-id");
|
|
469
|
-
const host = ctx.host();
|
|
470
|
-
const param = { gameId, streamId };
|
|
471
|
-
const activityTypes = ctx.str("activity-types");
|
|
472
|
-
if (activityTypes) param.activityType = activityTypes.split(",").map(Number);
|
|
473
|
-
const anchorTime = ctx.str("anchor-time");
|
|
474
|
-
if (anchorTime) param.anchorTime = anchorTime;
|
|
475
|
-
const searchWord = ctx.str("search-word");
|
|
476
|
-
if (searchWord) param.searchWord = searchWord;
|
|
477
|
-
const orderBy = ctx.num("order-by");
|
|
478
|
-
const pageNum = ctx.num("page-num");
|
|
479
|
-
const pageSize = ctx.num("page-size");
|
|
480
|
-
if (orderBy !== void 0 || pageNum || pageSize) {
|
|
481
|
-
param.pagerHeader = {};
|
|
482
|
-
if (orderBy !== void 0) param.pagerHeader.orderBy = orderBy;
|
|
483
|
-
if (pageNum) param.pagerHeader.pageNum = pageNum;
|
|
484
|
-
if (pageSize) param.pagerHeader.pageSize = pageSize;
|
|
485
|
-
}
|
|
486
|
-
const args = { spaceId, param };
|
|
487
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
488
|
-
const result = await callMcpTool(mcpUrl, "get_livestream_detail", args, host);
|
|
489
|
-
return parseMcpResult(result);
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
// src/commands/te-community/get_livestream_analysis.ts
|
|
494
|
-
var getLivestreamAnalysis = {
|
|
495
|
-
service: "community",
|
|
496
|
-
command: "+get_livestream_analysis",
|
|
497
|
-
description: "AI-generated live session analysis report: highlight moments (time slices with metrics and AI insights) and sentiment opinions.",
|
|
498
|
-
flags: [
|
|
499
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
500
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
501
|
-
{ name: "stream-id", type: "string", required: true, desc: "Live session ID (streamId) from +get_livestream_list." }
|
|
502
|
-
],
|
|
503
|
-
risk: "read",
|
|
504
|
-
execute: async (ctx) => {
|
|
505
|
-
const spaceId = ctx.num("space-id");
|
|
506
|
-
const gameId = ctx.num("game-id");
|
|
507
|
-
const streamId = ctx.str("stream-id");
|
|
508
|
-
const host = ctx.host();
|
|
509
|
-
const param = { gameId, streamId };
|
|
510
|
-
const args = { spaceId, param };
|
|
511
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
512
|
-
const result = await callMcpTool(mcpUrl, "get_livestream_analysis", args, host);
|
|
513
|
-
return parseMcpResult(result);
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
|
|
517
|
-
// src/commands/te-community/get_comments_summary.ts
|
|
518
|
-
var getCommentsSummary = {
|
|
519
|
-
service: "community",
|
|
520
|
-
command: "+get_comments_summary",
|
|
521
|
-
description: "Comment analytics summary for a post: sentiment mix and time trends. Aggregate stats only\u2014no raw comment list.",
|
|
522
|
-
flags: [
|
|
523
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
524
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
525
|
-
{ name: "channel-id", type: "number", required: true, desc: "Channel ID from search_posts results." },
|
|
526
|
-
{ name: "uuid", type: "string", required: true, desc: "Content UUID from search_posts results." },
|
|
527
|
-
{ name: "start-time", type: "string", required: false, desc: "Comment publish time lower bound; defaults to this post's publishTime from search_posts/get_post_detail." },
|
|
528
|
-
{ name: "end-time", type: "string", required: false, desc: "Comment publish time upper bound. Format: yyyy-MM-dd." }
|
|
529
|
-
],
|
|
530
|
-
risk: "read",
|
|
531
|
-
execute: async (ctx) => {
|
|
532
|
-
const spaceId = ctx.num("space-id");
|
|
533
|
-
const gameId = ctx.num("game-id");
|
|
534
|
-
const channelId = ctx.num("channel-id");
|
|
535
|
-
const uuid = ctx.str("uuid");
|
|
536
|
-
const host = ctx.host();
|
|
537
|
-
const param = { gameId, channelId, uuid };
|
|
538
|
-
const startTime = ctx.str("start-time");
|
|
539
|
-
if (startTime) param.startTime = startTime;
|
|
540
|
-
const endTime = ctx.str("end-time");
|
|
541
|
-
if (endTime) param.endTime = endTime;
|
|
542
|
-
const args = { spaceId, param };
|
|
543
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
544
|
-
const result = await callMcpTool(mcpUrl, "get_comments_summary", args, host);
|
|
545
|
-
return parseMcpResult(result);
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
|
|
549
|
-
// src/commands/te-community/get_comment_tag_analysis.ts
|
|
550
|
-
var getCommentTagAnalysis = {
|
|
551
|
-
service: "community",
|
|
552
|
-
command: "+get_comment_tag_analysis",
|
|
553
|
-
description: "Comment tag analysis: for a tagCode, counts and trends per tag value over time.",
|
|
554
|
-
flags: [
|
|
555
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
556
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
557
|
-
{ name: "channel-id", type: "number", required: true, desc: "Channel ID from search_posts results." },
|
|
558
|
-
{ name: "uuid", type: "string", required: true, desc: "Content UUID from search_posts results." },
|
|
559
|
-
{ name: "resource-type", type: "number", required: true, desc: "Resource type: 0 post, 1 video." },
|
|
560
|
-
{ name: "tag-code", type: "string", required: true, desc: "Tag code (tagCode) from +get_corpus_tags." },
|
|
561
|
-
{ name: "start-time", type: "string", required: false, desc: "Comment publish time lower bound; defaults to this post's publishTime from search_posts/get_post_detail." },
|
|
562
|
-
{ name: "end-time", type: "string", required: false, desc: "Comment publish time upper bound. Format: yyyy-MM-dd." }
|
|
563
|
-
],
|
|
564
|
-
risk: "read",
|
|
565
|
-
execute: async (ctx) => {
|
|
566
|
-
const spaceId = ctx.num("space-id");
|
|
567
|
-
const gameId = ctx.num("game-id");
|
|
568
|
-
const channelId = ctx.num("channel-id");
|
|
569
|
-
const uuid = ctx.str("uuid");
|
|
570
|
-
const resourceType = ctx.num("resource-type");
|
|
571
|
-
const tagCode = ctx.str("tag-code");
|
|
572
|
-
const host = ctx.host();
|
|
573
|
-
const param = { gameId, channelId, uuid, resourceType, tagCode };
|
|
574
|
-
const startTime = ctx.str("start-time");
|
|
575
|
-
if (startTime) param.startTime = startTime;
|
|
576
|
-
const endTime = ctx.str("end-time");
|
|
577
|
-
if (endTime) param.endTime = endTime;
|
|
578
|
-
const args = { spaceId, param };
|
|
579
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
580
|
-
const result = await callMcpTool(mcpUrl, "get_comment_tag_analysis", args, host);
|
|
581
|
-
return parseMcpResult(result);
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
// src/commands/te-community/get_corpus_tags.ts
|
|
586
|
-
var getCorpusTags = {
|
|
587
|
-
service: "community",
|
|
588
|
-
command: "+get_corpus_tags",
|
|
589
|
-
description: "List corpus tags (tagId, tagCode, tagName, inferenceType) to pick tagCode for filters.",
|
|
590
|
-
flags: [
|
|
591
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
592
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" }
|
|
593
|
-
],
|
|
594
|
-
risk: "read",
|
|
595
|
-
execute: async (ctx) => {
|
|
596
|
-
const spaceId = ctx.num("space-id");
|
|
597
|
-
const gameId = ctx.num("game-id");
|
|
598
|
-
const host = ctx.host();
|
|
599
|
-
const param = { gameId };
|
|
600
|
-
const args = { spaceId, param };
|
|
601
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
602
|
-
const result = await callMcpTool(mcpUrl, "get_corpus_tags", args, host);
|
|
603
|
-
return parseMcpResult(result);
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
// src/commands/te-community/get_risk_content.ts
|
|
608
|
-
var getRiskContent = {
|
|
609
|
-
service: "community",
|
|
610
|
-
command: "+get_risk_content",
|
|
611
|
-
description: "List content flagged as risk/moderation items; filter by risk type and time.",
|
|
612
|
-
flags: [
|
|
613
|
-
{ name: "space-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
614
|
-
{ name: "game-id", type: "number", required: true, desc: "Identifier of the community space. SpaceId" },
|
|
615
|
-
{ name: "start-time", type: "string", required: true, desc: "Risk content publish time lower bound. Format: yyyy-MM-dd." },
|
|
616
|
-
{ name: "end-time", type: "string", required: true, desc: "Risk content publish time upper bound. Format: yyyy-MM-dd." },
|
|
617
|
-
{ name: "risk-codes", type: "string", required: false, desc: "Risk type code list." },
|
|
618
|
-
{ name: "search-word", type: "string", required: false, desc: "Keyword search; fuzzy match on body text." },
|
|
619
|
-
{ name: "include-trends", type: "boolean", required: false, desc: "Whether to include trend aggregates in the response." },
|
|
620
|
-
{ name: "order-by", type: "number", required: false, desc: "Sort: 0 publish time desc." },
|
|
621
|
-
{ name: "page-num", type: "number", required: false, desc: "Page number, starting at 1." },
|
|
622
|
-
{ name: "page-size", type: "number", required: false, desc: "Page size. Max 10000." }
|
|
623
|
-
],
|
|
624
|
-
risk: "read",
|
|
625
|
-
execute: async (ctx) => {
|
|
626
|
-
const spaceId = ctx.num("space-id");
|
|
627
|
-
const gameId = ctx.num("game-id");
|
|
628
|
-
const startTime = ctx.str("start-time");
|
|
629
|
-
const endTime = ctx.str("end-time");
|
|
630
|
-
const host = ctx.host();
|
|
631
|
-
const param = { gameId, startTime, endTime };
|
|
632
|
-
const riskCodes = ctx.str("risk-codes");
|
|
633
|
-
if (riskCodes) param.riskCodes = riskCodes.split(",").map(Number);
|
|
634
|
-
const searchWord = ctx.str("search-word");
|
|
635
|
-
if (searchWord) param.searchWord = searchWord;
|
|
636
|
-
const includeTrends = ctx.bool("include-trends");
|
|
637
|
-
if (includeTrends !== void 0) param.includeTrends = includeTrends;
|
|
638
|
-
const orderBy = ctx.num("order-by");
|
|
639
|
-
const pageNum = ctx.num("page-num");
|
|
640
|
-
const pageSize = ctx.num("page-size");
|
|
641
|
-
if (orderBy !== void 0 || pageNum || pageSize) {
|
|
642
|
-
param.pagerHeader = {};
|
|
643
|
-
if (orderBy !== void 0) param.pagerHeader.orderBy = orderBy;
|
|
644
|
-
if (pageNum) param.pagerHeader.pageNum = pageNum;
|
|
645
|
-
if (pageSize) param.pagerHeader.pageSize = pageSize;
|
|
646
|
-
}
|
|
647
|
-
const args = { spaceId, param };
|
|
648
|
-
const mcpUrl = resolveMcpUrl(ctx.mcpUrl(), host, "community_content");
|
|
649
|
-
const result = await callMcpTool(mcpUrl, "get_risk_content", args, host);
|
|
650
|
-
return parseMcpResult(result);
|
|
651
|
-
}
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
// src/commands/te-community/index.ts
|
|
655
|
-
registerMcpMappings({
|
|
656
|
-
"community_content": { componentName: "community", mappingPath: "content" },
|
|
657
|
-
"community_analysis": { componentName: "community", mappingPath: "analysis" },
|
|
658
|
-
"community_hot": { componentName: "community", mappingPath: "hot" }
|
|
659
|
-
});
|
|
660
|
-
var commands = [
|
|
661
|
-
// Content commands
|
|
662
|
-
getLivestreamList,
|
|
663
|
-
getLivestreamDetail,
|
|
664
|
-
getLivestreamAnalysis,
|
|
665
|
-
getPostDetail,
|
|
666
|
-
getCommentsSummary,
|
|
667
|
-
getCommentTagAnalysis,
|
|
668
|
-
getCorpusTags,
|
|
669
|
-
getRiskContent,
|
|
670
|
-
searchPosts,
|
|
671
|
-
getLivestreamOverview,
|
|
672
|
-
getLivestreamRooms,
|
|
673
|
-
getLivestreamRoomMetrics,
|
|
674
|
-
// Analysis commands
|
|
675
|
-
getChannelInfo,
|
|
676
|
-
getOverviewMetrics,
|
|
677
|
-
getSentimentOverview,
|
|
678
|
-
getTagTrends,
|
|
679
|
-
// Hot commands
|
|
680
|
-
getDailySummary,
|
|
681
|
-
getHotTopics,
|
|
682
|
-
getTopicDetail
|
|
683
|
-
];
|
|
684
|
-
var te_community_default = commands;
|
|
685
|
-
export {
|
|
686
|
-
te_community_default as default
|
|
687
|
-
};
|