Generates text for a prompt. The editor's AI agent only depends on this, so tests (and other engines later) can supply their own.
typedef TextGenerator = Future<String> Function(String prompt);