palbase 0.37.2 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/backend/engine.js +2 -2
  3. package/dist/backend/env.js +1 -1
  4. package/dist/backend/index.js +3 -3
  5. package/dist/backend/stack.js +1 -1
  6. package/dist/backend/test.js +2 -2
  7. package/dist/chunks/{IOVYIATC.js → 4DPMXUG4.js} +1 -1
  8. package/dist/chunks/{YQQHL67Y.js → 4X5CRCHA.js} +2 -2
  9. package/dist/chunks/{LANEQ73A.js → 6L45U2Y5.js} +2 -2
  10. package/dist/chunks/{JCHW52YV.js → 74XDVOCN.js} +2 -2
  11. package/dist/chunks/{SEECU52P.js → 75GV72FJ.js} +2 -2
  12. package/dist/chunks/{72CHRRHY.js → 7PC7ZITW.js} +1 -1
  13. package/dist/chunks/{AF3XUGHY.js → ACSBGFDP.js} +2 -2
  14. package/dist/chunks/{L3S7O5FQ.js → C3PR3NVQ.js} +2 -2
  15. package/dist/chunks/{CHXCVOON.js → CPKZIX35.js} +1 -1
  16. package/dist/chunks/{ZDENVL2U.js → LQTM5NDV.js} +2 -2
  17. package/dist/chunks/{YLLZC52Q.js → LQXBNGFA.js} +1 -1
  18. package/dist/chunks/{GEZH3OTX.js → NH25ELIT.js} +2 -2
  19. package/dist/chunks/{VAPNSTWC.js → OMPJPGED.js} +2 -2
  20. package/dist/chunks/{HMDMAILZ.js → OOYP4NMI.js} +1 -1
  21. package/dist/chunks/{NFFQO2UC.js → PZH7UGDF.js} +2 -2
  22. package/dist/chunks/{C4ENQSIX.js → RTQTXBBV.js} +1 -1
  23. package/dist/chunks/{P5EW3DTQ.js → THBBMGGF.js} +2 -2
  24. package/dist/chunks/{5HYKOPCW.js → US3HOITZ.js} +2 -2
  25. package/dist/chunks/{RVRPBQ4W.js → VGRTKCTS.js} +2 -2
  26. package/dist/chunks/{4Y47I6LA.js → VJHZXT6R.js} +2 -2
  27. package/dist/chunks/{UBQK5O7J.js → WLJ64QP5.js} +1 -1
  28. package/dist/chunks/{QK2S67K3.js → WX4DHPQY.js} +2 -2
  29. package/dist/chunks/{A6LIFQOQ.js → XYG22XRD.js} +2 -2
  30. package/dist/cli.js +125 -125
  31. package/dist/cloud/index.js +2 -2
  32. package/dist/refuse/ai.js +1 -1
  33. package/dist/refuse/backend.js +1 -1
  34. package/dist/refuse/cloud.js +1 -1
  35. package/dist/refuse/server.js +1 -1
  36. package/dist/server/index.js +2 -2
  37. package/dist/server/testing.js +2 -2
  38. package/dist/web/index.js +2 -2
  39. package/dist/web/message.js +2 -2
  40. package/dist/web/palbe.js +2 -2
  41. package/dist/web/paywall.js +2 -2
  42. package/dist/web/push-sw.js +1 -1
  43. package/dist/web/ssr.js +2 -2
  44. package/dist/web/vite.js +2 -2
  45. package/package.json +2 -2
  46. package/types/cloud/src/generated/project.d.ts +1 -1
  47. package/types/internal/src/modules/machines.d.ts +237 -26
