Fixes for commands API and permissions declarations