Expand description
VPS record CRUD and persistence (XDG + atomic TOML + flock).
No .env at runtime. Schema v3 English wire (dual-read PT legacy).
Re-exports§
pub use selection::dedupe_host_names;pub use selection::resolve_host_jobs;pub use selection::HostSelection;
Modules§
- model
- Data model for
VpsRecord(schema v3) — domain newtypes (G-TYPE-*). - selection
- Multi-host selection resolution (SRP extract — G-COMP-01). Multi-host selection resolution for bounded fan-out (G-PAR-27 / G-PAR-31).
Structs§
- Config
File - Full configuration file.
- Config
Layer - Winning configuration layer (doctor).
- Exec
Options - Common remote execution options.
- Host
Exec Result - Per-host result for multi-host exec JSON/text.
- Host
Health Result - Per-host health-check outcome for batch output.
Constants§
- MAX_
SECRET_ STDIN_ BYTES - Hard cap for secret payloads on stdin (agent hardening / DoS guard).
Functions§
- build_
connection_ config - Builds
ConnectionConfigfrom aVpsRecord. - default_
config_ path - Returns the config file path under XDG (
--config-dirwins at call sites). - find_
by_ name - Looks up a VPS record by name.
- load
- Loads the configuration file (returns empty if missing).
- parse_
import_ payload - Parses import source: TOML wire or JSON
vps-exportenvelope / hosts map. Parse import payload (TOML or JSON envelope). Public for fuzz targets (G-SERDE-12). - read_
active_ vps - Reads the active VPS name.
- read_
secret_ stdin - Reads a password line from stdin (no extra echo).
- resolve_
config_ path - Resolves the config file path from an optional override.
- run_
connect - Sets the active VPS by writing its name to
<config_dir>/active(sibling file). - run_
exec - Runs a shell command on one VPS or a multi-host selection (bounded).
- run_
exec_ with_ client - Testable version of run_exec.
- run_
health_ check - Health-check SSH (single host or multi-host bounded fan-out).
- run_
secrets_ command - Dispatcher one-shot de
secrets status|init|reencrypt. Secrets primary-key status/init/reencrypt. - run_
su_ exec - Runs a command via
su -one-shot (consumessu_password). - run_
sudo_ exec - Runs a command with
sudo(packed viash -c). - run_
sudo_ exec_ with_ client - Testable version of sudo-exec.
- run_
vps_ command - Dispatcher dos subcomandos
vps. - save
- Saves the configuration file atomically with flock and 0o600.
- use_
json - JSON efetivo a partir de flag local e format global (IO-001/002).
- winning_
layer - Resolves and describes the winning config layer.
- write_
atomic - Writes bytes to
pathatomically (tempfile + fsync + rename + 0o600).