ApprovalRequest#

class scikitplot.agent.ApprovalRequest(run_id, step, decision, effect, scopes, reason, head, digest, gates=(), attempt=1)[source]#

An action waiting at the Approval gate.

Parameters:
run_idstr
stepint

The step the action belongs to.

decisionDecision

The planner’s decision that proposed it.

effectstr

The tool’s effect when the request was made.

scopestuple of str

The tool’s scopes when the request was made, sorted.

reasonstr

Why approval is needed (the effect or the tool the policy names).

headstr

The digest of the run’s last audit record before the request.

digeststr

approval_digest of the above; an Approval must name it.

gatestuple of dict

The gates the action passed before this one.

attemptint, default=1

Which start of the call this is (an idempotent call retried after a crash counts on), so a pause for approval does not reset the count.

Raises:
TypeError, ValueError

If a field is malformed (ids and digests are 64 hexadecimal digits).

Parameters:
property action: Action#

The action waiting for approval.

attempt: int = 1#
decision: Decision[source]#
digest: str[source]#
effect: str[source]#
classmethod from_dict(data)[source]#

Rebuild a request written by to_dict.

Parameters:

data (Mapping[str, Any])

Return type:

ApprovalRequest

gates: tuple[Mapping[str, Any], ...] = ()#
head: str[source]#
reason: str[source]#
run_id: str[source]#
scopes: tuple[str, ...][source]#
step: int[source]#
to_dict()[source]#

Return a JSON-compatible mapping.

Return type:

dict[str, Any]