What to build
Running the suite's CLI install (either scope, including a no-op) must also clear this package's non-pinned copies from OpenCode's package cache, so OpenCode re-fetches the just-installed version on next start instead of reusing a stale or partial cached extraction indefinitely.
The cache location mirrors OpenCode's own resolution: join(XDG_CACHE_HOME || join(homedir(), ".cache"), "opencode", "packages"). This holds across platforms (it is XDG-shaped even on macOS/Windows; only homedir() is OS-specific).
On install:
- remove
opencode-architect, opencode-architect@latest, and opencode-architect@<running version>
- keep other pinned versions (
opencode-architect@0.6.0, etc.) and every other package's cache dir
- perform this on every install invocation, including when the install is a no-op
- treat deletion as best-effort: a removal failure warns but does not fail the install
- report the paths cleared to the user
Acceptance criteria
Blocked by
- None (can start immediately).
What to build
Running the suite's CLI install (either scope, including a no-op) must also clear this package's non-pinned copies from OpenCode's package cache, so OpenCode re-fetches the just-installed version on next start instead of reusing a stale or partial cached extraction indefinitely.
The cache location mirrors OpenCode's own resolution:
join(XDG_CACHE_HOME || join(homedir(), ".cache"), "opencode", "packages"). This holds across platforms (it is XDG-shaped even on macOS/Windows; onlyhomedir()is OS-specific).On install:
opencode-architect,opencode-architect@latest, andopencode-architect@<running version>opencode-architect@0.6.0, etc.) and every other package's cache dirAcceptance criteria
installremovesopencode-architect,opencode-architect@latest, andopencode-architect@<running version>from the resolved cache packages directoryXDG_CACHE_HOME, falling back to~/.cacheXDG_CACHE_HOMEBlocked by