dsh-approval-grants
dsh-approval-grants adds persistent “Allow for this task/project” choices to DSH tool approvals—one click ends repeat prompts.
Install
dsh plugin --profile web add github:wenwenxiong/dsh-approval-grants Writes to ~/.dsh/profiles/web; loaded by dsh web
What it solves
DSH’s built-in approval card only offers Reject and Allow once, so a run that calls the same tool 40 times needs 40 clicks. dsh-approval-grants puts two longer-lived answers next to them:
| Button | Effect | Scope | Lifetime |
|---|---|---|---|
| Reject | Rejects this call | — | — |
| Allow once | Lets this call through | This call only | Not recorded |
| Allow for this task | Approves this call and records a grant | The Session that raised the request | Dies with the session, not persisted |
| Allow for this project | Approves this call and records a grant | The same tool name under the same working directory | Persistent, stored in the plugin config’s projectGrants |
Once a grant exists, the next approval for the same tool is answered automatically by a prepend: true listener on approval/request in the Host half — the prompt never reaches the browser panel, while approval/asked / approval/decided still pair up in the session audit log.
Grants are managed with /grants: list, pre-register, revoke per scope, clear the session’s task grants. Two settings toggles control whether the long-lived buttons appear on the card (turning them off does not revoke saved grants).
Who it’s for
- Users whose agent loops over the same tool (shell, file writes, fetches) and gets interrupted by repeated prompts.
- Developers who want “this kind of action is pre-approved in this project” while keeping grants visible and revocable in one place.
- Teams that still need a complete approval audit trail and do not want the approval gate bypassed.
Install
dsh plugin --profile web add dsh-approval-grants
Known limitations
- Matching is by tool name only: approval requests carry no arguments, so “allow
pwshfor this project” approves everypwshapproval in that project. - Sub-agents need their own grant: task grants are tracked per Session.
- Only the approval gate is affected: sandbox mode, tool availability, and tool failures are untouched.
- The custom card does not render the
conversation.approval.detailsub-slot, so command details are no longer listed separately (the approval reason text remains). - Writing the profile takes the
package.jsonwrite lock; contention triggers backoff retries, and a final failure falls back to a session-only grant with an explicit error rather than pretending it saved.
MIT licensed; frontend plus Host plugin, no network access, no data collection.
Compiled from the project README · All rights belong to the original author
Report issue / Request removal