mirror of
https://github.com/pratikwayal01/datacloak.git
synced 2026-10-26 06:59:34 +01:00
18 lines
665 B
YAML
18 lines
665 B
YAML
hooks:
|
|
- id: datacloak-prompt-scan
|
|
event: user.prompt.submit
|
|
actions:
|
|
# scan only: stdout becomes same-turn system context; cannot block here
|
|
- bash: echo "[datacloak] prompt scanned via 'datacloak scan'; secrets must not be repeated"
|
|
- id: datacloak-tool-guard
|
|
event: tool.before.*
|
|
# guard.sh: exit 2 blocks the call; stdout {"tool_args": {...}} rewrites it (action: modify)
|
|
actions:
|
|
- bash: ~/.pi/agent/hook/guard.sh
|
|
action: modify
|
|
- id: datacloak-tool-observe
|
|
event: tool.after.*
|
|
# observe-only: stdout becomes context; cannot block the call here
|
|
actions:
|
|
- bash: ~/.pi/agent/hook/observe.sh
|