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
@@ -0,0 +1,34 @@
1
+ import type { Context, Next } from 'hono';
2
+ import type { ApiTokenScope } from '../config/secrets.js';
3
+ /**
4
+ * What an API token needs for each route, declared once and never inside a handler. Scopes are
5
+ * cumulative: `admin` implies the rest, and `config`/`lifecycle` imply `read`.
6
+ */
7
+ export interface TokenScopeRule {
8
+ scope: ApiTokenScope;
9
+ /**
10
+ * `true`: limited by `?workspace=`. `'path'`: the workspace is the subject, named in the URL.
11
+ * `'all'`: the route spans every workspace, so a limited account is refused outright.
12
+ */
13
+ workspaceScoped: boolean | 'path' | 'all';
14
+ }
15
+ /**
16
+ * The scope a request needs, or `null` when no rule names it. Exact match first, so a literal like
17
+ * `/api/servers/start-all` is never read as `/api/servers/:id`.
18
+ */
19
+ export declare function tokenScopesFor(method: string, path: string): ApiTokenScope | null;
20
+ export declare function tokenAllows(held: readonly ApiTokenScope[], needed: ApiTokenScope): boolean;
21
+ export declare function declaredTokenScopes(): Array<{
22
+ route: string;
23
+ scope: ApiTokenScope;
24
+ workspaceScoped: TokenScopeRule['workspaceScoped'];
25
+ }>;
26
+ export interface TokenScopeGuardDeps {
27
+ /** The workspace a request without `?workspace=` resolves to; the limit is checked against it. */
28
+ defaultWorkspaceId: () => string;
29
+ }
30
+ /**
31
+ * Refuses a token whose scopes do not cover the route, and any undeclared route (fail-closed).
32
+ * Runs after the auth guard; a no-op for sessions and unarmed loopback, since scopes are about tokens.
33
+ */
34
+ export declare function createTokenScopeGuard(deps: TokenScopeGuardDeps): (c: Context, next: Next) => Promise<void>;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The Node types the published declarations mention, declared locally.
3
+ *
4
+ * Generated by `scripts/build-types.mjs`. This file exists so `home-hosted/client` can be typed in a
5
+ * project that does not install `@types/node` — the panel's server-side types are an implementation
6
+ * detail of the package, not something an app author should have to depend on.
7
+ */
8
+
9
+ /** The parts of a Node `Buffer` the published types mention. A `Uint8Array` is what it is. */
10
+ export type Buffer = Uint8Array
11
+
12
+ /** The parts of a child process handle the published types mention. */
13
+ export interface ChildProcess {
14
+ readonly pid?: number
15
+ readonly exitCode: number | null
16
+ readonly signalCode: NodeJS.Signals | null
17
+ kill: (signal?: NodeJS.Signals | number) => boolean
18
+ }
19
+
20
+ declare global {
21
+ // eslint-disable-next-line ts/no-namespace
22
+ namespace NodeJS {
23
+ interface Timeout {
24
+ ref: () => this
25
+ unref: () => this
26
+ hasRef: () => boolean
27
+ refresh: () => this
28
+ close: () => void
29
+ [Symbol.toPrimitive]: () => number
30
+ }
31
+
32
+ type Signals = string
33
+ type Platform = string
34
+ type ProcessEnv = Record<string, string | undefined>
35
+
36
+ interface ErrnoException extends Error {
37
+ errno?: number
38
+ code?: string
39
+ path?: string
40
+ syscall?: string
41
+ }
42
+ }
43
+ }
@@ -1,22 +1,7 @@
1
1
  /**
2
- * The browsable API reference at `/openapi/ui`.
3
- *
4
- * It used to be `Scalar()`, whose HTML is a `<script type="module">` importing the reference from
5
- * `cdn.jsdelivr.net` and nothing else — so with no route to the internet `#app` held 0 children and 0
6
- * characters. Measured in Chromium with every non-panel request aborted; the same page made 30 off-origin
7
- * requests and pulled a 754 KB bundle when it could reach them.
8
- *
9
- * Scalar itself is not the limitation: its standalone bundle renders fine offline when it is served
10
- * alongside the panel. It weighs 4.9 MB, and `docs/UI_CREATION.md` point 5 says an offline home server
11
- * should not need a CDN, so shipping that to every install is a worse trade than rendering the route
12
- * index from `/openapi/spec.json` — grouped by tag, every operation with its method, path and summary —
13
- * and offering the interactive browser to whoever can reach it. The index is what renders first and
14
- * stays if the import fails, so the page is never blank.
15
- *
16
- * The spec stays the single source of truth; this file only formats what the routes already declare.
17
- */
18
- /**
19
- * Deliberately a string, not a `.vue` or a template dependency: this route is outside `/api` and outside
20
- * both UIs, and `src/**` may not know a UI's files.
2
+ * The browsable API reference at `/openapi/ui`: a route index rendered from `/openapi/spec.json`,
3
+ * which works offline, enhanced with Scalar from the CDN when reachable. The index stays if the
4
+ * import fails, so the page is never blank.
21
5
  */
