Skip to main content

Module render

Module render 

Source
Expand description

Markdown and JSON rendering with output truncation.

Structs§

DryRunData
Dry-run data object (planned_url + typed planned_params).
DryRunEnvelope
JSON dry-run success envelope with planned URL and params.
ErrorBody
Error body fields inside the envelope.
ErrorEnvelope
JSON error envelope for agents.
SuccessEnvelope
JSON success envelope for agents (schema_version, ok, command, data, duration_ms).

Functions§

apply_output_budget_search_crates
Reduce search-crates hits until the success envelope fits max_output_bytes.
apply_output_budget_search_in_crate
Reduce search-in-crate hits until the success envelope fits max_output_bytes.
apply_truncation_to_item
Apply max_output_bytes truncation to get-item payload.
apply_truncation_to_readme
Apply max_output_bytes truncation to readme payload.
dry_run_envelope
Build a typed dry-run success envelope with planned URL/params.
error_envelope
Build an error envelope. SIGINT/SIGTERM surface as kind canceled with exit 130/143.
render_item_markdown
Human Markdown for get-item.
render_readme_markdown
Human Markdown for readme.
render_schema_markdown
Render a human-readable markdown document for an embedded JSON Schema.
render_search_in_crate_markdown
Human Markdown for search-in-crate.
render_search_markdown
Human Markdown for search-crates.
success_envelope
Build a typed success envelope (schema_version, ok, command, data, duration_ms).
success_envelope_with_ok
Build a success-shaped envelope with an explicit top-level ok (used by doctor).
truncate_output
Truncate UTF-8 text on a char boundary; returns (text, truncated).
usage_error
Map clap parse failures to usage errors.