aeat.application.operator_surface._contract module¶
Application-owned operator-surface contract for the workflow redesign.
This module declares the accepted RootSurface records, canonical
BindingSourceKind subset, parser-only
SourceKindAlias records, mounted MountedCommandFamily
records, backend ServiceOwner inventory, log metadata, and registered
error-code tuple that build the immutable OperatorSurfaceContract.
It owns contract data only: command adapters render and enforce this shape without redefining it. The module does not inspect storage, read environment variables, construct repositories, or traverse the live command tree.
- build_operator_surface_contract()[source]¶
Build the immutable
OperatorSurfaceContract.Returns the canonical declaration of modelo lifecycle steps, accepted
RootSurfacevalues, parser-onlySourceKindAliasrecords, mountedMountedCommandFamilyvalues, and backendServiceOwnermappings. The resultingOperatorSurfaceLogFieldsare emitted through the shared logger as stable, non-secret metadata. Consumers that need the singleton view should callget_operator_surface_contract(), which caches this builder.- Return type:
- get_operator_surface_contract()[source]¶
Return the cached backend-owned operator surface contract.
Returns the
OperatorSurfaceContractdescribing the accepted root surfaces, source-kind aliases, command families, service owners, log fields, and registered error-code contract. The cache guarantees every application and adapter consumer observes the same immutable contract object for the current process.- Return type:
- require_accepted_root(name)[source]¶
Return the
RootSurfacefor an accepted root.Raises
OperatorSurfaceContractErrorwhennameis outside the backend-owned root contract. The refusal carries localized reason and suggestion text, while the accepted path returns the exactRootSurfacerecord fromget_operator_surface_contract().- Return type:
- Parameters:
name (str)
- resolve_source_kind_alias(value)[source]¶
Resolve canonical source kinds and parser-only aliases.
Returns a canonical
BindingSourceKindfrom either the enum token itself or an input-onlySourceKindAlias. The accepted set is theSOURCE_KINDSsubset, and aliases inSOURCE_KIND_ALIASESnever introduce an operator-only source-kind taxonomy.- Return type:
- Parameters:
value (str)