@tencent-rtc/mcp 1.7.2 → 1.7.3

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.
Files changed (27) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +13 -5
  3. package/knowledge/bm25.js +20 -11
  4. package/knowledge/search/generic-rerank.js +123 -0
  5. package/knowledge/search/search-pass.js +8 -1
  6. package/package.json +1 -1
  7. package/resource/index/manifest.json +1 -1
  8. package/resource/knowledge/chat/best-practice/common/web-sdk-log-level.md +76 -0
  9. package/resource/knowledge/chat/best-practice/miniprogram/desktop-wechat-miniprogram-error.md +79 -0
  10. package/resource/knowledge/roomkit/best-practice/vue/screen-share-auto-stop-on-leave.md +62 -0
  11. package/resource/knowledge/roomkit/core-sdk/react/network-proxy.md +83 -0
  12. package/resource/knowledge/roomkit/core-sdk/vue/network-proxy.md +83 -0
  13. package/resource/knowledge/roomkit/core-sdk/vue/recording.md +245 -0
  14. package/resource/knowledge/roomkit/core-sdk/vue/whiteboard-annotation.md +196 -0
  15. package/resource/knowledge/roomkit/faq/error-code.md +103 -0
  16. package/resource/knowledge/roomkit/preset/harmonyos/integration.md +461 -0
  17. package/resource/knowledge/roomkit/preset/react/features/network-proxy.md +79 -0
  18. package/resource/knowledge/roomkit/preset/uniapp-app/integration.md +580 -0
  19. package/resource/knowledge/roomkit/preset/vue/features/ai-caption-translation.md +69 -0
  20. package/resource/knowledge/roomkit/preset/vue/features/ai-denoiser.md +67 -0
  21. package/resource/knowledge/roomkit/preset/vue/features/network-proxy.md +79 -0
  22. package/resource/knowledge/roomkit/preset/vue/features/recording.md +85 -0
  23. package/resource/knowledge/roomkit/preset/vue/features/whiteboard-annotation.md +86 -0
  24. package/server.js +1 -1
  25. package/utils/preflight-route.js +18 -6
  26. package/utils/report-cls-client.js +1 -1
  27. package/utils/report-es-client.js +1 -1
