@tencent-rtc/mcp 1.2.9 → 1.3.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 (54) hide show
  1. package/package.json +1 -1
  2. package/resource/doc/chatuikit/faq/common/server.md +44 -0
  3. package/resource/doc/chatuikit/faq/web_sdk/faq.md +57 -0
  4. package/resource/doc/livekit/vue/components/co-guest-panel.md +3 -3
  5. package/resource/doc/livekit/vue/components/live-view.md +4 -4
  6. package/resource/doc/livekit/vue/{components/live-list.md → live-list-integration.md} +7 -7
  7. package/resource/doc/livekit/vue/{components/live-player.md → live-player-desk-integration.md} +8 -8
  8. package/resource/doc/livekit/vue/live-player-h5-integration.md +269 -0
  9. package/resource/doc/livekit/vue/workflow.md +218 -0
  10. package/resource/doc/trtc/C++/ITRTCCloud.md +4119 -0
  11. package/resource/doc/trtc/C++/ITRTCStatistics.md +325 -0
  12. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +1289 -0
  13. package/resource/doc/trtc/C++/ITXDeviceManager.md +1028 -0
  14. package/resource/doc/trtc/C++/TRTCCloudCallback.md +2650 -0
  15. package/resource/doc/trtc/C++/TRTCTypeDef.md +3600 -0
  16. package/resource/doc/trtc/C++/TXLiteAVCode.md +921 -0
  17. package/resource/doc/trtc/android/TRTCCloud.md +3782 -0
  18. package/resource/doc/trtc/android/TRTCCloudDef.md +3880 -0
  19. package/resource/doc/trtc/android/TRTCCloudListener.md +2431 -0
  20. package/resource/doc/trtc/android/TRTCStatistics.md +295 -0
  21. package/resource/doc/trtc/android/TXAudioEffectManager.md +1289 -0
  22. package/resource/doc/trtc/android/TXBeautyManager.md +979 -0
  23. package/resource/doc/trtc/android/TXDeviceManager.md +440 -0
  24. package/resource/doc/trtc/android/TXLiteAVCode.md +905 -0
  25. package/resource/doc/trtc/iOS/TRTCCloud.md +4238 -0
  26. package/resource/doc/trtc/iOS/TRTCCloudDef.md +3730 -0
  27. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +2531 -0
  28. package/resource/doc/trtc/iOS/TRTCStatistics.md +295 -0
  29. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +1100 -0
  30. package/resource/doc/trtc/iOS/TXBeautyManager.md +985 -0
  31. package/resource/doc/trtc/iOS/TXDeviceManager.md +1024 -0
  32. package/resource/doc/trtc/iOS/TXLiteAVCode.md +928 -0
  33. package/tools/definitions/get_faq_def.js +4 -0
  34. package/tools/definitions/get_faq_def.js.map +1 -1
  35. package/tools/definitions/get_native_live_api_def.js +1 -1
  36. package/tools/definitions/get_trtc_native_api_def.js +16 -0
  37. package/tools/definitions/get_trtc_native_api_def.js.map +1 -0
  38. package/tools/definitions/get_web_live_uikit_component_detail_def.js +13 -8
  39. package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +1 -1
  40. package/tools/definitions/get_web_live_uikit_integration_def.js +32 -0
  41. package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -0
  42. package/tools/index.js +6 -2
  43. package/tools/index.js.map +1 -1
  44. package/tools/live/get-web-live-uikit-integration.js +52 -0
  45. package/tools/live/get-web-live-uikit-integration.js.map +1 -0
  46. package/tools/trtc/get-trtc-native-api.js +31 -0
  47. package/tools/trtc/get-trtc-native-api.js.map +1 -0
  48. package/utils/generate-structured-result.js +34 -0
  49. package/utils/generate-structured-result.js.map +1 -0
  50. package/utils/handle-component-name.js +0 -8
  51. package/utils/handle-component-name.js.map +1 -1
  52. package/utils/report-cls-client.js +1 -1
  53. package/utils/report-es-client.js +1 -1
  54. /package/resource/doc/livekit/vue/{components/broadcast.md → live-pusher-integration.md} +0 -0
