cadrumo.entrypoints.tui.operations.controller module

TUI-facing operation controller limited to the composed public service set.

The modal never inspects the operation supervisor, the journal reader, or any other persistence-adjacent object directly. It drives one submitted operation through exactly the composed public doors: submit, atomic observation, registered REVIEW resolution, typed response control, cooperative cancellation, detach, and the Workspace-refresh target resolver. Everything this controller returns is a public frontend-contract model; nothing here constructs or leaks a persisted snapshot, a journal record, or a supervisor-private type.

class OperationController(services, submission, actor_ref)[source]

Bases: object

Drive one submitted operation through the composed public services only.

Bound to exactly one already-submitted operation’s receipt and its separately held, actor-bound response capability. The modal composes this once per detachable operation and never touches services directly.

Parameters:
services: OperationComposedServices
submission: OperationSubmission
actor_ref: TypeAliasType
property operation_id: OperationId

Return the exact operation identity this controller is bound to.

async start()[source]

Start the bound submission through the composed submission door.

Return type:

TypeAliasType

async observe(after_cursor, *, page_limit=256)[source]

Return one atomic public projection plus its bounded event page.

Return type:

TypeAliasType

Parameters:
  • after_cursor (OperationEventCursor)

  • page_limit (OperationReplayLimit)

async resolve_review(reference)[source]

Resolve the exact registered safe REVIEW projection or a refusal.

Return type:

GenericAlias[TypeVar(ReviewProjectionT, bound= BaseModel)]

Parameters:

reference (OperationReviewProjectionReferenceV1)

async response_control(*, interaction_id, revision)[source]

Bind this actor’s response capability to the exact pending REVIEW.

Return type:

OperationBoundResponseControl

Parameters:
  • interaction_id (str)

  • revision (OperationRevision)

async cancel(*, expected_revision)[source]

Request cooperative cancellation at the exact expected revision.

Return type:

TypeAliasType

Parameters:

expected_revision (OperationRevision)

async detach(*, expected_revision)[source]

Detach this frontend while the operation continues running durably.

Return type:

TypeAliasType

Parameters:

expected_revision (OperationRevision)

class OperationBoundResponseControl(request, service)[source]

Bases: object

One actor-bound response-control handle scoped to a single REVIEW.

Parameters:
request: OperationResponseControlRequestV1
service: OperationResponseControlService
async inspect()[source]

Return the currently authorized response intents or a refusal.

Return type:

TypeAliasType

async apply(request)[source]

Apply the exact pending REVIEW through the bound authority.

Return type:

TypeAliasType

Parameters:

request (OperationResponseApplyRequestV1)

async reject(request)[source]

Reject the exact pending REVIEW through the bound authority.

Return type:

TypeAliasType

Parameters:

request (OperationResponseRejectRequestV1)