pub fn decide_guard(kernel: &Kernel) -> Arc<dyn DecideGuard> ⓘExpand description
kernel’s check of every decision on POST /api/approvals/{id}/decide (spec 3.3 §7.2,
§11 S-I11, S-I13): the answer is checked under §7.2 for the surface the server
established — the kernel’s socket or pipe as a paired local terminal, a paired device by
its kind, an operator credential over HTTP as api — and refused with
DECIDE_NOT_HERE_CODE where that surface may not give it; never by a surface a client
declares. An admitted decision is recorded before it reaches the inbox, and a suggested
agent it answers is added or ended at once as that surface. The kernel’s own control plane
installs it; a server that serves the kernel’s inbox installs it with
ApprovalEndpoints::with_decide_guard.
§Example
use adk_server::approvals::ApprovalEndpoints;
let endpoints =
ApprovalEndpoints::new(service).with_decide_guard(adk_kernel::control::decide_guard(&kernel));
let builder = builder.with_approval_endpoints(endpoints);