Files
deepseek-harness/packages/mode
kingwl 994eaedc02 review pass: purge stale enforcement language after the axis decoupling
Self-review findings, all prose/metadata (no behavior change): the
package description still claimed hard (execution) enforcement; the RFC
Problem framing still defined plan mode as a read-only tool policy;
integration/mode/snapshot-suite comments still referenced the removed
sandbox clamp and cap; the header-fallback explanation said
'front-of-list insertion' where the actual mechanism is a non-tail
insertion the append-only tools delta cannot express (exit_plan_mode
sits mid-list alphabetically); AGENTS.md's layout line and the RFC's
'policy state/listener' phrasing move to collaboration-state wording.
2026-07-20 14:01:53 +08:00
..

mode/ — session-mode policy family

Session modes: named, logged, per-agent collaboration 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 part is a config value (the section text), not a swappable implementation.

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, 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 front door exposes /mode, the ACP bridge maps the vocabulary to the session-mode picker. RFC: plan mode.