@homeflare/alchemy 0.15.0 → 0.19.1

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 (516) hide show
  1. package/README.md +29 -0
  2. package/dist/linux/directory-lifecycle.d.ts +50 -0
  3. package/dist/linux/directory-lifecycle.d.ts.map +1 -0
  4. package/dist/linux/directory.d.ts +19 -0
  5. package/dist/linux/directory.d.ts.map +1 -0
  6. package/dist/linux/fake-linux-host.d.ts +35 -0
  7. package/dist/linux/fake-linux-host.d.ts.map +1 -0
  8. package/dist/linux/fake-systemd.d.ts +34 -0
  9. package/dist/linux/fake-systemd.d.ts.map +1 -0
  10. package/dist/linux/index.d.ts +27 -0
  11. package/dist/linux/index.d.ts.map +1 -0
  12. package/dist/linux/index.js +1575 -0
  13. package/dist/linux/index.js.map +38 -0
  14. package/dist/linux/providers.d.ts +17 -0
  15. package/dist/linux/providers.d.ts.map +1 -0
  16. package/dist/linux/region.d.ts +43 -0
  17. package/dist/linux/region.d.ts.map +1 -0
  18. package/dist/linux/remote-file-form.d.ts +47 -0
  19. package/dist/linux/remote-file-form.d.ts.map +1 -0
  20. package/dist/linux/remote-file-lifecycle.d.ts +36 -0
  21. package/dist/linux/remote-file-lifecycle.d.ts.map +1 -0
  22. package/dist/linux/remote-file-plan.d.ts +33 -0
  23. package/dist/linux/remote-file-plan.d.ts.map +1 -0
  24. package/dist/linux/remote-file.d.ts +28 -0
  25. package/dist/linux/remote-file.d.ts.map +1 -0
  26. package/dist/linux/ssh-command.d.ts +68 -0
  27. package/dist/linux/ssh-command.d.ts.map +1 -0
  28. package/dist/linux/ssh-runner.d.ts +22 -0
  29. package/dist/linux/ssh-runner.d.ts.map +1 -0
  30. package/dist/linux/ssh-scripts.d.ts +27 -0
  31. package/dist/linux/ssh-scripts.d.ts.map +1 -0
  32. package/dist/linux/systemctl.d.ts +67 -0
  33. package/dist/linux/systemctl.d.ts.map +1 -0
  34. package/dist/linux/unit-form.d.ts +78 -0
  35. package/dist/linux/unit-form.d.ts.map +1 -0
  36. package/dist/linux/unit-handlers.d.ts +15 -0
  37. package/dist/linux/unit-handlers.d.ts.map +1 -0
  38. package/dist/linux/unit-lifecycle.d.ts +40 -0
  39. package/dist/linux/unit-lifecycle.d.ts.map +1 -0
  40. package/dist/linux/unit-preflight.d.ts +41 -0
  41. package/dist/linux/unit-preflight.d.ts.map +1 -0
  42. package/dist/linux/unit-settle.d.ts +31 -0
  43. package/dist/linux/unit-settle.d.ts.map +1 -0
  44. package/dist/linux/unit.d.ts +35 -0
  45. package/dist/linux/unit.d.ts.map +1 -0
  46. package/dist/netbox/client.d.ts +52 -0
  47. package/dist/netbox/client.d.ts.map +1 -0
  48. package/dist/netbox/constraint-guard.d.ts +26 -0
  49. package/dist/netbox/constraint-guard.d.ts.map +1 -0
  50. package/dist/netbox/constraints.d.ts +76 -0
  51. package/dist/netbox/constraints.d.ts.map +1 -0
  52. package/dist/netbox/generated/constraints/index.d.ts +19 -0
  53. package/dist/netbox/generated/constraints/index.d.ts.map +1 -0
  54. package/dist/netbox/generated/constraints/netbox-ipam.d.ts +21 -0
  55. package/dist/netbox/generated/constraints/netbox-ipam.d.ts.map +1 -0
  56. package/dist/netbox/index.d.ts +17 -0
  57. package/dist/netbox/index.d.ts.map +1 -0
  58. package/dist/netbox/index.js +331 -0
  59. package/dist/netbox/index.js.map +18 -0
  60. package/dist/netbox/prefix-form.d.ts +54 -0
  61. package/dist/netbox/prefix-form.d.ts.map +1 -0
  62. package/dist/netbox/prefix.d.ts +80 -0
  63. package/dist/netbox/prefix.d.ts.map +1 -0
  64. package/dist/netbox/resource.d.ts +94 -0
  65. package/dist/netbox/resource.d.ts.map +1 -0
  66. package/dist/netbox/values.d.ts +24 -0
  67. package/dist/netbox/values.d.ts.map +1 -0
  68. package/dist/proxmox/api-token-form.d.ts.map +1 -1
  69. package/dist/proxmox/apply-endpoints.d.ts +30 -0
  70. package/dist/proxmox/apply-endpoints.d.ts.map +1 -0
  71. package/dist/proxmox/ceph-daemon-form.d.ts +29 -1
  72. package/dist/proxmox/ceph-daemon-form.d.ts.map +1 -1
  73. package/dist/proxmox/ceph-daemon.d.ts.map +1 -1
  74. package/dist/proxmox/ceph-flag.d.ts.map +1 -1
  75. package/dist/proxmox/ceph-fs.d.ts.map +1 -1
  76. package/dist/proxmox/ceph-osd-write.d.ts +19 -0
  77. package/dist/proxmox/ceph-osd-write.d.ts.map +1 -1
  78. package/dist/proxmox/ceph-pool.d.ts.map +1 -1
  79. package/dist/proxmox/constraints.d.ts +28 -5
  80. package/dist/proxmox/constraints.d.ts.map +1 -1
  81. package/dist/proxmox/generated/constraints/index.d.ts +1 -1
  82. package/dist/proxmox/generated/constraints/index.d.ts.map +1 -1
  83. package/dist/proxmox/generated/constraints/pbs-config.d.ts +6 -1
  84. package/dist/proxmox/generated/constraints/pbs-config.d.ts.map +1 -1
  85. package/dist/proxmox/generated/constraints/pve-access.d.ts +6 -1
  86. package/dist/proxmox/generated/constraints/pve-access.d.ts.map +1 -1
  87. package/dist/proxmox/generated/constraints/pve-cluster-backup.d.ts +23 -0
  88. package/dist/proxmox/generated/constraints/pve-cluster-backup.d.ts.map +1 -0
  89. package/dist/proxmox/generated/constraints/pve-cluster-ceph.d.ts +23 -0
  90. package/dist/proxmox/generated/constraints/pve-cluster-ceph.d.ts.map +1 -0
  91. package/dist/proxmox/generated/constraints/pve-cluster-firewall.d.ts +23 -0
  92. package/dist/proxmox/generated/constraints/pve-cluster-firewall.d.ts.map +1 -0
  93. package/dist/proxmox/generated/constraints/pve-cluster-ha.d.ts +23 -0
  94. package/dist/proxmox/generated/constraints/pve-cluster-ha.d.ts.map +1 -0
  95. package/dist/proxmox/generated/constraints/pve-cluster-metrics.d.ts +23 -0
  96. package/dist/proxmox/generated/constraints/pve-cluster-metrics.d.ts.map +1 -0
  97. package/dist/proxmox/generated/constraints/pve-cluster-notifications.d.ts +23 -0
  98. package/dist/proxmox/generated/constraints/pve-cluster-notifications.d.ts.map +1 -0
  99. package/dist/proxmox/generated/constraints/pve-cluster-replication.d.ts +23 -0
  100. package/dist/proxmox/generated/constraints/pve-cluster-replication.d.ts.map +1 -0
  101. package/dist/proxmox/generated/constraints/pve-cluster-sdn.d.ts +23 -0
  102. package/dist/proxmox/generated/constraints/pve-cluster-sdn.d.ts.map +1 -0
  103. package/dist/proxmox/generated/constraints/pve-nodes-ceph.d.ts +23 -0
  104. package/dist/proxmox/generated/constraints/pve-nodes-ceph.d.ts.map +1 -0
  105. package/dist/proxmox/generated/constraints/pve-nodes-disks.d.ts +23 -0
  106. package/dist/proxmox/generated/constraints/pve-nodes-disks.d.ts.map +1 -0
  107. package/dist/proxmox/generated/constraints/pve-nodes-lxc.d.ts +23 -0
  108. package/dist/proxmox/generated/constraints/pve-nodes-lxc.d.ts.map +1 -0
  109. package/dist/proxmox/generated/constraints/pve-nodes-network.d.ts +23 -0
  110. package/dist/proxmox/generated/constraints/pve-nodes-network.d.ts.map +1 -0
  111. package/dist/proxmox/generated/constraints/pve-nodes-qemu.d.ts +23 -0
  112. package/dist/proxmox/generated/constraints/pve-nodes-qemu.d.ts.map +1 -0
  113. package/dist/proxmox/generated/constraints/pve-pools.d.ts +6 -1
  114. package/dist/proxmox/generated/constraints/pve-pools.d.ts.map +1 -1
  115. package/dist/proxmox/generated/constraints/pve-storage.d.ts +6 -1
  116. package/dist/proxmox/generated/constraints/pve-storage.d.ts.map +1 -1
  117. package/dist/proxmox/generated/pbs/access-users.d.ts +137 -0
  118. package/dist/proxmox/generated/pbs/access-users.d.ts.map +1 -0
  119. package/dist/proxmox/generated/pbs/access.d.ts +171 -0
  120. package/dist/proxmox/generated/pbs/access.d.ts.map +1 -0
  121. package/dist/proxmox/generated/pbs/admin-datastore-store.d.ts +252 -0
  122. package/dist/proxmox/generated/pbs/admin-datastore-store.d.ts.map +1 -0
  123. package/dist/proxmox/generated/pbs/admin-metrics.d.ts +147 -0
  124. package/dist/proxmox/generated/pbs/admin-metrics.d.ts.map +1 -0
  125. package/dist/proxmox/generated/pbs/admin.d.ts +217 -0
  126. package/dist/proxmox/generated/pbs/admin.d.ts.map +1 -0
  127. package/dist/proxmox/generated/pbs/backup.d.ts +114 -0
  128. package/dist/proxmox/generated/pbs/backup.d.ts.map +1 -0
  129. package/dist/proxmox/generated/pbs/config-access-pam.d.ts +218 -0
  130. package/dist/proxmox/generated/pbs/config-access-pam.d.ts.map +1 -0
  131. package/dist/proxmox/generated/pbs/config-access.d.ts +203 -0
  132. package/dist/proxmox/generated/pbs/config-access.d.ts.map +1 -0
  133. package/dist/proxmox/generated/pbs/config-datastore.d.ts +195 -0
  134. package/dist/proxmox/generated/pbs/config-datastore.d.ts.map +1 -0
  135. package/dist/proxmox/generated/pbs/config-media-pool.d.ts +207 -0
  136. package/dist/proxmox/generated/pbs/config-media-pool.d.ts.map +1 -0
  137. package/dist/proxmox/generated/pbs/config-notifications-matchers.d.ts +159 -0
  138. package/dist/proxmox/generated/pbs/config-notifications-matchers.d.ts.map +1 -0
  139. package/dist/proxmox/generated/pbs/config-notifications.d.ts +199 -0
  140. package/dist/proxmox/generated/pbs/config-notifications.d.ts.map +1 -0
  141. package/dist/proxmox/generated/pbs/config-remote.d.ts +175 -0
  142. package/dist/proxmox/generated/pbs/config-remote.d.ts.map +1 -0
  143. package/dist/proxmox/generated/pbs/config-sync.d.ts +145 -0
  144. package/dist/proxmox/generated/pbs/config-sync.d.ts.map +1 -0
  145. package/dist/proxmox/generated/pbs/config-tape.d.ts +200 -0
  146. package/dist/proxmox/generated/pbs/config-tape.d.ts.map +1 -0
  147. package/dist/proxmox/generated/pbs/config-verify.d.ts +77 -0
  148. package/dist/proxmox/generated/pbs/config-verify.d.ts.map +1 -0
  149. package/dist/proxmox/generated/pbs/config.d.ts +119 -0
  150. package/dist/proxmox/generated/pbs/config.d.ts.map +1 -0
  151. package/dist/proxmox/generated/pbs/nodes-node-dns.d.ts +178 -0
  152. package/dist/proxmox/generated/pbs/nodes-node-dns.d.ts.map +1 -0
  153. package/dist/proxmox/generated/pbs/nodes-node-services.d.ts +205 -0
  154. package/dist/proxmox/generated/pbs/nodes-node-services.d.ts.map +1 -0
  155. package/dist/proxmox/generated/pbs/nodes-node.d.ts +166 -0
  156. package/dist/proxmox/generated/pbs/nodes-node.d.ts.map +1 -0
  157. package/dist/proxmox/generated/pbs/nodes.d.ts +171 -0
  158. package/dist/proxmox/generated/pbs/nodes.d.ts.map +1 -0
  159. package/dist/proxmox/generated/pbs/ping.d.ts +18 -0
  160. package/dist/proxmox/generated/pbs/ping.d.ts.map +1 -0
  161. package/dist/proxmox/generated/pbs/pull.d.ts +37 -0
  162. package/dist/proxmox/generated/pbs/pull.d.ts.map +1 -0
  163. package/dist/proxmox/generated/pbs/push.d.ts +36 -0
  164. package/dist/proxmox/generated/pbs/push.d.ts.map +1 -0
  165. package/dist/proxmox/generated/pbs/reader.d.ts +41 -0
  166. package/dist/proxmox/generated/pbs/reader.d.ts.map +1 -0
  167. package/dist/proxmox/generated/pbs/root.d.ts +16 -0
  168. package/dist/proxmox/generated/pbs/root.d.ts.map +1 -0
  169. package/dist/proxmox/generated/pbs/status.d.ts +54 -0
  170. package/dist/proxmox/generated/pbs/status.d.ts.map +1 -0
  171. package/dist/proxmox/generated/pbs/tape-drive.d.ts +181 -0
  172. package/dist/proxmox/generated/pbs/tape-drive.d.ts.map +1 -0
  173. package/dist/proxmox/generated/pbs/tape-media.d.ts +126 -0
  174. package/dist/proxmox/generated/pbs/tape-media.d.ts.map +1 -0
  175. package/dist/proxmox/generated/pbs/tape.d.ts +90 -0
  176. package/dist/proxmox/generated/pbs/tape.d.ts.map +1 -0
  177. package/dist/proxmox/generated/pbs/version.d.ts +20 -0
  178. package/dist/proxmox/generated/pbs/version.d.ts.map +1 -0
  179. package/dist/proxmox/generated/pbs.d.ts +44 -662
  180. package/dist/proxmox/generated/pbs.d.ts.map +1 -1
  181. package/dist/proxmox/generated/pve/access-roles.d.ts +164 -0
  182. package/dist/proxmox/generated/pve/access-roles.d.ts.map +1 -0
  183. package/dist/proxmox/generated/pve/access-users.d.ts +152 -0
  184. package/dist/proxmox/generated/pve/access-users.d.ts.map +1 -0
  185. package/dist/proxmox/generated/pve/access.d.ts +221 -0
  186. package/dist/proxmox/generated/pve/access.d.ts.map +1 -0
  187. package/dist/proxmox/generated/pve/cluster-acme-plugins-id.d.ts +45 -0
  188. package/dist/proxmox/generated/pve/cluster-acme-plugins-id.d.ts.map +1 -0
  189. package/dist/proxmox/generated/pve/cluster-acme-plugins.d.ts +47 -0
  190. package/dist/proxmox/generated/pve/cluster-acme-plugins.d.ts.map +1 -0
  191. package/dist/proxmox/generated/pve/cluster-acme-tos.d.ts +240 -0
  192. package/dist/proxmox/generated/pve/cluster-acme-tos.d.ts.map +1 -0
  193. package/dist/proxmox/generated/pve/cluster-bulk-action.d.ts +200 -0
  194. package/dist/proxmox/generated/pve/cluster-bulk-action.d.ts.map +1 -0
  195. package/dist/proxmox/generated/pve/cluster-firewall-refs.d.ts +109 -0
  196. package/dist/proxmox/generated/pve/cluster-firewall-refs.d.ts.map +1 -0
  197. package/dist/proxmox/generated/pve/cluster-firewall.d.ts +225 -0
  198. package/dist/proxmox/generated/pve/cluster-firewall.d.ts.map +1 -0
  199. package/dist/proxmox/generated/pve/cluster-ha.d.ts +199 -0
  200. package/dist/proxmox/generated/pve/cluster-ha.d.ts.map +1 -0
  201. package/dist/proxmox/generated/pve/cluster-jobs.d.ts +183 -0
  202. package/dist/proxmox/generated/pve/cluster-jobs.d.ts.map +1 -0
  203. package/dist/proxmox/generated/pve/cluster-metrics.d.ts +110 -0
  204. package/dist/proxmox/generated/pve/cluster-metrics.d.ts.map +1 -0
  205. package/dist/proxmox/generated/pve/cluster-notifications-endpoints.d.ts +224 -0
  206. package/dist/proxmox/generated/pve/cluster-notifications-endpoints.d.ts.map +1 -0
  207. package/dist/proxmox/generated/pve/cluster-notifications.d.ts +91 -0
  208. package/dist/proxmox/generated/pve/cluster-notifications.d.ts.map +1 -0
  209. package/dist/proxmox/generated/pve/cluster-options.d.ts +85 -0
  210. package/dist/proxmox/generated/pve/cluster-options.d.ts.map +1 -0
  211. package/dist/proxmox/generated/pve/cluster-qemu-custom-cpu-models-cputype.d.ts +48 -0
  212. package/dist/proxmox/generated/pve/cluster-qemu-custom-cpu-models-cputype.d.ts.map +1 -0
  213. package/dist/proxmox/generated/pve/cluster-qemu-custom-cpu-models.d.ts +45 -0
  214. package/dist/proxmox/generated/pve/cluster-qemu-custom-cpu-models.d.ts.map +1 -0
  215. package/dist/proxmox/generated/pve/cluster-replication.d.ts +130 -0
  216. package/dist/proxmox/generated/pve/cluster-replication.d.ts.map +1 -0
  217. package/dist/proxmox/generated/pve/cluster-sdn-fabrics.d.ts +220 -0
  218. package/dist/proxmox/generated/pve/cluster-sdn-fabrics.d.ts.map +1 -0
  219. package/dist/proxmox/generated/pve/cluster-sdn-ipams.d.ts +229 -0
  220. package/dist/proxmox/generated/pve/cluster-sdn-ipams.d.ts.map +1 -0
  221. package/dist/proxmox/generated/pve/cluster-sdn-vnets-vnet.d.ts +229 -0
  222. package/dist/proxmox/generated/pve/cluster-sdn-vnets-vnet.d.ts.map +1 -0
  223. package/dist/proxmox/generated/pve/cluster-sdn-vnets.d.ts +51 -0
  224. package/dist/proxmox/generated/pve/cluster-sdn-vnets.d.ts.map +1 -0
  225. package/dist/proxmox/generated/pve/cluster-sdn-zones.d.ts +225 -0
  226. package/dist/proxmox/generated/pve/cluster-sdn-zones.d.ts.map +1 -0
  227. package/dist/proxmox/generated/pve/cluster-sdn.d.ts +202 -0
  228. package/dist/proxmox/generated/pve/cluster-sdn.d.ts.map +1 -0
  229. package/dist/proxmox/generated/pve/cluster.d.ts +69 -0
  230. package/dist/proxmox/generated/pve/cluster.d.ts.map +1 -0
  231. package/dist/proxmox/generated/pve/nodes-node-ceph.d.ts +167 -0
  232. package/dist/proxmox/generated/pve/nodes-node-ceph.d.ts.map +1 -0
  233. package/dist/proxmox/generated/pve/nodes-node-config.d.ts +43 -0
  234. package/dist/proxmox/generated/pve/nodes-node-config.d.ts.map +1 -0
  235. package/dist/proxmox/generated/pve/nodes-node-disks.d.ts +225 -0
  236. package/dist/proxmox/generated/pve/nodes-node-disks.d.ts.map +1 -0
  237. package/dist/proxmox/generated/pve/nodes-node-firewall.d.ts +145 -0
  238. package/dist/proxmox/generated/pve/nodes-node-firewall.d.ts.map +1 -0
  239. package/dist/proxmox/generated/pve/nodes-node-hardware.d.ts +195 -0
  240. package/dist/proxmox/generated/pve/nodes-node-hardware.d.ts.map +1 -0
  241. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-firewall.d.ts +191 -0
  242. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-firewall.d.ts.map +1 -0
  243. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-move-volume.d.ts +33 -0
  244. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-move-volume.d.ts.map +1 -0
  245. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-mtunnel.d.ts +56 -0
  246. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-mtunnel.d.ts.map +1 -0
  247. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-resize.d.ts +28 -0
  248. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-resize.d.ts.map +1 -0
  249. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-rrd.d.ts +186 -0
  250. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid-rrd.d.ts.map +1 -0
  251. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid.d.ts +191 -0
  252. package/dist/proxmox/generated/pve/nodes-node-lxc-vmid.d.ts.map +1 -0
  253. package/dist/proxmox/generated/pve/nodes-node-network.d.ts +150 -0
  254. package/dist/proxmox/generated/pve/nodes-node-network.d.ts.map +1 -0
  255. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-config.d.ts +301 -0
  256. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-config.d.ts.map +1 -0
  257. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-dbus-vmstate.d.ts +170 -0
  258. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-dbus-vmstate.d.ts.map +1 -0
  259. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-firewall-rules.d.ts +144 -0
  260. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-firewall-rules.d.ts.map +1 -0
  261. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-move-disk.d.ts +34 -0
  262. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-move-disk.d.ts.map +1 -0
  263. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-mtunnel.d.ts +137 -0
  264. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-mtunnel.d.ts.map +1 -0
  265. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-status.d.ts +179 -0
  266. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid-status.d.ts.map +1 -0
  267. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid.d.ts +143 -0
  268. package/dist/proxmox/generated/pve/nodes-node-qemu-vmid.d.ts.map +1 -0
  269. package/dist/proxmox/generated/pve/nodes-node-qemu.d.ts +158 -0
  270. package/dist/proxmox/generated/pve/nodes-node-qemu.d.ts.map +1 -0
  271. package/dist/proxmox/generated/pve/nodes-node-replication.d.ts +187 -0
  272. package/dist/proxmox/generated/pve/nodes-node-replication.d.ts.map +1 -0
  273. package/dist/proxmox/generated/pve/nodes-node-services.d.ts +115 -0
  274. package/dist/proxmox/generated/pve/nodes-node-services.d.ts.map +1 -0
  275. package/dist/proxmox/generated/pve/nodes-node-storage-storage.d.ts +202 -0
  276. package/dist/proxmox/generated/pve/nodes-node-storage-storage.d.ts.map +1 -0
  277. package/dist/proxmox/generated/pve/nodes-node-storage.d.ts +40 -0
  278. package/dist/proxmox/generated/pve/nodes-node-storage.d.ts.map +1 -0
  279. package/dist/proxmox/generated/pve/nodes-node-subscription.d.ts +173 -0
  280. package/dist/proxmox/generated/pve/nodes-node-subscription.d.ts.map +1 -0
  281. package/dist/proxmox/generated/pve/nodes-node-vzdump.d.ts +97 -0
  282. package/dist/proxmox/generated/pve/nodes-node-vzdump.d.ts.map +1 -0
  283. package/dist/proxmox/generated/pve/nodes-node.d.ts +207 -0
  284. package/dist/proxmox/generated/pve/nodes-node.d.ts.map +1 -0
  285. package/dist/proxmox/generated/pve/nodes.d.ts +236 -0
  286. package/dist/proxmox/generated/pve/nodes.d.ts.map +1 -0
  287. package/dist/proxmox/generated/pve/pools.d.ts +82 -0
  288. package/dist/proxmox/generated/pve/pools.d.ts.map +1 -0
  289. package/dist/proxmox/generated/pve/storage.d.ts +159 -0
  290. package/dist/proxmox/generated/pve/storage.d.ts.map +1 -0
  291. package/dist/proxmox/generated/pve/version.d.ts +21 -0
  292. package/dist/proxmox/generated/pve/version.d.ts.map +1 -0
  293. package/dist/proxmox/generated/pve.d.ts +69 -4766
  294. package/dist/proxmox/generated/pve.d.ts.map +1 -1
  295. package/dist/proxmox/index.js +996 -372
  296. package/dist/proxmox/index.js.map +48 -32
  297. package/dist/proxmox/lxc-lifecycle.d.ts.map +1 -1
  298. package/dist/proxmox/metric-server-form.d.ts +11 -0
  299. package/dist/proxmox/metric-server-form.d.ts.map +1 -1
  300. package/dist/proxmox/metric-server.d.ts.map +1 -1
  301. package/dist/proxmox/network-apply.d.ts.map +1 -1
  302. package/dist/proxmox/node-network-form.d.ts +15 -0
  303. package/dist/proxmox/node-network-form.d.ts.map +1 -1
  304. package/dist/proxmox/node-network.d.ts.map +1 -1
  305. package/dist/proxmox/notification-target-endpoint.d.ts +26 -0
  306. package/dist/proxmox/notification-target-endpoint.d.ts.map +1 -0
  307. package/dist/proxmox/notification-target-form.d.ts +7 -0
  308. package/dist/proxmox/notification-target-form.d.ts.map +1 -1
  309. package/dist/proxmox/notification-target.d.ts.map +1 -1
  310. package/dist/proxmox/pbs-notification-target-endpoint.d.ts +29 -0
  311. package/dist/proxmox/pbs-notification-target-endpoint.d.ts.map +1 -0
  312. package/dist/proxmox/pbs-notification-target-lifecycle.d.ts.map +1 -1
  313. package/dist/proxmox/qemu.d.ts +10 -0
  314. package/dist/proxmox/qemu.d.ts.map +1 -1
  315. package/dist/proxmox/resource-guard.d.ts +15 -0
  316. package/dist/proxmox/resource-guard.d.ts.map +1 -0
  317. package/dist/proxmox/resource-spec.d.ts +15 -4
  318. package/dist/proxmox/resource-spec.d.ts.map +1 -1
  319. package/dist/proxmox/resource.d.ts +8 -0
  320. package/dist/proxmox/resource.d.ts.map +1 -1
  321. package/dist/proxmox/sdn-apply.d.ts.map +1 -1
  322. package/dist/proxmox/sdn-subnet.d.ts.map +1 -1
  323. package/dist/proxmox/zfs-pool-write.d.ts +11 -0
  324. package/dist/proxmox/zfs-pool-write.d.ts.map +1 -1
  325. package/dist/proxmox/zfs-pool.d.ts.map +1 -1
  326. package/docs/linux-host-measured.md +56 -0
  327. package/docs/linux-host.md +192 -0
  328. package/docs/netbox.md +103 -0
  329. package/package.json +9 -1
  330. package/src/linux/directory-lifecycle.ts +220 -0
  331. package/src/linux/directory.test.ts +132 -0
  332. package/src/linux/directory.ts +71 -0
  333. package/src/linux/fake-linux-host.ts +197 -0
  334. package/src/linux/fake-systemd.ts +103 -0
  335. package/src/linux/index.ts +32 -0
  336. package/src/linux/providers.ts +26 -0
  337. package/src/linux/region.test.ts +89 -0
  338. package/src/linux/region.ts +118 -0
  339. package/src/linux/remote-file-form.ts +96 -0
  340. package/src/linux/remote-file-lifecycle.test.ts +191 -0
  341. package/src/linux/remote-file-lifecycle.ts +161 -0
  342. package/src/linux/remote-file-plan.ts +154 -0
  343. package/src/linux/remote-file.ts +88 -0
  344. package/src/linux/ssh-command.test.ts +140 -0
  345. package/src/linux/ssh-command.ts +99 -0
  346. package/src/linux/ssh-runner.ts +188 -0
  347. package/src/linux/ssh-scripts.ts +105 -0
  348. package/src/linux/systemctl.ts +145 -0
  349. package/src/linux/unit-form.ts +183 -0
  350. package/src/linux/unit-handlers.ts +73 -0
  351. package/src/linux/unit-lifecycle.test.ts +220 -0
  352. package/src/linux/unit-lifecycle.ts +175 -0
  353. package/src/linux/unit-preflight.test.ts +128 -0
  354. package/src/linux/unit-preflight.ts +100 -0
  355. package/src/linux/unit-settle.ts +110 -0
  356. package/src/linux/unit.ts +81 -0
  357. package/src/netbox/client.test.ts +67 -0
  358. package/src/netbox/client.ts +146 -0
  359. package/src/netbox/constraint-guard.ts +57 -0
  360. package/src/netbox/constraints.test.ts +114 -0
  361. package/src/netbox/constraints.ts +152 -0
  362. package/src/netbox/generated/constraints/index.ts +23 -0
  363. package/src/netbox/generated/constraints/netbox-ipam.ts +32 -0
  364. package/src/netbox/index.ts +34 -0
  365. package/src/netbox/prefix-form.test.ts +127 -0
  366. package/src/netbox/prefix-form.ts +84 -0
  367. package/src/netbox/prefix.ts +136 -0
  368. package/src/netbox/resource.ts +208 -0
  369. package/src/netbox/values.test.ts +66 -0
  370. package/src/netbox/values.ts +40 -0
  371. package/src/proxmox/api-token-form.ts +5 -0
  372. package/src/proxmox/apply-endpoints.ts +34 -0
  373. package/src/proxmox/ceph-daemon-form.ts +56 -2
  374. package/src/proxmox/ceph-daemon.ts +10 -21
  375. package/src/proxmox/ceph-flag.ts +1 -0
  376. package/src/proxmox/ceph-fs.ts +1 -0
  377. package/src/proxmox/ceph-osd-write.ts +30 -4
  378. package/src/proxmox/ceph-pool.ts +10 -0
  379. package/src/proxmox/constraints-dialect.test.ts +165 -0
  380. package/src/proxmox/constraints-forms.test.ts +228 -0
  381. package/src/proxmox/constraints-host-forms.test.ts +132 -0
  382. package/src/proxmox/constraints-live.test.ts +155 -0
  383. package/src/proxmox/constraints-node-forms.test.ts +197 -0
  384. package/src/proxmox/constraints-required.test.ts +172 -0
  385. package/src/proxmox/constraints.test.ts +8 -63
  386. package/src/proxmox/constraints.ts +31 -6
  387. package/src/proxmox/generated/constraints/index.ts +27 -3
  388. package/src/proxmox/generated/constraints/pbs-config.ts +63 -1
  389. package/src/proxmox/generated/constraints/pve-access.ts +15 -3
  390. package/src/proxmox/generated/constraints/pve-cluster-backup.ts +74 -0
  391. package/src/proxmox/generated/constraints/pve-cluster-ceph.ts +27 -0
  392. package/src/proxmox/generated/constraints/pve-cluster-firewall.ts +35 -0
  393. package/src/proxmox/generated/constraints/pve-cluster-ha.ts +55 -0
  394. package/src/proxmox/generated/constraints/pve-cluster-metrics.ts +59 -0
  395. package/src/proxmox/generated/constraints/pve-cluster-notifications.ts +80 -0
  396. package/src/proxmox/generated/constraints/pve-cluster-replication.ts +43 -0
  397. package/src/proxmox/generated/constraints/pve-cluster-sdn.ts +90 -0
  398. package/src/proxmox/generated/constraints/pve-nodes-ceph.ts +57 -0
  399. package/src/proxmox/generated/constraints/pve-nodes-disks.ts +31 -0
  400. package/src/proxmox/generated/constraints/pve-nodes-lxc.ts +82 -0
  401. package/src/proxmox/generated/constraints/pve-nodes-network.ts +77 -0
  402. package/src/proxmox/generated/constraints/pve-nodes-qemu.ts +125 -0
  403. package/src/proxmox/generated/constraints/pve-pools.ts +6 -1
  404. package/src/proxmox/generated/constraints/pve-storage.ts +8 -3
  405. package/src/proxmox/generated/pbs/access-users.ts +137 -0
  406. package/src/proxmox/generated/pbs/access.ts +232 -0
  407. package/src/proxmox/generated/pbs/admin-datastore-store.ts +238 -0
  408. package/src/proxmox/generated/pbs/admin-metrics.ts +147 -0
  409. package/src/proxmox/generated/pbs/admin.ts +225 -0
  410. package/src/proxmox/generated/pbs/backup.ts +121 -0
  411. package/src/proxmox/generated/pbs/config-access-pam.ts +228 -0
  412. package/src/proxmox/generated/pbs/config-access.ts +228 -0
  413. package/src/proxmox/generated/pbs/config-datastore.ts +217 -0
  414. package/src/proxmox/generated/pbs/config-media-pool.ts +232 -0
  415. package/src/proxmox/generated/pbs/config-notifications-matchers.ts +187 -0
  416. package/src/proxmox/generated/pbs/config-notifications.ts +221 -0
  417. package/src/proxmox/generated/pbs/config-remote.ts +192 -0
  418. package/src/proxmox/generated/pbs/config-sync.ts +167 -0
  419. package/src/proxmox/generated/pbs/config-tape.ts +226 -0
  420. package/src/proxmox/generated/pbs/config-verify.ts +87 -0
  421. package/src/proxmox/generated/pbs/config.ts +135 -0
  422. package/src/proxmox/generated/pbs/nodes-node-dns.ts +229 -0
  423. package/src/proxmox/generated/pbs/nodes-node-services.ts +181 -0
  424. package/src/proxmox/generated/pbs/nodes-node.ts +244 -0
  425. package/src/proxmox/generated/pbs/nodes.ts +160 -0
  426. package/src/proxmox/generated/pbs/ping.ts +16 -0
  427. package/src/proxmox/generated/pbs/pull.ts +37 -0
  428. package/src/proxmox/generated/pbs/push.ts +36 -0
  429. package/src/proxmox/generated/pbs/reader.ts +41 -0
  430. package/src/proxmox/generated/pbs/root.ts +16 -0
  431. package/src/proxmox/generated/pbs/status.ts +50 -0
  432. package/src/proxmox/generated/pbs/tape-drive.ts +220 -0
  433. package/src/proxmox/generated/pbs/tape-media.ts +133 -0
  434. package/src/proxmox/generated/pbs/tape.ts +92 -0
  435. package/src/proxmox/generated/pbs/version.ts +16 -0
  436. package/src/proxmox/generated/pbs.ts +44 -787
  437. package/src/proxmox/generated/pve/access-roles.ts +168 -0
  438. package/src/proxmox/generated/pve/access-users.ts +155 -0
  439. package/src/proxmox/generated/pve/access.ts +217 -0
  440. package/src/proxmox/generated/pve/cluster-acme-plugins-id.ts +367 -0
  441. package/src/proxmox/generated/pve/cluster-acme-plugins.ts +366 -0
  442. package/src/proxmox/generated/pve/cluster-acme-tos.ts +232 -0
  443. package/src/proxmox/generated/pve/cluster-bulk-action.ts +227 -0
  444. package/src/proxmox/generated/pve/cluster-firewall-refs.ts +110 -0
  445. package/src/proxmox/generated/pve/cluster-firewall.ts +236 -0
  446. package/src/proxmox/generated/pve/cluster-ha.ts +203 -0
  447. package/src/proxmox/generated/pve/cluster-jobs.ts +190 -0
  448. package/src/proxmox/generated/pve/cluster-metrics.ts +116 -0
  449. package/src/proxmox/generated/pve/cluster-notifications-endpoints.ts +244 -0
  450. package/src/proxmox/generated/pve/cluster-notifications.ts +99 -0
  451. package/src/proxmox/generated/pve/cluster-options.ts +189 -0
  452. package/src/proxmox/generated/pve/cluster-qemu-custom-cpu-models-cputype.ts +272 -0
  453. package/src/proxmox/generated/pve/cluster-qemu-custom-cpu-models.ts +268 -0
  454. package/src/proxmox/generated/pve/cluster-replication.ts +127 -0
  455. package/src/proxmox/generated/pve/cluster-sdn-fabrics.ts +218 -0
  456. package/src/proxmox/generated/pve/cluster-sdn-ipams.ts +229 -0
  457. package/src/proxmox/generated/pve/cluster-sdn-vnets-vnet.ts +245 -0
  458. package/src/proxmox/generated/pve/cluster-sdn-vnets.ts +49 -0
  459. package/src/proxmox/generated/pve/cluster-sdn-zones.ts +224 -0
  460. package/src/proxmox/generated/pve/cluster-sdn.ts +201 -0
  461. package/src/proxmox/generated/pve/cluster.ts +71 -0
  462. package/src/proxmox/generated/pve/nodes-node-ceph.ts +167 -0
  463. package/src/proxmox/generated/pve/nodes-node-config.ts +56 -0
  464. package/src/proxmox/generated/pve/nodes-node-disks.ts +237 -0
  465. package/src/proxmox/generated/pve/nodes-node-firewall.ts +239 -0
  466. package/src/proxmox/generated/pve/nodes-node-hardware.ts +215 -0
  467. package/src/proxmox/generated/pve/nodes-node-lxc-vmid-firewall.ts +232 -0
  468. package/src/proxmox/generated/pve/nodes-node-lxc-vmid-move-volume.ts +1059 -0
  469. package/src/proxmox/generated/pve/nodes-node-lxc-vmid-mtunnel.ts +49 -0
  470. package/src/proxmox/generated/pve/nodes-node-lxc-vmid-resize.ts +285 -0
  471. package/src/proxmox/generated/pve/nodes-node-lxc-vmid-rrd.ts +184 -0
  472. package/src/proxmox/generated/pve/nodes-node-lxc-vmid.ts +240 -0
  473. package/src/proxmox/generated/pve/nodes-node-network.ts +234 -0
  474. package/src/proxmox/generated/pve/nodes-node-qemu-vmid-config.ts +441 -0
  475. package/src/proxmox/generated/pve/nodes-node-qemu-vmid-dbus-vmstate.ts +215 -0
  476. package/src/proxmox/generated/pve/nodes-node-qemu-vmid-firewall-rules.ts +145 -0
  477. package/src/proxmox/generated/pve/nodes-node-qemu-vmid-move-disk.ts +664 -0
  478. package/src/proxmox/generated/pve/nodes-node-qemu-vmid-mtunnel.ts +188 -0
  479. package/src/proxmox/generated/pve/nodes-node-qemu-vmid-status.ts +233 -0
  480. package/src/proxmox/generated/pve/nodes-node-qemu-vmid.ts +187 -0
  481. package/src/proxmox/generated/pve/nodes-node-qemu.ts +204 -0
  482. package/src/proxmox/generated/pve/nodes-node-replication.ts +187 -0
  483. package/src/proxmox/generated/pve/nodes-node-services.ts +221 -0
  484. package/src/proxmox/generated/pve/nodes-node-storage-storage.ts +226 -0
  485. package/src/proxmox/generated/pve/nodes-node-storage.ts +40 -0
  486. package/src/proxmox/generated/pve/nodes-node-subscription.ts +168 -0
  487. package/src/proxmox/generated/pve/nodes-node-vzdump.ts +96 -0
  488. package/src/proxmox/generated/pve/nodes-node.ts +211 -0
  489. package/src/proxmox/generated/pve/nodes.ts +235 -0
  490. package/src/proxmox/generated/pve/pools.ts +78 -0
  491. package/src/proxmox/generated/pve/storage.ts +213 -0
  492. package/src/proxmox/generated/pve/version.ts +21 -0
  493. package/src/proxmox/generated/pve.ts +69 -7403
  494. package/src/proxmox/lxc-interior.test.ts +17 -1
  495. package/src/proxmox/lxc-lifecycle.ts +48 -9
  496. package/src/proxmox/metric-server-form.ts +10 -0
  497. package/src/proxmox/metric-server.ts +11 -2
  498. package/src/proxmox/network-apply.ts +4 -0
  499. package/src/proxmox/node-network-form.ts +19 -0
  500. package/src/proxmox/node-network.ts +9 -3
  501. package/src/proxmox/notification-target-endpoint.ts +46 -0
  502. package/src/proxmox/notification-target-form.ts +11 -0
  503. package/src/proxmox/notification-target.ts +5 -2
  504. package/src/proxmox/pbs-notification-target-endpoint.ts +45 -0
  505. package/src/proxmox/pbs-notification-target-lifecycle.ts +16 -14
  506. package/src/proxmox/qemu.ts +9 -1
  507. package/src/proxmox/resource-guard.ts +61 -0
  508. package/src/proxmox/resource-spec.ts +16 -4
  509. package/src/proxmox/resource.ts +27 -27
  510. package/src/proxmox/sdn-apply.ts +4 -0
  511. package/src/proxmox/sdn-subnet.ts +5 -0
  512. package/src/proxmox/zfs-pool-write.ts +12 -0
  513. package/src/proxmox/zfs-pool.ts +2 -1
  514. package/dist/proxmox/generated/constraints/pve-cluster.d.ts +0 -18
  515. package/dist/proxmox/generated/constraints/pve-cluster.d.ts.map +0 -1
  516. package/src/proxmox/generated/constraints/pve-cluster.ts +0 -174
