darkbio_wire/protocol/generated/darkbio.wire.rs
1// This file is @generated by prost-build.
2/// HostToArk represents a message sent from the host to the Ark via the USB
3/// connection. It embeds all possible message types to keep the protocol simple.
4///
5/// Every message carries an id and is either a request, its id chosen by the
6/// host, or the host's response to a request of the Ark, echoing the Ark's id.
7/// To avoid id collisions, hosts allocate odd ids and Arks even ones, so the
8/// parity of the id alone distinguishes a response from a request.
9#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10pub struct HostToArk {
11 /// Enveloping fields, reserved range 0x001-0x0ff
12 ///
13 /// Request identifier, the host's own or responded to
14 #[prost(uint64, tag = "1")]
15 pub id: u64,
16 /// Error encountered while serving the Ark's request (if any)
17 #[prost(message, optional, tag = "2")]
18 pub err: ::core::option::Option<Error>,
19 /// Body of the message, a request of the host or its response to a request of
20 /// the Ark. The tags are grouped by area, each area with its own range.
21 #[prost(
22 oneof = "host_to_ark::Content",
23 tags = "256, 257, 258, 259, 260, 513, 514, 515, 516, 517, 769, 770, 771, 772, 773, 774, 1025, 1026, 1027, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1793, 4096"
24 )]
25 pub content: ::core::option::Option<host_to_ark::Content>,
26}
27/// Nested message and enum types in `HostToArk`.
28pub mod host_to_ark {
29 /// Body of the message, a request of the host or its response to a request of
30 /// the Ark. The tags are grouped by area, each area with its own range.
31 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
32 pub enum Content {
33 /// Installs the signed device attestation at manufacturing
34 #[prost(message, tag = "256")]
35 Onboard(super::OnboardingRequest),
36 /// Fetches the hardware and firmware versions
37 #[prost(message, tag = "257")]
38 DeviceInfo(super::DeviceInfoRequest),
39 /// Starts a cloud sync with the attested cloud keys
40 #[prost(message, tag = "258")]
41 CloudSyncStart(super::CloudSyncStartRequest),
42 /// Finishes a cloud sync with the signed server time
43 #[prost(message, tag = "259")]
44 CloudSyncFinish(super::CloudSyncFinishRequest),
45 /// Requests a proof of the device's genuinity
46 #[prost(message, tag = "260")]
47 GenuinityProof(super::GenuinityProofRequest),
48 /// Prepares an update, aborting any in progress
49 #[prost(message, tag = "513")]
50 FirmwareUpdatePrep(super::FirmwareUpdatePrepRequest),
51 /// Initiates a prepared update with the sealed firmware key
52 #[prost(message, tag = "514")]
53 FirmwareUpdateInit(super::FirmwareUpdateInitRequest),
54 /// Appends a chunk of the firmware archive
55 #[prost(message, tag = "515")]
56 FirmwareUpdateUpload(super::FirmwareUpdateUploadRequest),
57 /// Decrypts and verifies the uploaded firmware
58 #[prost(message, tag = "516")]
59 FirmwareUpdateVerify(super::FirmwareUpdateVerifyRequest),
60 /// Installs the verified firmware and reboots
61 #[prost(message, tag = "517")]
62 FirmwareUpdateInstall(super::FirmwareUpdateInstallRequest),
63 /// Asks the Ark to authorize a pairing rendezvous
64 #[prost(message, tag = "769")]
65 PairingAuth(super::PairingAuthRequest),
66 /// Injects the companion app's identity, relayed by the cloud
67 #[prost(message, tag = "770")]
68 PairingSetAppId(super::PairingSetAppIdentityRequest),
69 /// Injects the companion app's storage key material
70 #[prost(message, tag = "771")]
71 PairingSetAppStorage(super::PairingSetAppStorageRequest),
72 /// Confirms the app received the Ark's key material
73 #[prost(message, tag = "772")]
74 PairingAckArkStorage(super::PairingAckArkStorageRequest),
75 /// Waits for the user to accept the pairing
76 #[prost(message, tag = "773")]
77 PairingAccept(super::PairingAcceptanceRequest),
78 /// Waits for the Ark to finish pairing maintenance
79 #[prost(message, tag = "774")]
80 PairingComplete(super::PairingCompletionRequest),
81 /// Asks the Ark to authorize joining the app relay
82 #[prost(message, tag = "1025")]
83 RelayJoin(super::RelayJoinRequest),
84 /// Forwards one frame from the relay socket to the Ark
85 #[prost(message, tag = "1026")]
86 RelayInbound(super::RelayInboundRequest),
87 /// Confirms the relay socket accepted the frame
88 #[prost(message, tag = "1027")]
89 RelayOutbound(super::RelayOutboundResponse),
90 /// Requests unlock
91 #[prost(message, tag = "1281")]
92 Unlock(super::UnlockRequest),
93 /// Creates a task
94 #[prost(message, tag = "1282")]
95 ExecCreate(super::ExecutionCreateRequest),
96 /// Loads task modules
97 #[prost(message, tag = "1283")]
98 ExecLoad(super::ExecutionLoadRequest),
99 /// Requests approval
100 #[prost(message, tag = "1284")]
101 ExecStart(super::ExecutionStartRequest),
102 /// Checks task state
103 #[prost(message, tag = "1285")]
104 ExecStatus(super::ExecutionStatusRequest),
105 /// Cancels a task
106 #[prost(message, tag = "1286")]
107 ExecCancel(super::ExecutionCancelRequest),
108 /// Reads task result
109 #[prost(message, tag = "1287")]
110 ExecResult(super::ExecutionResultRequest),
111 /// Reads task output
112 #[prost(message, tag = "1288")]
113 ExecOutput(super::ExecutionOutputRequest),
114 /// Module size, bytes
115 #[prost(message, tag = "1289")]
116 ExecModuleSize(super::ExecutionModuleSizeResponse),
117 /// Module bytes
118 #[prost(message, tag = "1290")]
119 ExecModuleRead(super::ExecutionModuleReadResponse),
120 /// Lists the state of every data slot
121 #[prost(message, tag = "1537")]
122 SlotList(super::SlotListRequest),
123 /// Resets a slot to empty whatever its state
124 #[prost(message, tag = "1538")]
125 SlotRepair(super::SlotRepairRequest),
126 /// Removes the contents of a filled slot
127 #[prost(message, tag = "1539")]
128 SlotDelete(super::SlotDeleteRequest),
129 /// Asks the Ark to identify a file from its first chunk
130 #[prost(message, tag = "1540")]
131 SlotIdentify(super::SlotIdentifyRequest),
132 /// Starts uploading a file into a slot
133 #[prost(message, tag = "1541")]
134 SlotUploadStart(super::SlotUploadStartRequest),
135 /// Appends a chunk to a pending slot upload
136 #[prost(message, tag = "1542")]
137 SlotUploadChunk(super::SlotUploadChunkRequest),
138 /// Aborts a pending slot upload
139 #[prost(message, tag = "1543")]
140 SlotUploadCancel(super::SlotUploadCancelRequest),
141 /// Marks an upload complete and polls its processing
142 #[prost(message, tag = "1544")]
143 SlotUploadProcess(super::SlotUploadProcessRequest),
144 /// Maps every path an app can read, from the dataset view
145 #[prost(message, tag = "1793")]
146 DatasetPaths(super::DatasetPathsRequest),
147 /// Unreleased messages served by development firmware only, carried opaquely
148 /// so the public protocol is untouched while they are still under development.
149 /// Their schema is private and production Arks refuse the envelope.
150 #[prost(bytes, tag = "4096")]
151 Develop(::prost::alloc::vec::Vec<u8>),
152 }
153}
154/// ArkToHost represents a message sent from the Ark to the host via the USB
155/// connection. It embeds all possible message types to keep the protocol simple.
156///
157/// Every message carries an id and is either a request, its id chosen by the
158/// Ark, or the Ark's response to a request of the host, echoing the host's id.
159/// To avoid id collisions, hosts allocate odd ids and Arks even ones, so the
160/// parity of the id alone distinguishes a response from a request.
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct ArkToHost {
163 /// Enveloping fields, reserved range 0x001-0x0ff
164 ///
165 /// Request identifier, responded to or the Ark's own
166 #[prost(uint64, tag = "1")]
167 pub id: u64,
168 /// Error encountered while serving the host's request (if any)
169 #[prost(message, optional, tag = "2")]
170 pub err: ::core::option::Option<Error>,
171 /// Body of the message, a response of the Ark to a request of the host or a
172 /// request of its own. The tags are grouped by area, each area with its own range.
173 #[prost(
174 oneof = "ark_to_host::Content",
175 tags = "256, 257, 258, 259, 260, 513, 514, 515, 516, 517, 769, 770, 771, 772, 773, 774, 1025, 1026, 1027, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1793, 4096"
176 )]
177 pub content: ::core::option::Option<ark_to_host::Content>,
178}
179/// Nested message and enum types in `ArkToHost`.
180pub mod ark_to_host {
181 /// Body of the message, a response of the Ark to a request of the host or a
182 /// request of its own. The tags are grouped by area, each area with its own range.
183 #[derive(Clone, PartialEq, ::prost::Oneof)]
184 pub enum Content {
185 /// Acknowledges the onboarding
186 #[prost(message, tag = "256")]
187 Onboard(super::OnboardingResponse),
188 /// Hardware and firmware versions of the Ark
189 #[prost(message, tag = "257")]
190 DeviceInfo(super::DeviceInfoResponse),
191 /// Challenge for the cloud to sign along its time
192 #[prost(message, tag = "258")]
193 CloudSyncStart(super::CloudSyncStartResponse),
194 /// Timestamp the Ark accepted from the cloud
195 #[prost(message, tag = "259")]
196 CloudSyncFinish(super::CloudSyncFinishResponse),
197 /// Encrypted proof of the Ark's genuinity for the cloud
198 #[prost(message, tag = "260")]
199 GenuinityProof(super::GenuinityProofResponse),
200 /// Ephemeral key to receive the firmware key with, sealed for the cloud
201 #[prost(message, tag = "513")]
202 FirmwareUpdatePrep(super::FirmwareUpdatePrepResponse),
203 /// Acknowledges the initiated update
204 #[prost(message, tag = "514")]
205 FirmwareUpdateInit(super::FirmwareUpdateInitResponse),
206 /// Acknowledges the appended firmware chunk
207 #[prost(message, tag = "515")]
208 FirmwareUpdateUpload(super::FirmwareUpdateUploadResponse),
209 /// Acknowledges the verified firmware
210 #[prost(message, tag = "516")]
211 FirmwareUpdateVerify(super::FirmwareUpdateVerifyResponse),
212 /// Acknowledges the installed firmware
213 #[prost(message, tag = "517")]
214 FirmwareUpdateInstall(super::FirmwareUpdateInstallResponse),
215 /// Signed authorization for the cloud to open a rendezvous
216 #[prost(message, tag = "769")]
217 PairingAuth(super::PairingAuthResponse),
218 /// Acknowledges the accepted app identity
219 #[prost(message, tag = "770")]
220 PairingSetAppId(super::PairingSetAppIdentityResponse),
221 /// Ark device infos and key material, sealed for the app
222 #[prost(message, tag = "771")]
223 PairingSetAppStorage(super::PairingSetAppStorageResponse),
224 /// Acknowledges the app's receipt of the Ark's keys
225 #[prost(message, tag = "772")]
226 PairingAckArkStorage(super::PairingAckArkStorageResponse),
227 /// Signed confirmation that the user accepted the pairing
228 #[prost(message, tag = "773")]
229 PairingAccept(super::PairingAcceptanceResponse),
230 /// Signed confirmation that the Ark finished pairing
231 #[prost(message, tag = "774")]
232 PairingComplete(super::PairingCompletionResponse),
233 /// Signed authorization for the cloud to join the relay
234 #[prost(message, tag = "1025")]
235 RelayJoin(super::RelayJoinResponse),
236 /// Confirms the Ark opened the frame
237 #[prost(message, tag = "1026")]
238 RelayInbound(super::RelayInboundResponse),
239 /// Asks the host to write one frame to its relay socket
240 #[prost(message, tag = "1027")]
241 RelayOutbound(super::RelayOutboundRequest),
242 /// Confirms unlock
243 #[prost(message, tag = "1281")]
244 Unlock(super::UnlockResponse),
245 /// Created task's id
246 #[prost(message, tag = "1282")]
247 ExecCreate(super::ExecutionCreateResponse),
248 /// Confirms task loaded
249 #[prost(message, tag = "1283")]
250 ExecLoad(super::ExecutionLoadResponse),
251 /// Task started
252 #[prost(message, tag = "1284")]
253 ExecStart(super::ExecutionStartResponse),
254 /// Task state
255 #[prost(message, tag = "1285")]
256 ExecStatus(super::ExecutionStatusResponse),
257 /// Task canceled
258 #[prost(message, tag = "1286")]
259 ExecCancel(super::ExecutionCancelResponse),
260 /// Released task result
261 #[prost(message, tag = "1287")]
262 ExecResult(super::ExecutionResultResponse),
263 /// Next output bytes
264 #[prost(message, tag = "1288")]
265 ExecOutput(super::ExecutionOutputResponse),
266 /// Requests module size
267 #[prost(message, tag = "1289")]
268 ExecModuleSize(super::ExecutionModuleSizeRequest),
269 /// Reads module bytes
270 #[prost(message, tag = "1290")]
271 ExecModuleRead(super::ExecutionModuleReadRequest),
272 /// Current state of every data slot
273 #[prost(message, tag = "1537")]
274 SlotList(super::SlotListResponse),
275 /// Acknowledges the reset slot
276 #[prost(message, tag = "1538")]
277 SlotRepair(super::SlotRepairResponse),
278 /// Acknowledges the deleted slot
279 #[prost(message, tag = "1539")]
280 SlotDelete(super::SlotDeleteResponse),
281 /// Identification of the file's first chunk
282 #[prost(message, tag = "1540")]
283 SlotIdentify(super::SlotIdentifyResponse),
284 /// Session id of the approved upload
285 #[prost(message, tag = "1541")]
286 SlotUploadStart(super::SlotUploadStartResponse),
287 /// Acknowledges the appended slot chunk
288 #[prost(message, tag = "1542")]
289 SlotUploadChunk(super::SlotUploadChunkResponse),
290 /// Acknowledges the aborted upload
291 #[prost(message, tag = "1543")]
292 SlotUploadCancel(super::SlotUploadCancelResponse),
293 /// Processing progress of the completed upload
294 #[prost(message, tag = "1544")]
295 SlotUploadProcess(super::SlotUploadProcessResponse),
296 /// Every path an app can read, with its description, format and examples
297 #[prost(message, tag = "1793")]
298 DatasetPaths(super::DatasetPathsResponse),
299 /// Unreleased messages emitted by development firmware only, in response to
300 /// a develop request, carried opaquely so the public protocol is untouched
301 /// while they are still under development. Their schema is private.
302 #[prost(bytes, tag = "4096")]
303 Develop(::prost::alloc::vec::Vec<u8>),
304 }
305}
306/// Error answers a failed request, in place of the response content.
307///
308/// Codes 0x00 through 0xff (inclusive) are reserved for protocol-wide errors.
309/// Codes 0x100 and above are defined by the request type and may be reused
310/// with different meanings for different requests. The message text is human
311/// readable, not a stable code.
312#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
313pub struct Error {
314 /// Error code for programmatic interpretation
315 #[prost(uint64, tag = "1")]
316 pub code: u64,
317 /// Error message for user interfacing
318 #[prost(string, tag = "2")]
319 pub msg: ::prost::alloc::string::String,
320}
321/// OnboardingRequest is a vendor utility to onboard an Ark. Currently it contains
322/// the signed device genuinity attestation (certificate).
323///
324/// Note, as this method is only used during initial device setup, there is no API
325/// compatibility guarantee, it will evolve with the factory tooling.
326#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
327pub struct OnboardingRequest {
328 /// Signed device genuinity attestation (CWT) to install
329 #[prost(bytes = "vec", tag = "1")]
330 pub device_attestation: ::prost::alloc::vec::Vec<u8>,
331}
332/// OnboardingResponse is the acknowledgement of the onboarding.
333#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
334pub struct OnboardingResponse {}
335/// DeviceInfoRequest is sent by the host to fetch the Ark's device stats.
336#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
337pub struct DeviceInfoRequest {}
338/// DeviceInfoResponse returns various hardware and software version information.
339#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
340pub struct DeviceInfoResponse {
341 /// Ark device version (defines the major features)
342 #[prost(uint32, tag = "1")]
343 pub version_id: u32,
344 /// Ark device version label (as known by the device)
345 #[prost(string, tag = "2")]
346 pub version_str: ::prost::alloc::string::String,
347 /// Ark device revision (defines the minor differences)
348 #[prost(uint32, tag = "3")]
349 pub revision_id: u32,
350 /// Ark device revision label (as known by the device)
351 #[prost(string, tag = "4")]
352 pub revision_str: ::prost::alloc::string::String,
353 /// Current firmware version (X.Y.Z-commit)
354 #[prost(string, tag = "7")]
355 pub firmware_version: ::prost::alloc::string::String,
356 /// Current firmware publish unix timestamp
357 #[prost(uint64, tag = "8")]
358 pub firmware_publish: u64,
359 /// Whether a cloud identity was accepted since boot
360 #[prost(bool, tag = "9")]
361 pub cloud_synced: bool,
362 /// Current device clock unix timestamp, set by the cloud sync
363 #[prost(uint64, tag = "10")]
364 pub cloud_clock: u64,
365 /// Whether the Ark is paired with a companion app (user data initialized)
366 #[prost(bool, tag = "11")]
367 pub paired: bool,
368 /// Whether the user data storage is open (false if unpaired)
369 #[prost(bool, tag = "12")]
370 pub unlocked: bool,
371}
372/// CloudSyncStartRequest requests the device to start a synchronization procedure
373/// against the cloud servers to establish the current time as well as the currently
374/// active cloud identity.
375#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
376pub struct CloudSyncStartRequest {
377 /// Post-quantum CWT attestation for the server signing (xDSA) key
378 #[prost(bytes = "vec", tag = "1")]
379 pub signer: ::prost::alloc::vec::Vec<u8>,
380 /// Post-quantum CWT attestation for the server encryption (xHPKE) key
381 #[prost(bytes = "vec", tag = "2")]
382 pub crypto: ::prost::alloc::vec::Vec<u8>,
383}
384/// CloudSyncStartResponse is an initiation of a cloud sync from the device, authed
385/// to the requested cloud identity.
386#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
387pub struct CloudSyncStartResponse {
388 /// Random nonce to avoid malicious host machines setting bad times
389 #[prost(bytes = "vec", tag = "1")]
390 pub challenge: ::prost::alloc::vec::Vec<u8>,
391}
392/// CloudSyncFinishRequest is the completion of a previously initiated cloud sync
393/// procedure, this time being signed by a single identity currently used by the
394/// cloud.
395#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
396pub struct CloudSyncFinishRequest {
397 /// Unix timestamp from the server in milliseconds
398 #[prost(uint64, tag = "1")]
399 pub unixmilli: u64,
400 /// SignAt[Cloud]["cloudsync-v1"][unixmilli/1000](CBOR(challenge))
401 #[prost(bytes = "vec", tag = "2")]
402 pub signature: ::prost::alloc::vec::Vec<u8>,
403}
404/// CloudSyncFinishResponse is the acknowledgement whether the device accepted the
405/// cloud sync from the server or rejected for some reason.
406#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
407pub struct CloudSyncFinishResponse {
408 /// Timestamp that was accepted and set
409 #[prost(uint64, tag = "1")]
410 pub accepted: u64,
411}
412/// GenuinityProofRequest requests the device to generate a cryptographic proof of
413/// its own authenticity.
414#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
415pub struct GenuinityProofRequest {}
416/// GenuinityProofResponse is the device genuinity proof, an encrypted signature
417/// of the device.
418#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
419pub struct GenuinityProofResponse {
420 /// Seal[Ark->Cloud]["genuinity-v1"][null](null)
421 #[prost(bytes = "vec", tag = "1")]
422 pub proof: ::prost::alloc::vec::Vec<u8>,
423}
424/// FirmwareUpdatePrepRequest prepares a firmware update procedure. If any previous
425/// update procedure was in progress, it is aborted.
426#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
427pub struct FirmwareUpdatePrepRequest {
428 /// Version string to update to
429 #[prost(string, tag = "1")]
430 pub version: ::prost::alloc::string::String,
431 /// SHA256 hash of the (encrypted) firmware archive
432 #[prost(bytes = "vec", tag = "2")]
433 pub sha256: ::prost::alloc::vec::Vec<u8>,
434 /// Number of bytes (progress purposes, ignored otherwise)
435 #[prost(uint64, tag = "3")]
436 pub bytes: u64,
437}
438/// FirmwareUpdatePrepResponse confirms that a new firmware update procedure
439/// started. A rejected request gets an error instead.
440///
441/// The Ark generates a fresh ephemeral encryption key to receive the firmware
442/// access key. Its public half is sealed to the cloud, bound to the requested
443/// version and hash.
444#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
445pub struct FirmwareUpdatePrepResponse {
446 /// Seal[Ark->Cloud]["firmware-v1"][\[version, sha256\]](temp-key)
447 #[prost(bytes = "vec", tag = "1")]
448 pub auth: ::prost::alloc::vec::Vec<u8>,
449}
450/// FirmwareUpdateInitRequest initiates a previously prepared firmware update
451/// procedure by providing the authenticated and encrypted firmware key.
452///
453/// Note, if the initiation is rejected, the entire update process is torn down.
454#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
455pub struct FirmwareUpdateInitRequest {
456 /// Seal[Cloud->temp-key]["firmware-v1"][\[version, sha256\]](sym-key)
457 #[prost(bytes = "vec", tag = "1")]
458 pub access: ::prost::alloc::vec::Vec<u8>,
459}
460/// FirmwareUpdateInitResponse acknowledges the initiated update procedure. A
461/// rejected request gets an error instead.
462///
463/// Note, if the init is rejected, the entire update process is torn down.
464#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
465pub struct FirmwareUpdateInitResponse {}
466/// FirmwareUpdateUploadRequest requests appending a new chunk of data to the
467/// currently pending firmware upload process.
468#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
469pub struct FirmwareUpdateUploadRequest {
470 /// Chunk of firmware blob to append (reasonably capped)
471 #[prost(bytes = "vec", tag = "1")]
472 pub chunk: ::prost::alloc::vec::Vec<u8>,
473}
474/// FirmwareUpdateUploadResponse is the response whether the requested chunk was
475/// accepted or rejected.
476///
477/// Note, if the upload is rejected, the entire update process is torn down.
478#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
479pub struct FirmwareUpdateUploadResponse {}
480/// FirmwareUpdateVerifyRequest requests decrypting the uploaded firmware and
481/// verifying its contents, preparing for the last step of actually installing
482/// the firmware update.
483#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
484pub struct FirmwareUpdateVerifyRequest {}
485/// FirmwareUpdateVerifyResponse is the response whether the firmware just uploaded
486/// passed all verifications and is ready for application.
487///
488/// Note, if the verification is rejected, the entire update process is torn down.
489#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
490pub struct FirmwareUpdateVerifyResponse {}
491/// FirmwareUpdateInstallRequest requests the currently pending (but already
492/// verified) firmware to be applied to disk. This message will cause the device
493/// to reboot if applied successfully.
494#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
495pub struct FirmwareUpdateInstallRequest {}
496/// FirmwareUpdateInstallResponse is the response whether the firmware was applied
497/// successfully or not.
498#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
499pub struct FirmwareUpdateInstallResponse {}
500/// PairingAuthRequest requests the initiation of a pairing.
501#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
502pub struct PairingAuthRequest {}
503/// PairingAuthResponse responds whether the device is in a state compatible with
504/// pairing (i.e. reset) and if so, it signs an authorization for the server to open
505/// a new rendezvous point; containing the xHPKE public key to use for encrypting
506/// messages to this Ark after pairing.
507#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
508pub struct PairingAuthResponse {
509 /// Seal[Ark->Cloud]["pairing-v1"][null](pair-key)
510 #[prost(bytes = "vec", tag = "1")]
511 pub auth: ::prost::alloc::vec::Vec<u8>,
512 /// Fingerprint of the pair-key to transmit to the app out-of-protocol
513 #[prost(bytes = "vec", tag = "2")]
514 pub fprint: ::prost::alloc::vec::Vec<u8>,
515}
516/// PairingSetAppIdentityRequest injects the companion app's identity, relayed
517/// by the cloud.
518#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
519pub struct PairingSetAppIdentityRequest {
520 /// Seal[Cloud->Ark]["pairing-v1:identity"][\[ark_signer_id, ark_crypto_id\]](\[app_signer, app_crypto\])
521 #[prost(bytes = "vec", tag = "1")]
522 pub identity: ::prost::alloc::vec::Vec<u8>,
523}
524/// PairingSetAppIdentityResponse confirms whether the remote identity was
525/// accepted by the Ark or not.
526#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
527pub struct PairingSetAppIdentityResponse {}
528/// PairingSetAppStorageRequest injects the app's storage key material into the
529/// pairing flow.
530#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
531pub struct PairingSetAppStorageRequest {
532 /// Seal[App->Ark]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](\[app_keymat\])
533 #[prost(bytes = "vec", tag = "1")]
534 pub app_key: ::prost::alloc::vec::Vec<u8>,
535}
536/// PairingSetAppStorageResponse confirms whether the remote storage material
537/// was accepted, and if so, bundles the ark device infos and ark key material.
538#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
539pub struct PairingSetAppStorageResponse {
540 /// Seal[Ark->App]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id, app_keymat\]](\[hw_ver, hw_rev, fw_ver, fw_pub, ark_keymat\])
541 #[prost(bytes = "vec", tag = "1")]
542 pub ark_keys: ::prost::alloc::vec::Vec<u8>,
543}
544/// PairingAckArkStorageRequest confirms from the app that the Ark's key material
545/// was received correctly.
546#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
547pub struct PairingAckArkStorageRequest {
548 /// Seal[App->Ark]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id, ark_keymat\]](null)
549 #[prost(bytes = "vec", tag = "1")]
550 pub app_ack: ::prost::alloc::vec::Vec<u8>,
551}
552/// PairingAckArkStorageResponse confirms that the key ack was accepted.
553#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
554pub struct PairingAckArkStorageResponse {}
555/// PairingAcceptanceRequest is a blocking poller to wait until the user accepts
556/// a pairing request or it times out.
557#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
558pub struct PairingAcceptanceRequest {}
559/// PairingAcceptanceResponse returns whether the user accepted the pairing or
560/// if it timed out. At this point, the device still needs to format itself.
561#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
562pub struct PairingAcceptanceResponse {
563 /// Seal[Ark->Cloud]["pairing-v1:accept"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](null)
564 #[prost(bytes = "vec", tag = "1")]
565 pub confirm: ::prost::alloc::vec::Vec<u8>,
566}
567/// PairingCompletionRequest is a blocking poller to wait until the device finishes
568/// any pairing maintenance operation (e.g. encrypting itself).
569#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
570pub struct PairingCompletionRequest {}
571/// PairingCompletionResponse returns whether the device finished preparing for
572/// live operation.
573#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
574pub struct PairingCompletionResponse {
575 /// Seal[Ark->Cloud]["pairing-v1:complete"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](null)
576 #[prost(bytes = "vec", tag = "1")]
577 pub confirm: ::prost::alloc::vec::Vec<u8>,
578}
579/// RelayJoinRequest requests authorization to join the communication relay with
580/// the companion app.
581#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
582pub struct RelayJoinRequest {}
583/// RelayJoinResponse responds whether the device is in a state compatible with
584/// relaying (i.e. paired) and if so, it signs an authorization for the server
585/// to join the rendezvous point.
586#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
587pub struct RelayJoinResponse {
588 /// Seal[Ark->Cloud]["relaying-v2:join"][cloud_crypto_id](null)
589 #[prost(bytes = "vec", tag = "1")]
590 pub auth: ::prost::alloc::vec::Vec<u8>,
591}
592/// RelayInboundRequest forwards one frame from the host's relay socket to the Ark.
593///
594/// The relay connects the Ark with its companion app through the host and the
595/// cloud. Its frames are opaque to the host, which forwards them unchanged in
596/// both directions and never interprets them. Each frame is sealed to its
597/// recipient by the other endpoint, or by the cloud itself, and its
598/// authenticated data names the recipient's encryption key.
599///
600/// The host sends one request for each message its relay socket delivers, in
601/// arrival order.
602#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
603pub struct RelayInboundRequest {
604 /// Seal[App|Cloud->Ark]["relaying-v2:frame"][ark_crypto_id](...)
605 #[prost(bytes = "vec", tag = "1")]
606 pub frame: ::prost::alloc::vec::Vec<u8>,
607}
608/// RelayInboundResponse confirms the Ark opened the frame, which decrypted and
609/// verified. The Ark answers before acting on the frame's content, and refuses
610/// a frame it cannot open with an error whose message names the cause.
611#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
612pub struct RelayInboundResponse {}
613/// RelayOutboundRequest asks the host to write one frame to its relay socket.
614///
615/// A host without a relay socket attaches one first through relay_join. If it
616/// cannot, it answers with the reserved UNAVAILABLE error.
617#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
618pub struct RelayOutboundRequest {
619 /// Seal[Ark->App]["relaying-v2:frame"][app_crypto_id](...)
620 #[prost(bytes = "vec", tag = "1")]
621 pub frame: ::prost::alloc::vec::Vec<u8>,
622}
623/// RelayOutboundResponse confirms that the relay socket accepted the frame, which
624/// does not mean the frame reached the app.
625#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
626pub struct RelayOutboundResponse {}
627/// UnlockRequest asks the Ark to open its user data storage.
628///
629/// The Ark answers once the owner approves or declines on their phone, or the
630/// approval window runs out.
631#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
632pub struct UnlockRequest {}
633/// UnlockResponse acknowledges the completed unlock. Any other outcome gets an
634/// error instead.
635#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
636pub struct UnlockResponse {}
637/// ExecutionCreateRequest creates a task, naming its main app's module by its
638/// 32-byte SHA-256 digest. The Ark answers at once with a new task id, or
639/// refuses when it has no free task slot.
640///
641/// The task belongs to the session that created it. Ending that session drops
642/// the task at any stage, canceling apps that still run. A task that waits 5s
643/// between steps without the host's next request expires.
644#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
645pub struct ExecutionCreateRequest {
646 /// Main module's SHA-256 digest, exactly 32 bytes
647 #[prost(bytes = "vec", tag = "1")]
648 pub sha256: ::prost::alloc::vec::Vec<u8>,
649}
650/// ExecutionCreateResponse contains the new task's id, which every later
651/// message about it carries.
652#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
653pub struct ExecutionCreateResponse {
654 /// Task id to load and start
655 #[prost(uint64, tag = "1")]
656 pub taskid: u64,
657}
658/// ExecutionLoadRequest fetches and checks every module of the task and runs
659/// their manifest passes. It fetches the main module first, then dependencies,
660/// depth first in manifest order, each distinct module once. The Ark asks the
661/// host through exec_module_size and exec_module_read, one request per task
662/// in flight. A request left unanswered for 30s fails the task.
663///
664/// Loading has no overall deadline. The host waits for the Ark's answer or
665/// cancels the task. A task already loaded or started fails this request.
666#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
667pub struct ExecutionLoadRequest {
668 /// Task id returned by ExecutionCreateResponse
669 #[prost(uint64, tag = "1")]
670 pub taskid: u64,
671}
672/// ExecutionLoadResponse acknowledges that the task is loaded. A refusal gets
673/// an error instead.
674#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
675pub struct ExecutionLoadResponse {}
676/// ExecutionStartRequest reserves room for the task's approval records and
677/// opens the approval on the owner's phone. It fails unless the task is loaded.
678///
679/// The Ark answers once the owner approves. A decline gets the reserved
680/// UNAUTHORIZED error, an expired approval UNCONFIRMED, and an approval that
681/// could not be sent to the phone UNDELIVERED.
682#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
683pub struct ExecutionStartRequest {
684 /// Task id returned by ExecutionCreateResponse
685 #[prost(uint64, tag = "1")]
686 pub taskid: u64,
687}
688/// ExecutionStartResponse acknowledges the owner's approval, after which the
689/// task's apps run.
690#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
691pub struct ExecutionStartResponse {}
692/// ExecutionCancelRequest cancels a task at any stage before its apps end,
693/// including loading and awaiting the owner's approval. Canceling a task whose
694/// apps run fails it, and its report then goes to the owner's review like any
695/// other. A task whose apps already ended cannot be canceled.
696#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
697pub struct ExecutionCancelRequest {
698 /// Task id to cancel
699 #[prost(uint64, tag = "1")]
700 pub taskid: u64,
701}
702/// ExecutionCancelResponse acknowledges the canceled task.
703#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
704pub struct ExecutionCancelResponse {}
705/// ExecutionStatusRequest checks where a task stands after approval. Only the
706/// session that created the task can check it.
707#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
708pub struct ExecutionStatusRequest {
709 /// Task id to check
710 #[prost(uint64, tag = "1")]
711 pub taskid: u64,
712}
713/// ExecutionStatusResponse reports where an approved task stands.
714#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
715pub struct ExecutionStatusResponse {
716 /// Where the task stands
717 #[prost(enumeration = "ExecutionState", tag = "3")]
718 pub state: i32,
719}
720/// ExecutionResultRequest fetches the result of a resolved task for the session
721/// that created it.
722///
723/// A released task answers with what the owner saw, the same until the task
724/// closes for the host. A withheld task fails it with the reserved error its
725/// report's approval closed with, and that failure closes the task.
726#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
727pub struct ExecutionResultRequest {
728 /// Task id to fetch the result of
729 #[prost(uint64, tag = "1")]
730 pub taskid: u64,
731}
732/// ExecutionResultResponse holds what the owner saw when releasing the task's
733/// output, which the host then reads through ExecutionOutputRequest.
734#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
735pub struct ExecutionResultResponse {
736 /// App name from its manifest
737 #[prost(string, tag = "1")]
738 pub name: ::prost::alloc::string::String,
739 /// App version from its manifest
740 #[prost(string, tag = "2")]
741 pub version: ::prost::alloc::string::String,
742 /// Whether the app is a develop build
743 #[prost(bool, tag = "3")]
744 pub develop: bool,
745 /// Whether the task succeeded
746 #[prost(bool, tag = "4")]
747 pub success: bool,
748 /// Paths of the owner's data as mounted, without public grants
749 #[prost(string, repeated, tag = "5")]
750 pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
751 /// Report media type, always text/markdown
752 #[prost(string, tag = "6")]
753 pub media: ::prost::alloc::string::String,
754 /// Length in bytes of the report, the app's standard output
755 #[prost(uint64, tag = "7")]
756 pub stdout_bytes: u64,
757 /// Length in bytes of a develop build's standard error, 0 otherwise
758 #[prost(uint64, tag = "8")]
759 pub stderr_bytes: u64,
760}
761/// ExecutionOutputRequest reads the next piece of a released task's output for
762/// the session that created it.
763///
764/// Each stream is read once and in order, in pieces of the size the host asks
765/// for. The Ark refuses a size of zero, or one whose answer would not fit a
766/// wire message. The task closes for the host once exec_result has answered
767/// and both streams are read to their end.
768#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
769pub struct ExecutionOutputRequest {
770 /// Task id to read the output of
771 #[prost(uint64, tag = "1")]
772 pub taskid: u64,
773 /// Stream to read
774 #[prost(enumeration = "ExecutionStream", tag = "2")]
775 pub stream: i32,
776 /// Bytes of the stream read so far, the only offset the Ark accepts
777 #[prost(uint64, tag = "3")]
778 pub offset: u64,
779 /// Most bytes to return, chosen by the host
780 #[prost(uint64, tag = "4")]
781 pub size: u64,
782}
783/// ExecutionOutputResponse carries the next piece of the requested stream.
784#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
785pub struct ExecutionOutputResponse {
786 /// The requested bytes, fewer only at the stream's end
787 #[prost(bytes = "vec", tag = "1")]
788 pub chunk: ::prost::alloc::vec::Vec<u8>,
789}
790/// ExecutionModuleSizeRequest asks the host for the size of a module of the
791/// task, named by its 32-byte SHA-256 digest. The Ark keeps one module request
792/// in flight per task. Each request gets 30s; an unanswered one fails the task.
793#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
794pub struct ExecutionModuleSizeRequest {
795 /// Task id whose module the Ark needs
796 #[prost(uint64, tag = "1")]
797 pub taskid: u64,
798 /// Module's SHA-256 digest, exactly 32 bytes
799 #[prost(bytes = "vec", tag = "2")]
800 pub sha256: ::prost::alloc::vec::Vec<u8>,
801}
802/// ExecutionModuleSizeResponse returns the module's size in bytes. A host that
803/// cannot serve the module answers with an error, and the Ark refuses the task.
804#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
805pub struct ExecutionModuleSizeResponse {
806 /// Size of the module in bytes
807 #[prost(uint64, tag = "1")]
808 pub size: u64,
809}
810/// ExecutionModuleReadRequest asks the host for a module's bytes from offset,
811/// at most size of them. The request never passes the module's end and asks for
812/// at most 1 MiB. The Ark keeps one module request in flight per task. Each
813/// request gets 30s; an unanswered one fails the task.
814#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
815pub struct ExecutionModuleReadRequest {
816 /// Task id whose module the Ark needs
817 #[prost(uint64, tag = "1")]
818 pub taskid: u64,
819 /// Module's SHA-256 digest, exactly 32 bytes
820 #[prost(bytes = "vec", tag = "2")]
821 pub sha256: ::prost::alloc::vec::Vec<u8>,
822 /// Byte offset within the module
823 #[prost(uint64, tag = "3")]
824 pub offset: u64,
825 /// Most bytes to return, at most 1 MiB
826 #[prost(uint64, tag = "4")]
827 pub size: u64,
828}
829/// ExecutionModuleReadResponse carries at least one byte and at most the size
830/// requested. The Ark continues where the answer ended. An empty or longer
831/// answer fails the task.
832///
833/// Hosts answer once they hold the size asked for, or about once a second with
834/// what they hold, whichever comes first.
835#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
836pub struct ExecutionModuleReadResponse {
837 /// Bytes of the module from the requested offset
838 #[prost(bytes = "vec", tag = "1")]
839 pub chunk: ::prost::alloc::vec::Vec<u8>,
840}
841/// SlotDownload describes the public download the device advertises for a
842/// reference slot, so a host can fetch it and stream it back in.
843#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
844pub struct SlotDownload {
845 /// Public download URL
846 #[prost(string, tag = "1")]
847 pub url: ::prost::alloc::string::String,
848 /// Download size in bytes
849 #[prost(uint64, tag = "2")]
850 pub bytes: u64,
851 /// Download SHA256 checksum
852 #[prost(string, tag = "3")]
853 pub sha256: ::prost::alloc::string::String,
854}
855/// SlotStatus describes the current state of a single slot on the device. The
856/// data fields are generic so a host renders a kind it has never seen.
857#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
858pub struct SlotStatus {
859 /// Slot type
860 #[prost(enumeration = "SlotKind", tag = "1")]
861 pub kind: i32,
862 /// Human-readable slot name
863 #[prost(string, tag = "2")]
864 pub name: ::prost::alloc::string::String,
865 /// Owner-facing description of the data this slot holds
866 #[prost(string, tag = "3")]
867 pub desc: ::prost::alloc::string::String,
868 /// The file that fills this slot, its required shape and what is refused
869 #[prost(string, tag = "4")]
870 pub format: ::prost::alloc::string::String,
871 /// Nature of the data (personal, reference)
872 #[prost(enumeration = "SlotOrigin", tag = "5")]
873 pub origin: i32,
874 /// Whether the slot is empty, filled or damaged
875 #[prost(enumeration = "SlotState", tag = "6")]
876 pub state: i32,
877 /// Why the slot is damaged, empty otherwise
878 #[prost(string, tag = "7")]
879 pub damage: ::prost::alloc::string::String,
880 /// Slots that must be filled before this one is actionable
881 #[prost(enumeration = "SlotKind", repeated, tag = "8")]
882 pub deps: ::prost::alloc::vec::Vec<i32>,
883 /// Bytes on disk for this slot (0 if empty)
884 #[prost(uint64, tag = "9")]
885 pub bytes: u64,
886 /// Reference assembly the data is keyed to (e.g. "GRCh38.p14")
887 #[prost(string, tag = "10")]
888 pub build: ::prost::alloc::string::String,
889 /// The dataset's own release, if it has one (e.g. dbSNP "157")
890 #[prost(string, tag = "11")]
891 pub version: ::prost::alloc::string::String,
892 /// Advertised public download, absent if none
893 #[prost(message, optional, tag = "12")]
894 pub download: ::core::option::Option<SlotDownload>,
895}
896/// SlotListRequest requests the state of all slots on the device.
897#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
898pub struct SlotListRequest {}
899/// SlotListResponse contains the current state of every slot.
900#[derive(Clone, PartialEq, ::prost::Message)]
901pub struct SlotListResponse {
902 /// State of every slot, one entry per slot kind
903 #[prost(message, repeated, tag = "1")]
904 pub slots: ::prost::alloc::vec::Vec<SlotStatus>,
905}
906/// SlotRepairRequest resets a slot to empty regardless of its current state.
907/// Unlike SlotDelete (which requires the slot to be filled), repair is a stateless
908/// force cleanup that removes any leftover metadata and/or files on disk. It is
909/// intended for recovering from corruption or half-written state after crashes.
910#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
911pub struct SlotRepairRequest {
912 /// Slot to repair (reset to empty)
913 #[prost(enumeration = "SlotKind", tag = "1")]
914 pub slot: i32,
915}
916/// SlotRepairResponse is an empty ack of the repair request.
917#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
918pub struct SlotRepairResponse {}
919/// SlotDeleteRequest removes the contents of a filled slot. The slot must be
920/// in a healthy, filled state; corrupted or half-written slots must be cleaned
921/// up via SlotRepair instead.
922#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
923pub struct SlotDeleteRequest {
924 /// Slot to delete
925 #[prost(enumeration = "SlotKind", tag = "1")]
926 pub slot: i32,
927}
928/// SlotDeleteResponse is an empty ack of the delete request.
929#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
930pub struct SlotDeleteResponse {}
931/// SlotIdentifyRequest sends an ephemeral file chunk to the Ark and asks it to
932/// identify the file. Its purpose is to filter potentially huge files (e.g. a
933/// 30GB compressed whole genome sequencing) before uploading them, and to
934/// answer what a file is without uploading it at all.
935#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
936pub struct SlotIdentifyRequest {
937 /// File name to guess the contents of
938 #[prost(string, tag = "1")]
939 pub name: ::prost::alloc::string::String,
940 /// File size to guess the contents of
941 #[prost(uint64, tag = "2")]
942 pub size: u64,
943 /// First chunk of the file to guess the contents of
944 #[prost(bytes = "vec", tag = "3")]
945 pub chunk: ::prost::alloc::vec::Vec<u8>,
946 /// Possible slots to interpret as (empty == any)
947 #[prost(enumeration = "SlotKind", repeated, tag = "4")]
948 pub kinds: ::prost::alloc::vec::Vec<i32>,
949}
950/// SlotIdentifyResponse contains the identification based on the chunk shared
951/// in the request.
952#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
953pub struct SlotIdentifyResponse {
954 /// Identified slot type to use during upload
955 #[prost(enumeration = "SlotKind", tag = "1")]
956 pub kind: i32,
957 /// Identification confidence level
958 #[prost(enumeration = "SlotConfidence", tag = "2")]
959 pub conf: i32,
960 /// Short summary of the identified data
961 #[prost(string, tag = "3")]
962 pub summary: ::prost::alloc::string::String,
963 /// Detailed description of the identified data
964 #[prost(string, tag = "4")]
965 pub details: ::prost::alloc::string::String,
966 /// Reason why the file is rejected, empty otherwise
967 #[prost(string, tag = "5")]
968 pub rejection: ::prost::alloc::string::String,
969}
970/// SlotUploadStartRequest requests uploading a file into a slot of the given
971/// kind (e.g. a whole genome variant call file).
972#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
973pub struct SlotUploadStartRequest {
974 /// Slot type requesting to upload
975 #[prost(enumeration = "SlotKind", tag = "1")]
976 pub kind: i32,
977 /// File name to guess the contents of
978 #[prost(string, tag = "2")]
979 pub name: ::prost::alloc::string::String,
980 /// File size to guess the contents of
981 #[prost(uint64, tag = "3")]
982 pub size: u64,
983 /// First chunk of the file to guess the contents of
984 #[prost(bytes = "vec", tag = "4")]
985 pub chunk: ::prost::alloc::vec::Vec<u8>,
986}
987/// SlotUploadStartResponse contains a unique session id for an approved upload.
988#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
989pub struct SlotUploadStartResponse {
990 /// Session id for concurrent uploads (not recommended)
991 #[prost(uint64, tag = "1")]
992 pub session: u64,
993}
994/// SlotUploadChunkRequest contains a new chunk of data to append to a pending
995/// upload session.
996#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
997pub struct SlotUploadChunkRequest {
998 /// Session id into which to append a new chunk
999 #[prost(uint64, tag = "1")]
1000 pub session: u64,
1001 /// Data chunk to append (reasonably capped)
1002 #[prost(bytes = "vec", tag = "2")]
1003 pub chunk: ::prost::alloc::vec::Vec<u8>,
1004}
1005/// SlotUploadChunkResponse is an empty ack of the chunk upload request.
1006#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1007pub struct SlotUploadChunkResponse {}
1008/// SlotUploadCancelRequest contains an upload session id to abort.
1009#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1010pub struct SlotUploadCancelRequest {
1011 /// Session id to cancel
1012 #[prost(uint64, tag = "1")]
1013 pub session: u64,
1014}
1015/// SlotUploadCancelResponse is an empty ack of the cancellation request.
1016#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1017pub struct SlotUploadCancelResponse {}
1018/// SlotPhase names one step of a slot's processing pipeline.
1019#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1020pub struct SlotPhase {
1021 /// Short label for the phase
1022 #[prost(string, tag = "1")]
1023 pub name: ::prost::alloc::string::String,
1024 /// Description of what the phase does
1025 #[prost(string, tag = "2")]
1026 pub desc: ::prost::alloc::string::String,
1027}
1028/// SlotUploadProcessRequest marks an upload session ready for processing and
1029/// requests a progress report to be sent back. May be called multiple times.
1030#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1031pub struct SlotUploadProcessRequest {
1032 /// Session id to mark as completed
1033 #[prost(uint64, tag = "1")]
1034 pub session: u64,
1035}
1036/// SlotUploadProcessResponse acks the completion of a slot upload and also
1037/// contains the current processing progress.
1038#[derive(Clone, PartialEq, ::prost::Message)]
1039pub struct SlotUploadProcessResponse {
1040 /// Unix timestamp when data processing started
1041 #[prost(uint64, tag = "1")]
1042 pub proc_start: u64,
1043 /// Every phase of the pipeline, in order
1044 #[prost(message, repeated, tag = "2")]
1045 pub phases: ::prost::alloc::vec::Vec<SlotPhase>,
1046 /// Current phase (1-indexed)
1047 #[prost(uint64, tag = "3")]
1048 pub phase_in: u64,
1049 /// Unix timestamp when the current phase started
1050 #[prost(uint64, tag = "4")]
1051 pub phase_start: u64,
1052 /// Approximate progress for this phase \[0-10000\]
1053 #[prost(uint64, tag = "5")]
1054 pub phase_progress: u64,
1055 /// Failure reason if processing failed, empty otherwise
1056 #[prost(string, tag = "6")]
1057 pub failure: ::prost::alloc::string::String,
1058}
1059/// DatasetPathsRequest requests the map of every path an app can read, the
1060/// dataset view the device derives from its slots, lenses included.
1061#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1062pub struct DatasetPathsRequest {}
1063/// DatasetPathsResponse maps every path an app can read, available or not, in
1064/// tree order. It describes the tree only and never carries a value from the
1065/// owner's data.
1066#[derive(Clone, PartialEq, ::prost::Message)]
1067pub struct DatasetPathsResponse {
1068 /// Every path pattern, in tree order
1069 #[prost(message, repeated, tag = "1")]
1070 pub paths: ::prost::alloc::vec::Vec<DatasetPath>,
1071}
1072/// DatasetPath describes one path pattern under the data root. A segment in angle
1073/// brackets is a placeholder, described by the directory entry it names. The path
1074/// is the entry's stable key.
1075///
1076/// A grantable path also carries its wording and whether it is public. A public
1077/// path reads nothing about the owner's DNA, such as the reference genome or
1078/// which datasets are uploaded. The wording is an English template that
1079/// describes a grant to the owner, with each placeholder named after the path's
1080/// own, such as "Your genome around variant {rsid}".
1081#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1082pub struct DatasetPath {
1083 /// Path as a manifest names it
1084 #[prost(string, tag = "1")]
1085 pub path: ::prost::alloc::string::String,
1086 /// Directory or file
1087 #[prost(bool, tag = "2")]
1088 pub directory: bool,
1089 /// Whether a manifest may name it
1090 #[prost(bool, tag = "3")]
1091 pub grantable: bool,
1092 /// Whether the data this path needs is on the Ark now
1093 #[prost(bool, tag = "4")]
1094 pub available: bool,
1095 /// What it holds, when it is absent and when it fails
1096 #[prost(string, tag = "5")]
1097 pub desc: ::prost::alloc::string::String,
1098 /// Exact file content, or what a directory lists
1099 #[prost(string, tag = "6")]
1100 pub format: ::prost::alloc::string::String,
1101 /// Complete example values, most typical first
1102 #[prost(string, repeated, tag = "7")]
1103 pub examples: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1104 /// Whether a grant reads nothing about the owner's DNA, for grantable paths
1105 #[prost(bool, tag = "8")]
1106 pub public: bool,
1107 /// Template wording a grant to the owner, for grantable paths
1108 #[prost(string, tag = "9")]
1109 pub wording: ::prost::alloc::string::String,
1110}
1111/// ReservedErrors names the assigned protocol-wide errors in the reserved range
1112/// 0x00 to 0xff (inclusive). No code in this range may be assigned a request
1113/// specific meaning. Assigned codes must not be repurposed.
1114#[non_exhaustive]
1115#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1116#[repr(i32)]
1117pub enum ReservedErrors {
1118 /// A failure without a standardized reason. Zero does not indicate success;
1119 /// the presence of an Error in the response indicates failure.
1120 Unspecified = 0,
1121 /// The request's responder was released without providing an application reply.
1122 Unanswered = 1,
1123 /// The peer does not know this request. Emitted by the protocol layer itself
1124 /// when a request's content is not in its schema.
1125 Unknown = 2,
1126 /// The peer knows this request but never serves it in this build or role,
1127 /// firmware updates on an emulator or develop envelopes on production.
1128 Unsupported = 3,
1129 /// The peer serves this request but not in its current state, before cloud
1130 /// sync or pairing. It may once the state changes.
1131 Unavailable = 4,
1132 /// The peer serves this request but the phone approval it depends on did not
1133 /// authorize it. The owner declined, or the phone's answer broke the approval's
1134 /// rules and counts as a decline.
1135 Unauthorized = 5,
1136 /// The peer serves this request but the approval it depends on did not arrive
1137 /// before its window ran out, on the phone or at the button.
1138 Unconfirmed = 6,
1139 /// The peer serves this request but the approval it depends on could not be
1140 /// sent to the phone, since the relay failed on the way.
1141 Undelivered = 7,
1142}
1143impl ReservedErrors {
1144 /// String value of the enum field names used in the ProtoBuf definition.
1145 ///
1146 /// The values are not transformed in any way and thus are considered stable
1147 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1148 pub fn as_str_name(&self) -> &'static str {
1149 match self {
1150 Self::Unspecified => "RESERVED_ERRORS_UNSPECIFIED",
1151 Self::Unanswered => "RESERVED_ERRORS_UNANSWERED",
1152 Self::Unknown => "RESERVED_ERRORS_UNKNOWN",
1153 Self::Unsupported => "RESERVED_ERRORS_UNSUPPORTED",
1154 Self::Unavailable => "RESERVED_ERRORS_UNAVAILABLE",
1155 Self::Unauthorized => "RESERVED_ERRORS_UNAUTHORIZED",
1156 Self::Unconfirmed => "RESERVED_ERRORS_UNCONFIRMED",
1157 Self::Undelivered => "RESERVED_ERRORS_UNDELIVERED",
1158 }
1159 }
1160 /// Creates an enum from field names used in the ProtoBuf definition.
1161 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1162 match value {
1163 "RESERVED_ERRORS_UNSPECIFIED" => Some(Self::Unspecified),
1164 "RESERVED_ERRORS_UNANSWERED" => Some(Self::Unanswered),
1165 "RESERVED_ERRORS_UNKNOWN" => Some(Self::Unknown),
1166 "RESERVED_ERRORS_UNSUPPORTED" => Some(Self::Unsupported),
1167 "RESERVED_ERRORS_UNAVAILABLE" => Some(Self::Unavailable),
1168 "RESERVED_ERRORS_UNAUTHORIZED" => Some(Self::Unauthorized),
1169 "RESERVED_ERRORS_UNCONFIRMED" => Some(Self::Unconfirmed),
1170 "RESERVED_ERRORS_UNDELIVERED" => Some(Self::Undelivered),
1171 _ => None,
1172 }
1173 }
1174}
1175/// ExecutionState is where an approved task stands for its host.
1176#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1177#[repr(i32)]
1178pub enum ExecutionState {
1179 /// Never sent, an unset state
1180 Unspecified = 0,
1181 /// The task's apps still run
1182 Running = 1,
1183 /// Apps ended, owner reviews the report
1184 Awaiting = 2,
1185 /// The review closed, so exec_result answers
1186 Resolved = 3,
1187}
1188impl ExecutionState {
1189 /// String value of the enum field names used in the ProtoBuf definition.
1190 ///
1191 /// The values are not transformed in any way and thus are considered stable
1192 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1193 pub fn as_str_name(&self) -> &'static str {
1194 match self {
1195 Self::Unspecified => "EXECUTION_STATE_UNSPECIFIED",
1196 Self::Running => "EXECUTION_STATE_RUNNING",
1197 Self::Awaiting => "EXECUTION_STATE_AWAITING",
1198 Self::Resolved => "EXECUTION_STATE_RESOLVED",
1199 }
1200 }
1201 /// Creates an enum from field names used in the ProtoBuf definition.
1202 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1203 match value {
1204 "EXECUTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1205 "EXECUTION_STATE_RUNNING" => Some(Self::Running),
1206 "EXECUTION_STATE_AWAITING" => Some(Self::Awaiting),
1207 "EXECUTION_STATE_RESOLVED" => Some(Self::Resolved),
1208 _ => None,
1209 }
1210 }
1211}
1212/// ExecutionStream names one of the app's output streams.
1213#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1214#[repr(i32)]
1215pub enum ExecutionStream {
1216 /// Never sent, an unset stream
1217 Unspecified = 0,
1218 /// Standard output, the report
1219 Stdout = 1,
1220 /// Standard error, kept for develop builds only
1221 Stderr = 2,
1222}
1223impl ExecutionStream {
1224 /// String value of the enum field names used in the ProtoBuf definition.
1225 ///
1226 /// The values are not transformed in any way and thus are considered stable
1227 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1228 pub fn as_str_name(&self) -> &'static str {
1229 match self {
1230 Self::Unspecified => "EXECUTION_STREAM_UNSPECIFIED",
1231 Self::Stdout => "EXECUTION_STREAM_STDOUT",
1232 Self::Stderr => "EXECUTION_STREAM_STDERR",
1233 }
1234 }
1235 /// Creates an enum from field names used in the ProtoBuf definition.
1236 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1237 match value {
1238 "EXECUTION_STREAM_UNSPECIFIED" => Some(Self::Unspecified),
1239 "EXECUTION_STREAM_STDOUT" => Some(Self::Stdout),
1240 "EXECUTION_STREAM_STDERR" => Some(Self::Stderr),
1241 _ => None,
1242 }
1243 }
1244}
1245/// SlotKind identifies a slot on the device. Each value corresponds to a unique
1246/// data type that the device can store and manage.
1247#[non_exhaustive]
1248#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1249#[repr(i32)]
1250pub enum SlotKind {
1251 /// Never sent, an unset kind
1252 Unspecified = 0,
1253 /// Human reference genome assembly
1254 ReferenceGenome = 1,
1255 /// Gene-to-coordinate mapping database
1256 GeneAnnotations = 2,
1257 /// User's small variant calls, SNVs and indels
1258 SmallVariants = 3,
1259 /// Variant catalog (rsID-to-position), from dbSNP
1260 VariantCatalog = 4,
1261 /// User's structural variant calls
1262 StructuralVariants = 5,
1263 /// User's copy number calls
1264 CopyNumberVariants = 6,
1265}
1266impl SlotKind {
1267 /// String value of the enum field names used in the ProtoBuf definition.
1268 ///
1269 /// The values are not transformed in any way and thus are considered stable
1270 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1271 pub fn as_str_name(&self) -> &'static str {
1272 match self {
1273 Self::Unspecified => "SLOT_KIND_UNSPECIFIED",
1274 Self::ReferenceGenome => "SLOT_KIND_REFERENCE_GENOME",
1275 Self::GeneAnnotations => "SLOT_KIND_GENE_ANNOTATIONS",
1276 Self::SmallVariants => "SLOT_KIND_SMALL_VARIANTS",
1277 Self::VariantCatalog => "SLOT_KIND_VARIANT_CATALOG",
1278 Self::StructuralVariants => "SLOT_KIND_STRUCTURAL_VARIANTS",
1279 Self::CopyNumberVariants => "SLOT_KIND_COPY_NUMBER_VARIANTS",
1280 }
1281 }
1282 /// Creates an enum from field names used in the ProtoBuf definition.
1283 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1284 match value {
1285 "SLOT_KIND_UNSPECIFIED" => Some(Self::Unspecified),
1286 "SLOT_KIND_REFERENCE_GENOME" => Some(Self::ReferenceGenome),
1287 "SLOT_KIND_GENE_ANNOTATIONS" => Some(Self::GeneAnnotations),
1288 "SLOT_KIND_SMALL_VARIANTS" => Some(Self::SmallVariants),
1289 "SLOT_KIND_VARIANT_CATALOG" => Some(Self::VariantCatalog),
1290 "SLOT_KIND_STRUCTURAL_VARIANTS" => Some(Self::StructuralVariants),
1291 "SLOT_KIND_COPY_NUMBER_VARIANTS" => Some(Self::CopyNumberVariants),
1292 _ => None,
1293 }
1294 }
1295}
1296/// SlotOrigin describes the nature of the data in a slot, determining what
1297/// actions are available to the user for filling it.
1298#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1299#[repr(i32)]
1300pub enum SlotOrigin {
1301 /// Never sent, an unset origin
1302 Unspecified = 0,
1303 /// Unique to the user, uploaded by them
1304 Personal = 1,
1305 /// Standard reference data, downloaded from public sources
1306 Reference = 2,
1307}
1308impl SlotOrigin {
1309 /// String value of the enum field names used in the ProtoBuf definition.
1310 ///
1311 /// The values are not transformed in any way and thus are considered stable
1312 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1313 pub fn as_str_name(&self) -> &'static str {
1314 match self {
1315 Self::Unspecified => "SLOT_ORIGIN_UNSPECIFIED",
1316 Self::Personal => "SLOT_ORIGIN_PERSONAL",
1317 Self::Reference => "SLOT_ORIGIN_REFERENCE",
1318 }
1319 }
1320 /// Creates an enum from field names used in the ProtoBuf definition.
1321 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1322 match value {
1323 "SLOT_ORIGIN_UNSPECIFIED" => Some(Self::Unspecified),
1324 "SLOT_ORIGIN_PERSONAL" => Some(Self::Personal),
1325 "SLOT_ORIGIN_REFERENCE" => Some(Self::Reference),
1326 _ => None,
1327 }
1328 }
1329}
1330/// SlotState describes whether a slot holds data and whether that data is sound.
1331#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1332#[repr(i32)]
1333pub enum SlotState {
1334 /// Never sent, an unset state
1335 Unspecified = 0,
1336 /// Nothing stored
1337 Empty = 1,
1338 /// Data present and healthy
1339 Filled = 2,
1340 /// Files exist but the metadata is missing, corrupt or outdated
1341 Damaged = 3,
1342}
1343impl SlotState {
1344 /// String value of the enum field names used in the ProtoBuf definition.
1345 ///
1346 /// The values are not transformed in any way and thus are considered stable
1347 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1348 pub fn as_str_name(&self) -> &'static str {
1349 match self {
1350 Self::Unspecified => "SLOT_STATE_UNSPECIFIED",
1351 Self::Empty => "SLOT_STATE_EMPTY",
1352 Self::Filled => "SLOT_STATE_FILLED",
1353 Self::Damaged => "SLOT_STATE_DAMAGED",
1354 }
1355 }
1356 /// Creates an enum from field names used in the ProtoBuf definition.
1357 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1358 match value {
1359 "SLOT_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1360 "SLOT_STATE_EMPTY" => Some(Self::Empty),
1361 "SLOT_STATE_FILLED" => Some(Self::Filled),
1362 "SLOT_STATE_DAMAGED" => Some(Self::Damaged),
1363 _ => None,
1364 }
1365 }
1366}
1367/// SlotConfidence indicates how confident the device is in its identification
1368/// of a file, based on content, filename and size.
1369#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1370#[repr(i32)]
1371pub enum SlotConfidence {
1372 /// Never sent, an unset confidence
1373 Unspecified = 0,
1374 /// Filename/extension only, no content confirmation
1375 Low = 1,
1376 /// Format detected but slot type inferred from size/filename
1377 Mid = 2,
1378 /// Magic bytes match and format-specific content confirmed
1379 High = 3,
1380}
1381impl SlotConfidence {
1382 /// String value of the enum field names used in the ProtoBuf definition.
1383 ///
1384 /// The values are not transformed in any way and thus are considered stable
1385 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1386 pub fn as_str_name(&self) -> &'static str {
1387 match self {
1388 Self::Unspecified => "SLOT_CONFIDENCE_UNSPECIFIED",
1389 Self::Low => "SLOT_CONFIDENCE_LOW",
1390 Self::Mid => "SLOT_CONFIDENCE_MID",
1391 Self::High => "SLOT_CONFIDENCE_HIGH",
1392 }
1393 }
1394 /// Creates an enum from field names used in the ProtoBuf definition.
1395 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1396 match value {
1397 "SLOT_CONFIDENCE_UNSPECIFIED" => Some(Self::Unspecified),
1398 "SLOT_CONFIDENCE_LOW" => Some(Self::Low),
1399 "SLOT_CONFIDENCE_MID" => Some(Self::Mid),
1400 "SLOT_CONFIDENCE_HIGH" => Some(Self::High),
1401 _ => None,
1402 }
1403 }
1404}