@tencent-rtc/mcp 1.6.8 → 1.7.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.
Files changed (75) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +53 -39
  3. package/knowledge/build-index.js +30 -6
  4. package/knowledge/chunker.js +82 -14
  5. package/knowledge/chunking-policy.js +100 -0
  6. package/knowledge/content-loader.js +3 -3
  7. package/knowledge/frontmatter-meta.js +167 -0
  8. package/knowledge/path-meta.js +28 -6
  9. package/knowledge/search/exact-lookup.js +9 -227
  10. package/knowledge/search/filter-pool.js +12 -29
  11. package/knowledge/search/framework-fallback.js +22 -0
  12. package/knowledge/search/intent-router.js +13 -0
  13. package/knowledge/search/query-normalizer.js +56 -3
  14. package/knowledge/search/search-core.js +391 -0
  15. package/knowledge/search/search-knowledge.js +292 -363
  16. package/knowledge/search/search-message.js +87 -0
  17. package/knowledge/search/search-pass.js +428 -0
  18. package/knowledge/search/search-types.js +1 -0
  19. package/knowledge/search/url-row-scorer.js +258 -0
  20. package/package.json +1 -1
  21. package/resource/_schema/feature-aliases.yaml +1 -1
  22. package/resource/index/manifest.json +1 -1
  23. package/resource/knowledge/callkit/best-practice/callkit-miniprogram/uniapp-shrink.md +60 -0
  24. package/resource/knowledge/callkit/best-practice/common/call-autoplay-blocked.md +77 -0
  25. package/resource/knowledge/callkit/best-practice/common/call-message-in-chat.md +78 -0
  26. package/resource/knowledge/callkit/best-practice/common/call-vs-calls.md +110 -0
  27. package/resource/knowledge/callkit/best-practice/common/callengine-call-flow.md +123 -0
  28. package/resource/knowledge/callkit/best-practice/common/callengine-log-level.md +67 -0
  29. package/resource/knowledge/callkit/best-practice/common/callkit-get-engine-instance.md +81 -0
  30. package/resource/knowledge/callkit/best-practice/common/callkit-get-roomid.md +78 -0
  31. package/resource/knowledge/callkit/best-practice/common/callkit-limitations.md +37 -0
  32. package/resource/knowledge/callkit/best-practice/common/callkit-user-register-and-kicked.md +98 -0
  33. package/resource/knowledge/chat/best-practice/common/avchatroom-message-loss-diagnosis.md +65 -0
  34. package/resource/knowledge/chat/best-practice/common/group-conversation-cleanup-on-system-notice.md +62 -0
  35. package/resource/knowledge/chat/best-practice/common/image-message-url-lifecycle.md +59 -0
  36. package/resource/knowledge/chat/best-practice/common/login-repeat-2025-diagnosis.md +61 -0
  37. package/resource/knowledge/chat/best-practice/common/message-read-report-and-receipt.md +64 -0
  38. package/resource/knowledge/chat/best-practice/common/message-receive-event.md +65 -0
  39. package/resource/knowledge/chat/best-practice/common/message-risk-error-and-render.md +65 -0
  40. package/resource/knowledge/chat/best-practice/common/message-unread-count.md +71 -0
  41. package/resource/knowledge/chat/best-practice/miniprogram/audio-message-send.md +113 -0
  42. package/resource/knowledge/chat/best-practice/miniprogram/login-timeout-2801-diagnosis.md +63 -0
  43. package/resource/knowledge/chat/best-practice/miniprogram/media-upload-fail-diagnosis.md +64 -0
  44. package/resource/knowledge/chat/best-practice/web/audio-message-send.md +118 -0
  45. package/resource/knowledge/chat/urls/sdk/web.md +1 -1
  46. package/resource/knowledge/livekit/best-practice/android/voice-room-anchor-start.md +120 -0
  47. package/resource/knowledge/livekit/best-practice/common/admin-take-seat.md +73 -0
  48. package/resource/knowledge/livekit/best-practice/common/audience-leave-live.md +81 -0
  49. package/resource/knowledge/livekit/best-practice/common/voice-room-no-audio-troubleshoot.md +100 -0
  50. package/resource/knowledge/livekit/best-practice/common/voice-room-seat-list-change.md +65 -0
  51. package/resource/knowledge/livekit/best-practice/flutter/voice-room-anchor-start.md +122 -0
  52. package/resource/knowledge/livekit/best-practice/ios/voice-room-anchor-start.md +126 -0
  53. package/resource/knowledge/roomkit/best-practice/common/room-ghost-member.md +70 -0
  54. package/resource/knowledge/roomkit/best-practice/common/room-limit-and-multi.md +83 -0
  55. package/resource/knowledge/roomkit/best-practice/common/room-screen-share-preview.md +83 -0
  56. package/resource/knowledge/roomkit/best-practice/common/room-status-after-all-leave.md +69 -0
  57. package/resource/knowledge/roomkit/best-practice/vue/room-uikit-vs-atomicx.md +111 -0
  58. package/resource/knowledge/rtcengine/web/plugin/30-advanced-cross-room-link.md +2 -0
  59. package/resource/knowledge/rtcengine/web/plugin/39-advanced-video-decoder.md +2 -0
  60. package/server.js +27 -22
  61. package/tools/common/finalize_answer.js +9 -1
  62. package/tools/common/search_trtc_knowledge.js +1 -1
  63. package/tools/definitions/finalize_answer_def.js +2 -2
  64. package/tools/definitions/integration-boundary.js +2 -1
  65. package/tools/definitions/search_trtc_knowledge_def.js +1 -1
  66. package/utils/report-cls-client.js +1 -1
  67. package/utils/report-es-client.js +1 -1
  68. package/cursor-setting.png +0 -0
  69. package/mcp-server-prompt.png +0 -0
  70. package/resource/knowledge/callkit/best-practice/web/callengine-invitation.md +0 -80
  71. package/resource/knowledge/callkit/best-practice/web/callengine-log-control.md +0 -24
  72. package/resource/knowledge/callkit/best-practice/web/callkit-call-vs-calls.md +0 -116
  73. package/resource/knowledge/callkit/preset/react/uikit-api-reference.md +0 -444
  74. package/resource/knowledge/callkit/preset/vue/uikit-api-reference.md +0 -464
  75. package/resource/knowledge/chat/best-practice/web/image-message-url-handling.md +0 -16
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: "TUIRoomKit Concurrent Room Limits and Multi-Room Support(TUIRoomKit / 并发房间 / 房间上限 / 同时进多个房间 / 单房间人数)"
3
+ product: room
4
+ frameworks: [react, vue, web, android, ios, flutter]
5
+ scope: platform_common
6
+ tags: [TUIRoomKit, concurrent rooms, room limit, joining multiple rooms, single room capacity, peak group count, TUIRoomTypeConference, useRoomState, multi-device login, mutual kick, conference, room management]
7
+ version_range: ">=2.0.0"
8
+ ---
9
+
10
+ # TUIRoomKit Concurrent Room Limits and Multi-Room Support
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - The number of concurrent rooms has an upper limit, determined by the **TUIRoomKit (multi-party audio/video) plan version + IM capabilities**.
15
+ - **A single client / single SDK instance cannot be in multiple conference rooms simultaneously**: for conference-type rooms, the per-device concurrent room limit is 1. Exceeding this causes the earliest joined room to be exited.
16
+ - **The same userId on multiple devices joining the same room results in mutual kick by default** (later entry kicks earlier entry). To have multi-device access to the same meeting, configure "multi-device login" according to your plan, or assign different userIds to different devices.
17
+
18
+ ## 2. Field / API Reference
19
+
20
+ | Field / Capability | Purpose | Notes |
21
+ |---|---|---|
22
+ | `TUIRoomTypeConference` | Conference-type room | Per-device concurrent room limit is 1 |
23
+ | `useRoomState` | Room state (Atomicx no-UI path) | Singleton; a user can only be in one room at a time |
24
+ | Room count limit | Room/group resource peak | Billed by natural month peak, not unlimited room creation |
25
+ | Single room capacity | Max participants per meeting | Hard limit by plan (20/50/200/300) |
26
+ | Multi-device login | Same userId on multiple devices | Only supported in higher-tier plans |
27
+
28
+ ## 3. Mechanism & Sequence
29
+
30
+ ### Concurrent Room Limit
31
+
32
+ After activating a TUIRoomKit (multi-party audio/video) plan, the number of concurrent meetings is constrained by **room count limit + single room capacity**:
33
+
34
+ | Capability Dimension | Trial | Basic Interactive | Advanced Interactive | Ultra-Large Room Interactive |
35
+ |---|---|---|---|---|
36
+ | **Room count limit** (billing metric) | Follows IM version | 100,000/month | 100,000/month | 100,000/month |
37
+ | **Single room participant capacity** | 20 | 50 | 200 | 300 (submit ticket for expansion) |
38
+
39
+ - Single room capacity is the hard upper limit on "max participants per meeting."
40
+ - Room count limit (peak group count) is the IM-side group/room resource peak included in the plan (billed by natural month peak), not "unlimited rooms at any moment."
41
+ - The actual number of simultaneous meetings also depends on IM plan, TRTC resources, and business architecture. Ultra-large rooms have an expansion channel.
42
+ - Multi-device login to meetings / same-platform multi-device login requires a higher-tier plan.
43
+
44
+ ### Same User Joining Multiple Rooms
45
+
46
+ When a single client / single SDK instance calls `joinRoom` to enter a new room while already in a conference-type room, the earliest joined room is exited (per-device concurrent room limit is 1).
47
+
48
+ ## 4. Standard Usage
49
+
50
+ When evaluating concurrent room requirements, follow these steps:
51
+
52
+ 1. Confirm your TUIRoomKit plan version and check the room count limit and single room capacity in the [Features & Billing Documentation](https://cloud.tencent.com/document/product/269/104946).
53
+ 2. Evaluate whether the per-meeting participant count exceeds the plan limit; submit a ticket for ultra-large room expansion.
54
+ 3. When the business needs to host multiple meetings simultaneously, evaluate whether the room count limit (peak group count) is sufficient, combined with IM plan and TRTC resources.
55
+ 4. When the business needs the same user on multiple devices in the same meeting, confirm the plan supports multi-device login; otherwise assign different userIds to different devices.
56
+
57
+ ## 5. Expected Results
58
+
59
+ - Concurrent meeting count is constrained by plan room count limit and single room capacity.
60
+ - When a single SDK instance joins multiple conference rooms, exceeding 1 causes the earliest joined room to be exited.
61
+ - The same userId on multiple devices joining the same room results in mutual kick (later kicks earlier).
62
+ - Multi-device access to the same meeting requires plan support for multi-device login, or assigning different userIds to different devices.
63
+
64
+ ## 6. Common Pitfalls
65
+
66
+ - Pitfall 1: Assuming room count limit (peak group count) means "unlimited rooms at any time" (billed by natural month peak, not unlimited concurrency).
67
+ - Pitfall 2: Assuming a single SDK instance can be in multiple conference rooms simultaneously (per-device limit is 1).
68
+ - Pitfall 3: Assuming the same userId on multiple devices can join the same room simultaneously (mutual kick by default).
69
+ - Pitfall 4: Ignoring plan version differences (multi-device login only supported in higher-tier plans).
70
+
71
+ ## 7. Problem Definition (retrieval hint)
72
+
73
+ Whether TUIRoomKit has an upper limit on the number of concurrent meetings, and whether a single user can join multiple rooms simultaneously.
74
+
75
+ ## 8. Alternative Queries (retrieval recall)
76
+
77
+ - What is the TUIRoomKit concurrent room limit?
78
+ - How many meetings can run simultaneously?
79
+ - Can the same user join two rooms at the same time?
80
+ - What is the maximum number of participants per room?
81
+ - Does TUIRoomKit support multi-device login?
82
+ - Will the same userId on multiple devices cause mutual kick?
83
+ - How to expand the meeting room capacity?
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: "TUIRoomKit Screen Sharing Local Preview and Avoiding Infinite Mirroring(TUIRoomKit / 屏幕共享 / 本地预览 / 无限套娃)"
3
+ product: room
4
+ frameworks: [react, vue, web]
5
+ scope: platform_common
6
+ tags: [TUIRoomKit, screen sharing, local preview, startScreenSharing, startScreenShare, full-screen sharing, infinite mirroring, infinite recursion, window sharing, external monitor, useDeviceState, view parameter]
7
+ version_range: ">=2.0.0"
8
+ ---
9
+
10
+ # TUIRoomKit Screen Sharing Local Preview and Avoiding Infinite Mirroring
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - The `view` parameter enables local display of the shared content: passing a valid `view` renders the shared screen in a local container (local preview); omitting it or passing `null` skips local preview rendering.
15
+ - Full-screen sharing with local preview causes "infinite mirroring/recursion": the local preview area is within the captured full screen/current page, so the preview image re-enters the capture, creating recursive mirroring.
16
+ - **Preferred solution: share a "window" instead of the full screen**, preventing the meeting page from being captured and causing recursion.
17
+ - **Note for sharing WPS**: typically you cannot capture the "slideshow window" independently (the slideshow window and editor window behave inconsistently in the capture list). In this case, have the user connect an **external monitor**: place the slideshow on the external screen, then share that monitor/corresponding window. The main meeting screen continues operating, and the preview is less likely to recurse.
18
+ - **Fallback solution**: when window sharing is not possible and no external monitor is available, make the local preview container as small as possible (shrink the `view` container) to significantly reduce the recursive mirroring impact; or do not pass `view` / pass `null` for local preview, using only a "sharing in progress" status indicator.
19
+
20
+ ## 2. Field / API Reference
21
+
22
+ | Field / Capability | Purpose | Notes |
23
+ |---|---|---|
24
+ | `view` | Local screen share preview container | Pass a valid DOM element or id to render local preview; pass `null` to skip |
25
+ | `startScreenSharing` | Screen sharing API | TRTC Web / Room screen sharing; `view` specifies local preview |
26
+ | `startScreenShare` | Underlying screen sharing | TRTC `startScreenShare`, consistent with Atomicx |
27
+ | `useDeviceState().startScreenShare` | Atomicx no-UI path | Screen sharing entry; local preview determined by preview view/container |
28
+
29
+ ## 3. Mechanism & Sequence
30
+
31
+ ### Local Preview
32
+
33
+ Call screen sharing API with a valid `view` -> local container renders the shared screen (local preview) -> omitting `view` or passing `null` skips local preview rendering.
34
+
35
+ ## 4. Standard Usage
36
+
37
+ ### Screen Sharing with Local Preview
38
+
39
+ ```javascript
40
+ // TRTC Web / Room screen sharing, view specifies local preview container (element or id)
41
+ startScreenShare({
42
+ view: 'local-preview-container', // 传入有效 view,本地渲染分享画面
43
+ // 传 null 则不渲染本地预览
44
+ });
45
+ ```
46
+
47
+ ### Avoiding Infinite Mirroring
48
+
49
+ ```javascript
50
+ // 方案 1:优先分享窗口而非整屏,从源头避免套娃
51
+ startScreenShare({ view: 'local-preview-container' }); // 选择窗口采集源
52
+
53
+ // 方案 2(兜底):无法分享窗口时,缩小本地预览容器或本地不传 view
54
+ startScreenShare({ view: null }); // 不渲染本地预览,仅用"正在共享"状态提示
55
+ ```
56
+
57
+ ## 5. Expected Results
58
+
59
+ - Passing a valid `view`: local container renders the shared screen, enabling local preview.
60
+ - Omitting / passing `null`: no local preview rendering; only remote participants see the shared screen.
61
+ - Full-screen sharing + local preview: may cause infinite mirroring; switch to window sharing or shrink the preview.
62
+ - Sharing WPS slideshow: use the external monitor approach to avoid mirroring.
63
+
64
+ ## 6. Common Pitfalls
65
+
66
+ - Pitfall 1: Assuming `view` is a remote rendering parameter (`view` specifies the local screen share preview).
67
+ - Pitfall 2: Giving up local preview entirely because full-screen sharing causes mirroring (switch to window sharing or shrink the preview instead).
68
+ - Pitfall 3: Assuming you can capture the WPS slideshow window independently (typically not possible; use an external monitor).
69
+ - Pitfall 4: Confusing `startScreenSharing` with `startScreenShare` (they are consistent at the underlying level; both use `view` for local preview).
70
+
71
+ ## 7. Problem Definition (retrieval hint)
72
+
73
+ Whether the `view` parameter in TUIRoomKit screen sharing enables local preview of the shared content, and how to avoid infinite mirroring/recursion when sharing the full screen with local preview enabled.
74
+
75
+ ## 8. Alternative Queries (retrieval recall)
76
+
77
+ - Can screen sharing show a local preview?
78
+ - What is the TUIRoomKit screen sharing startScreenShare view parameter?
79
+ - How to avoid infinite mirroring when sharing full screen?
80
+ - What to do about recursive mirroring in screen sharing?
81
+ - Is it better to share a window or the full screen?
82
+ - How to shrink the local preview window?
83
+ - How to hide local preview for screen sharing?
@@ -0,0 +1,69 @@
1
+ ---
2
+ title: "TUIRoomKit Room Status and Billing After All Members Leave(TUIRoomKit / 所有人离开 / 房间销毁 / 回收房间 / 解散房间)"
3
+ product: room
4
+ frameworks: [react, vue, web, android, ios, flutter]
5
+ scope: platform_common
6
+ tags: [TUIRoomKit, all members leave, room destruction, room reclaim, dismiss room, billing, meeting end, room existence, room count]
7
+ version_range: ">=2.0.0"
8
+ ---
9
+
10
+ # TUIRoomKit Room Status and Billing After All Members Leave
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - A room is **not** automatically destroyed immediately when "all members leave."
15
+ - After a meeting ends, the business side should **proactively call the dismiss room API** to end the meeting.
16
+ - If not manually dismissed: the backend attempts to reclaim the room **6 hours after** the meeting end time, provided the **member count is 0**.
17
+ - Billing is based on actual push/pull stream and call consumption. After all members leave and there is no media usage, audio/video duration charges generally stop; however, the room object still occupies room count quota until dismissed or reclaimed.
18
+
19
+ ## 2. Field / API Reference
20
+
21
+ | Field / Capability | Purpose | Notes |
22
+ |---|---|---|
23
+ | Dismiss room API | Proactively end a meeting | Business side calls after meeting ends |
24
+ | Backend reclaim | Automatic room cleanup | Attempted 6 hours after meeting end; condition: member count is 0 |
25
+ | Room member count | Room member statistics | Reclaim condition: member count is 0 |
26
+ | Audio/video duration billing | Call consumption billing | Billed by actual push/pull stream and call consumption |
27
+ | Room count occupation | Room object occupation | Still occupies room count quota until dismissed or reclaimed |
28
+
29
+ ## 3. Mechanism & Sequence
30
+
31
+ All members leave room -> Room is not destroyed immediately -> Business side proactively calls dismiss room API (recommended), or waits for backend automatic reclaim -> Backend attempts reclaim 6 hours after meeting end (condition: member count is 0) -> Room is reclaimed.
32
+
33
+ Billing dimensions:
34
+
35
+ - Audio/video duration is billed by actual push/pull stream and call consumption.
36
+ - After all members leave and there is no media usage, audio/video duration charges for that room generally stop.
37
+ - The room object still occupies room count quota until dismissed or reclaimed.
38
+
39
+ ## 4. Standard Usage
40
+
41
+ 1. After the meeting ends, the business side proactively calls the dismiss room API to end the meeting, avoiding lingering rooms.
42
+ 2. If manual dismissal is forgotten, the backend automatically reclaims the room after 6 hours (when member count is 0).
43
+ 3. When evaluating room count occupation, note that undismissed and unreclaimed room objects still consume quota.
44
+
45
+ ## 5. Expected Results
46
+
47
+ - After proactive dismissal, the room ends immediately.
48
+ - Without proactive dismissal, the backend reclaims the room 6 hours after meeting end when member count is 0.
49
+ - After all members leave and there is no media usage, audio/video duration charges stop.
50
+ - Undismissed and unreclaimed room objects still occupy room count quota.
51
+
52
+ ## 6. Common Pitfalls
53
+
54
+ - Pitfall 1: Assuming rooms are automatically destroyed after all members leave (requires proactive dismissal or waiting 6 hours for backend reclaim).
55
+ - Pitfall 2: Assuming undismissed rooms incur no cost (room objects still occupy room count quota, potentially affecting concurrent capacity).
56
+ - Pitfall 3: Neglecting proactive dismissal by the business side (recommended to call the dismiss API rather than relying on backend reclaim).
57
+
58
+ ## 7. Problem Definition (retrieval hint)
59
+
60
+ Whether a TUIRoomKit room still exists after all members leave, whether billing continues, and how to proactively dismiss a room.
61
+
62
+ ## 8. Alternative Queries (retrieval recall)
63
+
64
+ - Does the room auto-destroy after everyone leaves?
65
+ - Does an empty TUIRoomKit room still incur charges?
66
+ - How to dismiss a room after a meeting ends?
67
+ - How long does room reclaim take?
68
+ - What happens when room member count is 0?
69
+ - Does the room object still occupy room count quota?
@@ -0,0 +1,111 @@
1
+ ---
2
+ title: "Comparison of tuikit-atomicx-vue3/room vs roomkit-web-vue3(roomkit-web-vue3 vs tuikit-atomicx-vue3/room 的区别)"
3
+ product: room
4
+ frameworks: [vue, web]
5
+ scope: platform_specific
6
+ tags: [TUIRoomKit, Atomicx, UIKit, tuikit-atomicx-vue3, roomkit-web-vue3, useRoomState, conference, layer comparison, no-UI, pre-built UI, custom integration, dependency, vue3]
7
+ version_range: ">=2.0.0"
8
+ ---
9
+
10
+ # Comparison of tuikit-atomicx-vue3/room vs roomkit-web-vue3
11
+
12
+ ## 1. Key Takeaways
13
+
14
+ - `tuikit-atomicx-vue3/room` (Atomicx) is the **atomic capability layer**: the primary path for no-UI / highly customized integration, decomposing room, device, and member states into reactive State Hooks.
15
+ - `@tencentcloud/roomkit-web-vue3` (RoomKit / UIKit) is the **pre-built UI low-code layer**: an out-of-the-box meeting suite with page-level components.
16
+ - Dependency: **RoomKit (pre-built UI) is a productized wrapper built on top of Atomicx/Room capabilities**. From a business perspective, RoomKit reuses/interfaces with Atomicx capabilities rather than being two independent room protocols.
17
+ - API entry points: Atomicx uses `useRoomState()`, UIKit uses `conference`.
18
+
19
+ ## 2. Field / API Reference
20
+
21
+ | Field / Capability | Purpose | Notes |
22
+ |---|---|---|
23
+ | `useRoomState` | Atomicx room state entry | `createAndJoinRoom` / `joinRoom` / `leaveRoom` / `endRoom` / `currentRoom` |
24
+ | `useDeviceState` | Atomicx device state | Device toggles, screen sharing, etc. |
25
+ | `useRoomParticipantState` | Atomicx participant state | Member management, event subscriptions |
26
+ | `useLoginState` | Atomicx login state | Login capability, reusable within UIKit sessions |
27
+ | `conference` | UIKit meeting facade API | Recommended: `createAndJoinRoom` / `joinRoom` / `leaveRoom` / `endRoom` |
28
+ | `ConferenceMainView` | UIKit pre-built view | Complete meeting UI: login, join room, meeting controls, layout, seat management |
29
+
30
+ ## 3. Mechanism & Sequence
31
+
32
+ ### Layer Comparison
33
+
34
+ | Comparison | `tuikit-atomicx-vue3/room` (Atomicx) | `@tencentcloud/roomkit-web-vue3` (RoomKit / UIKit) |
35
+ |---|---|---|
36
+ | **Layer** | Atomicx (atomic capability layer): State Hooks + optional atomic UI components | UIKit / pre-built UI low-code layer: out-of-the-box meeting suite with page-level components |
37
+ | **Package positioning** | No-UI / highly customized integration path; decomposes room, device, and member into reactive State | Pre-built UI rapid integration path; provides complete meeting UI and `conference` facade API |
38
+ | **Core capabilities** | `useRoomState` / `useDeviceState` / `useRoomParticipantState` / `useLoginState`: create room, join meeting, device control, screen sharing, member management, event subscription; compose your own UI | `conference` + pre-built views (e.g. `ConferenceMainView`): login, join room, meeting controls, layout, seat management; supports selective component visibility / custom Widgets |
39
+ | **Use cases** | Embedding audio/video into your own business UI (telemedicine, OA, education dashboards, etc.) with 100% control over interaction and branding | Fastest path to launch a standard meeting/webinar with minimal UI coding, accepting the official meeting interaction |
40
+ | **Dependency** | Built on RoomEngine / TRTC / IM; an atomic integration approach | Pre-built UI reuses/interfaces with Atomicx capabilities (e.g. login uses `useLoginState`, in-meeting logic uses Room capabilities); RoomKit (pre-built UI) is a productized wrapper on top of Atomicx/Room |
41
+ | **API entry** | `useRoomState()`: `createAndJoinRoom` / `joinRoom` / `leaveRoom` / `endRoom`, `currentRoom`, event subscriptions, etc. | `conference`: recommended `createAndJoinRoom` / `joinRoom` / `leaveRoom` / `endRoom` |
42
+ | **UI form** | Optional pre-built atomic components + primarily self-composed custom modules | Primarily pre-built complete meeting UI, with limited customization via Widget / visibility configuration |
43
+
44
+ ## 4. Standard Usage
45
+
46
+ ### Atomicx Approach (no-UI, custom integration)
47
+
48
+ ```javascript
49
+ import { useRoomState } from 'tuikit-atomicx-vue3/room';
50
+
51
+ const { createAndJoinRoom } = useRoomState();
52
+
53
+ createAndJoinRoom({
54
+ roomId: 'YOUR_ROOM_ID', // 必填:建议由业务后台生成的唯一标识
55
+ options: {
56
+ roomName: '项目进度周会',
57
+ },
58
+ });
59
+ // 通过 useDeviceState / useRoomParticipantState 等获取响应式状态自拼 UI
60
+ ```
61
+
62
+ ### UIKit Approach (pre-built UI, rapid integration)
63
+
64
+ ```javascript
65
+ import { conference, ConferenceMainView, ConferenceMainViewH5, RoomEvent, genTestUserSig } from '@tencentcloud/roomkit-web-vue3';
66
+ const SDKAppID = 0; // 替换为您在开通服务阶段获取的 SDKAppID
67
+ const SDKSecretKey = ''; // 替换为您在开通服务阶段获取的 SDKSecretKey
68
+ const handleEnterRoom = async () => {
69
+ if (!SDKAppID || !SDKSecretKey) {
70
+ return;
71
+ }
72
+ try {
73
+ const { userSig } = genTestUserSig({ userId: 'test01', sdkAppId: SDKAppID, secretKey: SDKSecretKey });
74
+ await conference.login({ sdkAppId: SDKAppID, userId: 'test01', userSig });
75
+ await conference.setSelfInfo({ userName: 'test', avatarUrl: '' });
76
+ await conference.createAndJoinRoom({ roomId: '123456', options: { roomName: `test01 的会议` } });
77
+ inRoom.value = true;
78
+ } catch (error) {
79
+ console.error('进入会议失败:', error);
80
+ }
81
+ };
82
+ // 使用预制 ConferenceMainView 渲染完整会议 UI
83
+ ```
84
+
85
+ ## 5. Expected Results
86
+
87
+ - No-UI / highly customized needs: choose Atomicx, use `useRoomState()` + State Hooks to compose your own UI.
88
+ - Fastest path to a standard meeting: choose UIKit, use `conference` + `ConferenceMainView`.
89
+ - Dependency: UIKit reuses Atomicx capabilities; they are not two independent protocols.
90
+ - API entry: Atomicx uses `useRoomState()`, UIKit uses `conference`.
91
+
92
+ ## 6. Common Pitfalls
93
+
94
+ - Pitfall 1: Assuming Atomicx and UIKit are two independent room protocols (UIKit is built on top of Atomicx/Room capabilities).
95
+ - Pitfall 2: Assuming Atomicx includes a complete meeting UI (Atomicx provides State Hooks + optional atomic components; UI must be self-composed).
96
+ - Pitfall 3: Assuming UIKit cannot be customized (it supports selective component visibility / custom Widgets).
97
+ - Pitfall 4: Confusing the API entry points of the two approaches (Atomicx uses `useRoomState()`, UIKit uses `conference`).
98
+
99
+ ## 7. Problem Definition (retrieval hint)
100
+
101
+ Comparing the positioning differences between two TUIRoomKit Vue3 integration approaches: `tuikit-atomicx-vue3/room` (Atomicx Core SDK, no-UI, State Hooks self-composed) vs `@tencentcloud/roomkit-web-vue3` (RoomKit UIKit, pre-built UI, conference low-code) in terms of layer, capabilities, use cases, dependency, and API entry (useRoomState vs conference).
102
+
103
+ ## 8. Alternative Queries (retrieval recall)
104
+
105
+ - What is the difference between Atomicx and RoomKit?
106
+ - How to choose between `tuikit-atomicx-vue3/room` and `roomkit-web-vue3`?
107
+ - How to choose between TUIRoomKit no-UI and pre-built UI approaches?
108
+ - What is the difference between `useRoomState` and `conference`?
109
+ - Is RoomKit based on Atomicx?
110
+ - Which package for custom meeting room UI?
111
+ - Use Atomicx or UIKit for rapid meeting integration?
@@ -8,6 +8,8 @@ Cross-room connections support two modes:
8
8
  - **Room-level connection**: Connect with all anchors in the target room.
9
9
  - **User-level connection**: Connect with a specific anchor in the target room.
10
10
 
11
+ > **Note**: Room-level and user-level connections cannot be used simultaneously.
12
+
11
13
  ## How It Works
12
14
 
13
15
  - **Room-level connection**: Push the audio and video streams of all anchors in the current room to the target room, and push the audio and video streams of all anchors in the target room to the current room.
@@ -6,6 +6,8 @@ This document introduces how to use the TRTCVideoDecoder plugin to enable video
6
6
 
7
7
  - TRTC Web SDK version >= 5.9.0
8
8
 
9
+ - Browser version: Chrome 141+, Edge 141+, and other Chromium-based browsers 141+ (Safari and Firefox are not supported)
10
+
9
11
  ## Implementation Steps
10
12
 
11
13
  ### Deploy Static Resources
package/server.js CHANGED
@@ -3,40 +3,45 @@ import { registryTools } from './tools/index.js';
3
3
  const SERVER_INSTRUCTIONS = `
4
4
  You are using Tencent RTC MCP Server for SDK documentation retrieval.
5
5
 
6
- - search_trtc_knowledge: Primary tool for searching Tencent RTC / Chat(IM) / Push(TIMPush) product documentation.
6
+ - search_trtc_knowledge: Primary tool for searching Tencent RTC / Chat (IM) / Push (TIMPush) documentation.
7
7
  Covers: Chat UIKit, CallKit, LiveKit, RoomKit, TRTC Native SDK, WebRTC/rtcEngine, TIMPush.
8
- Use this tool FIRST for all technical documentation / FAQ / error code / integration guide lookups.
9
- Do NOT use web_search for questions that can be answered via this knowledge base.
8
+ Use this tool FIRST for technical docs / FAQ / error codes / integration guide lookups.
9
+ Do NOT use web_search for questions answerable by this knowledge base.
10
10
 
11
- **Product routing(调用 search_trtc_knowledge 前 MUST 推断 product 数组)**:
12
- - TIMPush / 推送 / 厂商通道 / FCM / APNs / 华为 / 小米 / OPPO / vivo → product=["push"](独立产品,禁止误归 chat)
13
- - 会话 / TUIKit / ChatKit / IM 组件 / 主题定制 → ["chat"]
14
- - CallKit / 通话 → ["call"];直播 / 语聊房 / LiveKit → ["live"];RoomKit / 会议 → ["room"]
15
- - TRTC Web SDK / rtcengine / WebRTC 插件 → ["rtcengine"]
16
- - TRTCCloud / Native SDK(客户端)→ ["native_trtc_sdk"]
17
- - 推送 + IM 同时涉及 → 可传 ["push","chat"]
18
- - 无法从 prompt 唯一判断 product → 先向用户确认,不要无 product 硬搜,也不要 web_search
11
+ **Product routing (MUST infer product[] before calling search_trtc_knowledge):**
12
+ - TIMPush / push / vendor channel / FCM / APNs / Huawei / Xiaomi / OPPO / vivo -> product=["push"] (independent product; do not misroute to chat)
13
+ - conversation / TUIKit / ChatKit / Chat component / theme customization -> ["chat"]
14
+ - CallKit / call -> ["call"]; live streaming / voice room / LiveKit -> ["live"]; RoomKit / conference -> ["room"]
15
+ - TRTC Web SDK / rtcengine / WebRTC plugin -> ["rtcengine"]
16
+ - TRTCCloud / Native SDK (client side) -> ["native_trtc_sdk"]
17
+ - If both push and Chat are involved -> ["push","chat"]
18
+ - If product cannot be uniquely inferred from prompt -> ask user to clarify first; do NOT hard-search with empty product; do NOT use web_search.
19
19
 
20
- **Frameworks**:返回 needs_framework 时 MUST 先 present_framework_choice;详见 search_trtc_knowledge 工具 description 决策表。
21
- **When in doubt**:仍优先调用 search_trtc_knowledge(带最佳猜测 product);status=empty 或 low_confidence 时再澄清或重搜。
20
+ **Frameworks:** If status=needs_framework, MUST call present_framework_choice first. See search_trtc_knowledge tool description decision table.
21
+ **When in doubt:** still prefer search_trtc_knowledge with best-guess product; if status is empty or low_confidence, then clarify or retry.
22
22
 
23
- **queryID 传递规则(硬规则,违反会导致 CLS 数据断裂)**:
24
- - 首次调用 search_trtc_knowledge:无需传 queryID(默认空串),响应 JSON 中会有 server 生成的 queryID 字段
25
- - 后续每一次 search_trtc_knowledge / finalize_answer / submit_feedback 调用:**MUST** 携带首次响应中的 queryID
26
- - 不传 queryID = 视为全新咨询(CLS 数据无法串联)
27
- - 多 sub-question 迭代搜索时,每次都要带相同的 queryID
23
+ **queryID passing rules (hard rule; violation breaks CLS trace continuity):**
24
+ - First search_trtc_knowledge call: no queryID required (defaults to empty); response JSON will include server-generated queryID.
25
+ - Every subsequent call to search_trtc_knowledge / finalize_answer / submit_feedback: MUST carry the first returned queryID.
26
+ - Missing queryID means a brand-new consultation (CLS data cannot be linked).
27
+ - For multi-sub-question iterative searches, always reuse the same queryID.
28
28
 
29
29
  Workflow:
30
30
  1. Call search_trtc_knowledge. Reuse the same queryID for all retries/searches in this consultation.
31
31
  2. Draft the final answer from fragments. Include References from meta.references/doc_urls when available.
32
- 3. MUST call finalize_answer with the same prompt + queryID before replying.
33
- 4. Reply with: answer + finalize_answer follow-up text.
34
- 5. After finalize_answer follow-up, check the next user reply before any normal response. If it means Yes/已解决/thanks/OK, MUST call submit_feedback(resolved="1") before replying. If it means No/未解决/still not working, MUST call submit_feedback(resolved="0") before replying. Never say feedback was submitted unless submit_feedback was called.
32
+ 3. MUST call finalize_answer with the same prompt + queryID before replying (pass an audit digest in "answer", not necessarily full long-form text).
33
+ 4. Reply with: full user-visible answer + finalize_answer follow-up text.
34
+ 5. After finalize_answer follow-up, inspect the next user reply before any normal response. If it means Yes/resolved/thanks/OK, MUST call submit_feedback(resolved="1") before replying. If it means No/unresolved/still not working, MUST call submit_feedback(resolved="0") before replying. Never claim feedback was submitted unless submit_feedback was actually called.
35
+
36
+ User-visible output rules (MUST):
37
+ - Internal routing/tool decisions are NEVER user-facing text.
38
+ - Before calling any tool, do NOT output prefacing planning text such as “should call... / call ... first / let me search first / this is a consultation task / not codegen”.
39
+ - If a tool call is needed, call it directly and then provide user-visible results only.
35
40
  `.trim();
36
41
  export function createServer() {
37
42
  const server = new McpServer({
38
43
  name: "Tencent RTC MCP Server",
39
- version: "1.6.8",
44
+ version: "1.7.0",
40
45
  }, {
41
46
  instructions: SERVER_INSTRUCTIONS,
42
47
  });
@@ -1,6 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  import { FINALIZE_ANSWER_DEFINITION, FOLLOWUP_QUESTION } from '../definitions/finalize_answer_def.js';
3
3
  import { reportCLSClient } from '../../utils/report-cls-client.js';
4
+ const MAX_RECORDED_ANSWER_CHARS = 12000;
5
+ function sanitizeAnswerForRecord(answer) {
6
+ if (answer.length <= MAX_RECORDED_ANSWER_CHARS)
7
+ return answer;
8
+ const head = answer.slice(0, 9000);
9
+ const tail = answer.slice(-2500);
10
+ return `${head}\n\n[...truncated_for_record:${answer.length - (9000 + 2500)} chars omitted...]\n\n${tail}`;
11
+ }
4
12
  const registryFinalizeAnswerTool = (mcpServer) => {
5
13
  const { name, description, parameter_descriptions } = FINALIZE_ANSWER_DEFINITION;
6
14
  mcpServer.registerTool(name, {
@@ -16,7 +24,7 @@ const registryFinalizeAnswerTool = (mcpServer) => {
16
24
  reportCLSClient({
17
25
  method: 'record_answer',
18
26
  queryID: params.queryID,
19
- answer: params.answer,
27
+ answer: sanitizeAnswerForRecord(params.answer),
20
28
  prompt: params.prompt,
21
29
  product: params.product ? params.product.join(',') : '',
22
30
  framework: params.framework ?? '',
@@ -10,7 +10,7 @@ const registrySearchTRTCKnowledgeTool = (mcpServer) => {
10
10
  inputSchema: {
11
11
  prompt: z.string().describe(parameter_descriptions.prompt),
12
12
  product: z.array(z.enum(['chat', 'call', 'live', 'room', 'push', 'rtcengine', 'native_trtc_sdk'])).min(1).max(4).optional().describe(parameter_descriptions.product),
13
- frameworks: z.array(z.enum(['react', 'vue', 'web', 'miniprogram', 'android', 'ios', 'flutter', 'c++', 'uni-app', 'harmonyos', 'react-native', 'unity', 'unreal-engine', 'donut'])).min(1).optional().describe(parameter_descriptions.frameworks),
13
+ frameworks: z.array(z.enum(['react', 'vue', 'web', 'miniprogram', 'android', 'ios', 'flutter', 'c++', 'uni-app', 'harmonyos', 'react-native', 'unity', 'unreal-engine', 'donut'])).default([]).describe(parameter_descriptions.frameworks),
14
14
  queryID: z.string().describe(parameter_descriptions.queryID),
15
15
  ide: z.string().describe(parameter_descriptions.ide),
16
16
  types: z.array(z.enum([
@@ -9,7 +9,7 @@ When to call:
9
9
 
10
10
  Input:
11
11
  - prompt: Original user question. Must match the search_trtc_knowledge prompt.
12
- - answer: Complete final answer text, excluding the follow-up text. Do not summarize or truncate.
12
+ - answer: Final-answer digest for telemetry/audit (not necessarily full user-visible text). Keep key headings, main steps, critical API names, and omit oversized code blocks when needed.
13
13
  - queryID: REQUIRED. Must match the non-empty queryID returned by search_trtc_knowledge.
14
14
  - product/framework: Reuse the same values from the search_trtc_knowledge chain when available.
15
15
 
@@ -19,7 +19,7 @@ Returns:
19
19
  `;
20
20
  const PARAMETER_DESCRIPTIONS = {
21
21
  prompt: 'Original user question. Must match search_trtc_knowledge.',
22
- answer: 'Complete final answer text, excluding the follow-up text. Do not summarize or truncate.',
22
+ answer: 'Final-answer digest for telemetry/audit. Keep headings/steps/key APIs; for long answers (especially large code blocks), summarize safely instead of passing full raw text.',
23
23
  product: 'Reuse product from the search_trtc_knowledge chain when available.',
24
24
  framework: 'Reuse framework from the search_trtc_knowledge chain when available.',
25
25
  queryID: 'REQUIRED. Non-empty queryID returned by search_trtc_knowledge.',
@@ -2,4 +2,5 @@
2
2
  export const INTEGRATION_BOUNDARY_SUFFIX = `
3
3
  - **Codegen only**: Call this tool only when the user explicitly wants integration code added into a project, wants you to implement the integration, or wants generated starter code.
4
4
  - **Consultation / lookup only** (how it works, what it is, setup steps, troubleshooting, API or component explanations) -> call \`search_trtc_knowledge\`, not this tool.
5
- - This tool belongs to the codegen flow: after answering, do **not** call \`finalize_answer\` or \`submit_feedback\` (those belong only to the \`search_trtc_knowledge\` flow).`;
5
+ - This tool belongs to the codegen flow: after answering, do **not** call \`finalize_answer\` or \`submit_feedback\` (those belong only to the \`search_trtc_knowledge\` flow).
6
+ - **User-visible output rule (MUST)**: routing/tool choices above are internal only. Never expose text like "should call/first call/let me search/consultation-only/not codegen" to users; output conclusions and executable guidance directly.`;
@@ -26,7 +26,7 @@ if types include api / component / feature / plugin / sdk / integration -> frame
26
26
  const PARAMETER_DESCRIPTIONS = {
27
27
  prompt: "The user's original question in full. Keep the full context. Do not compress it into keywords or a short summary.",
28
28
  product: 'Product array: chat | call | live | room | push | rtcengine | native_trtc_sdk. If inferable, MUST pass it. Push takes priority for TIMPush / push topics and must not be misrouted to chat. Common live keywords: LiveKit / live streaming / voice room / TUILiveKit / AtomicXCore / host streaming / watch live. If uncertain, ask the user first.',
29
- frameworks: 'Platform array: react | vue | web | miniprogram | android | ios | flutter | c++ | uni-app | harmonyos | react-native | unity | unreal-engine | donut. Multiple platforms can be passed for cross-platform lookup. For CallKit, TUICallKit is best searched separately by react/vue, while TUICallEngine/TUICallEvent still map to web; use miniprogram for Mini Program. harmonyos / react-native / unity / unreal-engine / donut are only valid for push.',
29
+ frameworks: 'Platform array: react | vue | web | miniprogram | android | ios | flutter | c++ | uni-app | harmonyos | react-native | unity | unreal-engine | donut. Multiple platforms can be passed for cross-platform lookup. For CallKit, TUICallKit is best searched separately by react/vue, while TUICallEngine/TUICallEvent still map to web; use miniprogram for Mini Program. harmonyos / react-native / unity / unreal-engine / donut are only valid for push. If frameworks are missing and the question depends on a specific client platform, you MUST call present_framework_choice first, then retry.',
30
30
  types: 'Usually omit. Allowed values: integration | component | feature | api | plugin | sdk | faq | error_code | product | server_api | webhook. component and feature are equivalent (match both). Discovery/listing questions ("what components are available") MUST omit types. Console/billing/product-capability config -> product (not feature). Do not proactively over-narrow.',
31
31
  scenario: 'live | voice. Only valid for the live product.',
32
32
  queryID: "First call: ''. Follow-up calls in the same consultation MUST pass through the original queryID returned by the server.",
@@ -28,7 +28,7 @@ function sendCLSReport(reportData) {
28
28
  const time = Date.now();
29
29
  const data = {
30
30
  platform: 'mcp',
31
- verison: '1.6.8',
31
+ verison: '1.7.0',
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.6.8',
10
+ version: '1.7.0',
11
11
  sdkappid: `${SDKAppID}`,
12
12
  method: method,
13
13
  userID: `${userID}`,
Binary file
Binary file
@@ -1,80 +0,0 @@
1
- ---
2
- product: 'Call'
3
- tech_stack: 'callengine'
4
- framework: 'web'
5
- doc_kind: 'best_practice'
6
- title: 'TUICallEngine call invitation handling and signaling (Web)'
7
- keywords: ['ON_CALL_RECEIVED', 'call invitation', '@trtc/call-engine-lite-js', 'TUICallEngine.calls', 'userData', 'callMediaType', 'accept', 'reject', 'TIM.EVENT.MESSAGE_RECEIVED', 'custom signaling message']
8
- ---
9
-
10
- # TUICallEngine Web: call invitation reception and signaling notes
11
-
12
- Applicable package: **`@trtc/call-engine-lite-js`** (TUICallEngine Web SDK).
13
-
14
- ## 1) How do I receive an incoming call invitation?
15
-
16
- **At the application layer, listen to `TUICallEvent.ON_CALL_RECEIVED` instead of parsing TRTC signaling or IM custom messages yourself.**
17
-
18
- ```javascript
19
- import { TUICallEngine, TUICallEvent } from '@trtc/call-engine-lite-js';
20
-
21
- const tuiCallEngine = TUICallEngine.createInstance({ SDKAppID: xxx, tim: timInstance });
22
- await tuiCallEngine.login({ userID, userSig });
23
-
24
- tuiCallEngine.on(TUICallEvent.ON_CALL_RECEIVED, (event) => {
25
- console.log('Incoming call', event);
26
- // Show your incoming-call UI, then call accept() or reject()
27
- });
28
- ```
29
-
30
- ### `ON_CALL_RECEIVED` event fields
31
-
32
- | Field | Type | Description |
33
- |---------|---------|---------|
34
- | callerId | String | The inviter (caller) user ID. |
35
- | calleeIdList | Array<String> | Other invited users in the same invitation. |
36
- | isFromGroup | Boolean | Whether this invitation is from a group call. |
37
- | inviteData | Object | Invitation payload object. |
38
- | inviteID | String | Invitation ID for this invitation session. |
39
- | userData | String | Extension string passed through invitation signaling. |
40
- | callId | String | Unique call ID of this session. |
41
- | roomID | Number | Audio/video room ID used by this call. |
42
- | callMediaType | Number | Call media type (audio or video). |
43
- | callRole | String | Role enum (caller or callee). |
44
-
45
- ## 2) Which parameters are used when sending an invitation with `calls`?
46
-
47
- The caller starts an invitation via **`TUICallEngine.calls()`**:
48
-
49
- ```javascript
50
- await tuiCallEngine.calls({
51
- userIDList: ['user_bob'],
52
- type: 2, // 1 = audio, 2 = video (CallMediaType)
53
- userData: '{"ext":"info"}', // Optional string extension
54
- timeout: 30, // Seconds, default is 30
55
- roomID: 123456, // Numeric room ID, range [1, 2147483647]
56
- strRoomID: '', // String room ID
57
- chatGroupID: '', // Required for multi-user calls in a Chat group
58
- offlinePushInfo: { /* ... */ },
59
- });
60
- ```
61
-
62
- ## 3) In Chat-integrated audio/video calls, how do I interpret custom message fields for call status rendering?
63
-
64
- | **Question** | **Rule** |
65
- |---------|---------|
66
- | How to detect “call initiated” | `actionType = 1` and `cmd = 'videoCall'` or `'audioCall'` |
67
- | How to detect “call answered” | `actionType = 3` |
68
- | How to detect “call ended” and get call duration | `actionType = 1` and `cmd = 'hangup'`; read duration from `call_end` (seconds) |
69
- | How to detect “call canceled” | `actionType = 2` |
70
- | How to detect “call rejected” | `actionType = 4` |
71
- | How to detect “rejected due to callee busy” | `actionType = 4` and `cmd = 'line_busy'` |
72
- | How callee detects “timeout with no answer” | `actionType = 5` |
73
-
74
- ## 4) Best-practice summary
75
-
76
- 1. **Only** listen to `TUICallEvent.ON_CALL_RECEIVED`, then respond with `accept()` or `reject()`.
77
- 2. **Do not** parse call invitations from `TIM.EVENT.MESSAGE_RECEIVED` manually.
78
- 3. Use **`userData` (string)** for extension data: caller writes it, callee reads it from event payload.
79
- 4. **`businessID` and low-level payload format** are internal SDK details; do not invent undocumented structures.
80
- 5. In **`@trtc/call-engine-lite-js` 4.x+**, pass custom content via `userData`; there is **no `customData` field**.