cadrumo.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, *, profile_selected=None, registered_profile_count=0)[source]¶
Return the
RootLandingReportfor caller-supplied profile state.The caller owns active-profile discovery and passes the projected display label here, separately from whether the profile-selection pointer exists. A present label points operators at
aeat app overview status; a selected profile whose label cannot be resolved points at profile repair; a genuinely absent selection 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:
- 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)