Expand description
Shared parse→validate pipeline for external config/import (G-SERDE-07). Shared validation pipeline for external input (G-SERDE-07).
Canonical order: parse → serde → validator → domain.
No product telemetry (local tracing only).
Constants§
- MAX_
CHAR_ LIMIT - Hard ceiling for command/output char limits (0 = unlimited still allowed) — G-SERDE-11.
- MAX_
FIELD_ LEN - Max length for VPS name / host / username string fields.
- MAX_
TAGS - Max number of tags per host.
- MAX_
TAG_ LEN - Max length for a single host tag.
- MAX_
TIMEOUT_ MS - Hard ceiling for
timeout_ms(1 hour) — G-SERDE-11.
Functions§
- format_
validation_ errors - Formats
ValidationErrorsinto a single agent-readable message (no secrets). - from_
json_ str - Deserialize JSON with path-aware errors (G-SERDE-08).
- from_
json_ str_ warn_ unused - JSON deserialize that warns on unknown fields (Must-Ignore + G-SERDE-14).
- from_
toml_ str - Deserialize TOML with path-aware errors (G-SERDE-08).
- validate_
nonempty_ trimmed - Custom validator: non-empty after trim.
- validate_
or_ err - Convenience: run
Validateand map errors. - validate_
port_ nonzero - Custom validator: SSH port must be 1..=65535 (u16 already caps 65535).
- validate_
tags - Validates host tags (length + cardinality).
- validation_
to_ error - Maps validation failures to
SshCliError::InvalidArgumentand logs locally.