@uwa4d/openapi-mcp 0.2.0-beta.8 → 0.2.0
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 +68 -1
- package/dist/annotate-dashboard.d.ts +14 -0
- package/dist/annotate-dashboard.js +138 -0
- package/dist/cli.js +11 -0
- package/dist/client.js +4 -13
- package/dist/composite/index.js +2 -0
- package/dist/composite/mcp-version.d.ts +2 -0
- package/dist/composite/mcp-version.js +48 -0
- package/dist/composite/report-diagnosis.js +139 -6
- package/dist/composite/top-resources.js +6 -6
- package/dist/error-hints.d.ts +23 -0
- package/dist/error-hints.js +80 -0
- package/dist/indicator-dashboard-keys.d.ts +1 -1
- package/dist/indicator-dashboard-keys.js +1 -0
- package/dist/package-version.d.ts +2 -0
- package/dist/package-version.js +15 -0
- package/dist/presets.js +1 -0
- package/dist/server-instructions.d.ts +5 -0
- package/dist/server-instructions.js +18 -0
- package/dist/server.d.ts +3 -2
- package/dist/server.js +23 -18
- package/dist/tools.d.ts +5 -0
- package/dist/tools.js +95 -8
- package/dist/version-check.d.ts +41 -0
- package/dist/version-check.js +161 -0
- package/dist/version-guide.js +19 -5
- package/package.json +2 -1
- package/spec/overrides.json +46 -0
- package/spec/uwa-openapi.json +164 -115
package/dist/version-guide.js
CHANGED
|
@@ -17,8 +17,9 @@ export const INDICATOR_DASHBOARD_PANEL_GUIDE = [
|
|
|
17
17
|
' · 曲线接口(indicator_curve / custom_dashboard)→ 各子指标逐帧曲线;',
|
|
18
18
|
' · 统计 2.0(indicator_statistic_dashboard)→ statistic 下 *_mean / *_maximum / *_min 及 scene_* 等全量统计。',
|
|
19
19
|
'- 查温度曲线/均值/峰值:Unity Overview 且 SDK ≥ 2.5.1 时传 indicatorDashboards=temperature_max,再读 y_axis 或 statistic;勿仅看 get_overview_statistic 的汇总段。',
|
|
20
|
-
'- 合法面板名先调 gotonline_overview_indicator_dashboard_keys(全量枚举);勿传 fps_mean、frametime_min 等统计字段名。',
|
|
21
|
-
'- 误传示例:fps_mean、frametime_gt_40_pct(缺 @)、frametime_min;合法示例:fps_avg、frametime@gt_40_pct
|
|
20
|
+
'- 合法面板名先调 gotonline_overview_indicator_dashboard_keys(全量枚举);勿传 fps_mean、frametime_min、android_pss_max 等统计字段名。',
|
|
21
|
+
'- 误传示例:fps_mean、android_pss_max、frametime_gt_40_pct(缺 @)、frametime_min;合法示例:fps_avg、android_memory_pss@max、frametime@gt_40_pct。',
|
|
22
|
+
'- Android PSS 峰值:只认面板 android_memory_pss@max;优先读返回顶层 pss_peak_kb / pss_peak_mb / pss_peak_frame(单位 KB)。',
|
|
22
23
|
'- UE Overview 当前 Open API 未开放 custom/indicator dashboard 路径(会 24052),UE 温度汇总见 get_ue_overview_statistic_v2 的 temperature 段。',
|
|
23
24
|
].join('\n');
|
|
24
25
|
/**
|
|
@@ -115,11 +116,19 @@ export const VERSION_GUIDE = {
|
|
|
115
116
|
'【选用规则——务必先看】',
|
|
116
117
|
'- 运行日志 1.0。Unity:解析日 < 2026-07-09;UE:提交日 ≤ 2026-03-25。',
|
|
117
118
|
'- 新报告请用 gotonline_lg_runtime_log_entries_presign(运行日志 2.0)。',
|
|
119
|
+
'- 空列表 ≠「一定没有日志」:新报告误用本接口也可能返回空,应改调 2.0。',
|
|
118
120
|
].join('\n'),
|
|
119
121
|
gotonline_lg_runtime_log_entries_presign: [
|
|
120
122
|
'【选用规则——务必先看】',
|
|
121
123
|
'- 运行日志 2.0(预签名)。解析日 ≥ 2026-07-09 且 SDK ≥ 2.5.1。',
|
|
122
124
|
'- 更早的报告请用 gotonline_overview_log_export。',
|
|
125
|
+
'- 若返回 80108 FILE_META_NOT_EXIST:Unity = 无 LG meta / 未解析 = 无可用日志数据;UE = 方案切换过,只能说「暂不支持获取当前报告的运行日志」,勿断定报告本身无日志。',
|
|
126
|
+
].join('\n'),
|
|
127
|
+
gotonline_gpu_bound: [
|
|
128
|
+
'【选用规则——务必先看】',
|
|
129
|
+
'- 说「GPU Bound / GPU 主瓶颈」前必须先调本工具。',
|
|
130
|
+
'- 返回 [] 只能说「未检出 Bound」,禁止断言 GPU 是主要瓶颈。',
|
|
131
|
+
'- Overview 上的 WaitForVsync / RenderTexture 不能替代本接口。',
|
|
123
132
|
].join('\n'),
|
|
124
133
|
gotonline_overview_group_export: [
|
|
125
134
|
'【选用规则——务必先看】',
|
|
@@ -146,15 +155,15 @@ export const VERSION_GUIDE = {
|
|
|
146
155
|
gotonline_overview_method_curve: [
|
|
147
156
|
'【选用规则——务必先看】',
|
|
148
157
|
'- v1.0.1 直出曲线 JSON(按 stackMethodName 或 stackMethodId)。',
|
|
149
|
-
'- **MCP 与 Open API 推荐改用 gotonline_overview_method_curve_presign(v1.0.2)**:OSS
|
|
158
|
+
'- **MCP 与 Open API 推荐改用 gotonline_overview_method_curve_presign(v1.0.2)**:OSS 预签名,id 或 name 至少其一。',
|
|
150
159
|
'- stackMethodId 来自 gotonline_overview_method_idmap_statistic 或自定义函数组统计。',
|
|
151
160
|
].join('\n'),
|
|
152
161
|
gotonline_overview_method_curve_presign: [
|
|
153
162
|
'【选用规则——务必先看】',
|
|
154
163
|
'- v1.0.2 OSS 预签名下载函数逐帧曲线 JSON(Unity · UE)。',
|
|
155
|
-
'-
|
|
164
|
+
'- stackMethodId 与 stackMethodName **至少传一个**(同时传时优先 id);UE 另需 threadName,Unity 不传。',
|
|
156
165
|
'- 不要用 v1.0.1 gotonline_overview_method_curve 除非必须服务端直出。',
|
|
157
|
-
'-
|
|
166
|
+
'- id 优先从 gotonline_overview_method_idmap_statistic 获取。',
|
|
158
167
|
].join('\n'),
|
|
159
168
|
gotonline_overview_indicator_dashboard_keys: [
|
|
160
169
|
'【选用规则——务必先看】',
|
|
@@ -184,18 +193,22 @@ export const VERSION_GUIDE = {
|
|
|
184
193
|
gotonline_overview_stack_stutter_full_tree_presign: [
|
|
185
194
|
'【选用规则——务必先看】',
|
|
186
195
|
'- **全部卡顿帧已合并**的调用堆栈树 = 卡顿根因主入口(服务端聚合,无需客户端逐帧拉树再聚类)。',
|
|
196
|
+
'- 禁止把 WaitForVsync / Gfx.WaitForPresent 写成卡顿根因或 GPU Bound 证据。',
|
|
197
|
+
'- 说「GPU 主瓶颈」前必须先查 gotonline_gpu_bound;空数组只能说「未检出 Bound」。',
|
|
187
198
|
'- 只要某一场景:用 stutter_scene_tree;只要某一尖峰帧细节:再用 stack_tree_frame。',
|
|
188
199
|
STACK_ANALYSIS_GUIDE,
|
|
189
200
|
].join('\n'),
|
|
190
201
|
gotonline_overview_stack_stutter_scene_tree_presign: [
|
|
191
202
|
'【选用规则——务必先看】',
|
|
192
203
|
'- **指定场景内卡顿帧已合并**的堆栈树;sceneIndex 来自 list_scenes 下标。',
|
|
204
|
+
'- 禁止把 WaitForVsync 当根因;GPU 主瓶颈结论须先查 gpu_bound。',
|
|
193
205
|
'- 全报告卡顿用 stutter_full_tree;单帧深挖用 stack_tree_frame。',
|
|
194
206
|
STACK_ANALYSIS_GUIDE,
|
|
195
207
|
].join('\n'),
|
|
196
208
|
gotonline_overview_stack_tree_frame_presign: [
|
|
197
209
|
'【选用规则——务必先看】',
|
|
198
210
|
'- **单帧**完整堆栈树(frameId 必填)。用于已知尖峰帧深挖,不是卡顿分析的第一步。',
|
|
211
|
+
'- Unity:不传 threadId=主线程;传子线程 id/名=该子线程指定帧树(thread idmap)。UE:threadId 必传(含 GameThread)。',
|
|
199
212
|
'- 卡顿共性根因请先用 stutter_full_tree / stutter_scene_tree(已是多帧合并结果)。',
|
|
200
213
|
'- ❌ 不要对 frametime valueGt 筛出的每个慢帧循环调用本工具来「聚类」。',
|
|
201
214
|
STACK_ANALYSIS_GUIDE,
|
|
@@ -203,6 +216,7 @@ export const VERSION_GUIDE = {
|
|
|
203
216
|
gotonline_overview_stack_sample_frame_presign: [
|
|
204
217
|
'【选用规则——务必先看】',
|
|
205
218
|
'- 堆栈树某个结点的逐帧曲线;结点 id 来自树文件。',
|
|
219
|
+
'- Unity 子线程须传 threadId + sampleId;不传 threadId 为主线程(可不传 sampleId 取全帧聚合)。',
|
|
206
220
|
STACK_ANALYSIS_GUIDE,
|
|
207
221
|
].join('\n'),
|
|
208
222
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uwa4d/openapi-mcp",
|
|
3
|
-
"version": "0.2.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "UWA 开放平台 MCP Server,将 UWA Open API 暴露为 MCP 工具供 AI 助手调用",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"prepublishOnly": "npm run build && node scripts/check-publish-tag.mjs",
|
|
28
28
|
"release": "node scripts/release.mjs",
|
|
29
29
|
"release:dry": "node scripts/release.mjs --dry-run",
|
|
30
|
+
"release:stable-patch": "node scripts/release-stable-patch.mjs",
|
|
30
31
|
"version:beta": "node scripts/bump.mjs beta",
|
|
31
32
|
"version:release": "node scripts/bump.mjs release"
|
|
32
33
|
},
|
package/spec/overrides.json
CHANGED
|
@@ -21,6 +21,52 @@
|
|
|
21
21
|
"to": "单次请求最多查询 30 份报告(文档写 50,实测上限 30,超出会返回 20001)"
|
|
22
22
|
}
|
|
23
23
|
]
|
|
24
|
+
},
|
|
25
|
+
"gotonline_overview_method_idmap_statistic": {
|
|
26
|
+
"reason": "threadName 仅 UE 必填;Unity 主线程不传。MCP 全局 schema 不得 required,否则 Zod 拦 Unity 调用。",
|
|
27
|
+
"verifiedAt": "2026-08-12",
|
|
28
|
+
"evidence": "sandbox:Unity dataKey=20260812163333sdk6b704767 不传 threadName 返回 348 条;UE 同接口须 threadName=GameThread。",
|
|
29
|
+
"setQueryRequired": {
|
|
30
|
+
"threadName": false
|
|
31
|
+
},
|
|
32
|
+
"setQueryDescription": {
|
|
33
|
+
"threadName": "UE 必传(GameThread / RHIThread / RenderThread / FAsyncLoadingThread 等)。Unity 无需此参数(不传=主线程)"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"gotonline_overview_method_curve_presign": {
|
|
37
|
+
"reason": "threadName 仅 UE 必填;Unity 不传。stackMethodId/Name 至少其一即可(与线上 Open API 一致)。",
|
|
38
|
+
"verifiedAt": "2026-08-12",
|
|
39
|
+
"evidence": "sandbox:Unity 仅 stackMethodId 可取曲线;UE 须 threadName=GameThread。生产 Open API 支持 name+id。",
|
|
40
|
+
"setQueryRequired": {
|
|
41
|
+
"threadName": false,
|
|
42
|
+
"stackMethodId": false,
|
|
43
|
+
"stackMethodName": false
|
|
44
|
+
},
|
|
45
|
+
"setQueryDescription": {
|
|
46
|
+
"threadName": "UE 必传。Unity 无需此参数",
|
|
47
|
+
"stackMethodId": "函数 ID;与 stackMethodName 至少传一个,同时传时优先 id",
|
|
48
|
+
"stackMethodName": "函数名称;与 stackMethodId 至少传一个"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"gotonline_overview_stack_tree_frame_presign": {
|
|
52
|
+
"reason": "threadId 仅 UE 必填(含 GameThread);Unity 不传=主线程,传子线程 id/名=子线程树。",
|
|
53
|
+
"verifiedAt": "2026-08-12",
|
|
54
|
+
"evidence": "sandbox:Unity 帧树不传 threadId 成功;UE 传 GameThread/RenderThread 成功。旧 MCP schema 把 threadId 标成全局 required,Agent 调 Unity 时被 Zod 卡住。",
|
|
55
|
+
"setQueryRequired": {
|
|
56
|
+
"threadId": false
|
|
57
|
+
},
|
|
58
|
+
"setQueryDescription": {
|
|
59
|
+
"threadId": "UE 必传(线程 id 或线程名,含 GameThread)。Unity:不传=主线程;传子线程 id/名=该子线程指定帧树"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"gotonline_overview_stack_sample_frame_presign": {
|
|
63
|
+
"reason": "threadId / sampleId 文档写作「UE 是」,不得升成 MCP 全局必填。",
|
|
64
|
+
"verifiedAt": "2026-08-12",
|
|
65
|
+
"evidence": "文档表写作「UE 是」;旧 isRequired 用 /是/ 子串匹配会误判。Unity 主线程可不传 threadId,可不传 sampleId 取全帧聚合。",
|
|
66
|
+
"setQueryRequired": {
|
|
67
|
+
"threadId": false,
|
|
68
|
+
"sampleId": false
|
|
69
|
+
}
|
|
24
70
|
}
|
|
25
71
|
}
|
|
26
72
|
}
|