docs(sdk): clarify pluginRoot scope for runtime plugins — #285 (activation-context: ActivateContext n'expose ni répertoire d'installation ni racine package ni file URL; commands-and-feedback + services: runCommand project/workspace-scoped, aucune résolution package-relative des scripts packagés; manifest: substitution ${pluginRoot}/${appDataDir} étendue par l'hôte uniquement dans contributes.mcpServers command/args/env/cwd; QA verte: npm run build, cohérence champs vs types SDK vérifiée)

This commit is contained in:
2026-09-08 17:19:57 +02:00
parent 7db819c647
commit 5f9c2f9193
4 changed files with 46 additions and 1 deletions

View File

@ -27,7 +27,7 @@ focused project at invocation/render time.
## Context Fields
- `pluginId`, `pluginDisplayName`, `version`: host-provided identity.
- `pluginId`: host-provided plugin identity.
- `logger`: `debug`, `info`, `warn`, `error`.
- `subscriptions`: push disposables returned by command/layout/watch
registrations.
@ -41,6 +41,12 @@ focused project at invocation/render time.
The context never exposes internal IdeA gateways or Tauri commands. Use
`ctx.services` and the registration APIs instead.
`ActivateContext` does not expose the plugin installation directory, package
root, archive root or a file URL that plugins can convert into a local path.
Plugin runtime code must treat packaged files as unavailable to
`ctx.services.tasks.runCommand()` unless a dedicated public SDK API documents
otherwise. Workspace services resolve project-owned paths only.
## Disposal
Push every returned disposable to `ctx.subscriptions`: