@tencent-rtc/mcp 1.7.3 → 1.7.5

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 (30) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +22 -23
  3. package/knowledge/path-meta.js +23 -1
  4. package/package.json +1 -1
  5. package/resource/index/manifest.json +1 -1
  6. package/resource/knowledge/callkit/best-practice/android/video-chat-dating.md +497 -0
  7. package/resource/knowledge/callkit/best-practice/flutter/android-keep-call-alive-background.md +79 -0
  8. package/resource/knowledge/callkit/best-practice/flutter/background-incoming-call-no-notification.md +99 -0
  9. package/resource/knowledge/callkit/best-practice/flutter/ios-keep-call-alive-background.md +93 -0
  10. package/resource/knowledge/callkit/best-practice/flutter/ios-startup-crash-version-voip.md +68 -0
  11. package/resource/knowledge/callkit/core-sdk/miniprogram/call-engine.md +386 -0
  12. package/resource/knowledge/callkit/core-sdk/miniprogram/call-event.md +315 -0
  13. package/resource/knowledge/callkit/faq/uniapp-miniprogram.md +204 -0
  14. package/resource/knowledge/callkit/preset/harmonyos/api.md +362 -0
  15. package/resource/knowledge/callkit/preset/harmonyos/integration.md +318 -0
  16. package/resource/knowledge/callkit/preset/miniprogram/api-uniapp.md +430 -0
  17. package/resource/knowledge/callkit/preset/miniprogram/api.md +293 -0
  18. package/resource/knowledge/callkit/preset/miniprogram/integration.md +294 -0
  19. package/resource/knowledge/callkit/preset/miniprogram/uniapp-integration.md +224 -0
  20. package/resource/knowledge/callkit/preset/uni-app/api.md +339 -0
  21. package/resource/knowledge/callkit/preset/uni-app/integration.md +243 -0
  22. package/resource/knowledge/chat/preset/react/h5/integration.md +964 -0
  23. package/resource/knowledge/chat/preset/vue/h5/integration.md +717 -0
  24. package/resource/knowledge/rtcengine/web/plugin/23-advanced-support-detection.md +6 -6
  25. package/resource/knowledge/rtcengine/web/plugin/31-advanced-plugins-overview.md +8 -6
  26. package/resource/knowledge/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +30 -10
  27. package/server.js +1 -1
  28. package/utils/preflight-route.js +203 -185
  29. package/utils/report-cls-client.js +1 -1
  30. package/utils/report-es-client.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## Version 1.7.5 @2026.09.04
4
+
5
+ ### Changed
6
+ - Refactored the `preflight-route` decision model to an **agent-first, minimal-correction** strategy: prioritize agent-provided `product/frameworks`, and use prompt signals only for high-confidence corrections and narrowing to avoid unsupported expansion.
7
+ - Optimized framework-axis conflict handling: added/enhanced strong-lock strategies for `react-native` and `miniprogram`, and in strong-lock scenarios, separated host environment (`android/ios`) from the actual framework to reduce over-narrowing.
8
+ - Optimized native TRTC correction: when the prompt matches native TRTC classes/methods and no WebRTC hard signal is present, narrow `rtcengine` to `native_trtc_sdk` to reduce web/native cross-routing risk.
9
+
10
+ ### Fixed
11
+ - Fixed over-overriding of agent results when strong framework terms are only passively mentioned, reducing false corrections triggered by doc-enumeration terms.
12
+
13
+ ## Version 1.7.4 @2026.08.31
14
+
15
+ ### Added
16
+ - Added 4 CallKit Flutter best-practice docs: Android background call keep-alive, iOS background audio keep-alive, iOS startup crash troubleshooting, background incoming call notification troubleshooting.
17
+ - Added CallKit Android video chat dating scenario (VideoChat Demo) best-practice doc, covering Demo setup and component quick integration.
18
+ - Added CallKit HarmonyOS platform support: UIKit integration guide and API reference.
19
+ - Added CallKit Mini Program & uni-app docs: UIKit integration guide, API reference, uni-app packaging guide.
20
+ - Added CallKit uni-app (Android/iOS) standalone integration docs and API reference.
21
+ - Added Chat Vue3/React H5 mobile integration docs.
22
+
23
+ ### Changed
24
+ - Optimized Chat UIKit search tags: vue/react framework changed from single tag to dual tags (`['vue','web']` / `['react','web']`), allowing `frameworks=['web']` to match Chat Web docs.
25
+
3
26
  ## Version 1.7.3 @2026.08.17
