@uwa4d/openapi-mcp 0.2.0-beta.13 → 0.2.0-beta.15

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.
@@ -5,14 +5,16 @@ const release = describeReleaseChannel(PACKAGE_VERSION);
5
5
  const STABLE_DESCRIPTION = [
6
6
  '查询当前 UWA OpenAPI MCP 正式版版本,并与 npm 最新稳定版对比(仅正式版↔正式版,不与内部测试版交叉)。',
7
7
  '适用:Unity / UE|复合工具|无需 dataKey',
8
- ' updateAvailable=true,请用 userNotice 主动转告客户重启 MCP 升级。',
9
- '用户问「MCP 什么版本」「有没有新版本」时优先调用本工具,不要臆测版本号。',
8
+ '触发:本对话第一次使用任意 UWA MCP 工具前应先调一次;用户问版本/升级时也可调。同一对话勿重复。',
9
+ '若 updateAvailable=true / suggestTellUser=true,请用 userNotice 主动转告客户重启 MCP 升级;已是最新勿打扰。',
10
+ '不要臆测版本号。',
10
11
  ].join('\n');
11
12
  const INTERNAL_DESCRIPTION = [
12
13
  '查询当前 UWA OpenAPI MCP 内部测试版版本,并与 npm @beta 最新测试版对比(仅测试↔测试,不与正式版交叉)。',
13
14
  '适用:Unity / UE|复合工具|无需 dataKey|仅 UWA 内部 sandbox 联调',
14
- ' updateAvailable=true,请用 userNotice 主动转告测试人员重启 MCP 升级。',
15
- '用户问「MCP 什么版本」「有没有新版本」时优先调用本工具,不要臆测版本号。',
15
+ '触发:本对话第一次使用任意 UWA MCP 工具前应先调一次;用户问版本/升级时也可调。同一对话勿重复。',
16
+ '若 updateAvailable=true / suggestTellUser=true,请用 userNotice 主动转告测试人员重启 MCP 升级;已是最新勿打扰。',
17
+ '不要臆测版本号。',
16
18
  ].join('\n');
