@homeflare/alchemy 0.11.0 → 0.12.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 (240) hide show
  1. package/README.md +3 -3
  2. package/dist/caddy/admin-guard.d.ts +1 -1
  3. package/dist/caddy/index.js.map +2 -2
  4. package/dist/cloudflare/client.d.ts +1 -1
  5. package/dist/cloudflare/index.js.map +2 -2
  6. package/dist/cloudflare/lock-rules.d.ts +1 -1
  7. package/dist/forgejo/branch-protection-form.d.ts +1 -1
  8. package/dist/forgejo/branch-protection.d.ts +1 -1
  9. package/dist/forgejo/index.js.map +10 -10
  10. package/dist/forgejo/org-actions-secrets.d.ts +1 -1
  11. package/dist/forgejo/org-label.d.ts +1 -1
  12. package/dist/forgejo/org-team.d.ts +1 -1
  13. package/dist/forgejo/repo-webhook.d.ts +1 -1
  14. package/dist/forgejo/repository.d.ts +2 -2
  15. package/dist/forgejo/repository.d.ts.map +1 -1
  16. package/dist/forgejo/resource.d.ts +2 -2
  17. package/dist/forgejo/team-member.d.ts +1 -1
  18. package/dist/openbao/auth-role.d.ts +1 -1
  19. package/dist/openbao/bao-http.d.ts +4 -4
  20. package/dist/openbao/cloudflare-permission-groups.d.ts +1 -1
  21. package/dist/openbao/cloudflare-role-form.d.ts +2 -2
  22. package/dist/openbao/cloudflare-role-form.d.ts.map +1 -1
  23. package/dist/openbao/cloudflare-roles-expand.d.ts +1 -1
  24. package/dist/openbao/digest.d.ts +1 -1
  25. package/dist/openbao/forgejo-bootstrap-parse.d.ts +2 -2
  26. package/dist/openbao/forgejo-bootstrap-parse.d.ts.map +1 -1
  27. package/dist/openbao/forgejo-bootstrap.d.ts +1 -1
  28. package/dist/openbao/index.js.map +14 -14
  29. package/dist/openbao/mount.d.ts +1 -1
  30. package/dist/openbao/pki-role.d.ts +1 -1
  31. package/dist/openbao/policy.d.ts +2 -2
  32. package/dist/openbao/proxmox-role-form.d.ts +2 -2
  33. package/dist/openbao/proxmox-role-form.d.ts.map +1 -1
  34. package/dist/openbao/proxmox-role.d.ts +10 -10
  35. package/dist/openbao/ssh-role.d.ts +3 -3
  36. package/dist/proxmox/acl.d.ts +2 -2
  37. package/dist/proxmox/acl.d.ts.map +1 -1
  38. package/dist/proxmox/api-token-form.d.ts +2 -2
  39. package/dist/proxmox/api-token.d.ts +11 -11
  40. package/dist/proxmox/ceph-daemon-form.d.ts +3 -3
  41. package/dist/proxmox/ceph-daemon.d.ts +19 -19
  42. package/dist/proxmox/ceph-daemon.d.ts.map +1 -1
  43. package/dist/proxmox/ceph-flag.d.ts +5 -5
  44. package/dist/proxmox/ceph-fs-wire.d.ts +5 -5
  45. package/dist/proxmox/ceph-fs.d.ts +16 -16
  46. package/dist/proxmox/ceph-osd-tree.d.ts +16 -16
  47. package/dist/proxmox/ceph-osd.d.ts +5 -5
  48. package/dist/proxmox/ceph-pool-form.d.ts +13 -13
  49. package/dist/proxmox/ceph-pool-form.d.ts.map +1 -1
  50. package/dist/proxmox/ceph-pool.d.ts +3 -3
  51. package/dist/proxmox/client.d.ts +2 -2
  52. package/dist/proxmox/credentials.d.ts +8 -8
  53. package/dist/proxmox/credentials.d.ts.map +1 -1
  54. package/dist/proxmox/firewall-alias-form.d.ts +1 -1
  55. package/dist/proxmox/firewall-alias.d.ts +1 -1
  56. package/dist/proxmox/generated/pbs.d.ts +1 -1
  57. package/dist/proxmox/generated/pve.d.ts +1 -1
  58. package/dist/proxmox/group.d.ts +8 -8
  59. package/dist/proxmox/ha-resource.d.ts +3 -2
  60. package/dist/proxmox/ha-resource.d.ts.map +1 -1
  61. package/dist/proxmox/ha-rule-form.d.ts +5 -5
  62. package/dist/proxmox/ha-rule.d.ts +3 -3
  63. package/dist/proxmox/index.d.ts +6 -0
  64. package/dist/proxmox/index.d.ts.map +1 -1
  65. package/dist/proxmox/index.js +356 -142
  66. package/dist/proxmox/index.js.map +59 -56
  67. package/dist/proxmox/lease-cache.d.ts +4 -4
  68. package/dist/proxmox/lxc-harness.d.ts +1 -1
  69. package/dist/proxmox/lxc-props.d.ts +2 -2
  70. package/dist/proxmox/lxc.d.ts +3 -3
  71. package/dist/proxmox/members.d.ts +3 -3
  72. package/dist/proxmox/network-apply-read.d.ts +5 -5
  73. package/dist/proxmox/network-apply.d.ts +9 -9
  74. package/dist/proxmox/node-network-form.d.ts +6 -6
  75. package/dist/proxmox/node-network.d.ts +17 -17
  76. package/dist/proxmox/node-network.d.ts.map +1 -1
  77. package/dist/proxmox/notification-target.d.ts +3 -2
  78. package/dist/proxmox/notification-target.d.ts.map +1 -1
  79. package/dist/proxmox/pbs-datastore-guard.d.ts +1 -1
  80. package/dist/proxmox/pbs-datastore.d.ts +10 -10
  81. package/dist/proxmox/pbs-prune-job.d.ts +2 -2
  82. package/dist/proxmox/pbs-sync-job.d.ts +4 -4
  83. package/dist/proxmox/pbs-verify-job.d.ts +1 -1
  84. package/dist/proxmox/pool.d.ts +4 -4
  85. package/dist/proxmox/provision-baseline.d.ts +74 -0
  86. package/dist/proxmox/provision-baseline.d.ts.map +1 -0
  87. package/dist/proxmox/provision-bootstrap.d.ts +33 -0
  88. package/dist/proxmox/provision-bootstrap.d.ts.map +1 -0
  89. package/dist/proxmox/provision-cli-fake.d.ts +38 -0
  90. package/dist/proxmox/provision-cli-fake.d.ts.map +1 -0
  91. package/dist/proxmox/provision-declare.d.ts +25 -0
  92. package/dist/proxmox/provision-declare.d.ts.map +1 -0
  93. package/dist/proxmox/replication-job.d.ts +9 -8
  94. package/dist/proxmox/replication-job.d.ts.map +1 -1
  95. package/dist/proxmox/resource.d.ts +2 -2
  96. package/dist/proxmox/resource.d.ts.map +1 -1
  97. package/dist/proxmox/sdn-apply-read.d.ts +7 -7
  98. package/dist/proxmox/sdn-apply.d.ts +1 -1
  99. package/dist/proxmox/sdn-subnet-form.d.ts +1 -1
  100. package/dist/proxmox/sdn-subnet.d.ts +5 -5
  101. package/dist/proxmox/sdn-vnet.d.ts +5 -6
  102. package/dist/proxmox/sdn-vnet.d.ts.map +1 -1
  103. package/dist/proxmox/storage.d.ts +4 -3
  104. package/dist/proxmox/storage.d.ts.map +1 -1
  105. package/dist/proxmox/user.d.ts +3 -2
  106. package/dist/proxmox/user.d.ts.map +1 -1
  107. package/dist/proxmox/values.d.ts +1 -1
  108. package/dist/proxmox/zfs-pool-write.d.ts +1 -1
  109. package/dist/proxmox/zfs-pool.d.ts +5 -5
  110. package/dist/talos/credentials.d.ts +1 -1
  111. package/dist/talos/credentials.d.ts.map +1 -1
  112. package/dist/talos/index.js.map +1 -1
  113. package/docs/adopt-verify.md +21 -5
  114. package/docs/adopted-deploys.md +1 -1
  115. package/docs/ownership.md +26 -1
  116. package/docs/provision-baseline.md +106 -0
  117. package/docs/proxmox-lxc-adopt.md +2 -2
  118. package/docs/proxmox-lxc.md +5 -4
  119. package/docs/proxmox.md +6 -0
  120. package/package.json +1 -1
  121. package/src/caddy/admin-guard.ts +1 -1
  122. package/src/caddy/local-admin.ts +1 -1
  123. package/src/cloudflare/client.ts +1 -1
  124. package/src/cloudflare/lock-rules.ts +1 -1
  125. package/src/forgejo/branch-protection-form.ts +1 -1
  126. package/src/forgejo/branch-protection.ts +1 -1
  127. package/src/forgejo/client.ts +1 -1
  128. package/src/forgejo/org-actions-secrets.ts +1 -1
  129. package/src/forgejo/org-label.ts +1 -1
  130. package/src/forgejo/org-team.ts +1 -1
  131. package/src/forgejo/repo-webhook.ts +1 -1
  132. package/src/forgejo/repository.ts +2 -2
  133. package/src/forgejo/resource.ts +2 -2
  134. package/src/forgejo/team-member.ts +1 -1
  135. package/src/openbao/README.md +4 -4
  136. package/src/openbao/auth-role.ts +1 -1
  137. package/src/openbao/bao-http.test.ts +2 -2
  138. package/src/openbao/bao-http.ts +6 -6
  139. package/src/openbao/bao-status.test.ts +1 -1
  140. package/src/openbao/bao-status.ts +1 -1
  141. package/src/openbao/cloudflare-group-scope.test.ts +1 -1
  142. package/src/openbao/cloudflare-permission-groups.test.ts +1 -1
  143. package/src/openbao/cloudflare-permission-groups.ts +3 -3
  144. package/src/openbao/cloudflare-policy.ts +1 -1
  145. package/src/openbao/cloudflare-role-form.ts +2 -2
  146. package/src/openbao/cloudflare-roles-expand.ts +1 -1
  147. package/src/openbao/digest.ts +1 -1
  148. package/src/openbao/forgejo-bootstrap-parse.test.ts +3 -3
  149. package/src/openbao/forgejo-bootstrap-parse.ts +2 -2
  150. package/src/openbao/forgejo-bootstrap.ts +4 -4
  151. package/src/openbao/kubernetes-role-form.test.ts +5 -5
  152. package/src/openbao/mount.ts +1 -1
  153. package/src/openbao/pki-role.ts +1 -1
  154. package/src/openbao/policy-wire.test.ts +3 -3
  155. package/src/openbao/policy.ts +2 -2
  156. package/src/openbao/proxmox-role-form.ts +5 -5
  157. package/src/openbao/proxmox-role.ts +11 -11
  158. package/src/openbao/ssh-role.ts +3 -3
  159. package/src/proxmox/acl.ts +4 -4
  160. package/src/proxmox/adopt-noop.test.ts +6 -6
  161. package/src/proxmox/api-token-form.ts +4 -4
  162. package/src/proxmox/api-token.ts +13 -13
  163. package/src/proxmox/ceph-daemon-form.ts +3 -3
  164. package/src/proxmox/ceph-daemon.ts +20 -20
  165. package/src/proxmox/ceph-flag.ts +7 -7
  166. package/src/proxmox/ceph-fs-wire.ts +7 -7
  167. package/src/proxmox/ceph-fs.ts +18 -18
  168. package/src/proxmox/ceph-osd-tree.ts +16 -16
  169. package/src/proxmox/ceph-osd.ts +6 -6
  170. package/src/proxmox/ceph-pool-adopt.test.ts +14 -14
  171. package/src/proxmox/ceph-pool-form.ts +13 -13
  172. package/src/proxmox/ceph-pool.ts +6 -6
  173. package/src/proxmox/client.test.ts +3 -3
  174. package/src/proxmox/client.ts +3 -3
  175. package/src/proxmox/credentials.test.ts +6 -8
  176. package/src/proxmox/credentials.ts +8 -8
  177. package/src/proxmox/firewall-alias-form.ts +1 -1
  178. package/src/proxmox/firewall-alias.ts +1 -1
  179. package/src/proxmox/generated/pbs.ts +1 -1
  180. package/src/proxmox/generated/pve.ts +1 -1
  181. package/src/proxmox/group.ts +10 -10
  182. package/src/proxmox/ha-resource.ts +3 -2
  183. package/src/proxmox/ha-rule-form.ts +5 -5
  184. package/src/proxmox/ha-rule.ts +3 -3
  185. package/src/proxmox/index.test.ts +7 -0
  186. package/src/proxmox/index.ts +14 -0
  187. package/src/proxmox/lease-cache.test.ts +19 -19
  188. package/src/proxmox/lease-cache.ts +4 -4
  189. package/src/proxmox/lxc-adopt.test.ts +3 -3
  190. package/src/proxmox/lxc-create-form.ts +1 -1
  191. package/src/proxmox/lxc-guards.test.ts +4 -4
  192. package/src/proxmox/lxc-harness.ts +3 -3
  193. package/src/proxmox/lxc-judge.test.ts +5 -5
  194. package/src/proxmox/lxc-lifecycle.ts +1 -1
  195. package/src/proxmox/lxc-props.ts +2 -2
  196. package/src/proxmox/lxc-read.test.ts +3 -3
  197. package/src/proxmox/lxc-strict-adopt.test.ts +1 -1
  198. package/src/proxmox/lxc-volume.test.ts +9 -9
  199. package/src/proxmox/lxc-volume.ts +1 -1
  200. package/src/proxmox/lxc-wire.ts +1 -1
  201. package/src/proxmox/lxc.ts +3 -3
  202. package/src/proxmox/members.test.ts +1 -1
  203. package/src/proxmox/members.ts +3 -3
  204. package/src/proxmox/metric-server-otel.ts +2 -2
  205. package/src/proxmox/network-apply-read.ts +10 -10
  206. package/src/proxmox/network-apply.ts +10 -10
  207. package/src/proxmox/node-network-form.ts +7 -7
  208. package/src/proxmox/node-network.ts +18 -18
  209. package/src/proxmox/notification-target.ts +3 -2
  210. package/src/proxmox/pbs-datastore-guard.ts +1 -1
  211. package/src/proxmox/pbs-datastore.ts +10 -10
  212. package/src/proxmox/pbs-prune-job.ts +2 -2
  213. package/src/proxmox/pbs-sync-job.ts +4 -4
  214. package/src/proxmox/pbs-verify-job.ts +1 -1
  215. package/src/proxmox/pool.test.ts +2 -2
  216. package/src/proxmox/pool.ts +4 -4
  217. package/src/proxmox/provision-baseline.test.ts +87 -0
  218. package/src/proxmox/provision-baseline.ts +162 -0
  219. package/src/proxmox/provision-bootstrap.test.ts +132 -0
  220. package/src/proxmox/provision-bootstrap.ts +135 -0
  221. package/src/proxmox/provision-cli-fake.ts +217 -0
  222. package/src/proxmox/provision-declare.test.ts +111 -0
  223. package/src/proxmox/provision-declare.ts +103 -0
  224. package/src/proxmox/replication-job.ts +9 -8
  225. package/src/proxmox/resource.ts +3 -3
  226. package/src/proxmox/sdn-apply-read.test.ts +16 -16
  227. package/src/proxmox/sdn-apply-read.ts +7 -7
  228. package/src/proxmox/sdn-apply.ts +3 -3
  229. package/src/proxmox/sdn-subnet-form.ts +1 -1
  230. package/src/proxmox/sdn-subnet.ts +5 -5
  231. package/src/proxmox/sdn-vnet.ts +5 -6
  232. package/src/proxmox/storage.ts +4 -3
  233. package/src/proxmox/user.ts +3 -2
  234. package/src/proxmox/values.test.ts +2 -2
  235. package/src/proxmox/values.ts +1 -1
  236. package/src/proxmox/zfs-pool-write.ts +1 -1
  237. package/src/proxmox/zfs-pool.ts +6 -6
  238. package/src/talos/credentials.ts +3 -3
  239. package/src/talos/values.test.ts +9 -9
  240. package/src/verify/cli.test.ts +1 -1
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * One credential per (target, role) for the life of a run, instead of one per API call.
3
3
  *
