cadrumo.application.operations.interactions module¶
Revision-bound interaction requests and exact apply/reject responses.
- class OperationInteractionRequest(**data)[source]¶
Bases:
BaseModelImmutable request for one exact operator continuation.
- Parameters:
data (Any)
- interaction_id: OperationInteractionId¶
- identity: OperationIdentity¶
- revision: OperationRevision¶
- kind: OperationInteractionKind¶
- presentation_code: OperationEventCode¶
- response_schema_ref: OperationReference¶
- continuation_digest: ContentDigest¶
- expires_at: datetime | None¶
- class OperationResponseIntent(*values)[source]¶
Bases:
StrEnumClosed operator decision for a review continuation.
- APPLY¶
- REJECT¶
- OperationResponseIntentValue¶
Both members of the operator decision, for a surface that admits either.
An operation model graph must not customise its Pydantic core schema and a bare enum under strict validation refuses the plain token a serialised response carries, so the contracts, the TUI and the censal review all take this literal. Rooted in the enum above; the single-member narrowings on the concrete response models are rooted the same way and stay narrow.
- class OperationApplyResponse(**data)[source]¶
Bases:
_OperationInteractionResponseBaseApply the exact reviewed proposal bound by both digests.
- Parameters:
data (Any)
- intent: Literal[OperationResponseIntent.APPLY]¶
- baseline_digest: ContentDigest¶
- proposed_effect_digest: ContentDigest¶
- class OperationRejectResponse(**data)[source]¶
Bases:
_OperationInteractionResponseBaseReject the exact reviewed proposal without a governed effect.
- Parameters:
data (Any)
- intent: Literal[OperationResponseIntent.REJECT]¶
- reason_code: OperationEventCode | None¶
- class OperationPendingInteraction(**data)[source]¶
Bases:
BaseModelCredential-free durable checkpoint for one exact single-use response.
- Parameters:
data (Any)
- request: OperationInteractionRequest¶
- response_token_digest: ContentDigest¶
- reviewed_proposal_digest: ContentDigest¶
- baseline_digest: ContentDigest | None¶
- proposed_effect_digest: ContentDigest | None¶
- classmethod bind(*, request, response_token, reviewed_proposal_digest, baseline_digest=None, proposed_effect_digest=None)[source]¶
Digest the secret bearer token before it reaches journal state.
- Return type:
- Parameters:
request (OperationInteractionRequest)
response_token (OperationResponseToken)
reviewed_proposal_digest (ContentDigest)
baseline_digest (ContentDigest | None)
proposed_effect_digest (ContentDigest | None)
- consume(response)[source]¶
Refuse every response that does not match this exact checkpoint.
- Return type:
- Parameters:
response (OperationApplyResponse | OperationRejectResponse)
- class OperationConsumedInteraction(**data)[source]¶
Bases:
BaseModelSafe durable continuation intent bound to its exact consumed checkpoint.
- Parameters:
data (Any)
- interaction_id: OperationInteractionId¶
- intent: OperationResponseIntent¶
- response_digest: ContentDigest¶
- consumed_at: datetime¶
- checkpoint: OperationPendingInteraction¶
- continuation_proof_digest: ContentDigest¶
- property reviewed_proposal_digest: ContentDigest¶
Expose only the digest required by the resumed executor.