6
+ /** A string, not a template dependency: this route is outside both UIs, and `src/**` may not know their files. */
22
7
  export declare function openApiReferencePage(specUrl: string): string;
@@ -1,11 +1,8 @@
1
1
  import { generateSpecs } from 'hono-openapi';
2
2
  /**
3
- * The machine-readable contract, generated from the same ArkType schemas the
4
- * routes validate with — one source of truth, no second set of DTOs to drift.
5
- * `/openapi/ui` is the browsable reference and needs no session, since a UI
6
- * author has to be able to read it before they can log in.
3
+ * The machine-readable contract, generated from the ArkType schemas the routes validate with.
4
+ * `/openapi/ui` needs no session, so a UI author can read it before logging in.
7
5
  */
8
- /** The version the package was built with, so the spec never drifts from it. */
9
6
  export declare function setupOpenAPI(app: Parameters<typeof generateSpecs>[0]): import("hono/hono-base").HonoBase<import("hono").Env, {
10
7
  "/openapi/spec.json": {
11
8
  $get: {
@@ -28,7 +25,7 @@ export declare function setupOpenAPI(app: Parameters<typeof generateSpecs>[0]):
28
25
  };
29
26
  }, "/", "/openapi/ui">;
30
27
  /**
31
- * What the route table cannot say for itself: which credential each group takes, the failures the
32
- * guards answer before any handler runs, and a body on every documented error.
28
+ * What the route table cannot say for itself: each group's credential, the guards' failures, a body
29
+ * on every documented error, and the named components in `rendered`.
33
30
  */
34
- export declare function finishSpec(spec: Record<string, unknown>): Record<string, unknown>;
31
+ export declare function finishSpec(spec: Record<string, unknown>, rendered: Record<string, unknown>): Record<string, unknown>;
@@ -1,50 +1,33 @@
1
1
  /** Recognised by content, never by the file's name. */
2
2
  export declare function isZipArchive(file: string): boolean;
3
3
  export interface ArchiveEntry {
4
- /** Forward-slash path inside the archive; directories end with `/`. */
5
4
  name: string;
6
5
  directory: boolean;
7
6
  encrypted: boolean;
8
7
  symlink: boolean;
9
8
  /** Uncompressed size, for callers that cap what they will extract. */
10
9
  size: number;
11
- /** The Unix mode the entry carries, when the archive recorded one. */
12
10
  mode?: number;
13
11
  }
14
12
  /** The central directory is not encrypted, so this works without a password. */
15
13
  export declare function listZip(file: string): Promise<ArchiveEntry[]>;
16
14
  /**
17
- * True when the archive rejected the password we used.
18
- *
19
- * Matched on the wording zip.js raises for a bad password, not on the word alone: the message is
20
- * `Invalid password`, while a *file it cannot open* produces `ENOENT: … stat '/tmp/…/my-password-
21
- * backup.zip'` — which carries the word because the caller named the archive that. A substring test
22
- * read that as a wrong password and told the person to re-enter one, when the archive was simply
23
- * not there. (Caught by CI, where Node's fs message names the path; the local run said
24
- * `Unable to open file as blob`, so the same call looked fine.)
15
+ * True when the archive rejected the password. Matched on zip.js's exact wording: a missing file
16
+ * whose path contains "password" must not read as a wrong password.
25
17
  */
26
18
  export declare function isInvalidPassword(error: unknown): boolean;
27
19
  /**
28
- * Writes the contents of `sourceDir` into `destination`, preserving the tree and each
29
- * entry's permission bits.
30
- *
31
- * The mode is captured because the tree is somebody's data directory: a `0600` key, a `0700`
32
- * directory and a `0755` script are all routine there, and a backup that restores them as `0644`
33
- * changes who can read the data it was taken to protect. What a symlink may bring in is bounded by
34
- * the tree itself (`walk`): the target has to be inside it, so a declared path cannot capture bytes
35
- * from outside itself. Streams from disk to disk: nothing is buffered whole.
20
+ * Writes `sourceDir` into `destination`, streaming disk to disk and keeping each entry's permission
21
+ * bits (a `0600` key restored as `0644` would change who can read it). Symlinks may only bring in
22
+ * content from inside the tree (`walk`).
36
23
  */
37
24
  export declare function createZip(sourceDir: string, destination: string, options?: {
38
25
  password?: string;
39
26
  }): Promise<void>;
40
27
  /**
41
- * Extracts the given entries (already validated by the caller) into
42
- * `destination`. Symbolic links are never recreated — an archive is not allowed
43
- * to make the filesystem point somewhere else.
44
- *
45
- * An entry's permission bits are applied after it lands. The file is created under a restrictive
46
- * mode first, so a `0600` secret never exists world-readable between two calls, and a mode the
47
- * current umask would widen is set with an explicit `chmod` rather than left to the create.
28
+ * Extracts the given entries (already validated by the caller) into `destination`. Symbolic links
29
+ * are never recreated. Permission bits are applied after a file is created under a restrictive mode,
30
+ * so a `0600` secret is never world-readable in between.
48
31
  */
49
32
  export declare function extractZip(file: string, destination: string, options: {
50
33
  names: string[];
@@ -1,12 +1,7 @@
1
1
  import type { BackupHookConfig, ServerConfig } from '../shared/contracts.js';
2
2
  /**
3
- * Runs one backup hook (`dump` before capture, `load` after restore).
4
- *
5
- * Same discipline as `bootstrap`: one program plus args, never a shell string, so a path with a space
6
- * cannot become two arguments and nothing is interpreted. Not the same code, because the failure
7
- * handling is the opposite — a bootstrap is best-effort and a hook is not. A `dump` that fails must
8
- * refuse the backup: archiving the live data directory beside a failed dump would produce an archive
9
- * that looks complete and is not.
3
+ * Runs one backup hook (`dump` before capture, `load` after restore): one program plus args, never a
4
+ * shell string. Unlike `bootstrap` it is not best-effort — a failed `dump` must refuse the backup.
10
5
  */
11
6
  export interface HookResult {
12
7
  ok: boolean;
@@ -16,19 +11,9 @@ export interface HookResult {
16
11
  /** Set when the process could not be started or timed out. */
17
12
  error?: string;
18
13
  }
19
- /**
20
- * Run a hook for one entry.
21
- *
22
- * `dumpDir` is passed in rather than templated by the caller so the same absolute path can be handed
23
- * to `dump` and later to `load`, which is what makes the pair symmetric.
24
- */
14
+ /** Run a hook for one entry. `dumpDir` is passed in so `dump` and `load` get the same absolute path. */
25
15
  export declare function runBackupHook(hook: BackupHookConfig, server: ServerConfig, dumpDir: string, options?: {
26
16
  requireDumpDir?: boolean;
27
17
  }): Promise<HookResult>;
28
- /**
29
- * The line a person reads when a hook fails.
30
- *
31
- * Names the entry, the program and the last thing it said — a bare "the backup failed" would send
32
- * them to the panel's log to find out which of five databases refused.
33
- */
18
+ /** The line a person reads when a hook fails: the entry, the program and its last output. */
34
19
  export declare function hookFailure(action: 'dump' | 'load', server: ServerConfig, result: HookResult): string;
@@ -4,9 +4,6 @@ export interface DyndnsReply {
4
4
  /** Everything after the code, typically the address the provider now serves. */
5
5
  detail: string;
6
6
  }
7
- /** The first word of the body is the code; the rest is provider detail. */
8
- export declare function parseDyndnsReply(body: string): DyndnsReply;
9
- /** Maps a dyndns2 body onto the panel's result shape. */
10
7
  export declare function describeDyndnsReply(body: string, provider: string): DdnsResult;
11
8
  /**
12
9
  * A 401/400 with a non-dyndns2 body is still an answer worth quoting; a known
@@ -5,8 +5,7 @@ export declare const DDNS_PROVIDERS: readonly DdnsProvider[];
5
5
  export declare function ddnsProvider(id: string): DdnsProvider | null;
6
6
  export declare function ddnsProviderInfos(): DdnsProviderInfo[];
7
7
  /**
8
- * Cross-field problems ArkType cannot see. Credentials are deliberately not
9
- * required here: an account is normally added before its secret is typed in,
10
- * and a missing secret is reported per record instead of blocking the save.
8
+ * Cross-field problems ArkType cannot see. Credentials are not required: a missing secret is
9
+ * reported per record instead of blocking the save.
11
10
  */
12
11
  export declare function validateDdnsConfig(config: DdnsConfig): string[];
@@ -1,11 +1,4 @@
1
1
  import type { DdnsFetch } from './types.js';
2
- /**
3
- * Keyless public-address services. The family-specific hostnames are the point:
4
- * a bare `ipify.org` answers over whichever family the connection happened to
5
- * take, which is exactly what an AAAA update must not get.
6
- */
7
- export declare const DEFAULT_IPV4_ENDPOINTS: string[];
8
- export declare const DEFAULT_IPV6_ENDPOINTS: string[];
9
2
  /** RFC1918, loopback, link-local, CGNAT, documentation, benchmarking and multicast/reserved are never a public DNS target. */
10
3
  export declare function isPublicAddress(ip: string, family: 'A' | 'AAAA'): boolean;
11
4
  /**
@@ -13,15 +6,12 @@ export declare function isPublicAddress(ip: string, family: 'A' | 'AAAA'): boole
13
6
  * Cloudflare `cdn-cgi/trace` body (`ip=…`), or a small JSON object.
14
7
  */
15
8
  export declare function parseAddressResponse(text: string, family: 'A' | 'AAAA'): string | null;
16
- /** One address lookup; the pass's own deadline still bounds the whole list. */
17
- export declare const DETECT_TIMEOUT_MS = 10000;
18
9
  export interface DetectResult {
19
10
  ip: string | null;
20
11
  error: string | null;
21
12
  }
22
13
  /**
23
- * Tries the configured endpoint, or the built-in list in order, and returns the
24
- * first address that is really public. A transient failure never deletes a
25
- * record; it just leaves the previous one in place.
14
+ * The configured endpoint, or the built-in list in order, returning the first really public address.
15
+ * A transient failure never deletes a record.
26
16
  */
27
17
  export declare function detectPublicAddress(family: 'A' | 'AAAA', overrideUrl: string, fetchImpl: DdnsFetch, signal?: AbortSignal, timeoutMs?: number): Promise<DetectResult>;
@@ -6,8 +6,9 @@ export interface NamecheapRecord {
6
6
  mxPref: string;
7
7
  ttl: string;
8
8
  }
9
- /** Every `<Host ... />` in a `getHosts` reply, in the order the API listed them. */
10
9
  export declare function parseHosts(body: string): NamecheapRecord[];
11
- /** The first `<Err1>`…`<ErrN>` a failed reply carries, as one sentence. */
10
+ /** The errors a failed reply carries, as one sentence, from both `<Error Number>` and `<ErrN>` shapes. */
12
11
  export declare function describeErrors(body: string): string;
12
+ /** The numeric codes from `<Error Number="…">` elements (e.g. `1011102`, invalid API key). */
13
+ export declare function errorCodes(body: string): string[];
13
14
  export declare const namecheapApiProvider: DdnsProvider;
@@ -1,8 +1,4 @@
1
1
  import type { DdnsProviderField, DdnsRecordType } from '../../shared/contracts.js';
2
- /**
3
- * One record to keep current. Providers are stateless adapters over one HTTP
4
- * call each, so everything they need is resolved before they are called.
5
- */
6
2
  /** Provider ids the panel may have cached (a Cloudflare zone, a record), so the next pass skips lookups. */
7
3
  export interface DdnsRecordCache {
8
4
  zoneId?: string;
@@ -12,7 +8,7 @@ export interface DdnsRecord {
12
8
  host: string;
13
9
  type: DdnsRecordType;
14
10
  ip: string;
15
- /** The registered domain, when the config pins it; providers that need a zone fall back to a heuristic. */
11
+ /** The registered domain, when pinned; providers that need a zone otherwise guess. */
16
12
  zone?: string;
17
13
  /** Seconds; `1` is "automatic" where the provider supports it. */
18
14
  ttl: number;
@@ -21,7 +17,6 @@ export interface DdnsRecord {
21
17
  }
22
18
  export type DdnsFetch = (input: string, init?: RequestInit) => Promise<Response>;
23
19
  export interface DdnsContext {
24
- /** Whatever the person stored for this account; provider fields only. */
25
20
  credentials: Record<string, string>;
26
21
  fetch: DdnsFetch;
27
22
  signal?: AbortSignal;
@@ -34,44 +29,29 @@ export interface DdnsResult {
34
29
  error?: string;
35
30
  /** The provider refused in a way retrying cannot fix (bad credentials, unknown host, abuse block). */
36
31
  permanent?: boolean;
37
- /** Provider ids worth remembering, so the next pass skips a lookup. */
38
32
  cache?: DdnsRecordCache;
39
33
  }
40
34
  export interface DdnsProvider {
41
35
  id: string;
42
36
  label: string;
43
37
  docsUrl: string;
44
- /** Record families this provider can manage. */
45
38
  families: DdnsRecordType[];
46
39
  fields: DdnsProviderField[];
47
40
  /** The provider honours a per-record TTL. */
48
41
  ttl: boolean;
49
42
  /** The provider has a proxy/CDN flag (Cloudflare). */
50
43
  proxied: boolean;
51
- /**
52
- * Non-null when the stored credentials cannot drive this provider yet.
53
- */
44
+ /** Non-null when the stored credentials cannot drive this provider yet. */
54
45
  validate: (credentials: Record<string, string> | null) => string | null;
55
- /**
56
- * Keeps one address record current. Absent for a provider that exists only to
57
- * answer DNS-01 challenges — an account on one of those cannot be used as a DDNS
58
- * hostname, and saying so beats a stub that pretends to work.
59
- */
46
+ /** Keeps one address record current. Absent for a provider that only answers DNS-01 challenges. */
60
47
  update?: (record: DdnsRecord, context: DdnsContext) => Promise<DdnsResult>;
61
- /**
62
- * Present when these credentials can answer an ACME DNS-01 challenge, which
63
- * needs a temporary `TXT` record — a capability the update path does not imply.
64
- * A router-style Dynamic DNS password cannot write TXT, so it is absent there.
65
- */
48
+ /** Present when these credentials can write the temporary `TXT` record of an ACME DNS-01 challenge. */
66
49
  challenge?: (record: DdnsChallengeRecord, context: DdnsContext) => Promise<DdnsChallengeResult>;
67
50
  }
68
51
  /** One `_acme-challenge` TXT record, as the ACME server asked for it. */
69
52
  export interface DdnsChallengeRecord {
70
- /** The full name the CA reads, e.g. `_acme-challenge.git.example.com`. */
71
53
  fqdn: string;
72
- /** The value the CA expects to find. */
73
54
  value: string;
74
- /** `present` writes it, `cleanup` removes it again. */
75
55
  action: 'present' | 'cleanup';
76
56
  }
77
57
  export interface DdnsChallengeResult {
@@ -81,18 +61,12 @@ export interface DdnsChallengeResult {
81
61
  export declare function succeeded(message: string, changed: boolean): DdnsResult;
82
62
  export declare function failed(error: string, permanent?: boolean): DdnsResult;
83
63
  /**
84
- * The result of the write six providers end their `update()` with.
85
- *
86
- * They repeated the same two lines after their own write call, and they have to agree: a
87
- * non-ok response is a provider error with its body attached, and an ok one is a change.
88
- * The message names the record, because a settings page shows it as the account's last
89
- * result and "ok" would not say what actually moved.
64
+ * The result of a provider's write: a non-ok response is an error with its body, an ok one a change.
65
+ * The message names the record.
90
66
  */
91
67
  export declare function wrote(response: Response, record: DdnsRecord): Promise<DdnsResult>;
92
- /** Missing required credential keys, as a sentence for the settings page. */
93
68
  export declare function missingFields(credentials: Record<string, string> | null, keys: string[]): string | null;
94
69
  export declare function basicAuth(user: string, password: string): string;
95
70
  /** A provider error body is useful, but never worth throwing over. */
96
71
  export declare function errorText(response: Response, limit?: number): Promise<string>;
97
- /** `Sub.Domain.COM.` -> `sub.domain.com`; DuckDNS and friends are case-insensitive. */
98
72
  export declare function normalizeHost(host: string): string;
@@ -4,8 +4,5 @@ export interface HostParts {
4
4
  /** The record name inside that zone; `@` for the apex. */
5
5
  name: string;
6
6
  }
7
- /**
8
- * Splits a hostname into the zone and the record name, which is what every
9
- * provider that has no zone lookup needs. `zone` short-circuits the heuristic.
10
- */
7
+ /** Splits a hostname into zone and record name; `zone` short-circuits the heuristic. */
11
8
  export declare function splitHost(host: string, zone?: string): HostParts;
@@ -1,42 +1,34 @@
1
- /** One container docker reports, with the labels that attribute it to a project. */
2
1
  export interface ContainerRow {
3
2
  id: string;
4
3
  name: string;
5
4
  project: string | null;
6
5
  configFiles: string[];
7
6
  }
8
- /** What one compose entry's containers add up to. */
9
7
  export interface ComposeReading {
10
8
  /** Summed CPU share, so 200 is two saturated cores. */
11
9
  cpuPercent: number;
12
10
  rssBytes: number;
13
11
  /** Processes inside the containers — the same question the tree sampler answers. */
14
12
  processes: number;
15
- /** How many containers the sum covers. */
16
13
  containers: number;
17
14
  }
18
- /** The evidence that an entry runs a compose project, and the key its containers are attributed by. */
19
15
  export interface ComposeTarget {
20
- /** What the caller looks the reading up by: the project, else the compose files. */
16
+ /** The project, else the compose files. */
21
17
  key: string;
22
18
  project: string | null;
23
19
  configFiles: string[];
24
20
  }
25
- /** `816KiB` -> bytes. Docker prints binary units for memory, and `0B` for a container that is not running. */
21
+ /** `816KiB` -> bytes. Docker prints binary units, and `0B` for a container that is not running. */
26
22
  export declare function parseHumanBytes(value: string): number | null;
27
23
  /** `MemUsage` is `used / limit`; only the used part measures this stack. */
28
24
  export declare function parseMemUsage(value: string): number | null;
29
25
  /** `99.61%` -> 99.61. `--` is docker's "no reading", which must not become a zero. */
30
26
  export declare function parsePercent(value: string): number | null;
31
- /** The containers docker reports, from the tab-separated `--format` above. */
32
27
  export declare function parseDockerPs(text: string): ContainerRow[];
33
- /** Per-container readings from `docker stats --no-stream --format json`, keyed by container id. */
34
28
  export declare function parseDockerStats(text: string): Map<string, Omit<ComposeReading, 'containers'>>;
35
29
  /**
36
- * The compose options before the subcommand, and where the subcommand starts.
37
- *
38
- * Compose requires its global options **before** the subcommand — it answers `unknown shorthand
39
- * flag: 'p'` for `up -p x` — so only this leading run can carry the project name or the file.
30
+ * The compose options before the subcommand, and where the subcommand starts. Compose requires its
31
+ * global options before the subcommand, so only this leading run can carry the project or the file.
40
32
  */
41
33
  export declare function parseComposeHead(args: string[]): {
42
34
  subcommandAt: number;
@@ -44,14 +36,12 @@ export declare function parseComposeHead(args: string[]): {
44
36
  files: string[];
45
37
  projectDirectory: string | null;
46
38
  };
47
- /** The compose file compose would pick: the first known name here or in a parent directory. */
48
39
  export declare function findComposeFile(from: string): string[];
49
- /** Whether this argv runs a compose stack, without resolving anything — a cheap pre-check. */
40
+ /** Whether this argv runs a compose stack, without resolving anything. */
50
41
  export declare function isComposeCommand(command: string, args: string[]): boolean;
51
42
  /**
52
- * The compose project an entry runs, from evidence in its own config: the command it spawns, its
53
- * argv, its cwd and its environment. `null` means "sample the process tree", which is the right
54
- * answer for every entry this cannot attribute honestly — see the module comment for the limits.
43
+ * The compose project an entry runs, from evidence in its own config. `null` means "sample the
44
+ * process tree", the answer for every entry this cannot attribute honestly.
55
45
  */
56
46
  export declare function composeTarget(input: {
57
47
  command: string;
@@ -60,18 +50,13 @@ export declare function composeTarget(input: {
60
50
  env?: Record<string, string | undefined>;
61
51
  }): ComposeTarget | null;
62
52
  /**
63
- * The containers belonging to one target, or `null` when that cannot be decided.
64
- *
65
- * `null` is the ambiguity refusal: two projects sharing a compose file can only be told apart by an
66
- * explicit project name, so picking one would report another stack's CPU and RSS as this entry's.
53
+ * The containers belonging to one target, or `null` when that cannot be decided: two projects
54
+ * sharing a compose file can only be told apart by an explicit project name.
67
55
  */
68
56
  export declare function attributeContainers(target: ComposeTarget, rows: ContainerRow[]): ContainerRow[] | null;
69
57
  /**
70
- * The sum over one project's containers.
71
- *
72
- * Exported so the arithmetic is testable against the shapes docker actually prints; the class below
73
- * only decides when to spawn. `null` for no containers, and for a listed container without a
74
- * reading — an under-report is the one direction a memory ceiling must not miss.
58
+ * The sum over one project's containers. `null` for no containers, and for a listed container
59
+ * without a reading: an under-report is the one direction a memory ceiling must not miss.
75
60
  */
76
61
  export declare function sumContainers(rows: ContainerRow[], readings: Map<string, Omit<ComposeReading, 'containers'>>): ComposeReading | null;
77
62
  /** Whether a container publishing a port belongs to the stack this entry itself declares. */
@@ -79,39 +64,27 @@ export declare function isOwnStack(holder: {
79
64
  project: string | null;
80
65
  composeDir: string | null;
81
66
  }, target: ComposeTarget | null): boolean;
82
- /** One target's running containers from a fresh `docker ps`, or `null` when docker cannot answer. */
83
- export declare function composeContainers(target: ComposeTarget): Promise<ContainerRow[] | null>;
84
67
  /**
85
- * Stops every container of one target and reports what is still running afterwards.
86
- *
87
- * The answer comes from a **fresh listing**, not from `docker stop`'s exit code: a stop that
88
- * printed success for a container still listed is the empty success this exists to refuse.
89
- * `null` means docker could not be asked, which is not the same as "it stopped".
68
+ * Stops every container of one target and reports what is still running, from a fresh listing
69
+ * rather than `docker stop`'s exit code. `null` means docker could not be asked.
90
70
  */
91
71
  export declare function stopComposeContainers(target: ComposeTarget): Promise<{
92
72
  stopped: string[];
93
73
  survivors: string[];
94
74
  } | null>;
95
75
  /**
96
- * Container readings per compose project, refreshed out of band.
97
- *
98
- * One `docker ps` and one batched `docker stats` serve every docker-backed entry, however many
99
- * there are. When docker cannot be reached the cache is emptied rather than filled with zeros: the
100
- * caller keeps the process-tree sample, which is at least true of the wrapper, and a metric with no
101
- * reading is never published as an idle one.
76
+ * Container readings per compose project, refreshed out of band. When docker cannot be reached
77
+ * the cache is emptied rather than filled with zeros; the caller keeps the process-tree sample.
102
78
  */
103
79
  export declare class DockerMetrics {
104
80
  private cache;
105
81
  private refreshing;
106
82
  /**
107
- * The last completed readings, and a refresh started when they are stale.
108
- *
109
- * Deliberately synchronous: the spawn takes seconds, and awaiting it here would stretch the
110
- * supervisor tick that publishes the whole state frame. A fresh reading lands on a later tick.
83
+ * The last completed readings, and a refresh started when they are stale. Synchronous: awaiting
84
+ * the spawn would stretch the tick. Pass every live compose target — one the cache never asked
85
+ * about counts as stale.
111
86
  */
112
87
  readings(targets: ComposeTarget[], now?: number): ReadonlyMap<string, ComposeReading>;
113
- /** Resolves once the refresh in flight, if any, has finished. */
114
88
  settle(): Promise<void>;
115
- /** One listing and one batched stats call; replaces the cache only with a complete answer. */
116
89
  refresh(targets: ComposeTarget[], now?: number): Promise<void>;
117
90
  }
@@ -1,15 +1,10 @@
1
1
  import type { EntryState } from '../shared/contracts.js';
2
2
  /**
3
- * The small slice of a server's runtime the panel has to remember across its own
4
- * restarts: how much of the retry budget is spent, and whether a `runOnce` bootstrap
5
- * already ran.
6
- *
7
- * Both lived only in memory, so a panel restart — a `restart`, a crash, a reboot —
8
- * handed a crash-looping server a fresh `maxRetries` and re-ran its bootstrap. The
9
- * retry counter has to outlive the process that increments it to bound anything.
3
+ * The runtime the panel must remember across its own restarts: the spent retry budget and whether a
4
+ * `runOnce` bootstrap ran. In memory only, a restart reset a crash loop's `maxRetries`.
10
5
  */
11
- /** One JSON file per entry, beside the nanny's own state. */
12
6
  export declare function entryStatePath(dir: string, id: string): string;
13
7
  export declare function readEntryState(file: string): EntryState | null;
14
- export declare function writeEntryState(file: string, state: EntryState): void;
8
+ /** Best effort, like history: no state file must never stop supervision. False when the write failed. */
9
+ export declare function writeEntryState(file: string, state: EntryState): boolean;
15
10
  export declare function clearEntryState(file: string): void;
@@ -4,17 +4,13 @@ export interface HealthProbeResult {
4
4
  ms: number;
5
5
  detail: string;
6
6
  }
7
- /** TCP connect timing, used for the default `port` mode and readiness. */
8
7
  export declare function probeTcp(host: string, port: number, timeoutMs: number): Promise<HealthProbeResult>;
9
8
  export interface HttpProbeOptions extends Pick<HttpCheckConfig, 'scheme' | 'allowInvalidCert' | 'path' | 'method' | 'expectBody' | 'expectStatusBelow'> {
10
9
  /** `null` counts as "not set", so a value saved by the UI can be cleared again. */
11
10
  expectStatus?: number | null;
12
11
  timeoutMs: number;
13
12
  }
14
- /**
15
- * Fetches the configured path and asserts the response, so "listening" is not
16
- * mistaken for "working".
17
- */
13
+ /** Fetches the configured path and asserts the response, so "listening" is not mistaken for "working". */
18
14
  export declare function probeHttp(host: string, port: number, options: HttpProbeOptions): Promise<HealthProbeResult>;
19
15
  export declare function probeHealth(options: {
20
16
  mode: 'port' | 'http';