Expand description
Centralized stdout/stderr emitters for CLI output formatting. Single point of terminal I/O for the CLI (stdout JSON, stderr human).
All user-visible output must go through this module; direct println! in
other modules is forbidden.
Structs§
- Recall
Item - Individual item returned by the
recallquery. - Recall
Response - Full response envelope returned by the
recallsubcommand. - Remember
Response - JSON payload emitted by the
remembersubcommand.
Enums§
- Json
Output Format - Restricted JSON-only format for commands that always emit JSON.
- Output
Format - Output format variants accepted by
--formatCLI flags.
Functions§
- emit_
error - Emits a localised error message to stderr with the
Error:/Erro:prefix. - emit_
error_ i18n - Emits a bilingual error to stderr honouring
--langorSQLITE_GRAPHRAG_LANG. Usage:output::emit_error_i18n("invariant violated", "invariante violado"). - emit_
json - Serializes
valueas pretty-printed JSON and writes it to stdout with a trailing newline. - emit_
json_ compact - Serializes
valueas compact (single-line) JSON and writes it to stdout with a trailing newline. - emit_
progress - Logs
msgas a structuredtracing::info!event (does not write to stdout). - emit_
progress_ i18n - Emits a bilingual progress message honouring
--langorSQLITE_GRAPHRAG_LANG. Usage:output::emit_progress_i18n("Computing embedding...", "Calculando embedding..."). - emit_
text - Writes
msgfollowed by a newline to stdout and flushes.