tirtc-device-builder 0.9.5 → 0.9.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/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +9 -0
- package/README.md +20 -19
- package/bin/esp32-kit-metadata.js +8 -7
- package/bin/install-esp32-kit.js +13 -4
- package/bin/setup-esp32.js +11 -11
- package/package.json +1 -1
- package/skills/tirtc-esp32-builder/SKILL.md +6 -5
- package/skills/tirtc-esp32-builder/USAGE.md +2 -2
- package/skills/tirtc-esp32-builder/VERSION +1 -1
- package/skills/tirtc-esp32-builder/assets/hardware-ir-v2.example.json +2 -2
- package/skills/tirtc-esp32-builder/assets/hardware-ir.example.json +2 -2
- package/skills/tirtc-esp32-builder/assets/lckfb-szpi-esp32s3-portable-prompt.md +4 -4
- package/skills/tirtc-esp32-builder/references/environment.md +9 -6
- package/skills/tirtc-esp32-builder/references/tirtc-platform.md +9 -4
- package/skills/tirtc-esp32-builder/scripts/doctor.py +16 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
This project follows Semantic Versioning.
|
|
4
4
|
|
|
5
|
+
## 0.9.6
|
|
6
|
+
|
|
7
|
+
- Pin ESP32-S3 Device Kit 1.1.6 with TiRTC C SDK 2.5.0 and verify the
|
|
8
|
+
GitHub release archive checksum before npm publication.
|
|
9
|
+
- Build the Kit from the builder-owned ESP32 source and validate the SDK,
|
|
10
|
+
installer, project generator, and standalone reference firmware.
|
|
11
|
+
- Keep board-specific media adapters and hardware evidence separate from the
|
|
12
|
+
reusable Skill; hardware verification remains board-specific.
|
|
13
|
+
|
|
5
14
|
## 0.9.5
|
|
6
15
|
|
|
7
16
|
- Add focused video-orientation and WeChat UI-profile guidance distinguishing
|
package/README.md
CHANGED
|
@@ -8,11 +8,11 @@ TiRTC Device Builder 用于把 ESP32-S3/ESP32-P4 开发板接入 TiRTC。输入
|
|
|
8
8
|
|---|---|---|
|
|
9
9
|
| `tirtc-esp32-builder` | ESP32-S3 / ESP32-P4、ESP-IDF 5.5.x | 板型识别、Hardware IR、工程生成/移植、H5/AI/设备互呼/微信 VoIP、AEC 门禁、编译烧录和分层验收 |
|
|
10
10
|
|
|
11
|
-
H5/AI 的 ESP32-S3 托管模板、协议文档和 TiRTC SDK 已打包在独立的 ESP32 Device Kit
|
|
11
|
+
H5/AI 的 ESP32-S3 托管模板、协议文档和 TiRTC SDK 已打包在独立的 ESP32 Device Kit 中,安装时会自动下载并校验。ESP32 示例源码由本仓库的 `kit-src/` 维护;设备互呼或微信 VoIP 的移植可参考其中的独立示例。ESP32-P4 必须使用匹配的 P4 SDK、BSP 与网络方案,不能复用 S3 预编译库。
|
|
12
12
|
|
|
13
13
|
- npm 包:[tirtc-device-builder](https://www.npmjs.com/package/tirtc-device-builder)
|
|
14
14
|
- GitHub 仓库:[tangeai/tirtc-device-builder](https://github.com/tangeai/tirtc-device-builder)
|
|
15
|
-
- ESP32 Device Kit:[kit-esp32s3-v1.1.
|
|
15
|
+
- ESP32 Device Kit:[kit-esp32s3-v1.1.6](https://github.com/tangeai/tirtc-device-builder/releases/tag/kit-esp32s3-v1.1.6)
|
|
16
16
|
|
|
17
17
|
文档导航:
|
|
18
18
|
|
|
@@ -282,14 +282,16 @@ board-materials/
|
|
|
282
282
|
| 参考模组 | ESP32-S3-WROOM-1-N16R8,或资源和配置经过确认的兼容板 |
|
|
283
283
|
| ESP-IDF | 5.5.x |
|
|
284
284
|
| 自动安装版本 | ESP-IDF v5.5.4 |
|
|
285
|
-
| TiRTC SDK | `espressif-esp32s3/2.
|
|
286
|
-
| ESP32 Device Kit | 1.1.
|
|
285
|
+
| 本仓库源码与本地打包使用的 TiRTC SDK | `espressif-esp32s3/2.5.0` |
|
|
286
|
+
| ESP32 Device Kit | 1.1.6(内含 TiRTC SDK 2.5.0) |
|
|
287
287
|
| Node.js | 18 或更高版本 |
|
|
288
288
|
| 支持自动安装的系统 | Linux、WSL、macOS |
|
|
289
289
|
| 原生 Windows | 使用 Espressif 官方安装器准备 ESP-IDF,再重新运行检查 |
|
|
290
290
|
|
|
291
291
|
当前托管自动生成器只提供 ESP32-S3 模板。ESP32-P4 可由 Skill 在已有、证据完整的 P4 BSP/工程上移植,但必须使用 `espressif-esp32p4` SDK、匹配的构建合同和明确的 ESP-Hosted 或以太网方案。Flash 或 PSRAM 容量变化时,需要重新评估 `sdkconfig.defaults`、分区表、DMA 和媒体缓存预算。
|
|
292
292
|
|
|
293
|
+
从本仓库 `kit-src/` 直接生成或打包时使用 TiRTC 2.5.0;`setup esp32` 安装固定的 Kit 版本,其 SDK 版本以该 Kit 的 `manifest.json` 为准。
|
|
294
|
+
|
|
293
295
|
### 本机软件
|
|
294
296
|
|
|
295
297
|
`setup esp32 --install` 会检查以下基础命令:
|
|
@@ -392,7 +394,7 @@ Cline 当前还需要在 `Settings → Features → Enable Skills` 中启用实
|
|
|
392
394
|
|---|---|
|
|
393
395
|
| Agent Skill | 上表中所选目录下的 `tirtc-esp32-builder` |
|
|
394
396
|
| 托管根目录 | `~/.tirtc-device-builder` |
|
|
395
|
-
| Device Kit | `~/.tirtc-device-builder/kits/esp32s3/1.1.
|
|
397
|
+
| Device Kit | `~/.tirtc-device-builder/kits/esp32s3/1.1.6` |
|
|
396
398
|
| ESP-IDF | `~/.tirtc-device-builder/esp-idf-v5.5.4` |
|
|
397
399
|
| Espressif 工具 | `~/.tirtc-device-builder/espressif` |
|
|
398
400
|
| 安装记录 | `~/.tirtc-device-builder/config.json` |
|
|
@@ -437,7 +439,7 @@ npx --yes tirtc-device-builder@latest setup esp32 --install \
|
|
|
437
439
|
|
|
438
440
|
```bash
|
|
439
441
|
npx --yes tirtc-device-builder@latest setup esp32 --install \
|
|
440
|
-
--kit-archive /absolute/path/tirtc-esp32s3-kit-1.1.
|
|
442
|
+
--kit-archive /absolute/path/tirtc-esp32s3-kit-1.1.6.tar.gz
|
|
441
443
|
```
|
|
442
444
|
|
|
443
445
|
安装器仍会核对固定的 SHA-256、目录结构、清单和每个资源文件,不接受未经验证的同名压缩包。
|
|
@@ -820,7 +822,7 @@ npx --yes tirtc-device-builder@latest setup esp32 --install --force-skill
|
|
|
820
822
|
|
|
821
823
|
```bash
|
|
822
824
|
npx --yes tirtc-device-builder@latest setup esp32 --install \
|
|
823
|
-
--kit-archive /absolute/path/tirtc-esp32s3-kit-1.1.
|
|
825
|
+
--kit-archive /absolute/path/tirtc-esp32s3-kit-1.1.6.tar.gz
|
|
824
826
|
```
|
|
825
827
|
|
|
826
828
|
安装器会校验 SHA-256 和内部文件清单。如果校验不一致,请重新获取官方 Release 附件,不要跳过校验。
|
|
@@ -880,7 +882,7 @@ npx --yes tirtc-device-builder@latest setup esp32
|
|
|
880
882
|
|
|
881
883
|
不需要。普通开发所需的生成器、模板、协议文档、TiRTC 头文件和 `libTiRTC.a` 都在版本化的 ESP32 Device Kit 中。一键安装会下载公开 Release,并把路径写进 `env.sh`。
|
|
882
884
|
|
|
883
|
-
`--thing-connect-root`
|
|
885
|
+
维护者可用 `--thing-connect-root` 指向本仓库的 `kit-src/`;普通使用者使用安装好的 Device Kit 路径。
|
|
884
886
|
|
|
885
887
|
### 为什么推荐 `npx`,不是安装一个 npm 包就结束?
|
|
886
888
|
|
|
@@ -931,29 +933,28 @@ python3 ~/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py .
|
|
|
931
933
|
|
|
932
934
|
```bash
|
|
933
935
|
npm run pack:esp32-kit -- \
|
|
934
|
-
--
|
|
935
|
-
--kit-version 1.1.4
|
|
936
|
+
--kit-version 1.1.6
|
|
936
937
|
```
|
|
937
938
|
|
|
938
939
|
输出位于 `dist/`:
|
|
939
940
|
|
|
940
941
|
```text
|
|
941
|
-
tirtc-esp32s3-kit-1.1.
|
|
942
|
-
tirtc-esp32s3-kit-1.1.
|
|
942
|
+
tirtc-esp32s3-kit-1.1.6.tar.gz
|
|
943
|
+
tirtc-esp32s3-kit-1.1.6.tar.gz.sha256
|
|
943
944
|
```
|
|
944
945
|
|
|
945
|
-
校验后推送独立的 `kit-esp32s3-v<version>` 标签。`publish-kit.yml` 会从 metadata
|
|
946
|
+
校验后推送独立的 `kit-esp32s3-v<version>` 标签。`publish-kit.yml` 会从 metadata 固定的本仓库源码 commit 重建压缩包、核对 SHA-256,并使用 GitHub Actions token 创建 Release:
|
|
946
947
|
|
|
947
948
|
```bash
|
|
948
949
|
cd dist
|
|
949
|
-
sha256sum -c tirtc-esp32s3-kit-1.1.
|
|
950
|
+
sha256sum -c tirtc-esp32s3-kit-1.1.6.tar.gz.sha256
|
|
950
951
|
cd ..
|
|
951
952
|
|
|
952
|
-
git tag -a kit-esp32s3-v1.1.
|
|
953
|
-
git push origin kit-esp32s3-v1.1.
|
|
953
|
+
git tag -a kit-esp32s3-v1.1.6 -m "TiRTC ESP32-S3 Device Kit 1.1.6"
|
|
954
|
+
git push origin kit-esp32s3-v1.1.6
|
|
954
955
|
```
|
|
955
956
|
|
|
956
|
-
metadata
|
|
957
|
+
metadata 中的版本、标签、本仓库源码 commit 和期望 SHA-256 必须与本地可复现打包结果一致;工作流不会从浮动的 `main` 取发布内容。
|
|
957
958
|
|
|
958
959
|
### 发布 npm
|
|
959
960
|
|
|
@@ -961,8 +962,8 @@ metadata 中的版本、标签、上游 commit 和期望 SHA-256 必须与本地
|
|
|
961
962
|
|
|
962
963
|
```bash
|
|
963
964
|
npm test
|
|
964
|
-
git tag -a v0.9.
|
|
965
|
-
git push origin v0.9.
|
|
965
|
+
git tag -a v0.9.6 -m "v0.9.6"
|
|
966
|
+
git push origin v0.9.6
|
|
966
967
|
```
|
|
967
968
|
|
|
968
969
|
不要重复发布已经存在的 npm 版本。版本变化同步更新 `package.json`、`.codex-plugin/plugin.json` 和发布说明。
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export const ESP32_KIT = Object.freeze({
|
|
2
|
-
archiveName: "tirtc-esp32s3-kit-1.1.
|
|
3
|
-
archiveRoot: "tirtc-esp32s3-kit-1.1.
|
|
4
|
-
releaseTag: "kit-esp32s3-v1.1.
|
|
5
|
-
sha256: "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
archiveName: "tirtc-esp32s3-kit-1.1.6.tar.gz",
|
|
3
|
+
archiveRoot: "tirtc-esp32s3-kit-1.1.6",
|
|
4
|
+
releaseTag: "kit-esp32s3-v1.1.6",
|
|
5
|
+
sha256: "61243703bdee3e1b492fcc6f5245143f419efbd2310127d180875f0708e91d8b",
|
|
6
|
+
sdkVersion: "2.5.0",
|
|
7
|
+
sourceCommit: "68a3b34054ea933d5ea5bfd8acf71e5ff07a7a61",
|
|
8
|
+
url: "https://github.com/tangeai/tirtc-device-builder/releases/download/kit-esp32s3-v1.1.6/tirtc-esp32s3-kit-1.1.6.tar.gz",
|
|
9
|
+
version: "1.1.6",
|
|
9
10
|
});
|
package/bin/install-esp32-kit.js
CHANGED
|
@@ -24,9 +24,6 @@ const REQUIRED_FILES = [
|
|
|
24
24
|
"device-sim/templates/esp32-h5-ai/CMakeLists.txt",
|
|
25
25
|
"device-sim/templates/esp32-h5-ai/platform-media-contract.json",
|
|
26
26
|
"device-sim/templates/esp32-h5-ai/tirtc-runtime-contract.json",
|
|
27
|
-
"device-sim/sdk/espressif-esp32s3/2.3.0/include/tirtc/tiRTC.h",
|
|
28
|
-
"device-sim/sdk/espressif-esp32s3/2.3.0/lib/libTiRTC.a",
|
|
29
|
-
"device-sim/sdk/espressif-esp32s3/2.3.0/manifest/build-contract.env",
|
|
30
27
|
];
|
|
31
28
|
|
|
32
29
|
function hashFile(path) {
|
|
@@ -98,9 +95,21 @@ function validateExtractedKit(root, metadata) {
|
|
|
98
95
|
`Device Kit version mismatch: expected ${metadata.version}, got ${manifest.kit_version}`,
|
|
99
96
|
);
|
|
100
97
|
}
|
|
101
|
-
if (manifest.target !== "esp32s3" ||
|
|
98
|
+
if (manifest.target !== "esp32s3" ||
|
|
99
|
+
!/^(?:2\.3\.0|2\.5\.0)$/.test(manifest.tirtc_sdk_version) ||
|
|
100
|
+
(metadata.sdkVersion && manifest.tirtc_sdk_version !== metadata.sdkVersion)) {
|
|
102
101
|
throw new Error("Device Kit target or TiRTC SDK version is incompatible");
|
|
103
102
|
}
|
|
103
|
+
const sdkRoot = `device-sim/sdk/espressif-esp32s3/${manifest.tirtc_sdk_version}`;
|
|
104
|
+
const sdkFiles = [
|
|
105
|
+
`${sdkRoot}/include/tirtc/tiRTC.h`,
|
|
106
|
+
`${sdkRoot}/lib/libTiRTC.a`,
|
|
107
|
+
`${sdkRoot}/manifest/build-contract.env`,
|
|
108
|
+
];
|
|
109
|
+
const missingSdk = sdkFiles.filter((path) => !existsSync(join(root, path)));
|
|
110
|
+
if (missingSdk.length > 0) {
|
|
111
|
+
throw new Error(`Device Kit SDK is incomplete: ${missingSdk.join(", ")}`);
|
|
112
|
+
}
|
|
104
113
|
if (!manifest.files || typeof manifest.files !== "object") {
|
|
105
114
|
throw new Error("Device Kit manifest has no file checksums");
|
|
106
115
|
}
|
package/bin/setup-esp32.js
CHANGED
|
@@ -29,12 +29,6 @@ const GENERATOR_PATH = join(
|
|
|
29
29
|
"scripts",
|
|
30
30
|
"create_esp32_project.py",
|
|
31
31
|
);
|
|
32
|
-
const SDK_PATH = join(
|
|
33
|
-
"device-sim",
|
|
34
|
-
"sdk",
|
|
35
|
-
"espressif-esp32s3",
|
|
36
|
-
"2.3.0",
|
|
37
|
-
);
|
|
38
32
|
const REQUIRED_SDK_FILES = [
|
|
39
33
|
join("include", "tirtc", "tiRTC.h"),
|
|
40
34
|
join("lib", "libTiRTC.a"),
|
|
@@ -233,6 +227,7 @@ export function inspectDeviceKit(root) {
|
|
|
233
227
|
const manifestPath = root ? join(root, DEVICE_KIT_MANIFEST) : null;
|
|
234
228
|
let manifestPresent = false;
|
|
235
229
|
let version = null;
|
|
230
|
+
let sdkVersion = null;
|
|
236
231
|
let manifestError = null;
|
|
237
232
|
if (manifestPath && existsSync(manifestPath)) {
|
|
238
233
|
manifestPresent = true;
|
|
@@ -245,6 +240,9 @@ export function inspectDeviceKit(root) {
|
|
|
245
240
|
manifest.kit_version.trim()
|
|
246
241
|
) {
|
|
247
242
|
version = manifest.kit_version.trim();
|
|
243
|
+
if (typeof manifest.tirtc_sdk_version === "string") {
|
|
244
|
+
sdkVersion = manifest.tirtc_sdk_version;
|
|
245
|
+
}
|
|
248
246
|
} else {
|
|
249
247
|
manifestError = "manifest.json does not declare kit_version";
|
|
250
248
|
}
|
|
@@ -258,11 +256,13 @@ export function inspectDeviceKit(root) {
|
|
|
258
256
|
const generatorReady = Boolean(
|
|
259
257
|
root && existsSync(join(root, GENERATOR_PATH)),
|
|
260
258
|
);
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
259
|
+
const sdkVersions = sdkVersion
|
|
260
|
+
? [sdkVersion]
|
|
261
|
+
: [...new Set(["2.5.0", ESP32_KIT.sdkVersion])];
|
|
262
|
+
const sdkReady = Boolean(root && sdkVersions.some((candidate) => {
|
|
263
|
+
const sdk = join(root, "device-sim", "sdk", "espressif-esp32s3", candidate);
|
|
264
|
+
return REQUIRED_SDK_FILES.every((relative) => existsSync(join(sdk, relative)));
|
|
265
|
+
}));
|
|
266
266
|
const structureReady = generatorReady && sdkReady;
|
|
267
267
|
const versionCompatible =
|
|
268
268
|
!manifestPresent ||
|
package/package.json
CHANGED
|
@@ -20,11 +20,12 @@ past build as proof for a new artifact.
|
|
|
20
20
|
talkback, AI intercom, device-to-device calling, and WeChat VoIP. Do not
|
|
21
21
|
silently remove a requested feature because the current starter lacks it.
|
|
22
22
|
3. Resolve a versioned source of truth. The managed ESP32-S3 Device Kit is the
|
|
23
|
-
default for its packaged capabilities
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
when the
|
|
27
|
-
|
|
23
|
+
default for its packaged capabilities; this repository's `kit-src/` owns the
|
|
24
|
+
ESP32 generator, SDK and standalone reference implementation. For
|
|
25
|
+
device-call/WeChat protocol simulation use a pinned `tirtc-server-example`
|
|
26
|
+
checkout when the Kit lacks the Linux C simulator and protocol documents.
|
|
27
|
+
Clone or download it only when the user authorizes that external write.
|
|
28
|
+
Read the exact business documents routed by `workflow.md`.
|
|
28
29
|
4. Run Doctor for the exact target and SDK package. Managed generation currently
|
|
29
30
|
automates ESP32-S3. ESP32-P4 is valid only with an evidenced P4 BSP/network
|
|
30
31
|
path and the matching `espressif_esp32p4` SDK/build contract; never link the
|
|
@@ -74,7 +74,7 @@ printf '%s\n' "$TIRTC_THING_CONNECT_ROOT"
|
|
|
74
74
|
python3 <skill-dir>/scripts/doctor.py \
|
|
75
75
|
--expected-idf 5.5 \
|
|
76
76
|
--target esp32s3 \
|
|
77
|
-
--thing-connect-root ~/.tirtc-device-builder/kits/esp32s3/1.1.
|
|
77
|
+
--thing-connect-root ~/.tirtc-device-builder/kits/esp32s3/1.1.6 \
|
|
78
78
|
--require-workspace
|
|
79
79
|
```
|
|
80
80
|
|
|
@@ -119,4 +119,4 @@ python3 <skill-dir>/scripts/firmware_identity.py build/<app>.bin \
|
|
|
119
119
|
|
|
120
120
|
## 当前边界
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
Device Kit 提供 ESP32-S3 H5/AI 模板和生成器,但默认媒体适配器不包含特定开发板的摄像头、麦克风、选定视频路径和扬声器驱动。模板生成和编译成功只证明工程与协议骨架可用,不代表 Web 已经出图或 AI 音频已经通过实机验收。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.6
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"verification": "extracted",
|
|
30
30
|
"tirtc": {
|
|
31
31
|
"platform": "espressif-esp32s3",
|
|
32
|
-
"version": "2.
|
|
33
|
-
"sdk_path": "device-sim/sdk/espressif-esp32s3/2.
|
|
32
|
+
"version": "2.5.0",
|
|
33
|
+
"sdk_path": "device-sim/sdk/espressif-esp32s3/2.5.0",
|
|
34
34
|
"build_contract": "manifest/build-contract.env"
|
|
35
35
|
},
|
|
36
36
|
"source_refs": [
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"verification": "extracted",
|
|
30
30
|
"tirtc": {
|
|
31
31
|
"platform": "espressif-esp32s3",
|
|
32
|
-
"version": "2.
|
|
33
|
-
"sdk_path": "device-sim/sdk/espressif-esp32s3/2.
|
|
32
|
+
"version": "2.5.0",
|
|
33
|
+
"sdk_path": "device-sim/sdk/espressif-esp32s3/2.5.0",
|
|
34
34
|
"build_contract": "manifest/build-contract.env"
|
|
35
35
|
},
|
|
36
36
|
"source_refs": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
export TIRTC_AGENT_CLIENT=codex
|
|
11
|
-
npx --yes tirtc-device-builder@0.9.
|
|
11
|
+
npx --yes tirtc-device-builder@0.9.6 setup esp32 --install \
|
|
12
12
|
--client "$TIRTC_AGENT_CLIENT" --force-skill
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -17,11 +17,11 @@ npx --yes tirtc-device-builder@0.9.5 setup esp32 --install \
|
|
|
17
17
|
本轮第一步先只读运行:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npx --yes tirtc-device-builder@0.9.
|
|
21
|
-
npx --yes tirtc-device-builder@0.9.
|
|
20
|
+
npx --yes tirtc-device-builder@0.9.6 --version
|
|
21
|
+
npx --yes tirtc-device-builder@0.9.6 setup esp32 --client "$TIRTC_AGENT_CLIENT"
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
必须根据命令的实际输出和本机文件确认:npm 包为 0.9.
|
|
24
|
+
必须根据命令的实际输出和本机文件确认:npm 包为 0.9.6、已安装 Skill 的 `VERSION` 为 0.9.6、所选 Device Kit 的 `manifest.json` 中 `kit_version` 为 1.1.6、`tirtc_sdk_version` 为 2.5.0,并且 Doctor 对 `--expected-kit 1.1.6` 输出 `OVERALL: PASS`。Plugin manifest 不属于这种 npm 安装方式的运行时前置条件,不得把不可访问的 Plugin 版本当作阻塞项。如果版本不一致、Skill 是在当前会话启动后才安装,或环境检查未通过,停止并报告前置条件不成立;不要在当前会话中替换 Skill 后继续生成工程。
|
|
25
25
|
|
|
26
26
|
工作区与 clean-room 边界:
|
|
27
27
|
- 将启动 Agent 客户端时的当前目录定义为 `WORKSPACE_ROOT`。
|
|
@@ -16,7 +16,7 @@ The automatic branch never runs `sudo` or modifies a persistent shell profile. W
|
|
|
16
16
|
When `<setup-root>/env.sh` exists, use it only as an activation prefix for the current command:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
bash -lc '. "<setup-root>/env.sh" && python3 "<skill-dir>/scripts/doctor.py" --expected-idf 5.5 --expected-kit 1.1.
|
|
19
|
+
bash -lc '. "<setup-root>/env.sh" && python3 "<skill-dir>/scripts/doctor.py" --expected-idf 5.5 --expected-kit 1.1.6 --target esp32s3 --require-workspace'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
The helper contains paths, not device or network credentials. Read `<setup-root>/config.json` when exact managed paths are needed; the environment helper does not authorize unrelated downloads, shell-profile changes, flashing, or credential writes.
|
|
@@ -26,7 +26,7 @@ Run the doctor before generation, build, flash, or monitor:
|
|
|
26
26
|
```bash
|
|
27
27
|
python3 <skill-dir>/scripts/doctor.py \
|
|
28
28
|
--expected-idf 5.5 \
|
|
29
|
-
--expected-kit 1.1.
|
|
29
|
+
--expected-kit 1.1.6 \
|
|
30
30
|
--target esp32s3 \
|
|
31
31
|
--require-workspace
|
|
32
32
|
```
|
|
@@ -44,15 +44,18 @@ For an explicitly selected legacy workspace, omit `--expected-kit`; otherwise re
|
|
|
44
44
|
1. an explicit `--thing-connect-root <path>`;
|
|
45
45
|
2. `TIRTC_THING_CONNECT_ROOT`;
|
|
46
46
|
3. an ancestor of the project or current directory containing `device-sim/scripts/create_esp32_project.py`;
|
|
47
|
-
4. an ancestor whose `thing-connect/` child contains that generator.
|
|
47
|
+
4. an ancestor whose `kit-src/` or `thing-connect/` child contains that generator.
|
|
48
48
|
|
|
49
|
-
The default managed root is `<setup-root>/kits/esp32s3/<kit-version>`. The
|
|
49
|
+
The default managed root is `<setup-root>/kits/esp32s3/<kit-version>`. The `tirtc-device-builder/kit-src` directory is the ESP32 development source; the doctor also accepts an installed Device Kit root. Older `thing-connect/` layouts remain accepted as legacy inputs.
|
|
50
|
+
Resolve the SDK from the selected Kit manifest or generated project. Kit 1.1.6
|
|
51
|
+
and this repository's source generator use the ESP32-S3 SDK 2.5.0.
|
|
50
52
|
|
|
51
53
|
The managed Kit currently contains the ESP32-S3 H5/AI starter. When the requested
|
|
52
54
|
portfolio includes device-to-device calling or WeChat VoIP and the selected Kit
|
|
53
55
|
does not contain `device-sim-c`, `device-call.md`, `device-voip.md`, and the API
|
|
54
|
-
reference, use
|
|
55
|
-
|
|
56
|
+
reference, use this repository's `kit-src/device-sim/device-sim-esp32` for the
|
|
57
|
+
ESP32 implementation and a pinned `tirtc-server-example` commit for server
|
|
58
|
+
protocols and non-ESP32 simulators. Cloning is an external write and requires
|
|
56
59
|
user authorization. Do not track a moving default branch as build evidence.
|
|
57
60
|
|
|
58
61
|
ESP32-P4 uses a separate `espressif_esp32p4` SDK archive and RISC-V toolchain.
|
|
@@ -20,7 +20,7 @@ used by a build.
|
|
|
20
20
|
## SDK lifecycle
|
|
21
21
|
|
|
22
22
|
TiRTC is one process-wide runtime. The exact selected header governs API and
|
|
23
|
-
option availability. For SDK 2.
|
|
23
|
+
option availability. For SDK 2.5.0 the important order is:
|
|
24
24
|
|
|
25
25
|
1. Set `TIRTC_OPT_MAX_SEND_BUFFER` before `TiRtcInit()` when overriding it.
|
|
26
26
|
2. Call `TiRtcInit()` once.
|
|
@@ -33,7 +33,12 @@ option availability. For SDK 2.3.0 the important order is:
|
|
|
33
33
|
6. Stop sessions and connections through deferred lifecycle work before the one
|
|
34
34
|
final `TiRtcStop()` / `TiRtcUninit()` sequence.
|
|
35
35
|
|
|
36
|
-
The callback table and its context outlive the SDK runtime.
|
|
36
|
+
The callback table and its context outlive the SDK runtime. SDK 2.5.0 adds
|
|
37
|
+
`on_sleep_wakeup_info` at the end of `TIRTCCALLBACKS`; zero-initialize the full
|
|
38
|
+
struct and keep it `NULL` when sleep wakeup is unused. If supplied, this callback
|
|
39
|
+
can run synchronously inside `TiRtcStart()`. Set a custom
|
|
40
|
+
`TIRTC_OPT_TGTRP_POLL_TIMEOUT` after `TiRtcInit()`, which resets it to 10 ms.
|
|
41
|
+
Callback payloads
|
|
37
42
|
are borrowed; copy required data into bounded application-owned storage before
|
|
38
43
|
returning.
|
|
39
44
|
|
|
@@ -85,8 +90,8 @@ drop a requested feature or call it verified.
|
|
|
85
90
|
|
|
86
91
|
## ESP32 targets
|
|
87
92
|
|
|
88
|
-
The current managed generator and Device Kit automate ESP32-S3.
|
|
89
|
-
|
|
93
|
+
The current managed generator and Device Kit automate ESP32-S3. ESP32-P4 requires
|
|
94
|
+
a distinct target-specific SDK package. P4 needs ESP-IDF 5.5.4, matching
|
|
90
95
|
RISC-V toolchain/build contract, PSRAM, and an evidenced network path such as
|
|
91
96
|
ESP-Hosted with C6/C61 or Ethernet. P4 and S3 archives are not interchangeable.
|
|
92
97
|
|
|
@@ -24,9 +24,7 @@ CONTRACT_KEYS = {
|
|
|
24
24
|
}
|
|
25
25
|
THING_CONNECT_ENV = "TIRTC_THING_CONNECT_ROOT"
|
|
26
26
|
GENERATOR_RELATIVE_PATH = Path("device-sim/scripts/create_esp32_project.py")
|
|
27
|
-
|
|
28
|
-
"device-sim/sdk/espressif-esp32s3/2.3.0"
|
|
29
|
-
)
|
|
27
|
+
SDK_RELATIVE_ROOT = Path("device-sim/sdk/espressif-esp32s3")
|
|
30
28
|
DEVICE_KIT_MANIFEST = "manifest.json"
|
|
31
29
|
|
|
32
30
|
|
|
@@ -161,7 +159,7 @@ def discover_serial_ports() -> list[str]:
|
|
|
161
159
|
def normalize_thing_connect_root(candidate: Path) -> Path | None:
|
|
162
160
|
"""Accept either the ThingConnect directory or its parent repository."""
|
|
163
161
|
resolved = candidate.expanduser().resolve()
|
|
164
|
-
for root in (resolved, resolved / "thing-connect"):
|
|
162
|
+
for root in (resolved, resolved / "kit-src", resolved / "thing-connect"):
|
|
165
163
|
if (root / GENERATOR_RELATIVE_PATH).is_file():
|
|
166
164
|
return root
|
|
167
165
|
return None
|
|
@@ -248,7 +246,20 @@ def resolve_sdk_dir(
|
|
|
248
246
|
if bundled.is_dir():
|
|
249
247
|
return bundled, "generated project"
|
|
250
248
|
if thing_connect_root is not None:
|
|
251
|
-
|
|
249
|
+
manifest_path = thing_connect_root / DEVICE_KIT_MANIFEST
|
|
250
|
+
if manifest_path.is_file():
|
|
251
|
+
try:
|
|
252
|
+
manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
|
|
253
|
+
version = manifest.get("tirtc_sdk_version")
|
|
254
|
+
if isinstance(version, str) and re.fullmatch(r"\d+\.\d+\.\d+", version):
|
|
255
|
+
return thing_connect_root / SDK_RELATIVE_ROOT / version, "Device Kit"
|
|
256
|
+
except (OSError, json.JSONDecodeError):
|
|
257
|
+
pass
|
|
258
|
+
for version in ("2.5.0", "2.3.0"):
|
|
259
|
+
candidate = thing_connect_root / SDK_RELATIVE_ROOT / version
|
|
260
|
+
if candidate.is_dir():
|
|
261
|
+
return candidate, "ESP32 source workspace"
|
|
262
|
+
return thing_connect_root / SDK_RELATIVE_ROOT / "2.5.0", "ESP32 source workspace"
|
|
252
263
|
return None, "not found"
|
|
253
264
|
|
|
254
265
|
|