4
27
 
5
28
  ### Added
package/README.md CHANGED
@@ -57,39 +57,38 @@ npx -y @tencent-rtc/mcp
57
57
 
58
58
  > Only recent updates are listed here. For full history, see `CHANGELOG.md`.
59
59
 
60
- ## Version 1.7.3 @2026.08.17
61
-
62
- ### Added
63
- - Added knowledge base resources for RoomKit multi-platform integration, recording, whiteboard, network proxy, AI noise reduction, and subtitle translation, expanding coverage of the Room product domain.
64
- - Added best-practice docs covering error codes, log levels, automatic screen-share stop, and WeChat Mini Program error troubleshooting.
65
- - Added a generic additive rerank module with anchor selection and phrase extraction, integrated into the search reranking logic to improve recall ranking accuracy.
60
+ ## Version 1.7.5 @2026.09.04
66
61
 
67
62
  ### Changed
68
- - Optimized the BM25 index to use prototype-less objects, improving the isolation and stability of the index structure.
63
+ - Refactored the `preflight-route` decision model to an **agent-first, minimal-correction** strategy: prioritize agent-provided `product/frameworks`, and use prompt signals only for high-confidence corrections and narrowing to avoid unsupported expansion.
64
+ - Optimized framework-axis conflict handling: added/enhanced strong-lock strategies for `react-native` and `miniprogram`, and in strong-lock scenarios, separated host environment (`android/ios`) from the actual framework to reduce over-narrowing.
65
+ - Optimized native TRTC correction: when the prompt matches native TRTC classes/methods and no WebRTC hard signal is present, narrow `rtcengine` to `native_trtc_sdk` to reduce web/native cross-routing risk.
69
66
 
70
67
  ### Fixed
71
- - Fixed BM25 scoring anomalies caused by prototype-key pollution by adding prototype-key guards, preventing score pollution and NaN issues.
68
+ - Fixed over-overriding of agent results when strong framework terms are only passively mentioned, reducing false corrections triggered by doc-enumeration terms.
72
69
 
73
- ## Version 1.7.1 @2026.08.11
70
+ ## Version 1.7.4 @2026.08.31
74
71
 
75
72
  ### Added
76
- - Added pre-search normalization: normalizes `product` / `frameworks` based on prompt truth, fixing retrieval bias caused by wrong agent inference.
73
+ - Added 4 CallKit Flutter best-practice docs: Android background call keep-alive, iOS background audio keep-alive, iOS startup crash troubleshooting, background incoming call notification troubleshooting.
74
+ - Added CallKit Android video chat dating scenario (VideoChat Demo) best-practice doc, covering Demo setup and component quick integration.
75
+ - Added CallKit HarmonyOS platform support: UIKit integration guide and API reference.
76
+ - Added CallKit Mini Program & uni-app docs: UIKit integration guide, API reference, uni-app packaging guide.
77
+ - Added CallKit uni-app (Android/iOS) standalone integration docs and API reference.
78
+ - Added Chat Vue3/React H5 mobile integration docs.
77
79
 
78
80
  ### Changed
79
- - Optimized the `search_trtc_knowledge` output contract: removed brevity wording such as "1-2 sentence per subsection", replaced with complete synthesized answers.
80
-
81
- ### Fixed
82
- - Fixed the case where mis-passed dual product / dual frameworks (e.g., "安卓 Web TRTC") were not corrected according to the prompt truth.
81
+ - Optimized Chat UIKit search tags: vue/react framework changed from single tag to dual tags (`['vue','web']` / `['react','web']`), allowing `frameworks=['web']` to match Chat Web docs.
83
82
 
84
- ### Version 1.7.0 @2026.08.02
83
+ ## Version 1.7.3 @2026.08.17
85
84
 
86
- #### Added
87
- - Added and synchronized best-practice docs across product domains including Chat / Call / Live / Room to improve knowledge coverage.
85
+ ### Added
86
+ - Added knowledge base resources for RoomKit multi-platform integration, recording, whiteboard, network proxy, AI noise reduction, and subtitle translation, expanding coverage of the Room product domain.
87
+ - Added best-practice docs covering error codes, log levels, automatic screen-share stop, and WeChat Mini Program error troubleshooting.
88
+ - Added a generic additive rerank module with anchor selection and phrase extraction, integrated into the search reranking logic to improve recall ranking accuracy.
88
89
 
