Expand description
Output rendering for the Confluence compare and compare_section tools.
Turns a Diff (from super::diff) plus surrounding metadata into the
YAML output schema described in issue #706. Three detail levels:
- Summary — counts only.
- Outline — per-section change kind + one-line summaries + cursors.
- Full — embeds per-section deltas, budget-truncated with continuation.
Cursors are stateless: an opaque base64url-encoded JSON record carrying
{page_id, from_v, to_v, section_path} so confluence_compare_section
can re-fetch both sides without server state.
Structs§
- ByKind
- Counts grouped by change kind.
- Compare
Context - Side-channel data the renderer needs beyond the
Diffitself. - Compare
Output - Top-level YAML output for
confluence_compare. - Continuation
- Continuation pointer when output was truncated.
- Cursor
- Opaque cursor payload carried in
cursorandcontinuation.next_cursor. - Filter
- Filter applied to the rendered output (post-diff).
- Includes
- Which top-level fields to include in the output.
- Label
Change - Label changes between two versions.
- NetCounts
- Net character and word change counts across the entire diff.
- Page
Header - Page identity header for the compare output.
- Section
Record - One section’s record in the output.
- Summary
Block - Aggregate counts across all sections.
- Title
Change - Title-change record. Emitted only when titles differ.
- Version
Info - Per-version metadata.
- Version
Pair - Pair of version metadata records (
from/to).
Enums§
- Detail
- Detail level for the compare output.
- Section
Format - Output format for
render_section.
Constants§
- DEFAULT_
OUTPUT_ BUDGET - Approximate output budget, in bytes of YAML. The default of ~16 KiB corresponds to roughly 4000 tokens at 4 chars/token.
Functions§
- apply_
filter - Applies a
Filterin place. Sections that fail the predicate are removed from the diff. - render
- Renders a
Diffinto aCompareOutputat the given detail level. - render_
section - Renders a single section diff in the requested format. Used by
confluence_compare_section.