@tencent-rtc/mcp 1.2.9 → 1.3.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.
Files changed (68) hide show
  1. package/package.json +2 -2
  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/chatuikit/react/integration.md +430 -49
  5. package/resource/doc/chatuikit/react/workflow.md +258 -0
  6. package/resource/doc/chatuikit/vue/integration.md +355 -144
  7. package/resource/doc/chatuikit/vue/workflow.md +395 -0
  8. package/resource/doc/livekit/vue/components/co-guest-panel.md +3 -3
  9. package/resource/doc/livekit/vue/components/live-view.md +4 -4
  10. package/resource/doc/livekit/vue/{components/live-list.md → live-list-integration.md} +7 -7
  11. package/resource/doc/livekit/vue/{components/live-player.md → live-player-desk-integration.md} +8 -8
  12. package/resource/doc/livekit/vue/live-player-h5-integration.md +269 -0
  13. package/resource/doc/livekit/vue/workflow.md +218 -0
  14. package/resource/doc/trtc/C++/ITRTCCloud.md +4119 -0
  15. package/resource/doc/trtc/C++/ITRTCStatistics.md +325 -0
  16. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +1289 -0
  17. package/resource/doc/trtc/C++/ITXDeviceManager.md +1028 -0
  18. package/resource/doc/trtc/C++/TRTCCloudCallback.md +2650 -0
  19. package/resource/doc/trtc/C++/TRTCTypeDef.md +3600 -0
  20. package/resource/doc/trtc/C++/TXLiteAVCode.md +921 -0
  21. package/resource/doc/trtc/android/TRTCCloud.md +3782 -0
  22. package/resource/doc/trtc/android/TRTCCloudDef.md +3880 -0
  23. package/resource/doc/trtc/android/TRTCCloudListener.md +2431 -0
  24. package/resource/doc/trtc/android/TRTCStatistics.md +295 -0
  25. package/resource/doc/trtc/android/TXAudioEffectManager.md +1289 -0
  26. package/resource/doc/trtc/android/TXBeautyManager.md +979 -0
  27. package/resource/doc/trtc/android/TXDeviceManager.md +440 -0
  28. package/resource/doc/trtc/android/TXLiteAVCode.md +905 -0
  29. package/resource/doc/trtc/iOS/TRTCCloud.md +4238 -0
  30. package/resource/doc/trtc/iOS/TRTCCloudDef.md +3730 -0
  31. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +2531 -0
  32. package/resource/doc/trtc/iOS/TRTCStatistics.md +295 -0
  33. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +1100 -0
  34. package/resource/doc/trtc/iOS/TXBeautyManager.md +985 -0
  35. package/resource/doc/trtc/iOS/TXDeviceManager.md +1024 -0
  36. package/resource/doc/trtc/iOS/TXLiteAVCode.md +928 -0
  37. package/tools/chat/get-web-chat-integration.js +31 -14
  38. package/tools/chat/get-web-chat-integration.js.map +1 -1
  39. package/tools/definitions/get_faq_def.js +4 -0
  40. package/tools/definitions/get_faq_def.js.map +1 -1
  41. package/tools/definitions/get_native_live_api_def.js +1 -1
  42. package/tools/definitions/get_trtc_native_api_def.js +16 -0
  43. package/tools/definitions/get_trtc_native_api_def.js.map +1 -0
  44. package/tools/definitions/get_web_chat_uikit_integration_def.js +19 -12
  45. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
  46. package/tools/definitions/get_web_live_uikit_component_detail_def.js +13 -8
  47. package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +1 -1
  48. package/tools/definitions/get_web_live_uikit_integration_def.js +32 -0
  49. package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -0
  50. package/tools/index.js +6 -4
  51. package/tools/index.js.map +1 -1
  52. package/tools/live/get-web-live-uikit-integration.js +52 -0
  53. package/tools/live/get-web-live-uikit-integration.js.map +1 -0
  54. package/tools/trtc/get-trtc-native-api.js +31 -0
  55. package/tools/trtc/get-trtc-native-api.js.map +1 -0
  56. package/utils/generate-structured-result.js +34 -0
  57. package/utils/generate-structured-result.js.map +1 -0
  58. package/utils/handle-component-name.js +0 -8
  59. package/utils/handle-component-name.js.map +1 -1
  60. package/utils/report-cls-client.js +1 -1
  61. package/utils/report-es-client.js +1 -1
  62. package/resource/doc/chatuikit/react/chat_window_integration.md +0 -94
  63. package/resource/doc/chatuikit/vue/chat_window_integration.md +0 -156
  64. package/tools/chat/get-web-chat-window-integration.js +0 -28
  65. package/tools/chat/get-web-chat-window-integration.js.map +0 -1
  66. package/tools/definitions/get_web_chat_window_integration_def.js +0 -26
  67. package/tools/definitions/get_web_chat_window_integration_def.js.map +0 -1
  68. /package/resource/doc/livekit/vue/{components/broadcast.md → live-pusher-integration.md} +0 -0
@@ -2,27 +2,44 @@ import { z } from 'zod';
2
2
  import { GET_WEB_CHAT_UIKIT_INTEGRATION_DEFINITION } from '../definitions/get_web_chat_uikit_integration_def.js';
