tirtc-devtools-cli 0.2.0 → 0.2.2

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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  - `assets prepare`:把默认资产或任意 MP4 准备成 native role driver 使用的媒体资产。
9
9
  - `device start`:作为标准上行 device 启动 native DevTools driver,送出音视频,按需产出本机 `bootstrap.json` 与 execution evidence。
10
10
  - `client start`:作为标准下行 client 消费本机 `bootstrap.json` 或显式 device/token,产出 `frame_dump` 与 summary。
11
- - CLI 负责参数、环境变量、token 签发、JSON envelope、artifact 摘要与打包定位;真实 TiRTC lifecycle 由 `products/devtools/driver/` 承接。
11
+ - CLI 负责参数、环境变量、token 签发、JSON envelope、artifact 摘要与打包定位;真实 TiRTC lifecycle 由 `products/devtools/driver/` 承接。native role 失败且 runtime logging 已初始化时,driver 会在退出前尝试上传日志,CLI JSON 会透出 `log_id` 与 `log_upload` 结果。
12
12
 
13
13
  ## 不负责什么
14
14
 
@@ -60,6 +60,10 @@ node products/cli/bin/tirtc-devtools-cli.js --json device start \
60
60
  `--duration-ms <ms>`。prepared asset 会按完整音视频轨循环,任一轨到达源文件末尾时
61
61
  audio/video 同步回到源头并保持 PTS 继续递增。
62
62
 
63
+ native role 失败时,`reason_code` 与 `failed_stage` 仍是主失败事实;`log_upload`
64
+ 只说明失败现场日志是否已上传。上传成功时,CLI JSON 与 `summary.json` 会包含
65
+ 可用于后续抓取的 `log_id`。
66
+
63
67
  打包入口:
64
68
 