@@ -0,0 +1,67 @@
1
+ AI noise cancellation is powered by the AI algorithms from Tencent's Tianlai Lab. It can intelligently detect and remove noise interference mixed into the transmitted signal, thereby significantly improving voice quality, enhancing sound clarity, and improving the listening experience. Applying the AI noise cancellation feature in TUIRoomKit lets users get a clear and stable audio experience in various environments such as offices, internet cafes, shopping malls, and outdoors.
2
+
3
+ ## Online experience
4
+
5
+ You can also enter our [Real-Time Communication Experience Center](https://rtcube.cloud.tencent.com/component/experience-center/index.html#/detail) to experience the excellent sound quality delivered by the AI noise cancellation capability online.
6
+
7
+ #
8
+
9
+ ## Enabling AI noise cancellation
10
+
11
+ TUIRoomKit provides a very convenient activation process. You only need two steps to try it out:
12
+ 1. Go to the Real-Time Communication console and select the application you want to enable it for.
13
+
14
+ 2. Go to Value-added Features and turn on the AI noise cancellation switch.
15
+
16
+ Then you can enjoy the better noise cancellation of TUIRoomKit in your application!
17
+
18
+ ## Web asset configuration
19
+
20
+ TUIRoomKit automatically enables AI noise cancellation after the user joins the room, provided that you have completed the following asset configuration:
21
+ 1. Publish the `denoiser-wasm.js` file located in the `node_modules/trtc-sdk-v5/plugins/ai-denoiser` directory to a CDN or static resource server, and make sure the files are under the same public path. For details, see the [AI noise cancellation plugin documentation](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-35-advanced-ai-denoiser.html).
22
+
23
+ 2. Before joining the room, call the following interface to pass the public path above to TUIRoomKit:
24
+
25
+ 【With UI integration】
26
+
27
+ 【Vue3】
28
+ ``` typescript
29
+ import { conference } from '@tencentcloud/roomkit-web-vue3';
30
+
31
+ conference.callExperimentalAPI({
32
+ api: 'setRtcAssetsPath',
33
+ params: { assetsPath: 'XXXXX/assets/' }, // Directory path where the denoiser-wasm.js file is located
34
+ });
35
+ ```
36
+
37
+ 【React】
38
+ ``` typescript
39
+ import { conference } from '@tencentcloud/roomkit-web-react';
40
+
41
+ conference.callExperimentalAPI({
42
+ api: 'setRtcAssetsPath',
43
+ params: { assetsPath: 'XXXXX/assets/' }, // Directory path where the denoiser-wasm.js file is located
44
+ });
45
+ ```
46
+
47
+ 【Without UI integration】
48
+
49
+ 【Vue3】
50
+ ``` typescript
51
+ import { callExperimentalAPI } from 'tuikit-atomicx-vue3';
52
+
53
+ callExperimentalAPI({
54
+ api: 'setRtcAssetsPath',
55
+ params: { assetsPath: 'XXXXX/assets/' }, // Directory path where the denoiser-wasm.js file is located
56
+ });
57
+ ```
58
+
59
+ 【React】
60
+ ``` typescript
61
+ import { callExperimentalAPI } from 'tuikit-atomicx-react';
62
+
63
+ callExperimentalAPI({
64
+ api: 'setRtcAssetsPath',
65
+ params: { assetsPath: 'XXXXX/assets/' }, // Directory path where the denoiser-wasm.js file is located
66
+ });
67
+ ```
@@ -0,0 +1,79 @@
1
+ The Conference SDK is built on Tencent Cloud Chat (IM) and Tencent Real-Time Communication (TRTC). It supports configuring the IM and TRTC proxies together in intranet / firewall environments, which is suitable for scenarios such as private deployment and enterprise intranet isolation where a direct connection to Tencent Cloud services is not available.
2
+
3
+ ## Proxy architecture
4
+
5
+ |Proxy server|Proxy link|
6
+ |---------|---------|
7
+ |IM proxy|Proxies the signaling channels for IM login, message sending/receiving, etc. (WebSocket), as well as the upload and download of resources such as chat images and files.|
8
+ |TRTC WebSocket proxy (e.g. Nginx)|Proxies the signaling channels for TRTC room entry, control, etc. (WebSocket), and is responsible for room management and user state synchronization.|
9
+ |TRTC TURN Server|Relays TRTC audio and video media streams.|
10
+
11
+ > **Note:**
12
+ > The proxy servers (IM proxy, Nginx, TURN) need to be deployed by yourself. For how to set them up, see [TRTC Web SDK handling firewall restrictions](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-34-advanced-proxy.html).
13
+ >
14
+
15
+ ## API and parameters
16
+
17
+ The Conference SDK allows you to configure the intranet proxy uniformly through the `callExperimentalAPI` interface before calling `login()`:
18
+ ``` typescript
19
+ callExperimentalAPI({
20
+ api: 'setNetworkProxy',
21
+ params: {
22
+ im?: { /* IM proxy parameters */ },
23
+ rtc?: { /* TRTC proxy parameters */ },
24
+ },
25
+ });
26
+ ```
27
+
28
+ ### IM proxy parameters
29
+
30
+ |Parameter|Type|Description|
31
+ |---------|---------|---------|
32
+ |`proxyServer`|String|IM signaling WebSocket proxy address.|
33
+ |`fileUploadProxy`|String|IM file upload proxy address.|
34
+ |`fileDownloadProxy`|String|IM file download proxy address.|
35
+
36
+ ### TRTC proxy parameters
37
+
38
+ |Parameter|Type|Description|
39
+ |---------|---------|---------|
40
+ |`websocketProxy`|String|TRTC signaling WebSocket proxy address, e.g. `wss://proxy.example.com/ws/`.|
41
+ |`turnServer`|Array|List of TURN servers. Each item contains `url` / `username` / `credential`.|
42
+ |`iceTransportPolicy`|`'relay' \| 'all'`|Client-side ICE transport policy. In an intranet environment, it is recommended to set it to `'relay'` to force a connection to the TURN server.|
43
+
44
+ ## Sample code
45
+
46
+ ``` typescript
47
+ import { conference } from '@tencentcloud/roomkit-web-vue3';
48
+
49
+ conference.callExperimentalAPI({
50
+ api: 'setNetworkProxy',
51
+ params: {
52
+ im: {
53
+ proxyServer: 'wss://proxy.example.com:8080',
54
+ fileUploadProxy: 'https://proxy.example.com:8080',
55
+ fileDownloadProxy: 'https://proxy.example.com:8080',
56
+ },
57
+ rtc: {
58
+ websocketProxy: 'wss://proxy.example.com/ws/',
59
+ turnServer: [
60
+ { url: '14.3.3.3:3478', username: 'turn', credential: 'turn' },
61
+ ],
62
+ iceTransportPolicy: 'relay',
63
+ },
64
+ },
65
+ });
66
+
67
+ await conference.login({ sdkAppId, userId, userSig });
68
+ await conference.createAndJoinRoom({ roomId });
69
+ ```
70
+
71
+ ## FAQs
72
+
73
+ ### A user can join the conference normally on the public network, but cannot join it on the intranet?
74
+
75
+ Check whether `setNetworkProxy` was called before `login()`. If it is already configured but still fails, check the TURN port and the outbound allowlist of the proxy server.
76
+
77
+ ### A user can join the conference but cannot see the remote video or hear the remote audio?
78
+
79
+ Confirm that `turnServer` is reachable, and set `iceTransportPolicy` to `'relay'` in an intranet environment.
@@ -0,0 +1,85 @@
1
+ This document introduces the cloud recording feature of the Conference SDK. **The Conference SDK integrates mixed-stream room recording by default.** The room owner or administrator can start recording with one click through the client interface and the with-UI integration component, **without the customer building a backend** to call the TRTC cloud API. If the default recording capability does not meet your business needs, refer to Differences from TRTC cloud recording in this document, and refer to [TRTC cloud recording](https://cloud.tencent.com/document/product/647/76497) to integrate it yourself.
2
+
3
+ > **Note:**
4
+ > The Conference SDK cloud recording is implemented based on the [TRTC cloud recording](https://cloud.tencent.com/document/product/647/76497) capability, with typical mixed-stream recording parameters preset for meeting scenarios, helping you complete recording configuration more simply and quickly.
5
+ >
6
+
7
+ ## Prerequisites
8
+
9
+ Before using Conference SDK cloud recording, confirm that you have completed the following steps:
10
+ - You have purchased a Conference SDK package that includes cloud recording capability and obtained the SDKAppID information.
11
+
12
+ - Enable the recording file storage service: Recording files can be stored in [Cloud VOD (VOD)](https://console.cloud.tencent.com/vod) or [Cloud Object Storage (COS)](https://console.cloud.tencent.com/cos). Complete the activation in the corresponding console and record the storage information.
13
+
14
+ - [Submit a ticket](https://console.cloud.tencent.com/workorder/category), select the **Real-Time Communication** product, and state that you need to configure cloud recording storage information (VOD or COS) for the Conference SDK.
15
+
16
+ ## Feature description
17
+
18
+ The Conference SDK provides a **managed cloud recording** solution: The server is responsible for authentication and recording task management, and the customer only needs to configure the recording file storage address. Then, during a meeting, the room owner or administrator can start recording with one click through the client.
19
+
20
+ ## Recording effect
21
+
22
+ The Conference SDK uses **mixed-stream recording** mode by default, mixing the audio and video streams published in the room into one complete recording file. The recording content includes:
23
+ - **Audio**: The voices of all participants in the room.
24
+
25
+ - **Video**: All views with the camera turned on or screen sharing.
26
+
27
+ The recording layout **switches automatically** with the in-meeting state, and the recording task is **not restarted** during the switch:
28
+
29
+ |In-meeting state|Mixed-stream layout|Maximum number of views|
30
+ |---------|---------|---------|
31
+ |No screen sharing / whiteboard|[Grid layout](https://cloud.tencent.com/document/product/647/76497#nine)|Up to **25** video views|
32
+ |With screen sharing / whiteboard|[Screen sharing layout](https://cloud.tencent.com/document/product/647/76497#share) (sharing as the main view)|Up to **1** screen sharing / whiteboard + **16** video views|
33
+ |Audio only|-|—|
34
+
35
+ ## Obtaining files after the meeting
36
+
37
+ After recording ends, the files are stored in the VOD or COS you configured. You can obtain the recording files in the following ways:
38
+ - Go to [Real-Time Communication Console > Application Management](https://console.cloud.tencent.com/trtc/app), and view the recording files stored in Cloud VOD (VOD) under **Recording Management > Recording File Management**.
39
+
40
+ - If stored in Cloud Object Storage (COS), go to the [Cloud Object Storage (COS) console](https://console.cloud.tencent.com/cos) to view them.
41
+
42
+ - For details on finding, receiving, deleting, and playing back files, refer to [Recording file management](https://cloud.tencent.com/document/product/647/76497#file).
43
+
44
+ ## Differences from TRTC cloud recording
45
+
46
+ Both Conference SDK room recording and TRTC cloud recording are based on the underlying TRTC cloud recording service. The SDK has preset mixed-stream recording parameters for meeting scenarios. If you need capabilities such as **specifying subscribed hosts, customizing the mixed-stream layout, or controlling recording start/stop from the server**, you can use TRTC cloud recording to integrate it yourself. The main differences are as follows:
47
+
48
+ |Comparison item|**Conference SDK room recording**|**TRTC cloud recording**|
49
+ |---------|---------|---------|
50
+ |Recording scope|Applicable to rooms created through the Conference SDK under the current SDKAppID.|Applicable to all TRTC rooms under the current SDKAppID (including rooms created directly by other SDKs or the TRTC SDK).|
51
+ |Start method|During a meeting, the room owner or administrator starts and stops recording with one click through the client interface / with-UI component.|Enable global auto-recording in the console, or have a self-built backend call the REST API (e.g. `CreateCloudRecording`) to control recording.|
52
+ |Recording files|By default, **mixed-stream recording** produces one mixed file; the layout switches automatically based on whether there is screen sharing / whiteboard in the meeting (grid layout up to 25 streams, screen sharing layout 1+16 streams).|Global auto-recording is **single-stream** (one file per host); the REST API method can choose single-stream or mixed-stream, and supports custom layouts and subscription lists.|
53
+ |Integration cost|Just submit a ticket to configure the storage address, **no self-built backend required**.|You need to configure a recording template in the TRTC console yourself, or integrate the REST API and callbacks.|
54
+
55
+ > **Note:**
56
+ > - The two solutions can be used at the same time, but this may produce multiple recording files and additional [costs](https://cloud.tencent.com/document/product/647/75047).
57
+ > - If you already use Conference SDK room recording, it is not recommended to also enable TRTC **global auto-recording**, to avoid recording the same room repeatedly.
58
+ > - For configuration and integration details, see [Implementing cloud recording and playback](https://cloud.tencent.com/document/product/647/76497).
59
+
60
+ ## FAQs
61
+
62
+ ### **Can multiple recording solutions be used at the same time?**
63
+
64
+ Multiple recording solutions do not conflict, and you can use multiple recording solutions at the same time, but this will produce multiple recording files and [costs](https://cloud.tencent.com/document/product/647/75047).
65
+
66
+ ### How do I view the recording duration details?
67
+
68
+ You can view some recording duration details in [Real-Time Communication Console > Cloud Recording](https://console.cloud.tencent.com/trtc/cloudrecord):
69
+
70
+ ### How do I manage recording files?
71
+
72
+ The current [recording file management](https://cloud.tencent.com/document/product/647/76497#file) mainly offers the following operations:
73
+
74
+ [Find recording files](https://cloud.tencent.com/document/product/647/76497#find_file), [Receive recording files](https://cloud.tencent.com/document/product/647/76497#receive_file), [Delete recording files](https://cloud.tencent.com/document/product/647/76497#delete_file), [Play back recording files](https://cloud.tencent.com/document/product/647/76497#record_file).
75
+
76
+ ### How do I customize the recording file name?
77
+
78
+ Renaming recording files is not currently supported. Only [API recording](https://cloud.tencent.com/document/product/647/76497#API_record) supports customizing a file name prefix: When storing to Cloud VOD using [API recording](https://cloud.tencent.com/document/product/647/76497#API_record), you can customize the file name prefix through the UserDefineRecordId parameter in [TencentVod](https://cloud.tencent.com/document/api/647/44055#TencentVod). The prefix and the auto-generated recording file name are separated by `_UserDefine_u_`.
79
+
80
+ ### More documentation
81
+ - [Implementing cloud recording and playback](https://cloud.tencent.com/document/product/647/76497)
82
+
83
+ - [Cloud recording server event callbacks](https://cloud.tencent.com/document/product/647/81113)
84
+
85
+ - [Cloud recording billing description](https://cloud.tencent.com/document/product/647/75047)
@@ -0,0 +1,86 @@
1
+ TUIRoomKit has built-in whiteboard and screen sharing annotation. After completing the TUIRoomKit integration, users can use the following in a meeting without writing any extra code:
2
+ - **Whiteboard**: Opens a blank canvas for writing, explaining, and brainstorming.
3
+
4
+ - **Screen sharing annotation**: Circle key points, add arrows, or mark issues on the screen being shared.
5
+
6
+ ## Online experience
7
+
8
+ Visit [TUIRoomKit online experience](https://rtcube.cloud.tencent.com/component/experience-center/index.html#/detail) and enter a meeting scenario to experience the whiteboard and screen sharing annotation.
9
+
10
+ ## Getting started
11
+
12
+ First, refer to [Quick Integration](https://cloud.tencent.com/document/product/647/81962) to integrate `@tencentcloud/roomkit-web-vue3`, and upgrade to version `6.1.0` or later.
13
+
14
+ ### Using the whiteboard
15
+ 1. Enter a **multi-person meeting**.
16
+
17
+ 2. Click **Screen Share** in the bottom toolbar.
18
+
19
+ 3. Select **Whiteboard** from the expanded menu.
20
+
21
+ 4. The whiteboard is immediately shared with other members in the room. The initiator can use tools such as the pen, laser pointer, shapes, arrows, eraser, undo, redo, clear, and save snapshot.
22
+
23
+ Whiteboard in a meeting
24
+
25
+ ### Using screen sharing annotation
26
+ 1. Start screen sharing.
27
+
28
+ 2. Click the **Annotate** button on the shared screen.
29
+
30
+ 3. Use the pen, shapes, or arrows to mark key points on the shared content.
31
+
32
+ 4. After ending screen sharing, the annotation is automatically closed.
33
+
34
+ Annotating on the screen sharing view
35
+
36
+ ## Permission control
37
+
38
+ The whiteboard uses the same permissions as screen sharing:
39
+ - **The room owner and administrators** can prohibit or allow ordinary members from sharing their screen through meeting controls.
40
+
41
+ - **Ordinary members** who are prohibited from sharing their screen cannot start screen sharing, nor can they start the whiteboard.
42
+
43
+ - **Screen sharing annotation** is available only to the current screen sharer. Other members can view the shared view and the annotation content, but cannot draw on that view.
44
+
45
+ If a member cannot see the whiteboard entry, first confirm whether their screen sharing permission has been disabled.
46
+
47
+ ## Disabling the whiteboard and annotation
48
+
49
+ If your application does not need the whiteboard and annotation, you can hide the feature entries:
50
+ ``` typescript
51
+ import {
52
+ BuiltinWidget,
53
+ conference,
54
+ } from '@tencentcloud/roomkit-web-vue3';
55
+
56
+ conference.setWidgetVisible({
57
+ [BuiltinWidget.WhiteboardWidget]: false,
58
+ [BuiltinWidget.AnnotationWidget]: false,
59
+ });
60
+ ```
61
+
62
+ ## Scope of use
63
+ - Supports the latest stable versions of Chrome and Edge on Windows and macOS desktops.
64
+
65
+ - Does not yet support mobile browsers and webinar (Webinar) rooms.
66
+
67
+ - Currently, the initiator draws while other members watch in real time; simultaneous drawing by multiple people is not yet supported.
68
+
69
+ - The whiteboard and regular screen sharing cannot be enabled at the same time. When you need annotation, start screen sharing first, and then start annotation on the shared view.
70
+
71
+ ## FAQs
72
+
73
+ ### Why is there no whiteboard entry in the meeting?
74
+
75
+ Please confirm:
76
+ 1. `@tencentcloud/roomkit-web-vue3` has been upgraded to version **6.1.0** or later.
77
+
78
+ 2. The current room is a multi-person meeting, not a webinar (Webinar) room.
79
+
80
+ 3. The current user has screen sharing permission.
81
+
82
+ 4. You are using desktop Chrome or Edge that supports screen sharing.
83
+
84
+ ### Do I need to close it manually before exiting the meeting?
85
+
86
+ No. When you exit the room, the component automatically stops the whiteboard and releases related resources; screen sharing annotation is also automatically stopped when the sharing ends.
package/server.js CHANGED
@@ -41,7 +41,7 @@ User-visible output rules (MUST):
41
41
  export function createServer() {
42
42
  const server = new McpServer({
43
43
  name: "Tencent RTC MCP Server",
44
- version: "1.7.2",
44
+ version: "1.7.3",
45
45
  }, {
46
46
  instructions: SERVER_INSTRUCTIONS,
47
47
  });
@@ -10,6 +10,10 @@ const PRODUCT_SIGNALS = {
10
10
  // 平台词(纯运行形态,不含任何产品词)
11
11
  const PLATFORM_NATIVE_SIGNAL = /\b(android|ios|flutter|c\+\+|native)\b|安卓\s*(sdk|端|原生)|iOS\s*(SDK|端|原生)|原生\s*(sdk|端)?|native\s+(?:sdk|client|app)|mobile\s+(?:sdk|native)/i;
12
12
  const PLATFORM_WEB_SIGNAL = /\b(web|h5|html5|browser|webview)\b|浏览器|网页|Web端|H5端|网页端|web\s+(?:app|client|page)|in-?browser|mobile\s+browser|安卓\s*(浏览器|网页|H5|Web|webview)|iOS\s*(浏览器|网页|H5|Web|webview)|Android\s*(?:浏览器|网页|H5|Web|webview|browser|web)|iPad\s*(?:浏览器|网页|H5|Web|browser|web)|\b(Safari|Chrome|Edge|UC|QQ浏览器|QQ\s+Browser)\b/i;
13
+ // 小程序信号:小程序 / 微信小程序 / miniprogram / mini program / AppService(小程序逻辑层专有名词)。
14
+ // 命中即锁定 miniprogram,并像 web 一样压制 native 单字与 native 兜底,
15
+ // 避免「PC 微信小程序…没有原生 WebSocket」这类描述里的「原生」被 PLATFORM_NATIVE_SIGNAL 误命中后兜底成 android。
16
+ const PLATFORM_MINIPROGRAM_SIGNAL = /小程序|微信小程序|\bmini[-\s]?program\b|\bminiprogram\b|\bAppService\b/i;
13
17
  // 平台+产品复合词(运行形态 + 产品线路标识)
14
18
  const WEB_PRODUCT_PAIR_SIGNAL = /\bweb\s+(trtc|sdk|im|chat|roomkit)\b|\b(trtc|sdk|im|chat|roomkit)\s+web\b|trtc[-\s]?sdk|trtc\.js/i;
15
19
  // API 词(客户端调用形态)
@@ -42,12 +46,19 @@ function collectPromptSignals(prompt) {
42
46
  if (TRTC_SIGNAL.test(prompt))
43
47
  products.add('trtc');
44
48
  // 平台 tokens:web signal 锁定 → 压制 native 单字(安卓/iOS 仅归 hostEnv);
49
+ // miniprogram signal 锁定 → 同样压制 native 单字与 native 兜底(小程序逻辑层"没有原生 X"不应被判成 native)。
45
50
  // 真复合词(unreal/unity/harmonyos/react-native/flutter/c++)不受影响。
46
51
  const platforms = [];
47
52
  const webLocked = PLATFORM_WEB_SIGNAL.test(prompt) || WEB_PRODUCT_PAIR_SIGNAL.test(prompt);
48
53
  if (webLocked) {
49
54
  platforms.push('web');
50
55
  }
56
+ // 小程序信号优先级高于 native 单字/兜底:命中即锁定 miniprogram。
57
+ // web + 小程序可同时成立(如"小程序 web-view"),各自入 platforms 由 search core 做多平台归并。
58
+ const mpLocked = PLATFORM_MINIPROGRAM_SIGNAL.test(prompt);
59
+ if (mpLocked) {
60
+ platforms.push('miniprogram');
61
+ }
51
62
  const nativeSpecificHits = [];
52
63
  if (/\b(?:unreal|UE[45]?|unreal-engine)\b/i.test(prompt))
53
64
  nativeSpecificHits.push('unreal-engine');
@@ -61,17 +72,18 @@ function collectPromptSignals(prompt) {
61
72
  nativeSpecificHits.push('flutter');
62
73
  if (/\b(?:c\+\+)\b/i.test(prompt))
63
74
  nativeSpecificHits.push('c++');
64
- // 安卓/iOS 单字只在非 web-locked 时进 platforms(web-locked 时仅归 hostEnv)
65
- if (!webLocked && /\b(?:ios|iphone|ipad|苹果)\b/i.test(prompt))
75
+ // 安卓/iOS 单字只在非 web-locked 且非 miniprogram-locked 时进 platforms(否则仅归 hostEnv)
76
+ if (!webLocked && !mpLocked && /\b(?:ios|iphone|ipad|苹果)\b/i.test(prompt))
66
77
  nativeSpecificHits.push('ios');
67
- if (!webLocked && /\b(?:android|安卓)\b/i.test(prompt))
78
+ if (!webLocked && !mpLocked && /\b(?:android|安卓)\b/i.test(prompt))
68
79
  nativeSpecificHits.push('android');
69
- // 真复合词(如 unity/unreal/flutter/harmonyos/react-native/c++)无条件 push;单字在 webLocked 时被压制
80
+ // 真复合词(如 unity/unreal/flutter/harmonyos/react-native/c++)无条件 push;单字在 web/miniprogram 锁定时被压制
70
81
  if (nativeSpecificHits.length > 0) {
71
82
  platforms.push(...nativeSpecificHits);
72
83
  }
73
- else if (!webLocked && PLATFORM_NATIVE_SIGNAL.test(prompt)) {
74
- // 仅 "native" 词,未指定细分 → 默认 android(webLocked 时不触发 fallback,避免被 \b(android|ios|...) 反向命中把 web 路径覆盖成 native)
84
+ else if (!webLocked && !mpLocked && PLATFORM_NATIVE_SIGNAL.test(prompt)) {
85
+ // 仅 "native" 词,未指定细分 → 默认 android(web/miniprogram 锁定时不触发 fallback,
86
+ // 避免被 \b(android|ios|...) 或"原生"反向命中把 web/小程序 路径覆盖成 native)
75
87
  platforms.push('android');
76
88
  }
77
89
  // Host env:仅用于标记,不进 platforms 归一化
@@ -28,7 +28,7 @@ function sendCLSReport(reportData) {
28
28
  const time = Date.now();
29
29
  const data = {
30
30
  platform: 'mcp',
31
- verison: '1.7.2',
31
+ verison: '1.7.3',
32
32
  sdkappid: `${SDKAppID}`,
33
33
  method: method,
34
34
  userid: queryID || userID,
@@ -7,7 +7,7 @@ function reportESClient(reportData) {
7
7
  report: [
8
8
  {
9
9
  platform: 'mcp',
10
- version: '1.7.2',
10
+ version: '1.7.3',
11
11
  sdkappid: `${SDKAppID}`,
12
12
  method: method,
13
13
  userID: `${userID}`,