pub trait CouncilApprovalRegistryPort:
Send
+ Sync
+ 'static {
// Required methods
fn register(&self, approval_id: String, sender: Sender<ApprovalDecision>);
fn resolve(&self, approval_id: &str, decision: ApprovalDecision) -> bool;
fn is_pending(&self, approval_id: &str) -> bool;
}Expand description
Process-local store for pending HITL approval requests.
Implementations MUST be Send + Sync + 'static so the registry can be
shared across the Axum router, spawned executor tasks, and CLI prompts.
§Acknowledged limitation
The registry is intentionally process-local in v1. Cross-process approval coordination (e.g. multiple server instances) is out of scope.
Required Methods§
Sourcefn register(&self, approval_id: String, sender: Sender<ApprovalDecision>)
fn register(&self, approval_id: String, sender: Sender<ApprovalDecision>)
Register a pending approval gate.
The approval_id is a UUID v4 string generated by the executor.
The sender will be consumed by the next resolve() call with
the same id.
Sourcefn resolve(&self, approval_id: &str, decision: ApprovalDecision) -> bool
fn resolve(&self, approval_id: &str, decision: ApprovalDecision) -> bool
Resolve a pending approval gate.
Removes the entry keyed by approval_id from the registry and sends
decision on the stored oneshot channel.
Returns true if the approval existed and was resolved, false if
the id was not found (e.g. the run already completed or the sender was
dropped).
Sourcefn is_pending(&self, approval_id: &str) -> bool
fn is_pending(&self, approval_id: &str) -> bool
Returns true if an approval with the given id is currently pending.