Expand description
Markdown and JSON rendering with output truncation.
Structs§
- DryRun
Data - Dry-run
dataobject (planned_url+ typedplanned_params). - DryRun
Envelope - JSON dry-run success envelope with planned URL and params.
- Error
Body - Error body fields inside the envelope.
- Error
Envelope - JSON error envelope for agents.
- Success
Envelope - JSON success envelope for agents (
schema_version,ok,command,data,duration_ms).
Functions§
- apply_
output_ budget_ search_ crates - Reduce
search-crateshits until the success envelope fitsmax_output_bytes. - apply_
output_ budget_ search_ in_ crate - Reduce
search-in-cratehits until the success envelope fitsmax_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
canceledwith 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 bydoctor). - truncate_
output - Truncate UTF-8 text on a char boundary; returns (text, truncated).
- usage_
error - Map clap parse failures to usage errors.