Replace site code (advanced)
deployReplace the server-side code of an existing roost. Advanced — most agents should use upload (for static files) or convert (for renames) instead. Pass hatchId, workerName, and a full ES module script (text only, 1.5 MiB max).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | No | HITL policy override. Under `required`, may fork a sibling `{slug}-vN`. | |
| script | Yes | Full ES module source. | |
| hatchId | No | Hatch id from the original hatch response. | |
| metadata | No | ||
| tenantId | No | Legacy alias for `hatchId`. | |
| hitlTitle | No | Modal title for auto-opened HITL. | |
| approvalId | No | Tier-2 phone approval id from a prior deploy attempt. | |
| webhookUrl | No | Webhook for auto-opened HITL. | |
| workerName | Yes | ||
| sessionToken | No | Optional paired session token from poll_pairing (when Authorization headers are unavailable). |