4
- * 🔴 THE MEASUREMENT THAT MADE THIS NECESSARY. A single `alchemy plan` plus `deploy` of the TB4
5
- * stack — 98 resources — left **760 API token entries in `/etc/pve/user.cfg`**, counted on n2
4
+ * 🔴 THE MEASUREMENT THAT MADE THIS NECESSARY. A single `alchemy plan` plus `deploy` of the C1
5
+ * stack — 98 resources — left **760 API token entries in `/etc/pve/user.cfg`**, counted on node-b
6
6
  * immediately afterwards. `mint()` asked OpenBao for a new credential on EVERY call, and each
7
7
  * mint creates a real Proxmox token: read, diff, reconcile and read-back each got their own. They
8
8
  * drain as the leases expire (760 down to 712 over five minutes), so nothing was broken — but
@@ -52,9 +52,9 @@ import { type ApiTarget, type PveCredential, type PveRole } from './credentials.
52
52
  * What a credential is cached under.
53
53
  *
54
54
  * ⛔ KEYED ON THE OPENBAO MOUNT AND ROLE, NOT ON A MEMBER HOSTNAME. A PVE API token is
55
- * cluster-wide — `user.cfg` is replicated — so n2, n3 and n4 share one credential. Keying on
55
+ * cluster-wide — `user.cfg` is replicated — so node-b, node-c and node-d share one credential. Keying on
56
56
  * `api` would mint three identical tokens when failover rotates members.
