aeat.application.operator_surface._models module¶
Strict Pydantic records for the backend-owned operator-surface contract.
The records describe accepted RootSurface values, curated
HelpDocument / RootLandingReport presentation documents,
mounted MountedCommandFamily declarations, parser-only
BindingSourceKind aliases, backend ServiceOwner
inventory, stable OperatorSurfaceLogFields, and the aggregate
OperatorSurfaceContract built by
build_operator_surface_contract().
They are data contracts only; builders and renderers live in sibling modules.
S538 invariant-guard classification note¶
All ValueError raises in this module appear inside Pydantic v2
@field_validator / @model_validator methods. Pydantic wraps these into
pydantic.ValidationError automatically; raising any other exception
type (including core.errors.AeatError) would bypass that wrapping
and surface as an uncaught internal exception. These guards are therefore
developer-surface-only invariants and must remain ValueError. They
are NOT operator-facing errors and do not require translated_message.
- class RootSurfaceName(*values)[source]¶
Bases:
StrEnumAccepted root command surfaces enforced by
OperatorSurfaceContract.- CONFIG¶
- APP¶
- class ModeloLifecycleStep(*values)[source]¶
Bases:
StrEnumCanonical modelo lifecycle steps carried by
LifecycleContract.- CALCULATE¶
- VERIFY¶
- FILE¶
- class FilingStatus(*values)[source]¶
Bases:
StrEnumCanonical live-read filing token used by mounted live command families.
- FILED¶
- class OperatorMutability(*values)[source]¶
Bases:
StrEnumSide-effect class declared on each
MountedCommandFamily.- READ_ONLY¶
- LOCAL_STATE_MUTATING¶
- class HelpSurface(*values)[source]¶
Bases:
StrEnumCurated help surfaces accepted by
build_help_document().- ROOT¶
- CONFIG¶
- APP¶
- class MountedCommandDomain(*values)[source]¶
Bases:
StrEnumBackend-owned command domains used to classify mounted command families.
- FIRST_RUN¶
- PROFILE¶
- CUSTODY¶
- BUCKET¶
- AUTH¶
- DIAGNOSTICS¶
- GOOGLE¶
- COLLAB¶
- OVERVIEW¶
- LEDGER¶
- LIVE¶
- MODELO¶
- REVIEW¶
- REGISTRY¶
- CONTRACT¶
- AGENT¶
- QUICKFILE¶
- class RootSurface(**data)[source]¶
Bases:
BaseModelBackend ownership record for an accepted root surface.
Instances are declared in
ACCEPTED_ROOTSand validated into the aggregateOperatorSurfaceContract. Therequired_childrenfield names required command-family children, not an exhaustive command tree.- Parameters:
- name: RootSurfaceName¶
- purpose: str¶
- owns_storage_maintenance: bool¶
- owns_operational_workflow: bool¶
- required_children: tuple[str, ...]¶
- class HelpEntry(**data)[source]¶
Bases:
BaseModelOne localized command row in a curated
HelpSection.- command: str¶
- description: str¶
- class HelpSection(**data)[source]¶
Bases:
BaseModelOne workflow-ordered section in a curated
HelpDocument.- title: str¶
- entries: tuple[HelpEntry, ...]¶
- class HelpDocument(**data)[source]¶
Bases:
BaseModelCurated help document built by
build_help_document().The document owns contributor-facing command inventory and localized prose shape for a
HelpSurface; renderers preserve the section and entry ordering rather than rediscovering command rows.- Parameters:
surface (HelpSurface)
heading (str)
sections (tuple[HelpSection, ...])
footer (str)
- surface: HelpSurface¶
- heading: str¶
- paragraphs: tuple[str, ...]¶
- sections: tuple[HelpSection, ...]¶
- class RootLandingReport(**data)[source]¶
Bases:
BaseModelBare-root landing report built from caller-projected profile state.
build_root_landing_report()creates this record from an already-resolved profile display label. The model carries the message and next command only; it does not perform profile discovery.- active_profile: str | None¶
- command: str¶
- message: str¶
- class LifecycleContract(**data)[source]¶
Bases:
BaseModelModelo lifecycle vocabulary and live-submission safety contract.
The default
internal_filed_termand disabled live-submission fields keep operator copy aligned with the accepted workflow: calculate, verify, then internally file/export without implying live AEAT submission.- Parameters:
steps (tuple[ModeloLifecycleStep, ...])
internal_filed_term (str)
live_submission_enabled (bool)
live_submission_wording (str)
- steps: tuple[ModeloLifecycleStep, ...]¶
- internal_filed_term: str¶
- live_submission_enabled: bool¶
- live_submission_wording: str¶
- class SourceKindAlias(**data)[source]¶
Bases:
BaseModelInput-only parser alias mapped to canonical
BindingSourceKind.Alias resolution is owned by
resolve_source_kind_alias(); no operator-only source-kind enum is introduced here.- Parameters:
alias (str)
canonical (BindingSourceKind)
- alias: str¶
- canonical: BindingSourceKind¶
- class MountedCommandFamily(**data)[source]¶
Bases:
BaseModelOne accepted command-family declaration and its backend owner.
Families bind a root surface, child token, domain, backend service owner, curated command tuple, and
OperatorMutability. The command tuple is a contract summary used by help/conformance checks, not a replacement for live command-tree traversal.- Parameters:
domain (MountedCommandDomain)
root (RootSurfaceName)
child (str)
operator_question (str)
service_owner (str)
mutability (OperatorMutability)
- domain: MountedCommandDomain¶
- root: RootSurfaceName¶
- child: str¶
- operator_question: str¶
- service_owner: str¶
- commands: tuple[str, ...]¶
- mutability: OperatorMutability¶
- class ServiceOwner(**data)[source]¶
Bases:
BaseModelApplication/domain package that owns an operator-facing capability.
- capability: str¶
- owner: str¶
- notes: str¶
- class OperatorSurfaceLogFields(**data)[source]¶
Bases:
BaseModelStable non-secret log fields emitted by operator-surface services.
- contract_name: str¶
- root_count: int¶
- lifecycle: str¶
- source_kind_count: int¶
- class OperatorSurfaceContract(**data)[source]¶
Bases:
BaseModelComplete backend-owned contract consumed by CLI adapters.
Built by
build_operator_surface_contract(), this record ties together accepted roots, modelo lifecycle vocabulary, canonicalBindingSourceKindsubset, parser aliases, mounted command families, backend ownership inventory, log metadata, and registered error codes.- Parameters:
schema_version (str)
roots (tuple[RootSurface, ...])
lifecycle (LifecycleContract)
source_kinds (tuple[BindingSourceKind, ...])
source_kind_aliases (tuple[SourceKindAlias, ...])
command_families (tuple[MountedCommandFamily, ...])
service_owners (tuple[ServiceOwner, ...])
log_fields (OperatorSurfaceLogFields)
- schema_version: str¶
- roots: tuple[RootSurface, ...]¶
- lifecycle: LifecycleContract¶
- source_kinds: tuple[BindingSourceKind, ...]¶
- source_kind_aliases: tuple[SourceKindAlias, ...]¶
- command_families: tuple[MountedCommandFamily, ...]¶
- service_owners: tuple[ServiceOwner, ...]¶
- log_fields: OperatorSurfaceLogFields¶
- error_codes: tuple[str, ...]¶