Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/pages/guides/claude-code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ const precall = SETS.find((one) => one.id === 'precall');
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|PowerShell|Edit|Write|WebFetch",
"matcher": "Bash|PowerShell|Monitor|Edit|Write|NotebookEdit|WebFetch",
"hooks": [{ "type": "command", "command": "agent-chaperone hook pre" }]
}
],
"PostToolUse": [
{
"matcher": "Bash|PowerShell|Read|WebFetch",
"matcher": "Bash|PowerShell|Read|Grep|WebFetch",
"hooks": [{ "type": "command", "command": "agent-chaperone hook post" }]
}
],
"PostToolUseFailure": [
{
"matcher": "Bash|PowerShell|Read|WebFetch",
"matcher": "Bash|PowerShell|Read|Grep|WebFetch",
"hooks": [{ "type": "command", "command": "agent-chaperone hook post" }]
}
]
Expand All @@ -79,6 +79,15 @@ const precall = SETS.find((one) => one.id === 'precall');
in the post list but not the pre list, because the risk in reading a file is what the file
says, not that it was read.
</p>
<p>
Three more are there for reasons that are easy to miss. <code>Monitor</code> runs a command in
the background under the same permission rules as <code>Bash</code>, so it is screened before
it runs. <code>NotebookEdit</code> writes a notebook cell, which is code that runs later, and
a cell like <code>!rm -rf ~</code> is a shell command. <code>Grep</code> returns matching
lines from files, so it sits in the post list beside <code>Read</code>. A matcher made only of
names and <code>|</code> matches each name exactly, so <code>Edit</code> does not cover{' '}
<code>NotebookEdit</code>, and each tool has to be named.
</p>
</section>

<section id="answers">
Expand Down
5 changes: 3 additions & 2 deletions src/pages/guides/ecc.astro
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ const AGENTSHIELD = 'https://www.npmjs.com/package/ecc-agentshield';
/plugin install agent-chaperone@agent-chaperone`}</code></pre>
<p>
That registers three hooks: one before shell commands, file edits and web fetches, and two
after shell commands, file reads and web fetches, including ones that failed. It brings the
agent-chaperone skill as well, which tells the agent what to do when a call is held.
after shell commands, file reads and searches, and web fetches, including ones that failed. It
brings the agent-chaperone skill as well, which tells the agent what to do when a call is
held.
</p>
<p>
If <code>agent-chaperone</code> is installed globally the plugin uses that. Otherwise the
Expand Down
Loading