Initial Tessera backup vault (M0–M2)

Scaffold Rust workspace, React canvas, vault engine, hub API,
providers, agent wormhole path, and Docker compose per SPEC.
This commit is contained in:
Tessera Agent
2026-11-09 09:59:42 +00:00
commit a5ffb2c1b4
54 changed files with 8379 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
use thiserror::Error;
#[derive(Debug, Error)]
pub enum TesseraError {
#[error("vault is locked: {0}")]
VaultLocked(String),
#[error("wrong passphrase")]
WrongPassphrase,
#[error("provider unreachable: {0}")]
ProviderUnreachable(String),
#[error("disk full: need {needed} bytes")]
DiskFull { needed: u64 },
#[error("{0}")]
UserMessage(String),
}
impl TesseraError {
pub fn user_message(&self) -> &str {
match self {
TesseraError::VaultLocked(_) => {
"Another orbit is still circling the vault. Try again when it finishes."
}
TesseraError::WrongPassphrase => "That key doesn't unlock this vault.",
TesseraError::ProviderUnreachable(_) => {
"We couldn't reach the source at this outpost."
}
TesseraError::DiskFull { .. } => {
"The vault is out of space—free room or widen the hold."
}
TesseraError::UserMessage(m) => m.as_str(),
}
}
}