@tencent-rtc/mcp 1.3.8 → 1.3.9
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/package.json +1 -1
- package/resource/doc/chatuikit/android/integration.md +499 -203
- package/resource/doc/chatuikit/android/workflow.md +713 -0
- package/resource/doc/chatuikit/flutter/integration.md +1 -1
- package/resource/doc/livekit/voice/android/voice-audience-list.md +334 -0
- package/resource/doc/livekit/voice/android/voice-audio-effect.md +380 -0
- package/resource/doc/livekit/voice/android/voice-barrage.md +565 -0
- package/resource/doc/livekit/voice/android/voice-co-guest-interaction.md +745 -0
- package/resource/doc/livekit/voice/android/voice-gift.md +822 -0
- package/resource/doc/livekit/voice/android/voice-host-interaction.md +703 -0
- package/resource/doc/livekit/voice/android/voice-integration.md +940 -0
- package/resource/doc/livekit/voice/android/voice-room-list.md +575 -0
- package/resource/doc/livekit/voice/flutter/voice-co-guest-interaction.md +675 -0
- package/resource/doc/livekit/voice/flutter/voice-integration.md +936 -0
- package/resource/doc/livekit/voice/ios/voice-audience-list.md +339 -0
- package/resource/doc/livekit/voice/ios/voice-audio-effect.md +370 -0
- package/resource/doc/livekit/voice/ios/voice-barrage.md +517 -0
- package/resource/doc/livekit/voice/ios/voice-co-guest-interaction.md +708 -0
- package/resource/doc/livekit/voice/ios/voice-gift.md +783 -0
- package/resource/doc/livekit/voice/ios/voice-host-interaction.md +770 -0
- package/resource/doc/livekit/voice/ios/voice-integration.md +898 -0
- package/resource/doc/livekit/voice/ios/voice-room-list.md +485 -0
- package/resource/doc/roomkit/vue/integration.md +179 -288
- package/resource/doc/roomkit/vue/workflow.md +499 -253
- package/resource/doc/tuicallkit/android/integration.md +539 -83
- package/resource/doc/tuicallkit/android/workflow.md +441 -0
- package/tools/common/present-scenario-choice.js +16 -0
- package/tools/common/present-scenario-choice.js.map +1 -0
- package/tools/definitions/get_native_call_uikit_integration_def.js +25 -9
- package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_chat_uikit_integration_def.js +36 -14
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_live_uikit_integration_def.js +55 -29
- package/tools/definitions/get_native_live_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_native_live_uikit_interaction_def.js +43 -54
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +1 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +52 -55
- package/tools/definitions/get_web_room_feature_detail_def.js.map +1 -1
- package/tools/definitions/get_web_room_uikit_integration_def.js +41 -25
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
- package/tools/definitions/present_scenario_choice_def.js +53 -0
- package/tools/definitions/present_scenario_choice_def.js.map +1 -0
- package/tools/definitions/record_prompt_def.js +26 -21
- package/tools/definitions/record_prompt_def.js.map +1 -1
- package/tools/definitions/record_result_def.js +20 -4
- package/tools/definitions/record_result_def.js.map +1 -1
- package/tools/index.js +2 -0
- package/tools/index.js.map +1 -1
- package/tools/live/get-native-live-uikit-integration.js +110 -34
- package/tools/live/get-native-live-uikit-integration.js.map +1 -1
- package/tools/live/get_native_live_uikit_interaction.js +128 -35
- package/tools/live/get_native_live_uikit_interaction.js.map +1 -1
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
# Android TUICallKit Audio/Video Call Application Code Generation Workflow Instructions
|
|
2
|
+
|
|
3
|
+
## 🌐 Language Requirements
|
|
4
|
+
|
|
5
|
+
**IMPORTANT**: All generated code, UI text, comments, and user interface elements **MUST be in English**. This includes:
|
|
6
|
+
- Variable names, method names, class names
|
|
7
|
+
- UI text (button labels, hints, error messages, etc.)
|
|
8
|
+
- Code comments and documentation
|
|
9
|
+
- Log messages and debug output
|
|
10
|
+
- User-facing strings and prompts
|
|
11
|
+
|
|
12
|
+
## 📋 Instruction Purpose
|
|
13
|
+
|
|
14
|
+
Provide Agent with a **code generation blueprint for implementing Android TUICallKit audio/video call core functionality**, and guide Agent to **prioritize using real-time latest documentation content obtained from tools**, specifically for Android audio/video call application scenarios.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🛑 Agent Execution Hard Constraints (Guardrails)
|
|
19
|
+
|
|
20
|
+
Agent must strictly follow these instructions when generating code:
|
|
21
|
+
|
|
22
|
+
### 0. 🚨 Core Principles (Highest Priority)
|
|
23
|
+
|
|
24
|
+
- ✅ Strictly generate code according to examples in integration documentation, do not modify arbitrarily
|
|
25
|
+
- ✅ Fully implement login, single-person call, and multi-person call functionality
|
|
26
|
+
- ✅ Use `get_usersig` tool to generate UserSig for test accounts
|
|
27
|
+
- ✅ Use source code method to import components (clone `tuicallkit-kt` and `atomic_x` from GitHub)
|
|
28
|
+
|
|
29
|
+
### 1. Documentation-Driven Integration
|
|
30
|
+
- Strictly follow the steps in `llm_code_generation_instructions_md` returned by tools
|
|
31
|
+
- Follow best practices and example code from integration documentation
|
|
32
|
+
|
|
33
|
+
### 2. Component Import Method
|
|
34
|
+
- **Source Code Import Method**: Clone code from GitHub, copy `tuicallkit-kt` and `atomic_x` directories to project
|
|
35
|
+
```bash
|
|
36
|
+
# Clone TUIKit_Android repository
|
|
37
|
+
git clone https://github.com/Tencent-RTC/TUIKit_Android.git
|
|
38
|
+
# Copy atomic_x and call/tuicallkit-kt directories to project app sibling directory
|
|
39
|
+
```
|
|
40
|
+
- **settings.gradle.kts configuration**:
|
|
41
|
+
```kotlin
|
|
42
|
+
include(":tuicallkit-kt")
|
|
43
|
+
include(":atomic_x")
|
|
44
|
+
```
|
|
45
|
+
- **settings.gradle configuration**:
|
|
46
|
+
```groovy
|
|
47
|
+
include ':tuicallkit-kt'
|
|
48
|
+
include ':atomic_x'
|
|
49
|
+
```
|
|
50
|
+
- **app/build.gradle.kts dependency configuration**:
|
|
51
|
+
```kotlin
|
|
52
|
+
dependencies {
|
|
53
|
+
api(project(":tuicallkit-kt"))
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
- **app/build.gradle dependency configuration**:
|
|
57
|
+
```groovy
|
|
58
|
+
dependencies {
|
|
59
|
+
api project(':tuicallkit-kt')
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 3. Silent Integration Execution
|
|
64
|
+
- After all code writing is completed, automatically sync Gradle and build project in the final step
|
|
65
|
+
- **Gradle Command Execution Strategy (Multi-level Fallback to Ensure Success)**:
|
|
66
|
+
1. **First Priority**: Try executing `./gradlew build` directly
|
|
67
|
+
2. **Second Priority**: If failed, try `./gradlew assembleDebug`
|
|
68
|
+
3. **Third Priority**: If still failed, **guide user to manually sync in Android Studio** (see guidance below)
|
|
69
|
+
- After successful build, prompt user to run application on emulator or real device
|
|
70
|
+
|
|
71
|
+
#### 📋 Manual Execution Fallback Guidance
|
|
72
|
+
|
|
73
|
+
**When automatic execution fails, guide user to execute manually**:
|
|
74
|
+
|
|
75
|
+
1. Click **File → Sync Project with Gradle Files** in Android Studio
|
|
76
|
+
2. Wait for Gradle sync to complete
|
|
77
|
+
3. Click **Run** button to run application
|
|
78
|
+
|
|
79
|
+
**Common Issues**: Gradle sync failure → Check JDK version (requires JDK 17+); Compilation failure → Check Android SDK version
|
|
80
|
+
|
|
81
|
+
### 4. Authentication Credential Configuration (Important)
|
|
82
|
+
- Call `get_usersig` tool to get SDKAppID, UserID, UserSig
|
|
83
|
+
- Generate UserSig for 4 test accounts (user001/002/003/004)
|
|
84
|
+
- Authentication information can be hardcoded during testing phase, but must be annotated as test-only
|
|
85
|
+
- ⚠️ Security Warning: Inform user that UserSig must be generated on server side in production environment
|
|
86
|
+
|
|
87
|
+
### 5. LoginActivity Implementation Constraints 🔴
|
|
88
|
+
|
|
89
|
+
**⚠️ Priority Check Item: Check if login page already exists in project**:
|
|
90
|
+
- Before implementing login page, **must first check if login page already exists in project**
|
|
91
|
+
- If login page already exists, **must ask user if they want to execute default behavior**:
|
|
92
|
+
- **Option 1**: Use default behavior (create new LoginActivity, including dropdown, 4 test accounts, etc.)
|
|
93
|
+
- **Option 2**: Modify based on existing login page (retain user's UI and interaction logic, only add necessary TUILogin login logic)
|
|
94
|
+
- If user chooses Option 2, should:
|
|
95
|
+
- Retain user's existing login page UI and interaction logic
|
|
96
|
+
- Only call `TUILogin.login` for secondary login after successful login
|
|
97
|
+
- Do not force use of dropdown and 4 test accounts
|
|
98
|
+
- If no login page exists in project, or user chooses Option 1, implement according to default behavior below
|
|
99
|
+
|
|
100
|
+
**Default Login Page Implementation Requirements**:
|
|
101
|
+
- **Must implement login page**, including the following functionality:
|
|
102
|
+
1. **Dropdown to select UserID**: Provide four options: user001, user002, user003, user004
|
|
103
|
+
2. **Display SDKAppID**: Get from `get_usersig` and display (read-only, not editable)
|
|
104
|
+
3. **Auto-generate UserSig**: Automatically match from pre-generated UserSig based on selected UserID
|
|
105
|
+
4. **Login button**: Call `TUILogin.login` to login
|
|
106
|
+
- **Login interface must call `TUILogin.login`**, passing complete credentials obtained from `get_usersig`
|
|
107
|
+
- Automatically navigate to main page (MainActivity/HomePage) after successful login
|
|
108
|
+
|
|
109
|
+
**LoginActivity Core Implementation Points (Kotlin)**:
|
|
110
|
+
|
|
111
|
+
```kotlin
|
|
112
|
+
// 1. Import necessary classes
|
|
113
|
+
import com.tencent.qcloud.tuicore.TUILogin
|
|
114
|
+
import com.tencent.qcloud.tuicore.interfaces.TUICallback
|
|
115
|
+
|
|
116
|
+
// 2. Define test account mapping table (get from get_usersig)
|
|
117
|
+
val userSigMap = mapOf(
|
|
118
|
+
"user001" to "xxx",
|
|
119
|
+
"user002" to "xxx",
|
|
120
|
+
"user003" to "xxx",
|
|
121
|
+
"user004" to "xxx"
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
// 3. UI components
|
|
125
|
+
// - SDKAppID display (read-only TextView)
|
|
126
|
+
// - UserID dropdown (Spinner, options generated from userSigMap.keys)
|
|
127
|
+
// - Login button
|
|
128
|
+
|
|
129
|
+
// 4. Login logic
|
|
130
|
+
TUILogin.login(context, sdkAppId, userId, userSig, object : TUICallback() {
|
|
131
|
+
override fun onSuccess() {
|
|
132
|
+
// Navigate to MainActivity
|
|
133
|
+
}
|
|
134
|
+
override fun onError(errorCode: Int, errorMessage: String) {
|
|
135
|
+
// Display error message
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 6. MainActivity/HomePage Implementation Constraints 🔴
|
|
141
|
+
|
|
142
|
+
**Must implement main page**, including the following functionality:
|
|
143
|
+
|
|
144
|
+
1. **Display current logged-in UserID**
|
|
145
|
+
2. **Audio/Video Call Functionality** (unified user selection):
|
|
146
|
+
- **User List (multi-select)**: Display selectable users (user002, user003, user004, excluding current logged-in user)
|
|
147
|
+
- **Smart Call Type Detection**:
|
|
148
|
+
- Select **1 user** → Automatically initiate **single-person call**
|
|
149
|
+
- Select **multiple users** → Automatically initiate **multi-person call**
|
|
150
|
+
- **Voice Call Button**: Call `TUICallKit.createInstance(context).calls` to initiate voice call
|
|
151
|
+
- **Video Call Button**: Call `TUICallKit.createInstance(context).calls` to initiate video call
|
|
152
|
+
- **Implementation Method**: Use CheckBox list, support single and multi-selection
|
|
153
|
+
3. **Logout Button**: Call `TUILogin.logout` to logout
|
|
154
|
+
|
|
155
|
+
**MainActivity Core Implementation Points (Kotlin)**:
|
|
156
|
+
|
|
157
|
+
```kotlin
|
|
158
|
+
// 1. Import necessary classes
|
|
159
|
+
import com.tencent.qcloud.tuikit.tuicallkit.TUICallKit
|
|
160
|
+
import io.trtc.tuikit.atomicxcore.api.call.CallMediaType
|
|
161
|
+
import io.trtc.tuikit.atomicxcore.api.call.CallParams
|
|
162
|
+
|
|
163
|
+
// 2. Display current logged-in user (TextView)
|
|
164
|
+
|
|
165
|
+
// 3. User selection area (unified single/multi-person call)
|
|
166
|
+
// - User list: val availableUsers = listOf("user002", "user003", "user004").filter { it != currentUserId }
|
|
167
|
+
// - Multi-select box: CheckBox (support selecting 1 or multiple users)
|
|
168
|
+
// - Selected users: val selectedUsers = mutableListOf<String>()
|
|
169
|
+
|
|
170
|
+
// 4. Call button area
|
|
171
|
+
// - Voice call button: Button
|
|
172
|
+
// - Video call button: Button
|
|
173
|
+
|
|
174
|
+
// 5. Initiate call logic
|
|
175
|
+
val params = CallParams()
|
|
176
|
+
TUICallKit.createInstance(context).calls(selectedUsers, CallMediaType.Audio, params, object : CompletionHandler {
|
|
177
|
+
override fun onSuccess() {
|
|
178
|
+
// Success callback
|
|
179
|
+
}
|
|
180
|
+
override fun onFailure(code: Int, desc: String) {
|
|
181
|
+
// Failure callback
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
// 6. Logout logic
|
|
186
|
+
TUILogin.logout(object : TUICallback() {
|
|
187
|
+
override fun onSuccess() {
|
|
188
|
+
// Navigate back to LoginActivity
|
|
189
|
+
}
|
|
190
|
+
override fun onError(errorCode: Int, errorMessage: String) {
|
|
191
|
+
// Display error message
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### 7. Project Configuration Constraints 🔴
|
|
197
|
+
|
|
198
|
+
**Must complete the following project configurations**:
|
|
199
|
+
|
|
200
|
+
1. **Obfuscation Rules Configuration**: Add to the end of `app/proguard-rules.pro` file:
|
|
201
|
+
```proguard
|
|
202
|
+
-keep class com.tencent.** { *; }
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
2. **AndroidManifest.xml Configuration**: Add `tools:replace="android:allowBackup"` in application node:
|
|
206
|
+
```xml
|
|
207
|
+
<application
|
|
208
|
+
android:name=".BaseApplication"
|
|
209
|
+
android:allowBackup="false"
|
|
210
|
+
android:icon="@drawable/app_ic_launcher"
|
|
211
|
+
android:label="@string/app_name"
|
|
212
|
+
android:largeHeap="true"
|
|
213
|
+
android:theme="@style/AppTheme"
|
|
214
|
+
tools:replace="android:allowBackup">
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
3. **Gradle JDK Version**: AGP 8.0+ requires Gradle runtime to use Java 17 or higher
|
|
218
|
+
|
|
219
|
+
### 8. Build Script Syntax Check (Important) 🔴
|
|
220
|
+
|
|
221
|
+
**⚠️ Before configuring build scripts, must first check the build script type used by the project**, choose correct syntax based on actual situation:
|
|
222
|
+
|
|
223
|
+
| Build Script File | Syntax Type | Example |
|
|
224
|
+
|-------------|---------|------|
|
|
225
|
+
| `settings.gradle` | Groovy DSL | `include ':tuicallkit-kt'` |
|
|
226
|
+
| `settings.gradle.kts` | Kotlin DSL | `include(":tuicallkit-kt")` |
|
|
227
|
+
| `build.gradle` | Groovy DSL | `api project(':tuicallkit-kt')` |
|
|
228
|
+
| `build.gradle.kts` | Kotlin DSL | `api(project(":tuicallkit-kt"))` |
|
|
229
|
+
|
|
230
|
+
**Check Steps**:
|
|
231
|
+
1. Check build script file names in project root directory and `app/` directory
|
|
232
|
+
2. If ends with `.gradle` → Use Groovy syntax
|
|
233
|
+
3. If ends with `.gradle.kts` → Use Kotlin DSL syntax
|
|
234
|
+
|
|
235
|
+
### 9. Android Project Standards
|
|
236
|
+
- Android version requirement: Android 5.0 (SDK API Level 21) and above
|
|
237
|
+
- Gradle version requirement: Gradle 4.2.1 and above
|
|
238
|
+
- Use Kotlin language (recommended), also supports Java
|
|
239
|
+
|
|
240
|
+
### 10. Environment Dependency Preparation
|
|
241
|
+
- Ensure user has installed Android Studio
|
|
242
|
+
- Ensure user has configured Android SDK
|
|
243
|
+
- JDK 17+ version (AGP 8.0+ requirement)
|
|
244
|
+
- **If automatic build fails, must guide user to manually sync Gradle in Android Studio**
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 📦 Core Version Requirements
|
|
249
|
+
|
|
250
|
+
| Tool/Platform | Minimum Version Requirement |
|
|
251
|
+
|----------|-------------|
|
|
252
|
+
| **Android** | >= 5.0 (API Level 21) |
|
|
253
|
+
| **Gradle** | >= 4.2.1 |
|
|
254
|
+
| **JDK** | >= 17 (AGP 8.0+) |
|
|
255
|
+
|
|
256
|
+
**For detailed tool version requirements, please refer to the "Preparation Work - Environment Requirements" section in the integration documentation**
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## 📦 Automated Execution Commands
|
|
261
|
+
|
|
262
|
+
After Agent code generation is completed, execute automatically in order:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
# 1. Clone TUIKit_Android repository (if not already cloned)
|
|
266
|
+
git clone https://github.com/Tencent-RTC/TUIKit_Android.git
|
|
267
|
+
|
|
268
|
+
# 2. Copy components to project directory
|
|
269
|
+
cp -r TUIKit_Android/atomic_x ./
|
|
270
|
+
cp -r TUIKit_Android/call/tuicallkit-kt ./
|
|
271
|
+
|
|
272
|
+
# 3. Build project
|
|
273
|
+
./gradlew assembleDebug
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Fallback Strategy**: `./gradlew` failure → Guide user to manually sync Gradle in Android Studio
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## 📱 Real Device Debugging Guidance (User Guide)
|
|
281
|
+
|
|
282
|
+
### Android Real Device Debugging
|
|
283
|
+
1. USB connect device
|
|
284
|
+
2. Enable developer mode (tap version number 7 times) + USB debugging
|
|
285
|
+
3. Device authorize USB debugging (allow)
|
|
286
|
+
4. Execute `adb devices` to verify connection
|
|
287
|
+
5. Click Run button in Android Studio, select target device
|
|
288
|
+
|
|
289
|
+
### Android Emulator Debugging
|
|
290
|
+
1. Open Android Studio → Device Manager
|
|
291
|
+
2. Create or start emulator
|
|
292
|
+
3. Click Run button to run application
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## 🔄 Complete Automation Workflow
|
|
297
|
+
|
|
298
|
+
```mermaid
|
|
299
|
+
graph TD
|
|
300
|
+
A[Receive User Requirements] --> B[Check Android Development Environment]
|
|
301
|
+
B --> C[Clone TUIKit_Android Repository]
|
|
302
|
+
C --> D[Copy tuicallkit-kt and atomic_x to Project]
|
|
303
|
+
D --> E[Configure settings.gradle: Add include]
|
|
304
|
+
E --> F[Configure app/build.gradle: Add Dependencies]
|
|
305
|
+
F --> G[Configure Obfuscation Rules: proguard-rules.pro]
|
|
306
|
+
G --> H[Configure AndroidManifest.xml]
|
|
307
|
+
H --> I[Call get_usersig Tool to Generate UserSig for 4 Accounts]
|
|
308
|
+
I --> J[Implement LoginActivity: Dropdown Select UserID]
|
|
309
|
+
J --> K[Implement MainActivity: Single-person Call and Multi-person Call]
|
|
310
|
+
K --> L[Call record_result to Record Integration Results]
|
|
311
|
+
L --> M[Execute Gradle Build]
|
|
312
|
+
M --> N{Build Successful?}
|
|
313
|
+
N -->|Yes| O[Guide User to Connect Device and Run]
|
|
314
|
+
N -->|No| P[Guide User to Manually Sync in Android Studio]
|
|
315
|
+
O --> Q[Project Launch Successful]
|
|
316
|
+
P --> Q
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## 📝 Key Points Summary
|
|
322
|
+
|
|
323
|
+
| Category | Requirement |
|
|
324
|
+
|------|------|
|
|
325
|
+
| **Android Version** | Android 5.0 (API Level 21) and above |
|
|
326
|
+
| **Integration Method** | Source code method (clone `tuicallkit-kt` and `atomic_x` from GitHub) |
|
|
327
|
+
| **Documentation Priority** | ⚠️ Strictly follow example code in integration documentation, do not modify arbitrarily |
|
|
328
|
+
| **Silent Integration** | Automatically build project after code writing is completed |
|
|
329
|
+
| **Credential Acquisition** | ⚠️ Must use `get_usersig` tool to generate UserSig for 4 test accounts (user001/002/003/004) |
|
|
330
|
+
| **Login Page** | ⚠️ Must implement dropdown to select UserID, automatically match UserSig, prohibit manual input |
|
|
331
|
+
| **Main Page** | ⚠️ Must support unified user list, selecting 1 user automatically initiates single-person call, selecting multiple users automatically initiates multi-person call |
|
|
332
|
+
| **Security Notice** | ⚠️ Must inform user: Client-generated UserSig is only suitable for testing, production environment must generate UserSig on server side |
|
|
333
|
+
| **Result Recording** | ⚠️ Must call `record_result` tool to record results after integration completion |
|
|
334
|
+
| **Project Configuration** | ⚠️ Must configure obfuscation rules and AndroidManifest.xml |
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## 🎯 Agent Execution Checklist
|
|
339
|
+
|
|
340
|
+
After completing code generation, Agent must confirm all the following items:
|
|
341
|
+
|
|
342
|
+
### Component Import
|
|
343
|
+
- [ ] Cloned TUIKit_Android repository
|
|
344
|
+
- [ ] Copied `tuicallkit-kt` and `atomic_x` to project app sibling directory
|
|
345
|
+
- [ ] Configured `settings.gradle(.kts)` to add include
|
|
346
|
+
- [ ] Configured `app/build.gradle(.kts)` to add dependencies
|
|
347
|
+
|
|
348
|
+
### Project Configuration
|
|
349
|
+
- [ ] Configured `proguard-rules.pro` obfuscation rules
|
|
350
|
+
- [ ] Configured `AndroidManifest.xml` to add `tools:replace`
|
|
351
|
+
|
|
352
|
+
### Code Generation
|
|
353
|
+
- [ ] Called `get_usersig` tool to generate UserSig for 4 accounts
|
|
354
|
+
- [ ] Implemented LoginActivity (dropdown select UserID, no manual input box)
|
|
355
|
+
- [ ] Implemented MainActivity (unified user list, select 1 for single-person call, select multiple for multi-person call)
|
|
356
|
+
|
|
357
|
+
### Final Check
|
|
358
|
+
- [ ] Called `record_result` tool to record integration results
|
|
359
|
+
- [ ] Executed Gradle build or guided user to manually sync
|
|
360
|
+
- [ ] Prompted user to select device to run application
|
|
361
|
+
- [ ] Informed user: Production environment must generate UserSig on server side
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## ❓ Having Issues? AI Can Help You Solve Them Quickly
|
|
366
|
+
|
|
367
|
+
**When dependency sync or compilation errors occur, please provide complete error information to AI, which can help you quickly locate and solve problems.**
|
|
368
|
+
|
|
369
|
+
### 📋 Common Error Scenarios
|
|
370
|
+
|
|
371
|
+
| Error Type | Description | AI Can Help You |
|
|
372
|
+
|---------|------|-----------|
|
|
373
|
+
| **Gradle Sync Failure** | Dependency download failure, version conflicts, repository connection timeout, etc. | Analyze dependency conflicts, recommend mirror sources, fix version compatibility |
|
|
374
|
+
| **Compilation Errors** | Class not found, method signature mismatch, API version incompatibility, etc. | Locate missing dependencies, fix import statements, adapt API changes |
|
|
375
|
+
| **Runtime Crashes** | Null pointer, missing permissions, initialization order errors, etc. | Analyze stack information, check permission configuration, fix initialization logic |
|
|
376
|
+
| **Obfuscation Issues** | Release package functionality abnormal, classes incorrectly obfuscated, etc. | Supplement obfuscation rules, locate obfuscated classes |
|
|
377
|
+
|
|
378
|
+
### 💡 How to Efficiently Report Errors
|
|
379
|
+
|
|
380
|
+
To help AI solve problems more quickly and accurately, please provide the following information:
|
|
381
|
+
|
|
382
|
+
1. **Complete Error Log**: Copy complete error information from Android Studio's Build Output or Logcat
|
|
383
|
+
2. **Error Timing**: Explain whether it occurred during Gradle sync, compilation, or runtime
|
|
384
|
+
3. **Operation Steps**: Briefly describe what operations you performed before the error occurred
|
|
385
|
+
|
|
386
|
+
**Example Feedback Format**:
|
|
387
|
+
```
|
|
388
|
+
Error Timing: During Gradle sync
|
|
389
|
+
Error Information:
|
|
390
|
+
> Could not resolve com.tencent.liteav:LiteAVSDK_TRTC:xxx
|
|
391
|
+
> Repository connection failed: xxx
|
|
392
|
+
|
|
393
|
+
Attempted Operations: Re-sync, clear cache
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### 🔧 Common Issues Quick Self-Check
|
|
397
|
+
|
|
398
|
+
Before reporting to AI, you can try the following operations first:
|
|
399
|
+
|
|
400
|
+
1. **Gradle Sync Failure**:
|
|
401
|
+
- File → Invalidate Caches / Restart
|
|
402
|
+
- Check network connection, try using VPN or configure domestic mirror sources
|
|
403
|
+
- Check if JDK version is 17+
|
|
404
|
+
|
|
405
|
+
2. **Class/Method Not Found**:
|
|
406
|
+
- Confirm `tuicallkit-kt` and `atomic_x` directories have been correctly copied to project root directory
|
|
407
|
+
- Confirm include configuration has been added in `settings.gradle(.kts)`
|
|
408
|
+
- Click File → Sync Project with Gradle Files to re-sync
|
|
409
|
+
|
|
410
|
+
3. **Version Compatibility Issues**:
|
|
411
|
+
- Check `compileSdk` and `targetSdk` versions (recommended 34+)
|
|
412
|
+
- Check Gradle Plugin version and Gradle version matching relationship
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## 🔗 Required Tools to Use
|
|
417
|
+
|
|
418
|
+
### `get_usersig` - Get Test Authentication Information
|
|
419
|
+
Get SDKAppID, UserID (user001/002/003/004), UserSig.
|
|
420
|
+
- LoginActivity: Dropdown select UserID
|
|
421
|
+
- MainActivity: Display selectable user list (excluding current logged-in user)
|
|
422
|
+
- Prohibit manual input of SDKAppID/SecretKey/UserSig
|
|
423
|
+
|
|
424
|
+
### `record_result` - Record Integration Results
|
|
425
|
+
Call after completing all integration steps and successfully building project
|
|
426
|
+
|
|
427
|
+
---
|
|
428
|
+
|
|
429
|
+
## 📚 Related Resource Links
|
|
430
|
+
|
|
431
|
+
- **TUICallKit Android GitHub**: https://github.com/Tencent-RTC/TUIKit_Android
|
|
432
|
+
- **Tencent Cloud Real-Time Communication TRTC Console**: https://console.cloud.tencent.com/trtc
|
|
433
|
+
- **Server-side UserSig Generation**: https://cloud.tencent.com/document/product/647/17275
|
|
434
|
+
- **Enable TRTC Service**: https://cloud.tencent.com/document/product/647/16788
|
|
435
|
+
- **Android Developer Official Documentation**: https://developer.android.com/docs
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
**Applicable Platform**: Android
|
|
440
|
+
**TUICallKit Version**: tuicallkit-kt (latest version)
|
|
441
|
+
**Minimum Requirements**: Android 5.0 (API Level 21), Gradle 4.2.1, JDK 17+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PRESENT_SCENARIO_CHOICE_DEFINITION } from '../definitions/present_scenario_choice_def.js';
|
|
2
|
+
const registryPresentScenarioChoiceTool = (mcpServer) => {
|
|
3
|
+
const { name, description, selectionText } = PRESENT_SCENARIO_CHOICE_DEFINITION;
|
|
4
|
+
mcpServer.tool(name, description, {}, () => {
|
|
5
|
+
return {
|
|
6
|
+
content: [
|
|
7
|
+
{
|
|
8
|
+
type: 'text',
|
|
9
|
+
text: selectionText,
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
export { registryPresentScenarioChoiceTool };
|
|
16
|
+
//# sourceMappingURL=present-scenario-choice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"present-scenario-choice.js","sourceRoot":"","sources":["../../../src/tools/common/present-scenario-choice.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kCAAkC,EAAE,MAAM,+CAA+C,CAAC;AAEnG,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,kCAAkC,CAAC;IAChF,SAAS,CAAC,IAAI,CACZ,IAAI,EACJ,WAAW,EACX,EAAE,EACF,GAAG,EAAE;QACH,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,aAAa;iBACpB;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
|
|
@@ -1,27 +1,43 @@
|
|
|
1
1
|
const TOOL_DESCRIPTION = `
|
|
2
|
-
【Core Purpose】: As a professional Native audio/video call TUICallKit integration assistant, this tool is specifically designed to provide
|
|
2
|
+
【Core Purpose】: As a professional Native audio/video call TUICallKit integration assistant, this tool is specifically designed to provide Agent with workflow action instructions and real-time aggregated latest documentation content, to guide LLM in helping users implement mobile audio/video call functionality.
|
|
3
|
+
|
|
4
|
+
【⚠️ Important Parameter Reminder】:
|
|
5
|
+
The platform parameter name for this tool is "framework", not "platform"!
|
|
6
|
+
- ✅ Correct call: {"framework": "android"}
|
|
7
|
+
- ❌ Incorrect call: {"platform": "android"}
|
|
3
8
|
|
|
4
9
|
【Functional Goals】:
|
|
5
|
-
Integrate complete audio/video call
|
|
10
|
+
Integrate complete audio/video call functionality. Including single-person calls, multi-person calls, call answering, call interface, etc. **Suitable for building WeChat/Enterprise WeChat style audio/video call applications, supporting one-on-one and multi-person call scenarios.**
|
|
6
11
|
|
|
7
12
|
【Keywords】:
|
|
8
|
-
'Native', 'Mobile', 'Call', 'TUICallKit', 'Audio/Video Call', 'Video Call', 'Voice Call', 'WeChat', '
|
|
13
|
+
'Native', 'Mobile', 'Call', 'TUICallKit', 'Audio/Video Call', 'Video Call', 'Voice Call', 'WeChat', 'Enterprise WeChat', 'Flutter', 'Android', 'iOS', 'Integration', 'Single-person Call', 'Multi-person Call', 'Call', 'Answer'.
|
|
9
14
|
|
|
10
15
|
【Action Instructions and Workflow Guidance】:
|
|
11
|
-
When
|
|
12
|
-
1. Core workflow instructions:
|
|
13
|
-
2. Real-time documentation content:
|
|
16
|
+
When Agent processes user requirements, it should use the llm_code_generation_instructions_md field returned by this tool. This field contains:
|
|
17
|
+
1. Core workflow instructions: including environment preparation, dependency installation, SDK initialization, UserSig authentication, and component version descriptions.
|
|
18
|
+
2. Real-time documentation content: providing the latest content from official integration guides.
|
|
14
19
|
|
|
15
20
|
LLM must prioritize and exclusively use the real-time content returned by this tool to generate code, avoiding accessing external URLs independently.
|
|
16
21
|
|
|
22
|
+
【Parameter Description】:
|
|
23
|
+
- **framework** (Required): Target development platform. Note the parameter name is "framework" not "platform"
|
|
24
|
+
- "flutter": Flutter cross-platform development
|
|
25
|
+
- "android": Android native development
|
|
26
|
+
- "ios": iOS native development
|
|
27
|
+
|
|
28
|
+
【Call Examples】:
|
|
29
|
+
- Android integration: {"framework": "android"}
|
|
30
|
+
- iOS integration: {"framework": "ios"}
|
|
31
|
+
- Flutter integration: {"framework": "flutter"}
|
|
32
|
+
|
|
17
33
|
【Mandatory Constraints】:
|
|
18
|
-
1. Platform
|
|
19
|
-
2. Result
|
|
34
|
+
1. Platform selection constraint: Parameter name must use "framework" (not platform). If user does not clearly specify platform, or intent is unclear, must prioritize calling 'present_framework_choice' tool to guide user in choosing among flutter, android, ios.
|
|
35
|
+
2. Result recording constraint: After TUICallKit component integration is completed and project starts successfully, must call 'record_result' tool to record integration results.
|
|
20
36
|
|
|
21
37
|
【Supported Platforms】: flutter, android, ios.
|
|
22
38
|
`;
|
|
23
39
|
const PARAMETER_DESCRIPTIONS = {
|
|
24
|
-
framework: 'Native audio/video call TUICallKit platform type. Available values: flutter (Flutter cross-platform), android (Android native), ios (iOS native).',
|
|
40
|
+
framework: '【Important】Native audio/video call TUICallKit platform type. Note: parameter name is "framework" not "platform"! Available values: flutter (Flutter cross-platform), android (Android native), ios (iOS native).',
|
|
25
41
|
};
|
|
26
42
|
export const GET_NATIVE_CALL_UIKIT_DEFINITION = {
|
|
27
43
|
name: 'get_native_call_uikit_integration',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_native_call_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_native_call_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG
|
|
1
|
+
{"version":3,"file":"get_native_call_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_native_call_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,kNAAkN;CAC9N,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
|
|
@@ -1,29 +1,51 @@
|
|
|
1
1
|
const TOOL_DESCRIPTION = `
|
|
2
|
-
【Core Purpose】: As a professional Native chat TUIKit integration assistant, this tool is specifically designed to provide Agents with workflow action instructions and real-time aggregated latest documentation content to guide LLM in helping users implement mobile instant messaging (IM)
|
|
2
|
+
【Core Purpose】: As a professional Native chat TUIKit integration assistant, this tool is specifically designed to provide Agents with workflow action instructions and real-time aggregated latest documentation content to guide LLM in helping users implement mobile instant messaging (IM) functionality.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
【⚠️ Important Parameter Reminder】:
|
|
5
|
+
The platform parameter name for this tool is "framework", not "platform"!
|
|
6
|
+
- ✅ Correct call: {"framework": "android", "goals": ["full-featured"]}
|
|
7
|
+
- ❌ Wrong call: {"platform": "android", "goals": ["full-featured"]}
|
|
8
|
+
\n
|
|
9
|
+
|
|
10
|
+
【Function Goals】:
|
|
11
|
+
1. full-featured: Integrate full functionality. Includes conversation list, chat window, group management, personal center, etc. **Suitable for building WeChat/Enterprise WeChat style complete mobile applications, or as core Tab modules of Apps.**
|
|
12
|
+
2. chat-only: Integrate chat window only. **Suitable for customer service consultation, medical online consultation, order detail page private chat and other lightweight conversation scenarios.**
|
|
13
|
+
|
|
14
|
+
【Parameter Description】:
|
|
15
|
+
- **framework** (Required): Target development platform. Note the parameter name is "framework" not "platform"
|
|
16
|
+
- "flutter": Flutter cross-platform development
|
|
17
|
+
- "android": Android native development
|
|
18
|
+
- "ios": iOS native development
|
|
19
|
+
- **goals** (Required): Function goal list
|
|
20
|
+
- ["full-featured"]: Complete application functionality
|
|
21
|
+
- ["chat-only"]: Chat window only
|
|
22
|
+
|
|
23
|
+
【Call Examples】:
|
|
24
|
+
- Android full-featured integration: {"framework": "android", "goals": ["full-featured"]}
|
|
25
|
+
- iOS chat window: {"framework": "ios", "goals": ["chat-only"]}
|
|
26
|
+
- Flutter full-featured: {"framework": "flutter", "goals": ["full-featured"]}
|
|
7
27
|
|
|
8
28
|
【Keywords】:
|
|
9
|
-
'Native', '
|
|
29
|
+
'Native', 'Mobile', 'Chat', 'TUIKit', 'Chat', 'Instant Messaging', 'WeChat', 'Enterprise WeChat',
|
|
30
|
+
'framework=flutter', 'framework=android', 'framework=ios',
|
|
31
|
+
'Integration', 'Customer Service', 'Medical Consultation', 'TabBar', 'Message Entry', 'Conversation List', 'Dialog Box'.
|
|
10
32
|
|
|
11
|
-
【Action Instructions and Workflow Guidance
|
|
12
|
-
When processing user requirements,
|
|
13
|
-
1. Core workflow instructions:
|
|
14
|
-
2. Real-time documentation content:
|
|
33
|
+
【Action Instructions and Workflow Guidance】:\n
|
|
34
|
+
When processing user requirements, Agent should use the llm_code_generation_instructions_md field returned by this tool. This field contains:
|
|
35
|
+
1. Core workflow instructions: Including environment preparation, dependency installation, SDK initialization, UserSig authentication and component version descriptions.
|
|
36
|
+
2. Real-time documentation content: Dynamically returns corresponding official integration guides based on selected goals.
|
|
15
37
|
|
|
16
|
-
LLM must prioritize and exclusively use the real-time content returned by this tool to generate code, avoiding accessing external URLs
|
|
38
|
+
LLM must prioritize and exclusively use the real-time content returned by this tool to generate code, avoiding accessing external URLs independently.\n
|
|
17
39
|
|
|
18
40
|
【Mandatory Constraints】:
|
|
19
|
-
1. Platform
|
|
20
|
-
2. Result
|
|
41
|
+
1. Platform selection constraint: Parameter name must use "framework" (not platform). If the user does not clearly specify a platform, or the intention is unclear, must prioritize calling the 'present_framework_choice' tool to guide users to choose among flutter, android, ios.
|
|
42
|
+
2. Result recording constraint: After TUIKit component integration is completed and the project starts successfully, must call the 'record_result' tool to record integration results.
|
|
21
43
|
|
|
22
44
|
【Supported Platforms】: flutter, android, ios.
|
|
23
45
|
`;
|
|
24
46
|
const PARAMETER_DESCRIPTIONS = {
|
|
25
|
-
framework: 'Native chat TUIKit platform type. Options: flutter (Flutter cross-platform), android (Android native), ios (iOS native).',
|
|
26
|
-
goals: "List of
|
|
47
|
+
framework: '⚠️ Note the parameter name is "framework" not "platform"! Native chat TUIKit platform type. Options: flutter (Flutter cross-platform), android (Android native), ios (iOS native).',
|
|
48
|
+
goals: "List of functional goals requested by user to implement. Options: ['full-featured'] (standard application), ['chat-only'] (customer service/consultation/popup).",
|
|
27
49
|
};
|
|
28
50
|
export const GET_NATIVE_CHAT_UIKIT_INTEGRATION_DEFINITION = {
|
|
29
51
|
name: 'get_native_chat_uikit_integration',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_native_chat_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_native_chat_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG
|
|
1
|
+
{"version":3,"file":"get_native_chat_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_native_chat_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,oLAAoL;IAC/L,KAAK,EAAE,kKAAkK;CAC1K,CAAC;AAEF,MAAM,CAAC,MAAM,4CAA4C,GAAG;IAC1D,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
|