Expand description
Structured row/group/document output types. Structured output payload model shared across commands, DSL stages, and UI.
This module exists to keep command results in a small canonical shape while they move between execution, transformation, and rendering layers.
High-level flow:
- commands produce
crate::core::output_model::OutputResult - the DSL transforms its
crate::core::output_model::OutputItemsand optional semantic document - the UI later lowers the result into rendered documents and terminal text
Contract:
- this module describes data shape, not rendering policy
- semantic sidecar documents should stay canonical here instead of leaking format-specific assumptions into the DSL or UI
Structs§
- Group
- Grouped output with grouping keys, aggregate values, and member rows.
- Output
Document - Optional semantic document attached to rendered output.
- Output
Meta - Rendering metadata attached to an
OutputResult. - Output
Result - Structured command output plus rendering metadata.
Enums§
- Column
Alignment - Alignment hint for a rendered output column.
- Output
Document Kind - Stable identity for a semantic payload carried through the output pipeline.
- Output
Items - Result payload as either flat rows or grouped rows.
- Render
Recommendation - Suggested render target for a command result.
Functions§
- compute_
key_ index - Computes the stable first-seen column order across all rows.
- output_
items_ from_ value - Projects a canonical JSON value back into generic output items.
- output_
items_ to_ value - Projects output items into a canonical JSON value.
- rows_
from_ value - Projects any JSON value into a row stream for pipeline-oriented processing.