@tencentcloud/sdk-mcp 1.6.0-beta.3 → 1.6.1
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/README.md +1 -1
- package/cursor-setting.png +0 -0
- package/knowledge/build-index.js +4 -0
- package/knowledge/content-loader.js +3 -0
- package/knowledge/doc-url-resolver.js +118 -0
- package/knowledge/path-meta.js +4 -2
- package/knowledge/search/exact-lookup.js +1 -1
- package/knowledge/search/filter-pool.js +25 -7
- package/knowledge/search/product-scope-intent.js +40 -0
- package/knowledge/search/requires-framework.js +15 -6
- package/knowledge/search/search-knowledge.js +17 -6
- package/mcp-server-prompt.png +0 -0
- package/package.json +1 -1
- package/resource/index/component-slugs.json +1 -1
- package/resource/index/doc-source-urls.json +1 -0
- package/resource/index/manifest.json +1 -1
- package/resource/integration/chat/preset/uni-app/integration.md +2 -2
- package/resource/integration/chat/preset/vue/integration.md +12 -0
- package/resource/knowledge/callkit/faq/common.md +1 -1
- package/resource/knowledge/chat/preset/android-view/integration.md +0 -140
- package/resource/knowledge/chat/urls/restapi.md +0 -1
- package/resource/knowledge/push/config/donut.md +445 -0
- package/resource/knowledge/push/config/harmonyos.md +87 -0
- package/resource/knowledge/push/config/ios.md +341 -0
- package/resource/knowledge/push/config/react-native.md +205 -0
- package/resource/knowledge/push/config/unity.md +199 -0
- package/resource/knowledge/push/config/unreal-engine.md +199 -0
- package/resource/knowledge/push/integration/harmonyos.md +1 -1
- package/resource/knowledge/push/integration/uni-app.md +8 -0
- package/resource/knowledge/rtcengine/web/plugin/24-advanced-network-quality.md +2 -2
- package/server.js +14 -1
- package/tools/common/record_answer.js +3 -3
- package/tools/common/record_feedback.js +1 -1
- package/tools/common/search_trtc_knowledge.js +1 -1
- package/tools/definitions/record_answer_def.js +8 -7
- package/tools/definitions/record_feedback_def.js +2 -2
- package/tools/definitions/search_trtc_knowledge_def.js +23 -55
- package/utils/report-cls-client.js +4 -4
- package/utils/report-es-client.js +1 -1
- package/utils/report-runtime-error-cls-client.js +0 -90
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
目前消息推送插件,在 Unity 中仅支持推送至 Android(含各厂商通道)和 iOS 设备。
|
|
2
|
+
|
|
3
|
+
> **注意:**
|
|
4
|
+
>
|
|
5
|
+
|
|
6
|
+
> 每个厂商仅支持配置 1 个证书。
|
|
7
|
+
>
|
|
8
|
+
|
|
9
|
+
【iOS】
|
|
10
|
+
|
|
11
|
+
集成消息推送插件之前,需要先向 Apple 申请 APNs 推送证书,然后上传推送证书到 IM 控制台 。之后按照快速接入步骤接入即可。
|
|
12
|
+
|
|
13
|
+
## 操作步骤
|
|
14
|
+
|
|
15
|
+
【p8 证书(推荐)】
|
|
16
|
+
|
|
17
|
+
p8 证书:p8 证书没有到期日期,因此您无需担心证书过期。此外,使用 p8 证书可以简化证书管理,因为您可以使用一个 p8 证书为多个应用程序提供推送通知服务。另外,p8 证书支持灵动岛推送。
|
|
18
|
+
|
|
19
|
+
### 步骤1:申请 APNs 证书
|
|
20
|
+
|
|
21
|
+
要创建 p8 证书文件,首先需要登录 [苹果开发者中心](https://developer.apple.com/)。
|
|
22
|
+
|
|
23
|
+
1. 进入 Certificates, Identifiers & Profiles:在页面右上角单击 **Account**,然后在下拉菜单中选择 **Certificates, Identifiers & Profiles** 。
|
|
24
|
+
|
|
25
|
+
2. 创建一个新的 App ID:在左侧菜单中单击 **Identifiers** ,然后单击右侧的 **+** 创建一个新的 App ID。填写相应的信息并单击 **Continue **。
|
|
26
|
+
|
|
27
|
+
3. 创建一个新的密钥:在左侧菜单中单击 **Keys**,然后单击右侧的 **+** 创建一个新的密钥。输入密钥的名称,然后勾选 **Apple Push Notifications service (APNs)**,单击 **Continue** 。
|
|
28
|
+
|
|
29
|
+
确认并生成密钥:在确认页面核对您的密钥信息,然后单击 **Register** 。接下来,您将看到一个页面提示您下载密钥。单击 **Download**,将生成的 .p8 文件保存到您的计算机上。
|
|
30
|
+
|
|
31
|
+
> **说明:**
|
|
32
|
+
>
|
|
33
|
+
> - p8 证书只可以下载一次,请妥善保存。
|
|
34
|
+
> - 请妥善保管下载的 p8 文件,因为您将无法再次下载该文件。您可以使用此 p8 证书配置您的 iOS 应用程序以接收推送通知。
|
|
35
|
+
|
|
36
|
+
### 步骤2:上传 p8 证书到 IM 控制台
|
|
37
|
+
1. 登录 [即时通信 IM 控制台](https://console.cloud.tencent.com/im)。
|
|
38
|
+
|
|
39
|
+
2. 单击目标应用卡片,进入应用的基础配置页面。
|
|
40
|
+
|
|
41
|
+
3. 单击 **iOS 原生离线推送设置**右侧的**添加证书**。
|
|
42
|
+
|
|
43
|
+
4. 选择 **p8 证书**。
|
|
44
|
+
|
|
45
|
+
> **说明:**
|
|
46
|
+
>
|
|
47
|
+
> - **Key ID**:这是您的 APNs Auth Key 的唯一标识符。当您在 Apple Developer Center 创建一个新的 APNs Auth Key 时,系统会为您生成一个 Key ID。您可以在 "Certificates, Identifiers & Profiles" 部分的 "Keys" 中找到它。
|
|
48
|
+
> - **Team ID**:这是您的开发者账户的唯一标识符。您可以在 Apple Developer Center 的账户详情页面找到它。点击右上角的 "Membership",在 "Membership Details" 部分可以找到您的 Team ID。
|
|
49
|
+
> - **Bundle ID**:这是您的应用程序的唯一标识符,也称为应用程序 ID。您可以在 Apple Developer Center 的 "Certificates, Identifiers & Profiles" 部分找到它。选择 "Identifiers",然后在您的应用程序列表中找到对应的 Bundle ID。
|
|
50
|
+
|
|
51
|
+
【p12 证书】
|
|
52
|
+
|
|
53
|
+
### 步骤1:申请 APNs 证书
|
|
54
|
+
|
|
55
|
+
#### 开启 App 远程推送
|
|
56
|
+
1. 登录 [苹果开发者中心](https://developer.apple.com/account/) 网站,单击 **Certificates, Identifiers & Profiles** 或者侧栏的 **Certificates, IDs & Profiles**,进入 **Certificates, IDs & Profiles** 页面。
|
|
57
|
+
|
|
58
|
+
2. 单击 Identifiers 右侧的 **+**。
|
|
59
|
+
|
|
60
|
+
3. 您可以参见如下步骤新建一个 AppID,或者在您原有的 AppID 上增加 `Push Notification` 的 `Service`。
|
|
61
|
+
|
|
62
|
+
> **说明:**
|
|
63
|
+
>
|
|
64
|
+
|
|
65
|
+
> 您 App 的 `Bundle ID` 不能使用通配符 `*`,否则将无法使用远程推送服务。
|
|
66
|
+
>
|
|
67
|
+
|
|
68
|
+
4. 勾选 **App IDs**,单击 **Continue** 进行下一步。
|
|
69
|
+
|
|
70
|
+
5. 选择 **App**,单击 **Continue** 进行下一步。
|
|
71
|
+
|
|
72
|
+
6. 配置 `Bundle ID` 等其他信息,单击 **Continue** 进行下一步。
|
|
73
|
+
|
|
74
|
+
7. 勾选 **Push Notifications**,开启远程推送服务。
|
|
75
|
+
|
|
76
|
+
#### 生成证书
|
|
77
|
+
1. 选中您的 AppID,选择 **Configure**。
|
|
78
|
+
|
|
79
|
+
2. 可以看到在 **Apple Push Notification service SSL Certificates** 窗口中有两个 `SSL Certificate`,分别用于开发环境(Development)和生产环境(Production)的远程推送证书,如下图所示:
|
|
80
|
+
|
|
81
|
+
3.
|
|
82
|
+
|
|
83
|
+
我们先选择开发环境(Development)的 **Create Certificate**,系统将提示我们需要一个 Certificate Signing Request(CSR)。
|
|
84
|
+
|
|
85
|
+
4. 在 Mac 上打开**钥匙串访问工具(Keychain Access)**,在菜单中选择**钥匙串访问 **> **证书助理 **> **从证书颁发机构请求证书**(`Keychain Access - Certificate Assistant - Request a Certificate From a Certificate Authority`)。
|
|
86
|
+
|
|
87
|
+
5. 输入用户电子邮件地址(您的邮箱)、常用名称(您的名称或公司名),选择**存储到磁盘**,单击**继续**,系统将生成一个 `*.certSigningRequest` 文件。
|
|
88
|
+
|
|
89
|
+
6. 返回上述 步骤3 中 Apple Developer 网站刚才的页面,单击 **Choose File** 上传生成的 `*.certSigningRequest` 文件。
|
|
90
|
+
|
|
91
|
+
7. 单击 **Continue**,即可生成推送证书。
|
|
92
|
+
|
|
93
|
+
8. 单击 **Download** 下载开发环境的 `Development SSL Certificate` 到本地。
|
|
94
|
+
|
|
95
|
+
9. 再次按照上述步骤1 - 8,将生产环境的 `Production SSL Certificate` 下载到本地。
|
|
96
|
+
|
|
97
|
+
> **说明:**
|
|
98
|
+
>
|
|
99
|
+
|
|
100
|
+
> 生产环境的证书实际是开发(Sandbox)+生产(Production)的合并证书,可以同时作为开发环境和生产环境的证书使用。
|
|
101
|
+
>
|
|
102
|
+
|
|
103
|
+
10. 双击打开下载的开发环境和生产环境的 `SSL Certificate`,系统会将其导入钥匙串中。
|
|
104
|
+
|
|
105
|
+
11. 打开钥匙串应用,在**登录 **> **我的证书**,右键分别导出刚创建的开发环境(`Apple Development IOS Push Service`)和生产环境(`Apple Push Services`)的 `p12` 文件。
|
|
106
|
+
|
|
107
|
+
> **注意**
|
|
108
|
+
>
|
|
109
|
+
|
|
110
|
+
> 保存`.p12`文件时,请务必为其设置密码。
|
|
111
|
+
>
|
|
112
|
+
|
|
113
|
+
### 步骤2:上传证书到控制台
|
|
114
|
+
1. 登录 [即时通信 IM 控制台](https://console.cloud.tencent.com/im)。
|
|
115
|
+
|
|
116
|
+
2. 单击目标应用卡片,进入应用的基础配置页面。
|
|
117
|
+
|
|
118
|
+
3. 单击 **iOS 原生离线推送设置**右侧的**添加证书**。
|
|
119
|
+
|
|
120
|
+
4. 选择证书类型,上传 iOS 证书(.p12),设置证书密码,单击**确认**。
|
|
121
|
+
|
|
122
|
+
> **说明:**
|
|
123
|
+
>
|
|
124
|
+
> - 上传证书名最好使用全英文(尤其不能使用括号等特殊字符)。
|
|
125
|
+
> - 上传证书需要设置密码,无密码收不到推送。
|
|
126
|
+
> - 发布 App Store 的证书需要设置为生产环境,否则无法收到推送。
|
|
127
|
+
> - 上传的 p12 证书必须是自己申请的真实有效的证书。
|
|
128
|
+
|
|
129
|
+
5. 待推送证书信息生成后,记录证书的 ID。
|
|
130
|
+
|
|
131
|
+
【Android】
|
|
132
|
+
|
|
133
|
+
## 操作步骤
|
|
134
|
+
|
|
135
|
+
### 步骤1:注册应用到厂商推送平台
|
|
136
|
+
|
|
137
|
+
离线推送需要将您自己的应用注册到各个厂商的推送平台,得到 AppID 和 AppKey 等参数,来实现离线推送功能。目前国内支持的手机厂商有:[小米](https://dev.mi.com/xiaomihyperos/documentation/detail)、[华为](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/service-introduction-0000001050040060)、[荣耀](https://developer.hihonor.com/cn/kitdoc)、[OPPO](https://open.oppomobile.com/wiki/doc#id=10195)、[vivo](https://dev.vivo.com.cn/documentCenter/doc/281)、[魅族](https://open.flyme.cn/service/3),境外支持 [Google FCM](https://console.firebase.google.com/u/0/),是否需要上架商店详情如下:
|
|
138
|
+
|
|
139
|
+
|厂商|小米|华为|OPPO|vivo|魅族|荣耀|Google FCM|
|
|
140
|
+
|---------|---------|---------|---------|---------|---------|---------|---------|
|
|
141
|
+
|是否需要上架|是|否|是|是|否|否|否|
|
|
142
|
+
|
|
143
|
+
### 步骤2:IM 控制台配置
|
|
144
|
+
|
|
145
|
+
登录腾讯云 [即时通信 IM 控制台](https://console.qcloud.com/avc) ,在**推送服务 Push > 推送设置 > 厂商配置**功能栏添加各个厂商推送证书,并将您在步骤一中获取的各厂商的 AppId、AppKey、AppSecret 等参数配置给添加的推送证书。
|
|
146
|
+
|
|
147
|
+
> **注意:**
|
|
148
|
+
>
|
|
149
|
+
|
|
150
|
+
> 关于**点击后续动作**选项,如需使用本插件提供的点击跳转能力,请保持默认值不变, 即通常是`打开应用内指定页面`并带有默认配置。
|
|
151
|
+
>
|
|
152
|
+
|
|
153
|
+
> 如需使用上报统计功能,也请保持此项默认值不变。
|
|
154
|
+
>
|
|
155
|
+
|
|
156
|
+
【小米】
|
|
157
|
+
|
|
158
|
+
|厂商推送平台|IM 控制台配置|
|
|
159
|
+
|---------|---------|
|
|
160
|
+
|||
|
|
161
|
+
|
|
162
|
+
【华为】
|
|
163
|
+
| 厂商推送平台 | IM 控制台配置 |
|
|
164
|
+
| --- | --- |
|
|
165
|
+
| | <strong>说明:</strong><br>Client ID 对应 AppID,Client Secret 对应 AppSecret。 |
|
|
166
|
+
|
|
167
|
+
【OPPO】
|
|
168
|
+
|
|
169
|
+
|厂商推送平台|IM 控制台配置|
|
|
170
|
+
|---------|---------|
|
|
171
|
+
|||
|
|
172
|
+
|
|
173
|
+
【vivo】
|
|
174
|
+
|
|
175
|
+
|厂商推送平台|IM 控制台配置|
|
|
176
|
+
|---------|---------|
|
|
177
|
+
|||
|
|
178
|
+
|
|
179
|
+
回执配置请参考:[消息触达统计配置-vivo](https://cloud.tencent.com/document/product/269/100626#daa658b0-1ac0-44a8-8a47-7ec8822ebe82)
|
|
180
|
+
|
|
181
|
+
【魅族】
|
|
182
|
+
|
|
183
|
+
|厂商推送平台|IM 控制台配置|
|
|
184
|
+
|---------|---------|
|
|
185
|
+
|||
|
|
186
|
+
|
|
187
|
+
回执配置请参考:[消息触达统计配置 > 魅族](https://cloud.tencent.com/document/product/269/100626#daa658b0-1ac0-44a8-8a47-7ec8822ebe82)
|
|
188
|
+
|
|
189
|
+
【荣耀】
|
|
190
|
+
|
|
191
|
+
|厂商推送平台|IM 控制台配置|
|
|
192
|
+
|---------|---------|
|
|
193
|
+
|||
|
|
194
|
+
|
|
195
|
+
【Google FCM】
|
|
196
|
+
|
|
197
|
+
|厂商推送平台|IM 控制台配置|
|
|
198
|
+
|---------|---------|
|
|
199
|
+
|||
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
推送服务目前推送支持小米、华为、荣耀、OPPO、vivo、魅族、一加、realme、iQOO 、FCM 和 Apple 等厂商通道。
|
|
2
|
+
|
|
3
|
+
> **注意:**
|
|
4
|
+
>
|
|
5
|
+
|
|
6
|
+
> 每个厂商仅支持配置 1 个证书。
|
|
7
|
+
>
|
|
8
|
+
|
|
9
|
+
【iOS】
|
|
10
|
+
|
|
11
|
+
集成 消息推送插件之前,需要先向 Apple 申请 APNs 推送证书,然后上传推送证书到 IM 控制台 。之后按照快速接入步骤接入即可。
|
|
12
|
+
|
|
13
|
+
## 操作步骤
|
|
14
|
+
|
|
15
|
+
【p8 证书(推荐)】
|
|
16
|
+
|
|
17
|
+
p8 证书:p8 证书没有到期日期,因此您无需担心证书过期。此外,使用 p8 证书可以简化证书管理,因为您可以使用一个 p8 证书为多个应用程序提供推送通知服务。另外,p8 证书支持灵动岛推送。
|
|
18
|
+
|
|
19
|
+
### 步骤1:申请 APNs 证书
|
|
20
|
+
|
|
21
|
+
要创建 p8 证书文件,首先需要登录 [苹果开发者中心](https://developer.apple.com/)。
|
|
22
|
+
|
|
23
|
+
1. 进入 Certificates,Identifiers & Profiles:在页面右上角单击 **Account**,然后在下拉菜单中选择 **Certificates, Identifiers & Profiles** 。
|
|
24
|
+
|
|
25
|
+
2. 创建一个新的 App ID:在左侧菜单中单击 **Identifiers** ,然后单击右侧的 **+** 创建一个新的 App ID。填写相应的信息并单击 **Continue **。
|
|
26
|
+
|
|
27
|
+
3. 创建一个新的密钥:在左侧菜单中单击 **Keys**,然后单击右侧的 **+** 创建一个新的密钥。输入密钥的名称,然后勾选 **Apple Push Notifications service (APNs)**,单击 **Continue** 。
|
|
28
|
+
|
|
29
|
+
确认并生成密钥:在确认页面核对您的密钥信息,然后单击 **Register** 。接下来,您将看到一个页面提示您下载密钥。单击 **Download**,将生成的 .p8 文件保存到您的计算机上。
|
|
30
|
+
|
|
31
|
+
> **说明:**
|
|
32
|
+
>
|
|
33
|
+
> - p8 证书只可以下载一次,请妥善保存。
|
|
34
|
+
> - 请妥善保管下载的 p8 文件,因为您将无法再次下载该文件。您可以使用此 p8 证书配置您的 iOS 应用程序以接收推送通知。
|
|
35
|
+
|
|
36
|
+
### 步骤2:上传 p8 证书到 IM 控制台
|
|
37
|
+
1. 登录 [即时通信 IM 控制台](https://console.cloud.tencent.com/im)。
|
|
38
|
+
|
|
39
|
+
2. 单击目标应用卡片,进入应用的基础配置页面。
|
|
40
|
+
|
|
41
|
+
3. 单击 **iOS 原生离线推送设置**右侧的**添加证书**。
|
|
42
|
+
|
|
43
|
+
4. 选择 .p8 证书
|
|
44
|
+
|
|
45
|
+
> **说明:**
|
|
46
|
+
>
|
|
47
|
+
> - **Key ID**:这是您的 APNs Auth Key 的唯一标识符。当您在 Apple Developer Center 创建一个新的 APNs Auth Key 时,系统会为您生成一个 Key ID。您可以在 "Certificates, Identifiers & Profiles" 部分的 "Keys" 中找到它。
|
|
48
|
+
> - **Team ID**:这是您的开发者账户的唯一标识符。您可以在 Apple Developer Center 的账户详情页面找到它。点击右上角的 "Membership",在 "Membership Details" 部分可以找到您的 Team ID。
|
|
49
|
+
> - **Bundle ID**:这是您的应用程序的唯一标识符,也称为应用程序 ID。您可以在 Apple Developer Center 的 "Certificates, Identifiers & Profiles" 部分找到它。选择 "Identifiers",然后在您的应用程序列表中找到对应的 Bundle ID。
|
|
50
|
+
|
|
51
|
+
【p12 证书】
|
|
52
|
+
|
|
53
|
+
### 步骤1:申请 APNs 证书
|
|
54
|
+
|
|
55
|
+
#### 开启 App 远程推送
|
|
56
|
+
1. 登录 [苹果开发者中心](https://developer.apple.com/account/) 网站,单击 **Certificates, Identifiers & Profiles** 或者侧栏的 **Certificates, IDs & Profiles**,进入 **Certificates, IDs & Profiles** 页面。
|
|
57
|
+
|
|
58
|
+
2. 单击 Identifiers 右侧的 **+**。
|
|
59
|
+
|
|
60
|
+
3. 您可以参见如下步骤新建一个 AppID,或者在您原有的 AppID 上增加 `Push Notification` 的 `Service`。
|
|
61
|
+
|
|
62
|
+
> **说明:**
|
|
63
|
+
>
|
|
64
|
+
|
|
65
|
+
> 您 App 的 `Bundle ID` 不能使用通配符 `*`,否则将无法使用远程推送服务。
|
|
66
|
+
>
|
|
67
|
+
|
|
68
|
+
4. 勾选 **App IDs**,单击 **Continue** 进行下一步。
|
|
69
|
+
|
|
70
|
+
5. 选择 **App**,单击 **Continue** 进行下一步。
|
|
71
|
+
|
|
72
|
+
6. 配置 `Bundle ID` 等其他信息,单击 **Continue** 进行下一步。
|
|
73
|
+
|
|
74
|
+
7. 勾选 **Push Notifications**,开启远程推送服务。
|
|
75
|
+
|
|
76
|
+
#### 生成证书
|
|
77
|
+
1. 选中您的 AppID,选择 **Configure**。
|
|
78
|
+
|
|
79
|
+
2. 可以看到在 **Apple Push Notification service SSL Certificates** 窗口中有两个 `SSL Certificate`,分别用于开发环境(Development)和生产环境(Production)的远程推送证书,如下图所示:
|
|
80
|
+
|
|
81
|
+
3.
|
|
82
|
+
|
|
83
|
+
我们先选择开发环境(Development)的 **Create Certificate**,系统将提示我们需要一个 Certificate Signing Request(CSR)。
|
|
84
|
+
|
|
85
|
+
4. 在 Mac 上打开**钥匙串访问工具(Keychain Access)**,在菜单中选择**钥匙串访问 **> **证书助理 **> **从证书颁发机构请求证书**(`Keychain Access - Certificate Assistant - Request a Certificate From a Certificate Authority`)。
|
|
86
|
+
|
|
87
|
+
5. 输入用户电子邮件地址(您的邮箱)、常用名称(您的名称或公司名),选择**存储到磁盘**,单击**继续**,系统将生成一个 `*.certSigningRequest` 文件。
|
|
88
|
+
|
|
89
|
+
6. 返回上述 步骤3 中 Apple Developer 网站刚才的页面,单击 **Choose File** 上传生成的 `*.certSigningRequest` 文件。
|
|
90
|
+
|
|
91
|
+
7. 单击 **Continue**,即可生成推送证书。
|
|
92
|
+
|
|
93
|
+
8. 单击 **Download** 下载开发环境的 `Development SSL Certificate` 到本地。
|
|
94
|
+
|
|
95
|
+
9. 再次按照上述步骤1 - 8,将生产环境的 `Production SSL Certificate` 下载到本地。
|
|
96
|
+
|
|
97
|
+
> **说明:**
|
|
98
|
+
>
|
|
99
|
+
|
|
100
|
+
> 生产环境的证书实际是开发(Sandbox)+生产(Production)的合并证书,可以同时作为开发环境和生产环境的证书使用。
|
|
101
|
+
>
|
|
102
|
+
|
|
103
|
+
10. 双击打开下载的开发环境和生产环境的 `SSL Certificate`,系统会将其导入钥匙串中。
|
|
104
|
+
|
|
105
|
+
11. 打开钥匙串应用,在**登录 **> **我的证书**,右键分别导出刚创建的开发环境(`Apple Development IOS Push Service`)和生产环境(`Apple Push Services`)的 `p12` 文件。
|
|
106
|
+
|
|
107
|
+
> **注意**
|
|
108
|
+
>
|
|
109
|
+
|
|
110
|
+
> 保存`.p12`文件时,请务必为其设置密码。
|
|
111
|
+
>
|
|
112
|
+
|
|
113
|
+
### 步骤2:上传证书到控制台
|
|
114
|
+
1. 登录 [即时通信 IM 控制台](https://console.cloud.tencent.com/im)。
|
|
115
|
+
|
|
116
|
+
2. 单击目标应用卡片,进入应用的基础配置页面。
|
|
117
|
+
|
|
118
|
+
3. 单击 **iOS 原生离线推送设置**右侧的**添加证书**。
|
|
119
|
+
|
|
120
|
+
4. 选择证书类型,上传 iOS 证书(.p12),设置证书密码,单击**确认**。
|
|
121
|
+
|
|
122
|
+
> **说明:**
|
|
123
|
+
>
|
|
124
|
+
> - 上传证书名最好使用全英文(尤其不能使用括号等特殊字符)。
|
|
125
|
+
> - 上传证书需要设置密码,无密码收不到推送。
|
|
126
|
+
> - 发布 App Store 的证书需要设置为生产环境,否则无法收到推送。
|
|
127
|
+
> - 上传的 p12 证书必须是自己申请的真实有效的证书。
|
|
128
|
+
|
|
129
|
+
5. 待推送证书信息生成后,记录证书的 ID。
|
|
130
|
+
|
|
131
|
+
【Android】
|
|
132
|
+
|
|
133
|
+
## 操作步骤
|
|
134
|
+
|
|
135
|
+
### 步骤1:注册应用到厂商推送平台
|
|
136
|
+
|
|
137
|
+
离线推送需要将您自己的应用注册到各个厂商的推送平台,得到 AppID 和 AppKey 等参数,来实现离线推送功能。目前国内支持的手机厂商有:[小米](https://dev.mi.com/xiaomihyperos/documentation/detail)、[华为](https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/service-introduction-0000001050040060)、[荣耀](https://developer.hihonor.com/cn/kitdoc)、[OPPO](https://open.oppomobile.com/wiki/doc#id=10195)、[vivo](https://dev.vivo.com.cn/documentCenter/doc/281)、[魅族](https://open.flyme.cn/service/3),境外支持 [Google FCM](https://console.firebase.google.com/u/0/),是否需要上架商店详情如下:
|
|
138
|
+
|
|
139
|
+
|厂商|小米|华为|OPPO|vivo|魅族|荣耀|Google FCM|
|
|
140
|
+
|---------|---------|---------|---------|---------|---------|---------|---------|
|
|
141
|
+
|是否需要上架|是|否|是|是|否|否|否|
|
|
142
|
+
|
|
143
|
+
### 步骤2:IM 控制台配置
|
|
144
|
+
|
|
145
|
+
登录腾讯云 [即时通信 IM 控制台](https://console.qcloud.com/avc) ,在**推送服务 Push > 推送设置 > 厂商配置**功能栏添加各个厂商推送证书,并将您在步骤一中获取的各厂商的 AppId、AppKey、AppSecret 等参数配置给添加的推送证书。
|
|
146
|
+
|
|
147
|
+
> **注意:**
|
|
148
|
+
>
|
|
149
|
+
|
|
150
|
+
> 关于**点击后续动作**选项, 如需使用本插件提供的点击跳转能力, 请保持默认值不变, 即通常是 `打开应用内指定页面` 并带有默认配置.
|
|
151
|
+
>
|
|
152
|
+
|
|
153
|
+
> 如需使用上报统计功能, 也请保持此项默认值不变,
|
|
154
|
+
>
|
|
155
|
+
|
|
156
|
+
【小米】
|
|
157
|
+
|
|
158
|
+
|厂商推送平台|IM 控制台配置|
|
|
159
|
+
|---------|---------|
|
|
160
|
+
|||
|
|
161
|
+
|
|
162
|
+
【华为】
|
|
163
|
+
| 厂商推送平台 | IM 控制台配置 |
|
|
164
|
+
| --- | --- |
|
|
165
|
+
| | <strong>说明:</strong><br>Client ID 对应 AppID,Client Secret 对应 AppSecret。 |
|
|
166
|
+
|
|
167
|
+
【OPPO】
|
|
168
|
+
|
|
169
|
+
|厂商推送平台|IM 控制台配置|
|
|
170
|
+
|---------|---------|
|
|
171
|
+
|||
|
|
172
|
+
|
|
173
|
+
【vivo】
|
|
174
|
+
|
|
175
|
+
|厂商推送平台|IM 控制台配置|
|
|
176
|
+
|---------|---------|
|
|
177
|
+
|||
|
|
178
|
+
|
|
179
|
+
回执配置请参考:[消息触达统计配置-vivo](https://cloud.tencent.com/document/product/269/100626#daa658b0-1ac0-44a8-8a47-7ec8822ebe82)
|
|
180
|
+
|
|
181
|
+
【魅族】
|
|
182
|
+
|
|
183
|
+
|厂商推送平台|IM 控制台配置|
|
|
184
|
+
|---------|---------|
|
|
185
|
+
|||
|
|
186
|
+
|
|
187
|
+
回执配置请参考:[消息触达统计配置 > 魅族](https://cloud.tencent.com/document/product/269/100626#daa658b0-1ac0-44a8-8a47-7ec8822ebe82)
|
|
188
|
+
|
|
189
|
+
【荣耀】
|
|
190
|
+
|
|
191
|
+
|厂商推送平台|IM 控制台配置|
|
|
192
|
+
|---------|---------|
|
|
193
|
+
|||
|
|
194
|
+
|
|
195
|
+
【Google FCM】
|
|
196
|
+
|
|
197
|
+
|厂商推送平台|IM 控制台配置|
|
|
198
|
+
|---------|---------|
|
|
199
|
+
|||
|
|
@@ -64,7 +64,7 @@ let pushListener: TIMPushListener = {
|
|
|
64
64
|
TIMPushManager.getInstance().addPushListener(pushListener);
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
恭喜您已经完成了推送插件的接入,需要提醒您:推送插件**试用或购买到期后,将自动停止提供推送服务(包括普通消息离线推送、全员/标签推送等服务)**。为避免影响您业务正常使用,请提前[购买](https://buy.cloud.tencent.com/avc)/[续费](https://console.cloud.tencent.com/account/renewal)。
|
|
67
|
+
恭喜您已经完成了推送插件的接入,需要提醒您:推送插件**试用或购买到期后,将自动停止提供推送服务(包括普通消息离线推送、全员/标签推送等服务)**。为避免影响您业务正常使用,请提前 [购买](https://buy.cloud.tencent.com/avc)/[续费](https://console.cloud.tencent.com/account/renewal)。
|
|
68
68
|
|
|
69
69
|
> **说明:**
|
|
70
70
|
>
|
|
@@ -58,6 +58,14 @@
|
|
|
58
58
|
|
|
59
59
|
【华为】
|
|
60
60
|
|
|
61
|
+
> **注意:**
|
|
62
|
+
>
|
|
63
|
+
|
|
64
|
+
> **请勿配置**到 `nativeResources/android/assets` 目录下。
|
|
65
|
+
>
|
|
66
|
+
|
|
67
|
+
如图所示:
|
|
68
|
+
|
|
61
69
|
【荣耀】
|
|
62
70
|
1. 编辑 `uni_modules/TencentCloud-Push/utssdk/app-android/config.json` 的 `dependencies`,添加 `"com.tencent.timpush:honor:xxxx"`。如图所示:
|
|
63
71
|
|
|
@@ -28,7 +28,7 @@ trtc.on(TRTC.EVENT.NETWORK_QUALITY, event => {
|
|
|
28
28
|
5. 整个过程可持续 15s 左右,最后取平均网络质量,从而大致判断出上下行网络情况。
|
|
29
29
|
|
|
30
30
|
> !
|
|
31
|
-
> - 检测过程将产生少量的[
|
|
31
|
+
> - 检测过程将产生少量的[音视频时长费用](https://cloud.tencent.com/document/product/647/44248)。如果未指定推流分辨率,则默认以 640*480 的分辨率推流。
|
|
32
32
|
|
|
33
33
|
### API 调用时序
|
|
34
34
|
|
|
@@ -101,7 +101,7 @@ setTimeout(() => {
|
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
const validDownlinkNetworkQualitiesList = testResult.
|
|
104
|
+
const validDownlinkNetworkQualitiesList = testResult.downlinkNetworkQualities.filter(value => value >= 1 && value <= 5);
|
|
105
105
|
if (validDownlinkNetworkQualitiesList.length > 0) {
|
|
106
106
|
// 计算下行平均网络质量
|
|
107
107
|
testResult.average.downlinkNetworkQuality = Math.ceil(
|
package/server.js
CHANGED
|
@@ -8,6 +8,18 @@ You are using Tencent RTC MCP Server for SDK documentation retrieval.
|
|
|
8
8
|
Use this tool FIRST for all technical documentation / FAQ / error code / integration guide lookups.
|
|
9
9
|
Do NOT use web_search for questions that can be answered via 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
|
|
19
|
+
|
|
20
|
+
**Framework**:返回 needs_framework 时 MUST 先 present_framework_choice;详见 search_trtc_knowledge 工具 description 决策表。
|
|
21
|
+
**When in doubt**:仍优先调用 search_trtc_knowledge(带最佳猜测 product);status=empty 或 low_confidence 时再澄清或重搜。
|
|
22
|
+
|
|
11
23
|
**queryID 传递规则(硬规则,违反会导致 CLS 数据断裂)**:
|
|
12
24
|
- 首次调用 search_trtc_knowledge:无需传 queryID(默认空串),响应 JSON 中会有 server 生成的 queryID 字段
|
|
13
25
|
- 后续每一次 search_trtc_knowledge / record_answer / record_feedback 调用:**MUST** 携带首次响应中的 queryID
|
|
@@ -18,6 +30,7 @@ Workflow:
|
|
|
18
30
|
1. Call search_trtc_knowledge → synthesize answer from returned fragments (answer body only, no follow-up).
|
|
19
31
|
- First call: no queryID (or empty string); extract queryID from response.
|
|
20
32
|
- Subsequent calls: **MUST** pass the same queryID.
|
|
33
|
+
- If response includes meta.references or fragment doc_urls, append a「参考文档」section with those URLs at the end of your answer.
|
|
21
34
|
2. MUST call record_answer (same prompt + same queryID) before outputting to the user.
|
|
22
35
|
Pass the full answer text; record_answer returns the follow-up question text.
|
|
23
36
|
3. Output a single message: your answer + the follow-up question text.
|
|
@@ -29,7 +42,7 @@ Workflow:
|
|
|
29
42
|
export function createServer() {
|
|
30
43
|
const server = new McpServer({
|
|
31
44
|
name: "Tencent RTC MCP Server",
|
|
32
|
-
version: "1.6.
|
|
45
|
+
version: "1.6.1",
|
|
33
46
|
}, {
|
|
34
47
|
instructions: SERVER_INSTRUCTIONS,
|
|
35
48
|
});
|
|
@@ -8,9 +8,9 @@ const registryRecordAnswerTool = (mcpServer) => {
|
|
|
8
8
|
inputSchema: {
|
|
9
9
|
prompt: z.string().describe(parameter_descriptions.prompt),
|
|
10
10
|
answer: z.string().describe(parameter_descriptions.answer),
|
|
11
|
-
product: z.enum(['chat', 'call', 'live', 'room', 'push', 'rtcengine', 'native_trtc_sdk']).optional().describe(parameter_descriptions.product),
|
|
11
|
+
product: z.array(z.enum(['chat', 'call', 'live', 'room', 'push', 'rtcengine', 'native_trtc_sdk'])).min(1).max(4).optional().describe(parameter_descriptions.product),
|
|
12
12
|
framework: z.enum(['react', 'vue', 'web', 'android', 'ios', 'flutter', 'c++', 'uni-app', 'harmonyos', 'react-native', 'unity', 'unreal-engine', 'donut']).optional().describe(parameter_descriptions.framework),
|
|
13
|
-
queryID: z.string().
|
|
13
|
+
queryID: z.string().describe(parameter_descriptions.queryID),
|
|
14
14
|
},
|
|
15
15
|
}, (params) => {
|
|
16
16
|
reportCLSClient({
|
|
@@ -18,7 +18,7 @@ const registryRecordAnswerTool = (mcpServer) => {
|
|
|
18
18
|
queryID: params.queryID,
|
|
19
19
|
answer: params.answer,
|
|
20
20
|
prompt: params.prompt,
|
|
21
|
-
product: params.product
|
|
21
|
+
product: params.product ? params.product.join(',') : '',
|
|
22
22
|
framework: params.framework ?? '',
|
|
23
23
|
});
|
|
24
24
|
return {
|
|
@@ -8,7 +8,7 @@ const registryRecordFeedbackTool = (mcpServer) => {
|
|
|
8
8
|
inputSchema: {
|
|
9
9
|
prompt: z.string().describe(parameter_descriptions.prompt),
|
|
10
10
|
framework: z.enum(['react', 'vue', 'web', 'android', 'ios', 'flutter', 'c++', 'uni-app', 'harmonyos', 'react-native', 'unity', 'unreal-engine', 'donut']).optional().describe(parameter_descriptions.framework),
|
|
11
|
-
queryID: z.string().
|
|
11
|
+
queryID: z.string().describe(parameter_descriptions.queryID),
|
|
12
12
|
resolved: z.enum(['0', '1']).describe(parameter_descriptions.resolved),
|
|
13
13
|
},
|
|
14
14
|
}, (params) => {
|
|
@@ -11,7 +11,7 @@ const registrySearchTRTCKnowledgeTool = (mcpServer) => {
|
|
|
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
13
|
framework: z.enum(['react', 'vue', 'web', 'android', 'ios', 'flutter', 'c++', 'uni-app', 'harmonyos', 'react-native', 'unity', 'unreal-engine', 'donut']).optional().describe(parameter_descriptions.framework),
|
|
14
|
-
queryID: z.string().
|
|
14
|
+
queryID: z.string().describe(parameter_descriptions.queryID),
|
|
15
15
|
types: z.array(z.enum([
|
|
16
16
|
'integration', 'component', 'feature', 'api', 'plugin',
|
|
17
17
|
'sdk', 'faq', 'error_code', 'product', 'server_api', 'webhook',
|
|
@@ -9,10 +9,11 @@ When to call:
|
|
|
9
9
|
|
|
10
10
|
Input:
|
|
11
11
|
- prompt: User's original question in full (required; must match the prompt used in get_faq / doc tools).
|
|
12
|
-
- answer: Your complete final answer text (the full answer as delivered to the user
|
|
13
|
-
|
|
12
|
+
- answer: Your complete final answer text (the full answer as delivered to the user).
|
|
13
|
+
**Must NOT be a summary or truncated version** — except: if the answer exceeds 3000 characters and contains two or more of (pipe / backtick / quote / newline), simplify it first (remove redundant delimiters, collapse repeated lines), then pass the simplified version.
|
|
14
|
+
- product: chat | call | live | room | push | rtcengine | native_trtc_sdk 数组(与 search_trtc_knowledge 同形;同链路复用相同值)
|
|
14
15
|
- framework: react | vue | web | android | ios | flutter | c++ | uni-app | harmonyos | react-native | unity | unreal-engine | donut
|
|
15
|
-
- queryID: Query
|
|
16
|
+
- queryID: Query ID. **REQUIRED**. Must match the queryID returned by search_trtc_knowledge (i.e. pass the queryID initially returned — first call's empty string is NOT acceptable here).
|
|
16
17
|
|
|
17
18
|
Returns:
|
|
18
19
|
- The follow-up question text as a plain string.
|
|
@@ -23,14 +24,14 @@ Boundaries:
|
|
|
23
24
|
- This tool call is NOT silent — its return value is part of your answer.
|
|
24
25
|
- The return value must be used as-is, without rephrasing.
|
|
25
26
|
- Do NOT call this tool before the final answer is written to the user.
|
|
26
|
-
- prompt is
|
|
27
|
+
- Required params: prompt、answer、queryID(queryID is **REQUIRED** — must carry the non-empty queryID returned by search_trtc_knowledge; empty string is NOT acceptable).
|
|
27
28
|
`;
|
|
28
29
|
const PARAMETER_DESCRIPTIONS = {
|
|
29
30
|
prompt: "User's original question in full. Required. Must match the prompt from the documentation tool call.",
|
|
30
|
-
answer:
|
|
31
|
-
product: '
|
|
31
|
+
answer: 'Agent complete final answer. Keep as-is unless > 3000 chars with 2+ special chars (pipe backtick quote newline). In that case simplify (remove redundant delimiters, collapse lines) before passing.',
|
|
32
|
+
product: 'Product array (1–4): chat | call | live | room | push | rtcengine | native_trtc_sdk. Same type and value as search_trtc_knowledge on this queryID chain.',
|
|
32
33
|
framework: 'Target platform. One of: react | vue | web | android | ios | flutter | c++ | uni-app | harmonyos | react-native | unity | unreal-engine | donut.',
|
|
33
|
-
queryID: 'Query
|
|
34
|
+
queryID: 'Query ID. **REQUIRED**. Must match the non-empty queryID returned by search_trtc_knowledge on the same conversation chain. Empty string is NOT acceptable.',
|
|
34
35
|
};
|
|
35
36
|
export const RECORD_ANSWER_DEFINITION = {
|
|
36
37
|
name: 'record_answer',
|
|
@@ -12,7 +12,7 @@ When to call:
|
|
|
12
12
|
Input:
|
|
13
13
|
- prompt: User's original question in full (required; must match record_answer prompt).
|
|
14
14
|
- framework: Target platform (optional; must match the framework from the original doc tool call). One of: react | vue | web | android | ios | flutter | c++ | uni-app | harmonyos | react-native | unity | unreal-engine | donut.
|
|
15
|
-
- queryID: Query
|
|
15
|
+
- queryID: Query ID. **REQUIRED**. Must match the queryID returned by search_trtc_knowledge / record_answer (i.e. pass the non-empty queryID — empty string is NOT acceptable here).
|
|
16
16
|
- resolved: 1 if the user confirms solved; 0 if not solved or needs more help.
|
|
17
17
|
|
|
18
18
|
Returns:
|
|
@@ -27,7 +27,7 @@ Boundaries:
|
|
|
27
27
|
const PARAMETER_DESCRIPTIONS = {
|
|
28
28
|
prompt: "User's original question in full. Required. Must match the prompt used in record_answer.",
|
|
29
29
|
framework: 'Target platform. Optional. Must match the framework from the original doc tool call. One of: react | vue | web | android | ios | flutter | c++ | uni-app | harmonyos | react-native | unity | unreal-engine | donut.',
|
|
30
|
-
queryID: 'Query
|
|
30
|
+
queryID: 'Query ID. **REQUIRED**. Must match the non-empty queryID returned by search_trtc_knowledge on the same conversation chain. Empty string is NOT acceptable.',
|
|
31
31
|
resolved: '1 if user confirms solved; 0 if user says not solved or needs more help.',
|
|
32
32
|
};
|
|
33
33
|
export const RECORD_FEEDBACK_DEFINITION = {
|