@@ -0,0 +1,43 @@
1
+ /**
2
+ * A MANAGED REGION: a block a resource owns inside a file it does not own.
3
+ *
4
+ * ★ WHY THIS EXISTS. Four files on this estate are owned by something else and still need one
5
+ * declared block: a packet-filter anchor line inside the OS vendor's own ruleset, a host table,
6
+ * a generated Nix module, and an operator's ssh config. Declaring the WHOLE file would mean
7
+ * taking it from its owner — which puts it back, or refuses its next activation. So the resource
8
+ * owns the lines between two markers and promises that every other byte is untouched.
9
+ * ⛔ THE REST OF THE FILE IS BYTE-IDENTICAL. Not "semantically the same", not re-indented, not
10
+ * re-terminated: the bytes before the BEGIN line and after the END line are copied through. That
11
+ * is the property region.test.ts asserts, because it is the whole reason the other owner tolerates
12
+ * this.
13
+ * ⛔ AMBIGUITY IS A REFUSAL, NEVER A GUESS. Two BEGIN markers with the same name, an END before its
14
+ * BEGIN, or a BEGIN with no END all mean someone edited inside the block. Picking one would
15
+ * silently delete their edit, so each is an Error naming the line.
16
+ * ★ THE MARKER IS A COMMENT IN THE HOST FILE'S OWN LANGUAGE, which is why the comment token is a
17
+ * prop: `#` covers the four consumers above, and a file whose comments are `//` or `;` says so.
18
+ */
19
+ export type RegionSpec = {
20
+ /** Distinguishes this block from any other managed block in the same file. */
21
+ readonly name: string;
22
+ /** The file's comment token. @default '#' */
23
+ readonly comment?: string;
24
+ };
25
+ export declare const DEFAULT_COMMENT = "#";
26
+ export declare const regionProblems: (spec: RegionSpec) => string[];
27
+ /**
28
+ * The file's bytes with the block set to `body`, appended at the end when it is not there yet.
29
+ * ⚠️ A file that does not end in a newline gets one before the block is appended — the ONLY byte
30
+ * this function adds outside its own block, and without it the last existing line and the BEGIN
31
+ * marker would become one line.
32
+ */
33
+ export declare const spliceRegion: (file: string, spec: RegionSpec, body: string) => string;
34
+ /** The block's body, or `undefined` when the file has no such block. */
35
+ export declare const readRegion: (file: string, spec: RegionSpec) => string | undefined;
36
+ /**
37
+ * The file with the block and both markers removed — what a delete leaves behind.
38
+ * ★ Byte-for-byte the file as it was before the block was appended, with one exception already
39
+ * named on `spliceRegion`: a file that had no final newline when the block was added keeps the
40
+ * newline that adding it required. Nothing else is added or dropped.
41
+ */
42
+ export declare const removeRegion: (file: string, spec: RegionSpec) => string;
43
+ //# sourceMappingURL=region.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region.d.ts","sourceRoot":"","sources":["../../src/linux/region.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,UAAU,GAAG;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,eAAe,MAAM,CAAC;AAUnC,eAAO,MAAM,cAAc,SAAU,UAAU,KAAG,MAAM,EAYvD,CAAC;AA8BF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,SAAU,MAAM,QAAQ,UAAU,QAAQ,MAAM,KAAG,MAW3E,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,UAAU,SAAU,MAAM,QAAQ,UAAU,KAAG,MAAM,GAAG,SAMpE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,SAAU,MAAM,QAAQ,UAAU,KAAG,MAK7D,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { type RegionSpec } from './region.ts';
2
+ export interface RemoteFileProps {
3
+ /** Absolute path on the host. ⚠️ The parent directory must exist — declare a HostDirectory. */
4
+ path: string;
5
+ /** UTF-8 text: the whole file, or the region's body. ⛔ Never a secret — see the file header. */
6
+ content: string;
7
+ /**
8
+ * Own a block inside a file this resource does not own, instead of the whole file.
9
+ * ⛔ In region mode `mode`, `owner` and `group` apply ONLY to a file this resource creates: an
10
+ * existing file keeps the mode and ownership its owner gave it, because changing them would be
11
+ * a second, undeclared claim on a file we only borrowed four lines of.
12
+ */
13
+ region?: RegionSpec;
14
+ /**
15
+ * Create the file when it is absent. Region mode only; whole-file mode always creates.
16
+ * ⛔ Default `false`: a region declared against a path that does not exist is far more often a
17
+ * typo (a wrong `/etc` path) than an intention, and creating it would hide the typo.
18
+ */
19
+ create?: boolean;
20
+ /** Permission bits. @default 0o644 */
21
+ mode?: number;
22
+ /** User name or numeric uid. Omitted: whoever the runner writes as. */
23
+ owner?: string | number;
24
+ /** Group name or numeric gid. Omitted: the directory's default group. */
25
+ group?: string | number;
26
+ }
27
+ export interface RemoteFileAttributes {
28
+ path: string;
29
+ /** SHA-256 of the WHOLE file on disk, in both modes. */
30
+ sha256: string;
31
+ /** SHA-256 of the part this resource owns — in region mode, of the region's body alone. */
32
+ contentSha256: string;
33
+ /**
34
+ * The block this resource owns, when it owns only a block.
35
+ * ⛔ IT IS IN THE ATTRIBUTES ON PURPOSE. Alchemy's `delete` handler is given the attributes and
36
+ * nothing else, and without the marker name a delete could not find the block — it could only
37
+ * delete the whole file, which belongs to someone else.
38
+ */
39
+ region?: RegionSpec;
40
+ mode: number;
41
+ uid: number;
42
+ gid: number;
43
+ size: number;
44
+ }
45
+ export declare const DEFAULT_MODE = 420;
46
+ export declare const fileProblems: (props: RemoteFileProps) => string[];
47
+ //# sourceMappingURL=remote-file-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-file-form.d.ts","sourceRoot":"","sources":["../../src/linux/remote-file-form.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,+FAA+F;IAC/F,IAAI,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,YAAY,MAAQ,CAAC;AAclC,eAAO,MAAM,YAAY,UAAW,eAAe,KAAG,MAAM,EAoB3D,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * RemoteFile's diff / reconcile / delete over a HostRunner, so the whole lifecycle runs against a
3
+ * fake host in tests with no ssh and no real write. What it would write is worked out next door
4
+ * (remote-file-plan.ts); this file is the part that decides to act.
5
+ *
6
+ * ⛔ IN REGION MODE, DRIFT MEANS THE REGION AND NOTHING ELSE. Every byte outside the markers belongs
7
+ * to another owner, so a change there must never plan an update — otherwise the two owners fight
8
+ * on every deploy and this resource loses the right to be in that file at all.
9
+ * ⚠️ THE WRITE REPLACES THE INODE, in both modes. A process holding the old file keeps reading it
10
+ * until it reopens, and a hard link to the path stops tracking. That is the price of never
11
+ * leaving a torn file, and it is the trade the launchd family already makes.
12
+ */
13
+ import type { Diff } from 'alchemy/Diff';
14
+ import { type HostRunner } from '../launchd/runner.ts';
15
+ import { type RemoteFileAttributes, type RemoteFileProps } from './remote-file-form.ts';
16
+ export { readFileAttributes } from './remote-file-plan.ts';
17
+ /**
18
+ * ★ A PLAN THAT WILL WRITE ASKS THE RUNNER FIRST (`checkWrite`, when it has one), so a runner's own
19
+ * refusals fail the plan instead of arriving halfway through the apply.
20
+ */
21
+ export declare const diffFile: (runner: HostRunner, news: RemoteFileProps, output: RemoteFileAttributes) => Promise<Diff>;
22
+ /**
23
+ * `adopt` is whether adoption is on AND this apply is a create or an unfinished generation of our
24
+ * own (ownership/adopt.ts). It lets such a generation take over what is already at the path — the
25
+ * takeover the plan's probe would have allowed, had it run.
26
+ * ★ IN REGION MODE THE FILE BEING THERE IS NOT A TAKEOVER: it belongs to someone else by
27
+ * definition. What this resource claims is the block, so only a block already present with other
28
+ * content is the thing adoption is asked about.
29
+ */
30
+ export declare const reconcileFile: (runner: HostRunner, props: RemoteFileProps, output?: RemoteFileAttributes, adopt?: boolean) => Promise<RemoteFileAttributes>;
31
+ /**
32
+ * Whole-file mode removes the file. ⛔ REGION MODE REMOVES ONLY THE BLOCK, leaving every other byte
33
+ * identical — removing the file would delete another owner's configuration. Idempotent both ways.
34
+ */
35
+ export declare const deleteFile: (runner: HostRunner, output: RemoteFileAttributes) => Promise<void>;
36
+ //# sourceMappingURL=remote-file-lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-file-lifecycle.d.ts","sourceRoot":"","sources":["../../src/linux/remote-file-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAY/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,QAAQ,WACX,UAAU,QACZ,eAAe,UACb,oBAAoB,KAC3B,OAAO,CAAC,IAAI,CAed,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,WAChB,UAAU,SACX,eAAe,WACb,oBAAoB,sBAE5B,OAAO,CAAC,oBAAoB,CA6D9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,WACb,UAAU,UACV,oBAAoB,KAC3B,OAAO,CAAC,IAAI,CAkBd,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { HostRunner, WriteOptions } from '../launchd/runner.ts';
2
+ import { type RegionSpec } from './region.ts';
3
+ import { type RemoteFileAttributes, type RemoteFileProps } from './remote-file-form.ts';
4
+ export declare const decoder: TextDecoder;
5
+ export declare const encoder: TextEncoder;
6
+ export declare const refuse: (path: string, message: string) => Error;
7
+ export type Identity = {
8
+ readonly uid?: number;
9
+ readonly gid?: number;
10
+ };
11
+ /** Validate, then resolve owner and group names to ids through the runner. */
12
+ export declare const identity: (runner: HostRunner, props: RemoteFileProps) => Promise<Identity>;
13
+ export declare const digestOf: (text: string) => string;
14
+ /** The digest of the part this resource owns, or `undefined` when that part is not there. */
15
+ export declare const ownedDigest: (file: string | undefined, region: RegionSpec | undefined) => string | undefined;
16
+ /** The file as it is now, plus the digest of the part this resource owns. */
17
+ export declare const readFileAttributes: (runner: HostRunner, path: string, region: RegionSpec | undefined) => Promise<RemoteFileAttributes | undefined>;
18
+ export type Plan = {
19
+ /** The whole file's new bytes, in both modes. */
20
+ readonly bytes: Uint8Array;
21
+ readonly write: WriteOptions;
22
+ /** The bytes on disk right now, or `undefined` when nothing is there. */
23
+ readonly before: string | undefined;
24
+ /** Nothing to do: the file already says what we declare, with the mode and owner we declare. */
25
+ readonly converged: boolean;
26
+ };
27
+ /**
28
+ * ⛔ A SYMLINK OR A DIRECTORY IS REFUSED, NOT REPLACED. The write is a rename(2), which over a
29
+ * symlink replaces the LINK — quietly taking the path from whatever put it there (a config
30
+ * manager's `/etc` entries are symlinks, and so is `/etc/resolv.conf` on most Linux hosts).
31
+ */
32
+ export declare const planWrite: (runner: HostRunner, props: RemoteFileProps, want: Identity) => Promise<Plan>;
33
+ //# sourceMappingURL=remote-file-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-file-plan.d.ts","sourceRoot":"","sources":["../../src/linux/remote-file-plan.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAY,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,KAAK,UAAU,EAA4B,MAAM,aAAa,CAAC;AACxE,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EAErB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,OAAO,aAAoB,CAAC;AACzC,eAAO,MAAM,OAAO,aAAoB,CAAC;AAEzC,eAAO,MAAM,MAAM,SAAU,MAAM,WAAW,MAAM,KAAG,KACT,CAAC;AAK/C,MAAM,MAAM,QAAQ,GAAG;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,8EAA8E;AAC9E,eAAO,MAAM,QAAQ,WAAkB,UAAU,SAAS,eAAe,KAAG,OAAO,CAAC,QAAQ,CAc3F,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,MAAM,KAAG,MAAyC,CAAC;AAElF,6FAA6F;AAC7F,eAAO,MAAM,WAAW,SAChB,MAAM,GAAG,SAAS,UAChB,UAAU,GAAG,SAAS,KAC7B,MAAM,GAAG,SAKX,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,WACrB,UAAU,QACZ,MAAM,UACJ,UAAU,GAAG,SAAS,KAC7B,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAe1C,CAAC;AAQF,MAAM,MAAM,IAAI,GAAG;IACjB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,gGAAgG;IAChG,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,WACZ,UAAU,SACX,eAAe,QAChB,QAAQ,KACb,OAAO,CAAC,IAAI,CA+Cd,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * `Remote.File` — one text file on a Linux host, declared: content, mode, owner, group — or one
3
+ * MANAGED BLOCK inside a file this resource does not own.
4
+ *
5
+ * - create / update — atomic write (stage beside the target, chown, chmod, rename), skipped when
6
+ * the host already says what we declare; then read back and compared.
7
+ * - read — lstat plus the SHA-256 of the file and of the part this resource owns.
8
+ * - diff — the declared digest against the stored AND the on-disk one, plus mode and owner.
9
+ * - replace — only when `path` changes; create-before-delete.
10
+ * - delete — removes the file, or in region mode only the block.
11
+ *
12
+ * ⛔ NEVER A SECRET — see remote-file-form.ts.
13
+ * ⚠️ NOTHING IS ADOPTED WITHOUT `--adopt` (docs/ownership.md): a file already at the path, or a
14
+ * block already carrying the markers, reads as `Unowned`.
15
+ * ★ IT IS A SEPARATE RESOURCE FROM `Host.File`, not a flag on it: the two have different attributes
16
+ * (a region name that a delete cannot work without) and different promises about the rest of the
17
+ * file, and folding them together would make every existing Mac HostFile's state shape change.
18
+ */
19
+ import { Resource } from 'alchemy';
20
+ import * as Provider from 'alchemy/Provider';
21
+ import { HostRunnerService } from '../launchd/runner.ts';
22
+ import type { RemoteFileAttributes, RemoteFileProps } from './remote-file-form.ts';
23
+ export type { RemoteFileAttributes, RemoteFileProps } from './remote-file-form.ts';
24
+ export interface RemoteFile extends Resource<'Remote.File', RemoteFileProps, RemoteFileAttributes> {
25
+ }
26
+ export declare const RemoteFile: import("alchemy").ResourceClass<RemoteFile>;
27
+ export declare const RemoteFileProvider: () => import("effect/Layer").Layer<Provider.Provider<RemoteFile>, never, HostRunnerService>;
28
+ //# sourceMappingURL=remote-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-file.d.ts","sourceRoot":"","sources":["../../src/linux/remote-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQnF,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEnF,MAAM,WAAW,UAAW,SAAQ,QAAQ,CAC1C,aAAa,EACb,eAAe,EACf,oBAAoB,CACrB;CAAG;AAEJ,eAAO,MAAM,UAAU,6CAAsC,CAAC;AAE9D,eAAO,MAAM,kBAAkB,6FA0C5B,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * The wire format the ssh runner speaks: how an argv becomes one remote `sh` script, and how that
3
+ * script's real exit code comes back. Pure functions, so every quoting and framing rule is tested
4
+ * without opening a connection.
5
+ *
6
+ * ⛔ `ssh host <words>` IS NOT AN EXECVE. ssh joins its trailing arguments with spaces and the
7
+ * REMOTE LOGIN SHELL parses the result, so an unquoted path with a space, a `$`, a backtick or a
8
+ * `;` is re-parsed as shell syntax on the other side. Everything therefore goes through
9
+ * `shellQuote`, and the remote command is always `/bin/sh -c '<script>'` — a POSIX shell named
10
+ * explicitly, so a csh or fish login shell only ever execs it.
11
+ * ⛔ AN EXIT CODE FROM ssh IS AMBIGUOUS. ssh exits 255 for its own failures (connection refused,
12
+ * host key changed, auth) and otherwise passes the remote exit code through — and a remote
13
+ * command may itself exit 255. A runner that read the code alone would report "the file is not
14
+ * there" for a dropped connection, which is the exact "never infer success from an empty result"
15
+ * failure. So every script ends by printing its own status on stderr behind a PER-RUNNER NONCE,
16
+ * and a result without that line is a transport failure, never data.
17
+ * ⚠️ THE NONCE IS NOT DECORATION. Without it a remote program that happens to print the marker on
18
+ * stderr could claim any exit code it liked; with a fresh random nonce per runner, the only thing
19
+ * that can produce the line is the script we sent.
20
+ */
21
+ /** A script whose work found nothing at the path. ★ Chosen from the 64–113 range sh leaves free. */
22
+ export declare const ABSENT = 66;
23
+ /**
24
+ * One argument, safe for a POSIX shell. ⛔ Single quotes, because they quote EVERYTHING; the
25
+ * `'\''` dance is how a literal quote gets through.
26
+ */
27
+ export declare const shellQuote: (arg: string) => string;
28
+ /** An argv as one shell command line. */
29
+ export declare const quoteArgv: (argv: readonly string[]) => string;
30
+ /**
31
+ * Wrap a script so its status comes back unambiguously.
32
+ *
33
+ * ⛔ THE SCRIPT RUNS IN A SUBSHELL, AND THAT IS NOT COSMETIC. Several of the scripts end a branch
34
+ * with `exit <code>` to say "nothing was there"; at the top level that exit leaves the shell
35
+ * immediately and the marker line NEVER PRINTS — so the caller sees a framed result missing its
36
+ * frame and, correctly, calls it a transport failure. 🔴 MEASURED 2026-09-22 against a live
37
+ * Debian 13 host: `stat` of a missing path came back as "the remote command did not report a
38
+ * status (ssh exit 66)" instead of "nothing is at this path". Inside `( … )` the exit leaves only
39
+ * the subshell, `$?` carries the code out, and the frame always runs.
40
+ * ⚠️ The leading `\n` matters too: a program whose last stderr line has no newline would otherwise
41
+ * glue itself to the marker and the marker would not be found.
42
+ */
43
+ export declare const frameScript: (script: string, nonce: string) => string;
44
+ export type Framed = {
45
+ readonly exitCode: number;
46
+ readonly stderr: string;
47
+ };
48
+ /**
49
+ * The remote exit code and the stderr that belongs to the command, or `undefined` when the marker
50
+ * is absent — which means the script never ran to its end: ssh failed, the connection dropped, or
51
+ * the remote shell could not parse what we sent. ⛔ The caller must treat `undefined` as an error,
52
+ * never as an answer.
53
+ */
54
+ export declare const parseFramed: (stderr: string, nonce: string) => Framed | undefined;
55
+ /**
56
+ * The fixed ssh options, in front of anything a caller adds.
57
+ * ⛔ `BatchMode=yes` — a deploy that stops to ask for a passphrase is the failure "no password
58
+ * prompts" names, and with BatchMode ssh fails at once instead.
59
+ * ⛔ NOTHING HERE WEAKENS HOST VERIFICATION. No `StrictHostKeyChecking`, no `UserKnownHostsFile`:
60
+ * the operator's own ssh config and known_hosts decide who the host is, and a changed key stays
61
+ * a refusal. A runner that turned that off would make a man-in-the-middle a deploy target.
62
+ * ★ `-T`: no pseudo-terminal, so the remote shell's stdout stays the bytes the program wrote.
63
+ */
64
+ export declare const sshArgv: (host: string, script: string, options: {
65
+ readonly connectTimeoutSec: number;
66
+ readonly sshArgs?: readonly string[];
67
+ }) => readonly string[];
68
+ //# sourceMappingURL=ssh-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssh-command.d.ts","sourceRoot":"","sources":["../../src/linux/ssh-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,oGAAoG;AACpG,eAAO,MAAM,MAAM,KAAK,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,MAGxC,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,SAAS,SAAU,SAAS,MAAM,EAAE,KAAG,MAAwC,CAAC;AAI7F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,SAAS,MAAM,KAAG,MAC6B,CAAC;AAE1F,MAAM,MAAM,MAAM,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E;;;;;GAKG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,SAAS,MAAM,KAAG,MAAM,GAAG,SAMpE,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,SACZ,MAAM,UACJ,MAAM,WACL;IAAE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,KACpF,SAAS,MAAM,EAejB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { ExecResult, HostRunner } from '../launchd/runner.ts';
2
+ export type SshRunnerOptions = {
3
+ /** The destination exactly as the operator's own ssh config names it (`Host` block or user@host). */
4
+ readonly host: string;
5
+ /** Extra ssh options, after the fixed safety set and before the destination. */
6
+ readonly sshArgs?: readonly string[];
7
+ /** Kill a connection after this long. @default 120_000 */
8
+ readonly execTimeoutMs?: number;
9
+ /** ssh's own `ConnectTimeout`. @default 10 */
10
+ readonly connectTimeoutSec?: number;
11
+ };
12
+ /** What the process on the far end did — or an Error, when we cannot say that it ran at all. */
13
+ export declare const runRemote: (options: Required<Pick<SshRunnerOptions, 'host' | 'connectTimeoutSec' | 'execTimeoutMs'>> & Pick<SshRunnerOptions, 'sshArgs'>, nonce: string, script: string, stdin?: Uint8Array) => Promise<ExecResult>;
14
+ /**
15
+ * Connect once to learn who we are, then hand back the runner.
16
+ * ⛔ THE PROBE IS THE FAIL-CLOSED GATE. `effectiveUid()` is synchronous on HostRunner, so the uid
17
+ * must be known before the first provider call; and `uname -s` refuses a host whose `stat -c`,
18
+ * `base64` and `mv -f` are not the Linux spellings this runner sends. A host that cannot answer
19
+ * both is a thrown Error at construction, not a stack that half-deploys.
20
+ */
21
+ export declare const sshRunner: (options: SshRunnerOptions) => Promise<HostRunner>;
22
+ //# sourceMappingURL=ssh-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssh-runner.d.ts","sourceRoot":"","sources":["../../src/linux/ssh-runner.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAWnE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,qGAAqG;IACrG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,0DAA0D;IAC1D,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,8CAA8C;IAC9C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACrC,CAAC;AAmCF,gGAAgG;AAChG,eAAO,MAAM,SAAS,YACX,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,mBAAmB,GAAG,eAAe,CAAC,CAAC,GACvF,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,SAC5B,MAAM,UACL,MAAM,UACN,UAAU,KACjB,OAAO,CAAC,UAAU,CAiBpB,CAAC;AAUF;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,YAAmB,gBAAgB,KAAG,OAAO,CAAC,UAAU,CA6D7E,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { FileStat, WriteOptions } from '../launchd/runner.ts';
2
+ export declare const statScript: (path: string) => string;
3
+ /** ★ base64 on the wire: stdout then carries no byte that a shell, a pty or a locale can alter. */
4
+ export declare const readScript: (path: string) => string;
5
+ /** ⛔ `rm -f` is idempotent for an absent path and still FAILS for a directory, which is what keeps
6
+ * HostRunner.removeFile from quietly removing something that is not a file. */
7
+ export declare const removeScript: (path: string) => string;
8
+ export declare const execScript: (argv: readonly string[]) => string;
9
+ /**
10
+ * Write bytes (fed on stdin) so `path` holds the old file or the new one and never a torn mix.
11
+ *
12
+ * ⛔ NOT `install`. GNU coreutils `install` opens the destination and writes THROUGH it — unlike
13
+ * macOS's, which stages and renames — so a deploy interrupted mid-write would leave a truncated
14
+ * config where a whole one used to be. Staging beside the target and `mv` (rename(2), same
15
+ * directory so never EXDEV) is the only atomic spelling available over a shell.
16
+ * ⛔ `set -C` and `umask 077`: the staged file is created O_EXCL, so a symlink or a file planted at
17
+ * the temp name is a refusal rather than a write through it, and it is unreadable by anyone else
18
+ * in the moment before its mode is set.
19
+ * ⚠️ chown BEFORE chmod: chown by root clears setuid/setgid, so the other order silently drops a
20
+ * declared 4755 — the same ordering localRunner keeps for the same reason.
21
+ * ⚠️ Each step removes the staged file before it fails, so a failed write leaves no litter beside
22
+ * a file someone else owns.
23
+ */
24
+ export declare const writeScript: (path: string, temp: string, options: WriteOptions) => string;
25
+ /** `stat -c '%f %a %u %g %s'` output → a FileStat, or `undefined` when it is not that shape. */
26
+ export declare const parseStat: (stdout: string) => FileStat | undefined;
27
+ //# sourceMappingURL=ssh-scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssh-scripts.d.ts","sourceRoot":"","sources":["../../src/linux/ssh-scripts.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMnE,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAGzC,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAGzC,CAAC;AAEF;kFACkF;AAClF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,MAAwC,CAAC;AAErF,eAAO,MAAM,UAAU,SAAU,SAAS,MAAM,EAAE,KAAG,MAAyB,CAAC;AAE/E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,SAAU,MAAM,QAAQ,MAAM,WAAW,YAAY,KAAG,MAyB/E,CAAC;AASF,gGAAgG;AAChG,eAAO,MAAM,SAAS,WAAY,MAAM,KAAG,QAAQ,GAAG,SAgBrD,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * The `systemctl` subcommands the systemd family uses, over a HostRunner, plus the parser for the
3
+ * one that returns data.
4
+ *
5
+ * ★ MEASURED 2026-09-22 on Debian 13, systemd 257 (257.13-1~deb13u1), read-only — nothing was
6
+ * enabled, started or reloaded to write this:
7
+ *
8
+ * - `systemctl show -p <list> <unit>` EXITS 0 FOR A UNIT THAT DOES NOT EXIST, and answers with
9
+ * the properties it would have had:
10
+ * Id=hf-nonexistent-xyz.service LoadState=not-found
11
+ * ActiveState=inactive SubState=dead
12
+ * FragmentPath= UnitFileState=
13
+ * ⛔ SO THE EXIT CODE IS NOT THE ANSWER — `LoadState` is. A provider that read exit 0 as "the
14
+ * unit is there" would adopt a unit that does not exist and then never write its file.
15
+ * - The properties come back in systemd's own order, not the order asked for, so the output is a
16
+ * map and never positional.
17
+ * - `systemctl is-enabled <unknown>` exits **4** and prints `not-found`; `is-active <unknown>`
18
+ * exits **4** and prints `inactive`. Both are answers, not errors.
19
+ * - `UnitFileState=static` is exactly systemd's name for a unit file with no `[Install]` section
20
+ * (measured: the journal daemon is `static`, the ssh daemon is `enabled`).
21
+ * - `/etc/systemd/system` is `root:root 0755` — the admin drop-in directory, ahead of the
22
+ * vendor's `/usr/lib/systemd/system` in systemd's own search order.
23
+ * ⚠️ REASONED, NOT MEASURED: the write subcommands. `daemon-reload`, `enable`, `disable`, `start`,
24
+ * `stop` and `restart` were never run for this file, because running them would change a live
25
+ * host. Each is therefore checked the same way: exit 0 or an Error carrying systemd's stderr, and
26
+ * the state is read back with `show` afterwards rather than assumed.
27
+ * ⛔ NEVER PUT `show` STDOUT WITH NO PROPERTY FILTER IN AN ERROR: the unfiltered property set
28
+ * carries the unit's whole environment block.
29
+ */
30
+ import type { HostRunner } from '../launchd/runner.ts';
31
+ export declare const SYSTEMCTL = "systemctl";
32
+ /** The properties every read asks for. ⛔ Never `Environment` — see the header. */
33
+ export declare const SHOW_PROPERTIES: readonly ['Id', 'LoadState', 'ActiveState', 'SubState', 'UnitFileState', 'FragmentPath', 'NeedDaemonReload'];
34
+ export declare class SystemctlError extends Error {
35
+ constructor(command: string, exitCode: number, stderr: string);
36
+ }
37
+ export type UnitStatus = {
38
+ /** `loaded`, `not-found`, `masked`, `error`, `bad-setting`. ⛔ The authority on existence. */
39
+ readonly loadState: string;
40
+ /** systemd knows this unit: it has a unit file or is loaded. */
41
+ readonly known: boolean;
42
+ readonly activeState: string;
43
+ readonly subState?: string;
44
+ /** `enabled`, `disabled`, `static`, `masked`, … Empty for a unit with no unit file. */
45
+ readonly unitFileState?: string;
46
+ /** The unit file systemd would read. Empty when there is none. */
47
+ readonly fragmentPath?: string;
48
+ /** systemd's own view that its on-disk unit files are newer than what it has loaded. */
49
+ readonly needDaemonReload: boolean;
50
+ };
51
+ /** `key=value` lines into a map. ⚠️ First wins: systemd never repeats a key, a truncated read might. */
52
+ export declare const parseShow: (stdout: string) => Map<string, string>;
53
+ export declare const statusOf: (stdout: string) => UnitStatus;
54
+ export declare const showUnit: (runner: HostRunner, name: string) => Promise<UnitStatus>;
55
+ /** ⛔ After every unit-file write or removal, and before enable/start reads it. */
56
+ export declare const daemonReload: (runner: HostRunner) => Promise<void>;
57
+ export declare const enableUnit: (runner: HostRunner, name: string) => Promise<void>;
58
+ export declare const disableUnit: (runner: HostRunner, name: string) => Promise<void>;
59
+ export declare const startUnit: (runner: HostRunner, name: string) => Promise<void>;
60
+ export declare const stopUnit: (runner: HostRunner, name: string) => Promise<void>;
61
+ /**
62
+ * ⛔ `restart`, NOT `reload-or-restart`. The reloading form asks the unit to re-read its config in
63
+ * place when it declares `ExecReload=`, which means "did the change take effect?" has two
64
+ * different answers depending on the unit — and a deploy cannot report a half-applied change.
65
+ */
66
+ export declare const restartUnit: (runner: HostRunner, name: string) => Promise<void>;
67
+ //# sourceMappingURL=systemctl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systemctl.d.ts","sourceRoot":"","sources":["../../src/linux/systemctl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,kFAAkF;AAClF,eAAO,MAAM,eAAe,YAC1B,IAAI,EACJ,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,EACf,cAAc,EACd,kBAAkB,CACV,CAAC;AAEX,qBAAa,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAG5D;CACF;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,6FAA6F;IAC7F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,kEAAkE;IAClE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,wFAAwF;IACxF,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,SAAS,WAAY,MAAM,KAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAS5D,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAY,MAAM,KAAG,UAiBzC,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAkB,UAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,UAAU,CAgBnF,CAAC;AAUF,kFAAkF;AAClF,eAAO,MAAM,YAAY,WAAY,UAAU,KAAG,OAAO,CAAC,IAAI,CAAmC,CAAC;AAElG,eAAO,MAAM,UAAU,WAAY,UAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CACrC,CAAC;AAEtC,eAAO,MAAM,WAAW,WAAY,UAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CACrC,CAAC;AAEvC,eAAO,MAAM,SAAS,WAAY,UAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CACrC,CAAC;AAErC,eAAO,MAAM,QAAQ,WAAY,UAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CACrC,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,WAAW,WAAY,UAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CACrC,CAAC"}
@@ -0,0 +1,78 @@
1
+ export type UnitSection = {
2
+ /** `Unit`, `Service`, `Timer`, `Install`, … — verbatim, including its capitalisation. */
3
+ readonly name: string;
4
+ /**
5
+ * The section's lines, in order. A repeated key is allowed and meaningful in systemd
6
+ * (`ExecStartPre=` twice runs twice), so this is a list of pairs, never an object.
7
+ */
8
+ readonly lines: readonly (readonly [key: string, value: string])[];
9
+ };
10
+ export type SystemdUnitProps = {
11
+ /** Unit name WITH its suffix, e.g. `thing.service`. The unit file's name on disk. */
12
+ name: string;
13
+ /** The whole unit file, verbatim. Mutually exclusive with `sections`. */
14
+ content?: string;
15
+ /** The unit file as sections, rendered in the order given. Mutually exclusive with `content`. */
16
+ sections?: readonly UnitSection[];
17
+ /** Directory the unit file goes in. @default '/etc/systemd/system' */
18
+ directory?: string;
19
+ /** `systemctl enable` / `disable`. @default true */
20
+ enabled?: boolean;
21
+ /** `systemctl start` / `stop`. @default true */
22
+ started?: boolean;
23
+ /**
24
+ * Digests of things this unit READS that live outside its unit file — a rendered config file's
25
+ * `sha256` attribute, most often. A change here restarts the unit; nothing else does.
26
+ * ⚠️ A hand edit of that file is NOT noticed: the digest in state still matches what the stack
27
+ * declared, so the unit reads converged. That limit is the same one the Mac side records.
28
+ */
29
+ restartOn?: readonly string[];
30
+ };
31
+ export type SystemdUnitAttributes = {
32
+ name: string;
33
+ unitPath: string;
34
+ /** SHA-256 of the unit file this resource wrote. */
35
+ unitSha256: string;
36
+ /** SHA-256 of `restartOn`, so a config change is a diff. */
37
+ configSha256: string;
38
+ loadState: string;
39
+ activeState: string;
40
+ unitFileState?: string;
41
+ enabled: boolean;
42
+ active: boolean;
43
+ };
44
+ /** ★ systemd's admin drop-in directory, ahead of the vendor's in its search order (measured). */
45
+ export declare const DEFAULT_UNIT_DIRECTORY = "/etc/systemd/system";
46
+ /**
47
+ * Directories systemd looks in for a unit file it can enable.
48
+ * ★ MEASURED 2026-09-22 with `systemd-analyze unit-paths` on Debian 13 / systemd 257, minus the
49
+ * per-user and generator directories, which are not places a stack writes. `/lib/systemd/system`
50
+ * is the same directory before the /usr merge, where the measured host has only the merged name.
51
+ * ⛔ WHY IT IS ENFORCED. `systemctl enable <name>` looks the unit up BY NAME; a unit file outside
52
+ * these directories is invisible to that lookup, so an enabled unit declared into, say, `/opt`
53
+ * writes its file, reloads, and then fails at `enable` with the file already on disk.
54
+ */
55
+ export declare const UNIT_SEARCH_DIRECTORIES: readonly ['/etc/systemd/system', '/run/systemd/system', '/usr/local/lib/systemd/system', '/usr/lib/systemd/system', '/lib/systemd/system'];
56
+ /** ⛔ The unit file's mode and owner are systemd's rule, not a choice: readable, never writable. */
57
+ export declare const UNIT_WRITE: {
58
+ readonly gid: 0;
59
+ readonly mode: 420;
60
+ readonly uid: 0;
61
+ };
62
+ export declare const digestOf: (text: string) => string;
63
+ /** The digests of everything outside the unit file that should restart it, as one value. */
64
+ export declare const configDigest: (restartOn: readonly string[] | undefined) => string;
65
+ /** Sections → an INI unit file. ★ Keys and values pass through untouched; see the file header. */
66
+ export declare const renderUnit: (sections: readonly UnitSection[]) => string;
67
+ export declare const unitText: (props: SystemdUnitProps) => string;
68
+ export declare const unitPathFor: (props: SystemdUnitProps) => string;
69
+ /**
70
+ * Every refusal at once, so one plan shows the whole list.
71
+ * ⛔ THE TWO STRUCTURAL RULES, both proven by systemd's own output rather than assumed:
72
+ * - `enabled: true` needs an `[Install]` section. `systemctl enable` has nothing to link without
73
+ * one, and systemd's name for a unit file that has none is `UnitFileState=static` — measured on
74
+ * a live host, where the journal daemon reads `static` and the ssh daemon reads `enabled`.
75
+ * - A `.timer` needs a `[Timer]` section, and a timer's `[Install]` is what arms it at boot.
76
+ */
77
+ export declare const unitProblems: (props: SystemdUnitProps, expect?: string) => string[];
78
+ //# sourceMappingURL=unit-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-form.d.ts","sourceRoot":"","sources":["../../src/linux/unit-form.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,WAAW,GAAG;IACxB,yFAAyF;IACzF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;CACpE,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IAClC,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,YAClC,qBAAqB,EACrB,qBAAqB,EACrB,+BAA+B,EAC/B,yBAAyB,EACzB,qBAAqB,CACb,CAAC;AAEX,mGAAmG;AACnG,eAAO,MAAM,UAAU;aAAK,GAAG,EAAE,CAAC;aAAE,IAAI,EAAE,GAAK;aAAE,GAAG,EAAE,CAAC;CAAW,CAAC;AAEnE,eAAO,MAAM,QAAQ,SAAU,MAAM,KAAG,MAAmD,CAAC;AAE5F,4FAA4F;AAC5F,eAAO,MAAM,YAAY,cAAe,SAAS,MAAM,EAAE,GAAG,SAAS,KAAG,MAChC,CAAC;AAEzC,kGAAkG;AAClG,eAAO,MAAM,UAAU,aAAc,SAAS,WAAW,EAAE,KAAG,MAKzC,CAAC;AAEtB,eAAO,MAAM,QAAQ,UAAW,gBAAgB,KAAG,MACA,CAAC;AAEpD,eAAO,MAAM,WAAW,UAAW,gBAAgB,KAAG,MACQ,CAAC;AAoB/D;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,UAAW,gBAAgB,WAAW,MAAM,KAAG,MAAM,EAmC7E,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { Diff } from 'alchemy/Diff';
2
+ import type { Input } from 'alchemy/Input';
3
+ import * as Effect from 'effect/Effect';
4
+ import type { HostRunner } from '../launchd/runner.ts';
5
+ import type { SystemdUnitAttributes, SystemdUnitProps } from './unit-form.ts';
6
+ export declare const readHandler: (runner: HostRunner, olds: SystemdUnitProps, output: SystemdUnitAttributes | undefined) => Effect.Effect<SystemdUnitAttributes | undefined, Error>;
7
+ export declare const diffHandler: (runner: HostRunner, instanceId: string, news: Input<SystemdUnitProps>, output: SystemdUnitAttributes | undefined, expect?: string) => Effect.Effect<Diff | undefined, Error>;
8
+ export declare const reconcileHandler: (runner: HostRunner, args: {
9
+ fqn: string;
10
+ instanceId: string;
11
+ news: SystemdUnitProps;
12
+ output: SystemdUnitAttributes | undefined;
13
+ }, expect?: string) => Effect.Effect<SystemdUnitAttributes, Error>;
14
+ export declare const deleteHandler: (runner: HostRunner, output: SystemdUnitAttributes) => Effect.Effect<void, Error>;
15
+ //# sourceMappingURL=unit-handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-handlers.d.ts","sourceRoot":"","sources":["../../src/linux/unit-handlers.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAG9E,eAAO,MAAM,WAAW,WACd,UAAU,QACZ,gBAAgB,UACd,qBAAqB,GAAG,SAAS,KACxC,MAAM,CAAC,MAAM,CAAC,qBAAqB,GAAG,SAAS,EAAE,KAAK,CAKrD,CAAC;AAEL,eAAO,MAAM,WAAW,WACd,UAAU,cACN,MAAM,QACZ,KAAK,CAAC,gBAAgB,CAAC,UACrB,qBAAqB,GAAG,SAAS,WAChC,MAAM,KACd,MAAM,CAAC,MAAM,CAAC,IAAI,GAAG,SAAS,EAAE,KAAK,CAgBvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,WACnB,UAAU,QACZ;IACJ,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC3C,WACQ,MAAM,KACd,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAG1C,CAAC;AAEJ,eAAO,MAAM,aAAa,WAChB,UAAU,UACV,qBAAqB,KAC5B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAA2C,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Systemd.Unit's read / diff / reconcile / delete as plain async functions over a HostRunner, so
3
+ * the whole lifecycle runs against a fake host with no real systemd.
4
+ *
5
+ * ⛔ WHAT A DEPLOY DOES NOT DO — the rule this family was built around. It NEVER mass-restarts.
6
+ * A unit is restarted only when THIS resource's unit file changed, or when a digest the
7
+ * declaration itself listed in `restartOn` changed. A unit that is already running the content
8
+ * we declare is left strictly alone: no restart, no reload, not even a `start`. An estate rebuild
9
+ * must be able to reach a host that holds a vault, a UPS handler or a clock without bouncing
10
+ * them, and "the deploy ran" must never be a reason anything went down.
11
+ * ★ THE ORDER IS WRITE, RELOAD, ENABLE, THEN START OR RESTART. systemd reads the unit file at
12
+ * `daemon-reload`, so writing it while the old unit runs changes nothing yet, and a write that
13
+ * fails leaves the old unit running rather than leaving nothing running.
14
+ * ⚠️ A FAILED START LEAVES THE UNIT DOWN. On an update the new unit file stays and state keeps the
15
+ * previous digest, so the next deploy retries. On a CREATE the file this deploy wrote is removed
16
+ * and systemd reloaded again: left behind, the next plan's recovery read finds a unit with no
17
+ * state, reports it `Unowned`, and every later deploy demands `--adopt` for our own file.
18
+ * ⛔ A MASKED UNIT IS SOMEONE'S DECISION, NOT DRIFT. `systemctl mask` survives reboots and makes
19
+ * start fail; unmasking here would silently overrule whoever masked it.
20
+ */
21
+ import type { Diff } from 'alchemy/Diff';
22
+ import type { HostRunner } from '../launchd/runner.ts';
23
+ import { type SystemdUnitAttributes, type SystemdUnitProps } from './unit-form.ts';
24
+ /** What is on the host now: the unit file's digest and systemd's view. `undefined` when neither. */
25
+ export declare const readUnit: (runner: HostRunner, props: SystemdUnitProps) => Promise<SystemdUnitAttributes | undefined>;
26
+ export declare const diffUnit: (runner: HostRunner, news: SystemdUnitProps, output: SystemdUnitAttributes, expect?: string) => Promise<Diff>;
27
+ /**
28
+ * `adopt` is whether adoption is on AND this apply is a create or an unfinished generation of our
29
+ * own (ownership/adopt.ts): it lets such a generation take over a unit already on the host.
30
+ * ★ AN ADOPTED UNIT THAT ALREADY MATCHES IS NOT RESTARTED. That is the whole point of adopting one:
31
+ * the estate's live services come under declaration without a single bounce.
32
+ */
33
+ export declare const reconcileUnit: (runner: HostRunner, props: SystemdUnitProps, output: SystemdUnitAttributes | undefined, adopt?: boolean, expect?: string) => Promise<SystemdUnitAttributes>;
34
+ /**
35
+ * Stop, disable, remove the unit file, reload. Idempotent.
36
+ * ⛔ DELETING THE DECLARATION STOPS THE SERVICE. That is what removing it from the stack means, and
37
+ * it is why a unit that must outlive its declaration is adopted rather than deleted.
38
+ */
39
+ export declare const deleteUnit: (runner: HostRunner, output: SystemdUnitAttributes) => Promise<void>;
40
+ //# sourceMappingURL=unit-lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-lifecycle.d.ts","sourceRoot":"","sources":["../../src/linux/unit-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAMtB,MAAM,gBAAgB,CAAC;AAOxB,oGAAoG;AACpG,eAAO,MAAM,QAAQ,WACX,UAAU,SACX,gBAAgB,KACtB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAK3C,CAAC;AAEF,eAAO,MAAM,QAAQ,WACX,UAAU,QACZ,gBAAgB,UACd,qBAAqB,WACpB,MAAM,KACd,OAAO,CAAC,IAAI,CA4Bd,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,WAChB,UAAU,SACX,gBAAgB,UACf,qBAAqB,GAAG,SAAS,4BAEhC,MAAM,KACd,OAAO,CAAC,qBAAqB,CAqD/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,WACb,UAAU,UACV,qBAAqB,KAC5B,OAAO,CAAC,IAAI,CAed,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Everything Systemd.Unit checks before it touches the host — split from unit-lifecycle.ts so that
3
+ * a reconcile and a plan-time REPLACE run the very same checks.
4
+ *
5
+ * ★ WHY A REPLACE IS CHECKED AT PLAN TIME. A name or directory change is a delete-first replace,
6
+ * and Alchemy runs `delete` on the old unit BEFORE `reconcile` on the new one (Apply.ts,
7
+ * deleteOldGenerations under `node.deleteFirst`). A refusal that fired only in reconcile would
8
+ * therefore arrive after the old unit was already stopped and its file removed: nothing running,
9
+ * and a plan that had promised a clean swap.
10
+ * ★ EVERY CHECK HERE IS READ-ONLY. systemd has no `print-disabled` equivalent in this family —
11
+ * masking is `systemctl show`'s LoadState / UnitFileState, which `showUnit` already returns.
12
+ * Validation, that show, a file read and `HostRunner.checkWrite` write nothing. `systemctl
13
+ * enable` itself stays an apply step; the ways it is known to fail (no `[Install]`, a directory
14
+ * systemd does not search) are `unitProblems`, checked here before the plan may promise a swap.
15
+ */
16
+ import { type HostRunner } from '../launchd/runner.ts';
17
+ import { type UnitStatus } from './systemctl.ts';
18
+ import { type SystemdUnitAttributes, type SystemdUnitProps } from './unit-form.ts';
19
+ /** Throw every refusal at once, so one plan shows the whole list. */
20
+ export declare const assertValid: (props: SystemdUnitProps, expect?: string) => void;
21
+ /** ⛔ Writing a unit file and driving systemd are root's, so refuse up front rather than mid-apply. */
22
+ export declare const assertMayWrite: (runner: HostRunner, name: string) => void;
23
+ /**
24
+ * ⛔ A MASKED UNIT IS SOMEONE'S DECISION, NOT DRIFT. `systemctl mask` survives reboots and makes
25
+ * start fail; unmasking here would silently overrule whoever masked it.
26
+ */
27
+ export declare const assertUsable: (props: SystemdUnitProps, status: UnitStatus) => void;
28
+ /**
29
+ * ⛔ A UNIT THIS RESOURCE DOES NOT OWN IS NEVER OVERWRITTEN. Alchemy's adoption probe guards a
30
+ * create, but NOT the new name of a replace — the engine reads nothing there — so a rename onto
31
+ * a unit file someone else already has would stop the old unit and write ours over theirs.
32
+ * ★ A file byte-identical to our render is exempt: it is this declaration's own leftover (a deploy
33
+ * that died between write and reload), and rewriting it changes nothing.
34
+ */
35
+ export declare const assertUnclaimed: (runner: HostRunner, props: SystemdUnitProps) => Promise<void>;
36
+ /**
37
+ * A rename, checked at plan time: the new identity must be valid, writable, not masked and free,
38
+ * and the old one deletable — before the plan may promise a delete-first replace.
39
+ */
40
+ export declare const assertReplaceable: (runner: HostRunner, next: SystemdUnitProps, old: SystemdUnitAttributes, expect?: string) => Promise<void>;
41
+ //# sourceMappingURL=unit-preflight.d.ts.map