home-hosted 0.13.0 → 0.20.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 (485) hide show
  1. package/README.md +117 -322
  2. package/bin/home-hosted.mjs +41 -0
  3. package/dist/chunks/account-DiLrSyww.js +359 -0
  4. package/dist/chunks/account-DiLrSyww.js.map +1 -0
  5. package/dist/chunks/add-DEIYVkNK.js +183 -0
  6. package/dist/chunks/add-DEIYVkNK.js.map +1 -0
  7. package/dist/chunks/{archive-DP-XQR8X.js → archive-DFi3qK1c.js} +25 -73
  8. package/dist/chunks/archive-DFi3qK1c.js.map +1 -0
  9. package/dist/chunks/{atomic-C1PfJpE7.js → atomic-SZUwDtGD.js} +3 -6
  10. package/dist/chunks/atomic-SZUwDtGD.js.map +1 -0
  11. package/dist/chunks/{backup-CZcVca2a.js → backup-DnyxIzw0.js} +110 -190
  12. package/dist/chunks/backup-DnyxIzw0.js.map +1 -0
  13. package/dist/chunks/backups-BrrN6cwW.js +2203 -0
  14. package/dist/chunks/backups-BrrN6cwW.js.map +1 -0
  15. package/dist/chunks/bind-DIxrnUst.js +43 -0
  16. package/dist/chunks/bind-DIxrnUst.js.map +1 -0
  17. package/dist/chunks/config-text-DxMOQQnk.js +34 -0
  18. package/dist/chunks/config-text-DxMOQQnk.js.map +1 -0
  19. package/dist/chunks/{contracts-CMBD1TF9.js → contracts-CxZ7u1L3.js} +1239 -1454
  20. package/dist/chunks/contracts-CxZ7u1L3.js.map +1 -0
  21. package/dist/chunks/daemon-BAAYUYQC.js +211 -0
  22. package/dist/chunks/daemon-BAAYUYQC.js.map +1 -0
  23. package/dist/chunks/daemon-log-Ccu-69vB.js +179 -0
  24. package/dist/chunks/daemon-log-Ccu-69vB.js.map +1 -0
  25. package/dist/chunks/deploy-CggSOEkq.js +144 -0
  26. package/dist/chunks/deploy-CggSOEkq.js.map +1 -0
  27. package/dist/chunks/{docker-Cy9Lyvda.js → docker--Un0uLfF.js} +32 -68
  28. package/dist/chunks/docker--Un0uLfF.js.map +1 -0
  29. package/dist/chunks/{down-pKbGCW9d.js → down-CpIN7LEQ.js} +34 -94
  30. package/dist/chunks/down-CpIN7LEQ.js.map +1 -0
  31. package/dist/chunks/exposure-CDJNvOCK.js +229 -0
  32. package/dist/chunks/exposure-CDJNvOCK.js.map +1 -0
  33. package/dist/chunks/import-Bd4VZH0f.js +205 -0
  34. package/dist/chunks/import-Bd4VZH0f.js.map +1 -0
  35. package/dist/chunks/import-plan--fDS_l5r.js +147 -0
  36. package/dist/chunks/import-plan--fDS_l5r.js.map +1 -0
  37. package/dist/chunks/import-write-BTfbeV26.js +42 -0
  38. package/dist/chunks/import-write-BTfbeV26.js.map +1 -0
  39. package/dist/chunks/{init-BZ7hK9Vf.js → init-Bv3oH65x.js} +14 -50
  40. package/dist/chunks/init-Bv3oH65x.js.map +1 -0
  41. package/dist/chunks/job-CYOdN6Ub.js +341 -0
  42. package/dist/chunks/job-CYOdN6Ub.js.map +1 -0
  43. package/dist/chunks/jobs-BX4ahcfh.js +489 -0
  44. package/dist/chunks/jobs-BX4ahcfh.js.map +1 -0
  45. package/dist/chunks/last-stop-DD3lHwo_.js +42 -0
  46. package/dist/chunks/last-stop-DD3lHwo_.js.map +1 -0
  47. package/dist/chunks/layout-D0ysDNav.js +18 -0
  48. package/dist/chunks/layout-D0ysDNav.js.map +1 -0
  49. package/dist/chunks/lazy-kfcBNeqj.js +48 -0
  50. package/dist/chunks/lazy-kfcBNeqj.js.map +1 -0
  51. package/dist/chunks/log-buffer-B7jmn7ts.js +110 -0
  52. package/dist/chunks/log-buffer-B7jmn7ts.js.map +1 -0
  53. package/dist/chunks/log-files-CZL2UhuE.js +488 -0
  54. package/dist/chunks/log-files-CZL2UhuE.js.map +1 -0
  55. package/dist/chunks/{logger-B5U4GD3j.js → logger-BnrKTBHQ.js} +2 -6
  56. package/dist/chunks/logger-BnrKTBHQ.js.map +1 -0
  57. package/dist/chunks/{logs---TI_bxM.js → logs-DxKI6OW2.js} +23 -73
  58. package/dist/chunks/logs-DxKI6OW2.js.map +1 -0
  59. package/dist/chunks/ls-BseUHy_m.js +128 -0
  60. package/dist/chunks/ls-BseUHy_m.js.map +1 -0
  61. package/dist/chunks/migrate-D4w_dXDm.js +268 -0
  62. package/dist/chunks/migrate-D4w_dXDm.js.map +1 -0
  63. package/dist/chunks/{nanny-B-Eu0sFW.js → nanny-BWh7nuvv.js} +21 -14
  64. package/dist/chunks/nanny-BWh7nuvv.js.map +1 -0
  65. package/dist/chunks/{nanny-ChMtq1Zl.js → nanny-BjF2-1pv.js} +3 -3
  66. package/dist/chunks/{nanny-ChMtq1Zl.js.map → nanny-BjF2-1pv.js.map} +1 -1
  67. package/dist/chunks/nanny-DGTXVq5d.js +806 -0
  68. package/dist/chunks/nanny-DGTXVq5d.js.map +1 -0
  69. package/dist/chunks/{nanny-sweep-DErnlPY1.js → nanny-sweep-hjmZ_p7S.js} +14 -24
  70. package/dist/chunks/nanny-sweep-hjmZ_p7S.js.map +1 -0
  71. package/dist/chunks/{nearest-6KgQEDUe.js → nearest-DOx4jySJ.js} +2 -10
  72. package/dist/chunks/nearest-DOx4jySJ.js.map +1 -0
  73. package/dist/chunks/{parse-DhmG26fI.js → parse-DVMPLUDe.js} +47 -72
  74. package/dist/chunks/parse-DVMPLUDe.js.map +1 -0
  75. package/dist/chunks/password-policy-Clq6PGE-.js +9 -0
  76. package/dist/chunks/password-policy-Clq6PGE-.js.map +1 -0
  77. package/dist/chunks/{paths-CGlGDrOU.js → paths-C34-TJLh.js} +32 -56
  78. package/dist/chunks/paths-C34-TJLh.js.map +1 -0
  79. package/dist/chunks/{port-B8WBTRMk.js → port-CnsrxKNR.js} +27 -71
  80. package/dist/chunks/port-CnsrxKNR.js.map +1 -0
  81. package/dist/chunks/process-CboOFPU_.js +192 -0
  82. package/dist/chunks/process-CboOFPU_.js.map +1 -0
  83. package/dist/chunks/{restart-Des4DrAN.js → restart-C0J8dZ2L.js} +11 -29
  84. package/dist/chunks/restart-C0J8dZ2L.js.map +1 -0
  85. package/dist/chunks/run-deploy-DoNDvwT4.js +91 -0
  86. package/dist/chunks/run-deploy-DoNDvwT4.js.map +1 -0
  87. package/dist/chunks/{schema-B240VXcV.js → schema-CZ6f-PHD.js} +7 -20
  88. package/dist/chunks/schema-CZ6f-PHD.js.map +1 -0
  89. package/dist/chunks/secret-MY397r90.js +219 -0
  90. package/dist/chunks/secret-MY397r90.js.map +1 -0
  91. package/dist/chunks/secrets-CG5N4lwY.js +1061 -0
  92. package/dist/chunks/secrets-CG5N4lwY.js.map +1 -0
  93. package/dist/chunks/server-Dm_dXfTW.js +255 -0
  94. package/dist/chunks/server-Dm_dXfTW.js.map +1 -0
  95. package/dist/chunks/server-attention-UQwYXqKe.js +10 -0
  96. package/dist/chunks/server-attention-UQwYXqKe.js.map +1 -0
  97. package/dist/chunks/server-create-D7nvhgBd.js +96 -0
  98. package/dist/chunks/server-create-D7nvhgBd.js.map +1 -0
  99. package/dist/chunks/server-ids-BEQD2rFz.js +23 -0
  100. package/dist/chunks/server-ids-BEQD2rFz.js.map +1 -0
  101. package/dist/chunks/server-vars-DMYmHutL.js +27 -0
  102. package/dist/chunks/server-vars-DMYmHutL.js.map +1 -0
  103. package/dist/chunks/service-C8l-ewNA.js +585 -0
  104. package/dist/chunks/service-C8l-ewNA.js.map +1 -0
  105. package/dist/chunks/{settings-xu-XTfWg.js → settings-CtYDs5PX.js} +62 -78
  106. package/dist/chunks/settings-CtYDs5PX.js.map +1 -0
  107. package/dist/chunks/{setup-temp-CAN4_bA-.js → setup-temp-TAtDmMMU.js} +43 -37
  108. package/dist/chunks/setup-temp-TAtDmMMU.js.map +1 -0
  109. package/dist/chunks/shape-CDGeYl_J.js +9 -0
  110. package/dist/chunks/shape-CDGeYl_J.js.map +1 -0
  111. package/dist/chunks/{src-BtWMFmzZ.js → src-BnzkVy_M.js} +12548 -10576
  112. package/dist/chunks/src-BnzkVy_M.js.map +1 -0
  113. package/dist/chunks/{status-DT1EsA-B.js → status-efbbfYZQ.js} +53 -26
  114. package/dist/chunks/status-efbbfYZQ.js.map +1 -0
  115. package/dist/chunks/store-Bs_Lljjm.js +2082 -0
  116. package/dist/chunks/store-Bs_Lljjm.js.map +1 -0
  117. package/dist/chunks/template-xan58bJh.js +28 -0
  118. package/dist/chunks/template-xan58bJh.js.map +1 -0
  119. package/dist/chunks/token-DDeWfZA4.js +142 -0
  120. package/dist/chunks/token-DDeWfZA4.js.map +1 -0
  121. package/dist/chunks/{ui-D562aqw5.js → ui-BcIAtyxE.js} +68 -79
  122. package/dist/chunks/ui-BcIAtyxE.js.map +1 -0
  123. package/dist/chunks/{ui-dir-CsU3uLNV.js → ui-dir-ClCzVRc3.js} +3 -7
  124. package/dist/chunks/ui-dir-ClCzVRc3.js.map +1 -0
  125. package/dist/chunks/ui-format-CDvvqOoi.js +53 -0
  126. package/dist/chunks/ui-format-CDvvqOoi.js.map +1 -0
  127. package/dist/chunks/{ui-release-DKzVvlLd.js → ui-release-XbJ85pYI.js} +36 -38
  128. package/dist/chunks/ui-release-XbJ85pYI.js.map +1 -0
  129. package/dist/chunks/{ui-revert-EkBBwRTt.js → ui-revert-Dgawq7ze.js} +4 -4
  130. package/dist/chunks/ui-revert-Dgawq7ze.js.map +1 -0
  131. package/dist/chunks/{ui-switch-BnZTdMDd.js → ui-switch-CfQMbZ0g.js} +31 -38
  132. package/dist/chunks/ui-switch-CfQMbZ0g.js.map +1 -0
  133. package/dist/chunks/{ui-update-_xryLYxw.js → ui-update-B3PPivUm.js} +30 -48
  134. package/dist/chunks/ui-update-B3PPivUm.js.map +1 -0
  135. package/dist/chunks/ui-update-CAiH2tFb.js +109 -0
  136. package/dist/chunks/ui-update-CAiH2tFb.js.map +1 -0
  137. package/dist/chunks/{up-Pdz-l6IH.js → up-BQSnYxYd.js} +47 -53
  138. package/dist/chunks/up-BQSnYxYd.js.map +1 -0
  139. package/dist/chunks/{usage-DFrCVXpT.js → usage-KG8TeOio.js} +7 -20
  140. package/dist/chunks/usage-KG8TeOio.js.map +1 -0
  141. package/dist/chunks/{workspaces-DYcfvKV_.js → workspaces-D9akpzU8.js} +80 -68
  142. package/dist/chunks/workspaces-D9akpzU8.js.map +1 -0
  143. package/dist/chunks/{wsl-temperature-BiCI4iK6.js → wsl-temperature-D-_d4Yk1.js} +47 -42
  144. package/dist/chunks/wsl-temperature-D-_d4Yk1.js.map +1 -0
  145. package/dist/cli.js +306 -238
  146. package/dist/cli.js.map +1 -1
  147. package/dist/client.js +76 -29
  148. package/dist/client.js.map +1 -1
  149. package/dist/types/api/acme.d.ts +3 -7
  150. package/dist/types/api/auth/$.routes.d.ts +107 -16
  151. package/dist/types/api/backups.d.ts +5 -5
  152. package/dist/types/api/control.d.ts +747 -38
  153. package/dist/types/api/ddns.d.ts +13 -18
  154. package/dist/types/api/events.d.ts +9 -3
  155. package/dist/types/api/health.d.ts +2 -4
  156. package/dist/types/api/jobs.d.ts +438 -0
  157. package/dist/types/api/logs.d.ts +20 -0
  158. package/dist/types/api/metrics.d.ts +2 -5
  159. package/dist/types/api/notifications.d.ts +3 -6
  160. package/dist/types/api/proxy.d.ts +63 -23
  161. package/dist/types/api/server-ops.d.ts +17 -0
  162. package/dist/types/api/servers/$.routes.d.ts +418 -186
  163. package/dist/types/api/session-required.d.ts +16 -0
  164. package/dist/types/api/settings.d.ts +7 -7
  165. package/dist/types/api/state.d.ts +100 -10
  166. package/dist/types/api/static.d.ts +2 -2
  167. package/dist/types/api/tls.d.ts +2 -5
  168. package/dist/types/api/workspaces/$.routes.d.ts +186 -12
  169. package/dist/types/api/wsl-temperature.d.ts +4 -10
  170. package/dist/types/app.d.ts +4511 -2778
  171. package/dist/types/cli/account.d.ts +23 -0
  172. package/dist/types/cli/add.d.ts +96 -0
  173. package/dist/types/cli/args.d.ts +24 -35
  174. package/dist/types/cli/backup-offline.d.ts +2 -8
  175. package/dist/types/cli/backup.d.ts +12 -21
  176. package/dist/types/cli/down.d.ts +15 -41
  177. package/dist/types/cli/import-plan.d.ts +55 -0
  178. package/dist/types/cli/import-write.d.ts +5 -0
  179. package/dist/types/cli/import.d.ts +86 -0
  180. package/dist/types/cli/io.d.ts +26 -35
  181. package/dist/types/cli/job.d.ts +99 -0
  182. package/dist/types/cli/logs.d.ts +1 -10
  183. package/dist/types/cli/ls.d.ts +57 -0
  184. package/dist/types/cli/migrate.d.ts +31 -8
  185. package/dist/types/cli/nearest.d.ts +1 -9
  186. package/dist/types/cli/run-deploy.d.ts +36 -0
  187. package/dist/types/cli/secret.d.ts +90 -0
  188. package/dist/types/cli/server.d.ts +6 -15
  189. package/dist/types/cli/service.d.ts +135 -0
  190. package/dist/types/cli/setup-temp.d.ts +17 -13
  191. package/dist/types/cli/status.d.ts +7 -1
  192. package/dist/types/cli/token.d.ts +6 -0
  193. package/dist/types/cli/ui-switch.d.ts +3 -14
  194. package/dist/types/cli/ui-update.d.ts +3 -16
  195. package/dist/types/cli/up.d.ts +9 -22
  196. package/dist/types/cli/usage.d.ts +2 -6
  197. package/dist/types/cli.d.ts +1 -10
  198. package/dist/types/client.d.ts +4099 -1142
  199. package/dist/types/config/accounts.d.ts +16 -0
  200. package/dist/types/config/jobs.d.ts +68 -0
  201. package/dist/types/config/layout.d.ts +2 -8
  202. package/dist/types/config/migrations.d.ts +9 -41
  203. package/dist/types/config/parse.d.ts +8 -13
  204. package/dist/types/config/patch.d.ts +1 -6
  205. package/dist/types/config/schema.d.ts +16 -18
  206. package/dist/types/config/secret-parts.d.ts +6 -27
  207. package/dist/types/config/secrets.d.ts +167 -88
  208. package/dist/types/config/seed.d.ts +1 -6
  209. package/dist/types/config/server-ids.d.ts +2 -11
  210. package/dist/types/config/settings.d.ts +13 -49
  211. package/dist/types/config/store.d.ts +17 -54
  212. package/dist/types/config/workspaces.d.ts +24 -56
  213. package/dist/types/helpers/action-result.d.ts +18 -32
  214. package/dist/types/helpers/atomic.d.ts +1 -4
  215. package/dist/types/helpers/backoff.d.ts +0 -1
  216. package/dist/types/helpers/bind.d.ts +3 -11
  217. package/dist/types/helpers/config-text.d.ts +4 -19
  218. package/dist/types/helpers/cookies.d.ts +2 -7
  219. package/dist/types/helpers/copy-tree.d.ts +4 -12
  220. package/dist/types/helpers/daemon-log.d.ts +8 -33
  221. package/dist/types/helpers/daemon.d.ts +20 -70
  222. package/dist/types/helpers/deferred.d.ts +2 -4
  223. package/dist/types/helpers/env-file.d.ts +2 -7
  224. package/dist/types/helpers/error.d.ts +3 -14
  225. package/dist/types/helpers/event-stream.d.ts +18 -10
  226. package/dist/types/helpers/factory.d.ts +2 -3
  227. package/dist/types/helpers/last-stop.d.ts +5 -12
  228. package/dist/types/helpers/logger.d.ts +1 -5
  229. package/dist/types/helpers/open.d.ts +0 -1
  230. package/dist/types/helpers/openapi.d.ts +19 -5
  231. package/dist/types/helpers/paths.d.ts +18 -53
  232. package/dist/types/helpers/restore-lock.d.ts +2 -17
  233. package/dist/types/helpers/runtime.d.ts +3 -13
  234. package/dist/types/helpers/secret-compare.d.ts +2 -10
  235. package/dist/types/helpers/server-create.d.ts +15 -0
  236. package/dist/types/helpers/shell.d.ts +2 -16
  237. package/dist/types/helpers/sse.d.ts +8 -6
  238. package/dist/types/helpers/ui-dir.d.ts +1 -5
  239. package/dist/types/helpers/utf8-chunks.d.ts +2 -8
  240. package/dist/types/helpers/validate.d.ts +2 -4
  241. package/dist/types/helpers/validator.d.ts +8 -4
  242. package/dist/types/helpers/version.d.ts +1 -6
  243. package/dist/types/helpers/workspace.d.ts +24 -16
  244. package/dist/types/index.d.ts +2 -3
  245. package/dist/types/middleware/auth.d.ts +8 -27
  246. package/dist/types/middleware/body-limit.d.ts +10 -0
  247. package/dist/types/middleware/host.d.ts +4 -23
  248. package/dist/types/middleware/loopback.d.ts +1 -8
  249. package/dist/types/middleware/token-scope.d.ts +34 -0
  250. package/dist/types/node-compat.d.ts +43 -0
  251. package/dist/types/openapi-reference.d.ts +4 -19
  252. package/dist/types/openapi.d.ts +5 -8
  253. package/dist/types/providers/archive.d.ts +8 -25
  254. package/dist/types/providers/backup-hook.d.ts +4 -19
  255. package/dist/types/providers/ddns/dyndns2.d.ts +0 -3
  256. package/dist/types/providers/ddns/index.d.ts +2 -3
  257. package/dist/types/providers/ddns/ip.d.ts +2 -12
  258. package/dist/types/providers/ddns/namecheap-api.d.ts +3 -2
  259. package/dist/types/providers/ddns/types.d.ts +6 -32
  260. package/dist/types/providers/ddns/zone.d.ts +1 -4
  261. package/dist/types/providers/docker.d.ts +18 -45
  262. package/dist/types/providers/entry-state.d.ts +4 -9
  263. package/dist/types/providers/health-check.d.ts +1 -5
  264. package/dist/types/providers/host.d.ts +33 -108
  265. package/dist/types/providers/identity.d.ts +9 -34
  266. package/dist/types/providers/log-tail.d.ts +14 -24
  267. package/dist/types/providers/nanny-sweep.d.ts +8 -25
  268. package/dist/types/providers/nanny.d.ts +16 -58
  269. package/dist/types/providers/port.d.ts +28 -83
  270. package/dist/types/providers/proc.d.ts +22 -80
  271. package/dist/types/providers/process.d.ts +12 -36
  272. package/dist/types/providers/proxy/admin.d.ts +11 -0
  273. package/dist/types/providers/proxy/types.d.ts +4 -16
  274. package/dist/types/providers/telegram.d.ts +1 -17
  275. package/dist/types/providers/ui-release.d.ts +15 -25
  276. package/dist/types/providers/webhook.d.ts +8 -29
  277. package/dist/types/providers/wsl-temperature.d.ts +13 -22
  278. package/dist/types/services/acme-challenge.d.ts +2 -16
  279. package/dist/types/services/auth.d.ts +65 -80
  280. package/dist/types/services/backups/archive-safety.d.ts +30 -0
  281. package/dist/types/services/backups/paths.d.ts +31 -0
  282. package/dist/types/services/backups.d.ts +61 -271
  283. package/dist/types/services/config-watch.d.ts +3 -15
  284. package/dist/types/services/control-server.d.ts +6 -10
  285. package/dist/types/services/ddns.d.ts +12 -13
  286. package/dist/types/services/dependencies.d.ts +3 -14
  287. package/dist/types/services/deploy.d.ts +34 -0
  288. package/dist/types/services/events.d.ts +15 -9
  289. package/dist/types/services/exposure.d.ts +13 -63
  290. package/dist/types/services/history.d.ts +5 -14
  291. package/dist/types/services/host-monitor.d.ts +6 -11
  292. package/dist/types/services/init.d.ts +5 -35
  293. package/dist/types/services/job-ledger.d.ts +27 -0
  294. package/dist/types/services/jobs.d.ts +113 -0
  295. package/dist/types/services/log-buffer.d.ts +7 -8
  296. package/dist/types/services/log-files.d.ts +12 -42
  297. package/dist/types/services/log-relay.d.ts +3 -13
  298. package/dist/types/services/nanny.d.ts +3 -10
  299. package/dist/types/services/notifications.d.ts +31 -61
  300. package/dist/types/services/panel.d.ts +32 -78
  301. package/dist/types/services/proxy-certificates/certificates.d.ts +31 -69
  302. package/dist/types/services/proxy-config.d.ts +15 -36
  303. package/dist/types/services/proxy-dns01.d.ts +14 -0
  304. package/dist/types/services/proxy.d.ts +73 -254
  305. package/dist/types/services/scheduler.d.ts +46 -0
  306. package/dist/types/services/state.d.ts +17 -8
  307. package/dist/types/services/supervisor/compose.d.ts +2 -6
  308. package/dist/types/services/supervisor/entry.d.ts +29 -32
  309. package/dist/types/services/supervisor/health.d.ts +8 -31
  310. package/dist/types/services/supervisor/job-run.d.ts +36 -0
  311. package/dist/types/services/supervisor/output.d.ts +13 -77
  312. package/dist/types/services/supervisor/persistent.d.ts +5 -11
  313. package/dist/types/services/supervisor/port-preflight.d.ts +4 -10
  314. package/dist/types/services/supervisor/records.d.ts +27 -60
  315. package/dist/types/services/supervisor/restart-required.d.ts +13 -0
  316. package/dist/types/services/supervisor/spawn.d.ts +3 -5
  317. package/dist/types/services/supervisor/view.d.ts +3 -1
  318. package/dist/types/services/supervisor.d.ts +31 -43
  319. package/dist/types/services/tls.d.ts +6 -17
  320. package/dist/types/services/ui-update.d.ts +19 -17
  321. package/dist/types/services/ui.d.ts +10 -19
  322. package/dist/types/shared/action-outcome.d.ts +2 -7
  323. package/dist/types/shared/api-client.d.ts +133 -177
  324. package/dist/types/shared/api-scopes.d.ts +17 -0
  325. package/dist/types/shared/backup-scope.d.ts +16 -90
  326. package/dist/types/shared/clone.d.ts +2 -11
  327. package/dist/types/shared/contracts/accounts.d.ts +99 -0
  328. package/dist/types/shared/contracts/backups.d.ts +219 -0
  329. package/dist/types/shared/contracts/ddns.d.ts +208 -0
  330. package/dist/types/shared/contracts/frames.d.ts +1395 -0
  331. package/dist/types/shared/contracts/index.d.ts +3 -0
  332. package/dist/types/shared/contracts/logs.d.ts +107 -0
  333. package/dist/types/shared/contracts/proxy.d.ts +303 -0
  334. package/dist/types/shared/contracts.d.ts +852 -1982
  335. package/dist/types/shared/cpu-scale.d.ts +3 -19
  336. package/dist/types/shared/crash-cause.d.ts +8 -0
  337. package/dist/types/shared/cron.d.ts +70 -0
  338. package/dist/types/shared/ddns-form.d.ts +9 -43
  339. package/dist/types/shared/endpoint.d.ts +1 -7
  340. package/dist/types/shared/error-codes.d.ts +438 -0
  341. package/dist/types/shared/error-message.d.ts +1 -7
  342. package/dist/types/shared/fields.d.ts +7 -17
  343. package/dist/types/shared/form-repair.d.ts +1 -5
  344. package/dist/types/shared/generated.d.ts +3 -19
  345. package/dist/types/shared/host-readings.d.ts +25 -128
  346. package/dist/types/shared/lazy.d.ts +1 -1
  347. package/dist/types/shared/live-frames.d.ts +2 -8
  348. package/dist/types/shared/live-series.d.ts +2 -8
  349. package/dist/types/shared/live-store.d.ts +4 -8
  350. package/dist/types/shared/log-download.d.ts +6 -0
  351. package/dist/types/shared/meta.d.ts +6 -0
  352. package/dist/types/shared/password-policy.d.ts +10 -0
  353. package/dist/types/shared/patch-diff.d.ts +13 -72
  354. package/dist/types/shared/port-reading.d.ts +18 -0
  355. package/dist/types/shared/probe-latency.d.ts +3 -21
  356. package/dist/types/shared/proxy-form.d.ts +33 -74
  357. package/dist/types/shared/proxy-validate.d.ts +11 -0
  358. package/dist/types/shared/query-params.d.ts +8 -0
  359. package/dist/types/shared/server-attention.d.ts +2 -27
  360. package/dist/types/shared/server-form.d.ts +15 -54
  361. package/dist/types/shared/server-key.d.ts +1 -12
  362. package/dist/types/shared/server-readings.d.ts +7 -32
  363. package/dist/types/shared/server-url.d.ts +9 -31
  364. package/dist/types/shared/shape.d.ts +1 -16
  365. package/dist/types/shared/stream-access.d.ts +2 -8
  366. package/dist/types/shared/ui-format.d.ts +25 -65
  367. package/docs/API.md +315 -107
  368. package/docs/BACKUPS.md +61 -56
  369. package/docs/CLI.md +255 -49
  370. package/docs/DDNS.md +35 -49
  371. package/docs/JOBS.md +129 -0
  372. package/docs/NOTIFICATIONS.md +58 -90
  373. package/docs/REVERSE_PROXY.md +116 -188
  374. package/docs/SECURITY.md +126 -44
  375. package/docs/SERVERS.md +282 -409
  376. package/docs/UI_CREATION.md +90 -47
  377. package/docs/demo/blank-host-restore.sh +31 -7
  378. package/package.json +15 -6
  379. package/scripts/prepare.mjs +47 -0
  380. package/uis/stock/dist/assets/CopyButton-8mliL0xi.js +1 -0
  381. package/uis/stock/dist/assets/GlobalSettingsView-BINXY77E.js +1 -0
  382. package/uis/stock/dist/assets/LogViewer-kiSnTwdY.js +1 -0
  383. package/uis/stock/dist/assets/LogsView-DDXf_ONs.js +1 -0
  384. package/uis/stock/dist/assets/Modal-lrUuViF2.js +39 -0
  385. package/uis/stock/dist/assets/ProxyView-uXMaJdSQ.js +1 -0
  386. package/uis/stock/dist/assets/ServerDetailView-CW0Vb_c0.js +4 -0
  387. package/uis/stock/dist/assets/SettingsShell-B135xWjJ.js +1 -0
  388. package/uis/stock/dist/assets/SettingsView-BLtWxVkl.js +2 -0
  389. package/uis/stock/dist/assets/de-BIoTrHBQ.js +1 -0
  390. package/uis/stock/dist/assets/es-x4-ih8lH.js +1 -0
  391. package/uis/stock/dist/assets/fr-DatqBBkO.js +1 -0
  392. package/uis/stock/dist/assets/index-CnojaKcA.css +2 -0
  393. package/uis/stock/dist/assets/index-D-CiZReu.js +16 -0
  394. package/uis/stock/dist/assets/ja-CW1703Gw.js +1 -0
  395. package/uis/stock/dist/assets/ko-wFbT4XtK.js +1 -0
  396. package/uis/stock/dist/assets/ru-C1p5C4VN.js +1 -0
  397. package/uis/stock/dist/assets/useUnsavedGuard-BcsXsfCC.js +9 -0
  398. package/uis/stock/dist/assets/vi-CDqr0uie.js +1 -0
  399. package/uis/stock/dist/assets/zh-CN-BJ7iit-X.js +1 -0
  400. package/uis/stock/dist/index.html +4 -3
  401. package/uis/stock/dist/ui.json +3 -3
  402. package/dist/chunks/archive-DP-XQR8X.js.map +0 -1
  403. package/dist/chunks/atomic-C1PfJpE7.js.map +0 -1
  404. package/dist/chunks/backup-CZcVca2a.js.map +0 -1
  405. package/dist/chunks/backups-CFRaWe_m.js +0 -4691
  406. package/dist/chunks/backups-CFRaWe_m.js.map +0 -1
  407. package/dist/chunks/config-text-DifCHhnz.js +0 -50
  408. package/dist/chunks/config-text-DifCHhnz.js.map +0 -1
  409. package/dist/chunks/contracts-CMBD1TF9.js.map +0 -1
  410. package/dist/chunks/daemon-log-BVj8cDEo.js +0 -241
  411. package/dist/chunks/daemon-log-BVj8cDEo.js.map +0 -1
  412. package/dist/chunks/daemon-qKVECISl.js +0 -247
  413. package/dist/chunks/daemon-qKVECISl.js.map +0 -1
  414. package/dist/chunks/docker-Cy9Lyvda.js.map +0 -1
  415. package/dist/chunks/down-pKbGCW9d.js.map +0 -1
  416. package/dist/chunks/init-BZ7hK9Vf.js.map +0 -1
  417. package/dist/chunks/last-stop-C-BXz_XI.js +0 -53
  418. package/dist/chunks/last-stop-C-BXz_XI.js.map +0 -1
  419. package/dist/chunks/layout-DwTtmund.js +0 -24
  420. package/dist/chunks/layout-DwTtmund.js.map +0 -1
  421. package/dist/chunks/lazy-Ce5zEAq1.js +0 -66
  422. package/dist/chunks/lazy-Ce5zEAq1.js.map +0 -1
  423. package/dist/chunks/log-buffer-Dy9HHDMD.js +0 -414
  424. package/dist/chunks/log-buffer-Dy9HHDMD.js.map +0 -1
  425. package/dist/chunks/logger-B5U4GD3j.js.map +0 -1
  426. package/dist/chunks/logs---TI_bxM.js.map +0 -1
  427. package/dist/chunks/migrate-Cfoq-Vgh.js +0 -155
  428. package/dist/chunks/migrate-Cfoq-Vgh.js.map +0 -1
  429. package/dist/chunks/nanny-B-Eu0sFW.js.map +0 -1
  430. package/dist/chunks/nanny-BtWfy0QH.js +0 -1167
  431. package/dist/chunks/nanny-BtWfy0QH.js.map +0 -1
  432. package/dist/chunks/nanny-sweep-DErnlPY1.js.map +0 -1
  433. package/dist/chunks/nearest-6KgQEDUe.js.map +0 -1
  434. package/dist/chunks/parse-DhmG26fI.js.map +0 -1
  435. package/dist/chunks/paths-CGlGDrOU.js.map +0 -1
  436. package/dist/chunks/port-B8WBTRMk.js.map +0 -1
  437. package/dist/chunks/restart-Des4DrAN.js.map +0 -1
  438. package/dist/chunks/schema-B240VXcV.js.map +0 -1
  439. package/dist/chunks/secrets-BieELnZh.js +0 -562
  440. package/dist/chunks/secrets-BieELnZh.js.map +0 -1
  441. package/dist/chunks/server-Bge2r2qQ.js +0 -169
  442. package/dist/chunks/server-Bge2r2qQ.js.map +0 -1
  443. package/dist/chunks/server-ids-DRuNLVCV.js +0 -32
  444. package/dist/chunks/server-ids-DRuNLVCV.js.map +0 -1
  445. package/dist/chunks/set-password-D5vZqqSX.js +0 -43
  446. package/dist/chunks/set-password-D5vZqqSX.js.map +0 -1
  447. package/dist/chunks/set-token-obPiEJYk.js +0 -78
  448. package/dist/chunks/set-token-obPiEJYk.js.map +0 -1
  449. package/dist/chunks/settings-xu-XTfWg.js.map +0 -1
  450. package/dist/chunks/setup-temp-CAN4_bA-.js.map +0 -1
  451. package/dist/chunks/shape-DnTKzjQ2.js +0 -24
  452. package/dist/chunks/shape-DnTKzjQ2.js.map +0 -1
  453. package/dist/chunks/src-BtWMFmzZ.js.map +0 -1
  454. package/dist/chunks/status-DT1EsA-B.js.map +0 -1
  455. package/dist/chunks/ui-D562aqw5.js.map +0 -1
  456. package/dist/chunks/ui-dir-CsU3uLNV.js.map +0 -1
  457. package/dist/chunks/ui-release-DKzVvlLd.js.map +0 -1
  458. package/dist/chunks/ui-revert-EkBBwRTt.js.map +0 -1
  459. package/dist/chunks/ui-switch-BnZTdMDd.js.map +0 -1
  460. package/dist/chunks/ui-update-_xryLYxw.js.map +0 -1
  461. package/dist/chunks/up-Pdz-l6IH.js.map +0 -1
  462. package/dist/chunks/usage-DFrCVXpT.js.map +0 -1
  463. package/dist/chunks/workspaces-DYcfvKV_.js.map +0 -1
  464. package/dist/chunks/wsl-temperature-BiCI4iK6.js.map +0 -1
  465. package/dist/types/cli/set-password.d.ts +0 -14
  466. package/dist/types/cli/set-token.d.ts +0 -21
  467. package/uis/stock/dist/assets/CopyButton-BUBKRJyY.js +0 -1
  468. package/uis/stock/dist/assets/GlobalSettingsView-yYMcRWvt.js +0 -1
  469. package/uis/stock/dist/assets/LogViewer-DIliXy62.js +0 -1
  470. package/uis/stock/dist/assets/LogsView-B7Z-7RNg.js +0 -1
  471. package/uis/stock/dist/assets/Modal-DmKa5Qpp.js +0 -39
  472. package/uis/stock/dist/assets/ProxyView-DvZiNkwb.js +0 -1
  473. package/uis/stock/dist/assets/ServerDetailView-6idGT_EX.js +0 -2
  474. package/uis/stock/dist/assets/SettingsShell-CeGtleYI.js +0 -1
  475. package/uis/stock/dist/assets/SettingsView-BrhJIrmk.js +0 -2
  476. package/uis/stock/dist/assets/de-BRITeb0H.js +0 -1
  477. package/uis/stock/dist/assets/es-B2zIEssV.js +0 -1
  478. package/uis/stock/dist/assets/fr-s0ZOBEqh.js +0 -1
  479. package/uis/stock/dist/assets/index-C1MehbKy.css +0 -2
  480. package/uis/stock/dist/assets/index-CnBN54wF.js +0 -15
  481. package/uis/stock/dist/assets/ja-CU7MR85V.js +0 -1
  482. package/uis/stock/dist/assets/ko-tL5Me6d-.js +0 -1
  483. package/uis/stock/dist/assets/ru-92yrvkNJ.js +0 -1
  484. package/uis/stock/dist/assets/vi-CzvY16k2.js +0 -1
  485. package/uis/stock/dist/assets/zh-CN-DDwFW_uW.js +0 -1