3
3
  import { getDocContent } from '../../utils/get-doc-content.js';
4
4
  import { reportCLSClient } from '../../utils/report-cls-client.js';
5
- import { handleFramework } from '../../utils/handle-framework.js';
6
- function getResultText(params) {
7
- const { framework = '' } = params;
5
+ import { generateStructuredResult } from '../../utils/generate-structured-result.js';
6
+ async function getResultText(params) {
7
+ const { framework = '', goals = [] } = params;
8
8
  reportCLSClient({
9
9
  method: 'get_web_chat_uikit_integration',
10
- framework: framework,
10
+ info: goals.join(','),
11
+ framework,
11
12
  });
12
- return getDocContent(['chatuikit', `${handleFramework(framework)}`, 'integration.md']);
13
+ // 获取工作流指令
14
+ const baseInstructions = getDocContent(['chatuikit', framework, 'workflow.md']);
15
+ // 批量读取目标文档并生成结构化结果
16
+ const result = await generateStructuredResult({
17
+ baseInstructions,
18
+ goals,
19
+ framework,
20
+ pathMap: {
21
+ [goals[0]]: ['chatuikit', framework, 'integration.md'],
22
+ },
23
+ });
24
+ return result;
13
25
  }
14
26
  const registryGetWebChatIntegrationTool = (mcpServer) => {
15
27
  const { name, description, parameter_descriptions } = GET_WEB_CHAT_UIKIT_INTEGRATION_DEFINITION;
16
28
  mcpServer.tool(name, description, {
17
- framework: z.enum(['react', 'vue']).describe(parameter_descriptions.framework),
18
- }, (params) => ({
19
- content: [
20
- {
21
- type: 'text',
22
- text: getResultText(params),
23
- }
24
- ]
25
- }));
29
+ framework: z.enum(['react', 'vue', 'uniapp-app']).describe(parameter_descriptions.framework),
30
+ goals: z.array(z.enum(['full-featured', 'chat-only'])).describe(parameter_descriptions.goals)
31
+ }, async (params) => {
32
+ const result = await getResultText(params);
33
+ return {
34
+ content: [
35
+ {
36
+ type: 'text',
37
+ text: result.llm_code_generation_instructions_md,
38
+ }
39
+ ],
40
+ result: result,
41
+ };
42
+ });
26
43
  };
27
44
  export { registryGetWebChatIntegrationTool };
28
45
  //# sourceMappingURL=get-web-chat-integration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-web-chat-integration.js","sourceRoot":"","sources":["../../../src/tools/chat/get-web-chat-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yCAAyC,EAAE,MAAM,sDAAsD,CAAC;AACjH,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAClC,eAAe,CAAC;QACd,MAAM,EAAE,gCAAgC;QACxC,SAAS,EAAE,SAAS;KACrB,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,yCAAyC,CAAC;IAChG,SAAS,CAAC,IAAI,CACZ,IAAI,EACJ,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,SAAS,CAAC;KAC/E,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