@@ -0,0 +1,218 @@
1
+ # Web Live TUIKit Code Generation Workflow Instructions (Vue)
2
+
3
+ **【Instruction Purpose】**: Provide Agent with a **code generation blueprint** for implementing Vue Web Live TUIKit core functionalities, and guide Agent to **prioritize using the latest documentation content fetched in real-time via tools**.
4
+
5
+ **💡 Special Reminder:**
6
+ 1. **When user requirements include 【Live List】, 【Broadcaster Page】, and 【Viewer Page】, Agent MUST add a 【Host/Viewer Identity Selection】 page or logic in the generated code to allow users to test with different UserIDs**.
7
+ 2. **When users need to implement co-guest (mic connection) features, call** `get_web_live_state_detail` **to obtain liveKit client API for implementing related functions**.
8
+
9
+ ---
10
+
11
+ ## 📦 UIKit Version & Dependency Instructions
12
+
13
+ ### Recommended Versions
14
+ ```json
15
+ {
16
+ "tuikit-atomicx-vue3": "latest",
17
+ "@tencentcloud/uikit-base-component-vue3": "latest",
18
+ }
19
+ ```
20
+
21
+ ### Automatic Dependency Installation Workflow
22
+ After generating code, Agent **MUST automatically execute** the following steps:
23
+
24
+ 1. **Detect Dependency Completeness**: Check if `package.json` contains all required dependencies
25
+ 2. **Auto-install Dependencies**: Execute `npm install` or `pnpm install`
26
+ 3. **Verify Installation**: Confirm successful installation before prompting user to run the project
27
+
28
+ ### esbuild Issue Resolution
29
+ Add the following content to `package.json`. `resolutions` is compatible with `yarn`, `overrides` is compatible with `npm` and `pnpm`:
30
+ ```json
31
+ {
32
+ "resolutions": {
33
+ "esbuild": "npm:esbuild-wasm@latest"
34
+ },
35
+ "overrides": {
36
+ "esbuild": "npm:esbuild-wasm@latest"
37
+ }
38
+ }
39
+ ```
40
+
41
+ ---
42
+
43
+ ## 🔐 Automatic Test Credential Generation
44
+
45
+ ### UserSig Auto-fetch Workflow
46
+
47
+ Before generating code, Agent **MUST**:
48
+
49
+ 1. **Call `get_usersig` MCP tool** to automatically generate test account credentials
50
+ 2. **Generate Test UserIDs**:
51
+ - Broadcaster UserID: Format as live001 or host001
52
+ - Viewer UserID: Format as user001 or viewer001
53
+ 3. **Embed in Code**: Directly write the generated SDKAppID, userID (for both host and viewer), and userSig into the code's configuration section
54
+ 4. **Security Notice**: Clearly mark in code comments that these are test credentials; production environment MUST generate on backend
55
+
56
+ ---
57
+
58
+ ## ⚙️ Core Code Generation Workflow (LLM Action Guide)
59
+
60
+ Agent, this tool has **fetched in real-time** the latest documentation content corresponding to the user's required functionalities (Goals), and attached this content **below this instruction** (in the `llm_code_generation_instructions_md` field).
61
+
62
+ ### Strictly Execute Steps:
63
+
64
+ #### Step 0: Pre-preparation (Automated)
65
+ ```
66
+ a. Call get_usersig tool to generate test credentials
67
+ - Broadcaster userID: Use format `live001`
68
+ - Viewer userID: Use format `user001`
69
+
70
+ b. Check and prepare project environment
71
+ - Verify dependency versions in package.json
72
+ - Automatically add to dependencies if missing
73
+
74
+ c. Execute dependency installation
75
+ - Run npm install or pnpm install
76
+ - Wait for completion and check for errors
77
+ ```
78
+
79
+ #### Step 1: Select Functional Modules
80
+ Based on user's specific functional requirements, select corresponding instructions from the following function blocks.
81
+
82
+ #### Step 2: Use Real-time Documentation
83
+ **MUST prioritize and exclusively** use the real-time documentation content **provided in this tool's return results** (not external URLs) to generate Vue code snippets.
84
+
85
+ ---
86
+
87
+ ## 🎯 Feature Implementation Instructions
88
+
89
+ ### 1. Implement Live List Page (`liveList`)
90
+
91
+ **Target Component**: `liveList`
92
+
93
+ **Code Generation Instructions**:
94
+ - Generate Vue component structure, import `liveList`
95
+ - **Auto-inject Test Credentials**: Use auto-generated **viewer** `SDKAppID`, `userID`, `userSig` during component initialization
96
+ - **Core Logic**: Reference real-time documentation content in this tool's return results, extract latest API calls and example code
97
+
98
+ **Dependent Components**: `liveList`
99
+
100
+ **Post-generation Actions**:
101
+ ```bash
102
+ # Agent auto-executes
103
+ npm install # Install dependencies
104
+ npm run dev # Start dev server
105
+ ```
106
+
107
+ ---
108
+
109
+ ### 2. Implement PC Live Viewer Page (`livePlayer` & `barrage`)
110
+
111
+ **Target Components**: `livePlayer`, `barrage`
112
+
113
+ **Code Generation Instructions**:
114
+ - Generate viewer page based on real-time documentation examples
115
+ - **Auto-inject Test Credentials**: Configure **viewer** test account during player initialization
116
+ - **Core Logic**: Reference real-time documentation content in this tool's return results, MUST follow documentation steps to integrate `livePlayer` and `barrage` (bullet comments), and demonstrate how to monitor video stream status
117
+ - **Interaction Optimization**: Add loading states, error handling, reconnection mechanisms
118
+
119
+ **Dependent Components**: `livePlayer`, `barrage`
120
+
121
+ ---
122
+
123
+ ### 3. Implement H5 Live Viewer Page (`livePlayer` & `barrage`)
124
+
125
+ **Target Components**: `livePlayer`, `barrage`
126
+
127
+ **Code Generation Instructions**:
128
+ - Generate viewer page based on real-time documentation examples
129
+ - **Auto-inject Test Credentials**: Configure **viewer** test account during player initialization
130
+ - **Core Logic**: Reference real-time documentation content in this tool's return results, MUST follow documentation steps to integrate `livePlayer` and `barrage` (bullet comments), and demonstrate how to monitor video stream status
131
+ - **Interaction Optimization**: Add loading states, error handling, reconnection mechanisms
132
+
133
+ **Dependent Components**: `livePlayer`, `barrage`
134
+
135
+ ---
136
+
137
+ ### 4. Implement Live Broadcasting Page (`livePusher`)
138
+
139
+ **Target Component**: `livePusher`
140
+
141
+ **Code Generation Instructions**:
142
+ - Generate broadcasting page based on real-time documentation examples
143
+ - **Auto-inject Test Credentials**: Configure **broadcaster** test account during pusher initialization
144
+ - **Core Logic**: Reference real-time documentation content in this tool's return results, MUST include Vue logic to handle camera and microphone **permission requests and toggle controls**
145
+ - **Device Detection**: Auto-detect available camera and microphone devices
146
+ - **Error Handling**: Handle permission denial, device unavailability, and other exceptions
147
+
148
+ **Dependent Components**: `livePusher`
149
+
150
+ ---
151
+
152
+ ### 5. Implement Live Co-guest Feature (`CoGuestPanel`)
153
+
154
+ **Target Component**: `CoGuestPanel`
155
+
156
+ **Code Generation Instructions**:
157
+ - Generate complex components or logic modules for co-guest functionality based on real-time documentation examples
158
+ - **Auto-inject Test Credentials**: Configure test accounts separately for broadcaster and co-guest viewers
159
+ - **Core Logic**: Reference real-time documentation content in this tool's return results, code should demonstrate how to use `CoGuestPanel` to manage co-guest requests and coordinate pusher/player logic switching
160
+ - **State Management**: Handle state transitions for co-guest invitations, acceptance, rejection, disconnection, etc.
161
+ - **Multi-person Co-guest**: Support scenarios with multiple simultaneous co-guests
162
+
163
+ **Dependent Components**: `CoGuestPanel`, `livePusher`, `livePlayer`
164
+
165
+ ---
166
+
167
+ ## 🔄 Complete Automation Workflow Summary
168
+
169
+ ```mermaid
170
+ graph TD
171
+ A[Receive User Requirements] --> B[Call get_web_live_uikit_integration to Fetch Latest Docs]
172
+ B --> C[Check package.json Dependencies]
173
+ C --> D[Auto-add Missing Dependencies]
174
+ D --> E[Execute npm install]
175
+ E --> F[Generate Code Based on Real-time Docs]
176
+ F --> G[Call get_usersig to Generate Test Credentials]
177
+ G --> H[Inject Test Credentials into Code]
178
+ H --> I[Add Security Comments and Warnings]
179
+ I --> J[Start Dev Server]
180
+ J --> K[Output Test Info to User]
181
+ ```
182
+
183
+ ---
184
+
185
+ ## 📋 Agent Checklist
186
+
187
+ After completing code generation, Agent MUST confirm:
188
+
189
+ - [x] Called `get_usersig` to generate test credentials
190
+ - [x] Embedded credentials into code configuration section
191
+ - [x] Added security warning comments in code
192
+ - [x] Checked `package.json` dependency completeness
193
+ - [x] Auto-executed `npm install`
194
+ - [x] Verified successful dependency installation
195
+ - [x] Used real-time documentation content (not external URLs)
196
+ - [x] Added error handling and logging output
197
+ - [x] Provided test account information to user
198
+ - [x] Prompted user to run `npm run dev`
199
+
200
+ ---
201
+
202
+ ## 🚨 Security Warning (MUST be included in generated code comments)
203
+
204
+ ```javascript
205
+ /**
206
+ * ⚠️ Important Security Notice
207
+ *
208
+ * 1. The current userSig is a test credential auto-generated by development tools
209
+ * 2. userSig validity period is 7 days, regeneration required after expiration
210
+ * 3. ❌ Frontend generation of userSig is STRICTLY PROHIBITED in production
211
+ * 4. ✅ Before going live, userSig MUST be generated on backend services
212
+ * 5. Reference documentation: https://trtc.io/document/34385
213
+ *
214
+ * SDKAppID and secretKey retrieval locations:
215
+ * - Chat Application: https://console.trtc.io
216
+ * - TRTC Application: https://console.trtc.io
217
+ */
218
+ ```