Risk tiers
GatingRiskTier is serialized in snake case as r0 through r3:
For
r2 and r3, memory-conflict policy can override the default. It returns safe_draft when the referenced memory is conflicted, required conflict context is missing while conflicts exist, or the memory conflict lookup fails.
Evaluation contract
The evaluate request has this wire shape:action, actor_id, and risk_tier are required. MobKit mints the action_id. A GatingEvaluateResult returns:
action_id,action,actor_id, and the effectiverisk_tier- one of
allowed,allowed_with_audit,pending_approval, orsafe_draftinoutcome pending_idwhen approval is pendingfallback_reasonwhen conflict policy forcedsafe_draft
When the stdio
rpc_gateway loads an actions map from runtime_options.gating_config_path, the configured tier for a matching action is authoritative. It replaces a caller-supplied risk_tier before evaluation.Pending approval
Anr3 evaluation creates a GatingPendingEntry with the action and actor identity, optional requested approver and notification fields, and created_at_ms and deadline_at_ms timestamps.
If both approval_recipient and approval_channel are present, the runtime attempts to route and send a gating_approval_request through the loaded router and delivery modules. A missing module or failed notification is recorded in the pending_created audit detail. It does not prevent the pending entry from being created.
Approval timeouts default to 60 seconds and are clamped to the runtime limits. Expiry is refreshed lazily when another gating operation evaluates, lists pending entries, decides, or reads the audit log. An expired entry is removed and recorded as:
Decisions
Resolve a pending entry with:
Approval by the original
actor_id is rejected. When requested_approver is set, every decision must come from that approver. Escalation creates a successor pending entry, clears the requested approver, preserves the original deadline, and returns its ID in next_pending_id.
Audit records
GatingAuditEntry contains:
evaluatedconflict_blockedmemory_conflict_lookup_failedpending_createdapproval_decidedrejection_decidedescalation_decidedtimeout_fallback
Memory conflict integration
Forr2 and r3, the runtime checks the supplied entity and topic against memory conflicts. If the memory module is loaded, that core MCP boundary must provide the memory.conflict_read tool. Without a loaded memory module, the runtime uses its in-process conflict ledger.
API methods
The JSON-RPC methods are:mobkit/gating/evaluatemobkit/gating/pendingmobkit/gating/decidemobkit/gating/audit
See also
- Delivery - route and send after the caller accepts a gating outcome
- Memory - assertions and conflict handling
- JSON-RPC API - exact method parameters and responses
- Configuration - runtime configuration
