Skip to main content

Module output

Module output 

Source
Expand description

Structured JSON Lines output for objectiveai-cli.

Every line objectiveai-cli writes to stdout is one Output JSON object. There are two top-level shapes, discriminated by "type":

  • error — a failure or advisory (Error).
  • notification — a typed payload T chosen by the consumer (the CLI defines its own notification enum and parameterizes Output<T> over it).

T is flattened into the same JSON object as the "type" tag via serde’s internal tagging, so T should be a struct or an internally-tagged enum.

Re-exports§

pub use notification::*;

Modules§

notification

Structs§

Error
A failure or advisory written to stdout. fatal: true means the process is exiting with a non-zero status; fatal: false is a non-blocking warning (e.g. auto-update failed but the requested command still ran).

Enums§

Handle
Destination for super::Output::emit.
Level
Severity matching the conventions used by bunyan / pino / log crate JSON encoders. fatal is encoded separately on Error.
Output
A single line of CLI output.