@@ -160,9 +160,9 @@ export type Machine = {
160
160
  */
161
161
  running_version: number;
162
162
  /**
163
- * The machine's size. A shared size has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB; shared-512: 0.5 vCPU, 512 MiB; shared-1024: 1 vCPU, 1024 MiB; dedicated-1x: 1 vCPU, 2048 MiB; dedicated-2x: 2 vCPU, 4096 MiB.
163
+ * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price. shared-512 and shared-1024 are retired: a machine that has one keeps it until it is moved to another size; none is opened at or moved to one.
164
164
  */
165
- size: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512";
165
+ size: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512" | "standard-1x" | "standard-2x" | "standard-4x" | "starter";
166
166
  /**
167
167
  * building: no build of it runs yet (its first is on its way — waiting for its commit's checks too — or failed: `state_reason`); starting: on its way up; awake: answering; asleep: idle, and woken by the next request to its address; failed: it cannot start, or its first build failed or was skipped (`state_reason` says why).
168
168
  */
@@ -268,6 +268,11 @@ export type Machine = {
268
268
  contract_error?: string;
269
269
  environment?: EnvironmentRef;
270
270
  moving_to?: EnvironmentRef;
271
+ moved_from?: EnvironmentRef;
272
+ /**
273
+ * The addresses the machine had in the environments of its project it was bound to before it moved: it answers at them too, for good (the user's call of 2026-11-02).
274
+ */
275
+ former_urls?: string[];
271
276
  };
272
277
  /**
273
278
  * A machine to open.
@@ -282,9 +287,9 @@ export type MachineCreate = {
282
287
  */
283
288
  port?: number;
284
289
  /**
285
- * The machine's size. A shared size has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB; shared-512: 0.5 vCPU, 512 MiB; shared-1024: 1 vCPU, 1024 MiB; dedicated-1x: 1 vCPU, 2048 MiB; dedicated-2x: 2 vCPU, 4096 MiB.
290
+ * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price.
286
291
  */
287
- size: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512";
292
+ size: "dedicated-1x" | "dedicated-2x" | "shared-256" | "standard-1x" | "standard-2x" | "standard-4x" | "starter";
288
293
  /**
289
294
  * What the machine is started with in its environment, besides what the platform sets: PORT (where it listens), PALBASE_URL (its project's address, https://<ref>.<domain>), PALBASE_PROJECT_ID, PALBASE_REPLICAS (how many copies of it run) and, given a database, PALBASE_DB_URL and PALBASE_DB_CONNECTIONS (how many connections to it a copy may hold). PORT is refused here; the others, given here or among the machine's secrets, give way to the platform's. Names are environment variable names; 100 variables and 64 KiB at most. Keep secrets in the project's secrets and start the machine with them (`secrets`).
290
295
  */
@@ -350,7 +355,7 @@ export type MachineCreate = {
350
355
  */
351
356
  commit?: string;
352
357
  /**
353
- * The ref of the project's environment the machine is bound to (environment_not_found for one the caller does not reach: an environment's own token or key makes what is bound to its environment alone). None: the environment called. Its name is the project's one: name_taken when another environment holds a machine of that name.
358
+ * The ref of the environment called, when given: a new machine is bound to the environment whose address it is made at (409 bound_to_environment for another — make it at that environment's address). Its name is the project's one: name_taken when another environment holds a machine of that name.
354
359
  */
355
360
  environment?: string;
356
361
  };
@@ -379,9 +384,9 @@ export type MachineUpdate = {
379
384
  */
380
385
  port?: number;
381
386
  /**
382
- * The machine's size. A shared size has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB; shared-512: 0.5 vCPU, 512 MiB; shared-1024: 1 vCPU, 1024 MiB; dedicated-1x: 1 vCPU, 2048 MiB; dedicated-2x: 2 vCPU, 4096 MiB.
387
+ * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price.
383
388
  */
384
- size?: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512";
389
+ size?: "dedicated-1x" | "dedicated-2x" | "shared-256" | "standard-1x" | "standard-2x" | "standard-4x" | "starter";
385
390
  /**
386
391
  * Replaces the machine's environment whole, besides PORT. Names are environment variable names; 100 variables and 64 KiB at most. Keep secrets in the project's secrets and start the machine with them (`secrets`).
387
392
  */
@@ -506,9 +511,9 @@ export type Database = {
506
511
  */
507
512
  pooled_port: number;
508
513
  /**
509
- * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`). preview: a machine's pull request preview's own database — 0.25 vCPU, 512 MiB, 500 MB, put to sleep when idle — opened with its preview and deleted with it; no database is opened at or moved to it.
514
+ * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`). preview: a machine's pull request preview's own database — 0.25 vCPU, 512 MiB, 500 MB, put to sleep when idle — opened with its preview and deleted with it; no database is opened at or moved to it. shared-1g, shared-2g and shared-4g are retired: a database that has one keeps it until it moves to another size; none is opened at or moved to one.
510
515
  */
511
- size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "preview" | "shared-1g" | "shared-2g" | "shared-4g";
516
+ size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "preview" | "shared-1g" | "shared-2g" | "shared-4g" | "standard-1x" | "standard-2x" | "starter";
512
517
  /**
513
518
  * Where its data lives, as its size says: san, the platform's SAN; premium, a Premium SSD v2 disk of its own.
514
519
  */
@@ -576,6 +581,15 @@ export type Database = {
576
581
  */
577
582
  traffic_limit_bytes?: number;
578
583
  environment?: EnvironmentRef;
584
+ moving_to?: EnvironmentRef;
585
+ /**
586
+ * Why the database's last move to another environment was not made, when it was not: the environment it was moving to holds a database of its name by then, or is gone.
587
+ */
588
+ move_note?: string;
589
+ /**
590
+ * The hosts the database had in the environments of its project it was bound to before it moved: it answers at them too, for good (the user's call of 2026-11-02).
591
+ */
592
+ former_hosts?: string[];
579
593
  };
580
594
  /**
581
595
  * A page of a project's databases, by name.
@@ -596,9 +610,9 @@ export type DatabaseCreate = {
596
610
  */
597
611
  name?: string;
598
612
  /**
599
- * The database's size; `free` when left out. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
613
+ * The database's size; `free` when left out. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
600
614
  */
601
- size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "shared-1g" | "shared-2g" | "shared-4g";
615
+ size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
602
616
  /**
603
617
  * Who may connect, as addresses or CIDRs (203.0.113.7, 203.0.113.0/24), 50 at most; anyone with the password when empty.
604
618
  */
@@ -608,7 +622,7 @@ export type DatabaseCreate = {
608
622
  */
609
623
  backup_days?: number;
610
624
  /**
611
- * The ref of the project's environment the database is bound to (environment_not_found for one the caller does not reach: an environment's own token or key makes what is bound to its environment alone). None: the environment called. Its name is the project's one: name_taken when another environment holds a database of that name.
625
+ * The ref of the environment called, when given: a new database is bound to the environment whose address it is made at (409 bound_to_environment for another — make it at that environment's address). Its name is the project's one: name_taken when another environment holds a database of that name.
612
626
  */
613
627
  environment?: string;
614
628
  };
@@ -627,7 +641,7 @@ export type DatabaseUpdate = {
627
641
  /**
628
642
  * The database's size (see `Database.size`); one that is paid for is open to the platform's own project and those named for it alone, as it is opened (403 `size_not_available`). One of the same machine and disk and no larger volume — hobby to free — changes in place. Any other moves through an instance of the new size beside the one that serves, made where the new size lives (a disk of its own, or a SAN volume of its own), which then takes over: the database serves on meanwhile (`state` resizing); its sessions on the direct port end once, when its primary moves, and new logins and transactions wait a few seconds for it. One asleep is woken for its move — its awake hours or disk traffic spent or not, when the size it moves to has no such limit; to one whose it has spent, it sleeps — and the move's time counts against none of them. One down for want of room, moved to a size of a larger volume, is given that room first, in place, and moves once it serves. A move that has not come to its switchover within two hours, and a second for every 10 MB the database holds, is let go: the database stays its size, and `state_reason` says why until its size is changed again — as is one whose primary went down three times before it came to its switchover. One whose primary moves where the move did not ask is stopped, both its instances kept (`state_reason`); onto its instance of the new size, ready — as a node drained moves it — it has come to its switchover. One whose instance of the new size does not take over within five minutes of its switchover says so in `state_reason`, and moves on once it does. Its disk never shrinks. While it moves it serves with the connections of the one of the two sizes that takes fewer; the machines given it are rolled out to their share of the new size's — at once when it takes fewer, once it has moved when it takes more. A size smaller than what it holds is refused (409 `database_too_large`), as is one of a smaller quota while what it holds is not measured yet (409 `database_not_measured`, Retry-After), and so is one the project's limit has no room for (409 `machines_over_limit`), a second free database (409 `free_database_taken`), or one whose connections are too few for the copies the machines given it run (409 `database_connections_short`).
629
643
  */
630
- size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "shared-1g" | "shared-2g" | "shared-4g";
644
+ size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
631
645
  };
632
646
  /**
633
647
  * Whose password is made new.
@@ -951,9 +965,9 @@ export type DatabaseCreated = {
951
965
  */
952
966
  pooled_port: number;
953
967
  /**
954
- * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
968
+ * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
955
969
  */
956
- size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "shared-1g" | "shared-2g" | "shared-4g";
970
+ size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
957
971
  /**
958
972
  * Where its data lives, as its size says: san, the platform's SAN; premium, a Premium SSD v2 disk of its own.
959
973
  */
@@ -1144,15 +1158,15 @@ export type MachineSize = {
1144
1158
  */
1145
1159
  name: string;
1146
1160
  /**
1147
- * shared: a fraction of a CPU as its ceiling, put to sleep when idle; dedicated: whole CPUs of its own, never asleep.
1161
+ * shared: a fraction of a CPU as its ceiling, put to sleep when idle; standard: its CPUs as its ceiling, a quarter of them reserved for it, never asleep; dedicated: whole CPUs of its own, never asleep.
1148
1162
  */
1149
- class: "shared" | "dedicated";
1163
+ class: "shared" | "standard" | "dedicated";
1150
1164
  /**
1151
1165
  * Its CPU ceiling, in CPUs.
1152
1166
  */
1153
1167
  vcpu: number;
1154
1168
  /**
1155
- * Its memory, its own in either class.
1169
+ * Its memory, its own in every class.
1156
1170
  */
1157
1171
  memory_mib: number;
1158
1172
  /**
@@ -1163,6 +1177,10 @@ export type MachineSize = {
1163
1177
  * An idle machine of this size is put to sleep, and woken by its next request.
1164
1178
  */
1165
1179
  sleeps: boolean;
1180
+ /**
1181
+ * What an hour of a copy of this size costs on Pay as you go, in micro-USD (the price table's; a free size's past its free hours).
1182
+ */
1183
+ price_micros_per_hour: number;
1166
1184
  /**
1167
1185
  * A size open to every project; the others are paid for.
1168
1186
  */
@@ -1233,6 +1251,10 @@ export type DatabaseSize = {
1233
1251
  * How many transactions its pooled port (6543) runs at once, however many of its clients are connected: a transaction that finds none of them free within 20 s is refused (53300).
1234
1252
  */
1235
1253
  pooled_connections: number;
1254
+ /**
1255
+ * What an hour of a database of this size awake costs on Pay as you go, in micro-USD (the price table's; a free size's past its free hours).
1256
+ */
1257
+ price_micros_per_hour: number;
1236
1258
  /**
1237
1259
  * A size counted against the project's free databases; the others are paid for.
1238
1260
  */
@@ -1520,6 +1542,12 @@ export type Site = {
1520
1542
  */
1521
1543
  preview_forks: boolean;
1522
1544
  environment?: EnvironmentRef;
1545
+ moving_to?: EnvironmentRef;
1546
+ /**
1547
+ * Why the site's last move to another environment was not made, when it was not: the environment it was moving to holds a site of its name by then, has one of its domains added, or is gone.
1548
+ */
1549
+ move_note?: string;
1550
+ server: SiteServer;
1523
1551
  };
1524
1552
  /**
1525
1553
  * The release a site serves; none before its first.
@@ -1567,12 +1595,13 @@ export type SiteCreate = {
1567
1595
  */
1568
1596
  preview_forks?: boolean;
1569
1597
  /**
1570
- * The ref of the project's environment the site is bound to (environment_not_found for one the caller does not reach: an environment's own token or key makes what is bound to its environment alone). None: the environment called. Its name is the project's one: name_taken when another environment holds a site of that name.
1598
+ * The ref of the environment called, when given: a new site is bound to the environment whose address it is made at (409 bound_to_environment for another — make it at that environment's address). Its name is the project's one: name_taken when another environment holds a site of that name.
1571
1599
  */
1572
1600
  environment?: string;
1601
+ server?: SiteServer;
1573
1602
  };
1574
1603
  /**
1575
- * What to change of a site; a field left out is unchanged.
1604
+ * What to change of a site; a field left out is unchanged — in build too: each of its fields given changes alone, an empty one is found in the source again, and env, when given, is all of the build's settings from then on.
1576
1605
  */
1577
1606
  export type SiteUpdate = {
1578
1607
  spa?: boolean;
@@ -1586,6 +1615,7 @@ export type SiteUpdate = {
1586
1615
  * Whether a fork's pull requests are previewed (Site.preview_forks).
1587
1616
  */
1588
1617
  preview_forks?: boolean;
1618
+ server?: SiteServer;
1589
1619
  };
1590
1620
  /**
1591
1621
  * One upload of a site's files.
@@ -1711,7 +1741,7 @@ export type SiteBuild = {
1711
1741
  * The commit's message, its first line.
1712
1742
  */
1713
1743
  message: string;
1714
- state: "queued" | "building" | "succeeded" | "failed";
1744
+ state: "queued" | "building" | "succeeded" | "failed" | "cancelled";
1715
1745
  /**
1716
1746
  * Why it failed.
1717
1747
  */
@@ -1937,6 +1967,69 @@ export type MachineMove = {
1937
1967
  */
1938
1968
  environment: string;
1939
1969
  };
1970
+ /**
1971
+ * Binds a site to another environment of its project.
1972
+ */
1973
+ export type SiteMove = {
1974
+ /**
1975
+ * The ref of the environment of the project the site moves to.
1976
+ */
1977
+ environment: string;
1978
+ };
1979
+ /**
1980
+ * Binds a database to another environment of its project.
1981
+ */
1982
+ export type DatabaseMove = {
1983
+ /**
1984
+ * The ref of the environment of the project the database moves to.
1985
+ */
1986
+ environment: string;
1987
+ /**
1988
+ * Moves the machines of its environment that run its migrations with it, in one step: they move once it has, its migrations theirs where it moves. Without it, a move such machines would be left behind by is refused (migrations_where_kept).
1989
+ */
1990
+ with_machines?: boolean;
1991
+ };
1992
+ /**
1993
+ * A deploy hook: a URL that builds the site's or machine's branch head when it is POSTed to, with no key — the URL is the secret, given once as the hook is made.
1994
+ */
1995
+ export type DeployHook = {
1996
+ id: string;
1997
+ /**
1998
+ * What calls it: a CMS, a schedule.
1999
+ */
2000
+ name: string;
2001
+ /**
2002
+ * Where it is POSTed to: https://deploy-hooks.<domain>/pbh_…, given once, as it is made.
2003
+ */
2004
+ url?: string;
2005
+ created_at: string;
2006
+ last_used_at: string | null;
2007
+ };
2008
+ /**
2009
+ * A site's or machine's deploy hooks, oldest first: 5 at most.
2010
+ */
2011
+ export type DeployHookList = {
2012
+ hooks: DeployHook[];
2013
+ };
2014
+ /**
2015
+ * A deploy hook to make.
2016
+ */
2017
+ export type DeployHookCreate = {
2018
+ /**
2019
+ * What calls it: letters, digits, spaces, dots, dashes and underscores, 64 at most.
2020
+ */
2021
+ name: string;
2022
+ };
2023
+ /**
2024
+ * A site's server: the machine of its environment that answers, on every address of the site, the paths `paths` names — each a prefix ending in /, an /api/ of the site's own — as it answers at its own address (woken, held to the environment's limits); none named, every path: a web app that runs on a server (Next.js, Nuxt, SvelteKit, Remix, Express), whose site is its address and domains. A pull request's preview of the site is answered by the machine's own preview of it once that is built. 10 paths at most; `/` is every path.
2025
+ */
2026
+ export type SiteServer = ({
2027
+ /**
2028
+ * The machine's name; empty takes the server away (in a change).
2029
+ */
2030
+ machine: string;
2031
+ paths: string[];
2032
+ }) | null;
1940
2033
  /** Palbase Machines */
1941
2034
  export declare function client(t: Transport): {
1942
2035
  /**
@@ -1944,7 +2037,7 @@ export declare function client(t: Transport): {
1944
2037
  *
1945
2038
  * Lists the project's machines, by name.
1946
2039
  *
1947
- * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A name, in any request that names one (/machines/{name}/…), is found in the environment it is bound to and the request is answered there.
2040
+ * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A read that names one (GET /machines/{name}/…) is answered in the environment it is bound to, held to the caller's role there; a change is made at that environment's own address (409 bound_to_environment elsewhere), where a change to production is confirmed and audited.
1948
2041
  */
1949
2042
  listMachines(input?: {
1950
2043
  query?: {
@@ -2221,7 +2314,7 @@ export declare function client(t: Transport): {
2221
2314
  *
2222
2315
  * Lists the project's databases by name, deleted ones that may still be taken back among them.
2223
2316
  *
2224
- * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A name, in any request that names one (/databases/{name}/…), is found in the environment it is bound to and the request is answered there.
2317
+ * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A read that names one (GET /databases/{name}/…) is answered in the environment it is bound to, held to the caller's role there; a change is made at that environment's own address (409 bound_to_environment elsewhere), where a change to production is confirmed and audited.
2225
2318
  */
2226
2319
  listDatabases(input?: {
2227
2320
  query?: {
@@ -2602,7 +2695,7 @@ export declare function client(t: Transport): {
2602
2695
  *
2603
2696
  * Lists the project's sites, by name: a project has 10 at most.
2604
2697
  *
2605
- * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A name, in any request that names one (/sites/{name}/…), is found in the environment it is bound to and the request is answered there.
2698
+ * A project's machines, databases and sites are the project's, each bound to one of its environments: from any of its environments' addresses, one who reaches the project (a developer, an organization's token, an account token) lists every environment's, each naming its environment (environment). A read that names one (GET /sites/{name}/…) is answered in the environment it is bound to, held to the caller's role there; a change is made at that environment's own address (409 bound_to_environment elsewhere), where a change to production is confirmed and audited.
2606
2699
  */
2607
2700
  listSites(input?: {
2608
2701
  query?: {
@@ -2849,7 +2942,7 @@ export declare function client(t: Transport): {
2849
2942
  /**
2850
2943
  * Move a machine to another environment of its project
2851
2944
  *
2852
- * Binds the machine to another environment of its project (the user's call of 2026-11-01): it takes that environment's settings, secrets and modules from its next start, and its address names it (<name>-<the environment's ref>). The operator moves it — out of the environment it leaves, into the new one at the version it serves — in its own pass: the machine says where it is moving (moving_to) until it has, a second or so. Its pull requests' previews are closed; a new push opens them in the new environment. The database it is given stays where it is kept, given across environments. Its name is the project's one (name_taken when the new environment holds a machine of that name); a machine with domains of its own does not move (machine_has_domains): they are removed first. It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found).
2945
+ * Binds the machine to another environment of its project (the user's call of 2026-11-01): it takes that environment's settings, secrets and modules from its next start, and its address names it (<name>-<the environment's ref>). The operator moves it — out of the environment it leaves, into the new one at the version it serves — in its own pass: the machine says where it is moving (moving_to) until it has, a second or so, and what ran where it left answers until it is up in the new one (moved_from; ten minutes at most). It answers at the address it had too, for good (former_urls; the user's call of 2026-11-02). Its domains of its own move with it, and answer throughout: none of them may be added in the new environment too (domain_in_environment), and the new environment must have room for them (too_many_domains). Its pull requests' previews are closed; a new push opens them in the new environment. The database it is given stays where it is kept, given across environments. Its name is the project's one (name_taken when the new environment holds a machine of that name). It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found).
2853
2946
  */
2854
2947
  moveMachine(input: {
2855
2948
  path: {
@@ -2857,6 +2950,124 @@ export declare function client(t: Transport): {
2857
2950
  };
2858
2951
  body: MachineMove; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2859
2952
  signal?: AbortSignal;
2860
- }): Promise<Reply<202, Machine>>;
2953
+ }): Promise<Reply<200, Machine> | Reply<202, Machine>>;
2954
+ /**
2955
+ * Move a site to another environment of its project
2956
+ *
2957
+ * Binds the site to another environment of its project (the user's call of 2026-11-01), as a machine moves: the operator copies its files and releases to the new environment while it serves on where it is, then moves it — its releases, its builds, its domains of its own — in one transaction, a few seconds after the request; its address names the new environment from then on (<name>-<the environment's ref>), and it answers at the one it had too, for good (urls; the user's call of 2026-11-02). Its pull requests' previews are closed; a new push opens them in the new environment. A build of it going on is stopped and built again there; the GitHub installation it is built through is linked to the new environment when it is not. Meanwhile a change of it is refused (409 site_moving), and a move to its own environment lets the move go. The new environment must have room for it (too_many_sites, sites_full, too_many_domains), no site of its name (name_taken) and none of its domains added too (domain_in_environment). A site the platform's operator took down moves nowhere (site_taken_down). It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found). A move that cannot be made is let go of, and the site says why (move_note).
2958
+ */
2959
+ moveSite(input: {
2960
+ path: {
2961
+ name: string;
2962
+ };
2963
+ body: SiteMove; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2964
+ signal?: AbortSignal;
2965
+ }): Promise<Reply<200, Site> | Reply<202, Site>>;
2966
+ /**
2967
+ * Move a database to another environment of its project
2968
+ *
2969
+ * Binds the database to another environment of its project (the user's call of 2026-11-01): what it is — its row, what it is counted and paid for from then on, its address — becomes the new environment's, a few seconds after the request; what holds its data stays where it was made, so nothing is copied and it answers throughout. Its host names the new environment from then on (<name>-<the environment's ref>), and the one it had answers too, for good (former_hosts; the user's call of 2026-11-02); the machines given it are rolled out to the new host, beside the version that serves. Its migrations are the machines' of the environment that keeps it: the machines that run them move with it when with_machines says so — said to move in one step, each after the database — or the move is refused (migrations_where_kept, with the machines). A pull request preview's own database moves with nothing (preview_database); one being resized, restored or archived moves once that is done (database_busy). The new environment must have room for it as for a database opened there (free_database_taken, too_many_databases, size_not_available, backup_days_not_available) and no database of its name (name_taken). Meanwhile a change of it is refused (409 database_moving), and a move to its own environment lets the move go. It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found). A move that cannot be made is let go of, and the database says why (move_note).
2970
+ */
2971
+ moveDatabase(input: {
2972
+ path: {
2973
+ name: string;
2974
+ };
2975
+ body: DatabaseMove; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2976
+ signal?: AbortSignal;
2977
+ }): Promise<Reply<200, Database> | Reply<202, Database>>;
2978
+ /**
2979
+ * Cancel a site's build
2980
+ *
2981
+ * Ends a build that is queued or building (`build_not_cancellable`, 409, for one that ended): its run is stopped, its commit's check says it was cancelled, and the site serves what it served. A push, a deploy or a deploy hook builds again.
2982
+ */
2983
+ cancelSiteBuild(input: {
2984
+ path: {
2985
+ name: string; /** The build's id. */
2986
+ build: string;
2987
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2988
+ signal?: AbortSignal;
2989
+ }): Promise<Reply<200, SiteBuild>>;
2990
+ /**
2991
+ * Cancel a build
2992
+ *
2993
+ * Ends a build that has not rolled out — queued, waiting for its checks or its configuration, building (`build_not_cancellable`, 409, for one being tested or ended): its run is stopped, its commit's check says it was cancelled, and the machine serves what it served. A push, a deploy or a deploy hook builds again.
2994
+ */
2995
+ cancelBuild(input: {
2996
+ path: {
2997
+ name: string; /** The build's id. */
2998
+ build: string;
2999
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3000
+ signal?: AbortSignal;
3001
+ }): Promise<Reply<200, Build>>;
3002
+ /**
3003
+ * List a site's deploy hooks
3004
+ *
3005
+ * The site's deploy hooks, oldest first: their names and when each was last called, never their URLs.
3006
+ */
3007
+ listSiteHooks(input: {
3008
+ path: {
3009
+ name: string;
3010
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3011
+ signal?: AbortSignal;
3012
+ }): Promise<Reply<200, DeployHookList>>;
3013
+ /**
3014
+ * Make a site deploy hook
3015
+ *
3016
+ * Makes a URL that builds the site's branch head when it is POSTed to (https://deploy-hooks.<domain>/<token>), held to the project's builds as a push is, at most once in five seconds. Its URL is in the answer alone: keep it as a secret, and delete the hook if it leaks. 5 at most (`too_many_hooks`, 409); a site built from no repository has none (409).
3017
+ */
3018
+ createSiteHook(input: {
3019
+ path: {
3020
+ name: string;
3021
+ };
3022
+ body: DeployHookCreate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3023
+ signal?: AbortSignal;
3024
+ }): Promise<Reply<201, DeployHook>>;
3025
+ /**
3026
+ * Delete a site deploy hook
3027
+ *
3028
+ * Deletes a deploy hook: its URL builds nothing from now on.
3029
+ */
3030
+ deleteSiteHook(input: {
3031
+ path: {
3032
+ name: string; /** The deploy hook's id. */
3033
+ hook: string;
3034
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3035
+ signal?: AbortSignal;
3036
+ }): Promise<Reply<204, undefined>>;
3037
+ /**
3038
+ * List a machine's deploy hooks
3039
+ *
3040
+ * The machine's deploy hooks, oldest first: their names and when each was last called, never their URLs.
3041
+ */
3042
+ listMachineHooks(input: {
3043
+ path: {
3044
+ name: string;
3045
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3046
+ signal?: AbortSignal;
3047
+ }): Promise<Reply<200, DeployHookList>>;
3048
+ /**
3049
+ * Make a machine deploy hook
3050
+ *
3051
+ * Makes a URL that builds the machine's branch head when it is POSTed to (https://deploy-hooks.<domain>/<token>), held to the project's builds as a push is, at most once in five seconds. Its URL is in the answer alone: keep it as a secret, and delete the hook if it leaks. 5 at most (`too_many_hooks`, 409); a machine read with its caller's tokens has none (409).
3052
+ */
3053
+ createMachineHook(input: {
3054
+ path: {
3055
+ name: string;
3056
+ };
3057
+ body: DeployHookCreate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3058
+ signal?: AbortSignal;
3059
+ }): Promise<Reply<201, DeployHook>>;
3060
+ /**
3061
+ * Delete a machine deploy hook
3062
+ *
3063
+ * Deletes a deploy hook: its URL builds nothing from now on.
3064
+ */
3065
+ deleteMachineHook(input: {
3066
+ path: {
3067
+ name: string; /** The deploy hook's id. */
3068
+ hook: string;
3069
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3070
+ signal?: AbortSignal;
3071
+ }): Promise<Reply<204, undefined>>;
2861
3072
  };
2862
3073
  export type Client = ReturnType<typeof client>;