@tencentcloud/sdk-mcp 1.7.5 → 1.7.6
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/CHANGELOG.md +10 -0
- package/README.md +57 -54
- package/knowledge/chunker.js +1 -0
- package/knowledge/path-meta.js +12 -1
- package/knowledge/search/search-core.js +22 -4
- package/knowledge/search/search-knowledge.js +1 -1
- package/package.json +1 -1
- package/resource/index/manifest.json +1 -1
- package/resource/integration/callkit/preset/android/integration.md +0 -4
- package/resource/integration/callkit/preset/flutter/integration.md +0 -4
- package/resource/integration/callkit/preset/ios/integration.md +0 -4
- package/resource/integration/chat/preset/react/integration.md +0 -5
- package/resource/integration/chat/preset/uni-app/integration.md +0 -4
- package/resource/integration/chat/preset/vue/integration.md +0 -5
- package/resource/integration/livekit/preset/live/android/live-host-integration.md +0 -4
- package/resource/integration/livekit/preset/live/ios/live-host-integration.md +0 -4
- package/resource/integration/livekit/preset/live/vue/live-pusher-integration.md +0 -4
- package/resource/knowledge/callkit/preset/harmonyos/integration.md +0 -4
- package/resource/knowledge/chat/preset/android-view/integration.md +0 -4
- package/resource/knowledge/chat/preset/ios-uikit/integration.md +0 -4
- package/resource/knowledge/chat/preset/react/h5/integration.md +0 -5
- package/resource/knowledge/chat/preset/vue/h5/integration.md +0 -5
- package/resource/knowledge/roomkit/preset/android/integration.md +0 -4
- package/resource/knowledge/roomkit/preset/flutter/integration.md +0 -4
- package/resource/knowledge/roomkit/preset/harmonyos/integration.md +0 -4
- package/resource/knowledge/roomkit/preset/ios/integration.md +0 -4
- package/resource/knowledge/roomkit/preset/uniapp-app/integration.md +0 -4
- package/server.js +42 -34
- package/tools/common/get_usersig.js +1 -1
- package/tools/common/present_framework_choice.js +5 -5
- package/tools/definitions/finalize_answer_def.js +17 -16
- package/tools/definitions/get_native_call_uikit_integration_def.js +25 -16
- package/tools/definitions/get_native_callkit_core_integration_def.js +37 -26
- package/tools/definitions/get_native_chat_uikit_integration_def.js +22 -13
- package/tools/definitions/get_native_live_uikit_integration_def.js +30 -21
- package/tools/definitions/get_native_livekit_core_integration_def.js +25 -16
- package/tools/definitions/get_usersig_def.js +20 -13
- package/tools/definitions/get_web_call_uikit_integration_def.js +21 -12
- package/tools/definitions/get_web_chat_uikit_integration_def.js +22 -13
- package/tools/definitions/get_web_live_uikit_integration_def.js +21 -12
- package/tools/definitions/get_web_room_core_integration_def.js +29 -20
- package/tools/definitions/get_web_room_uikit_integration_def.js +21 -12
- package/tools/definitions/integration-boundary.js +9 -5
- package/tools/definitions/present_framework_choice_def.js +21 -21
- package/tools/definitions/search_trtc_knowledge_def.js +48 -26
- package/tools/definitions/submit_feedback_def.js +18 -14
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
|
|
2
2
|
const TOOL_DESCRIPTION = `
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Purpose:
|
|
4
|
+
Return Native Chat UIKit integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
When to call (MUST):
|
|
7
|
+
- User explicitly asks for runnable project integration code or concrete implementation steps.
|
|
8
|
+
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
11
|
+
|
|
12
|
+
Scope details:
|
|
13
|
+
Returns Native Chat UIKit integration documentation for mobile IM app integration or chat-window embedding.
|
|
14
|
+
|
|
15
|
+
Common trigger lexicon:
|
|
7
16
|
Native Chat UIKit, TUIKit, IM, 聊天, 会话列表, 聊天窗口, Flutter, Android, iOS, full-featured, chat-only, 客服, 问诊
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
Inputs:
|
|
10
19
|
- framework: flutter | android | ios
|
|
11
20
|
- goals: [full-featured] | [chat-only]
|
|
12
|
-
- prompt:
|
|
21
|
+
- prompt: Original user question. Keep full context; do not compress into keyword summary.
|
|
13
22
|
|
|
14
|
-
|
|
15
|
-
- content: [{ type: 'text', text:
|
|
23
|
+
Outputs:
|
|
24
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
26
|
+
Boundaries:
|
|
27
|
+
- If platform/framework is not specified, call 'present_framework_choice' first.
|
|
28
|
+
- Targets end-to-end Native Chat UIKit integration, not platform selection or deep single-feature exploration.
|
|
20
29
|
${INTEGRATION_BOUNDARY_SUFFIX}
|
|
21
30
|
`;
|
|
22
31
|
const PARAMETER_DESCRIPTIONS = {
|
|
23
|
-
framework: '
|
|
24
|
-
goals: '
|
|
25
|
-
prompt: '
|
|
32
|
+
framework: 'Target platform. Parameter name must be framework (not platform). Allowed values: flutter | android | ios. Android/iOS are primary codegen paths (Compose/SwiftUI). For View/UIKit integration reference, use search_trtc_knowledge.',
|
|
33
|
+
goals: 'Goal list. Exactly one value is allowed: full-featured | chat-only.',
|
|
34
|
+
prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
|
|
26
35
|
};
|
|
27
36
|
export const GET_NATIVE_CHAT_UIKIT_INTEGRATION_DEFINITION = {
|
|
28
37
|
name: 'get_native_chat_uikit_integration',
|
|
@@ -1,35 +1,44 @@
|
|
|
1
1
|
import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
|
|
2
2
|
const TOOL_DESCRIPTION = `
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Purpose:
|
|
4
|
+
Return Native TUILiveKit preset integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
When to call (MUST):
|
|
7
|
+
- User explicitly asks for runnable project integration code or concrete implementation steps.
|
|
8
|
+
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
11
|
+
|
|
12
|
+
Scope details:
|
|
13
|
+
Returns Native video-live integration documentation based on TUILiveKit preset UI components, for mobile (Android/iOS) runnable code generation and integration. Coverage includes live list (audience entry), host streaming page, and audience viewing page with complete preset UI interactions and business flow.
|
|
14
|
+
|
|
15
|
+
Common trigger lexicon (may overlap with 'get_native_livekit_core_integration' Core tool):
|
|
7
16
|
集成 LiveKit, 接入 TUILiveKit, 视频直播, 直播开播, 主播开播, 观众观看, 直播列表, 开播页, 观看页, 直播间列表, Android, iOS
|
|
8
|
-
|
|
17
|
+
When only common triggers are hit, ask a clarification first: "Do you prefer preset default live UI (TUILiveKit) or custom live UI based on Core SDK/AtomicXCore?" Call this tool only after user chooses preset/default; if user chooses custom/Core, call 'get_native_livekit_core_integration'.
|
|
9
18
|
|
|
10
|
-
|
|
19
|
+
Preset-only trigger lexicon (direct call, no clarification needed):
|
|
11
20
|
TUILiveKit, Native TUILiveKit, Native Live UIKit, preset, preset 集成, 预制 UI, 预制开播页, 预制观看页, 预制直播列表, 默认直播界面, 开箱即用直播界面, 现成的开播页面, 直播界面已经有了, TUILiveKit Android, TUILiveKit iOS, AnchorPrepareView
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
Inputs:
|
|
14
23
|
- framework: android | ios
|
|
15
|
-
- goals:
|
|
16
|
-
- prompt:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- content: [{ type: 'text', text:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
- framework
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
24
|
+
- goals: Feature module list (multi-select allowed; output is organized in order: live list -> host streaming -> audience viewing).
|
|
25
|
+
- prompt: Original user question. Keep full context; do not compress into keyword summary.
|
|
26
|
+
|
|
27
|
+
Outputs:
|
|
28
|
+
- content: [{ type: 'text', text: Documentation body (including platform-common setup/dependency steps plus integration steps and code for selected pages) }]
|
|
29
|
+
|
|
30
|
+
Boundaries:
|
|
31
|
+
- This tool is only for **video live (live)** scenario. Voice-room needs are out of scope; use 'get_native_livekit_core_integration' instead.
|
|
32
|
+
- framework supports android | ios only. There is no preset TUILiveKit doc for flutter/uni-app; for those needs, use 'get_native_livekit_core_integration'.
|
|
33
|
+
- If platform is missing, call 'present_framework_choice' first.
|
|
34
|
+
- If user explicitly indicates Core intent (e.g. custom UI / Core SDK / AtomicXCore / LiveCoreView / self-built live page), call 'get_native_livekit_core_integration' directly.
|
|
35
|
+
- Targets end-to-end pages (host streaming / audience viewing / live list), not single-feature extensions such as co-host, PK, gifts, danmaku, beauty, or audio effects (use 'search_trtc_knowledge' for those).
|
|
27
36
|
${INTEGRATION_BOUNDARY_SUFFIX}
|
|
28
37
|
`;
|
|
29
38
|
const PARAMETER_DESCRIPTIONS = {
|
|
30
|
-
framework: '
|
|
31
|
-
goals: '
|
|
32
|
-
prompt: '
|
|
39
|
+
framework: 'Target platform. Parameter name must be framework (not platform). Allowed values: android | ios.',
|
|
40
|
+
goals: 'Goal list (multi-select). Allowed values: live_list | host_streaming | audience_streaming. A complete mobile live app usually includes all three goals.',
|
|
41
|
+
prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
|
|
33
42
|
};
|
|
34
43
|
export const GET_NATIVE_LIVE_UIKIT_INTEGRATION_DEFINITION = {
|
|
35
44
|
name: 'get_native_live_uikit_integration',
|
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
|
|
2
2
|
const TOOL_DESCRIPTION = `
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Purpose:
|
|
4
|
+
Return Native LiveKit Core integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
When to call (MUST):
|
|
7
|
+
- User explicitly asks for runnable project integration code or concrete implementation steps.
|
|
8
|
+
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
11
|
+
|
|
12
|
+
Scope details:
|
|
13
|
+
Returns Native LiveKit Core integration documentation based on AtomicXCore SDK, for implementing host start, audience viewing, and room list in video live or voice-room scenarios.
|
|
14
|
+
|
|
15
|
+
Common trigger lexicon:
|
|
7
16
|
Native LiveKit Core, AtomicXCore, 无 UI SDK, Core SDK, 视频直播, 语聊房, 开播, 观看, 房间列表, Android, iOS, Flutter, uni-app, live, voice
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
Inputs:
|
|
10
19
|
- scenario: live | voice
|
|
11
20
|
- framework: android | ios | flutter | uni-app
|
|
12
|
-
- goals:
|
|
13
|
-
- prompt:
|
|
21
|
+
- goals: Feature module list
|
|
22
|
+
- prompt: Original user question. Keep full context; do not compress into keyword summary.
|
|
14
23
|
|
|
15
|
-
|
|
16
|
-
- content: [{ type: 'text', text:
|
|
24
|
+
Outputs:
|
|
25
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
17
26
|
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
27
|
+
Boundaries:
|
|
28
|
+
- If platform/framework is not specified, call 'present_framework_choice' first.
|
|
29
|
+
- Targets baseline integration path for video live or voice room on AtomicXCore SDK, not feature extensions such as co-host, PK, member list, beauty, audio effects, danmaku, or gifts.
|
|
30
|
+
- Returns Core/Store-level baseline integration docs, not complete preset UIKit page templates.
|
|
22
31
|
${INTEGRATION_BOUNDARY_SUFFIX}
|
|
23
32
|
`;
|
|
24
33
|
const PARAMETER_DESCRIPTIONS = {
|
|
25
|
-
scenario: '
|
|
26
|
-
framework: '
|
|
27
|
-
goals: '
|
|
28
|
-
prompt: '
|
|
34
|
+
scenario: 'Scenario type. Allowed values: live | voice. Use this integration tool for host start / audience viewing / room list; for feature extensions (co-host, PK, member list, beauty, audio effects, danmaku, gifts), use search_trtc_knowledge.',
|
|
35
|
+
framework: 'Target platform. Parameter name must be framework (not platform). Allowed values: android | ios | flutter | uni-app.',
|
|
36
|
+
goals: 'Goals list. Allowed values: host_streaming | audience_streaming | live_list.',
|
|
37
|
+
prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
|
|
29
38
|
};
|
|
30
39
|
export const GET_NATIVE_LIVEKIT_CORE_INTEGRATION_DEFINITION = {
|
|
31
40
|
name: 'get_native_livekit_core_integration',
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
const TOOL_DESCRIPTION = `
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
Purpose:
|
|
3
|
+
Generate a test userSig using SDKAppID and secretKey from MCP environment variables, for IM/TRTC local debugging.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
When to call (MUST):
|
|
6
|
+
- User explicitly asks to generate userSig for a specific userID.
|
|
7
|
+
- User needs a test credential for IM/TRTC local integration debugging.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- User asks about userSig principles, production signing architecture, or security design.
|
|
11
|
+
- User does not provide a concrete userID yet.
|
|
12
|
+
|
|
13
|
+
Common trigger lexicon:
|
|
14
|
+
- 生成 userSig, 测试凭证, 本地联调凭证, userID 对应 userSig, IM 登录凭证, TRTC 登录凭证
|
|
15
|
+
|
|
16
|
+
Inputs:
|
|
9
17
|
- userID
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
- content: [{ type: 'text', text: userSig
|
|
19
|
+
Outputs:
|
|
20
|
+
- content: [{ type: 'text', text: userSig result or error details }]
|
|
13
21
|
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- 如果环境变量缺失,需先补齐配置
|
|
22
|
+
Boundaries:
|
|
23
|
+
- This tool is for test credential generation only.
|
|
24
|
+
- Production should use server-side signing.
|
|
25
|
+
- If required environment variables are missing, return configuration guidance.
|
|
19
26
|
`;
|
|
20
27
|
export const GET_USERSIG_DEFINITION = {
|
|
21
28
|
name: 'get_usersig',
|
|
22
29
|
description: TOOL_DESCRIPTION,
|
|
23
30
|
parameter_descriptions: {
|
|
24
|
-
userID: '
|
|
31
|
+
userID: 'Target userID for Tencent Cloud app login.',
|
|
25
32
|
},
|
|
26
33
|
};
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
|
|
2
2
|
const TOOL_DESCRIPTION = `
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Purpose:
|
|
4
|
+
Return Web TUICallKit preset integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
When to call (MUST):
|
|
7
|
+
- User explicitly asks for runnable project integration code or concrete implementation steps.
|
|
8
|
+
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
11
|
+
|
|
12
|
+
Scope details:
|
|
13
|
+
Returns Web TUICallKit preset integration documentation for PC/H5 audio-video calling applications.
|
|
14
|
+
|
|
15
|
+
Common trigger lexicon:
|
|
7
16
|
Web Call UIKit, Web TUICallKit, TUICallKit, preset 集成, React, Vue, PC, H5, 音视频通话, 视频通话, 语音通话, 集成, 呼叫, 接听
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
Inputs:
|
|
10
19
|
- framework: react | vue
|
|
11
|
-
- prompt:
|
|
20
|
+
- prompt: Original user question. Keep full context; do not compress into keyword summary.
|
|
12
21
|
|
|
13
|
-
|
|
14
|
-
- content: [{ type: 'text', text:
|
|
22
|
+
Outputs:
|
|
23
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
15
24
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
25
|
+
Boundaries:
|
|
26
|
+
- If platform/framework is not specified, call 'present_framework_choice' first.
|
|
27
|
+
- Targets end-to-end Web CallKit preset integration, not API-level details or interactive framework selection.
|
|
19
28
|
${INTEGRATION_BOUNDARY_SUFFIX}
|
|
20
29
|
`;
|
|
21
30
|
const PARAMETER_DESCRIPTIONS = {
|
|
22
|
-
framework: '
|
|
23
|
-
prompt: '
|
|
31
|
+
framework: 'Target framework. Parameter name must be framework (not platform). Allowed values: react | vue.',
|
|
32
|
+
prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
|
|
24
33
|
};
|
|
25
34
|
export const GET_WEB_CALL_UIKIT_INTEGRATION_DEFINITION = {
|
|
26
35
|
name: 'get_web_call_uikit_integration',
|
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
|
|
2
2
|
const TOOL_DESCRIPTION = `
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Purpose:
|
|
4
|
+
Return Web Chat UIKit integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
When to call (MUST):
|
|
7
|
+
- User explicitly asks for runnable project integration code or concrete implementation steps.
|
|
8
|
+
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
11
|
+
|
|
12
|
+
Scope details:
|
|
13
|
+
Returns Web Chat UIKit integration documentation for full-featured chat app or chat-only widget embedding.
|
|
14
|
+
|
|
15
|
+
Common trigger lexicon:
|
|
7
16
|
Web Chat UIKit, TUIKit, IM, 聊天, 会话列表, 聊天窗口, React, Vue, full-featured, chat-only, 客服, 问诊, 消息入口
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
Inputs:
|
|
10
19
|
- framework: react | vue
|
|
11
20
|
- goals: [full-featured] | [chat-only]
|
|
12
|
-
- prompt:
|
|
21
|
+
- prompt: Original user question. Keep full context; do not compress into keyword summary.
|
|
13
22
|
|
|
14
|
-
|
|
15
|
-
- content: [{ type: 'text', text:
|
|
23
|
+
Outputs:
|
|
24
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
26
|
+
Boundaries:
|
|
27
|
+
- If platform/framework is not specified, call 'present_framework_choice' first.
|
|
28
|
+
- Targets end-to-end Web Chat UIKit integration, not component-level details or interactive framework selection.
|
|
20
29
|
${INTEGRATION_BOUNDARY_SUFFIX}
|
|
21
30
|
`;
|
|
22
31
|
const PARAMETER_DESCRIPTIONS = {
|
|
23
|
-
framework: '
|
|
24
|
-
goals: '
|
|
25
|
-
prompt: '
|
|
32
|
+
framework: 'Target framework. Parameter name must be framework (not platform). Allowed values: react | vue.',
|
|
33
|
+
goals: 'Goal list. Exactly one value is allowed: full-featured | chat-only.',
|
|
34
|
+
prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
|
|
26
35
|
};
|
|
27
36
|
export const GET_WEB_CHAT_UIKIT_INTEGRATION_DEFINITION = {
|
|
28
37
|
name: 'get_web_chat_uikit_integration',
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
|
|
2
2
|
const TOOL_DESCRIPTION = `
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Purpose:
|
|
4
|
+
Return Web Live UIKit integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
When to call (MUST):
|
|
7
|
+
- User explicitly asks for runnable project integration code or concrete implementation steps.
|
|
8
|
+
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
11
|
+
|
|
12
|
+
Scope details:
|
|
13
|
+
Returns Web Live UIKit page-level integration documentation for live list, player, pusher, and co-guest entry pages.
|
|
14
|
+
|
|
15
|
+
Common trigger lexicon:
|
|
7
16
|
Web Live UIKit, TUILiveUIKit, Vue, 页面级集成, 页面接入, 列表页, 观看页, 开播页, liveList, livePlayer-desk, livePlayer-h5, livePusher
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
- goals:
|
|
11
|
-
- prompt:
|
|
18
|
+
Inputs:
|
|
19
|
+
- goals: Feature list
|
|
20
|
+
- prompt: Original user question. Keep full context; do not compress into keyword summary.
|
|
12
21
|
|
|
13
|
-
|
|
14
|
-
- content: [{ type: 'text', text:
|
|
22
|
+
Outputs:
|
|
23
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
15
24
|
|
|
16
|
-
|
|
17
|
-
-
|
|
25
|
+
Boundaries:
|
|
26
|
+
- Primarily targets Web Vue page-level integration, not State API field/method deep dives or single-component details.
|
|
18
27
|
${INTEGRATION_BOUNDARY_SUFFIX}
|
|
19
28
|
`;
|
|
20
29
|
const PARAMETER_DESCRIPTIONS = {
|
|
21
|
-
goals: '
|
|
22
|
-
prompt: '
|
|
30
|
+
goals: 'Goals list. Allowed values: liveList | livePlayer-desk | livePlayer-h5 | livePusher。',
|
|
31
|
+
prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
|
|
23
32
|
};
|
|
24
33
|
export const GET_WEB_LIVE_UIKIT_INTEGRATION_DEFINITION = {
|
|
25
34
|
name: 'get_web_live_uikit_integration',
|
|
@@ -1,40 +1,49 @@
|
|
|
1
1
|
import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
|
|
2
2
|
const TOOL_DESCRIPTION = `
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Purpose:
|
|
4
|
+
Return Web RoomKit Atomicx Core integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
When to call (MUST):
|
|
7
|
+
- User explicitly asks for runnable project integration code or concrete implementation steps.
|
|
8
|
+
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
11
|
+
|
|
12
|
+
Scope details:
|
|
13
|
+
Returns Web RoomKit Atomicx Core integration documentation for custom meeting-room implementation (no preset UI), including login, room state, and device capabilities.
|
|
14
|
+
|
|
15
|
+
Common trigger lexicon (may overlap with 'get_web_room_uikit_integration' preset tool):
|
|
7
16
|
Web RoomKit, TUIRoomKit, Atomicx, Vue, 集成 RoomKit, 接入会议, 会议室, meeting, room
|
|
8
|
-
|
|
17
|
+
When only common triggers are hit, ask a clarification first: "Do you prefer preset UI (TUIRoomUIKit) or custom room implementation with Atomicx API?" Call this tool only after user chooses custom/Atomicx/Core; otherwise call 'get_web_room_uikit_integration'.
|
|
9
18
|
|
|
10
|
-
|
|
19
|
+
Core-only trigger lexicon (direct call, no clarification needed):
|
|
11
20
|
Atomicx API, 自实现会议室, 自定义会议 UI, 不用预制 UI, useRoomState, useDeviceState, useLoginState, room-state, device-state, device-detection
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
Inputs:
|
|
14
23
|
- framework: vue
|
|
15
24
|
- goals: room-state | device-detection | device-state
|
|
16
|
-
- prompt:
|
|
25
|
+
- prompt: Original user question. Keep full context; do not compress into keyword summary.
|
|
17
26
|
|
|
18
|
-
|
|
19
|
-
- content: [{ type: 'text', text:
|
|
27
|
+
Outputs:
|
|
28
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
20
29
|
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
30
|
+
Boundaries:
|
|
31
|
+
- If platform/framework is not specified, call 'present_framework_choice' first.
|
|
32
|
+
- Targets Atomicx Core baseline integration (login + room-state/device modules), not preset UI page templates.
|
|
33
|
+
- For extended modules such as screen sharing, virtual background, or scheduled meeting, call \`search_trtc_knowledge(types=[feature])\`.
|
|
34
|
+
- **Login constraint**: MUST call \`get_usersig\` to obtain UserSig, then use \`useLoginState.login\`; DO NOT implement local UserSig generation in project (e.g. GenerateTestUserSig).
|
|
26
35
|
${INTEGRATION_BOUNDARY_SUFFIX}
|
|
27
36
|
`;
|
|
28
37
|
const PARAMETER_DESCRIPTIONS = {
|
|
29
|
-
framework: '
|
|
30
|
-
goals: '
|
|
31
|
-
prompt: '
|
|
38
|
+
framework: 'Target framework. Parameter name must be framework (not platform). Fixed value: vue.',
|
|
39
|
+
goals: 'Goals list. Allowed values: room-state | device-detection | device-state.',
|
|
40
|
+
prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
|
|
32
41
|
};
|
|
33
|
-
const ANTI_HALLUCINATION_HEADER =
|
|
42
|
+
const ANTI_HALLUCINATION_HEADER = `This document is based on Atomicx Core API custom implementation. DO NOT copy preset TUIRoomUIKit UI components as-is.\n\n`;
|
|
34
43
|
const ANTI_HALLUCINATION_CONSTRAINT = `
|
|
35
44
|
---
|
|
36
|
-
|
|
37
|
-
|
|
45
|
+
[AI Code Generation Constraints - Atomicx Core]
|
|
46
|
+
Generate code strictly based on documented content. Login flow MUST call get_usersig to obtain UserSig, then use useLoginState.login. DO NOT implement GenerateTestUserSig or local UserSig signing logic in project.
|
|
38
47
|
---
|
|
39
48
|
`;
|
|
40
49
|
export const GET_WEB_ROOM_CORE_INTEGRATION_DEFINITION = {
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
import { INTEGRATION_BOUNDARY_SUFFIX } from './integration-boundary.js';
|
|
2
2
|
const TOOL_DESCRIPTION = `
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Purpose:
|
|
4
|
+
Return Web Room UIKit preset integration docs for explicit codegen implementation.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
When to call (MUST):
|
|
7
|
+
- User explicitly asks for runnable project integration code or concrete implementation steps.
|
|
8
|
+
|
|
9
|
+
When NOT to call:
|
|
10
|
+
- Pure feature Q&A, documentation lookup, API/component explanation, troubleshooting.
|
|
11
|
+
|
|
12
|
+
Scope details:
|
|
13
|
+
Returns Web Room UIKit preset integration documentation for meeting entry page, meeting room page, and default meeting app setup.
|
|
14
|
+
|
|
15
|
+
Common trigger lexicon:
|
|
7
16
|
Web Room UIKit, TUIRoomUIKit, Atomicx, Vue, 预制 UI, 默认会议方案, meeting app, home.vue, room.vue, 会议入口页, 会议室页面, H5 会议, PC 会议, 集成
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
Inputs:
|
|
10
19
|
- framework: vue
|
|
11
|
-
- prompt:
|
|
20
|
+
- prompt: Original user question. Keep full context; do not compress into keyword summary.
|
|
12
21
|
|
|
13
|
-
|
|
14
|
-
- content: [{ type: 'text', text:
|
|
22
|
+
Outputs:
|
|
23
|
+
- content: [{ type: 'text', text: Documentation body or explanatory text }]
|
|
15
24
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
25
|
+
Boundaries:
|
|
26
|
+
- Targets preset UI primary integration, not Atomicx API-level or single-module custom implementation details.
|
|
27
|
+
- If user wants custom Atomicx meeting-room implementation, call 'get_web_room_core_integration'.
|
|
19
28
|
${INTEGRATION_BOUNDARY_SUFFIX}
|
|
20
29
|
`;
|
|
21
30
|
const PARAMETER_DESCRIPTIONS = {
|
|
22
|
-
framework: '
|
|
23
|
-
prompt: '
|
|
31
|
+
framework: 'Target framework. Parameter name must be framework (not platform). Fixed value: vue.',
|
|
32
|
+
prompt: 'Original user question. Keep full context; do not compress into keyword summary.',
|
|
24
33
|
};
|
|
25
34
|
export const GET_WEB_ROOM_UIKIT_INTEGRATION_DEFINITION = {
|
|
26
35
|
name: 'get_web_room_uikit_integration',
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
/** Phase
|
|
1
|
+
/** Shared Phase B boundary suffix for all get_* integration tools */
|
|
2
2
|
export const INTEGRATION_BOUNDARY_SUFFIX = `
|
|
3
|
-
- **Codegen
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
3
|
+
- **Codegen only (MUST)**: Call this tool only when user explicitly asks for runnable integration/code implementation (e.g. “接入到项目”, “写接入代码”, “直接给我可运行代码”).
|
|
4
|
+
- **When NOT to call**: For pure Q&A, documentation lookup, API/component explanation, error troubleshooting, or “先了解方案/步骤” requests, call \`search_trtc_knowledge\` instead.
|
|
5
|
+
- **Workflow split**: This tool belongs to codegen flow. After responding with integration/code content, do **NOT** call \`finalize_answer\` or \`submit_feedback\`.
|
|
6
|
+
- **User-visible output rule (MUST)**: Tool routing decisions are internal. Do not expose process text like “应调用/先调用/让我先搜索/我将调用某工具/属于咨询类问题/而非 codegen”. Output only the final actionable content.
|
|
7
|
+
- **Few-shot boundary**:
|
|
8
|
+
- Positive: “用 Vue 把 Chat UIKit 接到我现有项目,给可运行代码” -> call corresponding \`get_*_integration\`
|
|
9
|
+
- Negative: “Chat UIKit 有哪些能力/组件?” -> call \`search_trtc_knowledge\`
|
|
10
|
+
`;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
const TOOL_DESCRIPTION = `
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
Purpose:
|
|
3
|
+
Collect platform/framework choice from user when the question requires client-side platform context.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
When to call (MUST):
|
|
6
|
+
- User asks API/component/feature/client troubleshooting/integration guidance but does not specify platform.
|
|
7
|
+
- search_trtc_knowledge returns needs_framework.
|
|
8
|
+
- User requests explicit codegen/integration but platform is not specified.
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- 虚拟背景怎么开(未说明产品或平台)
|
|
10
|
+
When NOT to call:
|
|
11
|
+
- Cross-platform product topics: pricing, product package, console-level product config.
|
|
12
|
+
- Server-side topics: REST API, webhook, UserSig principle.
|
|
13
|
+
- Platform is already explicitly provided by user.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
-
|
|
15
|
+
Boundary:
|
|
16
|
+
- This tool only collects platform/framework; it does NOT return documentation content.
|
|
17
|
+
- After user chooses platform:
|
|
18
|
+
- Q&A / troubleshooting / doc lookup -> call search_trtc_knowledge with product + frameworks.
|
|
19
|
+
- Explicit codegen request -> call corresponding get_*_integration tool.
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- 只负责收集平台或框架选择,不返回文档正文
|
|
22
|
-
- **咨询链路(硬规则)**:用户问 API/组件/feature/客户端排障/集成查阅,但未说明平台 → MUST **先本工具**,用户选定后再 \`search_trtc_knowledge\`(**product + frameworks**);**禁止**跳过
|
|
23
|
-
- **codegen 链路(硬规则)**:用户要集成进项目且未说明平台 → MUST **先本工具**,选定后再对应 \`get_*_integration\`
|
|
24
|
-
- 跨平台通用问题(计费、服务端 REST、UserSig 原理)且与单一客户端无关 → 可直接 \`search_trtc_knowledge\`,不必经过本工具(**product 仍 MUST 从 prompt 提取**)
|
|
21
|
+
Few-shot:
|
|
22
|
+
- User: "Chat UIKit 怎么集成?" (no React/Vue) -> CALL present_framework_choice
|
|
23
|
+
- User: "CallKit 来电铃声怎么设置?" (no platform) -> CALL present_framework_choice
|
|
24
|
+
- User: "TIMPush 厂商通道怎么在控制台开通?" -> DO NOT call present_framework_choice
|
|
25
25
|
`;
|
|
26
26
|
const SELECTION_PROMPT_TEXT = `
|
|
27
|
-
|
|
27
|
+
Please show available platform/framework options to user first. Continue with search or integration only after user selects one option.
|
|
28
28
|
`;
|
|
29
29
|
export const PRESENT_FRAMEWORK_CHOICE_DEFINITION = {
|
|
30
30
|
name: 'present_framework_choice',
|
|
31
31
|
description: TOOL_DESCRIPTION,
|
|
32
32
|
selectionText: SELECTION_PROMPT_TEXT,
|
|
33
33
|
parameter_descriptions: {
|
|
34
|
-
product: '
|
|
34
|
+
product: 'Target product. Allowed: chat | call | live | room | rtcengine | native_trtc_sdk | push.',
|
|
35
35
|
},
|
|
36
36
|
};
|