Expand description
Only module allowed to emit stdout for VPS CRUD.
Centralizes all CRUD formatting for text and JSON emission.
Logs (tracing) go to stderr, managed by tracing-subscriber.
§JSON wire
Agent JSON is compact single-root RFC 8259 (see crate::json_wire).
Pretty-print is intentionally not used on the machine path.
Functions§
- emit_
success - Agent-first success emitter (GAP-AUD-003/008).
- emit_
success_ fmt - Like
emit_success, but the human line is built withformat_args!(G-MAC-01). - export_
envelope_ json - Full
vps export --jsonenvelope (typed). - export_
hosts_ to_ json - GAP-SSH-UX-001: hosts for
vps export --json. - is_
quiet - Returns whether quiet mode is active.
- print_
details_ json - Prints a single VPS record as masked text.
- print_
details_ text - Prints the VPS list as masked JSON.
- print_
doctor_ text - Prints the doctor report as human text (GAP-SSH-IO-005).
- print_
error - Prints an error message on stderr (human-facing).
- print_
error_ envelope - Emits a JSON error envelope on stderr (GAP-SSH-IO-003 / G-RETRY / G-ERR-08).
- print_
error_ fmt - Stderr error via
format_args!— no intermediateString(G-MAC-01). - print_
exec_ batch - Prints multi-host exec results (text or single-root JSON batch).
- print_
execution_ output - Prints a single VPS record as masked JSON.
- print_
execution_ output_ json - Prints stdout/stderr from an SSH command execution.
- print_
health_ batch - Prints multi-host health-check results (text or single-root JSON batch).
- print_
health_ check - Prints SSH command execution output as JSON.
- print_
health_ check_ json - Prints a health-check result as JSON.
- print_
human_ banner - Human banner (tunnel etc.): Text+TTY+!quiet+!JSON errors only (GAP-SSH-IO-006).
- print_
json_ value - Prints compact JSON on stdout (agent wire; always respects quiet=false).
- print_
list_ json - Prints VPS list as compact JSON array on stdout.
- print_
list_ text - Prints the VPS list as masked text.
- print_
scp_ batch - Prints multi-host SCP batch results.
- print_
sftp_ batch - Prints multi-host SFTP batch results.
- print_
sftp_ fs_ op_ json - Prints
sftpfs-op JSON (mkdir/rmdir/rm/rename). - print_
sftp_ list_ json - Prints
sftp lsJSON. - print_
sftp_ stat_ json - Prints
sftp statJSON. - print_
sftp_ transfer_ json - Prints an SFTP transfer result as JSON (G-SFTP-09).
- print_
success - Prints a human success message (suppressed with
--quiet). - print_
success_ fmt - Human success via
format_args!— no intermediateString(G-MAC-01). - print_
transfer_ json - Prints an SCP transfer result as JSON (GAP-SSH-IO-007 / SCP-021 / IO-009).
- print_
tunnel_ listening_ json - JSON event when the local tunnel listener comes up (GAP-SSH-IO-008).
- print_
warning - Prints a warning on stderr (agent-visible, never stdout).
- print_
warning_ fmt - Warning with dynamic body via
format_args!(G-MAC-01 residual close). - record_
to_ masked_ json - Builds a masked VPS JSON DTO (GAP-SSH-JSON-001).
- set_
json_ errors - Sets whether errors are emitted as a JSON envelope on stderr.
- set_
quiet - Sets whether the CLI is in quiet mode (GAP-SSH-IO-004).
- wants_
json_ errors - Returns whether errors should use a JSON envelope.
- write_
line - Writes a line to stdout with pure LF (never CRLF), then flushes.
- write_
line_ fmt - Writes a formatted line to stdout without an intermediate
String(G-MAC-01). - write_
line_ to - Writes a line to an arbitrary
Writewith pure LF, then flushes (G-IO-11). - write_
line_ to_ fmt - Writes formatted content + pure LF via
Write::write_fmt(G-MAC-01). - write_
lines - Writes many short lines under a single stdout lock (list/doctor/text dumps).
- write_
stderr_ fmt - Writes a formatted line to stderr without an intermediate
String(G-MAC-01). - write_
stderr_ line - Writes a line to stderr with flush (warnings / human errors).
- write_
stderr_ line_ to - Writes a diagnostic line to an arbitrary
Write(G-IO-11 DI primitive). - write_
stderr_ line_ to_ fmt - Formatted stderr line via
write_fmt(G-MAC-01); BrokenPipe → Ok.