cadrumo.entrypoints.tui.ledger.workspace_injection module¶
The dependency set one Ledger workspace is constructed from.
The route factory and the workspace controller each declared these parameters in full, so adding one more meant editing both signatures and the forwarding call between them. Declaring them once removes that, and makes the set itself nameable: a caller now hands over ONE thing whose contents are validated at construction rather than a dozen arguments validated in two places.
The guard runs in __post_init__, which is what closes the gap the two
signatures allowed. Previously the factory refused a miswired review_action
and the controller did not, so a caller constructing the controller directly
skipped that refusal. There is one construction path now, so a check cannot
apply on one and not the other.
- class LedgerWorkspaceRefreshV1(projection, evidence_items)[source]¶
Bases:
objectThe per-visit state a workspace re-reads after it has written something.
- Parameters:
projection (LedgerWorkspaceProjectionV1)
evidence_items (tuple[AttachmentReviewItem, ...] | None)
-
projection:
LedgerWorkspaceProjectionV1¶
-
evidence_items:
tuple[AttachmentReviewItem,...] |None¶
- class LedgerWorkspaceInjection(review_action, classify_action=None, classification_submitter=None, import_door=None, evidence_action=None, evidence_items=None, link_action=None, link_submitter=None, invoice_add_door=None, exclusion_submitter=None, evidence_door=None, refresh=None)[source]¶
Bases:
objectEvery dependency the Ledger workspace is given from outside.
An absent action means the area is not offered, which is distinct from an action that is offered but miswired: the first is a supported state, the second is refused at construction.
- Parameters:
review_action (ActionReference)
classify_action (ActionReference | None)
classification_submitter (LedgerClassificationSubmitterV1 | None)
import_door (LedgerImportDoorV1 | None)
evidence_action (ActionReference | None)
evidence_items (tuple[AttachmentReviewItem, ...] | None)
link_action (ActionReference | None)
link_submitter (LedgerLinkSubmitterV1 | None)
invoice_add_door (LedgerInvoiceAddDoorV1 | None)
exclusion_submitter (LedgerExclusionSubmitterV1 | None)
evidence_door (LedgerEvidenceDoorV1 | None)
refresh (LedgerWorkspaceRefreshDoorV1 | None)
-
review_action:
ActionReference¶
-
classify_action:
ActionReference|None¶
-
classification_submitter:
LedgerClassificationSubmitterV1|None¶
-
import_door:
LedgerImportDoorV1|None¶
-
evidence_action:
ActionReference|None¶
-
evidence_items:
tuple[AttachmentReviewItem,...] |None¶
-
link_action:
ActionReference|None¶
-
link_submitter:
LedgerLinkSubmitterV1|None¶
-
invoice_add_door:
LedgerInvoiceAddDoorV1|None¶
-
exclusion_submitter:
LedgerExclusionSubmitterV1|None¶ excluding is a classification outcome.
- Type:
Offered only beside
classify_action
-
evidence_door:
LedgerEvidenceDoorV1|None¶