aeat.application.operator_surface._help module¶
Backend-owned help and discovery documents for accepted CLI roots.
The builders return typed HelpDocument and
RootLandingReport records for the contract-backed root, config, and
app help surfaces declared by application.operator_surface. CLI
adapters render these records through the shared output boundary; they do not
own the command inventory.
This module is manifest-discovery only: it builds in-memory documents from locale keys and caller-supplied profile state. It does not inspect storage, read environment variables, construct repositories, or decide whether the bare root should render the landing report or the overview status report.
- build_help_document(surface)[source]¶
Return the curated help document for
surface.Accepts a
HelpSurfacemember or its string token and returns aHelpDocumentwith workflow-orderedHelpSectionandHelpEntryrecords for the requested surface. The returned document is consumed byrender_help_text()and by the root/app envelope paths.- Return type:
- Parameters:
surface (HelpSurface | str)
- build_root_landing_report(active_profile)[source]¶
Return the
RootLandingReportfor caller-supplied profile state.The caller owns active-profile discovery and passes the projected display label here. A present profile points operators at
aeat app overview status; a missing profile points at profile creation. The CLI root callback decides whether this landing report or the full overview status is emitted underroot.status.- Return type:
- Parameters:
active_profile (str | None)
- render_help_text(document)[source]¶
Render a curated
HelpDocumentas terminal-safe plain text.The renderer preserves the backend-owned ordering of
HelpSectionandHelpEntryrecords, aligns command columns, and returns text for CLI adapters to pass through their normal output boundary. It does not inspect the live CLI tree; conformance tests own the check that rendered command rows still map to mounted command families.- Return type:
- Parameters:
document (HelpDocument)
- render_root_landing_text(report)[source]¶
Render the compact single-line view of a
RootLandingReport.New root CLI output uses a multi-line entrypoint renderer for the text half of the
root.statusenvelope. This helper remains the application-level plain-text formatter for callers that need the compact message / next-command template.- Return type:
- Parameters:
report (RootLandingReport)