Halliday & Matthiessen (2014: 530):
With the imperative the relationship is less clear. We noted in Chapter 4 that the imperative is a somewhat indeterminate category, having some features of a finite and some features of a non-finite clause. Similarly the category of reported imperative (‘indirect command’) is not very clearly defined. But non-finite clauses with to, following a verb such as tell or order, can be interpreted as reported proposals. They likewise display the properties of ‘indirect speech’, although without sequence of tenses, since the verb does not select for tense. For example,‘I know this trick of yours.’ She said || she knew that trick of his.
‘Can you come tomorrow?’ He asked || if she could come the next day.
‘Why isn’t John here?’ She wondered || why John wasn’t there.
‘Help yourselves.’ He told them || to help themselves.
‘We must leave to-night.’ She said || they had to leave that night.