cadrumo.entrypoints.tui.account module¶
Production composition for the account utilities.
The workbench treats Profile as an account destination and exposes the other account utilities from its identity control. Their visual and application owners already exist: this module only binds those owners to caller-supplied doors. In particular, it neither reads profile storage nor creates an alternative credential, language, appearance, or sign-out screen.
- exception AccountSessionExpiredError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CadrumoErrorSignal that the current non-secret account session must be recomposed.
- Parameters:
- Return type:
None
- code¶
- class AccountRecomposeReasonV1(*values)[source]¶
Bases:
StrEnumWhy the current profile-bound workbench must be discarded.
- CHANGE_USER¶
- PASSWORD_CHANGED¶
- SIGNED_OUT¶
- EXPIRED¶
- class AccountRecomposeRequiredV1(reason, profile_id=None, profile_label=None)[source]¶
Bases:
objectNon-secret handoff asking the outer bootstrap owner for a fresh root.
- Parameters:
reason (AccountRecomposeReasonV1)
profile_id (str | None)
profile_label (str | None)
-
reason:
AccountRecomposeReasonV1¶
- class AccountFactoriesV1(profile, change_user, password, appearance, language, sign_out)[source]¶
Bases:
objectThe production account utilities, each delegated to its existing owner.
- Parameters:
profile (AccountProfileFactoryV1)
change_user (AccountChangeUserFactoryV1)
password (AccountPasswordFactoryV1)
appearance (AccountAppearanceFactoryV1)
language (AccountLanguageFactoryV1)
sign_out (AccountSignOutFactoryV1)
-
profile:
TypeAliasType¶
-
change_user:
TypeAliasType¶
-
password:
TypeAliasType¶
-
appearance:
TypeAliasType¶
-
language:
TypeAliasType¶
-
sign_out:
TypeAliasType¶
- compose_account_factories(*, profile_overview, persist_profile_field, login_choices, authenticate, assess_password, rotate_password, sign_out, preselected_profile_id=None, validate_profile_field=None, launch_profile_source=None, credential_postures=None, appearance=<function toggle_appearance>, complete_setup=None, open_document_reader=None)[source]¶
Bind already-composed account doors to their canonical TUI owners.
Every value and effect door is supplied by the installed host. This makes composition explicit: constructing a factory does not read storage, unlock a profile, mutate settings, or submit the strong-close operation.
- Return type:
- Parameters:
profile_overview (ProfileOverview)
persist_profile_field (Callable[[str, str], ProfileOverview])
login_choices (Sequence[ProfileLoginChoice])
authenticate (Callable[[str, str], ProfileLoginAttempt])
assess_password (Callable[[str], ProfilePasswordAssessment])
rotate_password (Callable[[str, str, str], PassphraseChangeAttempt])
sign_out (AccountSignOutFactoryV1)
preselected_profile_id (str | None)
validate_profile_field (Callable[[str, str], str | None] | None)
launch_profile_source (Callable[[ProfileAcquisitionSourceV1], Awaitable[None]] | None)
credential_postures (Sequence[AcquisitionSourceCredentialPostureV1] | None)
appearance (AccountAppearanceFactoryV1)
complete_setup (Callable[[], ProfileOverview] | None)
- compose_profile_sign_out_factory(services, *, profile_id, actor_ref='operator:tui-account')[source]¶
Bind the canonical strong-close operation to the current profile.
The returned door submits and starts the close only when invoked, exactly as
config logoutdoes; composition performs no operation, persistence, or credential work. Observation stays with the operation modal, which watches and never starts: a close that was submitted but not started sat in its created state indefinitely while the modal reported it in progress.- Return type:
TypeAliasType- Parameters:
services (OperationComposedServices)
profile_id (str)
actor_ref (str)
- class WorkbenchAccountProviderV1(screen, match_style=None)[source]¶
Bases:
ProviderOffer the account controls in the command palette.
The controls sit on the root shell, which every destination screen covers, so without this the palette was the one cross-screen surface that could not reach them. Entries exist only while the session has account doors; offering a control that can only refuse would be a false promise. Appearance is left to the root’s system commands, which offer it with or without a profile, so it is not listed twice.
- Parameters:
screen (Screen[Any])
match_style (Style | None)
- async search(query)[source]¶
Fuzzy-match the account controls by their on-screen names.
- Return type:
- Parameters:
query (str)