Problem
PR #642 made uninstall discover runtime state roots, but discovery is not ownership. A confirmed purge must not recursively remove an externally managed, shared, or uninstall-time-only AGENT_BUNDLE_STATE_ROOT.
This is a focused lifecycle/manifest-authority follow-up to #592.
Ownership model
- Record all runtime state locations per installed MCP server.
- Record the default derived
<plugin>-<digest16> root as installation-owned by construction.
- Treat an explicit
AGENT_BUNDLE_STATE_ROOT as owned only when installation created the previously absent directory and wrote an install-identity marker there.
- Treat pre-existing, shared, marker-less, or foreign-marker roots as retained and never recursively delete them.
- Resolve relative overrides using the server execution cwd, matching runtime
resolvePluginRoot semantics.
- Purge only receipt-recorded owned roots whose marker/identity evidence still matches.
Acceptance
Closes the lifecycle ownership gap found in the owner audit of #642.
Related: #592
Problem
PR #642 made uninstall discover runtime state roots, but discovery is not ownership. A confirmed purge must not recursively remove an externally managed, shared, or uninstall-time-only
AGENT_BUNDLE_STATE_ROOT.This is a focused lifecycle/manifest-authority follow-up to #592.
Ownership model
<plugin>-<digest16>root as installation-owned by construction.AGENT_BUNDLE_STATE_ROOTas owned only when installation created the previously absent directory and wrote an install-identity marker there.resolvePluginRootsemantics.Acceptance
--keep-datafollowed by purge retains ownership evidence.Closes the lifecycle ownership gap found in the owner audit of #642.
Related: #592