Skip to content

Chore: permission-set refactor#10

Merged
mrsimpson merged 2 commits into
mainfrom
claude/agent-permission-sets-YtYsE
Mar 19, 2026
Merged

Chore: permission-set refactor#10
mrsimpson merged 2 commits into
mainfrom
claude/agent-permission-sets-YtYsE

Conversation

@mrsimpson

Copy link
Copy Markdown
Contributor

No description provided.

claude added 2 commits March 19, 2026 05:35
…hardcoded permission sets per agent

Each harness writer now defines three explicit permission sets (rigid,
sensible-defaults, max-autonomy) instead of deriving them from abstract
capability flags. This removes the brittle capability→tool-name mapping
layer that proved difficult to maintain correctly across nine harnesses.

Key changes:
- PermissionPolicy simplified to just { profile } — capabilities field removed
- autonomy.ts facet recipes simplified to pass { profile } directly
- All harness writers updated with hardcoded permission sets per profile
- Claude Code MCP rules now forward wildcard allowedTools as mcp__<ref>__*
  (previously wildcard servers were silently skipped, causing MCP tools
  to always prompt for approval)
- OpenCode permission rule sets inlined from the now-removed
  getHarnessPermissionRules() helper

https://claude.ai/code/session_01RgRDwsqvUZhuz2hEjkBK53
- Extract `formatYamlKey` to `util.ts`; remove duplicate copies from
  `copilot.ts` and `opencode.ts`
- Compute `getKiroTools` once in `kiro.ts` and reuse for both `tools`
  and `allowedTools` instead of calling it twice with identical args
- Strengthen the local `PermissionRule` type in `opencode.ts` from
  `string | Record<string, string>` to use the explicit decision union
  `"ask" | "allow" | "deny"` so the compiler catches invalid values
- Hoist repeated header strings out of individual `switch` case arms in
  `universal.ts` and `windsurf.ts` into a local `const`

https://claude.ai/code/session_01RgRDwsqvUZhuz2hEjkBK53
@mrsimpson mrsimpson merged commit c6c39a1 into main Mar 19, 2026
1 check passed
@mrsimpson mrsimpson deleted the claude/agent-permission-sets-YtYsE branch March 19, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants