pub struct Layout { /* private fields */ }Expand description
The paths of one SCV instance.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn new(home: impl Into<PathBuf>) -> Self
pub fn new(home: impl Into<PathBuf>) -> Self
The instance at home, selected explicitly as SCV_HOME selects one.
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
The instance selected by SCV_HOME, or ~/.scv, with its home
resolved: canonical when it exists, otherwise made absolute. Service
unit names and delegation records hash this path, so every process of
an instance must resolve it the same way.
pub fn home(&self) -> &Path
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Whether this is the default instance, which SCV_HOME did not select.
Sourcepub fn service_name(&self) -> String
pub fn service_name(&self) -> String
The instance’s systemd user unit: scv.service for the default
instance, otherwise scv-<hash of the home>.service, so instances
never share a unit and a release finds the unit an earlier one wrote.
Sourcepub fn credentials(&self) -> PathBuf
pub fn credentials(&self) -> PathBuf
Sign-ins SCV writes itself.
Sourcepub fn channel_credentials(&self, channel: &str) -> PathBuf
pub fn channel_credentials(&self, channel: &str) -> PathBuf
One channel’s account credentials, <account>.json each.
pub fn agent_home(&self, agent: &str) -> PathBuf
pub fn skills(&self) -> PathBuf
Sourcepub fn history(&self) -> PathBuf
pub fn history(&self) -> PathBuf
The chat log, <channel>/<account>/<conversation>/ (see
crate::history), and by default the files the owner kept.
pub fn socket(&self) -> PathBuf
Sourcepub fn delegations(&self) -> PathBuf
pub fn delegations(&self) -> PathBuf
Records of running delegated agents.
Sourcepub fn conversations(&self) -> PathBuf
pub fn conversations(&self) -> PathBuf
Markers of live delegated conversations, for scv agents gc.
Sourcepub fn channel_state(&self, channel: &str) -> PathBuf
pub fn channel_state(&self, channel: &str) -> PathBuf
One channel’s delivery state and account locks.
Sourcepub fn media(&self) -> PathBuf
pub fn media(&self) -> PathBuf
Files chat users sent, under <channel>/<account>, and copies of files
the model sends back, under outbox.
Sourcepub fn outbox(&self) -> PathBuf
pub fn outbox(&self) -> PathBuf
Copies of files the model attached, waiting to be sent to a chat.
Sourcepub fn update_plan(&self) -> PathBuf
pub fn update_plan(&self) -> PathBuf
A planned restart in progress.
Sourcepub fn last_owner(&self) -> PathBuf
pub fn last_owner(&self) -> PathBuf
The chat the account owner last wrote from.
Sourcepub fn daemon_marker(&self) -> PathBuf
pub fn daemon_marker(&self) -> PathBuf
Present while a daemon runs; one left behind means it did not shut down cleanly.
Sourcepub fn config_lock(&self) -> PathBuf
pub fn config_lock(&self) -> PathBuf
Serializes SCV’s own edits of config.toml.