|null */ public function snapshot( ActionDescriptor $action ): ?array; /** * Undo the action from its snapshot. Called only for an action * reversibility() calls reversible. * * @param ActionDescriptor $action The action being undone. * @param array $before What snapshot() captured. * @return array|\WP_Error What was restored, or why not. */ public function restore( ActionDescriptor $action, array $before ): array|\WP_Error; /** * Whether the action can be taken back, and what it does beyond its * target. Undo, and the AI evaluator's approvals, require reversible. * Reversible with no snapshot is offered as undoable and then refused, * so a provider that cannot snapshot an action should not call it * reversible. * * @param ActionDescriptor $action The action. */ public function reversibility( ActionDescriptor $action ): Reversibility; }