feat(sdk): contrat permissions.workspaceExec pour l'exécution contrôlée via l'hôte — #346
Cadrage capacités plugin SCM (#346): le manifeste plugin gagne permissions.workspaceExec.allow — règles d'exécution contrôlée par l'hôte (commande bare ASCII résolue sans shell, argv exact avec jeton `*` en suffixe, cwd project-relative sûr, effect read/write/network/destructive, 64 règles max) — au lieu de lectures ad hoc du store interne .git. Validation manifeste + exports runtime/index + docs README/manifest/ services + auto-check script étendu (règles valides acceptées, règles unsafe rejetées). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -141,6 +141,39 @@ development loop.
|
||||
- `activationScope`: `"app"` by default, or `"project"` when activation needs a
|
||||
focused project immediately.
|
||||
- `capabilities`: `"ui"`, `"tooling"` and/or `"mcp"`.
|
||||
- `permissions.workspaceExec`: explicit generic executable rules used by
|
||||
`ctx.services.workspace.execTool()`.
|
||||
|
||||
## Workspace execution permissions
|
||||
|
||||
Short project-scoped executable access is denied unless the active plugin
|
||||
manifest contains a matching rule:
|
||||
|
||||
```json
|
||||
{
|
||||
"permissions": {
|
||||
"workspaceExec": {
|
||||
"allow": [
|
||||
{
|
||||
"command": "tool",
|
||||
"args": ["status", "*"],
|
||||
"cwd": ".",
|
||||
"effect": "read"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`command` is a bare ASCII executable name; paths and shell command lines are
|
||||
rejected. `args` is an argv pattern: literal tokens match exactly, `*` matches
|
||||
one token, and a final `*` matches the remaining suffix (including no token).
|
||||
`cwd` is an exact normalized project-relative directory; `*` permits any cwd
|
||||
that the host still proves is under the project root. `effect` is one of
|
||||
`read`, `write`, `network`, or `destructive` and drives sandbox/audit policy.
|
||||
The manifest declares generic process access only; it does not add native SCM
|
||||
semantics to IdeA.
|
||||
|
||||
## Contributions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user