destructive-confirm
A safety extension for Pi that requires confirmation before destructive tool actions.
Package details
Install destructive-confirm from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:destructive-confirm- Package
destructive-confirm- Version
0.1.0- Published
- Aug 24, 2026
- Downloads
- 130/mo · 130/wk
- Author
- devashish1099
- License
- MIT
- Types
- extension
- Size
- 7.1 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
destructive-confirm
A project-local Pi safety extension that asks for confirmation before a destructive tool action executes.
Install
This directory is already in Pi's project-extension location:
.pi/extensions/destructive-confirm/index.ts
Trust the project when Pi asks, then run /reload or restart Pi.
What requires confirmation
bash:rm,rmdir,unlink,find -delete,git clean, destructive Git reset/restore/branch deletion, overwrite redirection, truncation/shredding,dd of=,teewithout append, and in-placesed/perledits.powershell:Remove-Item,Clear-Content, destructive Git actions,Set-Content, and non-appendingOut-File.write: overwriting an existing path. Creating a new file is allowed.edit: exact replacements that shorten content.
The prompt identifies the detected risk and target/command. Approval applies to only that tool invocation. The extension also instructs the model not to ask for a prose confirmation first: the guard's approve/deny dialog is the one authoritative confirmation.
Safety behavior
When Pi has no interactive UI (print or JSON mode), detected destructive actions are denied. This is an extension-level guardrail, not an OS sandbox: it cannot reliably parse every shell language, catch every indirect script, or protect against malicious installed extensions.
Configuration
There is no configuration yet. Edit index.ts's BASH_RULES or powerShellRisk() to add organization-specific commands such as deployment, database, or cloud-destruction commands.