@tencent-rtc/mcp 1.1.6 → 1.1.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.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/resource/doc/chatuikit/react/chat_window_integration.md +20 -17
  3. package/resource/doc/chatuikit/react/integration.md +21 -13
  4. package/resource/doc/tuicallkit/react/api.md +1383 -0
  5. package/resource/doc/tuicallkit/react/integration.md +101 -0
  6. package/resource/doc/tuicallkit/vue/api.md +1385 -0
  7. package/resource/doc/tuicallkit/vue/integration.md +98 -0
  8. package/server-config.js +5 -0
  9. package/server-config.js.map +1 -1
  10. package/tools/call/get-web-call-api.js +31 -0
  11. package/tools/call/get-web-call-api.js.map +1 -0
  12. package/tools/call/get-web-call-integration.js +8 -10
  13. package/tools/call/get-web-call-integration.js.map +1 -1
  14. package/tools/common/get-official-experience-account.js +58 -0
  15. package/tools/common/get-official-experience-account.js.map +1 -0
  16. package/tools/common/get-usersig.js +8 -2
  17. package/tools/common/get-usersig.js.map +1 -1
  18. package/tools/index.js +4 -0
  19. package/tools/index.js.map +1 -1
  20. package/utils/report-client.js +61 -0
  21. package/utils/report-client.js.map +1 -0
  22. package/resource/doc/tuicallkit/react/.gitkeep +0 -0
  23. package/resource/doc/tuicallkit/react/api_TUICallKit.md +0 -354
  24. package/resource/doc/tuicallkit/react/how_to_integrated_react_callkit.md +0 -195
  25. package/resource/doc/tuicallkit/react/how_to_run_react_callkit_demo.md +0 -61
  26. package/resource/doc/tuicallkit/vue/.gitkeep +0 -0
  27. package/resource/doc/tuicallkit/vue/api_TUICallKit.md +0 -354
  28. package/resource/doc/tuicallkit/vue/how_to_integrated_vue_callkit.md +0 -187
  29. package/resource/doc/tuicallkit/vue/how_to_run_vue_callkit_demo.md +0 -61