package/docs/DDNS.md CHANGED
@@ -1,24 +1,13 @@
1
1
  # Dynamic DNS
2
2
 
3
3
  Keep a list of hostnames pointed at this machine's public IP. The panel checks the address on an
4
- interval and calls a provider only when it actually changed — restart-safe, because the last
5
- confirmed address per hostname, account and provider is kept in the workspace's
6
- `.hh/<workspace>/.state/ddns.cache.json`. Saving an account's credentials forgets what that account had
7
- confirmed, so the next pass writes its hostnames again. Editing a hostname's `proxied`, `ttl` or
8
- `zone` counts as a change too: the next pass sends it even though the address is the same. Each
9
- provider call has its own 30 s deadline, so one slow hostname cannot time out the rest of a long list.
10
-
11
- A refusal retrying cannot fix — bad credentials, a hostname the provider does not know, an abuse
12
- block — **stops** that hostname instead of retrying it every interval: its row stays an error marked
13
- *stopped* until its hostname, account or credentials change, the settings are saved, or you run a
14
- check. Detection only accepts a public address: private, CGNAT, documentation, benchmarking and
15
- multicast ranges are refused, and each detector gets 10 seconds.
4
+ interval and calls a provider only when it changed. The last confirmed address per hostname is kept in
5
+ `.hh/<workspace>/.state/ddns.cache.json`, so a restart does not cause a write. Saving an account's
6
+ credentials, or editing a hostname's `proxied`, `ttl` or `zone`, makes the next pass write again.
16
7
 
