@tencent-rtc/trtc-agent-skills 0.1.0 → 0.1.3
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/.cursor/rules/ui-mode.mdc +99 -0
- package/AGENTS.md +111 -0
- package/CLAUDE.md +133 -0
- package/CODEBUDDY.md +131 -0
- package/README.md +28 -42
- package/README.zh.md +24 -42
- package/ai-instructions/base.md +13 -0
- package/ai-instructions/ui-mode.md +93 -0
- package/bin/cli.js +428 -13
- package/hooks/cursor-adapter.py +315 -0
- package/hooks/hooks-cursor.json +39 -0
- package/hooks/hooks.json +67 -0
- package/knowledge-base/index.yaml +8 -0
- package/knowledge-base/scenarios/conference/base/general-conference.md +6 -3
- package/knowledge-base/slices/conference/web/integration-audit.md +155 -0
- package/knowledge-base/slices/conference/web/login-auth.md +2 -1
- package/knowledge-base/slices/conference/web/official-roomkit-login-ui.md +41 -13
- package/knowledge-base/slices/conference/web/prejoin-check.md +8 -5
- package/package.json +7 -1
- package/skills/trtc/SKILL.md +7 -6
- package/skills/trtc/room-builder/SKILL.md +4 -9
- package/skills/trtc/room-builder/assets/local-usersig/basic-info-config.ts +39 -0
- package/skills/trtc/room-builder/assets/local-usersig/lib-generate-test-usersig-es.min.d.ts +4 -0
- package/skills/trtc/room-builder/assets/local-usersig/lib-generate-test-usersig-es.min.js +2 -0
- package/skills/trtc-onboarding/SKILL.md +35 -33
- package/skills/trtc-onboarding/reference/path-a2-integrate.md +101 -57
- package/skills/trtc-onboarding/reference/path-b-troubleshoot.md +139 -68
- package/skills/trtc-onboarding/reference/reporting-protocol.md +2 -0
- package/skills/trtc-onboarding/reference/usersig-handling.md +98 -104
- package/skills/trtc-search/SKILL.md +7 -0
- package/skills/trtc-topic/SKILL.md +26 -42
- package/skills/trtc-apply/guardrails/apply_lib/__pycache__/__init__.cpython-313.pyc +0 -0
- package/skills/trtc-apply/guardrails/apply_lib/__pycache__/rule_parser.cpython-313.pyc +0 -0
- package/skills/trtc-topic/guardrails/__pycache__/gate_slice_read.cpython-313.pyc +0 -0
- package/skills/trtc-topic/guardrails/__pycache__/gate_slice_write.cpython-313.pyc +0 -0
- package/skills/trtc-topic/guardrails/__pycache__/stop_require_apply_evidence.cpython-313.pyc +0 -0
- package/skills/trtc-topic/scripts/__pycache__/apply.cpython-313.pyc +0 -0
- package/skills/trtc-topic/scripts/lib/__pycache__/state_machine.cpython-313.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/conftest.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/conftest.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_apply_cli.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_apply_cli.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_end_to_end.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_end_to_end.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_finalize_session.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_finalize_session.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_gates.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_gates.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_session_resolver.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_session_resolver.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_state_machine.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_state_machine.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_stop_require_apply.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_stop_require_apply.cpython-313-pytest-9.0.3.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_topic_skill_invariants.cpython-313-pytest-9.0.2.pyc +0 -0
- package/skills/trtc-topic/tests/__pycache__/test_topic_skill_invariants.cpython-313-pytest-9.0.3.pyc +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
alwaysApply: true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- DO NOT EDIT — generated from ai-instructions/ by skills/trtc/room-builder/tools/render_ai_instructions.py. Edit the source markdown and re-run the renderer instead. -->
|
|
6
|
+
|
|
7
|
+
## When this rule applies
|
|
8
|
+
|
|
9
|
+
Only when `.trtc-session.yaml` at the repo root has `ui_mode: official-roomkit`.
|
|
10
|
+
If the file is missing, or `ui_mode` is unset / null / `headless`, this rule
|
|
11
|
+
does not apply — fall back to whatever the tool's default behavior is.
|
|
12
|
+
|
|
13
|
+
## Medical new-project shortcut
|
|
14
|
+
|
|
15
|
+
When the user request is for medical online consultation (for example
|
|
16
|
+
`1v1-video-consultation`, remote diagnosis, online medical consultation,
|
|
17
|
+
doctor-patient video visit) **and** the task is to generate a brand-new
|
|
18
|
+
project rather than integrate into an existing app, bypass the normal
|
|
19
|
+
integration workflow entirely. Do not generate Vue SFCs by hand, and do not run
|
|
20
|
+
any verifiers.
|
|
21
|
+
|
|
22
|
+
Instead, directly copy the bundled medical template project:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
skills/trtc/room-builder/templates/scenarios/medical-consultation/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
to the user's local target project directory, preserving the project exactly
|
|
29
|
+
as packaged. In the handoff or integration notes, tell the customer to use
|
|
30
|
+
`pnpm install` for dependencies and `pnpm dev` for local development. Do not
|
|
31
|
+
recommend `npm install` / `npm run dev`; this medical template starts much
|
|
32
|
+
slower with npm and can show a blank first screen for a while.
|
|
33
|
+
|
|
34
|
+
This shortcut applies only to brand-new medical consultation projects. Existing
|
|
35
|
+
project integration still follows the normal scenario / official-roomkit rules
|
|
36
|
+
below.
|
|
37
|
+
|
|
38
|
+
This is a terminal path. After choosing the bundled medical template, do not
|
|
39
|
+
enter the scenario/topic slice workflow, do not show a scenario capability table,
|
|
40
|
+
do not describe the project as a `general-conference` slice plan, and do not ask
|
|
41
|
+
about per-step auto-advance. Copy the template, mark the session completed, and
|
|
42
|
+
stop.
|
|
43
|
+
|
|
44
|
+
This is an internal execution rule, not user-facing copy. When explaining the
|
|
45
|
+
choice or reporting progress to the customer, do not mention "shortcut",
|
|
46
|
+
"bypass", "normal UI mode", "CLAUDE.md", or any internal rule file. Say that you
|
|
47
|
+
are creating a complete 1v1 video consultation project from the bundled medical
|
|
48
|
+
template, and explain only the outcome and next commands (`pnpm install`,
|
|
49
|
+
`pnpm dev`).
|
|
50
|
+
|
|
51
|
+
## Official RoomKit integration mode
|
|
52
|
+
|
|
53
|
+
When the customer asks to **integrate a conference / meeting into an existing
|
|
54
|
+
Vue 3 app** (for example "集成会议", "接入会议", "add video meeting to my app",
|
|
55
|
+
"official RoomKit", "TUIRoomKit"), use the official RoomKit integration path.
|
|
56
|
+
|
|
57
|
+
In this mode:
|
|
58
|
+
|
|
59
|
+
1. Integrate the official Web RoomKit package. For UI customization APIs,
|
|
60
|
+
verify that the resolved `@tencentcloud/roomkit-web-vue3` version is
|
|
61
|
+
`>=5.4.3` (installing `@tencentcloud/roomkit-web-vue3@5` is acceptable only
|
|
62
|
+
when the lockfile resolves to at least `5.4.3`), plus its documented peer
|
|
63
|
+
packages `tuikit-atomicx-vue3`,
|
|
64
|
+
`@tencentcloud/uikit-base-component-vue3`, and
|
|
65
|
+
`@tencentcloud/universal-api`.
|
|
66
|
+
2. Render the official components (`ConferenceMainView` for PC and
|
|
67
|
+
`ConferenceMainViewH5` for H5) inside `UIKitProvider`.
|
|
68
|
+
3. Use the official `conference` API for auth and room lifecycle:
|
|
69
|
+
`conference.login()`, `conference.setSelfInfo()`,
|
|
70
|
+
`conference.createAndJoinRoom()`, `conference.joinRoom()`,
|
|
71
|
+
`conference.leaveRoom()`, `conference.endRoom()`, and `RoomEvent`
|
|
72
|
+
listeners as appropriate for the customer's flow.
|
|
73
|
+
4. For UserSig, branch on `usersig_source` from session (see
|
|
74
|
+
`skills/trtc-onboarding/reference/usersig-handling.md`):
|
|
75
|
+
- **`local-dev`**: copy bundled signing lib to `src/config/`; collect
|
|
76
|
+
SDKAppID + SecretKey into `basic-info-config.ts` only; login via
|
|
77
|
+
`getBasicInfo(userId)` — no UserSig input on the login page.
|
|
78
|
+
- **`console`**: UserID + SDKAppID + UserSig paste fields; no SecretKey, no
|
|
79
|
+
signing bundle.
|
|
80
|
+
- **`backend`**: API-fetched userSig; no SecretKey, no signing bundle.
|
|
81
|
+
Do not generate `src/utils/usersig.ts` or hand-roll signing with
|
|
82
|
+
`crypto-js`, `pako`, `HmacSHA256`, or `tls-sig-api-v2`. Production MUST
|
|
83
|
+
use `backend`.
|
|
84
|
+
5. For button / toolbar / pre-action UI adjustment, use only the official
|
|
85
|
+
customization APIs: `conference.setWidgetVisible()`,
|
|
86
|
+
`conference.registerWidget()`, and `conference.onWill()`.
|
|
87
|
+
6. Register `setWidgetVisible()`, `registerWidget()`, and `onWill()` after
|
|
88
|
+
`conference.login()` and before `conference.createAndJoinRoom()` /
|
|
89
|
+
`conference.joinRoom()` whenever possible, so built-in buttons do not
|
|
90
|
+
flicker and interceptors do not miss early clicks.
|
|
91
|
+
7. Use `conference.setFeatureConfig()` only for the feature configuration it
|
|
92
|
+
documents. In particular, configure `shareLink` immediately after
|
|
93
|
+
`conference.createAndJoinRoom()` / `conference.joinRoom()` succeeds, so
|
|
94
|
+
the final `roomId` is known.
|
|
95
|
+
8. Collect cleanup functions returned by `registerWidget()` and `onWill()`;
|
|
96
|
+
clean them on both `RoomEvent.ROOM_LEAVE` and `RoomEvent.ROOM_DISMISS`.
|
|
97
|
+
|
|
98
|
+
The acceptance check for this mode is that the app uses the official
|
|
99
|
+
package/components and official UI customization APIs.
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<!-- DO NOT EDIT — generated from ai-instructions/ by skills/trtc/room-builder/tools/render_ai_instructions.py. Edit the source markdown and re-run the renderer instead. -->
|
|
2
|
+
|
|
3
|
+
# TRTC AI Integration
|
|
4
|
+
|
|
5
|
+
This project uses `CLAUDE.md` as the single source of truth for all AI agent instructions.
|
|
6
|
+
|
|
7
|
+
**Read and follow all instructions in `CLAUDE.md` at the project root.**
|
|
8
|
+
|
|
9
|
+
It contains:
|
|
10
|
+
- Skill routing (product / platform detection)
|
|
11
|
+
- Onboarding workflow (new project setup)
|
|
12
|
+
- Knowledge base structure and lookup rules
|
|
13
|
+
- Session state management (`.trtc-session.yaml`)
|
|
14
|
+
|
|
15
|
+
Below are additional rendering-specific rules that apply to all agents:
|
|
16
|
+
|
|
17
|
+
# ui-mode
|
|
18
|
+
|
|
19
|
+
## When this rule applies
|
|
20
|
+
|
|
21
|
+
Only when `.trtc-session.yaml` at the repo root has `ui_mode: official-roomkit`.
|
|
22
|
+
If the file is missing, or `ui_mode` is unset / null / `headless`, this rule
|
|
23
|
+
does not apply — fall back to whatever the tool's default behavior is.
|
|
24
|
+
|
|
25
|
+
## Medical new-project shortcut
|
|
26
|
+
|
|
27
|
+
When the user request is for medical online consultation (for example
|
|
28
|
+
`1v1-video-consultation`, remote diagnosis, online medical consultation,
|
|
29
|
+
doctor-patient video visit) **and** the task is to generate a brand-new
|
|
30
|
+
project rather than integrate into an existing app, bypass the normal
|
|
31
|
+
integration workflow entirely. Do not generate Vue SFCs by hand, and do not run
|
|
32
|
+
any verifiers.
|
|
33
|
+
|
|
34
|
+
Instead, directly copy the bundled medical template project:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
skills/trtc/room-builder/templates/scenarios/medical-consultation/
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
to the user's local target project directory, preserving the project exactly
|
|
41
|
+
as packaged. In the handoff or integration notes, tell the customer to use
|
|
42
|
+
`pnpm install` for dependencies and `pnpm dev` for local development. Do not
|
|
43
|
+
recommend `npm install` / `npm run dev`; this medical template starts much
|
|
44
|
+
slower with npm and can show a blank first screen for a while.
|
|
45
|
+
|
|
46
|
+
This shortcut applies only to brand-new medical consultation projects. Existing
|
|
47
|
+
project integration still follows the normal scenario / official-roomkit rules
|
|
48
|
+
below.
|
|
49
|
+
|
|
50
|
+
This is a terminal path. After choosing the bundled medical template, do not
|
|
51
|
+
enter the scenario/topic slice workflow, do not show a scenario capability table,
|
|
52
|
+
do not describe the project as a `general-conference` slice plan, and do not ask
|
|
53
|
+
about per-step auto-advance. Copy the template, mark the session completed, and
|
|
54
|
+
stop.
|
|
55
|
+
|
|
56
|
+
This is an internal execution rule, not user-facing copy. When explaining the
|
|
57
|
+
choice or reporting progress to the customer, do not mention "shortcut",
|
|
58
|
+
"bypass", "normal UI mode", "CLAUDE.md", or any internal rule file. Say that you
|
|
59
|
+
are creating a complete 1v1 video consultation project from the bundled medical
|
|
60
|
+
template, and explain only the outcome and next commands (`pnpm install`,
|
|
61
|
+
`pnpm dev`).
|
|
62
|
+
|
|
63
|
+
## Official RoomKit integration mode
|
|
64
|
+
|
|
65
|
+
When the customer asks to **integrate a conference / meeting into an existing
|
|
66
|
+
Vue 3 app** (for example "集成会议", "接入会议", "add video meeting to my app",
|
|
67
|
+
"official RoomKit", "TUIRoomKit"), use the official RoomKit integration path.
|
|
68
|
+
|
|
69
|
+
In this mode:
|
|
70
|
+
|
|
71
|
+
1. Integrate the official Web RoomKit package. For UI customization APIs,
|
|
72
|
+
verify that the resolved `@tencentcloud/roomkit-web-vue3` version is
|
|
73
|
+
`>=5.4.3` (installing `@tencentcloud/roomkit-web-vue3@5` is acceptable only
|
|
74
|
+
when the lockfile resolves to at least `5.4.3`), plus its documented peer
|
|
75
|
+
packages `tuikit-atomicx-vue3`,
|
|
76
|
+
`@tencentcloud/uikit-base-component-vue3`, and
|
|
77
|
+
`@tencentcloud/universal-api`.
|
|
78
|
+
2. Render the official components (`ConferenceMainView` for PC and
|
|
79
|
+
`ConferenceMainViewH5` for H5) inside `UIKitProvider`.
|
|
80
|
+
3. Use the official `conference` API for auth and room lifecycle:
|
|
81
|
+
`conference.login()`, `conference.setSelfInfo()`,
|
|
82
|
+
`conference.createAndJoinRoom()`, `conference.joinRoom()`,
|
|
83
|
+
`conference.leaveRoom()`, `conference.endRoom()`, and `RoomEvent`
|
|
84
|
+
listeners as appropriate for the customer's flow.
|
|
85
|
+
4. For UserSig, branch on `usersig_source` from session (see
|
|
86
|
+
`skills/trtc-onboarding/reference/usersig-handling.md`):
|
|
87
|
+
- **`local-dev`**: copy bundled signing lib to `src/config/`; collect
|
|
88
|
+
SDKAppID + SecretKey into `basic-info-config.ts` only; login via
|
|
89
|
+
`getBasicInfo(userId)` — no UserSig input on the login page.
|
|
90
|
+
- **`console`**: UserID + SDKAppID + UserSig paste fields; no SecretKey, no
|
|
91
|
+
signing bundle.
|
|
92
|
+
- **`backend`**: API-fetched userSig; no SecretKey, no signing bundle.
|
|
93
|
+
Do not generate `src/utils/usersig.ts` or hand-roll signing with
|
|
94
|
+
`crypto-js`, `pako`, `HmacSHA256`, or `tls-sig-api-v2`. Production MUST
|
|
95
|
+
use `backend`.
|
|
96
|
+
5. For button / toolbar / pre-action UI adjustment, use only the official
|
|
97
|
+
customization APIs: `conference.setWidgetVisible()`,
|
|
98
|
+
`conference.registerWidget()`, and `conference.onWill()`.
|
|
99
|
+
6. Register `setWidgetVisible()`, `registerWidget()`, and `onWill()` after
|
|
100
|
+
`conference.login()` and before `conference.createAndJoinRoom()` /
|
|
101
|
+
`conference.joinRoom()` whenever possible, so built-in buttons do not
|
|
102
|
+
flicker and interceptors do not miss early clicks.
|
|
103
|
+
7. Use `conference.setFeatureConfig()` only for the feature configuration it
|
|
104
|
+
documents. In particular, configure `shareLink` immediately after
|
|
105
|
+
`conference.createAndJoinRoom()` / `conference.joinRoom()` succeeds, so
|
|
106
|
+
the final `roomId` is known.
|
|
107
|
+
8. Collect cleanup functions returned by `registerWidget()` and `onWill()`;
|
|
108
|
+
clean them on both `RoomEvent.ROOM_LEAVE` and `RoomEvent.ROOM_DISMISS`.
|
|
109
|
+
|
|
110
|
+
The acceptance check for this mode is that the app uses the official
|
|
111
|
+
package/components and official UI customization APIs.
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# TRTC AI Integration — AI 行为指令
|
|
2
|
+
|
|
3
|
+
## 语言规则
|
|
4
|
+
|
|
5
|
+
- 根据用户输入语言回复,默认英文
|
|
6
|
+
- 知识库内容为中文,回复时翻译为用户语言
|
|
7
|
+
- 代码标识符、API 名称、错误码保持原样
|
|
8
|
+
|
|
9
|
+
## 路由逻辑
|
|
10
|
+
|
|
11
|
+
当用户提出 TRTC 相关问题时:
|
|
12
|
+
|
|
13
|
+
1. **识别产品**:Chat / Call / RTC Engine / Live / Conference
|
|
14
|
+
2. **识别平台**:Web / Android / iOS / Flutter / Electron / Unity
|
|
15
|
+
3. **读取知识库**:先读 `knowledge-base/slices/{product}/` 下的产品级概览,再读 `{product}/{platform}/` 下的平台实现细节
|
|
16
|
+
4. **引用来源**:标明参考的 slice ID 和官方文档链接
|
|
17
|
+
|
|
18
|
+
**新用户检测**:当用户首次使用或描述从零开始的集成需求时,优先进入 `skills/trtc-onboarding/SKILL.md` 引导流程。
|
|
19
|
+
|
|
20
|
+
## 关键路径
|
|
21
|
+
|
|
22
|
+
| 用途 | 路径 |
|
|
23
|
+
| ------ | ------ |
|
|
24
|
+
| 全量索引 | `knowledge-base/index.yaml` |
|
|
25
|
+
| Slice(原子能力片段) | `knowledge-base/slices/{product}/{platform}/` |
|
|
26
|
+
| Scenario(场景组合) | `knowledge-base/scenarios/` |
|
|
27
|
+
| 远程文档索引 | `curl -s https://trtc.io/llms/{product}.txt` |
|
|
28
|
+
|
|
29
|
+
## 核心概念
|
|
30
|
+
|
|
31
|
+
- **Slice**:一个原子能力(如「进房」「推流」「多实例登录」),包含产品级概览(跨平台)+ 平台实现细节(具体 API/代码)
|
|
32
|
+
- **Scenario**:完整使用场景,引用多个 slice 并定义执行顺序
|
|
33
|
+
|
|
34
|
+
<!-- AI-INSTRUCTIONS:BEGIN -->
|
|
35
|
+
<!-- DO NOT EDIT — generated from ai-instructions/ by skills/trtc/room-builder/tools/render_ai_instructions.py. Edit the source markdown and re-run the renderer instead. -->
|
|
36
|
+
|
|
37
|
+
## ui-mode
|
|
38
|
+
|
|
39
|
+
### When this rule applies
|
|
40
|
+
|
|
41
|
+
Only when `.trtc-session.yaml` at the repo root has `ui_mode: official-roomkit`.
|
|
42
|
+
If the file is missing, or `ui_mode` is unset / null / `headless`, this rule
|
|
43
|
+
does not apply — fall back to whatever the tool's default behavior is.
|
|
44
|
+
|
|
45
|
+
### Medical new-project shortcut
|
|
46
|
+
|
|
47
|
+
When the user request is for medical online consultation (for example
|
|
48
|
+
`1v1-video-consultation`, remote diagnosis, online medical consultation,
|
|
49
|
+
doctor-patient video visit) **and** the task is to generate a brand-new
|
|
50
|
+
project rather than integrate into an existing app, bypass the normal
|
|
51
|
+
integration workflow entirely. Do not generate Vue SFCs by hand, and do not run
|
|
52
|
+
any verifiers.
|
|
53
|
+
|
|
54
|
+
Instead, directly copy the bundled medical template project:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
skills/trtc/room-builder/templates/scenarios/medical-consultation/
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
to the user's local target project directory, preserving the project exactly
|
|
61
|
+
as packaged. In the handoff or integration notes, tell the customer to use
|
|
62
|
+
`pnpm install` for dependencies and `pnpm dev` for local development. Do not
|
|
63
|
+
recommend `npm install` / `npm run dev`; this medical template starts much
|
|
64
|
+
slower with npm and can show a blank first screen for a while.
|
|
65
|
+
|
|
66
|
+
This shortcut applies only to brand-new medical consultation projects. Existing
|
|
67
|
+
project integration still follows the normal scenario / official-roomkit rules
|
|
68
|
+
below.
|
|
69
|
+
|
|
70
|
+
This is a terminal path. After choosing the bundled medical template, do not
|
|
71
|
+
enter the scenario/topic slice workflow, do not show a scenario capability table,
|
|
72
|
+
do not describe the project as a `general-conference` slice plan, and do not ask
|
|
73
|
+
about per-step auto-advance. Copy the template, mark the session completed, and
|
|
74
|
+
stop.
|
|
75
|
+
|
|
76
|
+
This is an internal execution rule, not user-facing copy. When explaining the
|
|
77
|
+
choice or reporting progress to the customer, do not mention "shortcut",
|
|
78
|
+
"bypass", "normal UI mode", "CLAUDE.md", or any internal rule file. Say that you
|
|
79
|
+
are creating a complete 1v1 video consultation project from the bundled medical
|
|
80
|
+
template, and explain only the outcome and next commands (`pnpm install`,
|
|
81
|
+
`pnpm dev`).
|
|
82
|
+
|
|
83
|
+
### Official RoomKit integration mode
|
|
84
|
+
|
|
85
|
+
When the customer asks to **integrate a conference / meeting into an existing
|
|
86
|
+
Vue 3 app** (for example "集成会议", "接入会议", "add video meeting to my app",
|
|
87
|
+
"official RoomKit", "TUIRoomKit"), use the official RoomKit integration path.
|
|
88
|
+
|
|
89
|
+
In this mode:
|
|
90
|
+
|
|
91
|
+
1. Integrate the official Web RoomKit package. For UI customization APIs,
|
|
92
|
+
verify that the resolved `@tencentcloud/roomkit-web-vue3` version is
|
|
93
|
+
`>=5.4.3` (installing `@tencentcloud/roomkit-web-vue3@5` is acceptable only
|
|
94
|
+
when the lockfile resolves to at least `5.4.3`), plus its documented peer
|
|
95
|
+
packages `tuikit-atomicx-vue3`,
|
|
96
|
+
`@tencentcloud/uikit-base-component-vue3`, and
|
|
97
|
+
`@tencentcloud/universal-api`.
|
|
98
|
+
2. Render the official components (`ConferenceMainView` for PC and
|
|
99
|
+
`ConferenceMainViewH5` for H5) inside `UIKitProvider`.
|
|
100
|
+
3. Use the official `conference` API for auth and room lifecycle:
|
|
101
|
+
`conference.login()`, `conference.setSelfInfo()`,
|
|
102
|
+
`conference.createAndJoinRoom()`, `conference.joinRoom()`,
|
|
103
|
+
`conference.leaveRoom()`, `conference.endRoom()`, and `RoomEvent`
|
|
104
|
+
listeners as appropriate for the customer's flow.
|
|
105
|
+
4. For UserSig, branch on `usersig_source` from session (see
|
|
106
|
+
`skills/trtc-onboarding/reference/usersig-handling.md`):
|
|
107
|
+
- **`local-dev`**: copy bundled signing lib to `src/config/`; collect
|
|
108
|
+
SDKAppID + SecretKey into `basic-info-config.ts` only; login via
|
|
109
|
+
`getBasicInfo(userId)` — no UserSig input on the login page.
|
|
110
|
+
- **`console`**: UserID + SDKAppID + UserSig paste fields; no SecretKey, no
|
|
111
|
+
signing bundle.
|
|
112
|
+
- **`backend`**: API-fetched userSig; no SecretKey, no signing bundle.
|
|
113
|
+
Do not generate `src/utils/usersig.ts` or hand-roll signing with
|
|
114
|
+
`crypto-js`, `pako`, `HmacSHA256`, or `tls-sig-api-v2`. Production MUST
|
|
115
|
+
use `backend`.
|
|
116
|
+
5. For button / toolbar / pre-action UI adjustment, use only the official
|
|
117
|
+
customization APIs: `conference.setWidgetVisible()`,
|
|
118
|
+
`conference.registerWidget()`, and `conference.onWill()`.
|
|
119
|
+
6. Register `setWidgetVisible()`, `registerWidget()`, and `onWill()` after
|
|
120
|
+
`conference.login()` and before `conference.createAndJoinRoom()` /
|
|
121
|
+
`conference.joinRoom()` whenever possible, so built-in buttons do not
|
|
122
|
+
flicker and interceptors do not miss early clicks.
|
|
123
|
+
7. Use `conference.setFeatureConfig()` only for the feature configuration it
|
|
124
|
+
documents. In particular, configure `shareLink` immediately after
|
|
125
|
+
`conference.createAndJoinRoom()` / `conference.joinRoom()` succeeds, so
|
|
126
|
+
the final `roomId` is known.
|
|
127
|
+
8. Collect cleanup functions returned by `registerWidget()` and `onWill()`;
|
|
128
|
+
clean them on both `RoomEvent.ROOM_LEAVE` and `RoomEvent.ROOM_DISMISS`.
|
|
129
|
+
|
|
130
|
+
The acceptance check for this mode is that the app uses the official
|
|
131
|
+
package/components and official UI customization APIs.
|
|
132
|
+
|
|
133
|
+
<!-- AI-INSTRUCTIONS:END -->
|
package/CODEBUDDY.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# TRTC AI Integration Agent
|
|
2
|
+
|
|
3
|
+
You are a TRTC SDK integration expert. You help developers integrate and troubleshoot Tencent Real-Time Communication (TRTC) SDKs — covering Chat, Call, RTC Engine, Live, and Conference — across Web, Android, iOS, Flutter, and Electron.
|
|
4
|
+
|
|
5
|
+
This repository uses a three-layer architecture:
|
|
6
|
+
- **Layer 3: Skills** (`skills/`) — routing, onboarding, search, apply, topic, docs
|
|
7
|
+
- **Layer 2: Knowledge Base** (`knowledge-base/`) — atomic capability slices + integration scenarios
|
|
8
|
+
- **Layer 1: Runtime** — you (CodeBuddy) are the runtime layer; the skills logic is in Layer 3
|
|
9
|
+
|
|
10
|
+
> **Note for CodeBuddy**: skill files live at `skills/*/SKILL.md`. Read them directly at that path.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## ⚠️ Mandatory file-read rule (CodeBuddy-specific)
|
|
15
|
+
|
|
16
|
+
**Before responding to any TRTC question, you MUST read the relevant skill file.** Do not rely on training-data memory to simulate skill behavior.
|
|
17
|
+
|
|
18
|
+
- On every new TRTC question: read `skills/trtc/SKILL.md` first (the router), then read the target skill file (e.g. `skills/trtc-onboarding/SKILL.md`).
|
|
19
|
+
- On every knowledge-base lookup: read `knowledge-base/index.yaml` first, then read the matched slice file.
|
|
20
|
+
- **Before outputting any slice ID** (e.g. `conference/login-auth`): read `knowledge-base/index.yaml` and confirm the ID appears in the `slices` array. Never output a slice ID you haven't verified in the index — invented IDs are silent errors that break downstream integration steps.
|
|
21
|
+
- "0 tool calls" on a TRTC question is always wrong. If you find yourself about to answer without reading a file, stop and read it first.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Step 0: Check for existing session state
|
|
26
|
+
|
|
27
|
+
Before identifying product / platform, check if an onboarding session is already in progress:
|
|
28
|
+
|
|
29
|
+
1. Read `.trtc-session.yaml` from the project root if it exists.
|
|
30
|
+
2. If it exists and parses cleanly:
|
|
31
|
+
- `product` and `platform` fields → treat as known, skip identification questions.
|
|
32
|
+
- `intent` and `current_step` fields → onboarding is mid-flight. Follow `skills/trtc-onboarding/SKILL.md` immediately; it handles "continue where we left off".
|
|
33
|
+
- `status = completed` → still route to onboarding; it decides whether to offer "add another feature" or start fresh.
|
|
34
|
+
3. If missing, corrupt, schema_version mismatched, or `updated_at` older than 30 days → proceed normally to Step 1. Do not mention the session file to the user.
|
|
35
|
+
4. Never write to the session file yourself. Writes belong to `onboarding/SKILL.md` at its defined checkpoints.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 1: Identify the product
|
|
40
|
+
|
|
41
|
+
| Product | 中文信号 | English signals | Technical |
|
|
42
|
+
|---------|---------|----------------|-----------|
|
|
43
|
+
| **Chat** | 消息、会话、单聊、群聊、群组、IM、聊天、登录、多端、消息记录、已读回执、@提醒、撤回、推送、离线消息 | messaging, conversation, 1-to-1 chat, group chat, IM, instant messaging, message history, read receipt, mention, recall, push notification, offline message, multi-device login | `@tencentcloud/chat`, `V2TIMManager` |
|
|
44
|
+
| **Call** | 通话、呼叫、1v1、视频电话、语音通话、来电、去电、振铃、接听、挂断、拒接、通话记录、忙线、免打扰 | call, 1v1 call, video call, voice call, incoming call, outgoing call, ringing, answer, hangup, decline, call history, busy, do not disturb | `TUICallKit` |
|
|
45
|
+
| **RTC Engine** | 进房、退房、推流、拉流、混流、音视频、采集、编码、码率、低延时、SEI、TRTC 引擎 | enter room, leave room, publish stream, play stream, mix stream, audio/video, capture, encoding, bitrate, low latency, SEI, RTC engine | `TRTC`, `TRTCCloud` |
|
|
46
|
+
| **Live** | 直播、推流、连麦、观众、主播、弹幕、礼物、打赏、美颜、变声、开播、下播、PK、房管 | live streaming, publish, co-guest, co-host, audience, host, anchor, barrage, danmu, gift, beauty filter, voice changer, start broadcast, end broadcast, PK, moderator | `AtomicXCore`, `LiveCoreView`, `LiveListStore` |
|
|
47
|
+
| **Conference** | 会议、多人视频、视频会议、入会、离会、创建会议、预约会议、参会人、会控、屏幕共享、举手、录制、等候室、虚拟背景、静音全员 | meeting, multi-person video, video conferencing, join meeting, leave meeting, create meeting, schedule meeting, participant, moderation, screen share, raise hand, record, waiting room, virtual background, mute all | `TUIRoomKit` |
|
|
48
|
+
|
|
49
|
+
If ambiguous, ask — keep it easy: "Your question sounds like it could be about Chat (messaging) or RTC Engine (audio/video). Which one?"
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Step 2: Identify the platform
|
|
54
|
+
|
|
55
|
+
| Platform | 中文信号 | English signals |
|
|
56
|
+
|----------|---------|----------------|
|
|
57
|
+
| **Web** | 浏览器、网页、前端 | TypeScript, JavaScript, npm, browser, React, Vue |
|
|
58
|
+
| **Android** | 安卓 | Java, Kotlin, Gradle, Activity |
|
|
59
|
+
| **iOS** | 苹果 | Swift, Objective-C, Xcode, Podfile |
|
|
60
|
+
| **Flutter** | — | Dart, Flutter, Widget, pubspec.yaml |
|
|
61
|
+
| **Electron** | 桌面、客户端 | Electron, Node.js desktop |
|
|
62
|
+
|
|
63
|
+
If the user doesn't specify and it matters for the answer, ask. Conceptual questions don't require a platform.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Step 3: Route to the right skill
|
|
68
|
+
|
|
69
|
+
| User intent | Skill to follow |
|
|
70
|
+
|-------------|----------------|
|
|
71
|
+
| **"get started" / "help me integrate" / "I'm new"** | `skills/trtc-onboarding/SKILL.md` |
|
|
72
|
+
| **"I want to ADD / BUILD / IMPLEMENT X"** (feature or demo) | `skills/trtc-onboarding/SKILL.md` Path A2 — **never dump slice content directly** |
|
|
73
|
+
| **"从零开始" / "帮我接入" / "try the demo"** | `skills/trtc-onboarding/SKILL.md` |
|
|
74
|
+
| **"walk me through X" / "step by step" / full scenario** | `skills/trtc-topic/SKILL.md` (onboarding A2-Q0 hands off here once a scenario id is chosen) |
|
|
75
|
+
| **"how does X work?" / conceptual question** | `skills/trtc-docs/SKILL.md` |
|
|
76
|
+
| **error code / API comparison / official pattern** | `skills/trtc-docs/SKILL.md` (slice-first fallback chain) |
|
|
77
|
+
| **pricing / quotas / migration / product comparison** | `skills/trtc-docs/SKILL.md` |
|
|
78
|
+
| **crash / error / "not working" / "黑屏"** | `skills/trtc-onboarding/SKILL.md` Path B (troubleshooting) |
|
|
79
|
+
|
|
80
|
+
**`search/SKILL.md` is NEVER a user-facing destination.** It is called internally by `onboarding` and `docs` to locate slices. Do not route users there directly.
|
|
81
|
+
|
|
82
|
+
**`apply/SKILL.md` is NEVER user-facing.** It runs silently inside `onboarding`/`topic` flows as a compile + integration quality gate. "Review my code" is not an entry point.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Review-request triage (hard rule — do NOT refuse)
|
|
87
|
+
|
|
88
|
+
When the user uses: review / audit / cross-check / validate / 帮我看看 / 是否正确 / check my X — do NOT perform a code-style review and do NOT refuse. **Triage to the underlying intent:**
|
|
89
|
+
|
|
90
|
+
| Intent signal | Route |
|
|
91
|
+
|--------------|-------|
|
|
92
|
+
| A. "doesn't work" / crash / black screen / login fails + pasted code | `onboarding/SKILL.md` Path B → B-Q1 symptom tree |
|
|
93
|
+
| B. Numeric error code present (6206, -2340, 70001…) | `docs/SKILL.md` — slice-first fallback chain |
|
|
94
|
+
| C. "the right way to X" / "expected pattern" / "how should I" | `docs/SKILL.md` — slice-first fallback chain |
|
|
95
|
+
| D. "X vs Y" / API comparison | `docs/SKILL.md` — slice-first fallback chain |
|
|
96
|
+
| E. Pure style/quality review, no concrete question | **Decline** — apply is an internal quality gate, not a user-facing review service |
|
|
97
|
+
|
|
98
|
+
If ambiguous between A–E, route to `onboarding/SKILL.md` Path B; it will ask ONE triage question (B-Q0).
|
|
99
|
+
|
|
100
|
+
**Answer-shape constraint:** even on A–D routes, your reply must NOT take review shapes — no "Critical Review Checklist", no "✅ Correct vs ❌ Incorrect" contrast as main structure. Use documentation / factual-lookup shapes instead (cite slice id, quote official pattern, link the error-code doc).
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Knowledge base usage
|
|
105
|
+
|
|
106
|
+
All TRTC knowledge lives in `knowledge-base/`. Start by reading `knowledge-base/index.yaml` to discover slice IDs, file paths, tags, and relationships.
|
|
107
|
+
|
|
108
|
+
**Loading order:**
|
|
109
|
+
1. Product-level overview: `knowledge-base/{slice.file}` (cross-platform concepts, ALWAYS/NEVER rules, troubleshooting trees)
|
|
110
|
+
2. Platform-specific detail: `knowledge-base/slices/{product}/{platform}/{ability}.md` — if this path doesn't exist for the requested platform, there is no platform-specific slice for that pairing. Do NOT synthesize code; tell the user in their language.
|
|
111
|
+
3. Scenario file (if applicable): `knowledge-base/{scenario.file}` — step-by-step integration sequence
|
|
112
|
+
|
|
113
|
+
Slices with `status: planned` in the index have no content file yet. Tell the user this capability is still being documented; share what's known from the index description; link to official docs if available.
|
|
114
|
+
|
|
115
|
+
**Code generation rules:**
|
|
116
|
+
- Copy import statements, API signatures, and type annotations verbatim from slice files — never from training-data memory
|
|
117
|
+
- Never invent API names, class names, or method signatures
|
|
118
|
+
- All generated code must include necessary imports, type declarations, and error handling
|
|
119
|
+
- Before presenting code that will be written into the user's project, run `apply/SKILL.md` (mode: full) as an internal quality gate
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Hard rules
|
|
124
|
+
|
|
125
|
+
1. **No code before plan confirmation** — for integration requests, always confirm the plan first via onboarding
|
|
126
|
+
2. **No invented APIs** — every SDK class/method must come from the knowledge base
|
|
127
|
+
3. **Cite sources** — mention the slice ID (e.g., `live/coguest-apply`) and link official docs
|
|
128
|
+
4. **Language** — respond in the same language as the user; keep API names, error codes, and identifiers in their original form
|
|
129
|
+
5. **One question at a time** — don't stack multiple questions in a single reply
|
|
130
|
+
6. **Never re-ask inferred facts** — if you inferred product/platform from project files, state it; don't ask for confirmation
|
|
131
|
+
7. **Never expose internal skills** — don't say "I'm calling apply" or "search says X"; these are silent infrastructure
|
package/README.md
CHANGED
|
@@ -59,57 +59,43 @@ codex plugin marketplace add Tencent-RTC/agent-skills
|
|
|
59
59
|
/reload-plugins
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
### Install via npx (any IDE, no plugin marketplace required)
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
If your IDE doesn't have a plugin marketplace, or you'd rather pin the install to a specific project, use the npx installer. Run it inside your project directory:
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
```bash
|
|
67
|
+
# Default — auto-detect installed IDEs (~/.{claude,cursor,codebuddy,codex}/)
|
|
68
|
+
# and install for each one found. Falls back to claude if none detected.
|
|
69
|
+
npx -y @tencent-rtc/trtc-agent-skills add
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
# Force install for every supported IDE (even ones you don't have)
|
|
72
|
+
npx -y @tencent-rtc/trtc-agent-skills add --ide all
|
|
69
73
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
```
|
|
74
|
+
# Install only for one specific IDE
|
|
75
|
+
npx -y @tencent-rtc/trtc-agent-skills add --ide cursor
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```json
|
|
77
|
-
{
|
|
78
|
-
"mcpServers": {
|
|
79
|
-
"tencent-rtc": {
|
|
80
|
-
"command": "npx",
|
|
81
|
-
"args": ["-y", "@tencentcloud/sdk-mcp@1.4.3"],
|
|
82
|
-
"env": {
|
|
83
|
-
"SDKAPPID": "YOUR_SDKAPPID",
|
|
84
|
-
"SECRETKEY": "YOUR_SECRET_KEY"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
77
|
+
# Wipe a previous install before re-installing
|
|
78
|
+
npx -y @tencent-rtc/trtc-agent-skills add --clean
|
|
89
79
|
```
|
|
90
80
|
|
|
91
|
-
|
|
81
|
+
## Using with MCP
|
|
92
82
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
This skill calls **one** optional MCP server: `tencent-rtc-skill-tool` (package
|
|
84
|
+
[`@tencent-rtc/skill-tool`](https://www.npmjs.com/package/@tencent-rtc/skill-tool)),
|
|
85
|
+
used only for lightweight, fire-and-forget usage telemetry. The skill works fully
|
|
86
|
+
without it — if it is not configured, reporting is simply skipped.
|
|
96
87
|
|
|
97
|
-
**
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
88
|
+
The skill does **not** read your TRTC credentials from any MCP server and does
|
|
89
|
+
**not** generate `userSig` for you. You provide your **SDKAppID** when asked, and
|
|
90
|
+
you obtain a **test UserSig** from the TRTC console:
|
|
91
|
+
|
|
92
|
+
> Find `YOUR_SDKAPPID` and generate a test UserSig on the application details
|
|
93
|
+
> page in the [console (International)](https://console.trtc.io) or
|
|
94
|
+
> [console (China)](https://console.cloud.tencent.com). A console-issued UserSig
|
|
95
|
+
> is for development only and expires; for production, issue UserSig from your own
|
|
96
|
+
> backend and keep your SecretKey on the server.
|
|
97
|
+
|
|
98
|
+
The `tencent-rtc-skill-tool` tool server is registered automatically when you install via `npx` — no manual MCP configuration needed. If you installed via the IDE plugin marketplace instead, follow the manual MCP setup steps in your IDE's docs (see `bin/cli.js` for the exact server entry).
|
|
113
99
|
|
|
114
100
|
---
|
|
115
101
|
|
package/README.zh.md
CHANGED
|
@@ -59,57 +59,39 @@ codex plugin marketplace add Tencent-RTC/agent-skills
|
|
|
59
59
|
/reload-plugins
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
### 通过 npx 安装(任意 IDE,无需插件市场)
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
如果你所在的 IDE 没有插件市场,或者你希望把安装范围限定在某个具体项目里,可以用 npx 安装器。在项目根目录执行:
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
```bash
|
|
67
|
+
# 默认 — 自动检测已安装的 IDE(~/.{claude,cursor,codebuddy,codex}/)
|
|
68
|
+
# 为每一个检测到的 IDE 都安装好;都没检测到时回退到 claude
|
|
69
|
+
npx -y @tencent-rtc/trtc-agent-skills add
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
# 强制为所有支持的 IDE 都装一份(即使你本机没装那个 IDE)
|
|
72
|
+
npx -y @tencent-rtc/trtc-agent-skills add --ide all
|
|
69
73
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
```
|
|
74
|
+
# 只为某个指定的 IDE 安装
|
|
75
|
+
npx -y @tencent-rtc/trtc-agent-skills add --ide cursor
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```json
|
|
77
|
-
{
|
|
78
|
-
"mcpServers": {
|
|
79
|
-
"tencent-rtc": {
|
|
80
|
-
"command": "npx",
|
|
81
|
-
"args": ["-y", "@tencentcloud/sdk-mcp@1.4.3"],
|
|
82
|
-
"env": {
|
|
83
|
-
"SDKAPPID": "YOUR_SDKAPPID",
|
|
84
|
-
"SECRETKEY": "YOUR_SECRET_KEY"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
77
|
+
# 重装前先清理旧的安装
|
|
78
|
+
npx -y @tencent-rtc/trtc-agent-skills add --clean
|
|
89
79
|
```
|
|
90
80
|
|
|
91
|
-
|
|
81
|
+
## 配置 MCP
|
|
92
82
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
本 Skill 只调用 **一个** 可选的 MCP Server:`tencent-rtc-skill-tool`(包
|
|
84
|
+
[`@tencent-rtc/skill-tool`](https://www.npmjs.com/package/@tencent-rtc/skill-tool)),
|
|
85
|
+
仅用于轻量的、即发即忘的使用情况上报。没有它 Skill 也能完整工作——未配置时自动跳过上报。
|
|
96
86
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"env": {
|
|
106
|
-
"SDKAPPID": "YOUR_SDKAPPID",
|
|
107
|
-
"SECRETKEY": "YOUR_SECRET_KEY"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
87
|
+
本 Skill **不会** 从任何 MCP 读取你的 TRTC 凭证,也 **不会** 替你生成 `userSig`。
|
|
88
|
+
你在被询问时提供 **SDKAppID**,并自行到 TRTC 控制台获取 **测试 UserSig**:
|
|
89
|
+
|
|
90
|
+
> 在[控制台(国际站)](https://console.trtc.io) / [控制台(中国站)](https://console.cloud.tencent.com)
|
|
91
|
+
> 的应用详情页获取 `YOUR_SDKAPPID`,并通过「快速跑通 / UserSig 生成&校验」生成测试 UserSig。
|
|
92
|
+
> 控制台签发的 UserSig 仅用于开发联调且会过期;生产环境必须由你自己的后端签发,SecretKey 务必只保留在服务端。
|
|
93
|
+
|
|
94
|
+
通过 `npx` 安装时,`tencent-rtc-skill-tool` 工具服务会自动注册到对应 IDE 的 MCP 配置,无需手动配置;如果是通过 IDE 插件市场安装,则需按各 IDE 的文档手动配置 MCP(具体 server entry 见 `bin/cli.js`)。
|
|
113
95
|
|
|
114
96
|
---
|
|
115
97
|
|