cadrumo.entrypoints.tui.aeat_sync.controller module

Projection-only AEAT Sync controller with a closed operation handoff.

class AeatSyncWorkspaceController(context, projection, *, operation_handoff=None, notification_document_handoff=None, action_catalogue=ActionCatalogue(entries=(ActionCatalogueEntry(action_id='operator.auth.configure', target_command_key='config.auth.configure', argument_specifications=(ActionArgumentBindingSpecification(argument_name='file', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='file', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='provider', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='provider', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.auth.login', target_command_key='config.auth.login', argument_specifications=(ActionArgumentBindingSpecification(argument_name='provider', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='provider', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.diagnostics.repair', target_command_key='config.repair', argument_specifications=()), ActionCatalogueEntry(action_id='operator.diagnostics.secure_objects.quarantine', target_command_key='config.repair.quarantine', argument_specifications=(ActionArgumentBindingSpecification(argument_name='yes', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='yes', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.diagnostics.workflow.reset_progress', target_command_key='config.repair.reset_progress', argument_specifications=(ActionArgumentBindingSpecification(argument_name='yes', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='yes', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.ledger.classify', target_command_key='ledger.classify', argument_specifications=()), ActionCatalogueEntry(action_id='operator.ledger.evidence.review.list', target_command_key='ledger.evidence.review.list', argument_specifications=()), ActionCatalogueEntry(action_id='operator.ledger.link', target_command_key='ledger.link', argument_specifications=(ActionArgumentBindingSpecification(argument_name='invoice_id', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='invoice_id', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='transaction_id', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='transaction_id', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.ledger.preflight', target_command_key='ledger.preflight', argument_specifications=(ActionArgumentBindingSpecification(argument_name='period', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='period', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='year', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='year', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.ledger.review', target_command_key='ledger.review', argument_specifications=()), ActionCatalogueEntry(action_id='operator.live.filed.pull', target_command_key='app.live.filed.pull', argument_specifications=(ActionArgumentBindingSpecification(argument_name='modelos', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='modelos', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='period', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='period', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='year', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='year', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.live.filed.pull_all', target_command_key='app.live.filed.pull_all', argument_specifications=()), ActionCatalogueEntry(action_id='operator.live.notifications.list', target_command_key='app.live.notifications.list', argument_specifications=()), ActionCatalogueEntry(action_id='operator.modelo.bindings.list', target_command_key='modelo.bindings.list', argument_specifications=(ActionArgumentBindingSpecification(argument_name='modelo', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='modelo', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='period', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='period', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='year', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='year', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.modelo.describe', target_command_key='modelo.describe', argument_specifications=(ActionArgumentBindingSpecification(argument_name='modelo', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='modelo', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.modelo.filing_record.list', target_command_key='modelo.filing_record.list', argument_specifications=(ActionArgumentBindingSpecification(argument_name='modelo', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='modelo', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.modelo.verification_report.list', target_command_key='modelo.verification_report.list', argument_specifications=(ActionArgumentBindingSpecification(argument_name='calculation_revision_id', source=<ActionArgumentSource.CONDITION_EVIDENCE: 'operator_action.condition_evidence'>, source_key='calculation_revision_id', source_evidence_id='workflow.calculation_revision.addressing'), )), ActionCatalogueEntry(action_id='operator.modelo.work.calculate', target_command_key='modelo.work.calculate', argument_specifications=(ActionArgumentBindingSpecification(argument_name='work_unit_id', source=<ActionArgumentSource.CONDITION_EVIDENCE: 'operator_action.condition_evidence'>, source_key='work_unit_id', source_evidence_id='workflow.work_unit.addressing'), ActionArgumentBindingSpecification(argument_name='work_unit_id', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='work_unit_id', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.modelo.work.create', target_command_key='modelo.work.create', argument_specifications=(ActionArgumentBindingSpecification(argument_name='modelo', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='modelo', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='period', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='period', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='year', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='year', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.modelo.work.file', target_command_key='modelo.work.file', argument_specifications=(ActionArgumentBindingSpecification(argument_name='work_unit_id', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='work_unit_id', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.modelo.work.list', target_command_key='modelo.work.list', argument_specifications=()), ActionCatalogueEntry(action_id='operator.modelo.work.revisions', target_command_key='modelo.work.revisions', argument_specifications=(ActionArgumentBindingSpecification(argument_name='work_unit_id', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='work_unit_id', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.modelo.work.status', target_command_key='modelo.work.status', argument_specifications=(ActionArgumentBindingSpecification(argument_name='work_unit_id', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='work_unit_id', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.modelo.work.verify', target_command_key='modelo.work.verify', argument_specifications=(ActionArgumentBindingSpecification(argument_name='work_unit_id', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='work_unit_id', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.overview.explain', target_command_key='overview.explain', argument_specifications=(ActionArgumentBindingSpecification(argument_name='modelo', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='modelo', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='year', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='year', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.overview.status', target_command_key='overview.status', argument_specifications=()), ActionCatalogueEntry(action_id='operator.profile.archive.reconcile', target_command_key='config.profile.archive.reconcile', argument_specifications=()), ActionCatalogueEntry(action_id='operator.profile.create', target_command_key='config.profile.create', argument_specifications=(ActionArgumentBindingSpecification(argument_name='profile_name', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='profile_name', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.profile.descendiente', target_command_key='config.profile.descendiente.list', argument_specifications=()), ActionCatalogueEntry(action_id='operator.profile.edit', target_command_key='config.profile.edit', argument_specifications=(ActionArgumentBindingSpecification(argument_name='profile_name', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='profile_name', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.profile.list', target_command_key='config.profile.list', argument_specifications=()), ActionCatalogueEntry(action_id='operator.profile.login', target_command_key='config.login', argument_specifications=(ActionArgumentBindingSpecification(argument_name='name', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='name', source_evidence_id=None), )), ActionCatalogueEntry(action_id='operator.profile.logout', target_command_key='config.logout', argument_specifications=()), ActionCatalogueEntry(action_id='operator.profile.repair_active_pointer', target_command_key='config.repair.profile', argument_specifications=(ActionArgumentBindingSpecification(argument_name='clear_active', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='clear_active', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='yes', source=<ActionArgumentSource.REQUEST_CONTEXT: 'operator_action.request_context'>, source_key='yes', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.profile.repair_clear_active', target_command_key='config.repair.profile', argument_specifications=(ActionArgumentBindingSpecification(argument_name='clear_active', source=<ActionArgumentSource.REQUEST_CONTEXT: 'operator_action.request_context'>, source_key='clear_active', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='profile', source=<ActionArgumentSource.VERDICT_CONTEXT: 'operator_action.verdict_context'>, source_key='profile', source_evidence_id=None), ActionArgumentBindingSpecification(argument_name='yes', source=<ActionArgumentSource.REQUEST_CONTEXT: 'operator_action.request_context'>, source_key='yes', source_evidence_id=None))), ActionCatalogueEntry(action_id='operator.profile.status', target_command_key='config.profile.status', argument_specifications=()), ActionCatalogueEntry(action_id='operator.provision.browser', target_command_key='config.provision.browser', argument_specifications=()), ActionCatalogueEntry(action_id='operator.storage.init', target_command_key='config.storage.init', argument_specifications=()))), operation_contracts=None)[source]

Bases: object

Custody of one preloaded workspace and explicitly admitted host handoff.

Parameters:
state_for(zone)[source]

Return the application-owned state without recategorising it.

Return type:

AeatSyncWorkspaceZoneStateV1

Parameters:

zone (AeatSyncWorkspaceZone)

target(zone)[source]

Build a semantic internal target without resolving I/O or a screen.

Return type:

AeatSyncRouteTargetV1

Parameters:

zone (AeatSyncWorkspaceZone)

replace_projection(projection)[source]

Replace a preloaded snapshot without changing the owning host.

Refresh is deliberately an explicit application handoff. This controller never loads a repository or starts a network operation.

Return type:

None

Parameters:

projection (AeatSyncWorkspaceProjectionV1)

admitted_operation(actions, operations)[source]

Expose only one of the three explicitly registered mutation pairings.

The S397 projection admits action and operation axes independently. This TUI layer deliberately does not infer a generic pairing: it can hand off only a singleton pair whose exact join is declared by the injected public operation contract.

Return type:

AeatSyncOperationRequestV1 | None

Parameters:
async retrieve_notification_document(row)[source]

Open a notification document only after an explicit read fact.

row is accepted as object at this boundary so a stale event cannot smuggle an arbitrary object into the door. The exact public row type is checked before the callback is reached.

Return type:

bool

Parameters:

row (object)

can_open(zone)[source]

Allow only observed current or stale projection zones to render bodies.

Return type:

bool

Parameters:

zone (AeatSyncWorkspaceZone)