65
69
  ```sh
@@ -98,6 +98,12 @@ function hasRuntimeBundle(runtimeRoot) {
98
98
  return pathExists(path_1.default.join(runtimeRoot, 'include/tirtc/av.h')) &&
99
99
  pathExists(path_1.default.join(runtimeRoot, 'lib/libmatrix_runtime_facade.a'));
100
100
  }
101
+ function requiredAdjacentDriverDependency(platform) {
102
+ if (platform === 'macos-arm64') {
103
+ return 'libtgrtc.dylib';
104
+ }
105
+ return undefined;
106
+ }
101
107
  function resolveRuntimeRoot(roots, platform) {
102
108
  const explicit = process.env.TIRTC_RUNTIME_BUNDLE_ROOT?.trim();
103
109
  if (explicit) {
@@ -407,6 +413,13 @@ function runDriver(request, artifactRoot, roots) {
407
413
  if (!pathIsExecutable(driverPath)) {
408
414
  throw rolePreflightError('driver_not_executable', driverPath);
409
415
  }
416
+ const adjacentDependency = requiredAdjacentDriverDependency(platform);
417
+ if (adjacentDependency) {
418
+ const dependencyPath = path_1.default.join(path_1.default.dirname(driverPath), adjacentDependency);
419
+ if (!pathExists(dependencyPath)) {
420
+ throw rolePreflightError('driver_dependency_missing', dependencyPath);
421
+ }
422
+ }
410
423
  if (!hasRuntimeBundle(runtimeRoot)) {
411
424
  throw rolePreflightError('runtime_bundle_missing', runtimeRoot);
412
425
  }
@@ -471,6 +484,8 @@ async function runRole(role, commandOptions, options) {
471
484
  bootstrap_path: summary.bootstrap_path,
472
485
  reason_code: summary.reason_code,
473
486
  failed_stage: failedStage(summary),
487
+ log_id: summary.log_upload?.log_id,
488
+ log_upload: summary.log_upload,
474
489
  };
475
490
  if (summary.exit_code === 0 && summary.status === 'completed') {
476
491
  printEnvelope(options, 0, 'OK', data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tirtc-devtools-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "main": "dist/cli/src/index.js",
6
6
  "types": "dist/cli/src/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  platform=linux-x64
2
2
  profile=full
3
- staged_at_utc=2026-04-30T14:15:15Z
3
+ staged_at_utc=2026-04-30T15:22:44Z
4
4
  source_sdk=/Users/allenfeng/Development/Repositories/tirtc-nexus/tirtc-matrix/.build/sdk/linux-x64
5
5
 
6
6
  bfc096be1484ac2b1c2776ccabfa2a4c6a982e869abf875192ff06fad85e82ca include/tirtc/audio.h
@@ -36,7 +36,7 @@ b1f4135025cb8e8520a14268d831b9998920a4239f84bb6b409d0e4909fd5bee lib/libcrypto.
36
36
  296ba0b5efa9d2ac49e3bf278c5d467b31436e73fbc608b736e974bcf9759bde lib/libmatrix_runtime_audio.a
37
37
  88f9c545943e4ef80024baf3620e91817ec16a4fea60b0e8c7887a0a41dc9d1b lib/libmatrix_runtime_facade.a
38
38
  ec7bbf8e8744c6645a441a28e24e0645906152cc987d6fcca16af3c3badba940 lib/libmatrix_runtime_foundation_http.a
39
- 4038af89ac4dc7e7c99ac9ace58ce063661ddb3134f71664b79221ade4adb8d1 lib/libmatrix_runtime_foundation_logging.a
39
+ 22e68acd455dc5c5df488f6b8c01446eb4fd24d1bc6e944cd90cd5bf514f7b08 lib/libmatrix_runtime_foundation_logging.a
40
40
  9c7108b70cb442dee02cfdb4f98891a8a099f15c379e9e48cf53d7b276f6e894 lib/libmatrix_runtime_media.a
41
41
  fc498c74804ef35dc3939a6368d9ae908b0e35578db32eb7902ad00107781295 lib/libmatrix_runtime_transport.a
42
42
  337d38891e264e76aeb61a4e25a3b0bad56ab26697948805e64dec920874093f lib/libmatrix_runtime_video.a
@@ -1,6 +1,6 @@
1
1
  platform=macos-arm64
2
2
  profile=full
3
- staged_at_utc=2026-04-30T14:13:34Z
3
+ staged_at_utc=2026-04-30T15:21:02Z
4
4
  source_sdk=/Users/allenfeng/Development/Repositories/tirtc-nexus/tirtc-matrix/.build/sdk/macos-arm64
5
5
 
6
6
  bfc096be1484ac2b1c2776ccabfa2a4c6a982e869abf875192ff06fad85e82ca include/tirtc/audio.h
@@ -35,13 +35,13 @@ cae0bbeb884e5466a56da15182c78cc22baab6c743f349a58d3595f623333585 include/tirtc/
35
35
  8db86d6714264047e8fd4086ddd7315722d675749719e6175f89eb5a636b48a1 lib/libTiRTC.a
36
36
  b39daee6a3d39bf0ca20c45084601133c4198de8dca848dcff6dd9c70ae99016 lib/libcrypto.a
37
37
  c052857ef315e3d61db9c862cad10709a3a6b2487dc41799cbe4d74a805de875 lib/libcrypto.dylib
38
- 9466d90d68de9ea40a5ef2c5ff393fe94f3ec22f410dcc9c1707253344971a17 lib/libmatrix_runtime_audio.a
39
- 8bc2920d99c7cf575af169baeba9725951d56d3891e2ba4bf50d99023ac4608c lib/libmatrix_runtime_facade.a
40
- 3d3ef3d682052b7ab982b82597a3810e091ab4eb3a6b40177a88d60d0391d800 lib/libmatrix_runtime_foundation_http.a
41
- e329006b0f653f338c22addb307bd5fca56163e8f6ab6adf3d8ce2fa83c28523 lib/libmatrix_runtime_foundation_logging.a
42
- 1e7e5b699d3625d4ba3b514b21d43ca3915d6a3f15997a74de93d86509d4e58f lib/libmatrix_runtime_media.a
43
- 7945859c05cbc4e55f95b1eee109e0f604d90ff3cbe69bb17e3932b6b094ad01 lib/libmatrix_runtime_transport.a
44
- b93f5eec5e4fe4278c161095c3b3445f71f78898f4b293efc2b7299d18c91253 lib/libmatrix_runtime_video.a
38
+ b8409a082783d153f6de9057162a5e09187f014e2bdba64f53b46753281d4bc8 lib/libmatrix_runtime_audio.a
39
+ 7e3b2f7095f969ecc048e451dc50f691dde597fc800e9ebf42f7a0adcf026714 lib/libmatrix_runtime_facade.a
40
+ c81295998a999068c074407e27620ab920db2c1ef389f202b50ca80c1458c1a3 lib/libmatrix_runtime_foundation_http.a
41
+ 9dfca35632e10f343a73ccfe4fd13e43f425dd3e6c55edb89954d80524768c16 lib/libmatrix_runtime_foundation_logging.a
42
+ 27b5d6c52b5c85cb65a911164f45b8431dd3f9d9a8aaff0f6c234758ac5f5285 lib/libmatrix_runtime_media.a
43
+ c2c6db2bef5cf990e5b566a9cb10f652f8d7aa30acf9f3b4dea54b123a4fa2e5 lib/libmatrix_runtime_transport.a
44
+ 65c0091a0550fd29b80e56a7bb7f673c3f212fbd6eac756ad56ed51cf284e3d6 lib/libmatrix_runtime_video.a
45
45
  c11c65d373a127028350c41fa58cd2d1223f2b5d70a84e13b115d90daaba25ca lib/libssl.a
46
46
  ef1c1104bbdd2528ed7b958fb7252bd6249875f92300b0c9577d6c4bd6c0d88a lib/libssl.dylib
47
47
  e14e846e43d64e240fa0e5745bf4e702b79d0f2442e7f768beb990610735c71b lib/libtgrtc.dylib