cadrumo.application.modelo.work_wizard module¶
Frontend-neutral Modelo work-wizard discovery and flow construction.
The guided work wizard is an application-owned projection of the outstanding
registry input surface for one WorkUnit.
It discovers only manual casillas and the remaining promptable binding or
relation inputs, attaches the registry grounding that explains each question,
and builds one runtime FlowDefinition.
The returned run owns its registry-derived copy table for its entire lifetime. The CLI line frontend and the installed full-screen frontend both consume that same definition; neither owns step discovery, copy resolution, or the run lifecycle.
- ModeloWorkWizardPromptChannel¶
The calculation-input channel selected by one guided wizard question.
alias of
Literal[‘casilla’, ‘binding’, ‘relation’]
- class ModeloWorkWizardAnswers(**data)[source]¶
Bases:
BaseModelTyped shell for a run whose answers stay in the flow state.
- Parameters:
data (Any)
- class ModeloWorkWizardStep(**data)[source]¶
Bases:
BaseModelOne registry-grounded question outstanding for a Modelo work unit.
- Parameters:
data (Any)
- channel: ModeloWorkWizardPromptChannel¶
- key: str¶
- casilla_id: str¶
- number: str¶
- label: str¶
- help_text: str | None¶
- legal_refs: tuple[str, ...]¶
- source_refs: tuple[str, ...]¶
- discover_modelo_work_wizard_steps(unit, *, operation)[source]¶
Discover each remaining manual, binding, or relation question.
Registry-computed and ledger-fed values are deliberately absent: their normal calculation inputs are already supplied by the canonical calculate path, so prompting would create an invalid competing override.
- Return type:
- Parameters:
unit (WorkUnit)
operation (PinnedAuthorityOperation)
- modelo_work_wizard_follow_up_step(error, *, unit, operation)[source]¶
Convert a recognised missing calculation input into one extra question.
- Return type:
- Parameters:
error (RegistryValidationError)
unit (WorkUnit)
operation (PinnedAuthorityOperation)
- class ModeloWorkWizardRun(unit, steps, _run_token)[source]¶
Bases:
objectOne live wizard run with its registry-derived step and copy authority.
- Parameters:
unit (WorkUnit)
steps (tuple[ModeloWorkWizardStep, ...])
_run_token (str)
-
steps:
tuple[ModeloWorkWizardStep,...]¶
- definition_for(steps=None)[source]¶
Build the canonical flow definition for these run-owned steps.
- Return type:
- Parameters:
steps (tuple[ModeloWorkWizardStep, ...] | None)
- answer_pairs(state, *, steps=None)[source]¶
Read canonical stripped answers for the supplied pages from a flow state.
- Return type:
- Parameters:
state (FlowState)
steps (tuple[ModeloWorkWizardStep, ...] | None)
- open_modelo_work_wizard(unit, *, operation)[source]¶
Open one copy-scoped wizard run and remove its entries on exit.
- Return type:
- Parameters:
unit (WorkUnit)
operation (PinnedAuthorityOperation)