1
+ {"version":3,"file":"get-web-chat-integration.js","sourceRoot":"","sources":["../../../src/tools/chat/get-web-chat-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yCAAyC,EAAE,MAAM,sDAAsD,CAAC;AACjH,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,KAAK,UAAU,aAAa,CAAC,MAA2B;IACtD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAC9C,eAAe,CAAC;QACd,MAAM,EAAE,gCAAgC;QACxC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;QACrB,SAAS;KACV,CAAC,CAAC;IACH,UAAU;IACV,MAAM,gBAAgB,GAAG,aAAa,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAChF,mBAAmB;IACnB,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC;QAC5C,gBAAgB;QAChB,KAAK;QACL,SAAS;QACT,OAAO,EAAE;YACP,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,gBAAgB,CAAC;SACvD;KACF,CAAC,CAAA;IACF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,yCAAyC,CAAC;IAChG,SAAS,CAAC,IAAI,CACZ,IAAI,EACJ,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,SAAS,CAAC;QAC5F,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,KAAK,CAAC;KAC9F,EACD,KAAK,EAAE,MAAW,EAAE,EAAE;QACpB,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,CAAA;QAC1C,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM,CAAC,mCAAmC;iBACjD;aACF;YACD,MAAM,EAAE,MAAM;SACf,CAAA;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
@@ -13,6 +13,10 @@ const TOOL_DESCRIPTION = `
13
13
 
14
14
  [KEYWORDS]: FAQ, Knowledge Base, Document Retrieval, Common Questions, Chat, Call, TRTC, Real-Time Communication, User Authentication, UserSig, SDK.\n
15
15
 
16
+ [Mandatory Constraints]: \n
17
+ 1. Product Selection Constraint: If the LLM cannot explicitly infer the target product line (product) from the user's prompt, it must prioritize guiding the user to select one of the following products: (chat, call, live, room, rtcengine).
18
+ 2. Framework Selection Constraint: If the LLM cannot explicitly infer the target platform or framework (framework) from the user's prompt, it must prioritize calling the 'present_framework_choice' tool to guide the user to select the platform/framework.
19
+
16
20
  [RETURN FORMAT]: Returns raw Markdown content and a structured JSON object.
17
21
  `;
18
22
  const PARAMETER_DESCRIPTIONS = {
@@ -1 +1 @@
1
- {"version":3,"file":"get_faq_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_faq_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgBxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,wFAAwF;IACjG,SAAS,EAAE,2GAA2G;CACvH,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
1
+ {"version":3,"file":"get_faq_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_faq_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;CAoBxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,wFAAwF;IACjG,SAAS,EAAE,2GAA2G;CACvH,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
@@ -13,7 +13,7 @@ You can achieve the following functions:\n
13
13
  `;
14
14
  const PARAMETER_DESCRIPTIONS = {
15
15
  framework: 'For the Live SDK platform type. You first need to choose which platform to use to create your chat application. Currently supported frameworks are: Flutter, Android and iOS.',
16
- componentName: 'Live SDK。'
16
+ componentName: 'Live SDK.'
17
17
  };
18
18
  export const GET_NATIVE_LIVE_API_DEFINITION = {
19
19
  name: 'get_native_live_api',
@@ -0,0 +1,16 @@
1
+ const TOOL_DESCRIPTION = `The Real-Time Audio & Video (TRTC SDK) primarily offers two solutions: low-latency interactive live streaming and multi-person audio & video. It supports low-latency live streaming viewing, real-time recording, screen sharing, beauty effects, stereo sound, and seamless integration with live streaming CDNs. It is suitable for various business scenarios such as interactive live streaming, cross-room PK, voice radio, karaoke, small group classes, large group classes, voice chat, video chat, and online conferencing. This article will briefly describe the business scenarios that the low-latency interactive live streaming and multi-person audio & video solutions can address.\n
2
+
3
+ [KEYWORDS]: 'TRTC', '实时音视频', '互动直播', '多人音视频'。\n
4
+
5
+ [SUPPORTED FRAMEWORKS]: Currently only supports the Android、iOS and C++ frameworks.
6
+ `;
7
+ const PARAMETER_DESCRIPTIONS = {
8
+ framework: 'For the TRTC SDK platform type. You first need to choose which platform to use to create your chat application. Currently supported frameworks are: Flutter, Android、iOS and C++.',
9
+ componentName: 'TRTC SDK.'
10
+ };
11
+ export const GET_TRTC_NATIVE_API_DEFINITION = {
12
+ name: 'get_trtc_native_api',
13
+ description: TOOL_DESCRIPTION,
14
+ parameter_descriptions: PARAMETER_DESCRIPTIONS,
15
+ };
16
+ //# sourceMappingURL=get_trtc_native_api_def.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get_trtc_native_api_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_trtc_native_api_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;CAKxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,mLAAmL;IAC9L,aAAa,EAAE,WAAW;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
@@ -1,22 +1,29 @@
1
1
  const TOOL_DESCRIPTION = `
2
- [CORE FUNCTION]: This is a Web Chat Application Integration Tool, specialized in providing the integration solution for TUIKit components on Web or H5 platforms.\n
2
+ **Core Purpose**: As a professional Web/cross-platform Chat TUIKit integration assistant, this tool provides Agents with workflow action instructions and real-time aggregated latest documentation content to guide LLMs in helping users implement instant messaging (IM) functionality.
3
3
 
4
- [SCOPE]:\n
5
- 1. Builds an instant messaging application with functionality and UI similar to WeChat or WeChat Work, suitable for scenarios like general chat, customer service, or healthcare.\n
6
- 2. Supports UI component libraries for both React and Vue mainstream frameworks.\n
7
- 3. The application entry point can be set on a TabBar as needed, with names including keywords like 'message', 'conversation', or 'information'.\n
4
+ **Functional Goals**:
5
+ 1. full-featured: Integrate complete functionality. Includes conversation list, chat window, group management, personal center, etc. **Suitable for building WeChat/WeCom-style complete applications, or as a core Tab module in Apps.**
6
+ 2. chat-only: Integrate chat window only. **Suitable for lightweight conversation scenarios such as customer service consultations, online medical consultations, order detail page private chats, etc.**
8
7
 
9
- [KEYWORDS]: 'Web', 'H5', 'Chat Application', 'TUIKit', 'React', 'Vue', 'Integration', 'Instant Messaging', 'Customer Service', 'Healthcare', 'TabBar'.\n
8
+ **Keywords**:
9
+ 'Chat', 'TUIKit', 'chat', 'instant messaging', 'WeChat', 'WeCom', 'React', 'Vue', 'uniapp', 'integration', 'customer service', 'medical consultation', 'TabBar', 'message entry', 'conversation list', 'dialog box'.
10
10
 
11
- [MANDATORY CONSTRAINTS]:\n
12
- 1. Framework Selection Constraint: If the user has not explicitly specified the React or Vue framework in the prompt, the tool MUST prioritize calling 'present_framework_choice' to guide the user to make a selection.\n
13
- 2. Result Recording Constraint: After the TUIKit component integration is complete and the project successfully starts, the tool MUST call 'record_result' to log the integration outcome.\n
11
+ **Action Instructions & Workflow Guidance**:
12
+ When handling user requests, the Agent should use the llm_code_generation_instructions_md field returned by this tool. This field contains:
13
+ 1. Core workflow instructions: Includes environment preparation, dependency installation, SDK initialization, UserSig authentication, and component version specifications.
14
+ 2. Real-time documentation content: Dynamically returns the corresponding official integration guide based on the selected goals.
14
15
 
15
- [NOTES]:\n
16
- - When integrating the Vue version, please install @tencentcloud/chat-uikit-vue3.
16
+ LLMs MUST prioritize and exclusively use the real-time content returned by this tool to generate code, avoiding accessing external URLs independently.
17
+
18
+ **Mandatory Constraints**:
19
+ 1. Framework Selection Constraint: If the user has not explicitly specified a framework or the intent is unclear, the 'present_framework_choice' tool MUST be called first to guide the user in choosing between react, vue, and uniapp-app.
20
+ 2. Result Recording Constraint: After TUIKit component integration is complete and the project starts successfully, the 'record_result' tool MUST be called to record the integration results.
21
+
22
+ **Supported Frameworks**: react, vue, uniapp-app.
17
23
  `;
18
24
  const PARAMETER_DESCRIPTIONS = {
19
- framework: 'The Web Chat TUIKit framework type. Options: react, vue. Used to determine which framework\'s component integration solution to provide.',
25
+ framework: 'Chat TUIKit framework type. Available options: react (React Web), vue (Vue3 Web), uniapp-app (Uni-app App/H5).',
26
+ goals: "List of functional goals requested by the user. Available options: ['full-featured'] (standard application), ['chat-only'] (customer service/consultation/popup).",
20
27
  };
21
28
  export const GET_WEB_CHAT_UIKIT_INTEGRATION_DEFINITION = {
22
29
  name: 'get_web_chat_uikit_integration',
@@ -1 +1 @@
1
- {"version":3,"file":"get_web_chat_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_web_chat_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgBxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,0IAA0I;CACtJ,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
1
+ {"version":3,"file":"get_web_chat_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_web_chat_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,gHAAgH;IAC3H,KAAK,EAAE,mKAAmK;CAC3K,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
@@ -1,17 +1,22 @@
1
1
  const TOOL_DESCRIPTION = `
2
- [CORE FUNCTION]: Specialized for querying Web Live TUIKit component details, providing detailed descriptions, usage, and sample code for individual components within Web Live TUIKit. \n
2
+ 【CORE PURPOSE】Dedicated to querying detailed information about individual Web TUILiveKit components, providing comprehensive descriptions, usage guides, and example code for components within the Web TUILiveKit ecosystem.
3
3
 
4
- [SCOPE]: \n
5
- 1. Scenario Support: Specifically designed for building Web live streaming scenario products. \n
6
- 2. Component Details: Retrieves detailed documentation for the following components: Live Video Component, Live List Component, Live Viewer Component, Barrage Component (Danmu). \n
4
+ 【FUNCTIONAL SCOPE】:
5
+ 1. Scenario Support: Specifically designed for building Web live streaming applications.
6
+ 2. Component List Details:
7
+ - Live Video Component (LiveView)
8
+ - Audience List Component (LiveAudienceList)
9
+ - Barrage/Chat Component (Barrage)
10
+ - Co-Guest Management Panel Component (CoGuestPanel)
11
+ - Media Resource Configuration Panel Component (LiveScenePanel)
12
+ - Video Source Editing Panel Component (StreamMixer)
7
13
 
8
- [KEYWORDS]: 'vue live component', 'Live', 'TUIKit', 'Component Details', 'Vue', 'Live Video', 'Live List', 'Live Viewer', 'Barrage Component'. \n
9
-
10
- [SUPPORTED FRAMEWORKS]: Currently only supports the Vue framework.
14
+ 【KEYWORDS】:'vue live components', 'co-guest management','LiveKit', 'TUILiveKit', 'component details', 'Vue', 'live video', 'barrage component'.
11
15
 
16
+ 【SUPPORTED FRAMEWORK】:Currently supports only the Vue framework.
12
17
  `;
13
18
  const PARAMETER_DESCRIPTIONS = {
14
- framework: 'The framework type supported for Web Live UIKit component details. Currently only supports Vue.',
19
+ framework: 'The framework type supported by the Web Live UIKit component details query. Currently, only Vue is supported.',
15
20
  componentName: 'The specific name of the Web Live UIKit component, e.g., live-view (Live Video Component).'
16
21
  };
17
22
  export const GET_WEB_LIVE_UIKIT_COMPONENT_DETAIL_DEFINITION = {
@@ -1 +1 @@
1
- {"version":3,"file":"get_web_live_uikit_component_detail_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_web_live_uikit_component_detail_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;CAWxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,iGAAiG;IAC5G,aAAa,EAAE,4FAA4F;CAC5G,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG;IAC5D,IAAI,EAAE,qCAAqC;IAC3C,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
1
+ {"version":3,"file":"get_web_live_uikit_component_detail_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_web_live_uikit_component_detail_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgBxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,+GAA+G;IAC1H,aAAa,EAAE,4FAA4F;CAC5G,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG;IAC5D,IAAI,EAAE,qCAAqC;IAC3C,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
@@ -0,0 +1,32 @@
1
+ const TOOL_DESCRIPTION = `
2
+ 【CORE PURPOSE】:
3
+ Acting as a professional Web Live UIKit Integration Assistant, this tool is dedicated to providing Agents with workflow action commands and real-time aggregated, up-to-date documentation content to guide the LLM in implementing complex live streaming features.
4
+
5
+ 【KEYWORDS】:'liveKit', 'TUILiveKit', 'live UIKit', 'live list', 'host streaming', 'live streaming', 'audience viewing', 'desktop PC', 'mobile H5'.
6
+
7
+ 【ACTION COMMANDS AND WORKFLOW GUIDANCE】:
8
+ When processing user requests, the Agent should utilize the 'llm_code_generation_instructions_md' field returned by this tool. This field includes:
9
+ 1. Core workflow instructions (from integration.md).
10
+ 2. The latest, real-time official documentation content corresponding to the user's required features (Goals).
11
+
12
+ The LLM MUST prioritize and exclusively use the real-time documentation content returned by this tool for code generation, avoiding self-access to external URLs.
13
+
14
+ 1. Implement Live List Page: Guides the LLM to use the 'liveList' integration documentation for implementation.
15
+ 2. Implement Live Viewing Page: Guides the LLM to use the 'livePlayer' integration documentation for implementation.
16
+ 3. Implement Live Hosting Page: Guides the LLM to use the 'livePusher' integration to implement hosting configuration and streaming.
17
+ 4. Implement Live Co-Guesting: Guides the LLM to use the 'CoGuestPanel' component, in conjunction with 'livePusher' and 'livePlayer', for co-guesting logic integration.
18
+
19
+ 【FUNCTIONAL SCOPE】:
20
+ Specifically designed for building Web live streaming applications.
21
+
22
+ 【SUPPORTED FRAMEWORK】:Currently supports only the Vue framework.
23
+ `;
24
+ const PARAMETER_DESCRIPTIONS = {
25
+ goals: `A list of features requested by the user for implementation, e.g., ['liveList', 'livePlayer-desk', 'livePlayer-h5']. The tool will concurrently fetch the corresponding exclusive documentation content based on this list.`
26
+ };
27
+ export const GET_WEB_LIVE_UIKIT_INTEGRATION_DEFINITION = {
28
+ name: 'get_web_live_uikit_integration',
29
+ description: TOOL_DESCRIPTION,
30
+ parameter_descriptions: PARAMETER_DESCRIPTIONS,
31
+ };
32
+ //# sourceMappingURL=get_web_live_uikit_integration_def.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get_web_live_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_web_live_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,KAAK,EAAE,6NAA6N;CACrO,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
package/tools/index.js CHANGED
@@ -6,7 +6,6 @@ import { registryGetUserSigTool } from './common/get-usersig.js';
6
6
  import { registryGetFaqTool } from './common/get-faq.js';
7
7
  // chat
8
8
  import { registryGetWebChatIntegrationTool } from './chat/get-web-chat-integration.js';
9
- import { registryGetWebChatWindowIntegrationTool } from './chat/get-web-chat-window-integration.js';
10
9
  import { registryGetWebChatComponentDetailTool } from './chat/get-web-chat-component-detail.js';
11
10
  import { registryGetWebChatInitTool } from './chat/get-web-chat-uikit-init.js';
12
11
  // import { registryGetWebCreateGroupTool } from './chat/get-web-create-group-doc.js';
@@ -22,12 +21,13 @@ import { registryGetRTCEngineWebSDKIntegrationTool } from './rtcengine/get-rtcen
22
21
  import { registryGetTRTCWebSDKIntegrationTool } from './rtcengine/get-trtc-web-sdk-integration.js';
23
22
  import { registryGetWebAPITool } from './rtcengine/get-trtc-web-sdk-api.js';
24
23
  // live
24
+ import { registryGetWebLiveIntegrationTool } from './live/get-web-live-uikit-integration.js';
25
25
  import { registryGetWebLiveComponentDetailTool } from './live/get-web-live-component-detail.js';
26
26
  import { registerGetWebLiveStateDetailTool } from './live/get-web-live-state-detail.js';
27
27
  // room
28
28
  import { registryGetWebRoomStateDetailTool } from './room/get-web-room-state-detail.js';
29
29
  // native live
30
- import { registryGetNativeLiveAPITool } from './native_live/get-native-live-api.js';
30
+ import { registryGetTRTCNativeAPITool } from './trtc/get-trtc-native-api.js';
31
31
  function registryTools(mcpServer) {
32
32
  // common
33
33
  registryPresentFrameworkChoiceTool(mcpServer);
@@ -37,7 +37,6 @@ function registryTools(mcpServer) {
37
37
  registryGetFaqTool(mcpServer);
38
38
  // chat
39
39
  registryGetWebChatIntegrationTool(mcpServer);
40
- registryGetWebChatWindowIntegrationTool(mcpServer);
41
40
  registryGetWebChatComponentDetailTool(mcpServer);
42
41
  registryGetWebChatInitTool(mcpServer);
43
42
  //registryGetWebCreateGroupTool(mcpServer);
@@ -53,12 +52,15 @@ function registryTools(mcpServer) {
53
52
  registryGetTRTCWebSDKIntegrationTool(mcpServer);
54
53
  registryGetWebAPITool(mcpServer);
55
54
  // live
55
+ registryGetWebLiveIntegrationTool(mcpServer);
56
56
  registryGetWebLiveComponentDetailTool(mcpServer);
57
57
  registerGetWebLiveStateDetailTool(mcpServer);
58
58
  // room
59
59
  registryGetWebRoomStateDetailTool(mcpServer);
60
60
  // native live
61
- registryGetNativeLiveAPITool(mcpServer);
61
+ // registryGetNativeLiveAPITool(mcpServer);
62
+ // trtc
63
+ registryGetTRTCNativeAPITool(mcpServer);
62
64
  }
63
65
  export { registryTools, };
64
66
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,SAAS;AACT,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO;AACP,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,sFAAsF;AACtF,OAAO,EAAE,oCAAoC,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO;AACP,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE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AED,OAAO,EACL,aAAa,GACd,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ import { GET_WEB_LIVE_UIKIT_INTEGRATION_DEFINITION } from '../definitions/get_web_live_uikit_integration_def.js';
3
+ import { getDocContent } from '../../utils/get-doc-content.js';
4
+ import { generateStructuredResult } from '../../utils/generate-structured-result.js';
5
+ import { reportCLSClient } from '../../utils/report-cls-client.js';
6
+ // tools 返回结果说明
7
+ // content: 为了让框架兼容满足其对文本输出的格式要求。
8
+ // result: !!必需。LLM 依赖这个结构化 JSON 来执行复杂的推理和代码生成,它是机器可读的指令。
9
+ const PATH_MAP = {
10
+ 'liveList': ['livekit', 'vue', 'live-list-integration.md'],
11
+ 'livePlayer-desk': ['livekit', 'vue', 'live-player-desk-integration.md'],
12
+ 'livePlayer-h5': ['livekit', 'vue', 'live-player-h5-integration.md'],
13
+ 'livePusher': ['livekit', 'vue', 'live-pusher-integration.md'],
14
+ 'CoGuestPanel': ['livekit', 'vue', 'components', 'co-guest-panel.md']
15
+ };
16
+ async function getResultText(params) {
17
+ const { goals = [] } = params;
18
+ reportCLSClient({
19
+ method: 'get_web_live_uikit_integration',
20
+ info: goals.join(','),
21
+ framework: 'vue'
22
+ });
23
+ // 获取工作流指令
24
+ const baseInstructions = getDocContent(['livekit', 'vue', 'workflow.md']);
25
+ // 批量读取目标文档并生成结构化结果
26
+ const result = await generateStructuredResult({
27
+ baseInstructions,
28
+ goals,
29
+ pathMap: PATH_MAP,
30
+ framework: 'vue',
31
+ });
32
+ return result;
33
+ }
34
+ const registryGetWebLiveIntegrationTool = (mcpServer) => {
35
+ const { name, description, parameter_descriptions } = GET_WEB_LIVE_UIKIT_INTEGRATION_DEFINITION;
36
+ mcpServer.tool(name, description, {
37
+ goals: z.array(z.enum(['liveList', 'livePlayer-desk', 'livePlayer-h5', 'livePusher', 'CoGuestPanel'])).describe(parameter_descriptions.goals)
38
+ }, async (params) => {
39
+ const result = await getResultText(params);
40
+ return {
41
+ content: [
42
+ {
43
+ type: 'text',
44
+ text: result.llm_code_generation_instructions_md,
45
+ }
46
+ ],
47
+ result: result,
48
+ };
49
+ });
50
+ };
51
+ export { registryGetWebLiveIntegrationTool };
52
+ //# sourceMappingURL=get-web-live-uikit-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-web-live-uikit-integration.js","sourceRoot":"","sources":["../../../src/tools/live/get-web-live-uikit-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yCAAyC,EAAE,MAAM,sDAAsD,CAAC;AACjH,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,eAAe;AACf,iCAAiC;AACjC,yDAAyD;AAEzD,MAAM,QAAQ,GAA6B;IACzC,UAAU,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,0BAA0B,CAAC;IAC1D,iBAAiB,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,iCAAiC,CAAC;IACxE,eAAe,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,+BAA+B,CAAC;IACpE,YAAY,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,4BAA4B,CAAC;IAC9D,cAAc,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,mBAAmB,CAAC;CACtE,CAAC;AAEF,KAAK,UAAU,aAAa,CAAC,MAA2B;IACtD,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAC9B,eAAe,CAAC;QACd,MAAM,EAAE,gCAAgC;QACxC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;QACrB,SAAS,EAAE,KAAK;KACjB,CAAC,CAAC;IACH,UAAU;IACV,MAAM,gBAAgB,GAAG,aAAa,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;IAC1E,mBAAmB;IACnB,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC;QAC5C,gBAAgB;QAChB,KAAK;QACL,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,KAAK;KACjB,CAAC,CAAA;IACF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,yCAAyC,CAAC;IAChG,SAAS,CAAC,IAAI,CACZ,IAAI,EACJ,WAAW,EACX;QACE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,KAAK,CAAC;KAC9I,EACD,KAAK,EAAE,MAAW,EAAE,EAAE;QACpB,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,CAAA;QAC1C,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM,CAAC,mCAAmC;iBACjD;aACF;YACD,MAAM,EAAE,MAAM;SACf,CAAA;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ import { GET_TRTC_NATIVE_API_DEFINITION } from '../definitions/get_trtc_native_api_def.js';
3
+ import { getDocContent } from '../../utils/get-doc-content.js';
4
+ import { reportCLSClient } from '../../utils/report-cls-client.js';
5
+ import { handleFramework } from '../../utils/handle-framework.js';
6
+ import { handleStateName } from '../../utils/handle-state-name.js';
7
+ function getResultText(params) {
8
+ const { framework, componentName = '' } = params;
9
+ reportCLSClient({
10
+ method: 'get_trtc_native_api',
11
+ info: componentName,
12
+ framework: framework,
13
+ });
14
+ return getDocContent(['trtc', `${handleFramework(framework)}`, 'states', `${handleStateName(componentName)}.md`]);
15
+ }
16
+ const registryGetTRTCNativeAPITool = (mcpServer) => {
17
+ const { name, description, parameter_descriptions } = GET_TRTC_NATIVE_API_DEFINITION;
18
+ mcpServer.tool(name, description, {
19
+ framework: z.enum(['android', 'ios', 'C++']).describe(parameter_descriptions.framework),
20
+ componentName: z.string().describe(parameter_descriptions.componentName),
21
+ }, (params) => ({
22
+ content: [
23
+ {
24
+ type: 'text',
25
+ text: getResultText(params),
26
+ }
27
+ ]
28
+ }));
29
+ };
30
+ export { registryGetTRTCNativeAPITool };
31
+ //# sourceMappingURL=get-trtc-native-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-trtc-native-api.js","sourceRoot":"","sources":["../../../src/tools/trtc/get-trtc-native-api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGnE,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACjD,eAAe,CAAC;QACd,MAAM,EAAE,qBAAqB;QAC7B,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,SAAS;KACrB,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,MAAM,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACpH,CAAC;AAED,MAAM,4BAA4B,GAAG,CAAC,SAAoB,EAAE,EAAE;IAC5D,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,8BAA8B,CAAC;IACrF,SAAS,CAAC,IAAI,CACZ,IAAI,EACJ,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,SAAS,CAAC;QACvF,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,aAAa,CAAC;KACzE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACF,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { getDocContent } from "./get-doc-content.js";
2
+ /**
3
+ * @typedef {Record<string, any>} params
4
+ * @property {string[]} params.goals - 需要获取的功能列表
5
+ * @property {Record<string, string>} params.pathMap - 文档 url 映射
6
+ * @property {string} [params.framework] - 框架或平台,可选
7
+ * @property {string} [params.baseInstructions] - 基础指令说明
8
+ */
9
+ async function generateStructuredResult(params) {
10
+ const { goals, pathMap, baseInstructions = '', framework } = params;
11
+ const pathsToRead = [];
12
+ for (const goal of goals) {
13
+ if (pathMap[goal]) {
14
+ pathsToRead.push(pathMap[goal]);
15
+ }
16
+ }
17
+ const readPromises = pathsToRead.map(path => getDocContent(path));
18
+ const readResults = await Promise.all(readPromises);
19
+ // 结果聚合,构建一个聚合的文档内容块,使用 Markdown 分隔符清晰地分隔每个文档内容,方便 LLM 解析
20
+ let combinedDocContent = '';
21
+ readResults.forEach((result) => {
22
+ combinedDocContent += `\n\n## 📚 Exclusive document content: ${result}\n\n---\n`;
23
+ });
24
+ const finalContent = baseInstructions + combinedDocContent;
25
+ return {
26
+ status: 'SUCCESS',
27
+ framework: framework,
28
+ read_paths: pathsToRead,
29
+ llm_code_generation_instructions_md: finalContent,
30
+ note_to_llm: `Agent, I have concurrently retrieved ${pathsToRead.length} documents for you. Please generate the code based on the workflow instructions and the document content.`
31
+ };
32
+ }
33
+ export { generateStructuredResult, };
34
+ //# sourceMappingURL=generate-structured-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-structured-result.js","sourceRoot":"","sources":["../../src/utils/generate-structured-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;;;;GAMG;AACH,KAAK,UAAU,wBAAwB,CAAC,MAA2B;IACjE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,GAAG,EAAE,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IACpE,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAClB,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IACD,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACpD,yDAAyD;IACzD,IAAI,kBAAkB,GAAG,EAAE,CAAC;IAC5B,WAAW,CAAC,OAAO,CAAC,CAAC,MAAW,EAAE,EAAE;QAClC,kBAAkB,IAAI,yCAAyC,MAAM,WAAW,CAAC;IACnF,CAAC,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;IAE3D,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,WAAW;QACvB,mCAAmC,EAAE,YAAY;QACjD,WAAW,EAAE,wCAAwC,WAAW,CAAC,MAAM,2GAA2G;KACnL,CAAC;AACJ,CAAC;AAED,OAAO,EACL,wBAAwB,GACzB,CAAC"}
@@ -19,14 +19,6 @@ const COMPONENT_NAME_RULES = [
19
19
  test: (name) => name.includes('live-view') || name.includes('liveview'),
20
20
  value: 'live-view',
21
21
  },
22
- {
23
- test: (name) => name.includes('live-player') || name.includes('liveplayer') || name.includes('live-watch') || name.includes('livewatch'),
24
- value: 'live-player',
25
- },
26
- {
27
- test: (name) => name.includes('live-list') || name.includes('livelist'),
28
- value: 'live-list',
29
- },
30
22
  {
31
23
  test: (name) => name.includes('live-audience-list') || name.includes('liveaudiencelist'),
32
24
  value: 'live-audience-list',
@@ -1 +1 @@
1
- {"version":3,"file":"handle-component-name.js","sourceRoot":"","sources":["../../src/utils/handle-component-name.ts"],"names":[],"mappings":"AAKA,MAAM,oBAAoB,GAAsB;IAC9C;QACE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QAC1C,KAAK,EAAE,MAAM;KACd;IACD;QACE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC;QACrF,KAAK,EAAE,mBAAmB;KAC3B;IACD;QACE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;QAC7E,KAAK,EAAE,cAAc;KACtB;IACD;QACE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CA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C,SAAS,CAAC,CAAC,CAAC;IAC5E,OAAO,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACrD,CAAC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -6,7 +6,7 @@ function reportCLSClient(reportData) {
6
6
  const time = Date.now();
7
7
  const data = {
8
8
  platform: 'mcp',
9
- verison: '1.2.9',
9
+ verison: '1.3.1',
10
10
  sdkappid: `${SDKAppID}`,
11
11
  method: method,
12
12
  userid: userID,
@@ -7,7 +7,7 @@ function reportESClient(reportData) {
7
7
  report: [
8
8
  {
9
9
  platform: 'mcp',
10
- version: '1.2.9',
10
+ version: '1.3.1',
11
11
  sdkappid: `${SDKAppID}`,
12
12
  method: method,
13
13
  userID: `${userID}`,
@@ -1,94 +0,0 @@
1
- The AI model must comply with the following **hard restrictions**:
2
- * **React Version Restriction:** When creating the project, both React and react-dom versions must be `18.2.0`. React 19 is prohibited.
3
- * **React UIKit Version Restriction:** The latest version of `@tencentcloud/chat-uikit-react` 3.0.0 or higher must be used.
4
- * **Strictly Follow the Documentation Steps and Instructions for Integration:** When integrating components, the steps and instructions in the documentation must be followed precisely.
5
- * **Strictly Use the Sample Code in the Documentation:** When creating files, the sample code in the documentation must be used to populate the files. The PlaceholderEmpty property of the Chat component does not need to be filled in.
6
- * **Open Default Conversation:** The `C2Cadministrator` conversation must be opened using `setActiveConversation`.
7
- * **Retrieve userSig using a tool:** The TUIKit code must be downloaded and integrated according to the documentation before automatically generating a test userID and calling the `get_usersig` tool to retrieve the userSig. The userID does not need to be appended with a timestamp to avoid errors in dynamic calculation.
8
- * **Account Information Filling:** After obtaining the userSig, the SDKAppID, userID, and userSig will be automatically filled into the code.
9
- * **Prohibit Creating User Information Configuration Files:** The `config` directory or file for filling in SDKAppID, userID, and userSig must not be automatically created.
10
-
11
- # chat-uikit-react Integration
12
-
13
-
14
- ## step1:create react project
15
-
16
-
17
- requirement: react: 18.2.0, react-dom: 18.2.0.
18
-
19
-
20
- you can use vite or rsbuild to create a react project.
21
-
22
-
23
- ## step2: install chat-uikit-react
24
-
25
-
26
- use npm or pnpm to install @tencentcloud/chat-uikit-react
27
-
28
-
29
- ## step3: add chat-uikit-react to your project
30
-
31
-
32
- example code
33
-
34
-
35
- ```tsx
36
- import {
37
- UIKitProvider,
38
- useLoginState,
39
- LoginStatus,
40
- Chat,
41
- ChatHeader,
42
- MessageList,
43
- MessageInput,
44
- useConversationListState,
45
- } from "@tencentcloud/chat-uikit-react";
46
-
47
- function ChatApp() {
48
- const { setActiveConversation } = useConversationListState();
49
-
50
- useEffect(() => {
51
- // open default conversation
52
- setActiveConversation('C2Cadministrator');
53
- }, [setActiveConversation]);
54
-
55
- return (
56
- <div style={{ height: '100vh', width: '100vw', display: 'flex', flexDirection: 'row' }}>
57
- <Chat PlaceholderEmpty=''>
58
- <ChatHeader />
59
- <MessageList />
60
- <MessageInput />
61
- </Chat>
62
- </div>
63
- );
64
- }
65
-
66
-
67
- function App() {
68
- const userID = ''; // TODO: Replace with your userID
69
- const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
70
- const userSig = ''; // TODO: Replace with your userSig
71
-
72
- const { status } = useLoginState({
73
- SDKAppID,
74
- userID,
75
- userSig,
76
- })
77
-
78
-
79
- if (status !== LoginStatus.SUCCESS) {
80
- return <div>Loading...</div>
81
- }
82
-
83
- // Language support zh-CN(default) / en-US / ja-JP / ko-KR / zh-TW
84
- // Theme support light(default) / dark
85
- return (
86
- <UIKitProvider language='zh-CN' theme='light'>
87
- <ChatApp />
88
- </UIKitProvider>
89
- );
90
- }
91
-
92
-
93
- export default App;
94
- ```