Problem
In the V2 TUI, /plugins currently mutates only the running registration. Editing any plugin source triggers reconciliation from config, which can re-enable unrelated plugins that the user manually disabled. The choice also does not survive a TUI restart.
Desired Behavior
A plugin disabled through /plugins remains disabled when:
- another plugin source reloads;
- its own source reloads;
- the TUI restarts.
Enabling it again should remove or replace that durable preference without disturbing its package declaration or options.
Design Question
Choose a durable config representation. The simplest candidate for declared external plugins is:
Built-ins and auto-discovered plugins still require an ID-based override or another explicit representation because they have no package declaration.
PR #42410 demonstrates the bug, regression coverage, and an initial ordered-directive implementation. Finalize the config model before merging.
Acceptance Criteria
- Activation choice is durable and config-backed.
- Unrelated hot reload does not reactivate disabled plugins.
- Package paths and options remain intact.
- Built-in and discovered plugin behavior is explicit.
- Reload and restart behavior have regression coverage.
Problem
In the V2 TUI,
/pluginscurrently mutates only the running registration. Editing any plugin source triggers reconciliation from config, which can re-enable unrelated plugins that the user manually disabled. The choice also does not survive a TUI restart.Desired Behavior
A plugin disabled through
/pluginsremains disabled when:Enabling it again should remove or replace that durable preference without disturbing its package declaration or options.
Design Question
Choose a durable config representation. The simplest candidate for declared external plugins is:
{ "package": "/path/to/plugin.ts", "enabled": false, "options": {} }Built-ins and auto-discovered plugins still require an ID-based override or another explicit representation because they have no package declaration.
PR #42410 demonstrates the bug, regression coverage, and an initial ordered-directive implementation. Finalize the config model before merging.
Acceptance Criteria