Back to plugins
dsh-approval-grants Cover

dsh-approval-grants

dsh-approval-grants adds persistent “Allow for this task/project” choices to DSH tool approvals—one click ends repeat prompts.

github.com/wenwenxiong/dsh-approval-grants
0 MIT Author wenwenxiong Updated

Install

dsh plugin --profile web add github:wenwenxiong/dsh-approval-grants

Writes to ~/.dsh/profiles/web; loaded by dsh web

DSH plugin installation guide

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:

ButtonEffectScopeLifetime
RejectRejects this call——
Allow onceLets this call throughThis call onlyNot recorded
Allow for this taskApproves this call and records a grantThe Session that raised the requestDies with the session, not persisted
Allow for this projectApproves this call and records a grantThe same tool name under the same working directoryPersistent, 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 pwsh for this project” approves every pwsh approval 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.detail sub-slot, so command details are no longer listed separately (the approval reason text remains).
  • Writing the profile takes the package.json write 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.

Tags Tools Automation

Compiled from the project README · All rights belong to the original author

Report issue / Request removal

Related plugins