17
19
  export const mcpVersionTool = {
18
20
  id: 'uwa_mcp_version',
@@ -12,7 +12,7 @@ export const SERVER_INSTRUCTIONS = [
12
12
  '5. 非法面板名要纠正(fps_mean→fps_avg;android_pss_max→android_memory_pss@max);数值带单位。PSS 优先读 pss_peak_kb/mb/frame。',
13
13
  '6. 接口失败时说明原因:运行日志 80108 — Unity 无 LG file_meta 表示未解析、无可用日志;UE 无 meta 只能说「暂不支持获取当前报告的运行日志」(方案切换过),勿断定报告本身无日志。其它失败勿把瞬时错误说成「一定没有数据」。',
14
14
  '7. 接口限流 31004(API_RATE_LIMIT):UWA 服务端保护,预期行为,不是 Bug。稍等重试或减少并行/批量(如 top_resources 缩小 assetTypes)。若返回含 _partialErrors 且 _rateLimitHint,部分类型限流时已有 Top 仍可用,需说明可能不完整,勿当成报告无资源。',
15
- '8. MCP 版本:用户问版本或升级时调用 uwa_mcp_version(正式版只对比正式版最新稳定版,内部测试版只对比测试版,互不交叉)。若 instructions 含「MCP 正式版/内部测试版有新版本」,必须用 userNotice 主动转告并说明重启 MCP 升级。',
15
+ '8. MCP 版本(每对话最多一次):本对话第一次使用任意 UWA MCP 工具前,先调用一次 uwa_mcp_version 核对 npm(正式版只对比正式版,内部测试版只对比测试版,互不交叉)。若 updateAvailable=true / suggestTellUser=true,必须用 userNotice 主动转告并说明重启 MCP 升级;已是最新则不要打扰用户。同一对话内勿重复调用。用户显式问版本时也可再调。',
16
16
  '',
17
17
  '体检优先调用 report_diagnosis;细节再按 _apisUsed 深挖。对比多份报告时说明场景/时长/目标帧是否可比(见 comparability_note)。',
18
18
  ].join('\n');
@@ -208,6 +208,7 @@ export const VERSION_GUIDE = {
208
208
  gotonline_overview_stack_tree_frame_presign: [
209
209
  '【选用规则——务必先看】',
210
210
  '- **单帧**完整堆栈树(frameId 必填)。用于已知尖峰帧深挖,不是卡顿分析的第一步。',
211
+ '- Unity:不传 threadId=主线程;传子线程 id/名=该子线程指定帧树(thread idmap)。UE:threadId 必传(含 GameThread)。',
211
212
  '- 卡顿共性根因请先用 stutter_full_tree / stutter_scene_tree(已是多帧合并结果)。',
212
213
  '- ❌ 不要对 frametime valueGt 筛出的每个慢帧循环调用本工具来「聚类」。',
213
214
  STACK_ANALYSIS_GUIDE,
@@ -215,6 +216,7 @@ export const VERSION_GUIDE = {
215
216
  gotonline_overview_stack_sample_frame_presign: [
216
217
  '【选用规则——务必先看】',
217
218
  '- 堆栈树某个结点的逐帧曲线;结点 id 来自树文件。',
219
+ '- Unity 子线程须传 threadId + sampleId;不传 threadId 为主线程(可不传 sampleId 取全帧聚合)。',
218
220
  STACK_ANALYSIS_GUIDE,
219
221
  ].join('\n'),
220
222
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uwa4d/openapi-mcp",
3
- "version": "0.2.0-beta.13",
3
+ "version": "0.2.0-beta.15",
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
  },
@@ -4904,7 +4904,7 @@
4904
4904
  "type": "string",
4905
4905
  "required": true,
4906
4906
  "example": "GameThread",
4907
- "description": "UE 必传。Unity 忽略"
4907
+ "description": "UE 必传。Unity:不传=主线程;传子线程 id/名=该子线程结点曲线(须同时传 sampleId)"
4908
4908
  }
4909
4909
  ],
4910
4910
  "body": [],
@@ -4954,7 +4954,7 @@
4954
4954
  "type": "string",
4955
4955
  "required": true,
4956
4956
  "example": "GameThread",
4957
- "description": "UE 必传。Unity 忽略"
4957
+ "description": "UE 必传。Unity:不传=主线程;传子线程 id/名=该子线程结点曲线(须同时传 sampleId)"
4958
4958
  }
4959
4959
  ],
4960
4960
  "body": [],
@@ -5403,7 +5403,7 @@
5403
5403
  "type": "string",
5404
5404
  "required": true,
5405
5405
  "example": "GameThread",
5406
- "description": "UE 必传(线程 id 或线程名)。Unity 主线程可不传"
5406
+ "description": "UE 必传(线程 id 或线程名)。Unity:不传=主线程;传子线程 id/名=该子线程指定帧树"
5407
5407
  }
5408
5408
  ],
5409
5409
  "body": [],
@@ -5419,7 +5419,7 @@
5419
5419
  "unreal"
5420
5420
  ],
5421
5421
  "module": "overview",
5422
- "description": "获取指定帧的函数调用堆栈树。返回 OSS 预签名地址,下载后为 gzip 压缩的树结构文件(与面板 stack/tree/frame 同源)。",
5422
+ "description": "获取指定帧的函数调用堆栈树。返回 OSS 预签名地址,下载后为 gzip 压缩的树结构文件(与面板 stack/tree/frame 同源)。Unity 可传 threadId 取子线程。",
5423
5423
  "apiVersions": [
5424
5424
  "v1.0.1"
5425
5425
  ],
@@ -5453,7 +5453,7 @@
5453
5453
  "type": "string",
5454
5454
  "required": true,
5455
5455
  "example": "GameThread",
5456
- "description": "UE 必传(线程 id 或线程名)。Unity 主线程可不传"
5456
+ "description": "UE 必传。Unity:不传=主线程;传子线程 id/名=该子线程指定帧树"
5457
5457
  }
5458
5458
  ],
5459
5459
  "body": [],