Bucket File Write
bucket_file_writeWrite or replace one TEXT file in a bucket (HTML/CSS/JS/JSON/SVG/Markdown/etc.). For a Wbuilder bucket, first read AGENTS.md and its contract, edit data/, leave _config/ read-only, and pass expected_bucket_revision_id from bucket_get when practical. JavaScript is supported and published as-is. Binary assets and whole local folders use the CLI or REST direct-upload API. The response's bucket carries dashboard_url (and public_url when published); show that link to the user instead of the raw bucket id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Optional note recorded on the created file revision. | |
| path | Yes | Bucket-relative path, for example index.html or assets/styles.css. | |
| content | Yes | UTF-8 text file content (HTML/CSS/JS/JSON/SVG/Markdown/etc.). JavaScript is supported; published sites serve it as-is. Binary assets (images, fonts, PDFs) go through the CLI 'revdoku p <dir>' or the REST direct-upload API (direct to storage), not here. | |
| bucket_id | Yes | Revdoku bucket id returned by bucket_list or bucket_get, for example bkt_... | |
| content_type | No | MIME type such as text/html, text/css, text/plain, or application/json. | |
| revision_comment | No | Optional comment recorded with the file revision or path operation. | |
| expected_bucket_revision_id | No | Optional optimistic-concurrency token from bucket.current_bucket_revision_id. A stale value returns BUCKET_REVISION_CONFLICT without saving. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket | Yes | ||
| skipped | Yes | ||
| written | Yes | ||
| guidance | No |