Why a suggester cannot accept
Settling someone’s tracked change is an authoring act. A reviewer who could accept their own markup would be an editor wearing a different hat, and the document would lose the property that makes suggest-only useful: that every change in it was approved by somebody else. A suggester still navigates review, previews accept/reject non-destructively, and comments — they just cannot commit.What “enforced” means
The role is applied at every surface, not just the ones your UI happens to render:- Typing and the toolbar — the document sits in a mode the role permits,
and
setDocumentMode()clamps rather than obeys. Asking for"editing"as a suggester yields"suggesting", and theonDocumentModeChangecallback reports what actually happened. - The built-in chrome — the mode toggle disappears when the role has one mode; the ribbon is handed navigation without its accept and reject commands; the inline accept/reject tooltip on each suggestion is suppressed.
- The handle —
review.acceptCurrent(),acceptAll(),acceptSuggestions(), and their reject counterparts returnfalseor a decision with every IDunresolvedrather than acting. Comment mutations no-op for a viewer. - Agent tools —
tools.execute()returns{ ok: false, error: { code: "role_not_permitted" } }for a mutation a viewer cannot make, and for anydirectModecall a suggester cannot make. A delegatedagent.run()is checked the same way, since one call is a stream of mutations.
Direct mode is the one an integration trips over: it is how an agent applies
a change without leaving a tracked-change trail, so a suggester is refused
it. Run the same tool without
directMode and the edit lands as a
suggestion.