chore: remove SkillMetadata.permissions and derive skill sandboxing from permission_profile (#13061)

## Summary

This change removes the compiled permissions field from skill metadata
and keeps permission_profile as the single source of truth.

Skill loading no longer compiles skill permissions eagerly. Instead, the
zsh-fork skill escalation path compiles `skill.permission_profile` when
it needs to determine the sandbox to apply for a skill script.

  ## Behavior change

  For skills that declare:
```
  permissions: {}
```
we now treat that the same as having no skill permissions override,
instead of creating and using a default readonly sandbox. This change
makes the behavior more intuitive:

  - only non-empty skill permission profiles affect sandboxing
- omitting permissions and writing permissions: {} now mean the same
thing
- skill metadata keeps a single permissions representation instead of
storing derived state too

Overall, this makes skill sandbox behavior easier to understand and more
predictable.
This commit is contained in:
Celia Chen
2026-03-02 17:29:53 -08:00
committed by GitHub
parent 9965bf31fa
commit 0bb152b01d
11 changed files with 220 additions and 202 deletions

View File

@@ -1539,7 +1539,6 @@ mod tests {
dependencies: None,
policy: None,
permission_profile: None,
permissions: None,
path_to_skills_md: PathBuf::from("test-skill"),
scope: SkillScope::User,
}]),