Skip to main content

systemprompt_sync/deploy/
request.rs

1//! Typed inputs and outputs for [`super::DeployOrchestrator`].
2//!
3//! Copyright (c) systemprompt.io — Business Source License 1.1.
4//! See <https://systemprompt.io> for licensing details.
5
6use std::path::PathBuf;
7
8use systemprompt_cloud::CloudCredentials;
9use systemprompt_identifiers::TenantId;
10
11#[derive(Debug)]
12pub struct DeployRequest {
13    pub tenant_id: TenantId,
14    pub tenant_name: String,
15    pub profile_name: String,
16    pub project_root: PathBuf,
17    pub credentials: CloudCredentials,
18    pub hostname: Option<String>,
19    pub secrets_path: PathBuf,
20    pub signing_key_path: PathBuf,
21    pub options: DeployOptions,
22}
23
24#[derive(Debug, Clone, Copy)]
25pub struct DeployOptions {
26    pub skip_push: bool,
27    pub dry_run: bool,
28    /// `None` runs the pipeline without any pre-sync phase (and without the
29    /// skip warnings) — used for the initial deploy of a freshly provisioned
30    /// tenant, where no runtime files exist yet to lose.
31    pub pre_sync: Option<PreSyncOptions>,
32}
33
34#[derive(Debug, Clone, Copy)]
35pub struct PreSyncOptions {
36    pub no_sync: bool,
37    pub assume_yes: bool,
38}
39
40#[derive(Debug)]
41pub struct DeployReport {
42    pub outcome: DeployOutcome,
43}
44
45#[derive(Debug)]
46pub enum DeployOutcome {
47    DryRun,
48    Deployed {
49        image: String,
50        status: String,
51        app_url: Option<String>,
52    },
53}