17
8
  **Workspace Settings → Dynamic DNS** is the whole setup: add an account, paste its credentials, add
18
- hostnames. The block is saved by the page's own **Save settings**, like every other section on it; the
19
- credentials button saves on its own, being a secret. Provider credentials never enter
20
- `servers.config.json`. The pending-changes summary counts only the fields you touched, though the
21
- save writes the block whole.
9
+ hostnames. The section is saved by the page's **Save settings**; the credentials button saves on its
10
+ own, being a secret.
22
11
 
23
12
  ```json
24
13
  {
@@ -29,7 +18,7 @@ save writes the block whole.
29
18
  "ipv6": { "enabled": false, "url": "" },
30
19
  "ttl": 1,
31
20
  "accounts": [
32
- { "id": "cf", "provider": "cloudflare", "label": "Home zone" }
21
+ { "id": "cf", "provider": "cloudflare" }
33
22
  ],
34
23
  "domains": [
35
24
  { "host": "home.example.com", "account": "cf", "types": ["A"] },
@@ -39,64 +28,61 @@ save writes the block whole.
39
28
  }
40
29
  ```
41
30
 
42
- Credentials live in the workspace's `.secrets.json` (0600), keyed by the account `id` and sealed with
43
- AES-256-GCM under `HHOSTED_DDNS_SECRET` — set your own, or the default `hh` only stops a casual read.
44
- The panel logs a warning when it seals credentials under that default, so a copied state directory is
45
- not the first time you hear about it. Both files sit beside that workspace's `servers.config.json`.
46
- The account does not have to be saved first, and the provider is stored with the entry, so an id that
47
- later changes provider does not silently keep the old secret. Removing an account drops its
48
- credentials on the next save.
49
-
50
- Header fields:
51
-
52
31
  | Field | Default | Notes |