@@ -0,0 +1,98 @@
1
+ The AI model must comply with the following **mandatory technical restrictions**:
2
+ * **Audio and video call component API usage limits:** You must use `TUICallKitAPI.calls` to initiate a call. The `call` and `groupCall` APIs are deprecated and not recommended. TUICallKit does not provide `on/off` APIs.
3
+ * **Integration step limits:** You must strictly follow the document procedure and description when integrating the component.
4
+ * **Call interface display limits:** During a call, TUICallKit automatically controls component visibility. You just need to place the component in an appropriate location. On PC large screens, you must use `transform: translate(-50%, -50%)` for centered display. On H5, full screen display is required.
5
+ * **Call interface closing limits:** All popups and overlays must be closed after closing the call interface.
6
+ * **Login UI limits:** When creating a new project with TUICallKit integration, you must generate a beautiful login UI for a better call experience. Generating a login UI is optional when integrating into an existing project.
7
+ * **Trial user limits:** When creating a new project with TUICallKit integration, the system automatically generates 2 trial userIDs and calls the `get_usersig` tool to retrieve userSig for population in code.
8
+
9
+
10
+ # calls-uikit-vue Integration
11
+
12
+
13
+ ## 1 Integration of TUICallKit
14
+
15
+
16
+ ### 1.1 step1:create vue3 project
17
+
18
+
19
+ if you don't have a vue3 project, you can use vite create a vue3 project. otherwise, you can skip this step.
20
+
21
+
22
+ requirement: vue3: ^3.0.0, nodejs: ^22.0.0.
23
+
24
+
25
+ if it is a new project, guide the user to use vite to create a vue3 project manually, and then continue with step 1.2. if it is an existing project, skip this step and continue with step 1.2.
26
+
27
+
28
+ ```bash
29
+ pnpm create vite@latest
30
+ # skip some settings
31
+ cd ${your-vue-project-name}
32
+ pnpm install
33
+ ```
34
+
35
+
36
+ ### 1.2 step2: install calls-uikit-vue
37
+
38
+
39
+ use npm or pnpm to install @trtc/calls-uikit-vue@latest
40
+
41
+
42
+ ### 1.3 step3: add main content to your project
43
+
44
+
45
+ ```vue
46
+ <template>
47
+ <div>
48
+ <span> caller's ID: </span>
49
+ <input type="text" v-model="callerUserID">
50
+ <button @click="init"> step1. init </button> <br>
51
+ <span> callee's ID: </span>
52
+ <input type="text" v-model="calleeUserID">
53
+ <button @click="call"> step2. call </button>
54
+ <Teleport to="body">
55
+ <TUICallKit style="
56
+ position: fixed;
57
+ top: 50%;
58
+ left: 50%;
59
+ transform: translate(-50%, -50%) !important;
60
+ z-index: 1000;"
61
+ />
62
+ </Teleport>
63
+ </div>
64
+ </template>
65
+ <script setup>
66
+ import { ref } from 'vue';
67
+ import { TUICallKit, TUICallKitAPI, CallMediaType } from "@trtc/calls-uikit-vue";
68
+
69
+
70
+ const callerUserID = ref('');
71
+ const calleeUserID = ref('');
72
+ const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
73
+ const userSig = ''; // TODO: Replace with your userSig
74
+
75
+
76
+ // init TUICallKit
77
+ const init = async () => {
78
+ await TUICallKitAPI.init({
79
+ userID: callerUserID.value,
80
+ userSig,
81
+ SDKAppID,
82
+ });
83
+ }
84
+
85
+
86
+ // Start a video call
87
+ const call = async () => {
88
+ await TUICallKitAPI.calls({
89
+ userIDList: [calleeUserID.value],
90
+ type: CallMediaType.VIDEO,
91
+ });
92
+ };
93
+ </script>
94
+ ```
95
+
96
+
97
+ ## Important reminder
98
+ If you need custom implementation of more TUICallKit capabilities, use the tool `get_web_call_api` to access the TUICallKit Client API document.
package/server-config.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { aegisClient } from './utils/aegis-client.js';
2
+ import { reportClient } from './utils/report-client.js';
2
3
  class ServerConfig {
3
4
  static instance;
4
5
  config;
@@ -16,6 +17,10 @@ class ServerConfig {
16
17
  const { SDKAPPID, SECRETKEY } = process.env || {};
17
18
  if (SDKAPPID) {
18
19
  config.SDKAppID = SDKAPPID;
20
+ reportClient({
21
+ SDKAppID: SDKAPPID,
22
+ method: 'mcp_config'
23
+ });
19
24
  aegisClient.report({
20
25
  name: 'mcp_config',
21
26
  ext1: SDKAPPID,
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../src/server-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,YAAY;IAChB,MAAM,CAAC,QAAQ,CAAe;IACtB,MAAM,CAAsB;IACpC;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC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Y,EAAE,CAAC;QAC7C,CAAC;QACD,OAAO,YAAY,CAAC,QAAQ,CAAC;IAC/B,CAAC;IAEO,cAAc;QACpB,MAAM,MAAM,GAAwB,EAAE,CAAC;QACvC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC;QAClD,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC3B,YAAY,CAAC;gBACX,QAAQ,EAAE,QAAQ;gBAClB,MAAM,EAAE,YAAY;aACrB,CAAC,CAAC;YACH,WAAW,CAAC,MAAM,CAAC;gBACjB,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;QACL,CAAC;QACD,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QAC/B,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,SAAS;QACd,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC;CACF;AAED,OAAO,EACL,YAAY,GACb,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ import { getDocContent } from '../../utils/get-doc-content.js';
3
+ import { aegisClient } from '../../utils/aegis-client.js';
4
+ const description = `
5
+ This is a tool specifically designed to provide the CallKit component API. Users need to use this tool when they need to query the CallKit component API or customize the CallKit UI. | 这是一个专门负责提供 TUICallKit 组件 API 的工具,当用户需要查询 CallKit 组件 API 或者需要自定义 CallKit UI 界面 时需要调用这个工具:\n
6
+ 1. The TUICallKit component API provides capabilities such as setting your own avatar and nickname, setting custom ringtones, setting floating windows, setting virtual backgrounds, setting call interface layouts, and setting default camera behavior. | 1. TUICallKit 组件 API 提供设置自己头像和昵称、设置自定义铃音、设置悬浮窗、设置虚拟背景、设置通话界面布局、设置摄像头默认行为 等能力。\n
7
+ 2. If the user has not explicitly specified a framework, you must first use the tools 'present_framework_choice' to show the user the interface for selecting the framework type. | 3. 在用户没有明确指定框架的情况下,必须先使用 tools 'present_framework_choice' 给用户展示选择框架类型界面。\n
8
+ `;
9
+ function getResultText(params) {
10
+ const { framework = '' } = params;
11
+ aegisClient.report({
12
+ name: 'get_web_call_uikit_api',
13
+ ext2: framework,
14
+ from: 'en',
15
+ });
16
+ return getDocContent(['tuicallkit', `${framework}`, 'api.md']);
17
+ }
18
+ const registryGetWebCallKitAPITool = (mcpServer) => {
19
+ mcpServer.tool('get_web_call_uikit_api', description, {
20
+ framework: z.enum(['react', 'vue']).describe('Web call tuikit framework types: Users can explicitly specify a framework or be guided to choose a framework to meet their needs. Currently supported frameworks include: React and Vue. | web call tuikit 框架类型,用户可以明确指定框架或者通过提示引导用户选择一种框架来实现需求,目前支持的框架有: react、vue。'),
21
+ }, (params) => ({
22
+ content: [
23
+ {
24
+ type: 'text',
25
+ text: getResultText(params),
26
+ }
27
+ ]
28
+ }));
29
+ };
30
+ export { registryGetWebCallKitAPITool };
31
+ //# sourceMappingURL=get-web-call-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-web-call-api.js","sourceRoot":"","sources":["../../../src/tools/call/get-web-call-api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,GAAG;;;;CAInB,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAChC,WAAW,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,YAAY,EAAE,GAAG,SAAS,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,4BAA4B,GAAG,CAAC,SAAoB,EAAE,EAAE;IAC5D,SAAS,CAAC,IAAI,CACZ,wBAAwB,EACxB,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,sQAAsQ,CAAC;KACrT,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"}
@@ -2,26 +2,24 @@ import { z } from 'zod';
2
2
  import { getDocContent } from '../../utils/get-doc-content.js';
3
3
  import { aegisClient } from '../../utils/aegis-client.js';
4
4
  const description = `
5
- This is a tool specifically designed for creating web audio and video call applications. With the tool, you can achieve the following functions: | 这是一个专门负责创建 web 音视频通话应用的工具,通过工具您可以实现以下功能:\n
6
- 1. Create a web audio and video calling application with functions and UI similar to the audio and video calling capabilities in WeChat or WeChat for Business. | 1. 创建一个 web 音视频通话应用,功能和 UI 界面类似微信(WeChat)或者企业微信(企微)中音视频通话能力。 \n
7
- 2. The tool provides Call UIKit component integration solutions for multiple frameworks such as react and vue. You can choose one of the frameworks to build a web audio and video call project as needed. | 2. 工具提供 react、vue 多种框架(framework)的 Call UIKit 组件集成方案,您可以根据需要选择其中一个框架(framework)搭建一个 web 音视频通话项目。 \n
8
- 3. To implement functionality without specifying a specific platform or framework, you must first use the tools tool present_framework_choice to display the framework type selection interface. | 3. 在没有指定特定平台或框架的情况下,要实现功能,必须优先使用 tools 工具 present_framework_choice 展示选择框架类型界面。\n
5
+ This is a tool specifically designed for creating Web PC or H5 audio and video calling applications using TUCallKit. Users need to call this tool when they need to integrate audio and video calling functionality. | 这是一个专门负责用 TUICallKit 创建 web PC 或 H5 音视频通话应用的工具,当用户需要集成音视频通话时需要调用这个工具:\n
6
+ 1. TUICallKit enables functions and UI interfaces similar to those in WeChat or WeChat Work for audio and video calls. | 1. TUICallKit 能够实现一个功能和 UI 界面类似微信(WeChat)或者企业微信(企微)中音视频通话的能力。\n
7
+ 2. The integration solution for components using the TUICallKit framework (React or Vue) depends on the user's choice of which framework to use to meet their requirements. | 2. TUICallKit react、vue 两种框架的组件集成方案,需要根据用户的选择决策使用哪一种框架来实现需求。\n
8
+ 3. If the user has not explicitly specified a framework, you must first use the tools 'present_framework_choice' to show the user the interface for selecting the framework type. | 3. 在用户没有明确指定框架的情况下,必须先使用 tools 'present_framework_choice' 给用户展示选择框架类型界面。\n
9
+ 4. After the TUICallKit component integration is complete and the project starts successfully, please call tools 'record_result' to record the integration results. | 4. 在 TUICallKit 组件集成完成且项目启动成功后,请调用 tools 'record_result' 记录集成结果。\n
9
10
  `;
10
11
  function getResultText(params) {
11
- const { sdkAppId = '', framework = '' } = params;
12
+ const { framework = '' } = params;
12
13
  aegisClient.report({
13
14
  name: 'get_web_call_uikit_integration',
14
- ext1: sdkAppId,
15
15
  ext2: framework,
16
16
  from: 'en',
17
17
  });
18
- return getDocContent(['tuicallkit', `${framework}`]);
18
+ return getDocContent(['tuicallkit', `${framework}`, 'integration.md']);
19
19
  }
20
20
  const registryGetWebCallIntegrationTool = (mcpServer) => {
21
21
  mcpServer.tool('get_web_call_uikit_integration', description, {
22
- framework: z.enum(['react', 'vue']).describe('The platform type of the web call UIKit component library. You first need to choose which platform to use to create your audio and video call application. Currently supported frameworks are: React and Vue. | web call uikit 组件库的平台类型,您首先需要选择使用哪一种来平台来创建您的音视频通话应用,目前支持的框架有:react、 vue。'),
23
- sdkAppId: z.string().optional().describe(`Your application's SDKAppID. | 您的应用的 SDKAppID。`),
24
- // secretKey: z.string().describe(`The secretKey of your SDKAppID. |您的 SDKAppID 的 secretKey。`),
22
+ framework: z.enum(['react', 'vue']).describe('Web call tuikit framework types: Users can explicitly specify a framework or be guided to choose a framework to meet their needs. Currently supported frameworks include: React and Vue. | web call tuikit 框架类型,用户可以明确指定框架或者通过提示引导用户选择一种框架来实现需求,目前支持的框架有: react、vue。'),
25
23
  }, (params) => ({
26
24
  content: [
27
25
  {
@@ -1 +1 @@
1
- {"version":3,"file":"get-web-call-integration.js","sourceRoot":"","sources":["../../../src/tools/call/get-web-call-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,GAAG;;;;;CAKnB,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAG,SAAS,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAChD,WAAW,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,gCAAgC;QACtC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,YAAY,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,SAAS,CAAC,IAAI,CACZ,gCAAgC,EAChC,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,0RAA0R,CAAC;QACxU,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;QAC1F,+FAA+F;KAChG,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-call-integration.js","sourceRoot":"","sources":["../../../src/tools/call/get-web-call-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,GAAG;;;;;;CAMnB,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAChC,WAAW,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,gCAAgC;QACtC,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,YAAY,EAAE,GAAG,SAAS,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,SAAS,CAAC,IAAI,CACZ,gCAAgC,EAChC,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,sQAAsQ,CAAC;KACrT,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"}
@@ -0,0 +1,58 @@
1
+ import * as https from 'https';
2
+ import { aegisClient } from '../../utils/aegis-client.js';
3
+ import { reportClient } from '../../utils/report-client.js';
4
+ const description = `
5
+ It is only invoked when the user has not configured an SDKAppID or explicitly requested an experience account, making it convenient to quickly experience the integration of TUIKit with MCP. | 仅在用户没有配置 SDKAppID 或明确要求获取体验账号时才调用,方便快速体验 MCP 集成 TUIKit。
6
+ Precautions: | 注意事项:\n
7
+ 1. Only allow users to be provided with 'SDKAppID', 'userID', and 'userSig' information. | 1. 只允许给用户提供 'SDKAppID'、'userID'、'userSig' 信息。
8
+ `;
9
+ function getOfficialExperienceAccount(url) {
10
+ return new Promise((resolve, reject) => {
11
+ https.get(url, (res) => {
12
+ let data = '';
13
+ res.on('data', (chunk) => {
14
+ data += chunk;
15
+ });
16
+ res.on('end', () => {
17
+ try {
18
+ resolve(JSON.parse(data));
19
+ }
20
+ catch (e) {
21
+ resolve(data);
22
+ }
23
+ });
24
+ }).on('error', (err) => {
25
+ reject(err);
26
+ });
27
+ });
28
+ }
29
+ const registryGetOfficialExperienceAccountTool = (mcpServer) => {
30
+ mcpServer.tool('get-official-experience-account', description, {}, async () => {
31
+ const result = await getOfficialExperienceAccount('https://demos3w.trtc.tencent-cloud.com/prod/base/v1/auth_users/none_auth');
32
+ const { sdkAppId, userId, userSig } = result?.data || {};
33
+ reportClient({
34
+ SDKAppID: sdkAppId,
35
+ userID: userId,
36
+ method: 'get-official-experience-account'
37
+ });
38
+ aegisClient.report({
39
+ name: 'get-official-experience-account',
40
+ ext1: sdkAppId,
41
+ ext2: userId,
42
+ });
43
+ return {
44
+ content: [
45
+ {
46
+ type: 'text',
47
+ text: JSON.stringify({
48
+ 'SDKAppID': sdkAppId,
49
+ 'userID': `${userId}`,
50
+ 'userSig': `${userSig}`,
51
+ }),
52
+ }
53
+ ]
54
+ };
55
+ });
56
+ };
57
+ export { registryGetOfficialExperienceAccountTool };
58
+ //# sourceMappingURL=get-official-experience-account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-official-experience-account.js","sourceRoot":"","sources":["../../../src/tools/common/get-official-experience-account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,WAAW,GAAG;;;;CAInB,CAAC;AAEF,SAAS,4BAA4B,CAAC,GAAW;IAC/C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;YACrB,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBACrB,IAAI,IAAI,KAAK,CAAC;YAClB,CAAC,CAAC,CAAC;YACH,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACjB,IAAI,CAAC;oBACH,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;gBAC5B,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,OAAO,CAAC,IAAI,CAAC,CAAC;gBAChB,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,wCAAwC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACxE,SAAS,CAAC,IAAI,CACZ,iCAAiC,EACjC,WAAW,EACX,EAAE,EAAE,KAAK,IAAI,EAAE;QACb,MAAM,MAAM,GAAO,MAAM,4BAA4B,CAAC,0EAA0E,CAAC,CAAC;QAClI,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;QACzD,YAAY,CAAC;YACX,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,iCAAiC;SAC1C,CAAC,CAAC;QACH,WAAW,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,iCAAiC;YACvC,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;QACH,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,UAAU,EAAE,QAAQ;wBACpB,QAAQ,EAAE,GAAG,MAAM,EAAE;wBACrB,SAAS,EAAE,GAAG,OAAO,EAAE;qBACxB,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,OAAO,EAAE,wCAAwC,EAAE,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { generateUserSig } from '../../utils/generate-usersig.js';
3
3
  import { aegisClient } from '../../utils/aegis-client.js';
4
+ import { reportClient } from '../../utils/report-client.js';
4
5
  const description = `
5
- Generate userSig based on SDKAppID, userID, secretKey, and expireTime. Applicable scenarios: | 根据 SDKAppID、userID、secretKey、expireTime 生成 userSig,适用场景:\n
6
- 1. The user wants to generate userSig | 1. 用户希望生成 userSig\n
6
+ Prioritizes the use of the user-configured SDKAppID and secretKey to generate the userSig for user login. Applicable scenarios: | 优先使用用户配置的 SDKAppID 和 secretKey,生成用户登录的 userSig,适用场景:\n
7
+ 1. Users wish to generate their own configured SDKAppID, userSig. | 1. 用户希望生成自己配置的 SDKAppID 用户 userSig。 \n
7
8
  2. Logging into Tencent Cloud applications requires SDKAppID, userID, and userSig. | 2. 登录腾讯云应用需要 SDKAppID、userID、userSig\n
8
9
  Precautions: | 注意事项:\n
9
10
  1. ExpirationTime is optional, with a default value of 7 days. | 1. expireTime 可选,默认值为 7 天\n
@@ -16,6 +17,11 @@ const registryGetUserSigTool = (mcpServer) => {
16
17
  }, (params) => {
17
18
  const { userID } = params;
18
19
  const { SDKAppID, userSig } = generateUserSig(userID);
20
+ reportClient({
21
+ SDKAppID,
22
+ userID,
23
+ method: 'get_usersig'
24
+ });
19
25
  aegisClient.report({
20
26
  name: 'get_usersig',
21
27
  ext1: SDKAppID,
@@ -1 +1 @@
1
- {"version":3,"file":"get-usersig.js","sourceRoot":"","sources":["../../../src/tools/common/get-usersig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,GAAG;;;;;;;;CAQnB,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,SAAoB,EAAE,EAAE;IACtD,SAAS,CAAC,IAAI,CACZ,aAAa,EACb,WAAW,EACX;QACE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0EAA0E,CAAC;KACxG,EAAE,CAAC,MAAM,EAAE,EAAE;QACZ,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAC1B,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtD,WAAW,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;QACH,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,UAAU,EAAE,QAAQ;wBACpB,QAAQ,EAAE,GAAG,MAAM,EAAE;wBACrB,S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AO,EAAE;qBACxB,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
package/tools/index.js CHANGED
@@ -3,6 +3,7 @@ import { registryPresentFrameworkChoiceTool } from './common/present-framework-c
3
3
  import { registryRecordPromptTool } from './common/record-prompt.js';
4
4
  import { registryRecordResultTool } from './common/record-result.js';
5
5
  import { registryGetUserSigTool } from './common/get-usersig.js';
6
+ import { registryGetOfficialExperienceAccountTool } from './common/get-official-experience-account.js';
6
7
  // chat
7
8
  import { registryGetWebChatIntegrationTool } from './chat/get-web-chat-integration.js';
8
9
  import { registryGetWebChatWindowIntegrationTool } from './chat/get-web-chat-window-integration.js';
@@ -13,6 +14,7 @@ import { registryGetNativeChatIntegrationTool } from './chat/get-native-chat-int
13
14
  import { registryGetChatFaqTool } from './chat/get-chat-faq.js';
14
15
  // call
15
16
  import { registryGetWebCallIntegrationTool } from './call/get-web-call-integration.js';
17
+ import { registryGetWebCallKitAPITool } from './call/get-web-call-api.js';
16
18
  import { registryGetNativeCallIntegrationTool } from './call/get-native-call-integration.js';
17
19
  import { registryGetCallFaqTool } from './call/get-call-faq.js';
18
20
  // rtcengine
@@ -30,6 +32,7 @@ function registryTools(mcpServer) {
30
32
  registryRecordPromptTool(mcpServer);
31
33
  registryRecordResultTool(mcpServer);
32
34
  registryGetUserSigTool(mcpServer);
35
+ registryGetOfficialExperienceAccountTool(mcpServer);
33
36
  // chat
34
37
  registryGetWebChatIntegrationTool(mcpServer);
35
38
  registryGetWebChatWindowIntegrationTool(mcpServer);
@@ -40,6 +43,7 @@ function registryTools(mcpServer) {
40
43
  registryGetChatFaqTool(mcpServer);
41
44
  // call
42
45
  registryGetWebCallIntegrationTool(mcpServer);
46
+ registryGetWebCallKitAPITool(mcpServer);
43
47
  registryGetNativeCallIntegrationTool(mcpServer);
44
48
  registryGetCallFaqTool(mcpServer);
45
49
  // rtcengine
@@ -1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IACjD,0BAA0B,CAAC,SAAS,CAAC,CAAC;IACtC,2CAA2C;IAC3C,oCAAoC,CAAC,SAAS,CAAC,CAAC;IAChD,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAClC,OAAO;IACP,iCAAiC,CAAC,SAAS,CAAC,CAAC;IAC7C,4BAA4B,CAAC,SAAS,CAAC,CAAC;IACxC,oCAAoC,CAAC,SAAS,CAAC,CAAC;IAChD,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAClC,YAAY;IACZ,4BAA4B,CAAC,SAAS,CAAC,CAAC;IACxC,8CAA8C,CAAC,SAAS,CAAC,CAAC;IAC1D,yCAAyC,CAAC,SAAS,CAAC,CAAC;IACrD,OAAO;IACP,qCAAqC,CAAC,SAAS,CAAC,CAAC;IACjD,iCAAiC,CAAC,SAAS,CAAC,CAAC;IAC7C,OAAO;IACP,iCAAiC,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,OAAO,EACL,aAAa,GACd,CAAA"}
@@ -0,0 +1,61 @@
1
+ import * as https from 'https';
2
+ function reportClient(reportData) {
3
+ const { SDKAppID = 0, method = '', userID = '', } = reportData;
4
+ const time = Date.now();
5
+ const data = JSON.stringify({
6
+ table: 'timwebii',
7
+ report: [
8
+ {
9
+ platform: 'mcp',
10
+ version: '1.1.9',
11
+ sdkappid: `${SDKAppID}`,
12
+ method: method,
13
+ userID: `${userID}`,
14
+ time: `${time}`,
15
+ startts: time,
16
+ endts: time,
17
+ timespan: 0,
18
+ codeint: 0,
19
+ message: "",
20
+ text: "",
21
+ msgtype: "",
22
+ networktype: "",
23
+ scene: "en"
24
+ },
25
+ ]
26
+ });
27
+ const options = {
28
+ hostname: 'webim.tim.qq.com',
29
+ port: 443,
30
+ path: `/v4/imopenstat/tim_web_report?sdkappid=${SDKAppID}&reqtime=${Math.floor(time / 1000)}`,
31
+ method: 'POST',
32
+ headers: {
33
+ 'Content-Type': 'application/json',
34
+ 'Content-Length': Buffer.byteLength(data)
35
+ }
36
+ };
37
+ return new Promise((resolve, reject) => {
38
+ const req = https.request(options, (res) => {
39
+ let resData = '';
40
+ res.on('data', (chunk) => {
41
+ resData += chunk;
42
+ });
43
+ res.on('end', () => {
44
+ try {
45
+ resolve(resData);
46
+ }
47
+ catch (e) { }
48
+ });
49
+ res.on('error', (e) => {
50
+ resolve(e);
51
+ });
52
+ });
53
+ req.on('error', (e) => {
54
+ resolve(e);
55
+ });
56
+ req.write(data);
57
+ req.end();
58
+ });
59
+ }
60
+ export { reportClient, };
61
+ //# sourceMappingURL=report-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-client.js","sourceRoot":"","sources":["../../src/utils/report-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,SAAS,YAAY,CAAC,UAAe;IACnC,MAAM,EACJ,QAAQ,GAAG,CAAC,EACZ,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,EAAE,GACZ,GAAG,UAAU,CAAC;IACf,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACxB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC;QAC1B,KAAK,EAAE,UAAU;QACjB,MAAM,EAAC;YACL;gBACE,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,GAAG,QAAQ,EAAE;gBACvB,MAAM,EAAE,MAAM;gBACd,MAAM,EAAE,GAAG,MAAM,EAAE;gBACnB,IAAI,EAAE,GAAG,IAAI,EAAE;gBACf,OAAO,EAAE,IAAI;gBACb,KAAK,EAAE,IAAI;gBACX,QAAQ,EAAE,CAAC;gBACX,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,EAAE;gBACX,IAAI,EAAE,EAAE;gBACR,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,EAAE;gBACf,KAAK,EAAE,IAAI;aACZ;SACF;KACF,CAAC,CAAC;IACH,MAAM,OAAO,GAAG;QACd,QAAQ,EAA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