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