Skip to main content

Module render

Module render 

Source
Expand description

Markdown and JSON rendering with output truncation.

Split by responsibility, with the public API re-exported unchanged so every consumer keeps importing from crate::render::*:

  • envelope — typed success / dry-run / error JSON envelopes
  • markdown — human Markdown per command payload
  • budget — max_output_bytes truncation and hit-list shrinking
  • schema_md — Markdown rendering of the embedded JSON Schemas

Re-exports§

pub use budget::apply_output_budget_search_crates;
pub use budget::apply_output_budget_search_in_crate;
pub use budget::apply_truncation_to_item;
pub use budget::apply_truncation_to_readme;
pub use budget::truncate_output;
pub use envelope::DryRunData;
pub use envelope::DryRunEnvelope;
pub use envelope::ErrorBody;
pub use envelope::ErrorEnvelope;
pub use envelope::SuccessEnvelope;
pub use envelope::dry_run_envelope;
pub use envelope::error_envelope;
pub use envelope::success_envelope;
pub use envelope::success_envelope_with_ok;
pub use envelope::usage_error;
pub use markdown::render_item_markdown;
pub use markdown::render_readme_markdown;
pub use markdown::render_search_in_crate_markdown;
pub use markdown::render_search_markdown;
pub use schema_md::render_schema_markdown;

Modules§

budget
max_output_bytes enforcement: UTF-8-safe truncation and hit-list shrinking.
envelope
Typed JSON envelopes for the agent contract (success, dry-run, error).
markdown
Human-readable Markdown rendering for each command payload.
schema_md
Human Markdown rendering for the embedded JSON Schemas (schema --format markdown).