simcast-host 0.0.0-stage → 0.9.1
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/LICENSE +21 -0
- package/README.md +72 -2
- package/bin/simcast-host.js +11 -0
- package/package.json +28 -4
- package/proto/idb.proto +1816 -0
- package/src/agent/admin.js +87 -0
- package/src/agent/awake.js +136 -0
- package/src/agent/bonjour.js +172 -0
- package/src/agent/build.js +24 -0
- package/src/agent/checks.js +618 -0
- package/src/agent/clean.js +419 -0
- package/src/agent/cli.js +617 -0
- package/src/agent/clients.js +475 -0
- package/src/agent/exec.js +163 -0
- package/src/agent/live.js +709 -0
- package/src/agent/macinfo.js +75 -0
- package/src/agent/pairing.js +123 -0
- package/src/agent/paths.js +23 -0
- package/src/agent/recipes/expo.js +134 -0
- package/src/agent/recipes/index.js +66 -0
- package/src/agent/recipes/kit.js +124 -0
- package/src/agent/record.js +133 -0
- package/src/agent/runtime.js +166 -0
- package/src/agent/screen.js +285 -0
- package/src/agent/server.js +577 -0
- package/src/agent/service.js +119 -0
- package/src/agent/setup.js +283 -0
- package/src/agent/sim.js +129 -0
- package/src/agent/stalls.js +32 -0
- package/src/agent/state.js +121 -0
- package/src/agent/tunnel.js +464 -0
- package/src/common.js +119 -0
package/proto/idb.proto
ADDED
|
@@ -0,0 +1,1816 @@
|
|
|
1
|
+
// Vendored from https://github.com/facebook/idb/blob/main/proto/idb.proto (MIT License, Copyright (c) Meta Platforms, Inc. and affiliates).
|
|
2
|
+
// simcast uses the describe, video_stream, hid, open_url and screenshot RPCs.
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
syntax = "proto3";
|
|
11
|
+
|
|
12
|
+
package idb;
|
|
13
|
+
|
|
14
|
+
// The idb companion service definition.
|
|
15
|
+
service CompanionService {
|
|
16
|
+
// Management
|
|
17
|
+
rpc connect(ConnectRequest) returns (ConnectResponse) {}
|
|
18
|
+
rpc debugserver(stream DebugServerRequest)
|
|
19
|
+
returns (stream DebugServerResponse) {}
|
|
20
|
+
rpc dap(stream DapRequest) returns (stream DapResponse) {}
|
|
21
|
+
rpc forward_port(stream ForwardPortRequest)
|
|
22
|
+
returns (stream ForwardPortResponse) {}
|
|
23
|
+
rpc describe(TargetDescriptionRequest) returns (TargetDescriptionResponse) {}
|
|
24
|
+
rpc install(stream InstallRequest) returns (stream InstallResponse) {}
|
|
25
|
+
rpc log(LogRequest) returns (stream LogResponse) {}
|
|
26
|
+
rpc xctrace_record(stream XctraceRecordRequest)
|
|
27
|
+
returns (stream XctraceRecordResponse) {}
|
|
28
|
+
rpc profile(stream ProfileRequest) returns (stream ProfileResponse) {}
|
|
29
|
+
// Interaction
|
|
30
|
+
rpc accessibility_info(AccessibilityInfoRequest)
|
|
31
|
+
returns (AccessibilityInfoResponse) {}
|
|
32
|
+
rpc accessibility_action(AccessibilityActionRequest)
|
|
33
|
+
returns (AccessibilityActionResponse) {}
|
|
34
|
+
rpc accessibility_quiescence(AccessibilityQuiescenceRequest)
|
|
35
|
+
returns (stream AccessibilityQuiescenceResponse) {}
|
|
36
|
+
rpc focus(FocusRequest) returns (FocusResponse) {}
|
|
37
|
+
rpc get_orientation(GetOrientationRequest) returns (GetOrientationResponse) {}
|
|
38
|
+
rpc set_orientation(SetOrientationRequest) returns (SetOrientationResponse) {}
|
|
39
|
+
rpc hinge_angle(HingeAngleRequest) returns (HingeAngleResponse) {}
|
|
40
|
+
rpc hid(stream HIDEvent) returns (HIDResponse) {}
|
|
41
|
+
rpc open_url(OpenUrlRequest) returns (OpenUrlRequest) {}
|
|
42
|
+
rpc set_location(SetLocationRequest) returns (SetLocationResponse) {}
|
|
43
|
+
rpc send_notification(SendNotificationRequest)
|
|
44
|
+
returns (SendNotificationResponse) {}
|
|
45
|
+
rpc delivered_notifications(DeliveredNotificationsRequest)
|
|
46
|
+
returns (DeliveredNotificationsResponse) {}
|
|
47
|
+
rpc clear_delivered_notifications(ClearDeliveredNotificationsRequest)
|
|
48
|
+
returns (ClearDeliveredNotificationsResponse) {}
|
|
49
|
+
rpc simulate_memory_warning(SimulateMemoryWarningRequest)
|
|
50
|
+
returns (SimulateMemoryWarningResponse) {}
|
|
51
|
+
// Settings
|
|
52
|
+
rpc approve(ApproveRequest) returns (ApproveResponse) {}
|
|
53
|
+
rpc revoke(RevokeRequest) returns (RevokeResponse) {}
|
|
54
|
+
rpc clear_keychain(ClearKeychainRequest) returns (ClearKeychainResponse) {}
|
|
55
|
+
rpc contacts_update(ContactsUpdateRequest) returns (ContactsUpdateResponse) {}
|
|
56
|
+
rpc contacts_clear(ContactsClearRequest) returns (ContactsClearResponse) {}
|
|
57
|
+
rpc photos_clear(PhotosClearRequest) returns (PhotosClearResponse) {}
|
|
58
|
+
rpc setting(SettingRequest) returns (SettingResponse) {} // Sets settings
|
|
59
|
+
rpc get_setting(GetSettingRequest) returns (GetSettingResponse) {
|
|
60
|
+
} // Gets current setting
|
|
61
|
+
rpc list_settings(ListSettingRequest) returns (ListSettingResponse) {
|
|
62
|
+
} // Lists available settings
|
|
63
|
+
// App
|
|
64
|
+
rpc launch(stream LaunchRequest) returns (stream LaunchResponse) {}
|
|
65
|
+
rpc list_apps(ListAppsRequest) returns (ListAppsResponse) {}
|
|
66
|
+
rpc terminate(TerminateRequest) returns (TerminateResponse) {}
|
|
67
|
+
rpc uninstall(UninstallRequest) returns (UninstallResponse) {}
|
|
68
|
+
// Video/Audio
|
|
69
|
+
rpc add_media(stream AddMediaRequest) returns (AddMediaResponse) {}
|
|
70
|
+
rpc inject_audio(stream InjectAudioRequest) returns (InjectAudioResponse) {}
|
|
71
|
+
rpc record(stream RecordRequest) returns (stream RecordResponse) {}
|
|
72
|
+
rpc screenshot(ScreenshotRequest) returns (ScreenshotResponse) {}
|
|
73
|
+
rpc video_stream(stream VideoStreamRequest)
|
|
74
|
+
returns (stream VideoStreamResponse) {}
|
|
75
|
+
// Crash Operations
|
|
76
|
+
rpc crash_delete(CrashLogQuery) returns (CrashLogResponse) {}
|
|
77
|
+
rpc crash_list(CrashLogQuery) returns (CrashLogResponse) {}
|
|
78
|
+
rpc crash_show(CrashShowRequest) returns (CrashShowResponse) {}
|
|
79
|
+
// xctest operations
|
|
80
|
+
rpc xctest_list_bundles(XctestListBundlesRequest)
|
|
81
|
+
returns (XctestListBundlesResponse) {}
|
|
82
|
+
rpc xctest_list_tests(XctestListTestsRequest)
|
|
83
|
+
returns (XctestListTestsResponse) {}
|
|
84
|
+
rpc xctest_run(XctestRunRequest) returns (stream XctestRunResponse) {}
|
|
85
|
+
rpc repl(stream ReplRequest) returns (stream ReplResponse) {}
|
|
86
|
+
// File Operations
|
|
87
|
+
rpc ls(LsRequest) returns (LsResponse) {}
|
|
88
|
+
rpc mkdir(MkdirRequest) returns (MkdirResponse) {}
|
|
89
|
+
rpc mv(MvRequest) returns (MvResponse) {}
|
|
90
|
+
rpc rm(RmRequest) returns (RmResponse) {}
|
|
91
|
+
rpc pull(PullRequest) returns (stream PullResponse) {}
|
|
92
|
+
rpc push(stream PushRequest) returns (PushResponse) {}
|
|
93
|
+
rpc tail(stream TailRequest) returns (stream TailResponse) {}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// One RPC opens one connection to the companion's selected physical device.
|
|
97
|
+
// The first request must be Open. Subsequent requests are opaque byte chunks,
|
|
98
|
+
// each at most 64 KiB. Client stream completion flushes accepted writes and
|
|
99
|
+
// starts a bounded response drain before closing the device connection.
|
|
100
|
+
message ForwardPortRequest {
|
|
101
|
+
message Open {
|
|
102
|
+
uint32 port = 1; // 1...65535
|
|
103
|
+
}
|
|
104
|
+
oneof event {
|
|
105
|
+
Open open = 1;
|
|
106
|
+
bytes data = 2;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message ForwardPortResponse {
|
|
111
|
+
message Opened {}
|
|
112
|
+
// Opened acknowledges a successful device connection. Response stream
|
|
113
|
+
// completion ends the connection. Empty data is not EOF.
|
|
114
|
+
// Final non-OK status means the connection failed;
|
|
115
|
+
// interrupted connections must not be automatically reopened or replayed.
|
|
116
|
+
oneof event {
|
|
117
|
+
Opened opened = 1;
|
|
118
|
+
bytes data = 2;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
message GetOrientationRequest {}
|
|
123
|
+
|
|
124
|
+
message GetOrientationResponse {
|
|
125
|
+
enum Orientation {
|
|
126
|
+
UNKNOWN = 0;
|
|
127
|
+
PORTRAIT = 1;
|
|
128
|
+
PORTRAIT_UPSIDE_DOWN = 2;
|
|
129
|
+
LANDSCAPE_LEFT = 3;
|
|
130
|
+
LANDSCAPE_RIGHT = 4;
|
|
131
|
+
FACE_UP = 5;
|
|
132
|
+
FACE_DOWN = 6;
|
|
133
|
+
}
|
|
134
|
+
// Physical device orientation, independent of application interface rotation.
|
|
135
|
+
Orientation orientation = 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
message SetOrientationRequest {
|
|
139
|
+
// Physical landscape directions; legacy HID orientation encoding is
|
|
140
|
+
// unchanged.
|
|
141
|
+
HIDEvent.HIDOrientationType orientation = 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message SetOrientationResponse {}
|
|
145
|
+
|
|
146
|
+
message HingeAngleRequest {}
|
|
147
|
+
|
|
148
|
+
message HingeAngleResponse {
|
|
149
|
+
// A fresh measured hinge angle in degrees, from 0 (closed) to 180 (flat).
|
|
150
|
+
double angle = 1;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
message Payload {
|
|
154
|
+
oneof source {
|
|
155
|
+
string file_path = 1;
|
|
156
|
+
bytes data = 2;
|
|
157
|
+
string url = 3;
|
|
158
|
+
// Declares how the payload that follows is compressed. It is a frame of
|
|
159
|
+
// its own, sent before that payload; without one the payload is GZIP.
|
|
160
|
+
Compression compression = 4;
|
|
161
|
+
}
|
|
162
|
+
enum Compression {
|
|
163
|
+
GZIP = 0;
|
|
164
|
+
ZSTD = 1;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
message ProcessOutput {
|
|
169
|
+
enum Interface {
|
|
170
|
+
STDOUT = 0;
|
|
171
|
+
STDERR = 1;
|
|
172
|
+
}
|
|
173
|
+
Interface interface = 1;
|
|
174
|
+
bytes data = 2;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
message CompanionInfo {
|
|
178
|
+
string udid = 1;
|
|
179
|
+
bool is_local = 4;
|
|
180
|
+
bytes metadata = 6;
|
|
181
|
+
// The compressions the companion can extract an app stream from. Companions
|
|
182
|
+
// that predate this field leave it empty, and only extract GZIP.
|
|
183
|
+
repeated Payload.Compression supported_compressions = 7;
|
|
184
|
+
// Whether the companion can install a zstd compressed zip app stream. The
|
|
185
|
+
// stream starts with a zstd skippable frame whose magic is 0x184D2A5E and
|
|
186
|
+
// whose 8 byte content is "idb-zip\0", which tells it apart from a
|
|
187
|
+
// compressed tar. Companions without this must be sent the zip as is.
|
|
188
|
+
bool zstd_zip_streams = 8;
|
|
189
|
+
// The destinations whose stream the companion reads as a zip, or as a zstd
|
|
190
|
+
// compressed zip if zstd_zip_streams is set, telling it apart from a tar by
|
|
191
|
+
// its first bytes. Companions that predate this field leave it empty, and
|
|
192
|
+
// read only an app stream as a zip.
|
|
193
|
+
repeated InstallRequest.Destination zip_stream_destinations = 9;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
enum Setting {
|
|
197
|
+
LOCALE = 0;
|
|
198
|
+
ANY = 1; // any kind of app or global setting
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
message SettingRequest {
|
|
202
|
+
message HardwareKeyboard {
|
|
203
|
+
bool enabled = 1;
|
|
204
|
+
}
|
|
205
|
+
message StringSetting {
|
|
206
|
+
Setting setting = 1;
|
|
207
|
+
string value = 2;
|
|
208
|
+
string name = 3; // iff setting == ANY
|
|
209
|
+
string domain = 4; // assumed "Apple Global Domain" if empty
|
|
210
|
+
/*
|
|
211
|
+
* Currently supported value_types and corresponding values are:
|
|
212
|
+
* string <string_value>
|
|
213
|
+
* data <hex_digits>
|
|
214
|
+
* int[eger] <integer_value>
|
|
215
|
+
* float <floating-point_value>
|
|
216
|
+
* bool[ean] (true | false | yes | no)
|
|
217
|
+
* date <date_rep>
|
|
218
|
+
* array <value1> <value2> ...
|
|
219
|
+
* array-add <value1> <value2> ...
|
|
220
|
+
* dict <key1> <value1> <key2> <value2> ...
|
|
221
|
+
* dict-add <key1> <value1> ...
|
|
222
|
+
*
|
|
223
|
+
* Check defaults set help for more details.
|
|
224
|
+
*/
|
|
225
|
+
string value_type = 5;
|
|
226
|
+
}
|
|
227
|
+
oneof setting {
|
|
228
|
+
HardwareKeyboard hardwareKeyboard = 1;
|
|
229
|
+
StringSetting stringSetting = 2;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
message SettingResponse {}
|
|
234
|
+
|
|
235
|
+
message GetSettingRequest {
|
|
236
|
+
Setting setting = 1;
|
|
237
|
+
string name = 2; // iff setting == ANY
|
|
238
|
+
string domain = 3; // assumed "Apple Global Domain" if empty
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
message GetSettingResponse {
|
|
242
|
+
string value = 1;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
message ListSettingRequest {
|
|
246
|
+
Setting setting = 1;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
message ListSettingResponse {
|
|
250
|
+
repeated string values = 1;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
message ListAppsRequest {
|
|
254
|
+
bool suppress_process_state = 1;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
message ListAppsResponse {
|
|
258
|
+
repeated InstalledAppInfo apps = 1;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
message InstalledAppInfo {
|
|
262
|
+
string bundle_id = 1;
|
|
263
|
+
string name = 2;
|
|
264
|
+
repeated string architectures = 3;
|
|
265
|
+
string install_type = 4;
|
|
266
|
+
enum AppProcessState {
|
|
267
|
+
UNKNOWN = 0;
|
|
268
|
+
NOT_RUNNING = 1;
|
|
269
|
+
RUNNING = 2;
|
|
270
|
+
}
|
|
271
|
+
AppProcessState process_state = 5;
|
|
272
|
+
bool debuggable = 6;
|
|
273
|
+
uint64 process_identifier = 7;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
message InstallRequest {
|
|
277
|
+
enum Destination {
|
|
278
|
+
APP = 0;
|
|
279
|
+
XCTEST = 1;
|
|
280
|
+
DYLIB = 2;
|
|
281
|
+
DSYM = 3;
|
|
282
|
+
FRAMEWORK = 4;
|
|
283
|
+
}
|
|
284
|
+
message LinkDsymToBundle {
|
|
285
|
+
enum BundleType {
|
|
286
|
+
APP = 0;
|
|
287
|
+
XCTEST = 1;
|
|
288
|
+
}
|
|
289
|
+
BundleType bundle_type = 1;
|
|
290
|
+
string bundle_id = 2;
|
|
291
|
+
}
|
|
292
|
+
// 5 was `bundle_id`, the form link_dsym_to_bundle replaced.
|
|
293
|
+
reserved 5;
|
|
294
|
+
reserved "bundle_id";
|
|
295
|
+
// An install is a stream of frames: the destination first, then each option
|
|
296
|
+
// at most once, then the payload. A data payload continues across as many
|
|
297
|
+
// frames as it needs. The compression frame counts as an option.
|
|
298
|
+
//
|
|
299
|
+
// Current companions accept the options in any order and reject a repeated
|
|
300
|
+
// one. Older companions accept only this order: name_hint, make_debuggable,
|
|
301
|
+
// override_modification_time, skip_signing_bundles, link_dsym_to_bundle,
|
|
302
|
+
// compression. Clients send that order so they work with either.
|
|
303
|
+
oneof value {
|
|
304
|
+
Destination destination = 1;
|
|
305
|
+
Payload payload = 2;
|
|
306
|
+
string name_hint = 3;
|
|
307
|
+
bool make_debuggable = 4;
|
|
308
|
+
LinkDsymToBundle link_dsym_to_bundle = 6;
|
|
309
|
+
bool override_modification_time = 7;
|
|
310
|
+
bool skip_signing_bundles = 8;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
message InstallResponse {
|
|
315
|
+
// Set on the final response, once the artifact is installed.
|
|
316
|
+
string name = 1;
|
|
317
|
+
string uuid = 2;
|
|
318
|
+
// An intermediate response: how much of a URL install's download has
|
|
319
|
+
// arrived, as a whole-number percentage from 0 to 100. Only rises, and only
|
|
320
|
+
// sent for apps whose download states its length; clients treat any response
|
|
321
|
+
// with a name as the installed artifact.
|
|
322
|
+
double progress = 3;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
message ScreenshotRequest {
|
|
326
|
+
enum Format {
|
|
327
|
+
PNG = 0;
|
|
328
|
+
JPEG = 1;
|
|
329
|
+
TIFF = 2;
|
|
330
|
+
}
|
|
331
|
+
// The unit that `crop` and `fit` are expressed in. POINTS is the coordinate
|
|
332
|
+
// space that tap, swipe and describe already use; it is resolved to pixels
|
|
333
|
+
// on the companion, which is the only side that knows the screen scale.
|
|
334
|
+
enum Unit {
|
|
335
|
+
PIXELS = 0;
|
|
336
|
+
POINTS = 1;
|
|
337
|
+
}
|
|
338
|
+
// Top-left origin, matching the tap/swipe coordinate space. A rect that
|
|
339
|
+
// partially overhangs the screen is clamped; the response reports the
|
|
340
|
+
// dimensions actually captured.
|
|
341
|
+
message Rect {
|
|
342
|
+
double x = 1;
|
|
343
|
+
double y = 2;
|
|
344
|
+
double width = 3;
|
|
345
|
+
double height = 4;
|
|
346
|
+
}
|
|
347
|
+
// Bounding box the image is scaled to fit inside. One factor is applied to
|
|
348
|
+
// both axes and the image is never upscaled, so the aspect ratio is
|
|
349
|
+
// preserved to within the rounding of each side to a whole pixel -- a few
|
|
350
|
+
// percent on a very small image. 0 means "unbounded" on that axis; when both
|
|
351
|
+
// are set, the more restrictive bound wins.
|
|
352
|
+
message Fit {
|
|
353
|
+
uint32 max_width = 1;
|
|
354
|
+
uint32 max_height = 2;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
Format format = 1;
|
|
358
|
+
// Lossy formats only; 0 means "server default" (0.8), as in
|
|
359
|
+
// VideoStreamRequest. Setting this on PNG or TIFF is an INVALID_ARGUMENT
|
|
360
|
+
// error rather than a no-op.
|
|
361
|
+
double compression_quality = 2;
|
|
362
|
+
// Unset captures the full screen.
|
|
363
|
+
Rect crop = 3;
|
|
364
|
+
// Transforms are applied crop -> scale -> encode, so the scaler never
|
|
365
|
+
// touches pixels that are about to be discarded.
|
|
366
|
+
oneof scale {
|
|
367
|
+
// In (0, 1].
|
|
368
|
+
double scale_factor = 4;
|
|
369
|
+
Fit fit = 5;
|
|
370
|
+
}
|
|
371
|
+
Unit unit = 6;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
message ScreenshotResponse {
|
|
375
|
+
// Pixels. A measurement is never legitimately 0, so 0 on either axis is the
|
|
376
|
+
// companion saying it did not report one rather than an image of no height.
|
|
377
|
+
message Size {
|
|
378
|
+
uint32 width = 1;
|
|
379
|
+
uint32 height = 2;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
bytes image_data = 1;
|
|
383
|
+
// One of "png", "jpeg" or "tiff". Declared since this message was written
|
|
384
|
+
// but never populated before the request gained fields. A companion that
|
|
385
|
+
// leaves this empty predates that change and has silently ignored every
|
|
386
|
+
// field of ScreenshotRequest.
|
|
387
|
+
string image_format = 2;
|
|
388
|
+
// Dimensions of image_data, after crop and scale.
|
|
389
|
+
Size destination = 3;
|
|
390
|
+
// Dimensions of the native capture, before crop and scale.
|
|
391
|
+
Size source = 4;
|
|
392
|
+
// Pixels per point, so a client can convert between the two units itself.
|
|
393
|
+
// 0 when the target does not report a screen scale, which is also when a
|
|
394
|
+
// request in POINTS is rejected.
|
|
395
|
+
double screen_scale = 5;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
message FocusRequest {}
|
|
399
|
+
|
|
400
|
+
message FocusResponse {}
|
|
401
|
+
|
|
402
|
+
message Point {
|
|
403
|
+
double x = 1;
|
|
404
|
+
double y = 2;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
message AccessibilityInfoRequest {
|
|
408
|
+
enum Format {
|
|
409
|
+
LEGACY = 0;
|
|
410
|
+
NESTED = 1;
|
|
411
|
+
// A consolidated document: the element tree plus the read's provenance
|
|
412
|
+
// (which backend served it, what was asked, screen bounds, truncation,
|
|
413
|
+
// any blocking modal). An older server does not recognize this value and
|
|
414
|
+
// falls back to LEGACY — a caller can detect that by the response shape.
|
|
415
|
+
COMPLETE = 2;
|
|
416
|
+
}
|
|
417
|
+
// Which backend serves the read. UNSPECIFIED preserves the historical
|
|
418
|
+
// behaviour, so an older client — or one that does not ask — is unaffected;
|
|
419
|
+
// an older server ignores this field entirely and serves the read as if it
|
|
420
|
+
// were unset.
|
|
421
|
+
enum Backend {
|
|
422
|
+
BACKEND_UNSPECIFIED = 0;
|
|
423
|
+
AX = 1;
|
|
424
|
+
AXBRIDGE = 2;
|
|
425
|
+
AXBRIDGE_PERSISTENT = 3;
|
|
426
|
+
// The host translation sent through CoreSimulator's own accessibility
|
|
427
|
+
// client rather than idb's connection to CoreSimulatorBridge. An older
|
|
428
|
+
// server does not recognize it and serves the read as if it were unset.
|
|
429
|
+
AX_CORESIMULATOR = 4;
|
|
430
|
+
}
|
|
431
|
+
Point point = 2;
|
|
432
|
+
Format format = 3;
|
|
433
|
+
// Optional: describe a single element by marker (substring match against
|
|
434
|
+
// match_key, within depth) instead of by point / the whole screen.
|
|
435
|
+
string marker = 4;
|
|
436
|
+
AccessibilityActionRequest.SearchableKey match_key = 5;
|
|
437
|
+
uint32 depth = 6;
|
|
438
|
+
// Restricts the described accessibility keys to this set; an empty list
|
|
439
|
+
// returns the default key set.
|
|
440
|
+
repeated string keys = 7;
|
|
441
|
+
Backend backend = 8;
|
|
442
|
+
// Collect element counts and timings for the read. Reported by the COMPLETE
|
|
443
|
+
// format only; the legacy formats collect but have nowhere to report, so
|
|
444
|
+
// their output is unchanged.
|
|
445
|
+
bool profile = 9;
|
|
446
|
+
// Collect upper-region frame coverage for the read. Reported by the
|
|
447
|
+
// COMPLETE format only, like profile.
|
|
448
|
+
bool collect_frame_coverage = 10;
|
|
449
|
+
// Which elements the read reports. FILTER_ALL is the historical behaviour,
|
|
450
|
+
// so an older client — or one that does not ask — is unaffected.
|
|
451
|
+
enum Filter {
|
|
452
|
+
FILTER_ALL = 0;
|
|
453
|
+
// Only the elements a caller could actually interact with.
|
|
454
|
+
FILTER_INTERACTABLE = 1;
|
|
455
|
+
}
|
|
456
|
+
// Report only the elements whose match_key value contains this substring;
|
|
457
|
+
// empty reports every element, which is the historical behaviour. Unlike
|
|
458
|
+
// marker, which selects the first matching element and only it, match
|
|
459
|
+
// reports all of them and finding none is an empty result rather than an
|
|
460
|
+
// error. Setting both marker and match is INVALID_ARGUMENT.
|
|
461
|
+
string match = 11;
|
|
462
|
+
// Compare match — and, on a marker read, marker — case-insensitively.
|
|
463
|
+
bool ignore_case = 12;
|
|
464
|
+
Filter filter = 13;
|
|
465
|
+
// The assistive client the read claims to be, which decides what the
|
|
466
|
+
// application answers with: the automation tree (every container and
|
|
467
|
+
// identifier, as XCUITest sees it) for the automation clients, the flattened
|
|
468
|
+
// tree VoiceOver reads for the rest. UNSPECIFIED claims no client, the
|
|
469
|
+
// historical behaviour, so an older client is unaffected; an older server
|
|
470
|
+
// ignores this field. These numbers are not the accessibility translator's
|
|
471
|
+
// own values; the companion maps each one by name.
|
|
472
|
+
enum ClientType {
|
|
473
|
+
CLIENT_TYPE_UNSPECIFIED = 0;
|
|
474
|
+
CLIENT_TYPE_NO_CLIENT = 1;
|
|
475
|
+
CLIENT_TYPE_UNIDENTIFIED = 2;
|
|
476
|
+
// Automation clients.
|
|
477
|
+
CLIENT_TYPE_APPLICATION = 3;
|
|
478
|
+
CLIENT_TYPE_XCODE_HELPER = 4;
|
|
479
|
+
CLIENT_TYPE_XCTEST = 5;
|
|
480
|
+
CLIENT_TYPE_SCRIPTER = 6;
|
|
481
|
+
CLIENT_TYPE_SYSTEM_EVENTS = 7;
|
|
482
|
+
// Assistive technologies.
|
|
483
|
+
CLIENT_TYPE_VOICE_OVER = 8;
|
|
484
|
+
CLIENT_TYPE_SWITCH_CONTROL = 9;
|
|
485
|
+
CLIENT_TYPE_FULL_KEYBOARD_ACCESS = 10;
|
|
486
|
+
CLIENT_TYPE_VOICE_CONTROL = 11;
|
|
487
|
+
CLIENT_TYPE_ACCESSIBILITY_INSPECTOR = 12;
|
|
488
|
+
}
|
|
489
|
+
ClientType client_type = 14;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
message AccessibilityInfoResponse {
|
|
493
|
+
string json = 1;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
message AccessibilityActionRequest {
|
|
497
|
+
enum SearchableKey {
|
|
498
|
+
LABEL = 0;
|
|
499
|
+
UNIQUE_ID = 1;
|
|
500
|
+
VALUE = 2;
|
|
501
|
+
TITLE = 3;
|
|
502
|
+
ROLE = 4;
|
|
503
|
+
ROLE_DESCRIPTION = 5;
|
|
504
|
+
SUBROLE = 6;
|
|
505
|
+
HELP = 7;
|
|
506
|
+
PLACEHOLDER = 8;
|
|
507
|
+
}
|
|
508
|
+
// No target means the frontmost application element.
|
|
509
|
+
oneof target {
|
|
510
|
+
string marker = 1;
|
|
511
|
+
Point point = 2;
|
|
512
|
+
}
|
|
513
|
+
SearchableKey match_key = 3;
|
|
514
|
+
uint32 depth = 4;
|
|
515
|
+
// Compare a marker — the source and, on a drag, the destination —
|
|
516
|
+
// case-insensitively. Absent on an older client, which matches
|
|
517
|
+
// case-sensitively as before.
|
|
518
|
+
bool ignore_case = 9;
|
|
519
|
+
// Which backend serves the action, for every action including wait.
|
|
520
|
+
// UNSPECIFIED preserves the historical behaviour, so an older client — or
|
|
521
|
+
// one that does not ask — is unaffected; an older server ignores this field
|
|
522
|
+
// entirely and acts as if it were unset.
|
|
523
|
+
AccessibilityInfoRequest.Backend backend = 11;
|
|
524
|
+
|
|
525
|
+
message Tap {
|
|
526
|
+
bool check_expected_value = 1;
|
|
527
|
+
string expected_value = 2;
|
|
528
|
+
SearchableKey expected_key = 3;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
message Scroll {
|
|
532
|
+
enum Direction {
|
|
533
|
+
UP = 0;
|
|
534
|
+
DOWN = 1;
|
|
535
|
+
LEFT = 2;
|
|
536
|
+
RIGHT = 3;
|
|
537
|
+
VISIBLE = 4;
|
|
538
|
+
}
|
|
539
|
+
Direction direction = 1;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
message SetValue {
|
|
543
|
+
string value = 1;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// Press and hold the request's target, drag to the destination below, and
|
|
547
|
+
// release. All durations are in seconds; a zero value means the server
|
|
548
|
+
// default noted against each field.
|
|
549
|
+
message Drag {
|
|
550
|
+
// A destination is required; unlike the source, it has no frontmost
|
|
551
|
+
// default.
|
|
552
|
+
oneof destination {
|
|
553
|
+
string marker = 1;
|
|
554
|
+
Point point = 2;
|
|
555
|
+
}
|
|
556
|
+
SearchableKey destination_match_key = 3;
|
|
557
|
+
uint32 destination_depth = 4;
|
|
558
|
+
// How long to hold the source before moving. Default 0.5.
|
|
559
|
+
double press_duration = 5;
|
|
560
|
+
// How long the movement itself takes. Default 0.5.
|
|
561
|
+
double duration = 6;
|
|
562
|
+
// How long to hold the destination before releasing. Default 0.1.
|
|
563
|
+
double release_duration = 7;
|
|
564
|
+
// Distance between interpolated touch points, in points. Default 10.
|
|
565
|
+
double delta = 8;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
message Wait {
|
|
569
|
+
double timeout = 1;
|
|
570
|
+
double poll_interval = 2;
|
|
571
|
+
// Superseded by AccessibilityActionRequest.backend, which every action
|
|
572
|
+
// shares. Still read when that field is unset, so a client older than it
|
|
573
|
+
// keeps selecting a backend for wait.
|
|
574
|
+
AccessibilityInfoRequest.Backend backend = 3 [ deprecated = true ];
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
oneof action {
|
|
578
|
+
Wait wait = 10;
|
|
579
|
+
Tap tap = 5;
|
|
580
|
+
Scroll scroll = 6;
|
|
581
|
+
SetValue set_value = 7;
|
|
582
|
+
Drag drag = 8;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
message AccessibilityActionResponse {
|
|
587
|
+
enum WaitResult {
|
|
588
|
+
UNSPECIFIED = 0;
|
|
589
|
+
FOUND = 1;
|
|
590
|
+
TIMED_OUT = 2;
|
|
591
|
+
}
|
|
592
|
+
WaitResult wait_result = 1;
|
|
593
|
+
|
|
594
|
+
message WaitResponse {
|
|
595
|
+
WaitResult result = 1;
|
|
596
|
+
string message = 2;
|
|
597
|
+
// Absent when the backend does not supply diagnostics. An empty message
|
|
598
|
+
// with no read_error means the final read found no values for the key.
|
|
599
|
+
WaitDiagnostics diagnostics = 3;
|
|
600
|
+
}
|
|
601
|
+
// New companions populate both fields. Clients use wait_result when wait
|
|
602
|
+
// is absent, as it is on older companions.
|
|
603
|
+
WaitResponse wait = 2;
|
|
604
|
+
|
|
605
|
+
message WaitDiagnostics {
|
|
606
|
+
// Nonmatching values of the searched key from the final poll only.
|
|
607
|
+
repeated string unmatched_values = 1;
|
|
608
|
+
bool truncated = 2;
|
|
609
|
+
string read_error = 3;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
// Streams an application's quiescence until the client cancels or the
|
|
614
|
+
// application exits. Simulator targets on the AXBRIDGE backend only.
|
|
615
|
+
message AccessibilityQuiescenceRequest {
|
|
616
|
+
// No target follows the frontmost application.
|
|
617
|
+
oneof target {
|
|
618
|
+
uint64 pid = 1;
|
|
619
|
+
string bundle_id = 2;
|
|
620
|
+
}
|
|
621
|
+
// Each tunable is in its own oneof for presence, since zero is a meaningful
|
|
622
|
+
// value: unset takes the companion's default.
|
|
623
|
+
oneof busy_threshold {
|
|
624
|
+
// How long a signal may go unanswered before the application is busy.
|
|
625
|
+
uint32 busy_threshold_ms = 3;
|
|
626
|
+
}
|
|
627
|
+
oneof quiet_window {
|
|
628
|
+
// How long every signal must stay answered before the application is
|
|
629
|
+
// quiet.
|
|
630
|
+
uint32 quiet_window_ms = 4;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
message AccessibilityQuiescenceResponse {
|
|
635
|
+
enum State {
|
|
636
|
+
STATE_UNSPECIFIED = 0;
|
|
637
|
+
BUSY = 1;
|
|
638
|
+
SETTLING = 2;
|
|
639
|
+
QUIET = 3;
|
|
640
|
+
}
|
|
641
|
+
enum Signal {
|
|
642
|
+
SIGNAL_UNSPECIFIED = 0;
|
|
643
|
+
RUN_LOOP_IDLE = 1;
|
|
644
|
+
ANIMATIONS_INACTIVE = 2;
|
|
645
|
+
}
|
|
646
|
+
// Sent once the state is known and then on every change.
|
|
647
|
+
message StateChanged {
|
|
648
|
+
State state = 1;
|
|
649
|
+
// The signals that have gone unanswered; set only when BUSY.
|
|
650
|
+
repeated Signal busy_signals = 2;
|
|
651
|
+
}
|
|
652
|
+
// A touch sequence finished. Informational: it does not change the state.
|
|
653
|
+
message TouchesCompleted {}
|
|
654
|
+
// A stream following the frontmost application moved to pid. Its state
|
|
655
|
+
// starts over.
|
|
656
|
+
message TargetChanged {}
|
|
657
|
+
// The application exited. The last response of the stream.
|
|
658
|
+
message TargetExited {}
|
|
659
|
+
|
|
660
|
+
// The application the event is about.
|
|
661
|
+
uint64 pid = 1;
|
|
662
|
+
oneof event {
|
|
663
|
+
StateChanged state = 2;
|
|
664
|
+
TouchesCompleted touches_completed = 3;
|
|
665
|
+
TargetChanged target_changed = 4;
|
|
666
|
+
TargetExited target_exited = 5;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
message ApproveRequest {
|
|
671
|
+
enum Permission {
|
|
672
|
+
PHOTOS = 0;
|
|
673
|
+
CAMERA = 1;
|
|
674
|
+
CONTACTS = 2;
|
|
675
|
+
URL = 3;
|
|
676
|
+
LOCATION = 4;
|
|
677
|
+
NOTIFICATION = 5;
|
|
678
|
+
MICROPHONE = 6;
|
|
679
|
+
}
|
|
680
|
+
string bundle_id = 1;
|
|
681
|
+
repeated Permission permissions = 2;
|
|
682
|
+
string scheme = 3;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
message ApproveResponse {}
|
|
686
|
+
|
|
687
|
+
message RevokeRequest {
|
|
688
|
+
enum Permission {
|
|
689
|
+
PHOTOS = 0;
|
|
690
|
+
CAMERA = 1;
|
|
691
|
+
CONTACTS = 2;
|
|
692
|
+
URL = 3;
|
|
693
|
+
LOCATION = 4;
|
|
694
|
+
NOTIFICATION = 5;
|
|
695
|
+
MICROPHONE = 6;
|
|
696
|
+
}
|
|
697
|
+
string bundle_id = 1;
|
|
698
|
+
repeated Permission permissions = 2;
|
|
699
|
+
string scheme = 3;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
message RevokeResponse {}
|
|
703
|
+
|
|
704
|
+
message ClearKeychainRequest {}
|
|
705
|
+
|
|
706
|
+
message ClearKeychainResponse {}
|
|
707
|
+
|
|
708
|
+
message SetLocationRequest {
|
|
709
|
+
Location location = 1;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
message Location {
|
|
713
|
+
double latitude = 1;
|
|
714
|
+
double longitude = 2;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
message SetLocationResponse {}
|
|
718
|
+
|
|
719
|
+
message UninstallRequest {
|
|
720
|
+
string bundle_id = 1;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
message UninstallResponse {}
|
|
724
|
+
|
|
725
|
+
message TerminateRequest {
|
|
726
|
+
string bundle_id = 1;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
message TerminateResponse {}
|
|
730
|
+
|
|
731
|
+
message OpenUrlRequest {
|
|
732
|
+
string url = 1;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
message OpenUrlResponse {}
|
|
736
|
+
|
|
737
|
+
message ContactsUpdateRequest {
|
|
738
|
+
Payload payload = 1;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
message ContactsUpdateResponse {}
|
|
742
|
+
|
|
743
|
+
message ContactsClearRequest {}
|
|
744
|
+
|
|
745
|
+
message ContactsClearResponse {}
|
|
746
|
+
|
|
747
|
+
message PhotosClearRequest {}
|
|
748
|
+
|
|
749
|
+
message PhotosClearResponse {}
|
|
750
|
+
|
|
751
|
+
message TargetDescriptionRequest {
|
|
752
|
+
bool fetch_diagnostics = 1;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
message TargetDescriptionResponse {
|
|
756
|
+
TargetDescription target_description = 1;
|
|
757
|
+
CompanionInfo companion = 2;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
message HIDEvent {
|
|
761
|
+
enum HIDDirection {
|
|
762
|
+
DOWN = 0;
|
|
763
|
+
UP = 1;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
message HIDTouch {
|
|
767
|
+
Point point = 1;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
enum HIDButtonType {
|
|
771
|
+
APPLE_PAY = 0;
|
|
772
|
+
HOME = 1;
|
|
773
|
+
LOCK = 2;
|
|
774
|
+
SIDE_BUTTON = 3;
|
|
775
|
+
SIRI = 4;
|
|
776
|
+
PLAY_PAUSE = 5;
|
|
777
|
+
VOLUME_UP = 6;
|
|
778
|
+
VOLUME_DOWN = 7;
|
|
779
|
+
EJECT = 8;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
message HIDButton {
|
|
783
|
+
HIDButtonType button = 1;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
message HIDKey {
|
|
787
|
+
uint64 keycode = 1;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
message HIDPressAction {
|
|
791
|
+
oneof action {
|
|
792
|
+
HIDTouch touch = 1;
|
|
793
|
+
HIDButton button = 2;
|
|
794
|
+
HIDKey key = 3;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
message HIDPress {
|
|
799
|
+
HIDPressAction action = 1;
|
|
800
|
+
HIDDirection direction = 2;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
message HIDSwipe {
|
|
804
|
+
Point start = 1;
|
|
805
|
+
Point end = 2;
|
|
806
|
+
double delta = 5;
|
|
807
|
+
double duration = 6;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
message HIDDelay {
|
|
811
|
+
double duration = 1;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
message HIDPinch {
|
|
815
|
+
Point center = 1;
|
|
816
|
+
double scale = 2;
|
|
817
|
+
double duration = 3;
|
|
818
|
+
double radius = 4;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
enum HIDOrientationType {
|
|
822
|
+
PORTRAIT = 0;
|
|
823
|
+
PORTRAIT_UPSIDE_DOWN = 1;
|
|
824
|
+
LANDSCAPE_LEFT = 2;
|
|
825
|
+
LANDSCAPE_RIGHT = 3;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
message HIDOrientation {
|
|
829
|
+
HIDOrientationType orientation = 1;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
message HIDShake {}
|
|
833
|
+
|
|
834
|
+
message HIDHinge {
|
|
835
|
+
// Degrees from 0 (closed) to 180 (flat), inclusive.
|
|
836
|
+
double angle = 1;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
// Experimental display-selection clients used field 7.
|
|
840
|
+
reserved 7;
|
|
841
|
+
|
|
842
|
+
oneof event {
|
|
843
|
+
HIDPress press = 1;
|
|
844
|
+
HIDSwipe swipe = 2;
|
|
845
|
+
HIDDelay delay = 3;
|
|
846
|
+
HIDPinch pinch = 4;
|
|
847
|
+
HIDOrientation orientation = 5;
|
|
848
|
+
HIDShake shake = 6;
|
|
849
|
+
HIDHinge hinge = 8;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
message HIDResponse {}
|
|
854
|
+
|
|
855
|
+
message ConnectRequest {
|
|
856
|
+
map<string, string> metadata = 1;
|
|
857
|
+
string local_file_path = 4;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
message ConnectResponse {
|
|
861
|
+
CompanionInfo companion = 1;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
message ScreenDimensions {
|
|
865
|
+
uint64 width = 1;
|
|
866
|
+
uint64 height = 2;
|
|
867
|
+
double density = 3;
|
|
868
|
+
uint64 width_points = 4;
|
|
869
|
+
uint64 height_points = 5;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
message TargetDescription {
|
|
873
|
+
string udid = 1;
|
|
874
|
+
string name = 2;
|
|
875
|
+
ScreenDimensions screen_dimensions = 3;
|
|
876
|
+
string state = 4;
|
|
877
|
+
string target_type = 5;
|
|
878
|
+
string os_version = 6;
|
|
879
|
+
string architecture = 7;
|
|
880
|
+
bytes extended = 9;
|
|
881
|
+
bytes diagnostics = 10;
|
|
882
|
+
// Every display a booted simulator reports. Empty for any other target, and
|
|
883
|
+
// from a companion that predates this field.
|
|
884
|
+
repeated Display displays = 11;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
message Display {
|
|
888
|
+
// Names this display in a video request.
|
|
889
|
+
string unique_id = 1;
|
|
890
|
+
// The runtime's name, which need not be readable: an iPhone Duo reports
|
|
891
|
+
// "LCD" for its cover display and "LCD-1" for its inner one.
|
|
892
|
+
string name = 2;
|
|
893
|
+
// Whether the guest is presenting on this display.
|
|
894
|
+
bool active = 3;
|
|
895
|
+
// Built into the device, rather than external or wireless.
|
|
896
|
+
bool integrated = 4;
|
|
897
|
+
// Pixels, in the current interface orientation.
|
|
898
|
+
uint64 width = 5;
|
|
899
|
+
uint64 height = 6;
|
|
900
|
+
double density = 7;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
message LogRequest {
|
|
904
|
+
enum Source {
|
|
905
|
+
TARGET = 0;
|
|
906
|
+
COMPANION = 1;
|
|
907
|
+
}
|
|
908
|
+
repeated string arguments = 1;
|
|
909
|
+
Source source = 2;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
message LogResponse {
|
|
913
|
+
bytes output = 1;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
message RecordRequest {
|
|
917
|
+
// Field names and numbers match VideoStreamRequest.Start, so the two read
|
|
918
|
+
// identically; 3 is skipped because that is the stream's `format` and a
|
|
919
|
+
// recording is always H.264 in an mp4. A zero value means the default noted
|
|
920
|
+
// against each field, since a proto3 scalar cannot distinguish unset from
|
|
921
|
+
// zero. A companion older than these fields ignores them and records at the
|
|
922
|
+
// defaults; see RecordResponse.Applied.
|
|
923
|
+
message Start {
|
|
924
|
+
// 3 is the stream's `format`, deliberately skipped here (see above).
|
|
925
|
+
// Reserve the tag and name so no future field can silently reuse them and
|
|
926
|
+
// collide with a wire-compatible client that ever sent a `format` value.
|
|
927
|
+
reserved 3;
|
|
928
|
+
reserved "format";
|
|
929
|
+
string file_path = 1;
|
|
930
|
+
// Capture cadence. Default 30 -- unlike the stream, whose default is the
|
|
931
|
+
// display's own rate. This is what FBSimulatorVideoRecordingCommands has
|
|
932
|
+
// always pinned, so an all-zero request records exactly as it did before.
|
|
933
|
+
uint64 fps = 2;
|
|
934
|
+
// Inert for H.264 and so not offered by the CLI; here for message
|
|
935
|
+
// symmetry. Must be in [0, 1], and cannot be combined with avg_bitrate.
|
|
936
|
+
double compression_quality = 4;
|
|
937
|
+
// Scale applied before encoding. Only a value in (0, 1) scales; default
|
|
938
|
+
// unset, which records at full size. Values above 1 are rejected.
|
|
939
|
+
double scale_factor = 5;
|
|
940
|
+
// Target average bits per second. Default unset, which lets the encoder
|
|
941
|
+
// choose.
|
|
942
|
+
double avg_bitrate = 6;
|
|
943
|
+
// Maximum seconds between forced key frames. Default 4.
|
|
944
|
+
double key_frame_rate = 7;
|
|
945
|
+
}
|
|
946
|
+
message Stop {}
|
|
947
|
+
oneof control {
|
|
948
|
+
Start start = 1;
|
|
949
|
+
Stop stop = 2;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
message RecordResponse {
|
|
954
|
+
// The encode options the companion resolved for this recording, so a client
|
|
955
|
+
// can tell that they took effect. Unset fps/scale_factor/key_frame_rate are
|
|
956
|
+
// reported as the defaults they resolved to. The rate control is reported in
|
|
957
|
+
// whichever of avg_bitrate/compression_quality the request chose, and both
|
|
958
|
+
// are 0 when it chose neither and left the rate automatic.
|
|
959
|
+
message Applied {
|
|
960
|
+
uint64 fps = 1;
|
|
961
|
+
double scale_factor = 2;
|
|
962
|
+
double avg_bitrate = 3;
|
|
963
|
+
double key_frame_rate = 4;
|
|
964
|
+
double compression_quality = 5;
|
|
965
|
+
}
|
|
966
|
+
oneof output {
|
|
967
|
+
bytes log_output = 1;
|
|
968
|
+
Payload payload = 2;
|
|
969
|
+
// Sent once, before any payload, and only when the request set at least
|
|
970
|
+
// one encode option. A client that set one and did not receive this is
|
|
971
|
+
// talking to a companion that silently dropped it.
|
|
972
|
+
Applied applied = 3;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
message VideoStreamRequest {
|
|
977
|
+
enum Format {
|
|
978
|
+
H264 = 0;
|
|
979
|
+
RBGA = 1;
|
|
980
|
+
MJPEG = 2;
|
|
981
|
+
MINICAP = 3;
|
|
982
|
+
I420 = 4;
|
|
983
|
+
}
|
|
984
|
+
message Start {
|
|
985
|
+
string file_path = 1;
|
|
986
|
+
uint64 fps = 2;
|
|
987
|
+
Format format = 3;
|
|
988
|
+
double compression_quality = 4;
|
|
989
|
+
double scale_factor = 5;
|
|
990
|
+
double avg_bitrate = 6;
|
|
991
|
+
double key_frame_rate = 7;
|
|
992
|
+
}
|
|
993
|
+
message Stop {}
|
|
994
|
+
oneof control {
|
|
995
|
+
Start start = 1;
|
|
996
|
+
Stop stop = 2;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
message VideoStreamResponse {
|
|
1001
|
+
oneof output {
|
|
1002
|
+
bytes log_output = 1;
|
|
1003
|
+
Payload payload = 2;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
message LaunchRequest {
|
|
1008
|
+
message Start {
|
|
1009
|
+
string bundle_id = 1;
|
|
1010
|
+
map<string, string> env = 2;
|
|
1011
|
+
repeated string app_args = 3;
|
|
1012
|
+
bool foreground_if_running = 4;
|
|
1013
|
+
bool wait_for = 5;
|
|
1014
|
+
bool wait_for_debugger = 6;
|
|
1015
|
+
bool enable_repl = 7;
|
|
1016
|
+
}
|
|
1017
|
+
message Stop {}
|
|
1018
|
+
oneof control {
|
|
1019
|
+
Start start = 1;
|
|
1020
|
+
Stop stop = 2;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
message LaunchResponse {
|
|
1025
|
+
ProcessOutput output = 3;
|
|
1026
|
+
DebuggerInfo debugger = 4;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
message AddMediaRequest {
|
|
1030
|
+
Payload payload = 1;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
message AddMediaResponse {}
|
|
1034
|
+
|
|
1035
|
+
// A companion on the client's machine is sent one `file_path` naming a WAV
|
|
1036
|
+
// file. A remote companion is sent the file's raw bytes in `data` frames, not a
|
|
1037
|
+
// tar archive; `compression` and `url` are refused.
|
|
1038
|
+
message InjectAudioRequest {
|
|
1039
|
+
Payload payload = 1;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
message InjectAudioResponse {}
|
|
1043
|
+
|
|
1044
|
+
message XctraceRecordRequest {
|
|
1045
|
+
message LauchProcess {
|
|
1046
|
+
string process_to_launch = 1;
|
|
1047
|
+
repeated string launch_args = 2;
|
|
1048
|
+
string target_stdin = 3;
|
|
1049
|
+
string target_stdout = 4;
|
|
1050
|
+
map<string, string> process_env = 5;
|
|
1051
|
+
}
|
|
1052
|
+
message Target {
|
|
1053
|
+
oneof target {
|
|
1054
|
+
bool all_processes = 1;
|
|
1055
|
+
string process_to_attach = 2;
|
|
1056
|
+
LauchProcess launch_process = 3;
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
message Start {
|
|
1060
|
+
string template_name = 1;
|
|
1061
|
+
double time_limit = 2;
|
|
1062
|
+
string package = 3;
|
|
1063
|
+
Target target = 4;
|
|
1064
|
+
}
|
|
1065
|
+
message Stop {
|
|
1066
|
+
double timeout = 1;
|
|
1067
|
+
repeated string args = 2;
|
|
1068
|
+
}
|
|
1069
|
+
oneof control {
|
|
1070
|
+
Start start = 1;
|
|
1071
|
+
Stop stop = 2;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
message XctraceRecordResponse {
|
|
1076
|
+
enum State {
|
|
1077
|
+
UNKNOWN = 0;
|
|
1078
|
+
RUNNING = 1;
|
|
1079
|
+
PROCESSING = 2;
|
|
1080
|
+
}
|
|
1081
|
+
oneof output {
|
|
1082
|
+
bytes log = 1;
|
|
1083
|
+
Payload payload = 2;
|
|
1084
|
+
State state = 3;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
message DebugServerRequest {
|
|
1089
|
+
message Start {
|
|
1090
|
+
string bundle_id = 1;
|
|
1091
|
+
}
|
|
1092
|
+
message Status {}
|
|
1093
|
+
message Stop {}
|
|
1094
|
+
message Pipe {
|
|
1095
|
+
bytes data = 1;
|
|
1096
|
+
}
|
|
1097
|
+
oneof control {
|
|
1098
|
+
Start start = 1;
|
|
1099
|
+
Stop stop = 2;
|
|
1100
|
+
Status status = 3;
|
|
1101
|
+
Pipe pipe = 4;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
message DebugServerResponse {
|
|
1106
|
+
message Pipe {
|
|
1107
|
+
bytes data = 1;
|
|
1108
|
+
}
|
|
1109
|
+
message Status {
|
|
1110
|
+
repeated string lldb_bootstrap_commands = 1;
|
|
1111
|
+
}
|
|
1112
|
+
oneof control {
|
|
1113
|
+
Status status = 1;
|
|
1114
|
+
Pipe pipe = 2;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
// crashes
|
|
1119
|
+
|
|
1120
|
+
message CrashShowRequest {
|
|
1121
|
+
string name = 1;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
message CrashLogResponse {
|
|
1125
|
+
repeated CrashLogInfo list = 1;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
message CrashLogInfo {
|
|
1129
|
+
string name = 1;
|
|
1130
|
+
string bundle_id = 2;
|
|
1131
|
+
string process_name = 3;
|
|
1132
|
+
string parent_process_name = 4;
|
|
1133
|
+
uint64 process_identifier = 5;
|
|
1134
|
+
uint64 parent_process_identifier = 6;
|
|
1135
|
+
uint64 timestamp = 7;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
message CrashShowResponse {
|
|
1139
|
+
CrashLogInfo info = 1;
|
|
1140
|
+
string contents = 2;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
message CrashLogQuery {
|
|
1144
|
+
uint64 since = 1;
|
|
1145
|
+
uint64 before = 2;
|
|
1146
|
+
string bundle_id = 3;
|
|
1147
|
+
string name = 4;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
// xctest
|
|
1151
|
+
|
|
1152
|
+
message XctestListBundlesRequest {}
|
|
1153
|
+
|
|
1154
|
+
message XctestListBundlesResponse {
|
|
1155
|
+
message Bundles {
|
|
1156
|
+
string name = 1;
|
|
1157
|
+
string bundle_id = 2;
|
|
1158
|
+
repeated string architectures = 3;
|
|
1159
|
+
}
|
|
1160
|
+
repeated Bundles bundles = 1;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
message XctestListTestsRequest {
|
|
1164
|
+
string bundle_name = 1;
|
|
1165
|
+
string app_path = 2;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
message XctestListTestsResponse {
|
|
1169
|
+
repeated string names = 1;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
message XctestRunRequest {
|
|
1173
|
+
message Logic {}
|
|
1174
|
+
message Application {
|
|
1175
|
+
string app_bundle_id = 1;
|
|
1176
|
+
}
|
|
1177
|
+
message UI {
|
|
1178
|
+
string app_bundle_id = 1;
|
|
1179
|
+
string test_host_app_bundle_id = 2;
|
|
1180
|
+
}
|
|
1181
|
+
message Mode {
|
|
1182
|
+
oneof mode {
|
|
1183
|
+
Logic logic = 1;
|
|
1184
|
+
Application application = 2;
|
|
1185
|
+
UI ui = 3;
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
message CodeCoverage {
|
|
1189
|
+
enum Format {
|
|
1190
|
+
EXPORTED = 0;
|
|
1191
|
+
RAW = 1;
|
|
1192
|
+
}
|
|
1193
|
+
bool collect = 1;
|
|
1194
|
+
Format format = 2;
|
|
1195
|
+
bool enable_continuous_coverage_collection = 3;
|
|
1196
|
+
}
|
|
1197
|
+
Mode mode = 1;
|
|
1198
|
+
string test_bundle_id = 2;
|
|
1199
|
+
repeated string tests_to_run = 3;
|
|
1200
|
+
repeated string tests_to_skip = 4;
|
|
1201
|
+
repeated string arguments = 5;
|
|
1202
|
+
map<string, string> environment = 6;
|
|
1203
|
+
uint64 timeout = 7;
|
|
1204
|
+
bool report_activities = 8;
|
|
1205
|
+
bool collect_coverage = 9;
|
|
1206
|
+
bool report_attachments = 10;
|
|
1207
|
+
bool collect_logs = 11;
|
|
1208
|
+
bool wait_for_debugger = 12;
|
|
1209
|
+
CodeCoverage code_coverage = 13;
|
|
1210
|
+
bool collect_result_bundle = 14;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
message XctestRunResponse {
|
|
1214
|
+
message TestRunInfo {
|
|
1215
|
+
message TestRunFailureInfo {
|
|
1216
|
+
string failure_message = 1;
|
|
1217
|
+
string file = 2;
|
|
1218
|
+
uint64 line = 3;
|
|
1219
|
+
}
|
|
1220
|
+
message TestAttachment {
|
|
1221
|
+
bytes payload = 1;
|
|
1222
|
+
double timestamp = 2;
|
|
1223
|
+
string name = 3;
|
|
1224
|
+
string uniform_type_identifier = 4;
|
|
1225
|
+
bytes user_info_json = 5;
|
|
1226
|
+
}
|
|
1227
|
+
message TestActivity {
|
|
1228
|
+
string title = 1;
|
|
1229
|
+
double duration = 2;
|
|
1230
|
+
string uuid = 3;
|
|
1231
|
+
string activity_type = 4;
|
|
1232
|
+
double start = 5;
|
|
1233
|
+
double finish = 6;
|
|
1234
|
+
string name = 7;
|
|
1235
|
+
repeated TestAttachment attachments = 8;
|
|
1236
|
+
repeated TestActivity sub_activities = 9;
|
|
1237
|
+
}
|
|
1238
|
+
enum Status {
|
|
1239
|
+
PASSED = 0;
|
|
1240
|
+
FAILED = 1;
|
|
1241
|
+
CRASHED = 2;
|
|
1242
|
+
}
|
|
1243
|
+
Status status = 1;
|
|
1244
|
+
string bundle_name = 2;
|
|
1245
|
+
string class_name = 3;
|
|
1246
|
+
string method_name = 4;
|
|
1247
|
+
double duration = 5;
|
|
1248
|
+
TestRunFailureInfo failure_info = 6;
|
|
1249
|
+
repeated string logs = 7;
|
|
1250
|
+
repeated TestActivity activityLogs = 8;
|
|
1251
|
+
repeated TestRunFailureInfo other_failures = 9;
|
|
1252
|
+
}
|
|
1253
|
+
enum Status {
|
|
1254
|
+
RUNNING = 0;
|
|
1255
|
+
TERMINATED_NORMALLY = 1;
|
|
1256
|
+
TERMINATED_ABNORMALLY = 2;
|
|
1257
|
+
}
|
|
1258
|
+
Status status = 1;
|
|
1259
|
+
repeated TestRunInfo results = 2;
|
|
1260
|
+
repeated string log_output = 3;
|
|
1261
|
+
Payload result_bundle = 4;
|
|
1262
|
+
string coverage_json = 5;
|
|
1263
|
+
Payload log_directory = 6;
|
|
1264
|
+
DebuggerInfo debugger = 7;
|
|
1265
|
+
Payload code_coverage_data = 8;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
// repl runs a test bundle in REPL mode and bridges compiled dylibs to the
|
|
1269
|
+
// in-process shim for execution. The client (idb-repl) compiles user code into
|
|
1270
|
+
// a dylib and streams it via Execute; the companion runs it in the test process
|
|
1271
|
+
// and streams the result back.
|
|
1272
|
+
message ReplRequest {
|
|
1273
|
+
// Sent once, first, to start the session.
|
|
1274
|
+
message Start {
|
|
1275
|
+
string test_bundle_path = 1;
|
|
1276
|
+
enum Context {
|
|
1277
|
+
SIMULATOR = 0;
|
|
1278
|
+
TEST = 1;
|
|
1279
|
+
APP = 2;
|
|
1280
|
+
}
|
|
1281
|
+
Context context = 2;
|
|
1282
|
+
// The bundle id to launch (with the REPL injected) for the APP context. If
|
|
1283
|
+
// empty, the companion launches its bundled ReplHost app instead
|
|
1284
|
+
// (installing it first if it is not already installed).
|
|
1285
|
+
string app_bundle_id = 3;
|
|
1286
|
+
// APP context only: whether to reuse an already-running REPL for this app
|
|
1287
|
+
// (reattach) instead of forcing a new session (a clean relaunch). idb-repl
|
|
1288
|
+
// sends true by default and false when `--new-session` is passed. Unset --
|
|
1289
|
+
// an older client that predates reattach -- is false, so the companion
|
|
1290
|
+
// relaunches.
|
|
1291
|
+
bool reuse_session = 4;
|
|
1292
|
+
// A path the driver created locally, used to detect whether the companion
|
|
1293
|
+
// shares the driver's filesystem: the companion checks whether this path
|
|
1294
|
+
// exists and reports the result in Ready.shared_filesystem. When they share
|
|
1295
|
+
// a filesystem the driver moves captured artifacts directly; otherwise it
|
|
1296
|
+
// pulls them back over gRPC.
|
|
1297
|
+
string probe_file_path = 5;
|
|
1298
|
+
}
|
|
1299
|
+
// Sent for each piece of code to run: a compiled dylib and the symbol to
|
|
1300
|
+
// call.
|
|
1301
|
+
message Execute {
|
|
1302
|
+
bytes dylib = 1;
|
|
1303
|
+
string symbol = 2;
|
|
1304
|
+
}
|
|
1305
|
+
// Sent to end the session (also implied by closing the stream).
|
|
1306
|
+
message Stop {}
|
|
1307
|
+
oneof control {
|
|
1308
|
+
Start start = 1;
|
|
1309
|
+
Execute execute = 2;
|
|
1310
|
+
Stop stop = 3;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
message ReplResponse {
|
|
1315
|
+
// The test is running and the REPL is ready to accept Execute messages.
|
|
1316
|
+
message Ready {
|
|
1317
|
+
// The product family of the connected target: "iphone", "ipad", "watch",
|
|
1318
|
+
// "tv", "mac", or "unknown".
|
|
1319
|
+
string device_type = 1;
|
|
1320
|
+
// The .swiftinterface files available to injected code (the test bundle's
|
|
1321
|
+
// probe-generated modules and the `IDB` module). Sent as contents rather
|
|
1322
|
+
// than paths so the driver can materialize them locally without sharing a
|
|
1323
|
+
// filesystem with the companion.
|
|
1324
|
+
message GeneratedInterface {
|
|
1325
|
+
string module_name = 1;
|
|
1326
|
+
string contents = 2;
|
|
1327
|
+
}
|
|
1328
|
+
repeated GeneratedInterface generated_interfaces = 2;
|
|
1329
|
+
// The OS version of the connected target, e.g. "26.2".
|
|
1330
|
+
string os_version = 4;
|
|
1331
|
+
// The next index the driver should use for numbering a compiled module.
|
|
1332
|
+
uint32 next_run_index = 5;
|
|
1333
|
+
// Whether the companion shares the driver's filesystem, determined from
|
|
1334
|
+
// Start.probe_file_path. When true the driver reads companion-written
|
|
1335
|
+
// artifact paths directly.
|
|
1336
|
+
bool shared_filesystem = 6;
|
|
1337
|
+
// A stable identifier for the REPL host process, sent in every Ready. It
|
|
1338
|
+
// persists across reconnects to a still-running `app` REPL and is
|
|
1339
|
+
// regenerated on relaunch, so the driver can append to the same session
|
|
1340
|
+
// report while a reset (a new session) starts a fresh one.
|
|
1341
|
+
string session_id = 7;
|
|
1342
|
+
}
|
|
1343
|
+
// The result of executing one Execute message.
|
|
1344
|
+
message Result {
|
|
1345
|
+
bool success = 1;
|
|
1346
|
+
string output = 2;
|
|
1347
|
+
// The next index the driver should use for numbering a compiled module.
|
|
1348
|
+
// A negative value signals the session has ended.
|
|
1349
|
+
int32 next_run_index = 3;
|
|
1350
|
+
// Files captured on the companion during this execute (screenshots saved to
|
|
1351
|
+
// a file, recordings). The driver retrieves each into its session's
|
|
1352
|
+
// artifacts directory -- moving it when the filesystem is shared, otherwise
|
|
1353
|
+
// pulling it over gRPC (the AUXILLARY container) and removing the companion
|
|
1354
|
+
// copy.
|
|
1355
|
+
message Artifact {
|
|
1356
|
+
// The absolute path on the companion host (used for a same-filesystem
|
|
1357
|
+
// move).
|
|
1358
|
+
string host_path = 1;
|
|
1359
|
+
// The path relative to the AUXILLARY file container root (used to pull
|
|
1360
|
+
// the file when the filesystem is not shared).
|
|
1361
|
+
string container_path = 2;
|
|
1362
|
+
}
|
|
1363
|
+
repeated Artifact artifacts = 4;
|
|
1364
|
+
}
|
|
1365
|
+
// The session has ended.
|
|
1366
|
+
message Stopped {
|
|
1367
|
+
string desc = 1;
|
|
1368
|
+
}
|
|
1369
|
+
oneof event {
|
|
1370
|
+
Ready ready = 1;
|
|
1371
|
+
Result result = 2;
|
|
1372
|
+
Stopped stopped = 3;
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
// File
|
|
1377
|
+
|
|
1378
|
+
message FileContainer {
|
|
1379
|
+
enum Kind {
|
|
1380
|
+
NONE = 0;
|
|
1381
|
+
APPLICATION = 1;
|
|
1382
|
+
ROOT = 2;
|
|
1383
|
+
MEDIA = 3;
|
|
1384
|
+
CRASHES = 4;
|
|
1385
|
+
PROVISIONING_PROFILES = 5;
|
|
1386
|
+
MDM_PROFILES = 6;
|
|
1387
|
+
SPRINGBOARD_ICONS = 7;
|
|
1388
|
+
WALLPAPER = 8;
|
|
1389
|
+
DISK_IMAGES = 9;
|
|
1390
|
+
GROUP_CONTAINER = 10;
|
|
1391
|
+
APPLICATION_CONTAINER = 11;
|
|
1392
|
+
AUXILLARY = 12;
|
|
1393
|
+
XCTEST = 13;
|
|
1394
|
+
DYLIB = 14;
|
|
1395
|
+
DSYM = 15;
|
|
1396
|
+
FRAMEWORK = 16;
|
|
1397
|
+
SYMBOLS = 17;
|
|
1398
|
+
}
|
|
1399
|
+
Kind kind = 1;
|
|
1400
|
+
string bundle_id = 2;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
message FileInfo {
|
|
1404
|
+
string path = 1;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
message FileListing {
|
|
1408
|
+
FileInfo parent = 1;
|
|
1409
|
+
repeated FileInfo files = 2;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
message LsResponse {
|
|
1413
|
+
repeated FileInfo files = 1;
|
|
1414
|
+
repeated FileListing listings = 2;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
message LsRequest {
|
|
1418
|
+
string path = 2;
|
|
1419
|
+
FileContainer container = 3;
|
|
1420
|
+
repeated string paths = 4;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
message MkdirRequest {
|
|
1424
|
+
string path = 2;
|
|
1425
|
+
FileContainer container = 3;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
message MkdirResponse {}
|
|
1429
|
+
|
|
1430
|
+
message MvRequest {
|
|
1431
|
+
repeated string src_paths = 2;
|
|
1432
|
+
string dst_path = 3;
|
|
1433
|
+
FileContainer container = 4;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
message MvResponse {}
|
|
1437
|
+
|
|
1438
|
+
message RmRequest {
|
|
1439
|
+
repeated string paths = 2;
|
|
1440
|
+
FileContainer container = 3;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
message RmResponse {}
|
|
1444
|
+
|
|
1445
|
+
message PushRequest {
|
|
1446
|
+
message Inner {
|
|
1447
|
+
string dst_path = 2;
|
|
1448
|
+
FileContainer container = 3;
|
|
1449
|
+
}
|
|
1450
|
+
oneof value {
|
|
1451
|
+
Payload payload = 1;
|
|
1452
|
+
Inner inner = 2;
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
message PushResponse {}
|
|
1457
|
+
|
|
1458
|
+
message PullRequest {
|
|
1459
|
+
string src_path = 2;
|
|
1460
|
+
string dst_path = 3;
|
|
1461
|
+
FileContainer container = 4;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
message PullResponse {
|
|
1465
|
+
Payload payload = 1;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
message TailRequest {
|
|
1469
|
+
message Start {
|
|
1470
|
+
FileContainer container = 1;
|
|
1471
|
+
string path = 2;
|
|
1472
|
+
}
|
|
1473
|
+
message Stop {}
|
|
1474
|
+
oneof control {
|
|
1475
|
+
Start start = 1;
|
|
1476
|
+
Stop stop = 2;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
message TailResponse {
|
|
1481
|
+
bytes data = 1;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
message DebuggerInfo {
|
|
1485
|
+
uint64 pid = 1;
|
|
1486
|
+
string host = 2;
|
|
1487
|
+
uint64 port = 3;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
message SendNotificationRequest {
|
|
1491
|
+
string bundle_id = 1;
|
|
1492
|
+
string json_payload = 2;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
message SendNotificationResponse {}
|
|
1496
|
+
|
|
1497
|
+
message DeliveredNotificationsRequest {
|
|
1498
|
+
string bundle_id = 1;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
message DeliveredNotification {
|
|
1502
|
+
string bundle_id = 1;
|
|
1503
|
+
string identifier = 2;
|
|
1504
|
+
string title = 3;
|
|
1505
|
+
string subtitle = 4;
|
|
1506
|
+
string body = 5;
|
|
1507
|
+
string thread_identifier = 6;
|
|
1508
|
+
// Presence distinguishes a record with no date from one dated at the Unix
|
|
1509
|
+
// epoch while remaining compatible with older protobuf generators.
|
|
1510
|
+
oneof optional_date {
|
|
1511
|
+
double date = 7;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
message DeliveredNotificationsResponse {
|
|
1516
|
+
repeated DeliveredNotification notifications = 1;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
message ClearDeliveredNotificationsRequest {
|
|
1520
|
+
string bundle_id = 1;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
message ClearDeliveredNotificationsResponse {}
|
|
1524
|
+
|
|
1525
|
+
message DapRequest {
|
|
1526
|
+
message Start {
|
|
1527
|
+
string debugger_pkg_id = 1;
|
|
1528
|
+
}
|
|
1529
|
+
message Pipe {
|
|
1530
|
+
bytes data = 1;
|
|
1531
|
+
}
|
|
1532
|
+
message Stop {}
|
|
1533
|
+
oneof control {
|
|
1534
|
+
Start start = 1;
|
|
1535
|
+
Pipe pipe = 2;
|
|
1536
|
+
Stop stop = 3;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
message DapResponse {
|
|
1541
|
+
message Event {
|
|
1542
|
+
string desc = 1;
|
|
1543
|
+
}
|
|
1544
|
+
message Pipe {
|
|
1545
|
+
bytes data = 1;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
oneof event {
|
|
1549
|
+
Event started = 1;
|
|
1550
|
+
Pipe stdout = 2;
|
|
1551
|
+
Event stopped = 3;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
message SimulateMemoryWarningRequest {}
|
|
1556
|
+
|
|
1557
|
+
message SimulateMemoryWarningResponse {}
|
|
1558
|
+
|
|
1559
|
+
// Sent Start, then optionally Stop. Stop ends a `resources` profile, or a
|
|
1560
|
+
// `trace` before its duration with what it recorded so far; the other profilers
|
|
1561
|
+
// run to completion.
|
|
1562
|
+
message ProfileRequest {
|
|
1563
|
+
message Target {
|
|
1564
|
+
oneof target {
|
|
1565
|
+
uint64 pid = 1;
|
|
1566
|
+
// The running process of an installed application.
|
|
1567
|
+
string bundle_id = 2;
|
|
1568
|
+
// Launches the application, so the profile covers its startup. Only
|
|
1569
|
+
// `trace` supports it.
|
|
1570
|
+
string launch_bundle_id = 3;
|
|
1571
|
+
// Every process on the target. Only `trace` supports it.
|
|
1572
|
+
bool all_processes = 4;
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
message Leaks {}
|
|
1576
|
+
message Memgraph {}
|
|
1577
|
+
message Heap {}
|
|
1578
|
+
message Sample {
|
|
1579
|
+
uint32 seconds = 1;
|
|
1580
|
+
}
|
|
1581
|
+
message Vmmap {}
|
|
1582
|
+
message Footprint {}
|
|
1583
|
+
message Resources {
|
|
1584
|
+
enum Scope {
|
|
1585
|
+
APP = 0;
|
|
1586
|
+
APP_AND_HELPERS = 1;
|
|
1587
|
+
}
|
|
1588
|
+
uint64 interval_ms = 1;
|
|
1589
|
+
Scope scope = 2;
|
|
1590
|
+
}
|
|
1591
|
+
message Trace {
|
|
1592
|
+
string template = 1;
|
|
1593
|
+
// Empty exports the tables the template is known for, such as
|
|
1594
|
+
// `time-profile` for Time Profiler.
|
|
1595
|
+
repeated string schemas = 2;
|
|
1596
|
+
double duration_seconds = 3;
|
|
1597
|
+
// The most rows of each table to report; zero reports every row.
|
|
1598
|
+
uint64 row_limit = 4;
|
|
1599
|
+
}
|
|
1600
|
+
message Start {
|
|
1601
|
+
Target target = 1;
|
|
1602
|
+
oneof kind {
|
|
1603
|
+
Leaks leaks = 2;
|
|
1604
|
+
Memgraph memgraph = 3;
|
|
1605
|
+
Heap heap = 4;
|
|
1606
|
+
Sample sample = 5;
|
|
1607
|
+
Vmmap vmmap = 6;
|
|
1608
|
+
Footprint footprint = 7;
|
|
1609
|
+
Resources resources = 8;
|
|
1610
|
+
Trace trace = 9;
|
|
1611
|
+
}
|
|
1612
|
+
// Streams the file the profiler wrote, such as the memory graph or the
|
|
1613
|
+
// trace, as a gzipped tar.
|
|
1614
|
+
bool include_artifact = 10;
|
|
1615
|
+
}
|
|
1616
|
+
message Stop {}
|
|
1617
|
+
oneof control {
|
|
1618
|
+
Start start = 1;
|
|
1619
|
+
Stop stop = 2;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
// Any samples, then exactly one result, then the artifact in chunks if it was
|
|
1624
|
+
// requested.
|
|
1625
|
+
message ProfileResponse {
|
|
1626
|
+
message Result {
|
|
1627
|
+
// Unset for `resources`, which reports through samples instead.
|
|
1628
|
+
ProfileReport report = 1;
|
|
1629
|
+
// What the tool wrote, unparsed.
|
|
1630
|
+
bytes tool_output = 2;
|
|
1631
|
+
}
|
|
1632
|
+
oneof output {
|
|
1633
|
+
ProfileResourceSample sample = 1;
|
|
1634
|
+
Result result = 2;
|
|
1635
|
+
Payload artifact = 3;
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
message ProfileReport {
|
|
1640
|
+
oneof report {
|
|
1641
|
+
ProfileLeaksReport leaks = 1;
|
|
1642
|
+
ProfileHeapReport heap = 2;
|
|
1643
|
+
ProfileSampleReport sample = 3;
|
|
1644
|
+
ProfileVmmapReport vmmap = 4;
|
|
1645
|
+
ProfileFootprintReport footprint = 5;
|
|
1646
|
+
ProfileTraceReport trace = 6;
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
message ProfiledProcess {
|
|
1651
|
+
string name = 1;
|
|
1652
|
+
int32 pid = 2;
|
|
1653
|
+
string identifier = 3;
|
|
1654
|
+
optional uint64 physical_footprint_bytes = 4;
|
|
1655
|
+
optional uint64 peak_physical_footprint_bytes = 5;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
message ProfileFrame {
|
|
1659
|
+
string symbol = 1;
|
|
1660
|
+
string binary = 2;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
message ProfileLeaksReport {
|
|
1664
|
+
enum Kind {
|
|
1665
|
+
LEAK = 0;
|
|
1666
|
+
CYCLE = 1;
|
|
1667
|
+
}
|
|
1668
|
+
message Group {
|
|
1669
|
+
Kind kind = 1;
|
|
1670
|
+
string type_name = 2;
|
|
1671
|
+
uint64 roots = 3;
|
|
1672
|
+
uint64 nodes = 4;
|
|
1673
|
+
uint64 bytes = 5;
|
|
1674
|
+
}
|
|
1675
|
+
message AllocationStack {
|
|
1676
|
+
Kind kind = 1;
|
|
1677
|
+
string type_name = 2;
|
|
1678
|
+
uint64 instances = 3;
|
|
1679
|
+
repeated ProfileFrame frames = 4;
|
|
1680
|
+
}
|
|
1681
|
+
ProfiledProcess process = 1;
|
|
1682
|
+
uint64 leak_count = 2;
|
|
1683
|
+
uint64 leaked_bytes = 3;
|
|
1684
|
+
repeated Group groups = 4;
|
|
1685
|
+
repeated AllocationStack allocation_stacks = 5;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
message ProfileHeapReport {
|
|
1689
|
+
message Class {
|
|
1690
|
+
string class_name = 1;
|
|
1691
|
+
uint64 count = 2;
|
|
1692
|
+
uint64 bytes = 3;
|
|
1693
|
+
string kind = 4;
|
|
1694
|
+
string binary = 5;
|
|
1695
|
+
}
|
|
1696
|
+
ProfiledProcess process = 1;
|
|
1697
|
+
uint64 node_count = 2;
|
|
1698
|
+
uint64 bytes = 3;
|
|
1699
|
+
repeated Class classes = 4;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
message ProfileSampleReport {
|
|
1703
|
+
message Thread {
|
|
1704
|
+
string name = 1;
|
|
1705
|
+
uint64 samples = 2;
|
|
1706
|
+
}
|
|
1707
|
+
message Frame {
|
|
1708
|
+
ProfileFrame frame = 1;
|
|
1709
|
+
uint64 samples = 2;
|
|
1710
|
+
}
|
|
1711
|
+
message Stack {
|
|
1712
|
+
repeated ProfileFrame frames = 1;
|
|
1713
|
+
uint64 samples = 2;
|
|
1714
|
+
}
|
|
1715
|
+
ProfiledProcess process = 1;
|
|
1716
|
+
uint64 total_samples = 2;
|
|
1717
|
+
uint64 busy_samples = 3;
|
|
1718
|
+
repeated Thread threads = 4;
|
|
1719
|
+
repeated Frame busy_frames = 5;
|
|
1720
|
+
repeated Stack stacks = 6;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
message ProfileVmmapReport {
|
|
1724
|
+
message Region {
|
|
1725
|
+
string type = 1;
|
|
1726
|
+
uint64 virtual_bytes = 2;
|
|
1727
|
+
uint64 resident_bytes = 3;
|
|
1728
|
+
uint64 dirty_bytes = 4;
|
|
1729
|
+
uint64 swapped_bytes = 5;
|
|
1730
|
+
uint64 region_count = 6;
|
|
1731
|
+
}
|
|
1732
|
+
ProfiledProcess process = 1;
|
|
1733
|
+
repeated Region regions = 2;
|
|
1734
|
+
Region total = 3;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
message ProfileFootprintReport {
|
|
1738
|
+
message Category {
|
|
1739
|
+
string name = 1;
|
|
1740
|
+
uint64 dirty_bytes = 2;
|
|
1741
|
+
uint64 swapped_bytes = 3;
|
|
1742
|
+
uint64 region_count = 4;
|
|
1743
|
+
}
|
|
1744
|
+
string name = 1;
|
|
1745
|
+
int32 pid = 2;
|
|
1746
|
+
uint64 footprint_bytes = 3;
|
|
1747
|
+
uint64 peak_footprint_bytes = 4;
|
|
1748
|
+
// vmmap's dirty and swapped memory per region type, largest first. These
|
|
1749
|
+
// count shared library pages that the footprint attributes elsewhere, so they
|
|
1750
|
+
// need not sum to it.
|
|
1751
|
+
repeated Category categories = 5;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
message ProfileTraceReport {
|
|
1755
|
+
message Process {
|
|
1756
|
+
string name = 1;
|
|
1757
|
+
int32 pid = 2;
|
|
1758
|
+
string path = 3;
|
|
1759
|
+
}
|
|
1760
|
+
message Run {
|
|
1761
|
+
uint64 number = 1;
|
|
1762
|
+
string template_name = 2;
|
|
1763
|
+
optional double duration_seconds = 3;
|
|
1764
|
+
string end_reason = 4;
|
|
1765
|
+
repeated Process processes = 5;
|
|
1766
|
+
repeated string schemas = 6;
|
|
1767
|
+
}
|
|
1768
|
+
message Column {
|
|
1769
|
+
string mnemonic = 1;
|
|
1770
|
+
string name = 2;
|
|
1771
|
+
string engineering_type = 3;
|
|
1772
|
+
}
|
|
1773
|
+
message Backtrace {
|
|
1774
|
+
// Innermost first.
|
|
1775
|
+
repeated ProfileFrame frames = 1;
|
|
1776
|
+
}
|
|
1777
|
+
message Value {
|
|
1778
|
+
oneof value {
|
|
1779
|
+
// The column has no value in this row.
|
|
1780
|
+
bool empty = 1;
|
|
1781
|
+
string text = 2;
|
|
1782
|
+
Backtrace backtrace = 3;
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
message Row {
|
|
1786
|
+
repeated Value values = 1;
|
|
1787
|
+
}
|
|
1788
|
+
message Table {
|
|
1789
|
+
string schema = 1;
|
|
1790
|
+
repeated Column columns = 2;
|
|
1791
|
+
// Every row in the table, including any beyond the row limit.
|
|
1792
|
+
uint64 row_count = 3;
|
|
1793
|
+
repeated Row rows = 4;
|
|
1794
|
+
}
|
|
1795
|
+
repeated Run runs = 1;
|
|
1796
|
+
// The exported tables of the last run.
|
|
1797
|
+
repeated Table tables = 2;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
message ProfileResourceSample {
|
|
1801
|
+
int32 pid = 1;
|
|
1802
|
+
string process_name = 2;
|
|
1803
|
+
int64 timestamp_ms = 3;
|
|
1804
|
+
int64 elapsed_ms = 4;
|
|
1805
|
+
// Unset for the first sample, which has no interval to measure over.
|
|
1806
|
+
optional double cpu_pct = 5;
|
|
1807
|
+
uint64 footprint_bytes = 6;
|
|
1808
|
+
uint64 resident_bytes = 7;
|
|
1809
|
+
uint64 instructions = 8;
|
|
1810
|
+
uint64 cycles = 9;
|
|
1811
|
+
uint64 disk_bytes_read = 10;
|
|
1812
|
+
uint64 disk_bytes_written = 11;
|
|
1813
|
+
uint64 interrupt_wakeups = 12;
|
|
1814
|
+
uint64 package_idle_wakeups = 13;
|
|
1815
|
+
uint64 billed_energy_nano_joules = 14;
|
|
1816
|
+
}
|