Flathub needs a policy about command-line tools

How this is implemented in Snap? They have same desktop files, but Launch button works properly.