write
Create or replace a file in the workspace. Supply the last read revision, or 'missing' for a new file, to prevent overwriting concurrent changes.
Instructions
Create or replace a file using Pi. expected_revision must be the last read revision, or 'missing' to create a new file. Returns its new revision.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path or path relative to the workspace. Home is a starting directory, not a sandbox. | |
| content | Yes | ||
| request_key | Yes | Unique operation key within this workspace. Reuse only for the exact same request; uncertain outcomes must not be blindly retried. | |
| workspace_id | Yes | ||
| expected_revision | Yes |