53
32
  | --- | --- | --- |
54
33
  | `enabled` | `false` | Nothing runs until this is on. |
55
- | `intervalMs` | `300000` | How often the public address is re-checked. The settings box edits this in **seconds** (`60` is one minute) and writes milliseconds. |
34
+ | `intervalMs` | `300000` | How often the public address is re-checked; at least `60000`. The settings box edits it in **seconds**. |
56
35
  | `ipv4` / `ipv6` | on / off | Which families to detect. A family must be on for its record types. |
57
- | `ipv4.url` / `ipv6.url` | `""` | Override the detector with one endpoint. |
36
+ | `ipv4.url` / `ipv6.url` | `""` | Use this one endpoint instead of the built-in detectors. |
58
37
  | `ttl` | `1` | Default record TTL; `1` is automatic where supported. |
59
- | `accounts[]` | — | `id` (names the account and keys its credentials) and `provider`. A `label` from an earlier release is still read, and no longer shown. |
60
- | `domains[]` | — | `host`, `account`, `types` (`A`/`AAAA`, default `A`), `proxied` (default off; Cloudflare only), optional `ttl`, `zone`, `enabled`. |
38
+ | `accounts[]` | — | `id` (lowercase, digits, `-`, `_`; keys the credentials) and `provider`. A `label` from an earlier release is still accepted, and not shown. |
39
+ | `domains[]` | — | `host`, `account`, `types` (`A`/`AAAA`, default `A`), `proxied` (default off; Cloudflare only), and optional `ttl`, `zone`, `enabled` (default on). |
40
+
41
+ `zone` pins the registered domain, for a provider that must be told the apex when the guess is wrong
42
+ (`home.example.co.uk` is handled; an unusual suffix may not be). It must contain the host — a typo is
43
+ refused on save rather than writing to a domain that is not yours.
44
+
45
+ **Credentials** live in the workspace's `.secrets.json` (0600), keyed by account `id`, never in a
46
+ config file. They are sealed with AES-256-GCM under `HHOSTED_DDNS_SECRET` — set your own; the built-in
47
+ default only stops a casual read, and the panel logs a warning when it uses it. An account changed to a
48
+ different provider does not keep the old secret, and removing an account drops its credentials on the
49
+ next save.
61
50
 
