Skip to content

Commit 6a95ea1

Browse files
committed
Revert "docs(cloud): document lifecycle webhooks"
This reverts commit b4a77f6.
1 parent b4a77f6 commit 6a95ea1

1 file changed

Lines changed: 0 additions & 53 deletions

File tree

packages/cloud/README.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -68,59 +68,6 @@ const provider = createProvider(
6868
3. The request is retried with the payment signature header
6969
4. The sandbox is created — $0.02 per sandbox (includes 10 min)
7070

71-
## Lifecycle Webhooks
72-
73-
Sandbank Cloud supports operator-managed lifecycle webhooks for box status changes. Tenants do not register these through the SDK today. To receive tenant notifications, send your Sandbank tenant id, webhook URL, and optional secret/token to the Sandbank Cloud operator.
74-
75-
Tenant ids must match the `user_id` stored on boxes. For API-key based tenants, this is the label in `AGENT_API_KEYS`, for example `AGENT_API_KEYS=wanman:key`.
76-
77-
Supported tenant events:
78-
79-
- `box.error`
80-
- `box.terminated`
81-
- `box.status_changed`
82-
83-
Tenant webhook payloads are sanitized and omit admin-only fields such as node id, source, and internal detail:
84-
85-
```json
86-
{
87-
"event": "box.error",
88-
"audience": "tenant",
89-
"tenant_id": "wanman",
90-
"box_id": "box-1",
91-
"image": "codebox",
92-
"previous_status": "running",
93-
"status": "error",
94-
"reason": "probe_failure",
95-
"observed_at": "2026-05-01T05:41:00.000Z"
96-
}
97-
```
98-
99-
Requests include `X-Sandbank-Tenant`, `X-Sandbank-Event`, and `X-Sandbank-Delivery`. If a tenant secret is configured, Sandbank sends `X-Sandbank-Signature: sha256=<hmac-sha256>` using HMAC-SHA256 over the exact JSON body. If a token is configured, Sandbank sends `Authorization: Bearer <token>`.
100-
101-
Operator-side configuration examples:
102-
103-
```bash
104-
ADMIN_BOX_LIFECYCLE_WEBHOOK_URL=https://ops.example.com/webhooks/sandbank
105-
ADMIN_BOX_LIFECYCLE_WEBHOOK_TOKEN=change-me
106-
ADMIN_BOX_LIFECYCLE_WEBHOOK_TIMEOUT_MS=2000
107-
```
108-
109-
Legacy `BOX_LIFECYCLE_WEBHOOK_*` variables are still accepted as fallbacks, but `ADMIN_BOX_LIFECYCLE_WEBHOOK_*` is preferred for new deployments.
110-
111-
```bash
112-
TENANT_BOX_LIFECYCLE_WEBHOOKS='{
113-
"wanman": {
114-
"url": "https://wanman.example.com/webhooks/sandbank",
115-
"secret": "wanman-hmac-secret",
116-
"token": "optional-bearer-token",
117-
"events": ["box.error", "box.terminated"],
118-
"timeout_ms": 1500
119-
}
120-
}'
121-
TENANT_BOX_LIFECYCLE_WEBHOOK_TIMEOUT_MS=2000
122-
```
123-
12471
## License
12572

12673
MIT

0 commit comments

Comments
 (0)