tirtc-devtools-cli 0.0.7 → 0.0.9
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 +7 -0
- package/USAGE.md +41 -5
- package/dist/devtools/cli/src/facade.d.ts +19 -3
- package/dist/devtools/cli/src/facade.js +12 -3
- package/dist/devtools/cli/src/index.js +35 -8
- package/package.json +2 -2
- package/vendor/app-server/bin/native/macos-arm64/runtime_host_napi.node +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/error.h +1 -0
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/transport.h +2 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_audio.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_credential.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_media.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_transport.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_video.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/manifest.txt +11 -11
- package/vendor/app-server/dist/host/ArtifactManager.js +17 -2
- package/vendor/app-server/dist/host/HostProtocol.d.ts +7 -3
- package/vendor/app-server/dist/host/HostProtocol.js +9 -3
- package/vendor/app-server/dist/host/HostServer.d.ts +6 -0
- package/vendor/app-server/dist/host/HostServer.js +172 -2
- package/vendor/app-server/dist/host/HostState.d.ts +14 -0
- package/vendor/app-server/dist/host/HostState.js +1 -0
- package/vendor/app-server/dist/host/RuntimeAdapter.d.ts +4 -2
- package/vendor/app-server/dist/host/RuntimeAdapter.js +51 -13
- package/vendor/app-server/dist/host/RuntimeSendWorker.d.ts +12 -0
- package/vendor/app-server/dist/host/RuntimeSendWorker.js +147 -0
- package/vendor/app-server/dist/host/native/RuntimeHostBridge.d.ts +13 -0
- package/vendor/app-server/dist/host/native/RuntimeHostBridge.js +16 -0
- package/vendor/app-server/dist/protocol/contract.d.ts +158 -12
- package/vendor/app-server/dist/protocol/contract.js +30 -5
package/README.md
CHANGED
|
@@ -52,3 +52,10 @@
|
|
|
52
52
|
- 本地测试配置文件路径:`devtools/cli/tests/.local/runtime-backed.e2e.local.json`(必需,已在 `.gitignore` 忽略)。
|
|
53
53
|
- 示例模板:`devtools/cli/tests/runtime-backed.e2e.config.example.json`。
|
|
54
54
|
- CLI server-only 正式 E2E 现在直接读取 `mp4Path`,由 `service start` 内部自动 prepare;不再要求先手工 prepare 再维护 `assetsDir`。
|
|
55
|
+
|
|
56
|
+
## Command Loop E2E Harness
|
|
57
|
+
|
|
58
|
+
- 长驻人工验收脚本:`devtools/cli/script/command_loop_e2e.sh`
|
|
59
|
+
- 示例配置:`devtools/cli/config/command_loop_e2e.example.toml`
|
|
60
|
+
- 本地配置路径:`devtools/cli/config/.local/command_loop_e2e.local.toml`(已在 `.gitignore` 忽略)
|
|
61
|
+
- 该脚本会先打包最新 `runtime + app-server + cli`,再清场、`service start`、周期性发送 `stream message` / time command,并轮询 `command pending list` 后自动做 CLI 侧显式 reply;启动成功后保持常驻,等待人工去操作 Android example。
|
package/USAGE.md
CHANGED
|
@@ -83,12 +83,15 @@ Commands:
|
|
|
83
83
|
list 查看流快照列表
|
|
84
84
|
send 发送流:绑定 prepared local assets 并发起上行
|
|
85
85
|
receive 接收流:声明并接收下行
|
|
86
|
-
message
|
|
86
|
+
message 发送 stream message
|
|
87
87
|
|
|
88
88
|
$ node ... command --help
|
|
89
89
|
Commands:
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
request [options] <commandId> <payloadEncoding> <payload> 发送命令请求并等待响应
|
|
91
|
+
send [options] <commandId> <payloadEncoding> <payload> 兼容别名:等价于 command request
|
|
92
|
+
pending 查看当前会话内待回复的远端命令请求
|
|
93
|
+
reply <remoteRequestId> <commandId> <payloadEncoding> <payload> 按 remoteRequestId 显式回复待处理命令
|
|
94
|
+
tail 持续监听命令相关事件
|
|
92
95
|
|
|
93
96
|
$ node ... token issue --help
|
|
94
97
|
Options:
|
|
@@ -203,10 +206,13 @@ CLI 仍会在本地收紧最小组合矩阵:
|
|
|
203
206
|
|
|
204
207
|
### Command
|
|
205
208
|
|
|
206
|
-
- `command
|
|
209
|
+
- `command request <commandId> <payloadEncoding> <payload> [--timeout-ms <ms>]`
|
|
210
|
+
- `command send <commandId> <payloadEncoding> <payload> [--timeout-ms <ms>]`
|
|
211
|
+
- `command pending list`
|
|
212
|
+
- `command reply <remoteRequestId> <commandId> <payloadEncoding> <payload>`
|
|
207
213
|
- `command tail`
|
|
208
214
|
|
|
209
|
-
`command
|
|
215
|
+
`command request` 是 canonical 主语,`command send` 只保留为兼容别名。若要发 JSON,请把 JSON 文本作为 `payload` 传入。`command pending list` 用于恢复或轮询当前积压,`command reply` 基于 `remoteRequestId` 显式回复待处理请求。
|
|
210
216
|
|
|
211
217
|
## 九、token / debug / report
|
|
212
218
|
|
|
@@ -221,3 +227,33 @@ CLI 仍会在本地收紧最小组合矩阵:
|
|
|
221
227
|
- CLI server/client E2E 本地配置文件:`devtools/cli/tests/.local/runtime-backed.e2e.local.json`
|
|
222
228
|
- 推荐字段:`mp4Path`、`serviceEntry`、`license`、`peerId`、`accessId`、`secretKey`、可选 `e2eToken`
|
|
223
229
|
- CLI server-only E2E 不再要求先手工 `media assets prepare` 再回填 `assetsDir`
|
|
230
|
+
|
|
231
|
+
## 十一、Android 人工闭环脚本
|
|
232
|
+
|
|
233
|
+
如果需要把 CLI 侧闭环常驻起来,再手工去操作 Android example,使用:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
./devtools/cli/script/command_loop_e2e.sh
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
默认读取:`devtools/cli/config/.local/command_loop_e2e.local.toml`
|
|
240
|
+
|
|
241
|
+
建议先从模板复制:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
mkdir -p devtools/cli/config/.local
|
|
245
|
+
cp devtools/cli/config/command_loop_e2e.example.toml devtools/cli/config/.local/command_loop_e2e.local.toml
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
该脚本会:
|
|
249
|
+
|
|
250
|
+
- 打包最新 `runtime + app-server + cli`
|
|
251
|
+
- 杀掉其他同类 `command_loop_e2e.sh` 进程
|
|
252
|
+
- `host stop --all`
|
|
253
|
+
- `service start`
|
|
254
|
+
- 可选生成 bootstrap 二维码
|
|
255
|
+
- 每 `15s` 执行一次 `stream message send`
|
|
256
|
+
- 每 `10s` 执行一次时间命令 `command request 7953 utf8 "time?"`
|
|
257
|
+
- 轮询 `command pending list` 并对每个 pending request 执行 `command reply`
|
|
258
|
+
|
|
259
|
+
脚本不会替代 Android 端人工操作;它的职责是把 CLI 侧和 Host 侧闭环保持住,并把日志与产物沉到自己的 workspace。
|
|
@@ -578,19 +578,35 @@ export declare const OutputAttachOptionsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
578
578
|
}>;
|
|
579
579
|
export declare const CommandSendParamsSchema: z.ZodObject<{
|
|
580
580
|
commandId: z.ZodString;
|
|
581
|
-
kind: z.ZodString;
|
|
582
581
|
payloadEncoding: z.ZodString;
|
|
583
582
|
payload: z.ZodString;
|
|
583
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
584
584
|
}, "strip", z.ZodTypeAny, {
|
|
585
585
|
payload: string;
|
|
586
586
|
commandId: string;
|
|
587
|
-
kind: string;
|
|
588
587
|
payloadEncoding: string;
|
|
588
|
+
timeoutMs?: number | undefined;
|
|
589
589
|
}, {
|
|
590
590
|
payload: string;
|
|
591
591
|
commandId: string;
|
|
592
|
-
kind: string;
|
|
593
592
|
payloadEncoding: string;
|
|
593
|
+
timeoutMs?: number | undefined;
|
|
594
|
+
}>;
|
|
595
|
+
export declare const CommandReplyParamsSchema: z.ZodObject<{
|
|
596
|
+
remoteRequestId: z.ZodString;
|
|
597
|
+
commandId: z.ZodString;
|
|
598
|
+
payloadEncoding: z.ZodString;
|
|
599
|
+
payload: z.ZodString;
|
|
600
|
+
}, "strip", z.ZodTypeAny, {
|
|
601
|
+
payload: string;
|
|
602
|
+
commandId: string;
|
|
603
|
+
payloadEncoding: string;
|
|
604
|
+
remoteRequestId: string;
|
|
605
|
+
}, {
|
|
606
|
+
payload: string;
|
|
607
|
+
commandId: string;
|
|
608
|
+
payloadEncoding: string;
|
|
609
|
+
remoteRequestId: string;
|
|
594
610
|
}>;
|
|
595
611
|
export declare const ArtifactExportLogsParamsSchema: z.ZodObject<{
|
|
596
612
|
outputPath: z.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArtifactExportReportParamsSchema = exports.ArtifactExportLogsParamsSchema = exports.CommandSendParamsSchema = exports.OutputAttachOptionsSchema = exports.OutputAttachCliParamsSchema = exports.OutputAttachParamsSchema = exports.StreamMessageSendParamsSchema = exports.StreamReceiveStartParamsSchema = exports.StreamSendStartParamsSchema = exports.ConnectionConnectParamsSchema = exports.ServiceStartParamsSchema = exports.ErrorReasonCodeMapping = exports.CommandToHostMethodMapping = exports.CliJsonOutputSchema = exports.CliConfigSchema = void 0;
|
|
3
|
+
exports.ArtifactExportReportParamsSchema = exports.ArtifactExportLogsParamsSchema = exports.CommandReplyParamsSchema = exports.CommandSendParamsSchema = exports.OutputAttachOptionsSchema = exports.OutputAttachCliParamsSchema = exports.OutputAttachParamsSchema = exports.StreamMessageSendParamsSchema = exports.StreamReceiveStartParamsSchema = exports.StreamSendStartParamsSchema = exports.ConnectionConnectParamsSchema = exports.ServiceStartParamsSchema = exports.ErrorReasonCodeMapping = exports.CommandToHostMethodMapping = exports.CliJsonOutputSchema = exports.CliConfigSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.CliConfigSchema = zod_1.z.object({
|
|
6
6
|
version: zod_1.z.number().int().optional(),
|
|
@@ -59,7 +59,10 @@ exports.CommandToHostMethodMapping = {
|
|
|
59
59
|
'stream receive stop': 'stream/receiveStop',
|
|
60
60
|
'output attach': 'output/attach',
|
|
61
61
|
'output detach': 'output/detach',
|
|
62
|
-
'command
|
|
62
|
+
'command request': 'command/request',
|
|
63
|
+
'command send': 'command/request',
|
|
64
|
+
'command pending list': 'command/pending/list',
|
|
65
|
+
'command reply': 'command/reply',
|
|
63
66
|
'command tail': 'events/subscribe',
|
|
64
67
|
'events tail': 'events/subscribe',
|
|
65
68
|
'logs export': 'artifact/exportLogs',
|
|
@@ -168,7 +171,13 @@ exports.OutputAttachOptionsSchema = zod_1.z.object({
|
|
|
168
171
|
});
|
|
169
172
|
exports.CommandSendParamsSchema = zod_1.z.object({
|
|
170
173
|
commandId: zod_1.z.string(),
|
|
171
|
-
|
|
174
|
+
payloadEncoding: zod_1.z.string(),
|
|
175
|
+
payload: zod_1.z.string(),
|
|
176
|
+
timeoutMs: zod_1.z.number().int().positive().optional(),
|
|
177
|
+
});
|
|
178
|
+
exports.CommandReplyParamsSchema = zod_1.z.object({
|
|
179
|
+
remoteRequestId: zod_1.z.string(),
|
|
180
|
+
commandId: zod_1.z.string(),
|
|
172
181
|
payloadEncoding: zod_1.z.string(),
|
|
173
182
|
payload: zod_1.z.string(),
|
|
174
183
|
});
|
|
@@ -15,7 +15,7 @@ const media_assets_1 = require("./media_assets");
|
|
|
15
15
|
const token_command_1 = require("./token_command");
|
|
16
16
|
const transport_1 = require("./transport");
|
|
17
17
|
const progress_1 = require("./progress");
|
|
18
|
-
const CLI_VERSION = '0.0.
|
|
18
|
+
const CLI_VERSION = '0.0.9';
|
|
19
19
|
const HOST_VERSION = '1.0.0';
|
|
20
20
|
const PROTOCOL_VERSION = '1.0.0';
|
|
21
21
|
if (process.argv.includes('--version') || process.argv.includes('-V')) {
|
|
@@ -588,7 +588,8 @@ streamReceive.command('stop <streamId>')
|
|
|
588
588
|
.action((streamId) => {
|
|
589
589
|
runAndExit(runCommand('stream receive stop', { streamId: Number.parseInt(streamId, 10) }, getCliOptions()));
|
|
590
590
|
});
|
|
591
|
-
stream.command('message
|
|
591
|
+
const streamMessage = stream.command('message').description('发送 stream message');
|
|
592
|
+
streamMessage.command('send <streamId> <payload>')
|
|
592
593
|
.description('发送 UTF-8 字符串型 stream message')
|
|
593
594
|
.action((streamId, payload) => {
|
|
594
595
|
runAndExit(runCommand('stream message send', { streamId: Number.parseInt(streamId, 10), payload }, getCliOptions()));
|
|
@@ -624,16 +625,42 @@ output.command('detach <outputId>').description('卸载输出消费者').action(
|
|
|
624
625
|
runAndExit(runCommand('output detach', { outputId }, getCliOptions()));
|
|
625
626
|
});
|
|
626
627
|
const command = program.command('command').description('命令通道:发送命令与事件跟踪');
|
|
627
|
-
command.command('
|
|
628
|
-
.description('
|
|
629
|
-
.
|
|
628
|
+
command.command('request <commandId> <payloadEncoding> <payload>')
|
|
629
|
+
.description('发送命令请求并等待响应')
|
|
630
|
+
.option('--timeout-ms <ms>', '请求超时(毫秒)', '5000')
|
|
631
|
+
.action((commandId, payloadEncoding, payload, commandOptions) => {
|
|
632
|
+
runAndExit(runCommand('command request', {
|
|
633
|
+
commandId: Number.parseInt(commandId, 10),
|
|
634
|
+
payloadEncoding,
|
|
635
|
+
payload,
|
|
636
|
+
timeoutMs: Number.parseInt(commandOptions.timeoutMs, 10),
|
|
637
|
+
}, getCliOptions()));
|
|
638
|
+
});
|
|
639
|
+
command.command('send <commandId> <payloadEncoding> <payload>')
|
|
640
|
+
.description('兼容别名:等价于 command request')
|
|
641
|
+
.option('--timeout-ms <ms>', '请求超时(毫秒)', '5000')
|
|
642
|
+
.action((commandId, payloadEncoding, payload, commandOptions) => {
|
|
630
643
|
runAndExit(runCommand('command send', {
|
|
631
644
|
commandId: Number.parseInt(commandId, 10),
|
|
632
|
-
kind,
|
|
633
645
|
payloadEncoding,
|
|
634
646
|
payload,
|
|
635
|
-
|
|
636
|
-
|
|
647
|
+
timeoutMs: Number.parseInt(commandOptions.timeoutMs, 10),
|
|
648
|
+
}, getCliOptions()));
|
|
649
|
+
});
|
|
650
|
+
const commandPending = command.command('pending').description('查看当前会话内待回复的远端命令请求');
|
|
651
|
+
commandPending.command('list')
|
|
652
|
+
.description('列出当前待回复的远端命令请求')
|
|
653
|
+
.action(() => {
|
|
654
|
+
runAndExit(runCommand('command pending list', {}, getCliOptions()));
|
|
655
|
+
});
|
|
656
|
+
command.command('reply <remoteRequestId> <commandId> <payloadEncoding> <payload>')
|
|
657
|
+
.description('按 remoteRequestId 显式回复待处理命令')
|
|
658
|
+
.action((remoteRequestId, commandId, payloadEncoding, payload) => {
|
|
659
|
+
runAndExit(runCommand('command reply', {
|
|
660
|
+
remoteRequestId: Number.parseInt(remoteRequestId, 10),
|
|
661
|
+
commandId: Number.parseInt(commandId, 10),
|
|
662
|
+
payloadEncoding,
|
|
663
|
+
payload,
|
|
637
664
|
}, getCliOptions()));
|
|
638
665
|
});
|
|
639
666
|
command.command('tail').description('持续监听命令相关事件').action(() => {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tirtc-devtools-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"tirtc-devtools-cli": "
|
|
7
|
+
"tirtc-devtools-cli": "bin/tirtc-devtools-cli.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"README.md",
|
|
Binary file
|
|
@@ -21,6 +21,7 @@ typedef enum TirtcError {
|
|
|
21
21
|
TIRTC_ERROR_TRANSPORT_CONNECTION_TIMEOUT_CLOSED = 12,
|
|
22
22
|
TIRTC_ERROR_TRANSPORT_REMOTE_CLOSED = 13,
|
|
23
23
|
TIRTC_ERROR_TRANSPORT_CONNECTION_OTHER_ERROR = 14,
|
|
24
|
+
TIRTC_ERROR_TRANSPORT_TOKEN_EXPIRED = 15,
|
|
24
25
|
} TirtcError;
|
|
25
26
|
|
|
26
27
|
#ifdef __cplusplus
|
|
@@ -36,6 +36,8 @@ typedef enum TirtcTransportStatus {
|
|
|
36
36
|
TIRTC_TRANSPORT_STATUS_BACKEND_REMOTE_CLOSED = 10,
|
|
37
37
|
/** Backend reported other connection error. */
|
|
38
38
|
TIRTC_TRANSPORT_STATUS_BACKEND_CONNECTION_OTHER_ERROR = 11,
|
|
39
|
+
/** Backend reported token expired. */
|
|
40
|
+
TIRTC_TRANSPORT_STATUS_BACKEND_TOKEN_EXPIRED = 12,
|
|
39
41
|
} TirtcTransportStatus;
|
|
40
42
|
|
|
41
43
|
/**
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_logging.a
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
platform=macos-arm64
|
|
2
|
-
staged_at_utc=2026-04-
|
|
2
|
+
staged_at_utc=2026-04-10T04:27:48Z
|
|
3
3
|
source_sdk=/Users/allenfeng/Development/Repositories/tirtc-nexus/tirtc-matrix/.build/sdk/macos-arm64
|
|
4
4
|
|
|
5
5
|
dcca0b7ab8055d84e5bcfab7f1dde56df9037c40ddb99e9ca924ef2e867d8309 include/tirtc/audio.h
|
|
@@ -14,7 +14,7 @@ c2e1f31dcc75be461c577d18b1cebe32774f212d51cb4dd2a5b5a9bfe62b693e include/tirtc/
|
|
|
14
14
|
0ca7c3c630b1242f51a0fd8154097c0a332b4c816a5707090e4381719852998c include/tirtc/audio_sample_rate.h
|
|
15
15
|
59b7df33fdc2ad92b3142299ffab832443179ef895784ad51a2f6544c5b02766 include/tirtc/av.h
|
|
16
16
|
4198c95c48ae579d1c782635b00fa5c9009d0c56ba466e6e3873e8298faae029 include/tirtc/credential.h
|
|
17
|
-
|
|
17
|
+
78625b8d9f1f29bf2f35a89a8ad8a3f68f3f6ff75455d4682f5514c6c0ad7738 include/tirtc/error.h
|
|
18
18
|
ae805545a9515edc9b94262e72ad2c7b7d649288166f4daeb450d8a55e82ae0b include/tirtc/foundation/build_info.h
|
|
19
19
|
7cf8b372a3d48d4de4a65a04c7f102281a7b42cebb9ec247853d3c53afb63b6a include/tirtc/http.h
|
|
20
20
|
70bbf93b84d9d1a85f376d9986de570c1f658319e1e5ab6d621f7a4d41033f5c include/tirtc/logging.h
|
|
@@ -24,7 +24,7 @@ ae805545a9515edc9b94262e72ad2c7b7d649288166f4daeb450d8a55e82ae0b include/tirtc/
|
|
|
24
24
|
037d9a581cef71afe9233456b1f4ef866c3739150532f3c30a67d361e8af9eef include/tirtc/media_fixture_source.h
|
|
25
25
|
a4f8ab44c1a20ad37f250363a403a9d4d007e61ddb2426c7966dbc05f6a04b4f include/tirtc/media_live_source.h
|
|
26
26
|
1b3be6954e547f91a047866438bff1820c8406afaf91cef68ddee29a6ac70234 include/tirtc/media_uplink.h
|
|
27
|
-
|
|
27
|
+
97ab19361d22a723af589ebae8bb08b5a7ccd8ca3aff0b85aa9ffd577252b6fc include/tirtc/transport.h
|
|
28
28
|
137729c534213cb161c0853a8d4d38fcdc397c41a7fd8c813fbe0e80083ec931 include/tirtc/trp.h
|
|
29
29
|
dff5b0a0ac4a40ad17c93e1e56b3c416371c81ab365e287ea8cd6ce37ccbed3b include/tirtc/video_codec.h
|
|
30
30
|
e51379666c199588cc33279ccf52248035d1cae3d1d468b1615ebf29f0b39c9c include/tirtc/video_frame.h
|
|
@@ -36,14 +36,14 @@ cae0bbeb884e5466a56da15182c78cc22baab6c743f349a58d3595f623333585 include/tirtc/
|
|
|
36
36
|
8cd6b66bea14890a665cc317f8572429b2c3e4463773f8b77c1e4dc30a4a8747 include/tirtc/video_processing.h
|
|
37
37
|
b39daee6a3d39bf0ca20c45084601133c4198de8dca848dcff6dd9c70ae99016 lib/libcrypto.a
|
|
38
38
|
c052857ef315e3d61db9c862cad10709a3a6b2487dc41799cbe4d74a805de875 lib/libcrypto.dylib
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
17545a8539f86995500b7fcaee3d1f1e5684e8f11e6094558aee46c6a9cc74a8 lib/libmatrix_runtime_audio.a
|
|
40
|
+
bf00c3fcccbfc29696a2ee4ff6ff55e510672a2337af6c975c83d295a970a85f lib/libmatrix_runtime_credential.a
|
|
41
|
+
33ce400a5dfd7a234a4391bc5dd531a9a0401f6d27252246898797d8d0dcf4ed lib/libmatrix_runtime_facade.a
|
|
42
|
+
525c15bd4e23642c1e9939b8114828ec47d7381fb6cf30cb9c66be3181b9c70c lib/libmatrix_runtime_foundation_http.a
|
|
43
|
+
d7cf5cd5723bbfcd3bef9191570870413303b0b67c8644c9a5bf30e194fdd487 lib/libmatrix_runtime_foundation_logging.a
|
|
44
|
+
fefdbe0acc0dc73dd0b48fb0cd927875c5e43674e163c7ba33f57e59d2f0b178 lib/libmatrix_runtime_media.a
|
|
45
|
+
9361b2a4784b3068a8796033fa36f1969297bbcd4ae59f96da1725e0a27fb481 lib/libmatrix_runtime_transport.a
|
|
46
|
+
7e6f54cf23ad2a59f08e274e63fc25ae74f9f9b687dff08f73091789d647a94c lib/libmatrix_runtime_video.a
|
|
47
47
|
c11c65d373a127028350c41fa58cd2d1223f2b5d70a84e13b115d90daaba25ca lib/libssl.a
|
|
48
48
|
ef1c1104bbdd2528ed7b958fb7252bd6249875f92300b0c9577d6c4bd6c0d88a lib/libssl.dylib
|
|
49
49
|
dc3e0e6ded26e90fd59c166933a5289d57f4cf25fbe6246b6b83c86fe898e63d lib/libwebrtc_apm.a
|
|
@@ -36,6 +36,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.ArtifactManager = void 0;
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
|
+
function toJsonLine(value) {
|
|
40
|
+
return JSON.stringify(value, (_key, current) => {
|
|
41
|
+
if (typeof current === 'bigint') {
|
|
42
|
+
const normalized = Number(current);
|
|
43
|
+
return Number.isSafeInteger(normalized) ? normalized : current.toString();
|
|
44
|
+
}
|
|
45
|
+
return current;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
39
48
|
class ArtifactManager {
|
|
40
49
|
paths;
|
|
41
50
|
constructor(basePath) {
|
|
@@ -74,10 +83,16 @@ class ArtifactManager {
|
|
|
74
83
|
fs.appendFileSync(this.getHostLogPath(), line);
|
|
75
84
|
}
|
|
76
85
|
writeReport(report) {
|
|
77
|
-
fs.writeFileSync(this.paths.reportPath, JSON.stringify(report,
|
|
86
|
+
fs.writeFileSync(this.paths.reportPath, JSON.stringify(report, (_key, current) => {
|
|
87
|
+
if (typeof current === 'bigint') {
|
|
88
|
+
const normalized = Number(current);
|
|
89
|
+
return Number.isSafeInteger(normalized) ? normalized : current.toString();
|
|
90
|
+
}
|
|
91
|
+
return current;
|
|
92
|
+
}, 2));
|
|
78
93
|
}
|
|
79
94
|
writeEvent(event) {
|
|
80
|
-
fs.appendFileSync(this.paths.eventsPath, `${
|
|
95
|
+
fs.appendFileSync(this.paths.eventsPath, `${toJsonLine(event)}\n`);
|
|
81
96
|
}
|
|
82
97
|
}
|
|
83
98
|
exports.ArtifactManager = ArtifactManager;
|
|
@@ -70,13 +70,16 @@ export type OutputDetachParams = {
|
|
|
70
70
|
};
|
|
71
71
|
export type CommandSendParams = {
|
|
72
72
|
commandId: number;
|
|
73
|
-
kind: string;
|
|
74
73
|
payloadEncoding: string;
|
|
75
74
|
payload: string;
|
|
76
|
-
replyToSequenceNumber?: number;
|
|
77
|
-
awaitResponse?: boolean;
|
|
78
75
|
timeoutMs?: number;
|
|
79
76
|
};
|
|
77
|
+
export type CommandReplyParams = {
|
|
78
|
+
remoteRequestId: number;
|
|
79
|
+
commandId: number;
|
|
80
|
+
payloadEncoding: string;
|
|
81
|
+
payload: string;
|
|
82
|
+
};
|
|
80
83
|
export type EventsSubscribeParams = {
|
|
81
84
|
families?: string[];
|
|
82
85
|
};
|
|
@@ -103,6 +106,7 @@ export declare function parseStreamReceiveStartParams(params: Record<string, unk
|
|
|
103
106
|
export declare function parseOutputAttachParams(params: Record<string, unknown>): OutputAttachParams;
|
|
104
107
|
export declare function parseOutputDetachParams(params: Record<string, unknown>): OutputDetachParams;
|
|
105
108
|
export declare function parseCommandSendParams(params: Record<string, unknown>): CommandSendParams;
|
|
109
|
+
export declare function parseCommandReplyParams(params: Record<string, unknown>): CommandReplyParams;
|
|
106
110
|
export declare function parseEventsSubscribeParams(params: Record<string, unknown>): EventsSubscribeParams;
|
|
107
111
|
export declare function parseArtifactExportParams(params: Record<string, unknown>): ArtifactExportParams;
|
|
108
112
|
export declare function parseDebugTokenQrcodeParams(params: Record<string, unknown>): DebugTokenQrcodeParams;
|
|
@@ -12,6 +12,7 @@ exports.parseStreamReceiveStartParams = parseStreamReceiveStartParams;
|
|
|
12
12
|
exports.parseOutputAttachParams = parseOutputAttachParams;
|
|
13
13
|
exports.parseOutputDetachParams = parseOutputDetachParams;
|
|
14
14
|
exports.parseCommandSendParams = parseCommandSendParams;
|
|
15
|
+
exports.parseCommandReplyParams = parseCommandReplyParams;
|
|
15
16
|
exports.parseEventsSubscribeParams = parseEventsSubscribeParams;
|
|
16
17
|
exports.parseArtifactExportParams = parseArtifactExportParams;
|
|
17
18
|
exports.parseDebugTokenQrcodeParams = parseDebugTokenQrcodeParams;
|
|
@@ -227,14 +228,19 @@ function parseOutputDetachParams(params) {
|
|
|
227
228
|
function parseCommandSendParams(params) {
|
|
228
229
|
return {
|
|
229
230
|
commandId: getNumber(params, 'commandId'),
|
|
230
|
-
kind: getString(params, 'kind'),
|
|
231
231
|
payloadEncoding: getString(params, 'payloadEncoding'),
|
|
232
232
|
payload: getString(params, 'payload'),
|
|
233
|
-
replyToSequenceNumber: getOptionalNumber(params, 'replyToSequenceNumber'),
|
|
234
|
-
awaitResponse: getOptionalBoolean(params, 'awaitResponse'),
|
|
235
233
|
timeoutMs: getOptionalNumber(params, 'timeoutMs'),
|
|
236
234
|
};
|
|
237
235
|
}
|
|
236
|
+
function parseCommandReplyParams(params) {
|
|
237
|
+
return {
|
|
238
|
+
remoteRequestId: getNumber(params, 'remoteRequestId'),
|
|
239
|
+
commandId: getNumber(params, 'commandId'),
|
|
240
|
+
payloadEncoding: getString(params, 'payloadEncoding'),
|
|
241
|
+
payload: getString(params, 'payload'),
|
|
242
|
+
};
|
|
243
|
+
}
|
|
238
244
|
function parseEventsSubscribeParams(params) {
|
|
239
245
|
const families = params.families;
|
|
240
246
|
if (families === undefined) {
|
|
@@ -18,7 +18,11 @@ export declare class HostServer {
|
|
|
18
18
|
removeEventSink(sink: (event: Record<string, unknown>) => void): void;
|
|
19
19
|
appendHostLog(line: string): void;
|
|
20
20
|
private handleRuntimeEvent;
|
|
21
|
+
private snapshotPendingConnectionSummary;
|
|
22
|
+
private handleInboundRemoteCommandRequest;
|
|
23
|
+
private clearPendingRemoteCommands;
|
|
21
24
|
private noteIncomingConnection;
|
|
25
|
+
private handleIncomingConnectionDisconnected;
|
|
22
26
|
private maybeAutoStartStreamFromRemoteDemand;
|
|
23
27
|
private dispatch;
|
|
24
28
|
private handleInitialize;
|
|
@@ -41,6 +45,8 @@ export declare class HostServer {
|
|
|
41
45
|
private handleOutputAttach;
|
|
42
46
|
private handleOutputDetach;
|
|
43
47
|
private handleCommandSend;
|
|
48
|
+
private handleCommandReply;
|
|
49
|
+
private handleCommandPendingList;
|
|
44
50
|
private handleEventsSubscribe;
|
|
45
51
|
private handleArtifactReadReport;
|
|
46
52
|
private handleArtifactExportLogs;
|