AOI-1: drop instance-scope disable for plugins and MCP #730
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#730
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an operator managing agent types and instances, I want the type-level capability surface (plugins, MCP servers) to be a non-negotiable contract, so that instances cannot silently break the role baseline by shadowing inherited entries with
enabled=false.Acceptance criteria
Resolver
resolvePlugins(apps/server/src/domain/agent-config/resolver.ts) ignores rows wherescope='instance' AND enabled=false. The inherited row atagent_type/global/builtincontinues to win.resolveMcpServersignores rows wherescope='instance' AND enabled=false.enabled=falsedoes NOT shadow inherited enabled rowenabled=truefor net-new(plugin_name|name)still works (additive — that is the whole point)Write-path validation
plugin_bindingwherescope='instance' AND enabled=false. Error message:"instance scope cannot disable inherited plugin; remove at agent_type/global instead".mcp_serverwherescope='instance' AND enabled=false. Error message:"instance scope cannot disable inherited MCP; remove at agent_type/global instead"./config/plugins/binding,/config/mcp/server— adjust to actual route names).Schema migration
migrations/00X-add-only-inheritance.ts(number after current head).CHECKconstraints as belt-and-suspenders:Note: SQLite ALTER TABLE doesn't support adding CHECK constraints in-place. Migration must
CREATE TABLE _new, copy rows, drop old, rename. Staleenabled=falserows at instance scope must be pruned BEFORE this migration runs (handled in AOI-5; sequence AOI-5 → AOI-1 in shipping order, OR migration coalesces both steps).Tests
enabled=falseat instance scope returns 400 with the exact error message.Out of scope
References
apps/server/src/domain/agent-config/resolver.ts:240-355(resolvePlugins,resolveMcpServers,mergeByKey)