| 1 | //! Operations shared by the `asc` command line and its MCP server. |
| 2 | //! |
| 3 | //! Both surfaces need the same things: resolve credentials, call the App |
| 4 | //! Store Connect client, and shape the result into something worth showing |
| 5 | //! a human or handing a model. Putting that here means the two front ends |
| 6 | //! cannot drift, and in particular that the ordering guarantee in |
| 7 | //! [`certificates::issue_certificate`] (private key written before the |
| 8 | //! network call) has exactly one implementation. |
| 9 | //! |
| 10 | //! Two rules the result types are built around, because one of the |
| 11 | //! consumers is a language model: |
| 12 | //! |
| 13 | //! - **No key material in a result.** [`certificates::IssuedCertificate`] |
| 14 | //! carries the path a key was written to, never the key. Enforced by |
| 15 | //! construction rather than filtered at the edge, since a filter is one |
| 16 | //! refactor away from being bypassed. |
| 17 | //! - **No certificate bodies either.** They are large, never needed to |
| 18 | //! decide what to do next, and would otherwise land in a transcript. |
| 19 | //! [`profiles::ProfileSummary`] applies the same rule to |
| 20 | //! `profileContent`, and [`profiles::download_profile`] returns the path |
| 21 | //! it wrote instead. |
| 22 | |
| 23 | pub mod attach_build; |
| 24 | pub mod await_processing; |
| 25 | pub mod certificates; |
| 26 | pub mod enums; |
| 27 | pub mod env; |
| 28 | #[cfg(target_os = "macos")] |
| 29 | pub mod keychain; |
| 30 | pub mod play; |
| 31 | pub mod profiles; |
| 32 | pub mod review; |
| 33 | pub mod time; |
| 34 | pub mod upload; |
| 35 | |
| 36 | pub use attach_build::{attach_build, AttachedBuild}; |
| 37 | pub use await_processing::{ |
| 38 | await_processing, classify, AwaitConfig, AwaitOutcome, ProcessingClass, |
| 39 | }; |
| 40 | pub use certificates::{ |
| 41 | certificate_type_from_str, issue_certificate, CertificateSummary, IssuedCertificate, |
| 42 | }; |
| 43 | pub use enums::{bundle_id_platform_from_str, display_type_from_str, platform_from_str}; |
| 44 | pub use env::api_key_from_env; |
| 45 | #[cfg(target_os = "macos")] |
| 46 | pub use keychain::{run_doctor, DoctorCertificate, DoctorReport}; |
| 47 | pub use profiles::{download_profile, profile_type_from_str, DownloadedProfile, ProfileSummary}; |
| 48 | pub use review::{plan_submission, submit_for_review, SubmissionPlan, SubmittedReview}; |
| 49 | pub use time::{is_expired, now_iso8601}; |
| 50 | pub use upload::{upload_package, AltoolAuth, UploadOutcome}; |