Skip to main content

Crate systemprompt_cloud

Crate systemprompt_cloud 

Source
Expand description

§systemprompt-cloud

Cloud API client, credentials management, OAuth login flow, and tenant orchestration for systemprompt.io Cloud deployments. This crate is the bridge between the local CLI/runtime and the systemprompt.io control plane.

§Public surface

§Errors

All public APIs return CloudResult<T> (i.e. Result<T, CloudError>). CloudError composes reqwest, std::io, serde_json, and the more specific CredentialsBootstrapError via #[from] so callers can use ? transparently.

§Feature flags

This crate has no Cargo features — every dependency is required at compile time. The [package.metadata.docs.rs] section in Cargo.toml enables all-features = true for parity with the rest of the workspace.

Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.

Re-exports§

pub use api_client::CloudApiClient;
pub use checkout::CheckoutCallbackResult;
pub use checkout::CheckoutTemplates;
pub use checkout::run_checkout_callback_flow;
pub use checkout::wait_for_provisioning;
pub use cli_session::CliSession;
pub use cli_session::LOCAL_SESSION_KEY;
pub use cli_session::SessionIdentity;
pub use cli_session::SessionKey;
pub use cli_session::SessionStore;
pub use constants::api::PRODUCTION_URL;
pub use constants::api::SANDBOX_URL;
pub use credentials::CloudCredentials;
pub use credentials_bootstrap::CredentialsBootstrap;
pub use credentials_bootstrap::CredentialsBootstrapError;
pub use deploy::DockerfileBuilder;
pub use docker::CommandRunner;
pub use docker::CommandSpec;
pub use docker::DockerCli;
pub use docker::SystemCommandRunner;
pub use error::CloudError;
pub use error::CloudResult;
pub use oauth::OAuthTemplates;
pub use oauth::run_oauth_flow;
pub use paths::CloudPath;
pub use paths::CloudPaths;
pub use paths::DiscoveredProject;
pub use paths::ProfilePath;
pub use paths::ProjectContext;
pub use paths::ProjectPath;
pub use paths::UnifiedContext;
pub use paths::get_cloud_paths;
pub use paths::resolve_path;
pub use tenants::StoredTenant;
pub use tenants::TenantStore;
pub use tenants::TenantType;

Modules§

api_client
systemprompt.io Cloud API client.
auth
JWT expiry inspection used to decide when a cloud session needs refreshing.
checkout
Cloud checkout flow: drive a subscription purchase and wait for the tenant to finish provisioning.
cli_session
Persisted CLI authentication sessions, keyed per local or per tenant.
constants
Compile-time constants for the cloud layer: container paths, callback ports and timeouts, API endpoints, deploy regions, and on-disk file/profile names.
credentials
On-disk representation of authenticated cloud credentials.
credentials_bootstrap
Process-wide cloud credentials bootstrap.
deploy
Deployment building blocks: Dockerfile rendering and validation.
docker
Docker CLI invocations behind a stubbable process-execution seam.
error
Public error type for systemprompt-cloud.
oauth
Browser-based OAuth login flow for the cloud CLI.
paths
Filesystem path resolution for the cloud layer.
profile_authoring
Profile construction for local and cloud deployment targets.
secrets_env
Deploy-time mapping of a profile’s secrets.json to environment variables.
tenants
On-disk representation of cloud tenants the CLI knows about, plus the provisioning flow that creates them.

Structs§

CheckoutEvent
CheckoutResponse
DeployResponse
ListSecretsResponse
ProvisioningEvent
RegistryToken
UserMeResponse

Enums§

Environment
OAuthProvider
ProvisioningEventType
SubscriptionStatus

Functions§

expand_home

Type Aliases§

Plan
StatusResponse
Tenant
TenantInfo
TenantSecrets
TenantStatus
UserInfo