tirtc-devtools-cli 0.0.13 → 0.0.14
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 +42 -46
- package/USAGE.md +87 -312
- package/dist/cli/src/embedded_paths.d.ts +0 -2
- package/dist/cli/src/embedded_paths.js +3 -25
- package/dist/cli/src/index.js +82 -584
- package/dist/cli/src/role_driver.d.ts +33 -0
- package/dist/cli/src/role_driver.js +500 -0
- package/dist/cli/src/token_command.js +4 -2
- package/dist/cli/src/token_issue.d.ts +9 -0
- package/dist/cli/src/token_issue.js +138 -0
- package/dist/cli/src/token_tool.d.ts +2 -4
- package/dist/cli/src/token_tool.js +12 -186
- package/package.json +1 -1
- package/vendor/devtools/driver/macos-arm64/devtools_driver_probe +0 -0
- package/vendor/devtools/driver/macos-arm64/runtime_validation_client_bin +0 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio.h +56 -2
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io.h +9 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/av.h +52 -0
- package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/error.h +11 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_downlink.h +11 -5
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_uplink.h +4 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/transport.h +52 -15
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/trp.h +7 -5
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_codec.h +41 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io.h +7 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_android.h +2 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_audio.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_media.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_transport.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_video.a +0 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/manifest.txt +20 -25
- package/vendor/runtime/script/prepare_runtime_media_dataset.sh +308 -12
- package/dist/app-server/protocol-client/index.d.ts +0 -25
- package/dist/app-server/protocol-client/index.js +0 -114
- package/dist/cli/src/bootstrap_flows.d.ts +0 -46
- package/dist/cli/src/bootstrap_flows.js +0 -249
- package/dist/cli/src/config.d.ts +0 -26
- package/dist/cli/src/config.js +0 -62
- package/dist/cli/src/facade.d.ts +0 -430
- package/dist/cli/src/facade.js +0 -170
- package/dist/cli/src/guide.d.ts +0 -1
- package/dist/cli/src/guide.js +0 -48
- package/dist/cli/src/session_manager.d.ts +0 -25
- package/dist/cli/src/session_manager.js +0 -391
- package/dist/cli/src/transport.d.ts +0 -30
- package/dist/cli/src/transport.js +0 -84
- package/vendor/app-server/bin/native/linux-x64/credential_napi.node +0 -0
- package/vendor/app-server/bin/native/macos-arm64/credential_napi.node +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/credential.h +0 -34
- package/vendor/app-server/bin/runtime/linux-x64/lib/libcrypto.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_credential.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libssl.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libxlog.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/manifest.txt +0 -4
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/credential.h +0 -34
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/error.h +0 -52
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/foundation/build_info.h +0 -27
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/http.h +0 -57
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/logging.h +0 -55
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_fixture_av_sync.h +0 -61
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_fixture_source.h +0 -77
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_live_source.h +0 -71
- 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_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/tirtc-devtool-host.js +0 -2
- package/vendor/app-server/dist/host/ArtifactManager.d.ts +0 -18
- package/vendor/app-server/dist/host/ArtifactManager.js +0 -98
- package/vendor/app-server/dist/host/HostCommandCoordinator.d.ts +0 -19
- package/vendor/app-server/dist/host/HostCommandCoordinator.js +0 -196
- package/vendor/app-server/dist/host/HostProtocol.d.ts +0 -103
- package/vendor/app-server/dist/host/HostProtocol.js +0 -239
- package/vendor/app-server/dist/host/HostServer.d.ts +0 -52
- package/vendor/app-server/dist/host/HostServer.js +0 -727
- package/vendor/app-server/dist/host/HostState.d.ts +0 -69
- package/vendor/app-server/dist/host/HostState.js +0 -19
- package/vendor/app-server/dist/host/RuntimeAdapter.d.ts +0 -95
- package/vendor/app-server/dist/host/RuntimeAdapter.js +0 -636
- package/vendor/app-server/dist/host/RuntimeReceiveWorker.d.ts +0 -37
- package/vendor/app-server/dist/host/RuntimeReceiveWorker.js +0 -186
- package/vendor/app-server/dist/host/RuntimeSendWorker.d.ts +0 -58
- package/vendor/app-server/dist/host/RuntimeSendWorker.js +0 -438
- package/vendor/app-server/dist/host/TokenTool.d.ts +0 -15
- package/vendor/app-server/dist/host/TokenTool.js +0 -84
- package/vendor/app-server/dist/host/WebPreviewGateway.d.ts +0 -28
- package/vendor/app-server/dist/host/WebPreviewGateway.js +0 -815
- package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.d.ts +0 -23
- package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.js +0 -115
- package/vendor/app-server/dist/host/native/RuntimeHostBridge.d.ts +0 -32
- package/vendor/app-server/dist/host/native/RuntimeHostBridge.js +0 -157
- package/vendor/app-server/dist/host/runtime_backed_preflight.d.ts +0 -10
- package/vendor/app-server/dist/host/runtime_backed_preflight.js +0 -78
- package/vendor/app-server/dist/host/tests/helpers/host_socket_client.d.ts +0 -28
- package/vendor/app-server/dist/host/tests/helpers/host_socket_client.js +0 -85
- package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.d.ts +0 -10
- package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.js +0 -41
- package/vendor/app-server/dist/host/tests/helpers/runtime_test_env.d.ts +0 -11
- package/vendor/app-server/dist/host/tests/helpers/runtime_test_env.js +0 -32
- package/vendor/app-server/dist/protocol/contract.d.ts +0 -1128
- package/vendor/app-server/dist/protocol/contract.js +0 -217
- package/vendor/app-server/dist/protocol-client/index.d.ts +0 -25
- package/vendor/app-server/dist/protocol-client/index.js +0 -114
- package/vendor/app-server/dist/src/index.d.ts +0 -1
- package/vendor/app-server/dist/src/index.js +0 -294
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_codec.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_frame.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_android.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_apple.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_harmony.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_windows.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_processing.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_sample_rate.h +0 -0
- /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/foundation/build_info.h +0 -0
- /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/http.h +0 -0
- /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/logging.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_codec.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_frame.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_apple.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_harmony.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_windows.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_processing.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libTGTRP.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libTiRTC.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libcrypto.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libcrypto.dylib +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libssl.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libssl.dylib +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libtgrtc.dylib +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libwebrtc_apm.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libxlog.a +0 -0
package/dist/cli/src/facade.d.ts
DELETED
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const CliConfigSchema: z.ZodObject<{
|
|
3
|
-
version: z.ZodOptional<z.ZodNumber>;
|
|
4
|
-
server: z.ZodOptional<z.ZodObject<{
|
|
5
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
6
|
-
license: z.ZodOptional<z.ZodString>;
|
|
7
|
-
mp4_path: z.ZodOptional<z.ZodString>;
|
|
8
|
-
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
service_entry?: string | undefined;
|
|
12
|
-
license?: string | undefined;
|
|
13
|
-
mp4_path?: string | undefined;
|
|
14
|
-
video_stream_id?: number | undefined;
|
|
15
|
-
audio_stream_id?: number | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
service_entry?: string | undefined;
|
|
18
|
-
license?: string | undefined;
|
|
19
|
-
mp4_path?: string | undefined;
|
|
20
|
-
video_stream_id?: number | undefined;
|
|
21
|
-
audio_stream_id?: number | undefined;
|
|
22
|
-
}>>;
|
|
23
|
-
client: z.ZodOptional<z.ZodObject<{
|
|
24
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
25
|
-
peer_id: z.ZodOptional<z.ZodString>;
|
|
26
|
-
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
27
|
-
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
consumer: z.ZodOptional<z.ZodEnum<["web_preview"]>>;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
service_entry?: string | undefined;
|
|
31
|
-
video_stream_id?: number | undefined;
|
|
32
|
-
audio_stream_id?: number | undefined;
|
|
33
|
-
peer_id?: string | undefined;
|
|
34
|
-
consumer?: "web_preview" | undefined;
|
|
35
|
-
}, {
|
|
36
|
-
service_entry?: string | undefined;
|
|
37
|
-
video_stream_id?: number | undefined;
|
|
38
|
-
audio_stream_id?: number | undefined;
|
|
39
|
-
peer_id?: string | undefined;
|
|
40
|
-
consumer?: "web_preview" | undefined;
|
|
41
|
-
}>>;
|
|
42
|
-
debug: z.ZodOptional<z.ZodObject<{
|
|
43
|
-
connect_bootstrap: z.ZodOptional<z.ZodObject<{
|
|
44
|
-
access_id: z.ZodOptional<z.ZodString>;
|
|
45
|
-
secret_key: z.ZodOptional<z.ZodString>;
|
|
46
|
-
peer_id: z.ZodOptional<z.ZodString>;
|
|
47
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
service_entry?: string | undefined;
|
|
50
|
-
peer_id?: string | undefined;
|
|
51
|
-
access_id?: string | undefined;
|
|
52
|
-
secret_key?: string | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
service_entry?: string | undefined;
|
|
55
|
-
peer_id?: string | undefined;
|
|
56
|
-
access_id?: string | undefined;
|
|
57
|
-
secret_key?: string | undefined;
|
|
58
|
-
}>>;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
connect_bootstrap?: {
|
|
61
|
-
service_entry?: string | undefined;
|
|
62
|
-
peer_id?: string | undefined;
|
|
63
|
-
access_id?: string | undefined;
|
|
64
|
-
secret_key?: string | undefined;
|
|
65
|
-
} | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
connect_bootstrap?: {
|
|
68
|
-
service_entry?: string | undefined;
|
|
69
|
-
peer_id?: string | undefined;
|
|
70
|
-
access_id?: string | undefined;
|
|
71
|
-
secret_key?: string | undefined;
|
|
72
|
-
} | undefined;
|
|
73
|
-
}>>;
|
|
74
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
75
|
-
version: z.ZodOptional<z.ZodNumber>;
|
|
76
|
-
server: z.ZodOptional<z.ZodObject<{
|
|
77
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
78
|
-
license: z.ZodOptional<z.ZodString>;
|
|
79
|
-
mp4_path: z.ZodOptional<z.ZodString>;
|
|
80
|
-
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
81
|
-
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
service_entry?: string | undefined;
|
|
84
|
-
license?: string | undefined;
|
|
85
|
-
mp4_path?: string | undefined;
|
|
86
|
-
video_stream_id?: number | undefined;
|
|
87
|
-
audio_stream_id?: number | undefined;
|
|
88
|
-
}, {
|
|
89
|
-
service_entry?: string | undefined;
|
|
90
|
-
license?: string | undefined;
|
|
91
|
-
mp4_path?: string | undefined;
|
|
92
|
-
video_stream_id?: number | undefined;
|
|
93
|
-
audio_stream_id?: number | undefined;
|
|
94
|
-
}>>;
|
|
95
|
-
client: z.ZodOptional<z.ZodObject<{
|
|
96
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
97
|
-
peer_id: z.ZodOptional<z.ZodString>;
|
|
98
|
-
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
99
|
-
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
100
|
-
consumer: z.ZodOptional<z.ZodEnum<["web_preview"]>>;
|
|
101
|
-
}, "strip", z.ZodTypeAny, {
|
|
102
|
-
service_entry?: string | undefined;
|
|
103
|
-
video_stream_id?: number | undefined;
|
|
104
|
-
audio_stream_id?: number | undefined;
|
|
105
|
-
peer_id?: string | undefined;
|
|
106
|
-
consumer?: "web_preview" | undefined;
|
|
107
|
-
}, {
|
|
108
|
-
service_entry?: string | undefined;
|
|
109
|
-
video_stream_id?: number | undefined;
|
|
110
|
-
audio_stream_id?: number | undefined;
|
|
111
|
-
peer_id?: string | undefined;
|
|
112
|
-
consumer?: "web_preview" | undefined;
|
|
113
|
-
}>>;
|
|
114
|
-
debug: z.ZodOptional<z.ZodObject<{
|
|
115
|
-
connect_bootstrap: z.ZodOptional<z.ZodObject<{
|
|
116
|
-
access_id: z.ZodOptional<z.ZodString>;
|
|
117
|
-
secret_key: z.ZodOptional<z.ZodString>;
|
|
118
|
-
peer_id: z.ZodOptional<z.ZodString>;
|
|
119
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
120
|
-
}, "strip", z.ZodTypeAny, {
|
|
121
|
-
service_entry?: string | undefined;
|
|
122
|
-
peer_id?: string | undefined;
|
|
123
|
-
access_id?: string | undefined;
|
|
124
|
-
secret_key?: string | undefined;
|
|
125
|
-
}, {
|
|
126
|
-
service_entry?: string | undefined;
|
|
127
|
-
peer_id?: string | undefined;
|
|
128
|
-
access_id?: string | undefined;
|
|
129
|
-
secret_key?: string | undefined;
|
|
130
|
-
}>>;
|
|
131
|
-
}, "strip", z.ZodTypeAny, {
|
|
132
|
-
connect_bootstrap?: {
|
|
133
|
-
service_entry?: string | undefined;
|
|
134
|
-
peer_id?: string | undefined;
|
|
135
|
-
access_id?: string | undefined;
|
|
136
|
-
secret_key?: string | undefined;
|
|
137
|
-
} | undefined;
|
|
138
|
-
}, {
|
|
139
|
-
connect_bootstrap?: {
|
|
140
|
-
service_entry?: string | undefined;
|
|
141
|
-
peer_id?: string | undefined;
|
|
142
|
-
access_id?: string | undefined;
|
|
143
|
-
secret_key?: string | undefined;
|
|
144
|
-
} | undefined;
|
|
145
|
-
}>>;
|
|
146
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
147
|
-
version: z.ZodOptional<z.ZodNumber>;
|
|
148
|
-
server: z.ZodOptional<z.ZodObject<{
|
|
149
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
150
|
-
license: z.ZodOptional<z.ZodString>;
|
|
151
|
-
mp4_path: z.ZodOptional<z.ZodString>;
|
|
152
|
-
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
153
|
-
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
154
|
-
}, "strip", z.ZodTypeAny, {
|
|
155
|
-
service_entry?: string | undefined;
|
|
156
|
-
license?: string | undefined;
|
|
157
|
-
mp4_path?: string | undefined;
|
|
158
|
-
video_stream_id?: number | undefined;
|
|
159
|
-
audio_stream_id?: number | undefined;
|
|
160
|
-
}, {
|
|
161
|
-
service_entry?: string | undefined;
|
|
162
|
-
license?: string | undefined;
|
|
163
|
-
mp4_path?: string | undefined;
|
|
164
|
-
video_stream_id?: number | undefined;
|
|
165
|
-
audio_stream_id?: number | undefined;
|
|
166
|
-
}>>;
|
|
167
|
-
client: z.ZodOptional<z.ZodObject<{
|
|
168
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
169
|
-
peer_id: z.ZodOptional<z.ZodString>;
|
|
170
|
-
audio_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
171
|
-
video_stream_id: z.ZodOptional<z.ZodNumber>;
|
|
172
|
-
consumer: z.ZodOptional<z.ZodEnum<["web_preview"]>>;
|
|
173
|
-
}, "strip", z.ZodTypeAny, {
|
|
174
|
-
service_entry?: string | undefined;
|
|
175
|
-
video_stream_id?: number | undefined;
|
|
176
|
-
audio_stream_id?: number | undefined;
|
|
177
|
-
peer_id?: string | undefined;
|
|
178
|
-
consumer?: "web_preview" | undefined;
|
|
179
|
-
}, {
|
|
180
|
-
service_entry?: string | undefined;
|
|
181
|
-
video_stream_id?: number | undefined;
|
|
182
|
-
audio_stream_id?: number | undefined;
|
|
183
|
-
peer_id?: string | undefined;
|
|
184
|
-
consumer?: "web_preview" | undefined;
|
|
185
|
-
}>>;
|
|
186
|
-
debug: z.ZodOptional<z.ZodObject<{
|
|
187
|
-
connect_bootstrap: z.ZodOptional<z.ZodObject<{
|
|
188
|
-
access_id: z.ZodOptional<z.ZodString>;
|
|
189
|
-
secret_key: z.ZodOptional<z.ZodString>;
|
|
190
|
-
peer_id: z.ZodOptional<z.ZodString>;
|
|
191
|
-
service_entry: z.ZodOptional<z.ZodString>;
|
|
192
|
-
}, "strip", z.ZodTypeAny, {
|
|
193
|
-
service_entry?: string | undefined;
|
|
194
|
-
peer_id?: string | undefined;
|
|
195
|
-
access_id?: string | undefined;
|
|
196
|
-
secret_key?: string | undefined;
|
|
197
|
-
}, {
|
|
198
|
-
service_entry?: string | undefined;
|
|
199
|
-
peer_id?: string | undefined;
|
|
200
|
-
access_id?: string | undefined;
|
|
201
|
-
secret_key?: string | undefined;
|
|
202
|
-
}>>;
|
|
203
|
-
}, "strip", z.ZodTypeAny, {
|
|
204
|
-
connect_bootstrap?: {
|
|
205
|
-
service_entry?: string | undefined;
|
|
206
|
-
peer_id?: string | undefined;
|
|
207
|
-
access_id?: string | undefined;
|
|
208
|
-
secret_key?: string | undefined;
|
|
209
|
-
} | undefined;
|
|
210
|
-
}, {
|
|
211
|
-
connect_bootstrap?: {
|
|
212
|
-
service_entry?: string | undefined;
|
|
213
|
-
peer_id?: string | undefined;
|
|
214
|
-
access_id?: string | undefined;
|
|
215
|
-
secret_key?: string | undefined;
|
|
216
|
-
} | undefined;
|
|
217
|
-
}>>;
|
|
218
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
219
|
-
export declare const CliJsonOutputSchema: z.ZodObject<{
|
|
220
|
-
code: z.ZodNumber;
|
|
221
|
-
message: z.ZodString;
|
|
222
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
223
|
-
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
code: number;
|
|
225
|
-
message: string;
|
|
226
|
-
data?: any;
|
|
227
|
-
}, {
|
|
228
|
-
code: number;
|
|
229
|
-
message: string;
|
|
230
|
-
data?: any;
|
|
231
|
-
}>;
|
|
232
|
-
export declare const CommandToHostMethodMapping: Record<string, string>;
|
|
233
|
-
export declare const ErrorReasonCodeMapping: Record<string, number>;
|
|
234
|
-
export declare const ServiceStartParamsSchema: z.ZodObject<{
|
|
235
|
-
serviceEntry: z.ZodOptional<z.ZodString>;
|
|
236
|
-
license: z.ZodOptional<z.ZodString>;
|
|
237
|
-
}, "strip", z.ZodTypeAny, {
|
|
238
|
-
license?: string | undefined;
|
|
239
|
-
serviceEntry?: string | undefined;
|
|
240
|
-
}, {
|
|
241
|
-
license?: string | undefined;
|
|
242
|
-
serviceEntry?: string | undefined;
|
|
243
|
-
}>;
|
|
244
|
-
export declare const ConnectionConnectParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
245
|
-
serviceEntry: z.ZodOptional<z.ZodString>;
|
|
246
|
-
peerId: z.ZodString;
|
|
247
|
-
token: z.ZodString;
|
|
248
|
-
}, "strip", z.ZodTypeAny, {
|
|
249
|
-
peerId: string;
|
|
250
|
-
token: string;
|
|
251
|
-
serviceEntry?: string | undefined;
|
|
252
|
-
}, {
|
|
253
|
-
peerId: string;
|
|
254
|
-
token: string;
|
|
255
|
-
serviceEntry?: string | undefined;
|
|
256
|
-
}>, {
|
|
257
|
-
peerId: string;
|
|
258
|
-
token: string;
|
|
259
|
-
serviceEntry?: string | undefined;
|
|
260
|
-
}, {
|
|
261
|
-
peerId: string;
|
|
262
|
-
token: string;
|
|
263
|
-
serviceEntry?: string | undefined;
|
|
264
|
-
}>;
|
|
265
|
-
export declare const StreamSendStartParamsSchema: z.ZodObject<{
|
|
266
|
-
streamId: z.ZodString;
|
|
267
|
-
media: z.ZodEnum<["audio", "video"]>;
|
|
268
|
-
assetsDir: z.ZodString;
|
|
269
|
-
}, "strip", z.ZodTypeAny, {
|
|
270
|
-
streamId: string;
|
|
271
|
-
media: "audio" | "video";
|
|
272
|
-
assetsDir: string;
|
|
273
|
-
}, {
|
|
274
|
-
streamId: string;
|
|
275
|
-
media: "audio" | "video";
|
|
276
|
-
assetsDir: string;
|
|
277
|
-
}>;
|
|
278
|
-
export declare const StreamReceiveStartParamsSchema: z.ZodObject<{
|
|
279
|
-
streamId: z.ZodString;
|
|
280
|
-
media: z.ZodEnum<["audio", "video"]>;
|
|
281
|
-
}, "strip", z.ZodTypeAny, {
|
|
282
|
-
streamId: string;
|
|
283
|
-
media: "audio" | "video";
|
|
284
|
-
}, {
|
|
285
|
-
streamId: string;
|
|
286
|
-
media: "audio" | "video";
|
|
287
|
-
}>;
|
|
288
|
-
export declare const StreamMessageSendParamsSchema: z.ZodObject<{
|
|
289
|
-
streamId: z.ZodString;
|
|
290
|
-
payload: z.ZodString;
|
|
291
|
-
}, "strip", z.ZodTypeAny, {
|
|
292
|
-
streamId: string;
|
|
293
|
-
payload: string;
|
|
294
|
-
}, {
|
|
295
|
-
streamId: string;
|
|
296
|
-
payload: string;
|
|
297
|
-
}>;
|
|
298
|
-
export declare const OutputAttachParamsSchema: z.ZodObject<{
|
|
299
|
-
streamId: z.ZodString;
|
|
300
|
-
consumer: z.ZodString;
|
|
301
|
-
mediaView: z.ZodString;
|
|
302
|
-
format: z.ZodString;
|
|
303
|
-
delivery: z.ZodString;
|
|
304
|
-
targetPath: z.ZodOptional<z.ZodString>;
|
|
305
|
-
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
306
|
-
}, "strip", z.ZodTypeAny, {
|
|
307
|
-
consumer: string;
|
|
308
|
-
streamId: string;
|
|
309
|
-
mediaView: string;
|
|
310
|
-
format: string;
|
|
311
|
-
delivery: string;
|
|
312
|
-
targetPath?: string | undefined;
|
|
313
|
-
maxFiles?: number | undefined;
|
|
314
|
-
}, {
|
|
315
|
-
consumer: string;
|
|
316
|
-
streamId: string;
|
|
317
|
-
mediaView: string;
|
|
318
|
-
format: string;
|
|
319
|
-
delivery: string;
|
|
320
|
-
targetPath?: string | undefined;
|
|
321
|
-
maxFiles?: number | undefined;
|
|
322
|
-
}>;
|
|
323
|
-
export declare const OutputAttachCliParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
324
|
-
streamId: z.ZodNumber;
|
|
325
|
-
consumer: z.ZodEnum<["web_preview", "file_sink"]>;
|
|
326
|
-
mediaView: z.ZodEnum<["encoded", "encoded_packet"]>;
|
|
327
|
-
format: z.ZodEnum<["h264", "g711a", "jpeg", "pcm", "mp4"]>;
|
|
328
|
-
delivery: z.ZodEnum<["artifact_path", "file"]>;
|
|
329
|
-
targetPath: z.ZodOptional<z.ZodString>;
|
|
330
|
-
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
331
|
-
}, "strip", z.ZodTypeAny, {
|
|
332
|
-
consumer: "web_preview" | "file_sink";
|
|
333
|
-
streamId: number;
|
|
334
|
-
mediaView: "encoded" | "encoded_packet";
|
|
335
|
-
format: "h264" | "g711a" | "jpeg" | "pcm" | "mp4";
|
|
336
|
-
delivery: "artifact_path" | "file";
|
|
337
|
-
targetPath?: string | undefined;
|
|
338
|
-
maxFiles?: number | undefined;
|
|
339
|
-
}, {
|
|
340
|
-
consumer: "web_preview" | "file_sink";
|
|
341
|
-
streamId: number;
|
|
342
|
-
mediaView: "encoded" | "encoded_packet";
|
|
343
|
-
format: "h264" | "g711a" | "jpeg" | "pcm" | "mp4";
|
|
344
|
-
delivery: "artifact_path" | "file";
|
|
345
|
-
targetPath?: string | undefined;
|
|
346
|
-
maxFiles?: number | undefined;
|
|
347
|
-
}>, {
|
|
348
|
-
consumer: "web_preview" | "file_sink";
|
|
349
|
-
streamId: number;
|
|
350
|
-
mediaView: "encoded" | "encoded_packet";
|
|
351
|
-
format: "h264" | "g711a" | "jpeg" | "pcm" | "mp4";
|
|
352
|
-
delivery: "artifact_path" | "file";
|
|
353
|
-
targetPath?: string | undefined;
|
|
354
|
-
maxFiles?: number | undefined;
|
|
355
|
-
}, {
|
|
356
|
-
consumer: "web_preview" | "file_sink";
|
|
357
|
-
streamId: number;
|
|
358
|
-
mediaView: "encoded" | "encoded_packet";
|
|
359
|
-
format: "h264" | "g711a" | "jpeg" | "pcm" | "mp4";
|
|
360
|
-
delivery: "artifact_path" | "file";
|
|
361
|
-
targetPath?: string | undefined;
|
|
362
|
-
maxFiles?: number | undefined;
|
|
363
|
-
}>;
|
|
364
|
-
export declare const OutputAttachOptionsSchema: z.ZodEffects<z.ZodObject<{
|
|
365
|
-
streamType: z.ZodOptional<z.ZodEnum<["audio", "video"]>>;
|
|
366
|
-
stdout: z.ZodOptional<z.ZodBoolean>;
|
|
367
|
-
filePath: z.ZodOptional<z.ZodString>;
|
|
368
|
-
}, "strip", z.ZodTypeAny, {
|
|
369
|
-
streamType?: "audio" | "video" | undefined;
|
|
370
|
-
stdout?: boolean | undefined;
|
|
371
|
-
filePath?: string | undefined;
|
|
372
|
-
}, {
|
|
373
|
-
streamType?: "audio" | "video" | undefined;
|
|
374
|
-
stdout?: boolean | undefined;
|
|
375
|
-
filePath?: string | undefined;
|
|
376
|
-
}>, {
|
|
377
|
-
streamType?: "audio" | "video" | undefined;
|
|
378
|
-
stdout?: boolean | undefined;
|
|
379
|
-
filePath?: string | undefined;
|
|
380
|
-
}, {
|
|
381
|
-
streamType?: "audio" | "video" | undefined;
|
|
382
|
-
stdout?: boolean | undefined;
|
|
383
|
-
filePath?: string | undefined;
|
|
384
|
-
}>;
|
|
385
|
-
export declare const CommandSendParamsSchema: z.ZodObject<{
|
|
386
|
-
commandId: z.ZodString;
|
|
387
|
-
payloadEncoding: z.ZodString;
|
|
388
|
-
payload: z.ZodString;
|
|
389
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
390
|
-
}, "strip", z.ZodTypeAny, {
|
|
391
|
-
payload: string;
|
|
392
|
-
commandId: string;
|
|
393
|
-
payloadEncoding: string;
|
|
394
|
-
timeoutMs?: number | undefined;
|
|
395
|
-
}, {
|
|
396
|
-
payload: string;
|
|
397
|
-
commandId: string;
|
|
398
|
-
payloadEncoding: string;
|
|
399
|
-
timeoutMs?: number | undefined;
|
|
400
|
-
}>;
|
|
401
|
-
export declare const CommandReplyParamsSchema: z.ZodObject<{
|
|
402
|
-
remoteRequestId: z.ZodString;
|
|
403
|
-
commandId: z.ZodString;
|
|
404
|
-
payloadEncoding: z.ZodString;
|
|
405
|
-
payload: z.ZodString;
|
|
406
|
-
}, "strip", z.ZodTypeAny, {
|
|
407
|
-
payload: string;
|
|
408
|
-
commandId: string;
|
|
409
|
-
payloadEncoding: string;
|
|
410
|
-
remoteRequestId: string;
|
|
411
|
-
}, {
|
|
412
|
-
payload: string;
|
|
413
|
-
commandId: string;
|
|
414
|
-
payloadEncoding: string;
|
|
415
|
-
remoteRequestId: string;
|
|
416
|
-
}>;
|
|
417
|
-
export declare const ArtifactExportLogsParamsSchema: z.ZodObject<{
|
|
418
|
-
outputPath: z.ZodString;
|
|
419
|
-
}, "strip", z.ZodTypeAny, {
|
|
420
|
-
outputPath: string;
|
|
421
|
-
}, {
|
|
422
|
-
outputPath: string;
|
|
423
|
-
}>;
|
|
424
|
-
export declare const ArtifactExportReportParamsSchema: z.ZodObject<{
|
|
425
|
-
outputPath: z.ZodString;
|
|
426
|
-
}, "strip", z.ZodTypeAny, {
|
|
427
|
-
outputPath: string;
|
|
428
|
-
}, {
|
|
429
|
-
outputPath: string;
|
|
430
|
-
}>;
|
package/dist/cli/src/facade.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.CliConfigSchema = zod_1.z.object({
|
|
6
|
-
version: zod_1.z.number().int().optional(),
|
|
7
|
-
server: zod_1.z.object({
|
|
8
|
-
service_entry: zod_1.z.string().optional(),
|
|
9
|
-
license: zod_1.z.string().optional(),
|
|
10
|
-
mp4_path: zod_1.z.string().optional(),
|
|
11
|
-
video_stream_id: zod_1.z.number().int().nonnegative().optional(),
|
|
12
|
-
audio_stream_id: zod_1.z.number().int().nonnegative().optional(),
|
|
13
|
-
}).optional(),
|
|
14
|
-
client: zod_1.z.object({
|
|
15
|
-
service_entry: zod_1.z.string().optional(),
|
|
16
|
-
peer_id: zod_1.z.string().optional(),
|
|
17
|
-
audio_stream_id: zod_1.z.number().int().nonnegative().optional(),
|
|
18
|
-
video_stream_id: zod_1.z.number().int().nonnegative().optional(),
|
|
19
|
-
consumer: zod_1.z.enum(['web_preview']).optional(),
|
|
20
|
-
}).optional(),
|
|
21
|
-
debug: zod_1.z.object({
|
|
22
|
-
connect_bootstrap: zod_1.z.object({
|
|
23
|
-
access_id: zod_1.z.string().optional(),
|
|
24
|
-
secret_key: zod_1.z.string().optional(),
|
|
25
|
-
peer_id: zod_1.z.string().optional(),
|
|
26
|
-
service_entry: zod_1.z.string().optional(),
|
|
27
|
-
}).optional(),
|
|
28
|
-
}).optional(),
|
|
29
|
-
}).passthrough();
|
|
30
|
-
exports.CliJsonOutputSchema = zod_1.z.object({
|
|
31
|
-
code: zod_1.z.number(),
|
|
32
|
-
message: zod_1.z.string(),
|
|
33
|
-
data: zod_1.z.any().optional(),
|
|
34
|
-
});
|
|
35
|
-
exports.CommandToHostMethodMapping = {
|
|
36
|
-
'host status': 'host/status',
|
|
37
|
-
'host stop': 'host/shutdown',
|
|
38
|
-
'service start': 'service/start',
|
|
39
|
-
'service stop': 'service/stop',
|
|
40
|
-
'client start': 'connection/connect',
|
|
41
|
-
'connection show': 'connection/get',
|
|
42
|
-
'connection connect': 'connection/connect',
|
|
43
|
-
'connection disconnect': 'connection/disconnect',
|
|
44
|
-
'stream list': 'stream/list',
|
|
45
|
-
'stream send start': 'stream/sendStart',
|
|
46
|
-
'stream send stop': 'stream/sendStop',
|
|
47
|
-
'stream message send': 'stream/message/send',
|
|
48
|
-
'stream receive start': 'stream/receiveStart',
|
|
49
|
-
'stream receive stop': 'stream/receiveStop',
|
|
50
|
-
'output attach': 'output/attach',
|
|
51
|
-
'output detach': 'output/detach',
|
|
52
|
-
'command request': 'command/request',
|
|
53
|
-
'command send': 'command/request',
|
|
54
|
-
'command pending list': 'command/pending/list',
|
|
55
|
-
'command reply': 'command/reply',
|
|
56
|
-
'command tail': 'events/subscribe',
|
|
57
|
-
'events tail': 'events/subscribe',
|
|
58
|
-
'logs export': 'artifact/exportLogs',
|
|
59
|
-
'report show': 'artifact/readReport',
|
|
60
|
-
'report export': 'artifact/exportReport',
|
|
61
|
-
'debug bootstrap qrcode': 'debug/token/qrcode',
|
|
62
|
-
};
|
|
63
|
-
exports.ErrorReasonCodeMapping = {
|
|
64
|
-
protocol_version_mismatch: 2,
|
|
65
|
-
not_initialized: 3,
|
|
66
|
-
invalid_request: 4,
|
|
67
|
-
internal_error: 5,
|
|
68
|
-
timeout: 6,
|
|
69
|
-
connection_failed: 7,
|
|
70
|
-
stream_not_found: 8,
|
|
71
|
-
protocol_malformed_frame: 9,
|
|
72
|
-
method_not_found: 10,
|
|
73
|
-
invalid_initialize_result: 11,
|
|
74
|
-
};
|
|
75
|
-
exports.ServiceStartParamsSchema = zod_1.z.object({
|
|
76
|
-
serviceEntry: zod_1.z.string().optional(),
|
|
77
|
-
license: zod_1.z.string().optional(),
|
|
78
|
-
});
|
|
79
|
-
exports.ConnectionConnectParamsSchema = zod_1.z.object({
|
|
80
|
-
serviceEntry: zod_1.z.string().optional(),
|
|
81
|
-
peerId: zod_1.z.string(),
|
|
82
|
-
token: zod_1.z.string().min(1),
|
|
83
|
-
}).refine((value) => value.token.trim().length > 0, {
|
|
84
|
-
message: 'token is required',
|
|
85
|
-
});
|
|
86
|
-
exports.StreamSendStartParamsSchema = zod_1.z.object({
|
|
87
|
-
streamId: zod_1.z.string(),
|
|
88
|
-
media: zod_1.z.enum(['audio', 'video']),
|
|
89
|
-
assetsDir: zod_1.z.string(),
|
|
90
|
-
});
|
|
91
|
-
exports.StreamReceiveStartParamsSchema = zod_1.z.object({
|
|
92
|
-
streamId: zod_1.z.string(),
|
|
93
|
-
media: zod_1.z.enum(['audio', 'video']),
|
|
94
|
-
});
|
|
95
|
-
exports.StreamMessageSendParamsSchema = zod_1.z.object({
|
|
96
|
-
streamId: zod_1.z.string(),
|
|
97
|
-
payload: zod_1.z.string(),
|
|
98
|
-
});
|
|
99
|
-
exports.OutputAttachParamsSchema = zod_1.z.object({
|
|
100
|
-
streamId: zod_1.z.string(),
|
|
101
|
-
consumer: zod_1.z.string(),
|
|
102
|
-
mediaView: zod_1.z.string(),
|
|
103
|
-
format: zod_1.z.string(),
|
|
104
|
-
delivery: zod_1.z.string(),
|
|
105
|
-
targetPath: zod_1.z.string().optional(),
|
|
106
|
-
maxFiles: zod_1.z.number().int().optional(),
|
|
107
|
-
});
|
|
108
|
-
exports.OutputAttachCliParamsSchema = zod_1.z.object({
|
|
109
|
-
streamId: zod_1.z.number().int().nonnegative(),
|
|
110
|
-
consumer: zod_1.z.enum(['web_preview', 'file_sink']),
|
|
111
|
-
mediaView: zod_1.z.enum(['encoded', 'encoded_packet']),
|
|
112
|
-
format: zod_1.z.enum(['h264', 'g711a', 'jpeg', 'pcm', 'mp4']),
|
|
113
|
-
delivery: zod_1.z.enum(['artifact_path', 'file']),
|
|
114
|
-
targetPath: zod_1.z.string().optional(),
|
|
115
|
-
maxFiles: zod_1.z.number().int().positive().optional(),
|
|
116
|
-
}).superRefine((params, ctx) => {
|
|
117
|
-
if (params.consumer === 'web_preview') {
|
|
118
|
-
if (params.delivery !== 'artifact_path') {
|
|
119
|
-
ctx.addIssue({
|
|
120
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
121
|
-
message: 'web_preview requires delivery=artifact_path',
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
if (params.format !== 'h264' && params.format !== 'g711a' && params.format !== 'jpeg' && params.format !== 'pcm') {
|
|
125
|
-
ctx.addIssue({
|
|
126
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
127
|
-
message: 'web_preview requires format=h264|g711a|jpeg|pcm',
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (params.consumer === 'file_sink') {
|
|
132
|
-
if (params.delivery !== 'file') {
|
|
133
|
-
ctx.addIssue({
|
|
134
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
135
|
-
message: 'file_sink requires delivery=file',
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
if (params.format !== 'mp4') {
|
|
139
|
-
ctx.addIssue({
|
|
140
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
141
|
-
message: 'file_sink requires format=mp4',
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
exports.OutputAttachOptionsSchema = zod_1.z.object({
|
|
147
|
-
streamType: zod_1.z.enum(['audio', 'video']).optional(),
|
|
148
|
-
stdout: zod_1.z.boolean().optional(),
|
|
149
|
-
filePath: zod_1.z.string().optional(),
|
|
150
|
-
}).refine((data) => !(data.stdout && data.filePath), {
|
|
151
|
-
message: 'Cannot specify both stdout and filePath',
|
|
152
|
-
});
|
|
153
|
-
exports.CommandSendParamsSchema = zod_1.z.object({
|
|
154
|
-
commandId: zod_1.z.string(),
|
|
155
|
-
payloadEncoding: zod_1.z.string(),
|
|
156
|
-
payload: zod_1.z.string(),
|
|
157
|
-
timeoutMs: zod_1.z.number().int().positive().optional(),
|
|
158
|
-
});
|
|
159
|
-
exports.CommandReplyParamsSchema = zod_1.z.object({
|
|
160
|
-
remoteRequestId: zod_1.z.string(),
|
|
161
|
-
commandId: zod_1.z.string(),
|
|
162
|
-
payloadEncoding: zod_1.z.string(),
|
|
163
|
-
payload: zod_1.z.string(),
|
|
164
|
-
});
|
|
165
|
-
exports.ArtifactExportLogsParamsSchema = zod_1.z.object({
|
|
166
|
-
outputPath: zod_1.z.string(),
|
|
167
|
-
});
|
|
168
|
-
exports.ArtifactExportReportParamsSchema = zod_1.z.object({
|
|
169
|
-
outputPath: zod_1.z.string(),
|
|
170
|
-
});
|
package/dist/cli/src/guide.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function printQuickstartGuide(): void;
|
package/dist/cli/src/guide.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.printQuickstartGuide = printQuickstartGuide;
|
|
4
|
-
function printQuickstartGuide() {
|
|
5
|
-
const lines = [
|
|
6
|
-
'TiRTC CLI 新手快速入口(service start -> client start 本地预览)',
|
|
7
|
-
'',
|
|
8
|
-
'前置条件:',
|
|
9
|
-
'1) 已构建最新 CLI:',
|
|
10
|
-
' npm --prefix products/app-server run build',
|
|
11
|
-
' npm --prefix products/cli run build',
|
|
12
|
-
'2) 准备一份 TOML 配置:',
|
|
13
|
-
' [server] service_entry = "" license = "<LICENSE>" mp4_path = "./.refers/simple.mp4" video_stream_id = 11 audio_stream_id = 10',
|
|
14
|
-
' [client] service_entry = "" peer_id = "<PEER_ID>" audio_stream_id = 10 video_stream_id = 11 consumer = "web_preview"',
|
|
15
|
-
'',
|
|
16
|
-
'步骤 1:启动服务(自动创建 session)',
|
|
17
|
-
' node products/cli/bin/tirtc-devtools-cli.js --config ./server.toml service start',
|
|
18
|
-
' # 记下输出里的 sessionId,后续观测命令显式带 --session',
|
|
19
|
-
'',
|
|
20
|
-
'步骤 2:CLI 会自动 prepare MP4 并绑定音视频 stream,不再需要手工 prepare assets_dir',
|
|
21
|
-
' # service start 成功后会自动 prepare 并按 AUTO_ON_CONNECTED 进入待发流语义',
|
|
22
|
-
'',
|
|
23
|
-
'步骤 3:显式签发 client token(可本地执行,也可由外部系统提供)',
|
|
24
|
-
' export TIRTC_ACCESS_KEY_ID="<ACCESS_KEY_ID>"',
|
|
25
|
-
' export TIRTC_SECRET_KEY_ID="<SECRET_KEY_ID>"',
|
|
26
|
-
' export TIRTC_APP_ID="<APP_ID>"',
|
|
27
|
-
' node products/cli/bin/tirtc-devtools-cli.js --json token issue "<REMOTE_ID>" --endpoint "<ENDPOINT>"',
|
|
28
|
-
'',
|
|
29
|
-
'步骤 4:启动 client 本地 web preview',
|
|
30
|
-
' node products/cli/bin/tirtc-devtools-cli.js --config ./client.toml client start --token "<TOKEN>"',
|
|
31
|
-
' # 返回结果里的 autoApplied.preview.url 就是浏览器预览入口',
|
|
32
|
-
'',
|
|
33
|
-
'步骤 5:打开返回的 preview.url,并让页面触发 /preview/start',
|
|
34
|
-
' # Host 会在收到 preview/start 后激活对应 receive worker',
|
|
35
|
-
'',
|
|
36
|
-
'步骤 6:服务端观测',
|
|
37
|
-
' node products/cli/bin/tirtc-devtools-cli.js --session <SESSION_ID> events tail',
|
|
38
|
-
' node products/cli/bin/tirtc-devtools-cli.js --session <SESSION_ID> report show',
|
|
39
|
-
'',
|
|
40
|
-
'补充:',
|
|
41
|
-
'- client start 是正式入口;connection connect / stream receive start / output attach 保留为 expert path',
|
|
42
|
-
'- debug bootstrap qrcode 仅生成连接信息二维码,不签发 token',
|
|
43
|
-
'- 机器可读输出:在命令后追加 --json',
|
|
44
|
-
'- 查看全部命令:node products/cli/bin/tirtc-devtools-cli.js --help',
|
|
45
|
-
'- 查看单命令说明:node products/cli/bin/tirtc-devtools-cli.js <command> --help',
|
|
46
|
-
];
|
|
47
|
-
console.log(lines.join('\n'));
|
|
48
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type SessionRole = 'idle' | 'service' | 'client';
|
|
2
|
-
export type SessionRecord = {
|
|
3
|
-
sessionId: string;
|
|
4
|
-
hostEndpoint: string;
|
|
5
|
-
socketPath: string;
|
|
6
|
-
runtimePlatform: string;
|
|
7
|
-
runtimeBundleRoot: string;
|
|
8
|
-
artifactDir: string;
|
|
9
|
-
logDir: string;
|
|
10
|
-
pid: number;
|
|
11
|
-
startedAt: string;
|
|
12
|
-
role: SessionRole;
|
|
13
|
-
};
|
|
14
|
-
type CreateSessionOptions = {
|
|
15
|
-
logRootDir?: string;
|
|
16
|
-
consoleMirror?: boolean;
|
|
17
|
-
role?: SessionRole;
|
|
18
|
-
};
|
|
19
|
-
export declare function createSession(options?: CreateSessionOptions): SessionRecord;
|
|
20
|
-
export declare function listSessions(): SessionRecord[];
|
|
21
|
-
export declare function stopSession(sessionId: string): SessionRecord;
|
|
22
|
-
export declare function stopAllSessions(): SessionRecord[];
|
|
23
|
-
export declare function resolveSession(sessionId?: string): SessionRecord;
|
|
24
|
-
export declare function setSessionRole(sessionId: string, role: SessionRole): SessionRecord;
|
|
25
|
-
export {};
|