Skip to main content

systemprompt_cloud/paths/
mod.rs

1//! Filesystem path resolution for the cloud layer.
2//!
3//! Covers project discovery ([`DiscoveredProject`]), the typed project/profile
4//! path enums ([`ProjectPath`], [`ProfilePath`], [`ProjectContext`]), the
5//! container-side [`CloudPaths`], and the [`UnifiedContext`] that ties them
6//! together for credential, tenant, and session lookups.
7//!
8//! Copyright (c) systemprompt.io — Business Source License 1.1.
9//! See <https://systemprompt.io> for licensing details.
10
11mod cloud;
12mod context;
13mod discovery;
14mod project;
15
16use std::path::{Path, PathBuf};
17
18pub use cloud::{CloudPath, CloudPaths, get_cloud_paths};
19pub use context::UnifiedContext;
20pub use discovery::DiscoveredProject;
21pub use project::{ProfilePath, ProjectContext, ProjectPath};
22pub use systemprompt_models::profile::{expand_home, resolve_with_home};
23
24#[must_use]
25pub fn resolve_path(base_dir: &Path, path_str: &str) -> PathBuf {
26    resolve_with_home(base_dir, path_str)
27}