62
- Per-hostname `zone` pins the registered domain — only needed where a provider has to be told the apex
63
- and the guess is wrong (`home.example.co.uk` is handled; an unusual suffix may not be). It must be a
64
- domain the host is **inside**: a typo is refused on save, because the record name would otherwise become
65
- the whole hostname and the write would go to a domain that is not yours.
51
+ **Failures.** Each provider call has a 30 s deadline, and each address detector 10 s. Detection only
52
+ accepts a public address (private, CGNAT, documentation, benchmarking and multicast ranges are
53
+ refused). A refusal that retrying cannot fix — bad credentials, an unknown hostname, an abuse block —
54
+ **stops** that hostname: its row stays an error marked *stopped* until its hostname, account or
55
+ credentials change, the settings are saved, or you run a check.
66
56
 
67
57
  ## Providers
68
58
 
69
59
  | Provider | Record types | Credentials | Notes |
70
60
  | --- | --- | --- | --- |
71
61
  | **Cloudflare** | A, AAAA | API token (`Zone → DNS → Edit`); or legacy email + global key | Zones and record ids are discovered, then cached. Updates use `PATCH`, so comments survive. |
72
- | **Namecheap** | A | Dynamic DNS password | Router-style Dynamic DNS, not the XML API. The password is under Advanced DNS → Dynamic DNS — not the account password. IPv4 only. |
73
- | **Spaceship** | A, AAAA | API key + secret | No DDNS endpoint; uses the DNS API's whole-record-set upsert. |
62
+ | **Namecheap** | A | Dynamic DNS password | Router-style Dynamic DNS, not the XML API. The password is under Advanced DNS → Dynamic DNS — not the account password. |
63
+ | **Spaceship** | A, AAAA | API key + secret | Uses the DNS API's record-set upsert. |
74
64
  | **Porkbun** | A, AAAA | API key + secret key | Read-then-upsert by name and type. |
