Ask the host to open path (a repo-relative working-tree path, e.g. src/App.tsx or /src/App.tsx) in the editor. Resolves once the editor switches to it; rejects with an EditorOpenError (.code) if the path is invalid, missing, or this app may not open files.

Pass selection to land the caret on a specific line — what a problems list needs to make a diagnostic clickable. It widens nothing: a selection says where to look inside a file the caller could already open, and the capability is unchanged (editor:open).

Pass { reveal: true } to ALSO bring the user to the editor across activities — see EditorOpenOptions.reveal; that one does need the elevated editor:reveal, and is refused outright without it.

Older hosts ignore selection and open the file at its existing position, so a caller may pass it unconditionally. reveal is only sent when true, so a host that predates it sees a plain open.