57
- * ★ THE MOUNT CANNOT COLLIDE ACROSS CLUSTERS: `proxmox-tb4`, `proxmox-ops` and `pbs-tb4` are
57
+ * ★ THE MOUNT CANNOT COLLIDE ACROSS CLUSTERS: `proxmox-c1`, `proxmox-c2` and `pbs-c1` are
58
58
  * distinct OpenBao mounts with distinct policies; two estates never share a mount name.
59
59
  * ★ A PLAIN OBJECT IS A SAFE KEY BECAUSE EFFECT COMPARES KEYS STRUCTURALLY — two separately built
60
60
  * literals with the same fields are one entry, which the probe above measured.
@@ -13,7 +13,7 @@ export declare const TARGET: PveTarget;
13
13
  export declare const LIVE: Readonly<Record<string, unknown>>;
14
14
  /** Where `seed` puts the production-shaped guest by default, and its `node/vmid` key. */
15
15
  export declare const NODE = "pve1";
16
- export declare const VMID = 100;
16
+ export declare const VMID = 900;
17
17
  export declare const KEY: string;
18
18
  /** The live config as a declaration: every key, minus what pvesh adds that is not a prop. */
19
19
  export declare const pasted: (over?: Partial<LxcProps>) => LxcProps;
@@ -35,7 +35,7 @@ export interface LxcProps extends WithTarget {
35
35
  /** MiB. */
36
36
  swap?: number;
37
37
  /**
38
- * `local-zfs:subvol-100-disk-0,size=40G` as read, or `local-zfs:40` (40 GiB, new volume) to
38
+ * `local-zfs:subvol-900-disk-0,size=40G` as read, or `local-zfs:40` (40 GiB, new volume) to
39
39
  * create. See lxc-volume.ts for what may change: options in place, size up only.
40
40
  */
41
41
  rootfs?: string;
@@ -56,7 +56,7 @@ export interface LxcProps extends WithTarget {
56
56
  console?: PveFlag;
57
57
  tty?: number;
58
58
  cmode?: string;
59
- /** `tank:subvol-100-disk-1,mp=/data,backup=1,size=100G`, or `tank:100,mp=/data` to create. */
59
+ /** `tank:subvol-900-disk-1,mp=/data,backup=1,size=100G`, or `tank:100,mp=/data` to create. */
60
60
  [mount: `mp${number}`]: string | undefined;
61
61
  /** `name=eth0,bridge=vmbr0,ip=dhcp`. ⚠️ An undeclared `hwaddr` keeps the live MAC. */
62
62
  [nic: `net${number}`]: string | undefined;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * `Proxmox.Lxc` — a container, declared: adopted as it runs, or created from a template.
3
3
  *
4
- * ★ `hf-provision@pve` HOLDS EXACTLY THE ROLE THIS NEEDS: `LXCProvisioner` on `/` grants
5
- * VM.Allocate, VM.Audit, VM.Config.{CPU,Disk,HWType,Memory,Network,Options}, VM.PowerMgmt,
6
- * Datastore.AllocateSpace, Datastore.Audit, SDN.Use, Sys.Audit. What that role cannot do — device
4
+ * ★ THE PROVISIONING BASELINE HOLDS WHAT THIS NEEDS (provision-baseline.ts): on `/`, VM.Allocate,
5
+ * VM.Audit, VM.Config.{CPU,Disk,HWType,Memory,Network,Options}, VM.PowerMgmt,
6
+ * Datastore.AllocateSpace, Datastore.Audit, SDN.Use, Sys.Audit. What no token can do — device
7
7
  * passthrough, bind mounts, features beyond nesting — PVE keeps for root@pam, and lxc-judge.ts
8
8
  * refuses at plan with the `pct set` to run instead.
9
9
  *
@@ -1,10 +1,10 @@
1
1
  /**
2
- * TB4 cluster members: ordered failover, last-good preference, transport classification.
2
+ * C1 cluster members: ordered failover, last-good preference, transport classification.
3
3
  *
4
4
  * ★ ANY MEMBER'S :8006 API MANAGES THE WHOLE CLUSTER — PVE proxies node paths itself — so the
5
5
  * provider reaches the cluster through whichever member is up, not through one pinned node.
6
6
  *
7
- * ⛔ NEVER cluster-tb4.example.com: it resolves to 10.20.10.250, which nothing serves.
7
+ * ⛔ NEVER cluster-c1.example.com: it resolves to 192.0.2.250, which nothing serves.
8
8
  */
9
9
  import * as Effect from 'effect/Effect';
10
10
  import * as HttpClient from 'effect/unstable/http/HttpClient';
@@ -44,7 +44,7 @@ export type PveMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
44
44
  * elsewhere can repeat a write.
45
45
  *
46
46
  * ★ Reads fail over on any transport failure, including timeout — no side effect to duplicate.
47
- * MEASURED 2026-09-14: full TB4 plans stayed all-noop with the first member refused (127.0.0.1)
47
+ * MEASURED 2026-09-14: full C1 plans stayed all-noop with the first member refused (127.0.0.1)
48
48
  * and with it unresolvable (n9.invalid).
49
49
  */
50
50
  export declare const executeOnCluster: (target: PveTarget, method: PveMethod, path: string, build: (apiBase: string) => HttpClientRequest.HttpClientRequest) => Effect.Effect<HttpClientResponse.HttpClientResponse, {
@@ -7,7 +7,7 @@
7
7
  * diff, and the only write in either file is the apply itself.
8
8
  *
9
9
  * ⛔ THE PENDING STATE IS NOT IN `data`, WHICH IS WHY THIS FILE DOES ITS OWN FETCH. MEASURED in the
10
- * cluster's own source on n2, 2026-09-13 — not inferred from documentation:
10
+ * cluster's own source on node-b, 2026-09-13 — not inferred from documentation:
11
11
  * PVE/API2/Network.pm my $tmp = PVE::INotify::read_file('interfaces', 1);
12
12
  * $rpcenv->set_result_attrib('changes', $changes) if $changes;
13
13
  * PVE/HTTPServer.pm if (my $diff = $rpcenv->get_result_attrib('changes')) {
@@ -24,9 +24,9 @@
24
24
  * `GET /nodes/{node}/network` answers with the STAGED config and a node about to be reconfigured
25
25
  * looks identical to one already running it. Same trap `sdn-apply.ts` documents for `?running=1`.
26
26
  *
27
- * ⚠️ `active` IS NOT A PENDING SIGNAL, AND THE OBVIOUS SHORTCUT IS MEASURABLY WRONG. On n2 and n3,
28
- * with nothing staged anywhere (VERIFIED 2026-09-13: `/etc/network/interfaces.new` absent on n2,
29
- * n3 and n4), `wlp91s0` already comes back with no `active` key at all. Counting interfaces that
27
+ * ⚠️ `active` IS NOT A PENDING SIGNAL, AND THE OBVIOUS SHORTCUT IS MEASURABLY WRONG. On node-b and node-c,
28
+ * with nothing staged anywhere (VERIFIED 2026-09-13: `/etc/network/interfaces.new` absent on node-b,
29
+ * node-c and node-d), `wlan0` already comes back with no `active` key at all. Counting interfaces that
30
30
  * are not up as "pending" would report an update on two of the three nodes forever.
31
31
  *
32
32
  * ⚠️ ONE THING GENUINELY CANNOT BE SEEN FROM HERE, AND IT IS SMALL. The diff is computed as
@@ -60,7 +60,7 @@ export declare const pendingCount: (target: PveTarget, node: string) => Effect.E
60
60
  *
61
61
  * ★ A REASON RATHER THAN A BOOLEAN, BECAUSE THE CALLER'S ONLY USE FOR IT IS A REFUSAL MESSAGE.
62
62
  * "The deploy stopped because the cluster was degraded" is not actionable at three in the
63
- * morning; "quorate=true offline=[n3]" is. The two callers in network-apply.ts ask this before
63
+ * morning; "quorate=true offline=[node-c]" is. The two callers in network-apply.ts ask this before
64
64
  * the reload and again after it, and the second answer is the one that stops the chain from
65
65
  * reaching the next node.
66
66
  *
@@ -4,23 +4,23 @@
4
4
  * ⛔ WITHOUT IT EVERY NETWORK DECLARATION IS A GREEN PLAN THAT CHANGES NO NETWORK; WITH IT A GREEN
5
5
  * PLAN CAN TAKE A NODE OFF THE NETWORK. Writes under `nodes/{node}/network/{iface}` edit
6
6
  * `/etc/network/interfaces.new` and touch no interface. `PUT /nodes/{node}/network` is the apply.
7
- * MEASURED in the cluster's own source on n2, 2026-09-13 — `PVE/API2/Network.pm`:
7
+ * MEASURED in the cluster's own source on node-b, 2026-09-13 — `PVE/API2/Network.pm`:
8
8
  * rename($new_config_file, $current_config_file) if -e $new_config_file;
9
9
  * PVE::Tools::run_command(['ifreload', '-a'], errfunc => $err);
10
10
  * return $rpcenv->fork_worker('srvreload', 'networking', $authuser, $worker);
11
11
  *
12
- * ⛔ THIS IS THE MOST DANGEROUS RESOURCE IN THE PACKAGE, AND ON TB4 THE DANGER IS NOT ABSTRACT.
13
- * Ceph runs over `vmbr1.11` on n2, n3 AND n4 (MEASURED 2026-09-13: four pools, size 3 /
12
+ * ⛔ THIS IS THE MOST DANGEROUS RESOURCE IN THE PACKAGE, AND ON C1 THE DANGER IS NOT ABSTRACT.
13
+ * Ceph runs over `vmbr1.42` on node-b, node-c AND node-d (MEASURED 2026-09-13: four pools, size 3 /
14
14
  * min_size 2, mon+mgr+mds on all three). `ifreload -a` takes that node's OSDs, mons and MDS off
15
15
  * the cluster network for the length of the reload; two nodes at once puts every pool below
16
16
  * min_size and blocks IO for every guest with an RBD disk. The management address the API is
17
- * reached on, `vmbr0.10`, is reloaded by the same call.
17
+ * reached on, `vmbr0.41`, is reloaded by the same call.
18
18
  *
19
19
  * ⛔ AND UNLIKE `SdnApply` IT IS PER NODE, SO A HALF-RECONFIGURED CLUSTER IS THE DEFAULT FAILURE
20
20
  * MODE, NOT AN EDGE CASE. `PUT /cluster/sdn` publishes the whole cluster in one call; this
21
- * publishes exactly one node, so a stack holding three of these can apply n2, fail, and leave n3
22
- * and n4 on the old layout with Ceph spanning all three. Four things here exist only for that:
23
- * 1. `after` SERIALISES THEM — chain n3 after n2 and n4 after n3, so at most one node is ever
21
+ * publishes exactly one node, so a stack holding three of these can apply node-b, fail, and leave node-c
22
+ * and node-d on the old layout with Ceph spanning all three. Four things here exist only for that:
23
+ * 1. `after` SERIALISES THEM — chain node-c after node-b and node-d after node-c, so at most one node is ever
24
24
  * mid-reload. Three declared in parallel is the outage, and nothing in Alchemy stops you.
25
25
  * 2. `reconcile` REFUSES TO START on a cluster that is already degraded.
26
26
  * 3. `reconcile` RE-CHECKS quorum and every member's `online` flag AFTER the reload and dies if
@@ -51,7 +51,7 @@ import type { PveRequirements } from './resource.ts';
51
51
  import type { WithTarget } from './resource.ts';
52
52
  export interface NetworkApplyProps extends WithTarget {
53
53
  /**
54
- * The node whose staged interfaces file this applies — `n2`.
54
+ * The node whose staged interfaces file this applies — `node-b`.
55
55
  *
56
56
  * ⚠️ ONE APPLY PER NODE, AND NEVER TWO FOR THE SAME NODE. Two would each publish the other's
57
57
  * staged half, and both would run `ifreload` on a file the other had not finished writing.
@@ -89,7 +89,7 @@ export interface NetworkApplyAttributes {
89
89
  * `active`, `exists`, `families`, `method`, `method6`, `options`, `priority`, `link-type` and
90
90
  * ten more; `altnames` is returned and is not even in the schema. `priority` is the worst of
91
91
  * them: PVE ASSIGNS it from the order of the interfaces file, so the same logical layout
92
- * carries different numbers on different nodes (MEASURED: n4's differ from n2/n3's by one).
92
+ * carries different numbers on different nodes (MEASURED: node-d's differ from node-b/node-c's by one).
93
93
  * Every one of those is a forever-diff waiting for whoever writes `Proxmox.NetworkInterface`.
94
94
  * This resource compares a single integer against zero and never looks at a row at all.
95
95
  */
@@ -14,14 +14,14 @@
14
14
  *
15
15
  * * ⛔ THE LAST SEVEN ARE REPORTED AND NEVER COMPARED, AND EACH ONE IS A MEASURED FOREVER-DIFF.
16
16
  * `priority` is assigned by PVE FROM FILE ORDER — `my $priority = 2; ... $d->{priority} =
17
- * $priority++` — and it is not a POST or PUT parameter at all. MEASURED ACROSS TB4: vmbr1.11 is
18
- * priority 16 on n2 and n3 and 15 on n4, because n4 has no `wlp91s0` above it. One declaration
17
+ * $priority++` — and it is not a POST or PUT parameter at all. MEASURED ACROSS C1: vmbr1.42 is
18
+ * priority 16 on node-b and node-c and 15 on node-d, because node-d has no `wlan0` above it. One declaration
19
19
  * reused across three nodes would diff on exactly one of them, forever, over nothing.
20
20
  * `method` is RECOMPUTED on every write from whether the form carried an address, `families` is
21
21
  * recomputed the same way and never written to the file, `active` and `exists` describe the
22
22
  * kernel rather than the config, and `bond_miimon`, `bridge_stp` and `bridge_fd` are emitted by
23
23
  * PVE's writer with defaults (100, `off`, 0) while appearing in NEITHER write schema —
24
- * `additionalProperties => 0` means sending one is a 400. Live proof of all three: n2's bond0
24
+ * `additionalProperties => 0` means sending one is a 400. Live proof of all three: node-b's bond0
25
25
  * returns `bond_miimon "100"` and vmbr1 returns `bridge_stp "off"`, `bridge_fd "0"`, none of
26
26
  * which any declaration can set.
27
27
  */
@@ -65,7 +65,7 @@ export declare const ifaceList: (value: unknown) => string;
65
65
  * `ceph transport` comes back as `ceph transport\n` and the two never compare equal.
66
66
  * ⚠️ AND THE READER FOLDS `comments6` INTO `comments` (`$d->{comments} .= $comments6`), so on an
67
67
  * interface that carries an IPv6 comment a declared `comments` CANNOT match what comes back.
68
- * TB4 has none; on an interface that does, leave `comments` undeclared rather than fighting it.
68
+ * C1 has none; on an interface that does, leave `comments` undeclared rather than fighting it.
69
69
  */
70
70
  export declare const comment: (value: unknown) => string;
71
71
  /** Undeclared is unmanaged: neither sent nor compared. See the ⚠️ on `body`. */
@@ -92,7 +92,7 @@ export declare const sameComment: (declared: string | undefined, live: string) =
92
92
  *
93
93
  * ⚠️ `netmask` IS A WRITABLE PARAMETER AND IS DELIBERATELY NOT OFFERED. PVE raises
94
94
  * "netmask conflicts with cidr" when both are sent, and the reader rewrites whatever was written
95
- * into prefix form — MEASURED: n2's vmbr1.11 reports `"netmask":"24"`, never `255.255.255.0`.
95
+ * into prefix form — MEASURED: node-b's vmbr1.42 reports `"netmask":"24"`, never `255.255.255.0`.
96
96
  * A resource accepting both spellings would let a declaration diff against its own value.
97
97
  */
98
98
  export declare const body: (props: NodeNetworkProps) => Record<string, string>;
@@ -108,7 +108,7 @@ export declare const body: (props: NodeNetworkProps) => Record<string, string>;
108
108
  * `ifreload -a` I did NOT measure. Clearing cidr explicitly at least produces a clean, honest
109
109
  * manual interface — and `matches` compares `cidr` UNCONDITIONALLY, so the plan says so first.
110
110
  *
111
- * ⛔ ON vmbr1.11 THAT IS THE CEPH TRANSPORT. A declaration of that interface without its `cidr` is
111
+ * ⛔ ON vmbr1.42 THAT IS THE CEPH TRANSPORT. A declaration of that interface without its `cidr` is
112
112
  * a declaration that it should have no address, applied across three nodes. The plan will read
113
113
  * `1 to update` rather than `noop`; do not wave it through.
114
114
  *
@@ -11,23 +11,23 @@
11
11
  * that apply — this one never calls it, exactly as `Proxmox.SdnZone` never calls
12
12
  * `Proxmox.SdnApply`.
13
13
  *
14
- * ⛔ CEPH ON TB4 RIDES TWO NETWORKS AND THIS API ONLY SEES ONE OF THEM. Measured from
14
+ * ⛔ CEPH ON C1 RIDES TWO NETWORKS AND THIS API ONLY SEES ONE OF THEM. Measured from
15
15
  * `/etc/pve/ceph.conf` on 2026-09-13:
16
16
  *
17
- * public_network = 10.20.11.0/24 -> vmbr1.11, which this resource DOES see
18
- * cluster_network = 10.100.0.0/24 -> every OSD's cluster_addr: .102 / .103 / .104
17
+ * public_network = 198.51.100.0/24 -> vmbr1.42, which this resource DOES see
18
+ * cluster_network = 203.0.113.0/24 -> every OSD's cluster_addr: .102 / .103 / .104
19
19
  *
20
20
  * The cluster network — OSD REPLICATION, the traffic that rebuilds a lost replica — lives on
21
- * `10.100.0.10X/32` addresses carried by `en05`, `en06` and `dummy_tb4`: the Thunderbolt mesh.
21
+ * `203.0.113.10X/32` addresses carried by `tb0`, `tb1` and `dummy_c1`: the Thunderbolt mesh.
22
22
  *
23
23
  * ⛔ AND THOSE ADDRESSES ARE INVISIBLE HERE, WHICH IS THE TRAP. They are declared in
24
24
  * `/etc/network/interfaces.d/sdn`, and PVE's network API does not parse that directory.
25
- * MEASURED: `GET /nodes/n2/network/en05` answers `{"method":"manual","type":"eth",…}` with NO
26
- * address, while `ip -br -4 addr` shows `en05 UP 10.100.0.102/32`. So this resource reports
27
- * en05 and en06 as address-less manual ports and will plan `noop` over them — implicitly
25
+ * MEASURED: `GET /nodes/node-b/network/tb0` answers `{"method":"manual","type":"eth",…}` with NO
26
+ * address, while `ip -br -4 addr` shows `tb0 UP 203.0.113.102/32`. So this resource reports
27
+ * tb0 and tb1 as address-less manual ports and will plan `noop` over them — implicitly
28
28
  * asserting they carry no address, which is FALSE.
29
29
  *
30
- * The consequence, stated plainly: declaring en05/en06 from what this API reports and then
30
+ * The consequence, stated plainly: declaring tb0/tb1 from what this API reports and then
31
31
  * DESTROYING or applying over them takes out OSD replication on a cluster whose pools are
32
32
  * size 3 / min_size 2. They read as the most boring interfaces on the node and are the two most
33
33
  * dangerous. Leave them undeclared; if they must be managed, manage the file that actually
@@ -55,7 +55,7 @@
55
55
  * interface a node already has would otherwise leave it holding a pending network change.
56
56
  *
57
57
  * ⚠️ WHAT IS STILL TRUE: when `matches` is false the PUT rewrites the whole stanza, and that can
58
- * ADD lines the file did not have — a `vlan-raw-device vmbr1` under `vmbr1.11`, where PVE had
58
+ * ADD lines the file did not have — a `vlan-raw-device vmbr1` under `vmbr1.42`, where PVE had
59
59
  * been deriving it from the name. Harmless in content, and it costs nothing until somebody
60
60
  * applies; one more reason the apply is a separate resource.
61
61
  *
@@ -69,10 +69,10 @@ import { Resource } from 'alchemy';
69
69
  import * as Provider from 'alchemy/Provider';
70
70
  import { type PveRequirements, type WithTarget } from './resource.ts';
71
71
  /**
72
- * PVE's interface types. `unknown` is what a NIC it does not manage reports — n2 and n3 both
73
- * report `wlp91s0` that way, and n4 has no such interface at all.
72
+ * PVE's interface types. `unknown` is what a NIC it does not manage reports — node-b and node-c both
73
+ * report `wlan0` that way, and node-d has no such interface at all.
74
74
  *
75
- * ⚠️ THAT ASYMMETRY IS A TRAP FOR A DECLARATION SHARED ACROSS NODES. On n4 the read answers 404,
75
+ * ⚠️ THAT ASYMMETRY IS A TRAP FOR A DECLARATION SHARED ACROSS NODES. On node-d the read answers 404,
76
76
  * which this provider cannot tell from "deleted", so reconcile POSTs — writing a stanza for a
77
77
  * card that is not in the machine. Declare per node what each node actually has; a physical
78
78
  * interface is discovered, not decided.
@@ -81,24 +81,24 @@ export type NodeNetworkType = 'OVSBond' | 'OVSBridge' | 'OVSIntPort' | 'OVSPort'
81
81
  export interface NodeNetworkProps extends WithTarget {
82
82
  /** Which node's file this stanza lives in. Interfaces are per node, never cluster-wide. */
83
83
  node: string;
84
- /** `vmbr0`, `bond0`, `vmbr1.11`. 2-20 characters, PVE's `pve-iface` format. */
84
+ /** `vmbr0`, `bond0`, `vmbr1.42`. 2-20 characters, PVE's `pve-iface` format. */
85
85
  iface: string;
86
86
  /** ⛔ REQUIRED ON EVERY WRITE, update included, never used to retype — see `readAttributes`. */
87
87
  type: NodeNetworkType;
88
88
  /**
89
- * `10.20.11.12/24`. ⛔ THE ONE FIELD WITH NO UNMANAGED MODE: leaving it out is an instruction
89
+ * `198.51.100.12/24`. ⛔ THE ONE FIELD WITH NO UNMANAGED MODE: leaving it out is an instruction
90
90
  * to make the interface `manual`, not an instruction to leave its address alone. The ⛔ on
91
91
  * `updateBody` in node-network-form.ts has the measurement and the consequence.
92
92
  */
93
93
  cidr?: string;
94
94
  /** ⚠️ PVE allows exactly ONE default gateway per node and refuses a second with "Default
95
- * gateway already exists on interface '<other>'". On TB4 it is vmbr0.10's. */
95
+ * gateway already exists on interface '<other>'". On C1 it is vmbr0.41's. */
96
96
  gateway?: string;
97
97
  /**
98
98
  * `auto <iface>` in the file. Absent on read means off, which is why `bool`'s fallback is used.
99
99
  * ⚠️ UNDECLARED IS UNMANAGED ON AN UPDATE AND OFF ON A CREATE — the same asymmetry storage.ts
100
100
  * has, and it bites harder here: an interface created without `autostart` is one the node
101
- * will not bring up at boot. Every TB4 bridge, bond and vlan carries it.
101
+ * will not bring up at boot. Every C1 bridge, bond and vlan carries it.
102
102
  */
103
103
  autostart?: boolean;
104
104
  /** 1280-65520. Unset leaves the file without an `mtu` line and the kernel default in force. */
@@ -122,7 +122,7 @@ export interface NodeNetworkProps extends WithTarget {
122
122
  bond_xmit_hash_policy?: string;
123
123
  /** active-backup only. Kept hyphenated because that is the wire name. */
124
124
  'bond-primary'?: string;
125
- /** ⚠️ DERIVED FROM A DOTTED NAME. `vmbr1.11` reports `vlan-id` 11 with no such line in the file;
125
+ /** ⚠️ DERIVED FROM A DOTTED NAME. `vmbr1.42` reports `vlan-id` 42 with no such line in the file;
126
126
  * declaring it there is harmless but adds a line the file did not have. */
127
127
  'vlan-id'?: number;
128
128
  'vlan-raw-device'?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"node-network.d.ts","sourceRoot":"","sources":["../../src/proxmox/node-network.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;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,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,QAAQ,CAClD,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,EACL,eAAe,CAChB;CAAG;AAEJ,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,qDAE7B,CAAC;AAsCH;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,wIACwD,CAAC"}
@@ -39,8 +39,9 @@
39
39
  * reconcile POST + PUT Mapping.Modify on /mapping/notifications AND one of
40
40
  * Sys.Audit / Sys.Modify / Sys.AccessNetwork on /
41
41
  * delete DELETE Mapping.Modify on /mapping/notifications
42
- * `LXCProvisioner` already carries Sys.Audit on `/` (see lxc.ts), so the delta is the two Mapping
43
- * privileges — notably NOT the `Sys.Modify` a backup job costs.
42
+ * The provision role already carried Sys.Audit on `/` (see lxc.ts), so the delta was the two
43
+ * Mapping privileges — notably NOT the `Sys.Modify` a backup job costs. `PROVISION_PRIVILEGES`
44
+ * carries both on `/`: the baseline took the trade below knowingly.
44
45
  * ⚠️ PREFER A SECOND ROLE GRANTED AT `/mapping/notifications` OVER WIDENING THE PROVISIONING ROLE
45
46
  * ON `/`. `/mapping` also holds the PCI and USB passthrough maps, so Mapping.Modify at the root
46
47
  * lets a credential scoped to make containers rewire somebody's hardware.
@@ -1 +1 @@
1
- {"version":3,"file":"notification-target.d.ts","sourceRoot":"","sources":["../../src/proxmox/notification-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAe,MAAM,eAAe,CAAC;AAGnF,+FAA+F;AAC/F,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhF;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAwB,SAAQ,UAAU;IACzD,gFAAgF;IAChF,IAAI,EAAE,sBAAsB,CAAC;IAC7B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,iFAAiF;IACjF,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,uFAAuF;IACvF,MAAM,CAAC,E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B,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;IAChC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,8FAA8F;IAC9F,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAA0B,SAAQ,QAAQ,CACzD,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,EACL,eAAe,CAChB;CAAG;AAEJ,eAAO,MAAM,yBAAyB,4DAErC,CAAC;AA2DF;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,+IAI3C,CAAC"}
@@ -24,7 +24,7 @@ export declare const guardPath: (live: PbsDatastoreAttributes, props: PbsDatasto
24
24
  *
25
25
  * ⚠️ AN UNDECLARED `backend` IS NOT A DIVERGENCE. Undeclared is unmanaged everywhere in this
26
26
  * family, and this guard keeps that rule: it fires only when the declaration says something and
27
- * PBS says something else. Adopting `r2-offsite` without mentioning `backend` still plans noop.
27
+ * PBS says something else. Adopting `offsite` without mentioning `backend` still plans noop.
28
28
  *
29
29
  * ⚠️ COMPARED AS A CANONICAL PROPERTY STRING, so `bucket=x,type=s3` and `type=s3,bucket=x` are the
30
30
  * same backend and key order cannot deadlock a plan — the reason `samePath` trims a slash.
@@ -10,7 +10,7 @@
10
10
  * `{"data":{"pong":true}}` against a Let's Encrypt certificate for CN=pbs.example.com;
11
11
  * `/version` and `/config/datastore` answer 401 "authentication failed";
12
12
  * `pbs.mgmt.example.com:8007` answers 401 and its certificate verifies too; and
13
- * `/access/domains` lists the realms `pbs`, `pam` and an openid realm `Schenanigans`. So the
13
+ * `/access/domains` lists the realms `pbs`, `pam` and an openid realm. So the
14
14
  * prefix, the `{"data": …}` envelope and the strict-TLS story are PVE's exactly — and only the
15
15
  * credential differs. There is no `pve` realm here; a PVE token cannot authenticate at all.
16
16
  * The header differs too, which is why `pve()` exists rather than `pve()` being reused — see the
@@ -18,18 +18,18 @@
18
18
  *
19
19
  * ⛔ THERE IS NO OPENBAO MOUNT FOR PBS TODAY, SO NOTHING HERE CAN DEPLOY YET. `PbsTarget.mount` is
20
20
  * a parameter for the reason `PveTarget.mount` is — the provider must be able to leave this
21
- * estate — but the estate has nothing to put in it. MEASURED: under the `claude-code` approle,
22
- * `bao token capabilities` answers `deny` for `proxmox-tb4/creds/{read,provision}`,
23
- * `proxmox-ops/creds/read` and every `…pbs…` path tried, and `sys/mounts` is 403 — so I could
21
+ * estate — but the estate has nothing to put in it. MEASURED: under the agent's approle,
22
+ * `bao token capabilities` answers `deny` for `proxmox-c1/creds/{read,provision}`,
23
+ * `proxmox-c2/creds/read` and every `…pbs…` path tried, and `sys/mounts` is 403 — so I could
24
24
  * not enumerate the mounts to PROVE a PBS one is absent. That it is absent is the brief's
25
25
  * statement, not my measurement.
26
26
  * ★ WHAT THE MOUNT MUST VEND, so `mint()` is reused unchanged: `bao read -format=json
27
27
  * <mount>/creds/<role>` answering `{"data":{"token_id":…,"secret":…}}`, where `token_id` is a
28
28
  * PBS token id `user@realm!tokenname` — `hf-read@pbs!…` and `hf-provision@pbs!…`. Same short,
29
- * non-renewable lease contract as `proxmox-tb4`.
29
+ * non-renewable lease contract as `proxmox-c1`.
30
30
  * ⚠️ PBS HAS NO DYNAMIC-SECRETS PLUGIN OF ITS OWN — OpenBao's Proxmox support is a PVE thing — so
31
31
  * the mount is a small custom vendor against `POST /access/users/{id}/token/{name}`. Say which
32
- * mount and role you needed rather than reaching for the read-only `monitoring@pbs` token on
32
+ * mount and role you needed rather than reaching for the read-only `metrics@pbs` token on
33
33
  * the kv shelf: widening that would delete the outer lock for every reader of the shelf.
34
34
  *
35
35
  * ⛔ A DATASTORE HOLDS THE BACKUPS, SO `retain` IS THE DEFAULT AND `delete` IS FULLY IMPLEMENTED —
@@ -47,7 +47,7 @@
47
47
  * ⛔ NO SECRET IS A PROP OR AN ATTRIBUTE, AND THIS FAMILY IS CLEAN BY CONSTRUCTION: a datastore
48
48
  * section holds no password, token or key — encryption keys belong to the backup CLIENT. Every
49
49
  * field below is a name, a path, a schedule, a count or a policy string, all of which are safe in
50
- * a state store Alchemy writes UNENCRYPTED and this estate dumps to CT100 nightly.
50
+ * a state store Alchemy writes UNENCRYPTED and this estate copies to a backup guest nightly.
51
51
  */
52
52
  import { Resource } from 'alchemy';
53
53
  import * as Provider from 'alchemy/Provider';
@@ -116,11 +116,11 @@ export interface PbsDatastoreProps {
116
116
  * `datastore create --help` offers `--backend`, `datastore update --help` does NOT, and
117
117
  * `backend` is absent from update's `--delete` enum. PBS will not move a datastore between
118
118
  * local disk and object storage, ever.
119
- * ★ IT IS A PROP AT ALL BECAUSE THE ESTATE HAS ONE. `r2-offsite` holds
120
- * `type=s3,client=cloudflare-r2,bucket=homeflare-pbs`. Leaving it undeclared would still plan
119
+ * ★ IT IS A PROP AT ALL BECAUSE THE ESTATE HAS ONE. `offsite` holds
120
+ * `type=s3,client=cloudflare-r2,bucket=example-pbs`. Leaving it undeclared would still plan
121
121
  * noop — undeclared is unmanaged here — but the declaration would then describe a LOCAL
122
122
  * datastore, and anyone recreating from it would get exactly that: an empty directory on the
123
- * mini's disk where the offsite copy used to be, behind a green plan the whole way.
123
+ * host's disk where the offsite copy used to be, behind a green plan the whole way.
124
124
  * ⚠️ A property string. Compared canonically, so key order is never a diff.
125
125
  */
126
126
  backend?: string;
@@ -37,10 +37,10 @@
37
37
  * answers 401 "authentication failure", which reads as a bad credential rather than as a
38
38
  * malformed header — the same trap credentials.ts already records for PVE's colon form.
39
39
  * ⛔ AND THERE IS NO MOUNT TO MINT FROM. `mint()` runs `bao read <mount>/creds/<role>`; no
40
- * OpenBao mount vends PBS tokens — `proxmox-tb4` and `proxmox-ops` vend PVE ones. The
40
+ * OpenBao mount vends PBS tokens — `proxmox-c1` and `proxmox-c2` vend PVE ones. The
41
41
  * `kv/infra/proxmox` shelf holds a READ-ONLY `Audit` token for PBS, and a read-only token
42
42
  * cannot create a prune job. I could not confirm that shelf's contents: this machine's
43
- * claude-code approle answers 403 on `sys/mounts` AND on `kv/metadata/infra/proxmox`
43
+ * agent approle answers 403 on `sys/mounts` AND on `kv/metadata/infra/proxmox`
44
44
  * (MEASURED). What is needed is a dynamic PBS mount vending a `provision` role with
45
45
  * `Datastore.Modify` — say that, rather than reaching for the stored auditor token.
46
46
  *
@@ -12,14 +12,14 @@
12
12
  *
13
13
  * ⛔ THE CREDENTIAL IS A PBS TOKEN AND IT DOES NOT EXIST YET; NO MOUNT NAME IS INVENTED IN THIS
14
14
  * FILE. PBS wants `user@realm!tokenname` plus a UUID secret, issued by PBS — a PVE token is not
15
- * one, whatever it is spelled like. MEASURED from this machine on 2026-09-13: the `claude-code`
15
+ * one, whatever it is spelled like. MEASURED from this machine on 2026-09-13: the agent's
16
16
  * approle cannot enumerate mounts (`bao secrets list` -> 403) and
17
17
  * `bao token capabilities kv/infra/proxmox/pbs` -> `deny`, so I could not confirm from here what
18
18
  * does or does not exist. What credentials.ts records is that every PBS token on the kv shelf is
19
- * READ-ONLY (`Audit`, as `monitoring@pve`) and STATIC — too narrow to create a sync job, and
19
+ * READ-ONLY (`Audit`, as `metrics@pve`) and STATIC — too narrow to create a sync job, and
20
20
  * exactly the kind of credential this provider exists to avoid writing with.
21
21
  * ★ SO THE MOUNT IS A `PbsTarget.mount` THE STACK SUPPLIES, and somebody has to build it first:
22
- * a dynamic PBS mount with `read` and `provision` roles mirroring `proxmox-tb4`. Until it
22
+ * a dynamic PBS mount with `read` and `provision` roles mirroring `proxmox-c1`. Until it
23
23
  * exists this family can be declared and cannot be deployed. `permission denied` means the
24
24
  * grant is missing — say which mount and role you needed; do not fall back to the shelf token.
25
25
  *
@@ -80,7 +80,7 @@ export interface SyncJobProps extends WithPbsTarget {
80
80
  * `Pbs.Remote` family is OUT OF SCOPE for this package rather than merely unwritten:
81
81
  * `POST /config/remote` requires `password`, and Alchemy persists props and attributes to its
82
82
  * state store UNENCRYPTED (StateEncoding.ts tags Redacted values rather than encrypting them),
83
- * which here is the `alchemy` Postgres that pg-backup.sh dumps nightly to CT100. A remote's
83
+ * which here is the `alchemy` Postgres that a nightly job dumps to a backup guest. A remote's
84
84
  * password in a prop is that password in four places, for months. The only Remote resource that
85
85
  * could exist would refuse `password` the way storage.ts refuses it — as a `never` — and could
86
86
  * therefore never CREATE a remote, which is a resource that cannot do what its name promises.
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * ⛔ THIS FILE CANNOT AUTHENTICATE UNTIL TWO THINGS OUTSIDE IT CHANGE, AND IT IS SHIPPED SAYING SO
13
13
  * RATHER THAN SHIPPED LOOKING FINISHED. Both are recorded on `PbsTarget` below:
14
- * 1. `credentials.ts` has no PBS mint. MEASURED 2026-09-13 from this Mac: the `claude-code`
14
+ * 1. `credentials.ts` has no PBS mint. MEASURED 2026-09-13 from this Mac: the agent's
15
15
  * approle is refused `sys/mounts`, `kv/infra/proxmox` and `proxmox-pbs/creds/read` alike —
16
16
  * 403 permission denied on all three — so there is no mount to name and none is invented.
17
17
  * 2. `client.ts`'s `authorization()` builds a PVE header, and PBS will not accept it. See the
@@ -8,11 +8,11 @@
8
8
  * its own state would have reported noop straight past a hand-edit in the UI.
9
9
  *
10
10
  * ⚠️ IT 403'd UNTIL THE ROLE WAS WIDENED, AND THE HISTORY IS WORTH KEEPING. `hf-provision@pve`
11
- * held `LXCProvisioner` on `/` with no `Pool.Allocate`, so reconcile answered
12
- * "Permission check failed (/pool/house, Pool.Allocate)". The credential could not widen itself
11
+ * held the provision role on `/` with no `Pool.Allocate`, so reconcile answered
12
+ * "Permission check failed (/pool/lab, Pool.Allocate)". The credential could not widen itself
13
13
  * — `PUT /access/roles` is 403 for it too — so the role was extended over SSH with
14
- * `pveum role modify LXCProvisioner --privs "<existing>,Pool.Allocate,Pool.Audit"`, preserving
15
- * every existing privilege. Each new resource in this package should state the privileges its
14
+ * `pveum role modify <role> --privs "<existing>,Pool.Allocate,Pool.Audit"`, preserving every
15
+ * existing privilege. `PROVISION_PRIVILEGES` (provision-baseline.ts) carries both now. Each new resource in this package should state the privileges its
16
16
  * reconcile needs, so widening stays a deliberate act rather than a reaction to a 403.
17
17
  */
18
18
  import { Resource } from 'alchemy';
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The provisioning baseline: the access every PVE cluster and node needs before a stack built on
3
+ * this package can manage it — one role, the users OpenBao mints tokens for, the group that fences
4
+ * the mint, and the grants that bind them. ONE description, read by both halves:
5
+ * · provision-declare.ts turns it into `Proxmox.Role`/`Group`/`User`/`Acl` resources, so a stack
6
+ * adopts the baseline and keeps it (drift is a plan, not a 403 weeks later);
7
+ * · provision-bootstrap.ts turns it into the one-time root commands for a NEW cluster or node.
8
+ * The two cannot drift apart because neither holds a name or a privilege of its own.
9
+ *
10
+ * ⛔ THE PROVISION LANE CANNOT CREATE ITSELF. Every write here runs as a token OpenBao mints for the
11
+ * provision user, and minting needs that user to exist, in the mint group, bound to this role.
12
+ * So a new cluster is bootstrapped ONCE by root@pam with the generated commands, and the stack
13
+ * then adopts what they made (docs/provision-baseline.md).
14
+ *
15
+ * ★ ONE PRIVILEGE LIST FOR EVERY FAMILY, NOT A ROLE PER RESOURCE. The list is what the families'
16
+ * reconciles need, unioned — the set a hand-kept provision role reached one 403 at a time, each
17
+ * step recorded where it was hit (pool.ts, sdn-vnet.ts, ha-rule.ts). It includes what the lane needs
18
+ * to manage THIS baseline (`Sys.Modify` for the role, `Realm.AllocateUser`/`User.Modify` for the
19
+ * users, `Group.Allocate`, `Permissions.Modify` for the grants), so declaring it can never narrow
20
+ * the lane out of its own repair (role.ts: "A ROLE CAN LOCK ITS OWN PROVIDER OUT").
21
+ * ⚠️ NOT EVERY FAMILY: root@pam-only writes (device passthrough, bind mounts — lxc-judge.ts) and
22
+ * privileges a family names as still missing (`VM.Replicate`, replication-job.ts) are outside it.
23
+ */
24
+ /** The provision role's privileges, sorted — the exact set, never an addition to a live one. */
25
+ export declare const PROVISION_PRIVILEGES: readonly string[];
26
+ /** The names a baseline uses. Every field has a generic default (`PROVISION_DEFAULTS`). */
27
+ export interface ProvisionNames {
28
+ /** The role holding `PROVISION_PRIVILEGES` on `/`. */
29
+ readonly role?: string | undefined;
30
+ /** The user OpenBao's `provision` role mints tokens for, realm-qualified. */
31
+ readonly provisionUser?: string | undefined;
32
+ /** The group whose members OpenBao may mint for — the fence around the mint. */
33
+ readonly mintGroup?: string | undefined;
34
+ /** The user OpenBao's `read` role mints for, or `null` for a baseline with no read lane. */
35
+ readonly readUser?: string | null | undefined;
36
+ /** The role the read user holds on `/`. ⛔ It must already exist: a built-in, or one you declare. */
37
+ readonly readRole?: string | undefined;
38
+ /** The comment on the group and both users — how a person on the node learns what they are. */
39
+ readonly comment?: string | undefined;
40
+ }
41
+ /** Every name, resolved: what `PROVISION_DEFAULTS` holds and what a baseline is built from. */
42
+ export type ResolvedProvisionNames = {
43
+ readonly [K in keyof ProvisionNames]-?: Exclude<ProvisionNames[K], undefined>;
44
+ };
45
+ /** ★ Generic, kit-prefixed names: nothing here is any one estate's. */
46
+ export declare const PROVISION_DEFAULTS: ResolvedProvisionNames;
47
+ /** Which credential lane a user or a grant belongs to — the OpenBao role that mints for it. */
48
+ export type ProvisionLane = 'provision' | 'read';
49
+ /** A baseline, resolved: exactly what the declaration holds and the bootstrap makes. */
50
+ export interface ProvisionBaseline {
51
+ readonly role: {
52
+ readonly roleid: string;
53
+ readonly privs: readonly string[];
54
+ };
55
+ readonly group: {
56
+ readonly groupid: string;
57
+ readonly comment: string;
58
+ };
59
+ readonly users: readonly {
60
+ readonly lane: ProvisionLane;
61
+ readonly userid: string;
62
+ readonly comment: string;
63
+ readonly groups: readonly string[];
64
+ }[];
65
+ /** Each binds one user to one role on `/`, with propagate — the only shape the lanes need. */
66
+ readonly grants: readonly {
67
+ readonly lane: ProvisionLane;
68
+ readonly userid: string;
69
+ readonly roleid: string;
70
+ }[];
71
+ }
72
+ /** Resolve `names` over the defaults and check them. Throws with every problem at once. */
73
+ export declare const provisionBaseline: (names?: ProvisionNames) => ProvisionBaseline;
74
+ //# sourceMappingURL=provision-baseline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provision-baseline.d.ts","sourceRoot":"","sources":["../../src/proxmox/provision-baseline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,gGAAgG;AAChG,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EA4BhD,CAAC;AAEH,2FAA2F;AAC3F,MAAM,WAAW,cAAc;IAC7B,sDAAsD;IACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,6EAA6E;IAC7E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,gFAAgF;IAChF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,S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,CAAC;CACL;AA8BD,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,WAAW,cAAc,KAAQ,iBAwB9D,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * `provisionBootstrap` — the provisioning baseline (provision-baseline.ts) as the one-time root
3
+ * commands for a NEW cluster or node: a POSIX `sh` script, printed, never run from here.
4
+ *
5
+ * bun -e "import { provisionBootstrap } from '@homeflare/alchemy/proxmox';
6
+ * process.stdout.write(provisionBootstrap())" | ssh root@<node> sh
7
+ *
8
+ * ⛔ WHY IT EXISTS: THE PROVISION LANE CANNOT CREATE ITSELF. Every resource in this package runs as a
9
+ * token OpenBao mints for the provision user, and a cluster without that user, its group and its
10
+ * grant has nothing to mint for — the plan that would create them cannot authenticate. So root
11
+ * makes them once, and the stack adopts and keeps them (provision-declare.ts). This is the only
12
+ * hand step, and it is generated from the same baseline the stack declares.
13
+ * ⛔ NEVER A TOKEN, NEVER A PASSWORD. The users are created with neither: OpenBao mints short-lived
14
+ * tokens for them later, and an `@pve` user with no password cannot log in to the UI. Nothing
15
+ * secret is in the script, so it can be read, reviewed and pasted.
16
+ * ★ CHECK, THEN CHANGE — IDEMPOTENT BY CONSTRUCTION. Each object is read first (`pvesh get … json`,
17
+ * parsed with Perl's core JSON::PP, which every PVE node has), compared with the baseline, and
18
+ * written only when it differs, naming what it does. A second run prints `ok` for everything and
19
+ * writes nothing. It also CONVERGES: a role with other privileges is set to exactly the baseline,
20
+ * as the stack's `Proxmox.Role` would set it (role.ts: a declaration replaces the set).
21
+ * ★ ONE NODE PER CLUSTER. Users, groups, roles and ACLs live in `/etc/pve/user.cfg`, which pmxcfs
22
+ * shares across the cluster: a node joining a cluster that has the baseline needs nothing, and a
23
+ * run there is all `ok`. A new standalone node or a new cluster is where it creates.
24
+ * ⚠️ NAMES ARE NOT QUOTED INTO SAFETY, THEY ARE REFUSED INTO IT: provision-baseline.ts admits only
25
+ * characters that need no quoting in `sh` or in a Perl `q{}`.
26
+ */
27
+ import { type ProvisionNames } from './provision-baseline.ts';
28
+ /**
29
+ * The script for `names` (defaults: `PROVISION_DEFAULTS`). Pure: it reads nothing and runs nothing.
30
+ * Throws, like `provisionBaseline`, on a name the baseline refuses.
31
+ */
32
+ export declare const provisionBootstrap: (names?: ProvisionNames) => string;
33
+ //# sourceMappingURL=provision-bootstrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provision-bootstrap.d.ts","sourceRoot":"","sources":["../../src/proxmox/provision-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AAsFjC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,WAAW,cAAc,KAAQ,MAc/D,CAAC"}