75
- | **GoDaddy** | A, AAAA | API key + secret | Optional `baseUrl` points at the OTE test environment. GoDaddy has gated this API by account before; a 403 means the account is not eligible. |
65
+ | **GoDaddy** | A, AAAA | API key + secret | Optional `baseUrl` points at the OTE test environment. A 403 means the account is not eligible for the API. |
76
66
  | **Gandi** | A, AAAA | Personal access token (`pat_…`) | LiveDNS RRset update. |
77
- | **DigitalOcean** | A, AAAA | API token | No upsert-by-name; lists records, then updates the one it found. |
67
+ | **DigitalOcean** | A, AAAA | API token | Lists records, then updates the one it found. |
78
68
  | **deSEC** | A, AAAA | API token | `update.dedyn.io`, HTTP Basic with the hostname. |
79
69
  | **DuckDNS** | A, AAAA | Account token | One token covers every subdomain. |
80
70
  | **No-IP** | A, AAAA | Email + password | Sends a recognised `User-Agent`; override it if yours is registered. |
81
71
  | **Dynu** | A, AAAA | Username + password | `password` may be the SHA-256 hash. |
82
72
  | **Hurricane Electric** | A, AAAA | Per-host DDNS key | `dyn.dns.he.net`. |
83
73
  | **FreeDNS (afraid.org)** | A, AAAA | The per-record "Direct URL" | Paste the whole URL or just its hash. |
84
- | **Namecheap (API)** | — | API user + key + whitelisted IP | For **DNS-01 only**: it answers a challenge through the XML API, which rewrites the whole zone per write. It updates no addresses — use the Dynamic DNS provider above for that. The client IP must be whitelisted under Profile → Tools → Namecheap API Access, and error `1017105` means it is not. |
74
+ | **Namecheap (API)** | — | API user + key + whitelisted IP | For **DNS-01 only**: it answers a certificate challenge and updates no addresses. The IP must be whitelisted under Profile → Tools → Namecheap API Access; error `1017105` means it is not. |
85
75
 
86
- Not supported: **Route 53** (AWS SigV4 signing, a much larger dependency) and **DreamHost** (no
87
- public DNS API).
76
+ Not supported: **Route 53** and **DreamHost** (no public DNS API).
88
77
 
89
78
  ## Notifications
90
79
 
91
- Telegram carries one message per pass that changed a record, and one for a pass that failed — the
92
- same switch as every other event, under Workspace Settings → Notifications → *Dynamic DNS changes and
93
- failures* (`notifications.defaults.onDdns`, or a destination's own when it carries its own
94
- settings). There is no second switch in this section.
80
+ One message per pass that changed a record, and one per failed pass, under the
81
+ *Dynamic DNS changes and failures* switch (`onDdns`) — see [NOTIFICATIONS.md](./NOTIFICATIONS.md).
95
82
 
96
83
  ## Adding a provider
97
84
 
98
85
  `src/providers/ddns/<name>.ts` exports one `DdnsProvider`: its credential fields, the families it can
99
86
  manage, and an `update()` that makes one HTTP call and returns `{ ok, changed, message }`. Register it
