I'm writing a VS Code extension. I want to contribute a Task to the user's workspace, without the user having to configure it (ideally conditionally, depending on the contents of the workspace), and I probably also need a custom problemMatcher.
Does VS Code expose an API to do so? Or should I be writing my own command instead of a task?