cadrumo.application.operator_actions.models module

Strict application records for machine-resolvable action outcomes.

class ConditionEvidence(**data)[source]

Bases: PreconditionEvidence

Typed facts supporting a failed condition from one authority.

Parameters:

data (Any)

model_config: ClassVar[ConfigDict]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ActionReference(**data)[source]

Bases: PreconditionActionIdentity

Stable action identity; catalogue resolution is owned by a later layer.

Parameters:

action_id (Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=3, max_length=160, pattern=^[a-z][a-z0-9_]*(?:\.[a-z][a-z0-9_]*)+$, ascii_only=None)])

model_config: ClassVar[ConfigDict]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class ActionArgumentBinding(**data)[source]

Bases: ActionArgumentResolution

One recovery-action argument and the verdict data that can supply it.

Parameters:
model_config: ClassVar[ConfigDict]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class PreconditionVerdict(**data)[source]

Bases: PreconditionOutcomeInvariant[ConditionEvidence, ActionReference, ActionArgumentBinding]

Application-owned outcome for one failed precondition.

The record identifies the rejected condition and evidence, then carries exactly one actionable recovery reference or an explicit closed no-recovery outcome. It neither resolves an action catalogue nor embeds presentation text or an executable command.

Parameters:
  • failed_condition_id (Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=3, max_length=160, pattern=^[a-z][a-z0-9_]*(?:\.[a-z][a-z0-9_]*)+$, ascii_only=None)])

  • evidence (tuple[EvidenceT, ...])

  • action (ActionT | None)

  • argument_bindings (tuple[ArgumentT, ...])

  • missing_argument_names (tuple[str, ...])

  • conditionality (ActionConditionality)

  • no_recovery_outcome (NoRecoveryOutcome | None)

model_config: ClassVar[ConfigDict]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class DeclaredNextAction(**data)[source]

Bases: BaseModel

One catalogue action a producer names as the forward step after success.

This is the success-path counterpart of PreconditionVerdict and is deliberately a separate record: nothing failed, so there is no rejected condition, no evidence, no conditionality axis and no closed no-recovery outcome to state. What remains is the stable action identity plus the concrete arguments the producer can already supply from its own outcome.

The record carries no command string, no CLI path and no presentation text. Catalogue lookup, live-command resolution and required-input coverage stay with the operator-surface projection, which refuses a declaration whose target cannot supply every live required input - so a producer can never make an unexecutable step look executable.

Producers across packages share this one record rather than each defining a local “next command” carrier, which is how divergent command prose entered the tree in the first place.

Parameters:

data (Any)

model_config: ClassVar[ConfigDict]

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

action: ActionReference
argument_bindings: tuple[ActionArgumentBinding, ...]