100
- in `src/providers/ddns/index.ts`; the settings page, the credentials form and validation follow from
101
- that metadata. Put the reasoning for `changed: false` in the provider — it is what makes the panel
102
- skip a write when a record is already current.
87
+ in `src/providers/ddns/index.ts`; the settings form and validation follow from that metadata. Return
88
+ `changed: false` when the record was already current, so the panel can skip the write.
package/docs/JOBS.md ADDED
@@ -0,0 +1,129 @@
1
+ # Jobs
2
+
3
+ A **job** is a command that runs on a schedule, does its work and exits — a nightly backup, an
4
+ hourly cleanup. **Its exit code is the outcome**: `0` succeeded, anything else failed. Unlike a
5
+ [server](./SERVERS.md) there is nothing to keep up: no port, health probe or restart.
6
+
7
+ Create one from the **Jobs** page (cron presets, a live preview of the next three runs), or write it
8
+ into the workspace's `jobs.config.json`:
9
+
10
+ ```json
11
+ {
12
+ "jobs": [
13
+ {
14
+ "id": "nightly-backup",
15
+ "schedule": "0 3 * * *",
16
+ "command": "./scripts/backup.sh",
17
+ "args": ["--full"]
18
+ }
19
+ ]
20
+ }
21
+ ```
22
+
23
+ The Jobs page updates live: what is running now, when each job runs next, and how its last run ended
24
+ (**ok**, **failed**, **timed out**, **stopped**, **did not start**). **Run now** starts a run at once;
25
+ **Stop** ends one. **Runs** lists a job's last 50 runs and shows what the one you pick wrote.
26
+
27
+ A failed, timed-out or unstartable run **notifies like a crash** ([NOTIFICATIONS.md](./NOTIFICATIONS.md)).
28
+
29
+ ## The fields
30
+
31
+ | field | default | what it is |
32
+ | --- | --- | --- |
33
+ | `id` | required | names the job, its log and its run history. Lowercase, digits, `-` and `_` |
34
+ | `label` | the id | what a page shows beside the id |
35
+ | `description` | — | free text for your own notes |
36
+ | `enabled` | `true` | off means it does not run on its schedule; a run in flight still finishes |
37
+ | `command` | required | resolved against the **panel's** `PATH`, like a server's |
38
+ | `args` | `[]` | one array entry per argument — no shell parsing |
39
+ | `cwd` | `.` | relative to the project the panel was started from |
40
+ | `env` | `{}` | extra environment for the run |
41
+ | `secretEnv` | `[]` | the **names** of secrets to export; the values live in the workspace secrets file |
42
+ | `schedule` | required | 5-field cron, host local time |
43
+ | `timeoutSeconds` | `3600` | how long one run may take before the panel ends it: 1 second to a day |
44
+ | `catchUp` | `true` | when the panel starts after missing an occurrence, run it once (see below) |
45
+
46
+ `{id}`, `{label}`, `{cwd}`, `{projectDir}`, `{dataRoot}` and `{home}` expand in `args` and `env`, as on
47
+ a server.
48
+
49
+ A job the panel cannot read — a cron typo, an unknown field — is shown on the Jobs page with what is
50
+ wrong and does not run; the other jobs in the file still do. A file that is not valid JSON stops every
51
+ job in it until it is fixed, and the page says so.
52
+
53
+ <details>
54
+ <summary>The expression</summary>
55
+
56
+ `minute hour day-of-month month day-of-week`, in the **host's local time**. Each field takes `*`, a
57
+ number, a range `1-5`, a list `1,15`, a step `*/15` or `0-30/10`; month and weekday also take names
58
+ (`jan`, `mon`). `0` and `7` are both Sunday. When both day fields are restricted, a day matching
59
+ **either** runs (classic cron). No seconds field and no `@daily`-style macros.
60
+
61
+ | expression | runs |
62
+ | --- | --- |
63
+ | `*/15 * * * *` | every 15 minutes |
64
+ | `0 * * * *` | every hour |
65
+ | `0 3 * * *` | every day at 03:00 |
66
+ | `0 3 * * 1` | every Monday at 03:00 |
67
+ | `0 3 1 * *` | on the 1st of every month at 03:00 |
68
+
69
+ A wall-clock time that happens twice when the clocks go back runs once.
70
+
71
+ </details>
72
+
73
+ ### When a run happens
74
+
75
+ - **One run per occurrence.** A run still going when the next occurrence comes due makes that
76
+ occurrence **skip** (the job's log says so); runs never queue.
77
+ - **A new or changed schedule waits for its next occurrence.** Creating a job, enabling it again, or
78
+ editing its schedule never runs a time that already passed.
79
+ - **Catch-up at start only.** When the panel starts and a job's most recent occurrence passed while it
80
+ was down, a job with `catchUp` on runs that one occurrence once — not one per missed day. A job that
81
+ has never run is not caught up. Turn `catchUp` off for work that must only happen on time.
82
+
83
+ ### A job's secret environment
84
+
85
+ `secretEnv` names variables whose **values** are kept in the workspace secrets file (0600) instead of
86
+ in `jobs.config.json`, where every backup and every `git diff` would show them. Declare the name, save,
87
+ then set the value on the Jobs page or with the CLI:
88
+
89
+ ```bash
90
+ home-hosted secret set nightly-backup BACKUP_TOKEN # prompts without echo; --stdin reads a piped line
91
+ home-hosted secret ls nightly-backup # the names, and which have a value
92
+ ```
93
+
94
+ A value for an undeclared name is refused, and a run receives values only for names the job declares.
95
+
96
+ ## From the command line
97
+
98
+ ```bash
99
+ home-hosted job ls # schedule, next run, last outcome
100
+ home-hosted job run nightly-backup # waits; exits 0 only when the run succeeded
101
+ home-hosted job run nightly-backup --detach # starts it and returns
102
+ home-hosted job stop nightly-backup
103
+ home-hosted job disable nightly-backup # and `enable`
104
+ home-hosted job runs nightly-backup # the last runs, newest first
105
+ home-hosted job log nightly-backup --run <runId> --follow
106
+ ```
107
+
108
+ Every `job` command talks to the running panel. More in [CLI.md](./CLI.md#jobs).
109
+
110
+ <details>
111
+ <summary>Where a run's output and history go</summary>
112
+
113
+ - **Output** goes to the job's own log, `<workspace>/.logs/jobs/<id>.log`, which rotates by the
114
+ workspace's log size settings and is kept even when `logs.persist` is off. Each run writes a line
115
+ when it starts and one when it ends, naming its run id.
116
+ - **Run history** is `<workspace>/.state/jobs/<id>.runs.jsonl`, the last 50 runs. It survives a
117
+ restart: it is how the panel knows a job already ran. A run the panel was watching when it stopped
118
+ is recorded as **interrupted**.
119
+ - **Removing a job** stops a run in flight, then deletes its run history, its log and its stored
120
+ secret values, so a job declared again under the same id starts clean.
121
+ - Over the API: `GET /api/jobs/:id/runs` and `GET /api/jobs/:id/runs/:runId` ([API.md](./API.md)).
122
+
123
+ </details>
124
+
125
+ ## Coming from earlier versions
126
+
127
+ `home-hosted migrate` moves jobs that a `servers.config.json` still declares into `jobs.config.json`,
128
+ and renames `timeoutMs` to `timeoutSeconds` (rounded up). The panel reads an old `timeoutMs` either
129
+ way, and writes the new name the next time it saves the job.
@@ -1,31 +1,24 @@
1
1
  # Notifications
2
2
 
3
- home-hosted pushes supervision events to any number of **destinations**. A destination is a Telegram
4
- chat or a webhook — the same list, because both are just somewhere an alert lands, and you may have
5
- several of either.
3
+ home-hosted pushes supervision events to any number of **destinations** — Telegram chats and
4
+ webhooks, in one list. Settings are per workspace, in **Workspace Settings → Notifications**:
6
5
 
7
- Two settings groups, and the split is the point:
6
+ - **General** — which events fire, and the throttle. Set once.
7
+ - **Destinations** — where they go. Each has an on/off switch and an **Own settings** toggle: off (the
8
+ default for a new one) follows the general block; on gives it its own toggles and throttle.
8
9
 
9
- - **General** — which events fire, and the throttle. Set **once**.
10
- - **Destinations** — where they go. Each one has an on/off switch and an **Own settings** toggle:
11
- off (the default for a new one) means it follows the general block entirely; on means it carries
12
- its own toggles and throttle.
13
-
14
- So "tell me about crashes and host thresholds, throttled every two minutes, to my phone and the
15
- group chat" is configured once and pointed at two places. A send never blocks supervision: a failure
16
- is logged and recorded against that destination alone, and the others still go out.
10
+ A send never blocks supervision, and one destination failing does not stop the others.
17
11
 
18
12
  ## Setup
19
13
 
20
14
  1. Talk to [@BotFather](https://t.me/BotFather), run `/newbot`, and copy the token it prints.
21
- 2. In the panel: **Workspace Settings → Notifications → Destinations**, press **Add Telegram**.
22
- 3. Paste the token into that destination's box and press **Save token**, then **Detect chats**.
23
- 4. Send your bot a message from the chat you want the alerts in — a bot cannot open a conversation —
24
- then pick that chat from the list (or paste its id).
25
- 5. Press **Send a test**: the chat gets a message, and the panel shows the result and its timestamp.
26
- 6. Leave **Own settings** off to follow the general block, or turn it on to give this chat its own.
15
+ 2. In **Workspace Settings → Notifications → Destinations**, press **Add Telegram**.
16
+ 3. Paste the token, press **Save token**, then **Detect chats**.
17
+ 4. Send your bot a message from the chat you want alerts in (a bot cannot start a conversation), then
18
+ pick that chat from the list or paste its id.
19
+ 5. Press **Send a test**: the chat gets a message, and the panel shows the result.
27
20
 
28
- A second chat is another **Add Telegram** — it gets its own bot token, stored under its own id.
21
+ A second chat is another **Add Telegram**, with its own bot token.
29
22
 
30
23
  <details>
31
24
  <summary><b>Doing it without the UI</b></summary>
@@ -48,9 +41,9 @@ curl -X POST "http://127.0.0.1:3999/api/notifications/destinations/alerts/test$W
48
41
  -d '{"chatId":"123456789"}'
49
42
  ```
50
43
 
51
- Every Telegram route names a destination id (`alerts` here), and the token is stored under it — which
52
- is what lets one workspace point at several chats. `detect-chats` accepts a token override, so one
53
- can be tried before it is saved; `DELETE /api/notifications/destinations/alerts/token` removes it.
44
+ Each route names a destination id (`alerts` here), and the token is stored under it. `detect-chats`
45
+ accepts a token, so one can be tried before it is saved; `DELETE …/destinations/alerts/token` removes
46
+ it.
54
47
 
55
48
  </details>
56
49
 
@@ -60,102 +53,77 @@ can be tried before it is saved; `DELETE /api/notifications/destinations/alerts/
60
53
  | --- | --- | --- |
61
54
  | a server gave up restarting | `onCrash` | ✅ |
62
55
  | a server exceeded its memory limit | `onCrash` | ✅ |
56
+ | a deploy failed | `onCrash` | ✅ |
57
+ | a [job](./JOBS.md) run failed, timed out or did not start | `onCrash` | ✅ |
63
58
  | a health check is failing | `onUnhealthy` | ✅ |
64
59
  | a server was force-restarted (health timeout) | `onForcedRestart` | ✅ |
65
60
  | a force-restarted server is serving again | `onForcedRestart` | ✅ |
66
61
  | a server recovered | `onRecovered` | ⬜ |
67
62
  | host thresholds breached, and recovered | `onHost` | ✅ |
68
- | a dynamic DNS record changed, or a pass failed | `onDdns` | ✅ |
69
-
70
- A **forced restart** is two messages, not one: the restart is announced, and then its outcome is —
71
- the entry is serving again, or it did not come back (in which case its crash is the second message).
72
- That is what makes "restarted and fine" distinguishable from "restarted and still broken" without
73
- reading the panel.
63
+ | a [dynamic DNS](./DDNS.md) record changed, or a pass failed | `onDdns` | ✅ |
74
64
 
75
- Host thresholds themselves — disk, memory, swap, load, temperature — are **Global settings → Host
76
- vitals**. Dynamic DNS carries one message per pass that changed a record, and one per failed pass —
77
- see [DDNS.md](./DDNS.md).
65
+ A job that succeeded or that a person stopped sends nothing. A **forced restart** is two messages: the
66
+ restart, then its outcome (serving again, or a crash). Host thresholds — disk, memory, swap, load,
67
+ temperature — are set in **Global settings → Host vitals**.
78
68
 
79
69
  ## Webhooks
80
70
 
81
- A webhook is a URL, a method, a body format and a set of headers — a **list**, so one panel can alert
82
- several places. It is what covers everything other than Telegram, because those services differ only
83
- in the shape of the request:
71
+ A webhook destination is a URL, a method (`POST` or `PUT`), a body format and a set of headers. It
72
+ covers every service other than Telegram:
84
73
 
85
74
  | | URL | Body | Headers |
86
75
  | --- | --- | --- | --- |
87
- | **ntfy** | `https://ntfy.sh/<topic>` | `plain text` | `Title: home-hosted` (ntfy reads the title here), `Priority: default`, and `Authorization: Bearer <token>` when the topic needs one |
76
+ | **ntfy** | `https://ntfy.sh/<topic>` | `plain text` | `Title: home-hosted`, `Priority: default`, and `Authorization: Bearer <token>` when the topic needs one |
88
77
  | **Discord** | your webhook URL | `JSON` | none — the payload fills `content` |
89
78
  | **Slack** | your webhook URL | `JSON` | none — the payload fills `text` |
90
79
  | **anything else** | your URL | either | whatever it needs |
91
80
 
92
- The JSON body carries the same event under several names (`text`, `content`, `title`, `message`,
93
- `reason`, `server`, `label`, `at`), so a receiver reads whichever it knows. `format: text` sends the
94
- message alone, which is what ntfy's publish API expects — pointed at ntfy with `format: json` it
95
- would show the JSON itself as the notification.
81
+ The JSON body carries the event under several names (`text`, `content`, `title`, `message`, `reason`,
82
+ `server`, `label`, `at`), so a receiver reads whichever it knows. `workspaceId` names the workspace the
83
+ server or job belongs to (absent on a test send). With more than one workspace, the message names the
84
+ server as `workspace/server`. `format: text` sends the message
85
+ alone, which is what ntfy expects.
96
86
 
97
- Headers are `Name: value` per line, with the split on the **first** colon so a token containing one
98
- survives. `${ENV}` expands in the URL and in the values, the same rule the rest of the config follows
99
- — so a token stays out of `settings.json` entirely:
87
+ Headers are `Name: value` per line, split on the **first** colon. `${ENV}` expands in the URL and the
88
+ values, so a token can stay out of `settings.json`:
100
89
 
101
90
  ```json
102
91
  { "headers": "Authorization: Bearer ${HH_WEBHOOK_TOKEN}" }
103
92
  ```
104
93
 
105
- A literal token in a header works too, but it then lives in the workspace's `settings.json` — a plain
106
- config file, shown back on the settings page and carried by every backup of that workspace's settings.
107
- Prefer the placeholder above (the variable is read from the panel's environment, so set it where the
108
- panel starts), and treat that file as sensitive if you do use a literal.
109
-
110
- A redirect from the receiver is **not followed**: following one would hand the headers above to
111
- whatever address the receiver names, and could drop https for http. The send fails with the
112
- `Location` it was pointed at — set the URL to that final address.
94
+ The variable is read from the panel's environment. A literal token works too, but then it sits in the
95
+ workspace's `settings.json`, is shown on the settings page, and is carried by every backup.
113
96
 
114
- Two destinations cannot share an `id`: it keys a destination's throttle, its last-result record **and
115
- a Telegram destination's bot token**, so a duplicate would make two behave as one. The save is
116
- refused and names the id, and so is a webhook whose URL is missing or not http(s) — an enabled
117
- destination that can never send.
97
+ - **A redirect is not followed**, since it would hand your headers to another address. The send fails
98
+ naming the `Location`; set the URL to that address.
99
+ - **Header values are bytes up to `0xFF`**: Latin-1 (`Serveur arrêté`) is fine, but an emoji or a name
100
+ with a space is refused. For such a title, use `format: json` and let the receiver read `title`, or
101
+ ntfy's encoded form, `Title: =?UTF-8?B?8J+UtA==?=`.
102
+ - A header named `Content-Type` (any case) **replaces** the default rather than being sent beside it.
103
+ - **Send a test** uses the values *in the form*, saved or not.
104
+ - Two destinations cannot share an `id`, and a webhook with a missing or non-http(s) URL is refused on
105
+ save.
118
106
 
119
- **Send a test** on a destination tries the values *in the form*, so an unsaved URL and header block
120
- are what gets exercised.
107
+ **The panel will send to any address you give it, including one on your own network** — no
108
+ allow-list, because alerting a LAN service is a normal home setup. This is no escalation: a credential
109
+ that can save a webhook (`config` scope) can already declare a server that runs any command
110
+ ([SECURITY.md](./SECURITY.md)). Still, **do not paste a URL you did not write yourself.**
121
111
 
122
112
  ## Where the token lives
123
113
 
124
- The workspace's `.hh/<workspace>/.secrets.json`, mode `0600`, next to that workspace's DDNS
125
- credentials, as a map from **destination id** to bot token. The password and API-token hashes are panel-wide and live in
126
- `.hh/.control-secrets.json`. The token is never written into `servers.config.json`, so committing or
127
- sharing a config cannot leak it — and `GET /api/settings/workspace` reports `tokenSet: true|false`,
128
- never the token itself.
129
-
130
- ## Delivery failures
131
-
132
- Sends are fire-and-forget: supervision never waits on a chat or webhook API. A failure is logged, and
133
- the last outcome is recorded per destination and shown on its row, so a wrong chat id or an
134
- unreachable URL is visible there instead of silently swallowing alerts.
135
-
136
- A failed send does **not** start the throttle window: a window is for a message that arrived, so a
137
- receiver that was down for one alert still hears the next one. Otherwise the alert that would have
138
- reached a receiver which came back up is the one the outage took.
139
-
140
- ## Throttling
141
-
142
- `cooldownMs` (default two minutes) is per **destination, server and reason**, so a flapping process
143
- cannot flood any one destination — and one destination inside its window never silences another. It
144
- lives in the general block, or on a destination that has **Own settings** on, and its box edits
145
- **seconds** (`0` turns the throttle off). Clearing the box keeps the value it held, so retyping it
146
- cannot switch the throttle off by accident.
147
-
148
- ## Header limits
114
+ In the workspace's `.hh/<workspace>/.secrets.json` (mode `0600`), keyed by destination id — never in a
115
+ config file. `GET /api/settings/workspace` reports only `tokenSet: true|false`.
149
116
 
150
- A webhook's headers are **HTTP headers**, which are byte strings, so their values carry no character
151
- above `0xFF`: `Title: 🔴 server down` is refused with the line named rather than sent, and the same
152
- goes for a name holding a space or a non-ASCII letter. Two ways around it for a title that needs one:
117
+ ## Delivery failures and throttling
153
118
 
154
- - send `format: json` and let the receiver read `title` from the body (Discord and Slack do);
155
- - encode the value the way ntfy documents it: `Title: =?UTF-8?B?8J+UtA==?=`, which is a base64
156
- UTF-8 header value.
119
+ A failure is logged and its result shown on that destination's row, so a wrong chat id or an
120
+ unreachable URL is visible rather than silently swallowing alerts.
157
121
 
158
- Latin-1 accents (`Serveur arrêté`) are fine as written. A name is matched case-insensitively against
159
- the default `content-type`, so `Content-Type: application/x-www-form-urlencoded` **replaces** it
160
- rather than being sent beside it.
122
+ `cooldownMs` (default two minutes) throttles per **destination, server and reason**, so a flapping
123
+ process cannot flood one destination and one destination's window never silences another. Its box
124
+ edits **seconds**; `0` turns the throttle off.
161
125
 
126
+ - A failed send does not start the window, so the next alert still goes out.
127
+ - A state change inside the window is not lost: if a server goes unhealthy, recovers and goes unhealthy
128
+ again, the state it ends in is sent when the window closes. A flap that ends where it began stays
129
+ one message.