cadrumo.application.operations.composition module

Owner-only assembly of runtime operation authority into safe services.

class OperationSubmission(receipt, response_capability)[source]

Bases: object

Durable receipt plus its separately held process-local response capability.

Parameters:
receipt: OperationSubmissionReceiptV1
response_capability: OperationResponseCapability
class OperationSubmissionService(supervisor, authority_broker)[source]

Bases: object

Public submit/start door over the private canonical supervisor.

Parameters:
async submit(request, *, actor_ref, operation_id=None)[source]

Durably submit one typed registered request without starting it.

Return type:

OperationSubmission

Parameters:
async submit_secret(requirement, secret)[source]

Transfer one exact mutable secret buffer into runtime-only custody.

Return type:

None

Parameters:
async start(operation_id)[source]

Admit one submitted operation; it keeps running after this returns.

Progress and the outcome are read through the observation service, or awaited with settled().

Return type:

TypeAliasType

Parameters:

operation_id (OperationId)

async settled(operation_id)[source]

Wait until one started operation has concluded, without exposing its raw snapshot.

Cancelling this wait leaves the operation running.

Return type:

TypeAliasType

Parameters:

operation_id (OperationId)

class OperationComposedServices(public_contracts, submission, observation, review, result, refresh, cancellation, detach, _response_factory, _shutdown)[source]

Bases: object

The service family and exact public contracts of one registry graph.

Parameters:
public_contracts: OperationPublicContractSetV1
submission: OperationSubmissionService
observation: OperationObservationService
review: OperationReviewProjectionService
result: OperationResultProjectionService
refresh: OperationWorkspaceRefreshTargetService
cancellation: OperationCancellationService
detach: OperationDetachService
async shutdown()[source]

Settle owner-held runtime resources without exposing them.

Return type:

None

async response(request, capability)[source]

Bind caller identity to the exact process-local REVIEW authority.

Return type:

OperationResponseControlService

Parameters:
compose_operation_services(*, registry, authority_operation, journal, reader, event_stream, leases, operands, owner_id, lease_token_factory, clock, lease_duration, execution_timeout, cleanup_timeout, financial_operand_custody=None)[source]

Bind one immutable registry to real runtime adapters and safe services.

financial_operand_custody is optional because only a registry holding a definition that declares transient financial operands needs it. The supervisor refuses to construct when such a definition is present without it, so omitting it stays a refusal rather than a silently operand-less supervisor.

Return type:

OperationComposedServices

Parameters: