anb_render_to_file
Write a template with agent-vault:key placeholders to a file, resolving secrets without returning them. The output path is relative to a confined render directory, ensuring secure file creation.
Instructions
Render a template containing agent-vault:key placeholders and write the resolved file (mode 0600) under the confined render dir. SIDE EFFECT: writes a file to disk (overwrites if the path exists). Requires an enrolled identity and a reachable, unlocked Bob to resolve placeholders. Returns the written path, NEVER the resolved content — the caller never sees the secret values. out_path is relative to the render dir; absolute paths and .. traversal are rejected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out_path | Yes | destination path RELATIVE to the render dir (e.g. "app/.env" or "config/db.conf"); absolute paths and .. traversal are rejected. Parent dirs are created as needed | |
| template | Yes | file content with <agent-vault:key> placeholders; resolved values are written to disk (mode 0600), never returned to the caller |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | the absolute path the rendered file was written to | |
| written | Yes |