docs(coding-agent): document how -e packages are cached and refreshed

This commit is contained in:
Petr Houška 2026-10-29 21:28:57 +01:00
parent bec60c54ba
commit bec1e0f5a4

View file

@ -28,6 +28,8 @@ Use `--extension` or `-e` to try a package for one invocation without adding it
pi -e npm:@example/pi-tools
```
Pi caches `-e` packages under `~/.pi/agent/tmp/extensions/` and checks them on every start and `/reload`. An npm package is reinstalled when the registry has a newer version that matches the specification. A version pinned to an exact number, such as `@1.2.3`, is not checked. A git package is fetched and reset to the remote branch or ref. A ref that is a commit hash already checked out is not fetched. If the check fails or offline mode is on, Pi loads the cached copy.
## Choose a source
| Source | Example | Behavior |