tirtc-devtools-cli 0.0.6 → 0.0.8
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 +8 -1
- package/USAGE.md +45 -7
- package/dist/devtools/cli/src/config.js +2 -2
- package/dist/devtools/cli/src/facade.d.ts +19 -3
- package/dist/devtools/cli/src/facade.js +12 -3
- package/dist/devtools/cli/src/guide.js +1 -1
- package/dist/devtools/cli/src/index.js +68 -23
- package/dist/devtools/cli/src/progress.d.ts +19 -0
- package/dist/devtools/cli/src/progress.js +63 -0
- package/package.json +1 -1
- 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
|
@@ -119,6 +119,10 @@ class RuntimeHostBridge {
|
|
|
119
119
|
const addonPath = this.resolveAddonPath();
|
|
120
120
|
const loaded = runtimeRequire(addonPath);
|
|
121
121
|
if (!loaded || typeof loaded.startUplink !== 'function' || typeof loaded.stopUplink !== 'function' ||
|
|
122
|
+
typeof loaded.setUplinkEventHandler !== 'function' ||
|
|
123
|
+
typeof loaded.sendUplinkStreamMessage !== 'function' ||
|
|
124
|
+
typeof loaded.requestUplinkCommand !== 'function' ||
|
|
125
|
+
typeof loaded.replyUplinkRemoteCommand !== 'function' ||
|
|
122
126
|
typeof loaded.startDownlink !== 'function' || typeof loaded.stopDownlink !== 'function') {
|
|
123
127
|
throw new Error('runtime host addon exports are incomplete: ' + addonPath);
|
|
124
128
|
}
|
|
@@ -131,6 +135,18 @@ class RuntimeHostBridge {
|
|
|
131
135
|
stopUplink() {
|
|
132
136
|
this.ensureBinding().stopUplink();
|
|
133
137
|
}
|
|
138
|
+
setUplinkEventHandler(handler) {
|
|
139
|
+
this.ensureBinding().setUplinkEventHandler(handler);
|
|
140
|
+
}
|
|
141
|
+
sendUplinkStreamMessage(streamId, payload) {
|
|
142
|
+
this.ensureBinding().sendUplinkStreamMessage(streamId, payload);
|
|
143
|
+
}
|
|
144
|
+
requestUplinkCommand(requestId, commandId, payload, timeoutMs) {
|
|
145
|
+
this.ensureBinding().requestUplinkCommand(requestId, commandId, payload, timeoutMs);
|
|
146
|
+
}
|
|
147
|
+
replyUplinkRemoteCommand(remoteRequestId, commandId, payload) {
|
|
148
|
+
this.ensureBinding().replyUplinkRemoteCommand(remoteRequestId, commandId, payload);
|
|
149
|
+
}
|
|
134
150
|
startDownlink(args) {
|
|
135
151
|
return this.ensureBinding().startDownlink(args);
|
|
136
152
|
}
|
|
@@ -455,10 +455,64 @@ export declare const CommandResponseSchema: z.ZodObject<{
|
|
|
455
455
|
sequenceNumber: number;
|
|
456
456
|
payloadEncoding: string;
|
|
457
457
|
}>;
|
|
458
|
+
export declare const CommandPendingConnectionSchema: z.ZodObject<{
|
|
459
|
+
state: z.ZodString;
|
|
460
|
+
direction: z.ZodOptional<z.ZodString>;
|
|
461
|
+
peerId: z.ZodOptional<z.ZodString>;
|
|
462
|
+
}, "strip", z.ZodTypeAny, {
|
|
463
|
+
state: string;
|
|
464
|
+
direction?: string | undefined;
|
|
465
|
+
peerId?: string | undefined;
|
|
466
|
+
}, {
|
|
467
|
+
state: string;
|
|
468
|
+
direction?: string | undefined;
|
|
469
|
+
peerId?: string | undefined;
|
|
470
|
+
}>;
|
|
471
|
+
export declare const CommandPendingEntrySchema: z.ZodObject<{
|
|
472
|
+
remoteRequestId: z.ZodNumber;
|
|
473
|
+
commandId: z.ZodNumber;
|
|
474
|
+
payloadEncoding: z.ZodString;
|
|
475
|
+
payload: z.ZodString;
|
|
476
|
+
receivedAt: z.ZodString;
|
|
477
|
+
connection: z.ZodObject<{
|
|
478
|
+
state: z.ZodString;
|
|
479
|
+
direction: z.ZodOptional<z.ZodString>;
|
|
480
|
+
peerId: z.ZodOptional<z.ZodString>;
|
|
481
|
+
}, "strip", z.ZodTypeAny, {
|
|
482
|
+
state: string;
|
|
483
|
+
direction?: string | undefined;
|
|
484
|
+
peerId?: string | undefined;
|
|
485
|
+
}, {
|
|
486
|
+
state: string;
|
|
487
|
+
direction?: string | undefined;
|
|
488
|
+
peerId?: string | undefined;
|
|
489
|
+
}>;
|
|
490
|
+
}, "strip", z.ZodTypeAny, {
|
|
491
|
+
payload: string;
|
|
492
|
+
connection: {
|
|
493
|
+
state: string;
|
|
494
|
+
direction?: string | undefined;
|
|
495
|
+
peerId?: string | undefined;
|
|
496
|
+
};
|
|
497
|
+
payloadEncoding: string;
|
|
498
|
+
remoteRequestId: number;
|
|
499
|
+
commandId: number;
|
|
500
|
+
receivedAt: string;
|
|
501
|
+
}, {
|
|
502
|
+
payload: string;
|
|
503
|
+
connection: {
|
|
504
|
+
state: string;
|
|
505
|
+
direction?: string | undefined;
|
|
506
|
+
peerId?: string | undefined;
|
|
507
|
+
};
|
|
508
|
+
payloadEncoding: string;
|
|
509
|
+
remoteRequestId: number;
|
|
510
|
+
commandId: number;
|
|
511
|
+
receivedAt: string;
|
|
512
|
+
}>;
|
|
458
513
|
export declare const CommandSendResultSchema: z.ZodObject<{
|
|
459
514
|
sequenceNumber: z.ZodNumber;
|
|
460
515
|
commandId: z.ZodNumber;
|
|
461
|
-
kind: z.ZodString;
|
|
462
516
|
acceptedAt: z.ZodString;
|
|
463
517
|
response: z.ZodOptional<z.ZodObject<{
|
|
464
518
|
sequenceNumber: z.ZodNumber;
|
|
@@ -474,7 +528,6 @@ export declare const CommandSendResultSchema: z.ZodObject<{
|
|
|
474
528
|
payloadEncoding: string;
|
|
475
529
|
}>>;
|
|
476
530
|
}, "strip", z.ZodTypeAny, {
|
|
477
|
-
kind: string;
|
|
478
531
|
sequenceNumber: number;
|
|
479
532
|
commandId: number;
|
|
480
533
|
acceptedAt: string;
|
|
@@ -484,7 +537,6 @@ export declare const CommandSendResultSchema: z.ZodObject<{
|
|
|
484
537
|
payloadEncoding: string;
|
|
485
538
|
} | undefined;
|
|
486
539
|
}, {
|
|
487
|
-
kind: string;
|
|
488
540
|
sequenceNumber: number;
|
|
489
541
|
commandId: number;
|
|
490
542
|
acceptedAt: string;
|
|
@@ -494,6 +546,109 @@ export declare const CommandSendResultSchema: z.ZodObject<{
|
|
|
494
546
|
payloadEncoding: string;
|
|
495
547
|
} | undefined;
|
|
496
548
|
}>;
|
|
549
|
+
export declare const CommandReplyRequestSchema: z.ZodObject<{
|
|
550
|
+
remoteRequestId: z.ZodNumber;
|
|
551
|
+
commandId: z.ZodNumber;
|
|
552
|
+
payloadEncoding: z.ZodString;
|
|
553
|
+
payload: z.ZodString;
|
|
554
|
+
}, "strip", z.ZodTypeAny, {
|
|
555
|
+
payload: string;
|
|
556
|
+
payloadEncoding: string;
|
|
557
|
+
remoteRequestId: number;
|
|
558
|
+
commandId: number;
|
|
559
|
+
}, {
|
|
560
|
+
payload: string;
|
|
561
|
+
payloadEncoding: string;
|
|
562
|
+
remoteRequestId: number;
|
|
563
|
+
commandId: number;
|
|
564
|
+
}>;
|
|
565
|
+
export declare const CommandReplyResultSchema: z.ZodObject<{
|
|
566
|
+
remoteRequestId: z.ZodNumber;
|
|
567
|
+
commandId: z.ZodNumber;
|
|
568
|
+
repliedAt: z.ZodString;
|
|
569
|
+
}, "strip", z.ZodTypeAny, {
|
|
570
|
+
remoteRequestId: number;
|
|
571
|
+
commandId: number;
|
|
572
|
+
repliedAt: string;
|
|
573
|
+
}, {
|
|
574
|
+
remoteRequestId: number;
|
|
575
|
+
commandId: number;
|
|
576
|
+
repliedAt: string;
|
|
577
|
+
}>;
|
|
578
|
+
export declare const CommandPendingListRequestSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
|
|
579
|
+
export declare const CommandPendingListResultSchema: z.ZodObject<{
|
|
580
|
+
items: z.ZodArray<z.ZodObject<{
|
|
581
|
+
remoteRequestId: z.ZodNumber;
|
|
582
|
+
commandId: z.ZodNumber;
|
|
583
|
+
payloadEncoding: z.ZodString;
|
|
584
|
+
payload: z.ZodString;
|
|
585
|
+
receivedAt: z.ZodString;
|
|
586
|
+
connection: z.ZodObject<{
|
|
587
|
+
state: z.ZodString;
|
|
588
|
+
direction: z.ZodOptional<z.ZodString>;
|
|
589
|
+
peerId: z.ZodOptional<z.ZodString>;
|
|
590
|
+
}, "strip", z.ZodTypeAny, {
|
|
591
|
+
state: string;
|
|
592
|
+
direction?: string | undefined;
|
|
593
|
+
peerId?: string | undefined;
|
|
594
|
+
}, {
|
|
595
|
+
state: string;
|
|
596
|
+
direction?: string | undefined;
|
|
597
|
+
peerId?: string | undefined;
|
|
598
|
+
}>;
|
|
599
|
+
}, "strip", z.ZodTypeAny, {
|
|
600
|
+
payload: string;
|
|
601
|
+
connection: {
|
|
602
|
+
state: string;
|
|
603
|
+
direction?: string | undefined;
|
|
604
|
+
peerId?: string | undefined;
|
|
605
|
+
};
|
|
606
|
+
payloadEncoding: string;
|
|
607
|
+
remoteRequestId: number;
|
|
608
|
+
commandId: number;
|
|
609
|
+
receivedAt: string;
|
|
610
|
+
}, {
|
|
611
|
+
payload: string;
|
|
612
|
+
connection: {
|
|
613
|
+
state: string;
|
|
614
|
+
direction?: string | undefined;
|
|
615
|
+
peerId?: string | undefined;
|
|
616
|
+
};
|
|
617
|
+
payloadEncoding: string;
|
|
618
|
+
remoteRequestId: number;
|
|
619
|
+
commandId: number;
|
|
620
|
+
receivedAt: string;
|
|
621
|
+
}>, "many">;
|
|
622
|
+
listedAt: z.ZodString;
|
|
623
|
+
}, "strip", z.ZodTypeAny, {
|
|
624
|
+
items: {
|
|
625
|
+
payload: string;
|
|
626
|
+
connection: {
|
|
627
|
+
state: string;
|
|
628
|
+
direction?: string | undefined;
|
|
629
|
+
peerId?: string | undefined;
|
|
630
|
+
};
|
|
631
|
+
payloadEncoding: string;
|
|
632
|
+
remoteRequestId: number;
|
|
633
|
+
commandId: number;
|
|
634
|
+
receivedAt: string;
|
|
635
|
+
}[];
|
|
636
|
+
listedAt: string;
|
|
637
|
+
}, {
|
|
638
|
+
items: {
|
|
639
|
+
payload: string;
|
|
640
|
+
connection: {
|
|
641
|
+
state: string;
|
|
642
|
+
direction?: string | undefined;
|
|
643
|
+
peerId?: string | undefined;
|
|
644
|
+
};
|
|
645
|
+
payloadEncoding: string;
|
|
646
|
+
remoteRequestId: number;
|
|
647
|
+
commandId: number;
|
|
648
|
+
receivedAt: string;
|
|
649
|
+
}[];
|
|
650
|
+
listedAt: string;
|
|
651
|
+
}>;
|
|
497
652
|
export declare const ErrorSummarySchema: z.ZodObject<{
|
|
498
653
|
reasonCode: z.ZodString;
|
|
499
654
|
message: z.ZodString;
|
|
@@ -983,28 +1138,19 @@ export declare const OutputAttachRequestSchema: z.ZodObject<{
|
|
|
983
1138
|
}>;
|
|
984
1139
|
export declare const CommandSendRequestSchema: z.ZodObject<{
|
|
985
1140
|
commandId: z.ZodNumber;
|
|
986
|
-
kind: z.ZodString;
|
|
987
1141
|
payloadEncoding: z.ZodString;
|
|
988
1142
|
payload: z.ZodString;
|
|
989
|
-
replyToSequenceNumber: z.ZodOptional<z.ZodNumber>;
|
|
990
|
-
awaitResponse: z.ZodOptional<z.ZodBoolean>;
|
|
991
1143
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
992
1144
|
}, "strip", z.ZodTypeAny, {
|
|
993
|
-
kind: string;
|
|
994
1145
|
payload: string;
|
|
995
1146
|
payloadEncoding: string;
|
|
996
1147
|
commandId: number;
|
|
997
1148
|
timeoutMs?: number | undefined;
|
|
998
|
-
replyToSequenceNumber?: number | undefined;
|
|
999
|
-
awaitResponse?: boolean | undefined;
|
|
1000
1149
|
}, {
|
|
1001
|
-
kind: string;
|
|
1002
1150
|
payload: string;
|
|
1003
1151
|
payloadEncoding: string;
|
|
1004
1152
|
commandId: number;
|
|
1005
1153
|
timeoutMs?: number | undefined;
|
|
1006
|
-
replyToSequenceNumber?: number | undefined;
|
|
1007
|
-
awaitResponse?: boolean | undefined;
|
|
1008
1154
|
}>;
|
|
1009
1155
|
export declare const EventsSubscribeRequestSchema: z.ZodObject<{
|
|
1010
1156
|
families: z.ZodArray<z.ZodString, "many">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DebugTokenQrcodeResultSchema = exports.DebugTokenQrcodeRequestSchema = exports.EventsSubscribeRequestSchema = exports.CommandSendRequestSchema = exports.OutputAttachRequestSchema = exports.StreamMessageSendRequestSchema = exports.StreamSendStartRequestSchema = exports.ConnectionConnectRequestSchema = exports.ServiceStartRequestSchema = exports.ArtifactExportResultSchema = exports.ReportDocumentSchema = exports.ErrorSummarySchema = exports.CommandSendResultSchema = exports.CommandResponseSchema = exports.OutputAttachmentSchema = exports.HostStatusSchema = exports.ArtifactPathsSchema = exports.StreamSnapshotSchema = exports.StreamSourceSchema = exports.StreamLocalAssetsSchema = exports.ConnectionSnapshotSchema = exports.ServiceSnapshotSchema = exports.EventEnvelopeSchema = exports.ErrorResponseSchema = exports.InitializedNotificationSchema = exports.InitializeResultSchema = exports.InitializeRequestSchema = void 0;
|
|
3
|
+
exports.DebugTokenQrcodeResultSchema = exports.DebugTokenQrcodeRequestSchema = exports.EventsSubscribeRequestSchema = exports.CommandSendRequestSchema = exports.OutputAttachRequestSchema = exports.StreamMessageSendRequestSchema = exports.StreamSendStartRequestSchema = exports.ConnectionConnectRequestSchema = exports.ServiceStartRequestSchema = exports.ArtifactExportResultSchema = exports.ReportDocumentSchema = exports.ErrorSummarySchema = exports.CommandPendingListResultSchema = exports.CommandPendingListRequestSchema = exports.CommandReplyResultSchema = exports.CommandReplyRequestSchema = exports.CommandSendResultSchema = exports.CommandPendingEntrySchema = exports.CommandPendingConnectionSchema = exports.CommandResponseSchema = exports.OutputAttachmentSchema = exports.HostStatusSchema = exports.ArtifactPathsSchema = exports.StreamSnapshotSchema = exports.StreamSourceSchema = exports.StreamLocalAssetsSchema = exports.ConnectionSnapshotSchema = exports.ServiceSnapshotSchema = exports.EventEnvelopeSchema = exports.ErrorResponseSchema = exports.InitializedNotificationSchema = exports.InitializeResultSchema = exports.InitializeRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.InitializeRequestSchema = zod_1.z.object({
|
|
6
6
|
protocolVersion: zod_1.z.string(),
|
|
@@ -106,13 +106,41 @@ exports.CommandResponseSchema = zod_1.z.object({
|
|
|
106
106
|
payloadEncoding: zod_1.z.string(),
|
|
107
107
|
payload: zod_1.z.string()
|
|
108
108
|
});
|
|
109
|
+
exports.CommandPendingConnectionSchema = zod_1.z.object({
|
|
110
|
+
state: zod_1.z.string(),
|
|
111
|
+
direction: zod_1.z.string().optional(),
|
|
112
|
+
peerId: zod_1.z.string().optional(),
|
|
113
|
+
});
|
|
114
|
+
exports.CommandPendingEntrySchema = zod_1.z.object({
|
|
115
|
+
remoteRequestId: zod_1.z.number().int(),
|
|
116
|
+
commandId: zod_1.z.number().int(),
|
|
117
|
+
payloadEncoding: zod_1.z.string(),
|
|
118
|
+
payload: zod_1.z.string(),
|
|
119
|
+
receivedAt: zod_1.z.string(),
|
|
120
|
+
connection: exports.CommandPendingConnectionSchema,
|
|
121
|
+
});
|
|
109
122
|
exports.CommandSendResultSchema = zod_1.z.object({
|
|
110
123
|
sequenceNumber: zod_1.z.number().int(),
|
|
111
124
|
commandId: zod_1.z.number().int(),
|
|
112
|
-
kind: zod_1.z.string(),
|
|
113
125
|
acceptedAt: zod_1.z.string(),
|
|
114
126
|
response: exports.CommandResponseSchema.optional()
|
|
115
127
|
});
|
|
128
|
+
exports.CommandReplyRequestSchema = zod_1.z.object({
|
|
129
|
+
remoteRequestId: zod_1.z.number().int(),
|
|
130
|
+
commandId: zod_1.z.number().int(),
|
|
131
|
+
payloadEncoding: zod_1.z.string(),
|
|
132
|
+
payload: zod_1.z.string(),
|
|
133
|
+
});
|
|
134
|
+
exports.CommandReplyResultSchema = zod_1.z.object({
|
|
135
|
+
remoteRequestId: zod_1.z.number().int(),
|
|
136
|
+
commandId: zod_1.z.number().int(),
|
|
137
|
+
repliedAt: zod_1.z.string(),
|
|
138
|
+
});
|
|
139
|
+
exports.CommandPendingListRequestSchema = zod_1.z.object({}).passthrough();
|
|
140
|
+
exports.CommandPendingListResultSchema = zod_1.z.object({
|
|
141
|
+
items: zod_1.z.array(exports.CommandPendingEntrySchema),
|
|
142
|
+
listedAt: zod_1.z.string(),
|
|
143
|
+
});
|
|
116
144
|
exports.ErrorSummarySchema = zod_1.z.object({
|
|
117
145
|
reasonCode: zod_1.z.string(),
|
|
118
146
|
message: zod_1.z.string(),
|
|
@@ -179,11 +207,8 @@ exports.OutputAttachRequestSchema = zod_1.z.object({
|
|
|
179
207
|
});
|
|
180
208
|
exports.CommandSendRequestSchema = zod_1.z.object({
|
|
181
209
|
commandId: zod_1.z.number().int(),
|
|
182
|
-
kind: zod_1.z.string(),
|
|
183
210
|
payloadEncoding: zod_1.z.string(),
|
|
184
211
|
payload: zod_1.z.string(),
|
|
185
|
-
replyToSequenceNumber: zod_1.z.number().int().optional(),
|
|
186
|
-
awaitResponse: zod_1.z.boolean().optional(),
|
|
187
212
|
timeoutMs: zod_1.z.number().int().optional()
|
|
188
213
|
});
|
|
189
214
|
exports.EventsSubscribeRequestSchema = zod_1.z.object({
|