Repository navigation
v0.49.75
This patch fixes doctor --fix for Pi, which could delete files outside Magic Context's caches. Upgrade before you run doctor --fix or doctor --force again.
Upgrading
Update the plugin with npx @cortexkit/magic-context@latest doctor, then restart OpenCode, Pi or Oh My Pi. No database migration is needed.
Fixed
doctor --fixfor Pi could delete a linked folder's contents: while looking for old copies of Magic Context in Pi's caches, doctor followed linked folders. If a project's Pi package folder was a link to a checkout, which a local or linked install creates, doctor walked into that checkout. When the checkout held an older Magic Context version, doctor deleted it as a stale cache. Doctor no longer follows links when it looks for caches. Before it clears anything, it checks that the folder is a real folder inside the cache, with no linked folder on the way, and it checks again right before it deletes. A folder that fails the check is left alone, and doctor says so. The same check now guards every cache doctor clears: Pi, Oh My Pi, OpenCode 1 and OpenCode 2. Real stale caches are still cleared as before.doctor --fixfor Pi treated a beta or other tagged install as stale: with Pi set to@cortexkit/pi-magic-context@beta(or another tag), doctor compared the installed copy with thelatestrelease and deleted it when they differed, even when the installed copy was newer. Doctor now looks up the tag you chose and clears only a copy that is older than it, as the OpenCode 2 check already did. When it can't tell which version you want, it keeps your installed copy.