Add a minimal external api to facilitate developing a code-completion plugin