fix(coding-agent): prevent duplicate extension runtimes (closes #9863)

This commit is contained in:
Armin Ronacher 2026-09-23 15:33:29 +02:00
parent 36af9dc48e
commit 8d897edaa6
11 changed files with 320 additions and 28 deletions

View file

@ -85,7 +85,9 @@ Pi supplies these packages to extensions and skills:
- `@earendil-works/pi-tui`
- `typebox`
Declare imported Pi packages in `peerDependencies` with a `"*"` range and do not bundle them. Other Pi packages used as dependencies must be included in the published tarball and referenced through their `node_modules` resource paths.
Declare the host-provided packages listed above in `peerDependencies` with a `"*"` range and do not bundle them. Pi suppresses automatic peer installation for managed npm packages and git packages installed with npm, pnpm, or Bun. Local packages are not installed or modified, so their dependency tree remains the package author's responsibility.
Do not list host-provided packages in `dependencies`. A physical copy can bypass Pi's extension module mapping in compiled ESM and create duplicate classes, registries, and initialization work. Pi reports an extension warning when it detects this manifest configuration. Other Pi packages used as dependencies must be included in the published tarball and referenced through their `node_modules` resource paths.
Installed packages load with separate module roots. Do not rely on two packages sharing one dependency instance or one package resolving another package’s undeclared dependency.