guard_apply_patch
Restores token placeholders from local RAM and writes real values directly to disk, enabling AI-generated code or text to be applied without exposing secrets to remote LLMs.
Instructions
Zero-Trust Agentic Guard: Reverses token placeholders ([API_KEY_1], [SECRET_1]) in AI-generated code or text, restores authentic values from local volatile RAM, and writes real content directly to target file on disk. Remote LLM never learns actual secrets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Code or text content containing token placeholders to de-anonymize locally before write. | |
| file_path | Yes | Absolute path to the destination file to create or update. | |
| session_id | No | Optional session ID for multi-agent isolation. Defaults to 'default'. | |
| create_backup | No | Whether to create a .bak backup if target file already exists. Defaults to true. |