89
- #### Changed
90
- - Continued refactoring of the bilingual retrieval pipeline, including query normalization, intent routing, candidate filtering, and exact-match strategies.
91
- - Improved recall and ranking for best-practice and URL-based documents to increase answer usability and stability.
92
- - Improved `search_trtc_knowledge` definitions and answer constraints for better readability and executability.
90
+ ### Changed
91
+ - Optimized the BM25 index to use prototype-less objects, improving the isolation and stability of the index structure.
93
92
 
94
- #### Fixed
95
- - Fixed off-topic retrieval in some complex queries, reducing high-score false-positive hits.
93
+ ### Fixed
94
+ - Fixed BM25 scoring anomalies caused by prototype-key pollution by adding prototype-key guards, preventing score pollution and NaN issues.
@@ -8,6 +8,9 @@ function inferTypesFromFilename(fileName, baseTypes) {
8
8
  types.push('error_code');
9
9
  if (lower === 'client-api.md' || lower === 'api.md' || lower === 'index.md')
10
10
  types.push('api');
11
+ // api-<变体>.md(如 api-uniapp.md:微信小程序 uni-app 打包 API)同样是 API 文档
12
+ if (/^api-[\w-]+\.mdx?$/.test(lower))
13
+ types.push('api');
11
14
  if (lower === 'faq.md')
12
15
  types.push('faq');
13
16
  // 文件名 = integration.md 不再默认 push integration(由上游 framework 分支显式声明 type)
@@ -75,7 +78,14 @@ export function inferPathMeta(relativeSource) {
75
78
  else if (normalized.startsWith('knowledge/chat/') || normalized.startsWith('integration/chat/')) {
76
79
  product = 'chat';
77
80
  if (parts.includes('preset') && parts.length >= 4) {
78
- framework = [normalizeFrameworkDir(parts[parts.indexOf('preset') + 1])];
81
+ const fw = normalizeFrameworkDir(parts[parts.indexOf('preset') + 1]);
82
+ // vue/react 运行在 Web/H5 端,追加 web 标签,使 frameworks=['web'] 也能命中
83
+ framework = (fw === 'vue' || fw === 'react') ? [fw, 'web'] : [fw];
84
+ variant = 'preset';
85
+ // preset 下的 integration.md 显式标记 integration type
86
+ if (fileName.toLowerCase() === 'integration.md') {
87
+ types.push('integration');
88
+ }
79
89
  }
80
90
  if (parts.includes('features')) {
81
91
  types.push('feature');
@@ -137,6 +147,13 @@ export function inferPathMeta(relativeSource) {
137
147
  framework = [normalizeFrameworkDir(parts[coreIdx + 1])];
138
148
  variant = 'core-sdk';
139
149
  }
150
+ // 微信小程序 uni-app 打包版:目录归入 miniprogram(运行平台=微信小程序),
151
+ // 但技术栈是 uni-app,通过文件名 *-uniapp.md / uniapp-*.md 触发双标签,
152
+ // 使「微信小程序」与「uni-app」两种 framework 检索都能召回同一篇文档。
153
+ // 原生小程序(api.md/integration.md 等无 uniapp 标记)保持单 miniprogram 标签。
154
+ if (framework[0] === 'miniprogram' && /(^uniapp[-.]|-uniapp\.mdx?$)/.test(fileName.toLowerCase())) {
155
+ framework = ['miniprogram', 'uni-app'];
156
+ }
140
157
  // callkit 最佳实践目录:knowledge/callkit/best-practice/{platform}/{topic}.md
141
158
  // 统一按 FAQ/经验类知识处理,支持 types=faq + frameworks={platform} 的精确检索。
142
159
  // 与 chat best-practice 对齐:common 目录表示多平台通用,按最全集覆盖。
@@ -147,6 +164,11 @@ export function inferPathMeta(relativeSource) {
147
164
  : [fwSlug];
148
165
  types.push('faq');
149
166
  }
167
+ // preset 下的 integration.md(纯文件名,无连字符前缀)需显式标记 integration type,
168
+ // 否则 inferTypesFromFilename 只匹配 *-integration.md,导致兜底为 faq。
169
+ if (variant === 'preset' && fileName.toLowerCase() === 'integration.md') {
170
+ types.push('integration');
171
+ }
150
172
  if (parts.includes('faq'))
151
173
  types.push('faq', 'error_code');
152
174
  if (fileName === 'api.md')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencent-rtc/mcp",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "description": "Tencent Cloud MCP Server for SDK",
5
5
  "type": "module",
6
6
  "main": "index.js",