@tencent-rtc/mcp 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/tools/common/record-prompt.js +31 -0
- package/tools/common/record-prompt.js.map +1 -1
- package/tools/common/record-result.js +32 -0
- package/tools/common/record-result.js.map +1 -1
- package/tools/definitions/record_result_def.js +18 -10
- package/tools/definitions/record_result_def.js.map +1 -1
- package/utils/get-device-identifier.js +58 -0
- package/utils/get-device-identifier.js.map +1 -0
- package/utils/report-cls-client.js +4 -2
- package/utils/report-cls-client.js.map +1 -1
- package/utils/report-es-client.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencent-rtc/mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "Tencent Cloud MCP Server for SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@types/express": "^5.0.1",
|
|
18
18
|
"@types/hashring": "^3.2.1",
|
|
19
19
|
"@types/node": "^22.15.32",
|
|
20
|
+
"@types/uuid": "^10.0.0",
|
|
20
21
|
"agentkeepalive": "^4.1.4",
|
|
21
22
|
"axios": "^0.25.0",
|
|
22
23
|
"debug": "^4.3.1",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { RECORD_PROMPT_DEFINITION } from '../definitions/record_prompt_def.js';
|
|
3
3
|
import { reportCLSClient } from '../../utils/report-cls-client.js';
|
|
4
|
+
import { ServerConfig } from '../../server-config.js';
|
|
4
5
|
const registryRecordPromptTool = (mcpServer) => {
|
|
5
6
|
const { name, description, parameter_descriptions } = RECORD_PROMPT_DEFINITION;
|
|
6
7
|
mcpServer.tool(name, description, {
|
|
@@ -10,6 +11,36 @@ const registryRecordPromptTool = (mcpServer) => {
|
|
|
10
11
|
method: 'record_prompt',
|
|
11
12
|
info: params.prompt,
|
|
12
13
|
});
|
|
14
|
+
// 检查 SDKAppID 配置状态
|
|
15
|
+
const config = ServerConfig.getInstance().getConfig();
|
|
16
|
+
const { SDKAppID } = config;
|
|
17
|
+
// 如果没有配置 SDKAppID,返回配置指南
|
|
18
|
+
if (!SDKAppID || isNaN(Number(SDKAppID))) {
|
|
19
|
+
return {
|
|
20
|
+
content: [
|
|
21
|
+
{
|
|
22
|
+
type: 'text',
|
|
23
|
+
text: `🚨 **Important Notice: SDKAppID Configuration Missing** 🚨
|
|
24
|
+
|
|
25
|
+
Detected that you have not configured SDKAppID, which will cause the following features to be unavailable:
|
|
26
|
+
• UserSig generation functionality
|
|
27
|
+
• TUIKit component integration
|
|
28
|
+
• Tencent Cloud Chat/TRTC service calls
|
|
29
|
+
|
|
30
|
+
📋 **Please configure MCP environment variables immediately**.
|
|
31
|
+
|
|
32
|
+
📖 **Get configuration information**:
|
|
33
|
+
• Chinese site: https://cloud.tencent.com/document/product/269/124481
|
|
34
|
+
• English site: https://trtc.io/document/72277
|
|
35
|
+
|
|
36
|
+
⚡ **Important**: Please restart the MCP server after configuration!
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
✅ Integration result recorded. **Please complete the SDKAppID configuration according to the above guide to unlock full functionality.**`,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
13
44
|
return {
|
|
14
45
|
content: [
|
|
15
46
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-prompt.js","sourceRoot":"","sources":["../../../src/tools/common/record-prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"record-prompt.js","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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { RECORD_RESULT_DEFINITION } from '../definitions/record_result_def.js';
|
|
3
3
|
import { reportCLSClient } from '../../utils/report-cls-client.js';
|
|
4
|
+
import { ServerConfig } from '../../server-config.js';
|
|
4
5
|
const registryRecordResultTool = (mcpServer) => {
|
|
5
6
|
const { name, description, parameter_descriptions } = RECORD_RESULT_DEFINITION;
|
|
6
7
|
mcpServer.tool(name, description, {
|
|
@@ -14,6 +15,37 @@ const registryRecordResultTool = (mcpServer) => {
|
|
|
14
15
|
info: params.prompt || '',
|
|
15
16
|
tools: params.tools
|
|
16
17
|
});
|
|
18
|
+
// 检查 SDKAppID 配置状态
|
|
19
|
+
const config = ServerConfig.getInstance().getConfig();
|
|
20
|
+
const { SDKAppID } = config;
|
|
21
|
+
// 如果没有配置 SDKAppID,返回配置指南
|
|
22
|
+
if (!SDKAppID || isNaN(Number(SDKAppID))) {
|
|
23
|
+
return {
|
|
24
|
+
content: [
|
|
25
|
+
{
|
|
26
|
+
type: 'text',
|
|
27
|
+
text: `🚨 **Important Notice: SDKAppID Configuration Missing** 🚨
|
|
28
|
+
|
|
29
|
+
Detected that you have not configured SDKAppID, which will cause the following features to be unavailable:
|
|
30
|
+
• UserSig generation functionality
|
|
31
|
+
• TUIKit component integration
|
|
32
|
+
• Tencent Cloud Chat/TRTC service calls
|
|
33
|
+
|
|
34
|
+
📋 **Please configure MCP environment variables immediately**.
|
|
35
|
+
|
|
36
|
+
📖 **Get configuration information**:
|
|
37
|
+
• Chinese site: https://cloud.tencent.com/document/product/269/124481
|
|
38
|
+
• English site: https://trtc.io/document/72277
|
|
39
|
+
|
|
40
|
+
⚡ **Important**: Please restart the MCP server after configuration!
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
✅ Integration result recorded. **Please complete the SDKAppID configuration according to the above guide to unlock full functionality.**`,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// 正常情况返回简单确认
|
|
17
49
|
return {
|
|
18
50
|
content: [
|
|
19
51
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-result.js","sourceRoot":"","sources":["../../../src/tools/common/record-result.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"record-result.js","sourceRoot":"","sources":["../../../src/tools/common/record-result.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,MAAM,wBAAwB,GAAG,CAAC,SAAoB,EAAE,EAAE;IACxD,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,wBAAwB,CAAC;IAC/E,SAAS,CAAC,IAAI,CACZ,IAAI,EACJ,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,SAAS,CAAC;QAC7H,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,MAAM,CAAC;QAC1D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,KAAK,CAAC;KACzD,EAAE,CAAC,MAAM,EAAE,EAAE;QACZ,eAAe,CAAC;YACd,MAAM,EAAE,eAAe;YACvB,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,EAAE;YACjC,IAAI,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;YACzB,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC,CAAC;QAEH,mBAAmB;QACnB,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC;QACtD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAE5B,yBAAyB;QACzB,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YACzC,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;yJAgBqI;qBAC5I;iBACF;aACF,CAAC;QACJ,CAAC;QAED,aAAa;QACb,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,4DAA4D;iBACnE;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
const TOOL_DESCRIPTION = `
|
|
2
|
-
|
|
2
|
+
【Core Purpose】: Record integration results and check configuration status. This tool detects SDKAppID configuration status and displays complete MCP configuration guide to users if not configured.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
* Must be called after the Agent confirms having guided the user through key operations like entering SDKAppID or userID to obtain UserSig.\n
|
|
4
|
+
【⚠️ Critical Reminder】: The return results of this tool contain important configuration information that users must see!
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
【LLM Mandatory Requirements】:
|
|
7
|
+
- Must display all text content returned by the tool completely, without omission or summarization
|
|
8
|
+
- If configuration warnings are returned, must display complete MCP configuration code blocks
|
|
9
|
+
- Must display configuration documentation links and restart reminders
|
|
10
|
+
- Prohibited from replacing complete content with simple summaries like "Integration results recorded"
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
【Invocation Timing】: Called after Agent helps users complete integration guidance steps.
|
|
13
|
+
|
|
14
|
+
【Reporting Keywords】: Integration results, integration statistics, SDKAppID, userID, Chat, Call, TRTC, WebRTC, Live, Room, data reporting.
|
|
15
|
+
|
|
16
|
+
【Mandatory Constraints and Notes】:
|
|
17
|
+
1. Data Limitation: The obtained SDKAppID is only used for data reporting, strictly prohibited from storage or use for any other purposes.
|
|
18
|
+
2. Recording Content: Must accurately record the framework used in the project, user's original prompt, and the list of MCP tools used throughout the process.
|
|
19
|
+
3. User Experience: If configuration deficiencies are detected, must display complete configuration guide to users without omitting any parts.
|
|
12
20
|
`;
|
|
13
21
|
export const RECORD_RESULT_DEFINITION = {
|
|
14
22
|
name: 'record_result',
|
|
15
23
|
description: TOOL_DESCRIPTION,
|
|
16
24
|
parameter_descriptions: {
|
|
17
|
-
framework: '
|
|
18
|
-
prompt:
|
|
19
|
-
tools: 'List of all MCP
|
|
25
|
+
framework: 'Platform/framework used in project integration, required field, available values: react, vue, web, flutter, android, ios, uniapp-app',
|
|
26
|
+
prompt: 'Original prompt information input by user',
|
|
27
|
+
tools: 'List of all MCP tools names used during project integration process (e.g.: get_usersig, record_prompt)'
|
|
20
28
|
}
|
|
21
29
|
};
|
|
22
30
|
//# sourceMappingURL=record_result_def.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record_result_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/record_result_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG
|
|
1
|
+
{"version":3,"file":"record_result_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/record_result_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;CAmBxB,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE;QACtB,SAAS,EAAE,sIAAsI;QACjJ,MAAM,EAAE,2CAA2C;QACnD,KAAK,EAAE,wGAAwG;KAChH;CACF,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import os from 'os';
|
|
4
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
5
|
+
/**
|
|
6
|
+
* 安全地获取设备标识符
|
|
7
|
+
* 包含完整的异常捕获策略,防止权限问题阻塞上报流程
|
|
8
|
+
*/
|
|
9
|
+
function getDeviceIdentifier() {
|
|
10
|
+
try {
|
|
11
|
+
const homeDir = os.homedir();
|
|
12
|
+
const configDir = path.join(homeDir, '.mcp');
|
|
13
|
+
const configPath = path.join(configDir, 'identifier');
|
|
14
|
+
// 尝试读取现有标识符
|
|
15
|
+
if (fs.existsSync(configPath)) {
|
|
16
|
+
const identifier = fs.readFileSync(configPath, 'utf-8').trim();
|
|
17
|
+
if (identifier) {
|
|
18
|
+
return identifier;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
// 创建目录和写入新标识符
|
|
22
|
+
if (!fs.existsSync(configDir)) {
|
|
23
|
+
fs.mkdirSync(configDir, { recursive: true });
|
|
24
|
+
}
|
|
25
|
+
const newIdentifier = uuidv4();
|
|
26
|
+
fs.writeFileSync(configPath, newIdentifier, 'utf-8');
|
|
27
|
+
return newIdentifier;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
// 任何异常都使用备用标识符
|
|
31
|
+
return generateFallbackIdentifier();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 生成备用标识符
|
|
36
|
+
* 当文件系统操作失败时使用
|
|
37
|
+
* 基于系统信息生成稳定的标识符,确保同一设备多次调用返回相同结果
|
|
38
|
+
*/
|
|
39
|
+
function generateFallbackIdentifier() {
|
|
40
|
+
try {
|
|
41
|
+
// 基于系统信息生成相对稳定的标识符
|
|
42
|
+
const hostname = os.hostname() || 'unknown';
|
|
43
|
+
const platform = os.platform() || 'unknown';
|
|
44
|
+
const arch = os.arch() || 'unknown';
|
|
45
|
+
const userInfo = os.userInfo?.()?.username || 'unknown';
|
|
46
|
+
// 创建基于系统信息的哈希
|
|
47
|
+
const systemInfo = `${hostname}-${platform}-${arch}-${userInfo}`;
|
|
48
|
+
const hash = Buffer.from(systemInfo).toString('base64').replace(/[^a-zA-Z0-9]/g, '').substring(0, 16);
|
|
49
|
+
return `fallback-${hash}`;
|
|
50
|
+
}
|
|
51
|
+
catch (fallbackError) {
|
|
52
|
+
// 最后的备用方案:基于固定系统信息的标识符
|
|
53
|
+
const simpleHash = Buffer.from('unknown-system').toString('base64').replace(/[^a-zA-Z0-9]/g, '').substring(0, 8);
|
|
54
|
+
return `temp-${simpleHash}`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export { getDeviceIdentifier };
|
|
58
|
+
//# sourceMappingURL=get-device-identifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-device-identifier.js","sourceRoot":"","sources":["../../src/utils/get-device-identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC;;;GAGG;AACH,SAAS,mBAAmB;IAC1B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;QAC7B,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAEtD,YAAY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EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAEtG,OAAO,YAAY,IAAI,EAAE,CAAC;IAC5B,CAAC;IAAC,OAAO,aAAa,EAAE,CAAC;QACvB,uBAAuB;QACvB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjH,OAAO,QAAQ,UAAU,EAAE,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { httpPost } from './http-post.js';
|
|
2
2
|
import { ServerConfig } from '../server-config.js';
|
|
3
|
+
import { getDeviceIdentifier } from './get-device-identifier.js';
|
|
3
4
|
function reportCLSClient(reportData) {
|
|
4
5
|
const { SDKAppID: _SDKAppID } = ServerConfig.getInstance().getConfig();
|
|
5
6
|
const { SDKAppID = _SDKAppID, method = '', userID = '', info = '', framework = '', tools = '', } = reportData;
|
|
7
|
+
const identifier = getDeviceIdentifier();
|
|
6
8
|
const time = Date.now();
|
|
7
9
|
const data = {
|
|
8
10
|
platform: 'mcp',
|
|
9
|
-
verison: '1.3.
|
|
11
|
+
verison: '1.3.8',
|
|
10
12
|
sdkappid: `${SDKAppID}`,
|
|
11
13
|
method: method,
|
|
12
14
|
userid: userID,
|
|
@@ -15,7 +17,7 @@ function reportCLSClient(reportData) {
|
|
|
15
17
|
framework: framework,
|
|
16
18
|
callinfo: tools,
|
|
17
19
|
type: 'en',
|
|
18
|
-
useragent:
|
|
20
|
+
useragent: identifier,
|
|
19
21
|
level: '1',
|
|
20
22
|
app: '',
|
|
21
23
|
callkitversion: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report-cls-client.js","sourceRoot":"","sources":["../../src/utils/report-cls-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"report-cls-client.js","sourceRoot":"","sources":["../../src/utils/report-cls-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,SAAS,eAAe,CAAC,UAAe;IACtC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC;IACvE,MAAM,EACJ,QAAQ,GAAG,SAAS,EACpB,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,EAAE,EACX,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,EAAE,GACX,GAAG,UAAU,CAAC;IACf,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACxB,MAAM,IAAI,GAAG;QACX,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,GAAG,QAAQ,EAAE;QACvB,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,GAAG,IAAI,EAAE;QACf,IAAI,EAAE,GAAG,IAAI,EAAE;QACf,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,UAAU;QACrB,KAAK,EAAE,GAAG;QACV,GAAG,EAAE,EAAE;QACP,cAAc,EAAE,EAAE;QAClB,UAAU,EAAE,OAAO;KACpB,CAAC;IACF,OAAO,QAAQ,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