Skip to main content

Module output

Module output 

Source
Expand description

Only module allowed to emit stdout for VPS CRUD.

This module centralizes ALL CRUD formatting: text and JSON.

Logs (tracing) go to stderr, managed by tracing-subscriber.

Functionsยง

emit_success
Agent-first success emitter (GAP-AUD-003/008).
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 JSON.
print_details_text
Prints a single VPS record as masked text.
print_doctor_text
Prints the doctor report as 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).
print_execution_output
Prints stdout/stderr from an SSH command execution.
print_execution_output_json
Prints SSH command execution output as JSON.
print_health_check
Prints a health-check result as text.
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 pretty JSON on stdout (API data; always respects quiet=false).
print_list_json
Prints the VPS list as masked JSON.
print_list_text
Prints the VPS list as masked text.
print_success
Prints a human success message (suppressed with --quiet).
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).
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).