Conflict resolution beyond line merges: the ACP bridge's mode/set re-notify moved inside master's new containment finally (a throwing presenter must not desync the picker), and session/new keeps the modes advertisement beside master's plain object return. dsh-mode's boundary flush moved off the session/event feed onto the loop's interception seams (agent/prompt-submit / agent/turn-continuation): master's scoped dispatch made post-commit session observers observe-only — an append from one re-enters the publishing append — while the two waterfalls fire outside any log emit and bracket the same boundaries; mode.spec's boundary helper now dispatches those seams via agentEvents, and the containment tests stub only the mode/set append. Catalogs, doc graphs, and the module graph regenerated.
mode/ — session-mode policy family
Session modes: named, logged, per-agent policy states, with plan mode as the first shipped definition. A single product package — there is no interface/implementation seam here, because a mode's variable parts are config values (section text, the access cap), not swappable implementations.
| Package | Role | ctx key |
|---|---|---|
mode/ |
mode/set vocabulary + fold, the ctx.modes service (list/get/set with the turn-boundary flush), the mode:policy guidance section, the access cap (a bash/resolve-mode clamp plus the cap-derived bash guards), and the model-facing exit_plan_mode review tool |
ctx.modes |
The mode in force is a pure function of the session log (SessionEventMap['mode/set'], last one wins), so resume and fork restore it with no extra machinery; the default mode is the absence of policy, keeping the plugin invisible until a mode is set. UIs read flips off session/event: the stdio app exposes /mode, the ACP bridge maps the vocabulary to the session-mode picker. RFC: plan mode.