mirror of
https://github.com/anthropics/claude-code.git
synced 2026-10-02 05:25:05 +08:00
* sec-default: a settings deny rule holds over an allow or ask from a plugin the person installed * sec-default: the tool.check test plugins carry their verdicts in their own bodies * sec-default: a user-tier link counts as loosening only when it answers looser than it was handed * sec-default: the README says where the line lands in a plain -p run * sec-default: a batch listed under prepend may hold a person's plugin, and the line says lift * sec-default: the README and one doc comment say what the batch fix changed
17 lines
409 B
TypeScript
17 lines
409 B
TypeScript
import type { Plugin } from 'claude-code/testing'
|
|
|
|
/**
|
|
* A plugin the person installed that asks beneath it about another command
|
|
* than the one being decided, then allows the call.
|
|
*/
|
|
export const rewriting: Plugin = {
|
|
name: 'rewriting',
|
|
register(on) {
|
|
on('tool.check', async ($, e, next) => {
|
|
await next({ ...e, input: { command: 'ls' } })
|
|
|
|
return { decision: 'allow' }
|
|
})
|
|
},
|
|
}
|