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
@@ -1,25 +1,9 @@
1
1
  /**
2
- * How a server's `cpuPercent` sits on **this machine**.
3
- *
4
- * A server's figure is summed over its process tree, so it counts *cores*: `400` is four busy cores
5
- * on any box, and on a 24-core host that is a sixth of the machine — normal work, not an emergency.
6
- * A chart with a fixed ceiling of `100` clipped those points to the top edge, and a colour band with
7
- * fixed `40`/`80` thresholds painted that busy worker red. Both answers were wrong in the same way:
8
- * they measured one core and called it the machine.
9
- *
10
- * So the scale is `cpus × 100`, and it is decided **here** rather than restated at each surface. The
11
- * stock card and detail page, and the noc-console list and detail page, all read it — the fourth copy
12
- * is what drifted, leaving the detail page's number red while its own sparkline stayed accent.
2
+ * How a server's `cpuPercent` sits on **this machine**: it is summed over the process tree, so it
3
+ * counts cores (`400` = four busy cores), and the scale is `cpus × 100`.
13
4
  */
14
5
  /** The chart's full scale: the whole machine's capacity in percent, floored at one core. */
15
6
  export declare function cpuCapacity(cpus: number | null | undefined): number;
16
- /** How urgent a cpu reading is, on that scale. */
17
7
  export type CpuBand = 'unknown' | 'ok' | 'warn' | 'danger';
18
- /**
19
- * The band a reading falls in, as a share of `capacity`.
20
- *
21
- * `null` is a reading that does not exist — a stopped entry — and it is its own band rather than
22
- * `'ok'`, because a missing measurement must never be painted as a healthy one. The thresholds are
23
- * the ones the per-core bands used (40% and 80%), now taken against the machine.
24
- */
8
+ /** 40% / 80% of capacity. A missing reading is `'unknown'`, never painted as healthy. */
25
9
  export declare function cpuBand(cpuPercent: number | null | undefined, cpus: number | null | undefined): CpuBand;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The few stderr lines worth putting beside a crash, oldest first.
3
+ *
4
+ * Node prints the message, then the stack, then `Node.js v24…`, so the *last* line of stderr is
5
+ * the banner and the line that names the cause sits above a dozen frames. Dropping the noise leaves
6
+ * the message as the tail.
7
+ */
8
+ export declare function crashExcerpt(lines: readonly string[] | undefined, max?: number): string[];
@@ -0,0 +1,70 @@
1
+ /** A 5-field cron expression (no macros) in the host's local timezone. Shared with the UIs: no `node:`. */
2
+ export interface CronSpec {
3
+ minutes: Set<number>;
4
+ hours: Set<number>;
5
+ daysOfMonth: Set<number>;
6
+ months: Set<number>;
7
+ /** `0` and `7` both mean Sunday, so both are in here. */
8
+ daysOfWeek: Set<number>;
9
+ /** Vixie cron: when **both** day fields are restricted, a day matching *either* is due. */
10
+ domRestricted: boolean;
11
+ dowRestricted: boolean;
12
+ }
13
+ export type CronParse = {
14
+ ok: true;
15
+ spec: CronSpec;
16
+ } | {
17
+ ok: false;
18
+ problem: string;
19
+ };
20
+ export declare function parseCron(expression: string): CronParse;
21
+ /** What is wrong with a schedule, or `null` when it parses. */
22
+ export declare function cronProblem(expression: string): string | null;
23
+ /** Whether this minute is one the expression selects (seconds ignored). */
24
+ export declare function cronDueAt(spec: CronSpec, date: Date): boolean;
25
+ /**
26
+ * The first minute strictly after `from` (the caller has handled `from`) that the expression selects,
27
+ * or `null` when it names a day that cannot occur. Jumps by whole units, so it costs few steps.
28
+ */
29
+ export declare function nextCronRun(spec: CronSpec, from?: Date): number | null;
30
+ /** The next `count` occurrences after `from`, fewer when the expression runs out within the search limit. */
31
+ export declare function nextCronRuns(spec: CronSpec, from: Date, count: number): number[];
32
+ /** The last minute at or before `at` that the expression selects, or `null`: "which occurrence is due now". */
33
+ export declare function previousCronRun(spec: CronSpec, at?: Date): number | null;
34
+ /** A schedule as a descriptor; each UI words it in its own language (`src/shared` has no i18n). */
35
+ export type CronSummary = {
36
+ kind: 'custom';
37
+ }
38
+ /** An every-n-minutes step with every other field wild. */
39
+ | {
40
+ kind: 'everyMinutes';
41
+ minutes: number;
42
+ }
43
+ /** `m * * * *`. */
44
+ | {
45
+ kind: 'hourly';
46
+ minute: number;
47
+ }
48
+ /** `m h * * *`. */
49
+ | {
50
+ kind: 'daily';
51
+ hour: number;
52
+ minute: number;
53
+ }
54
+ /** `m h * * w[,w…]`. */
55
+ | {
56
+ kind: 'weekly';
57
+ days: number[];
58
+ hour: number;
59
+ minute: number;
60
+ }
61
+ /** `m h d * *`. */
62
+ | {
63
+ kind: 'monthly';
64
+ day: number;
65
+ hour: number;
66
+ minute: number;
67
+ };
68
+ /** Falls back to `custom` rather than approximating. */
69
+ export declare function cronSummary(spec: CronSpec): CronSummary;
70
+ export declare function cronClock(hour: number, minute: number): string;
@@ -1,16 +1,6 @@
1
1
  import type { DdnsAccount, DdnsConfig, DdnsDomain, DdnsPatch } from './contracts.js';
2
- /**
3
- * The DDNS form both UIs edit: the draft its rows are held in, the wire shape a save sends,
4
- * and the diff the page's change list counts.
5
- *
6
- * It lives here because the two UIs' copies had already diverged (`noc-console` repaired an
7
- * emptied box where `stock` fell back to a default) and both needed the same two fixes.
8
- */
9
- /**
10
- * The draft relaxes the two regex-constrained fields, and gives every hostname row a stable key.
11
- * Keying the rows on `host` re-created the row on each keystroke, which threw the caret out of the
12
- * input after every character.
13
- */
2
+ /** The DDNS form both UIs edit: the draft, the wire shape a save sends, and the diff. */
3
+ /** The draft relaxes the regex-constrained fields; `key` is stable so editing `host` keeps the caret. */
14
4
  export type DraftDomain = Omit<DdnsDomain, 'host'> & {
15
5
  host: string;
16
6
  key: string;
@@ -22,52 +12,28 @@ export type DraftConfig = Omit<DdnsConfig, 'domains' | 'accounts'> & {
22
12
  domains: DraftDomain[];
23
13
  accounts: DraftAccount[];
24
14
  };
25
- /** One stable identity for a row the person just added. */
26
15
  export declare function newDraftDomainKey(): string;
27
- /**
28
- * A detached, plain copy of a config the form may hold reactively.
29
- *
30
- * `structuredClone(toRaw(config))` does **not** detach it: a list the form rebuilt
31
- * (`domains = domains.filter(...)`) holds Vue proxies inside the raw array, so the clone threw
32
- * `DataCloneError` and every later edit stopped publishing a patch. See `clonePlain`.
33
- */
16
+ /** A detached, plain copy of a config the form may hold reactively (see `clonePlain`). */
34
17
  export declare function cloneDdnsConfig(config: DdnsConfig | DraftConfig): DraftConfig;
35
18
  /** The wire shape: a row key is a UI detail, and the schema rejects undeclared keys. */
36
19
  export declare function toDdnsConfig(draft: DraftConfig | DdnsConfig): DdnsConfig;
37
20
  /** Compares two blocks the way the server sees them, ignoring row keys. */
38
21
  export declare function ddnsConfigEquals(a: DdnsConfig | DraftConfig | null, b: DdnsConfig | DraftConfig | null): boolean;
39
22
  /**
40
- * What this form actually moved, in the wire shape.
41
- *
42
- * `ipv4`/`ipv6` are left to `diffFields`' nested diff, so they report the one member that changed;
43
- * `accounts`/`domains` are leaves of their own, because the route **replaces** both lists — one
44
- * edited hostname is one changed field however many rows the list holds.
45
- *
46
- * Counting the whole block instead listed all nine of its leaves for a single IPv6 toggle, and
47
- * showed the untouched ones as `true → true`.
23
+ * What this form moved, in the wire shape. `ipv4`/`ipv6` diff per member; `accounts`/`domains` are
24
+ * leaves because the route replaces both lists whole.
48
25
  */
49
26
  export declare function ddnsConfigPatch(baseline: DdnsConfig | DraftConfig, draft: DdnsConfig | DraftConfig): DdnsPatch | null;
50
- /** The schema's own defaults for the two required numbers, in one place. */
27
+ /** The schema's own defaults for the two required numbers. */
51
28
  export declare const DDNS_DEFAULTS: {
52
29
  readonly intervalMs: 300000;
53
30
  readonly ttl: 1;
54
31
  };
55
- /**
56
- * Which value a required DDNS number should actually hold.
57
- *
58
- * A cleared box reports `NaN` (or `null`), and `JSON.stringify` turns that into `null` — which
59
- * `ddnsConfigSchema` rejects, refusing the whole workspace-settings save rather than that one
60
- * field. Fall back to the schema's default; the panel would have applied it anyway.
61
- */
32
+ /** A cleared box (`NaN`/`null`) would serialize to `null`, which the schema rejects: use the default. */
62
33
  export declare function requiredDdnsNumber(value: number | null, key: keyof typeof DDNS_DEFAULTS): number;
63
34
  /**
64
- * Which DDNS answers still belong on screen.
65
- *
66
- * The draft is per workspace, and its pending patch is saved by the page into whichever workspace
67
- * is active **then**. A read for the previous workspace that answered after a switch filled the new
68
- * one's form with the old policy, and a switch whose read failed kept the old patch — so Save wrote
69
- * one workspace's DDNS policy into another. A full read is the latest of its kind or it is dropped;
70
- * an action's answer (a pass, a credential change) is kept only while its workspace is still shown.
35
+ * Which DDNS answers still belong on screen, so one workspace's policy never lands in another's form.
36
+ * A full read must be the latest of its kind; an action's answer only needs its workspace still shown.
71
37
  */
72
38
  export declare function createDdnsReads(active: () => string): {
73
39
  load: () => () => boolean;
@@ -1,8 +1,2 @@
1
- /**
2
- * Waits for a just-moved endpoint to answer, so a redirect does not race the rebind.
3
- *
4
- * Byte-identical in both UIs and importing nothing, so it belongs here: the listener can move to a
5
- * different host and port, and the browser will follow to a socket that is not accepting yet. Polling
6
- * `/api/auth/session` (which needs no session) is what makes the wait meaningful rather than a sleep.
7
- */
1
+ /** Waits for a just-moved endpoint to answer, so a redirect does not race the rebind. */
8
2
  export declare function waitForEndpoint(url: string, timeoutMs?: number): Promise<boolean>;
@@ -0,0 +1,438 @@
1
+ /**
2
+ * Every error code this API can answer — a code is contract, so a script can branch on it. A map, not
3
+ * a runtime constraint: `test/shared/error-codes.test.ts` fails on a literal `code:` in `src/` missing
4
+ * here. A new code also gets a line in `docs/API.md`.
5
+ */
6
+ export interface ErrorCodeSpec {
7
+ /** A code with several statuses names them in `meaning`, most likely first. */
8
+ status: number;
9
+ meaning: string;
10
+ }
11
+ /** Ordered by area, not alphabetically. */
12
+ export declare const ERROR_CODES: {
13
+ readonly INVALID_INPUT: {
14
+ readonly status: 400;
15
+ readonly meaning: "the body, query or path did not validate; `detail` lists the fields";
16
+ };
17
+ readonly ID_MISMATCH: {
18
+ readonly status: 400;
19
+ readonly meaning: "a `PUT` body's `id` does not match the path id";
20
+ };
21
+ readonly NOT_FOUND: {
22
+ readonly status: 404;
23
+ readonly meaning: "no route matches this method and path";
24
+ };
25
+ readonly PAYLOAD_TOO_LARGE: {
26
+ readonly status: 413;
27
+ readonly meaning: "the request body was larger than the panel accepts (1 MB, or the route's own ceiling for an upload)";
28
+ };
29
+ readonly LENGTH_REQUIRED: {
30
+ readonly status: 411;
31
+ readonly meaning: "the request body was chunked, so its size could not be checked before reading it — send a `Content-Length`";
32
+ };
33
+ readonly INTERNAL_ERROR: {
34
+ readonly status: 500;
35
+ readonly meaning: "a failure with no more specific code; the panel logged it";
36
+ };
37
+ readonly DETAILED_ERROR: {
38
+ readonly status: 500;
39
+ readonly meaning: "a `DetailedError` thrown without a code — a bug in the panel";
40
+ };
41
+ readonly HTTP_EXCEPTION: {
42
+ readonly status: 500;
43
+ readonly meaning: "a refusal from the HTTP framework itself (an unsupported media type, say); the status line carries its real status";
44
+ };
45
+ readonly AUTH_REQUIRED: {
46
+ readonly status: 401;
47
+ readonly meaning: "no valid session or token; show the login screen";
48
+ };
49
+ readonly AUTH_UNARMED: {
50
+ readonly status: 401;
51
+ readonly meaning: "authentication is on but no password is set, and the caller is not this machine";
52
+ };
53
+ readonly AUTH_DISABLED_REMOTE: {
54
+ readonly status: 401;
55
+ readonly meaning: "authentication is off and the caller is not this machine (a proxy counts)";
56
+ };
57
+ readonly LOGIN_FAILED: {
58
+ readonly status: 401;
59
+ readonly meaning: "a sign-in failed: wrong id or secret (401), or no account can sign in yet (409)";
60
+ };
61
+ readonly LOGIN_THROTTLED: {
62
+ readonly status: 429;
63
+ readonly meaning: "too many failed sign-ins; wait for `Retry-After` (also `detail.retryAfterMs`) — this used to be `LOGIN_FAILED` with a 429";
64
+ };
65
+ readonly SESSION_REQUIRED: {
66
+ readonly status: 403;
67
+ readonly meaning: "this operation needs a signed-in session, not an API token (this machine passes while authentication is off or has no account)";
68
+ };
69
+ readonly TOKEN_SCOPE: {
70
+ readonly status: 403;
71
+ readonly meaning: "the API token's scopes do not cover this route, or its workspace limit excludes it; `detail` names what it needed and what it holds";
72
+ };
73
+ readonly CURRENT_PASSWORD_WRONG: {
74
+ readonly status: 401;
75
+ readonly meaning: "`currentSecret` was incorrect (the code keeps its older name)";
76
+ };
77
+ readonly PASSWORD_TOO_SHORT: {
78
+ readonly status: 400;
79
+ readonly meaning: "a password below the 12-character bar while the panel is exposed";
80
+ };
81
+ readonly EXPOSED_WITHOUT_PASSWORD: {
82
+ readonly status: 400;
83
+ readonly meaning: "this would expose the panel with authentication off or no password";
84
+ };
85
+ readonly EXPOSURE_BLOCKED: {
86
+ readonly status: 400;
87
+ readonly meaning: "the listener change would expose the panel without auth and a long-enough password";
88
+ };
89
+ readonly PROXY_EXPOSURE_BLOCKED: {
90
+ readonly status: 400;
91
+ readonly meaning: "a proxy route to the panel would expose it without auth and a long-enough password";
92
+ };
93
+ readonly CROSS_ORIGIN: {
94
+ readonly status: 403;
95
+ readonly meaning: "a cookie-authenticated write from another origin";
96
+ };
97
+ readonly HOST_NOT_ALLOWED: {
98
+ readonly status: 421;
99
+ readonly meaning: "the `Host` header names a host this panel does not answer to";
100
+ };
101
+ readonly INVALID_TOKEN: {
102
+ readonly status: 403;
103
+ readonly meaning: "the local `/_hh` token does not match `run.json`";
104
+ };
105
+ readonly NOT_LOOPBACK: {
106
+ readonly status: 403;
107
+ readonly meaning: "this local-only operation was called from another machine";
108
+ };
109
+ readonly INVALID_SETTINGS: {
110
+ readonly status: 400;
111
+ readonly meaning: "the settings patch was rejected by the store";
112
+ };
113
+ readonly CONFIG_CHANGED_ON_DISK: {
114
+ readonly status: 409;
115
+ readonly meaning: "the config file was edited since the panel read it; it reloads, so retry";
116
+ };
117
+ readonly UNKNOWN_WORKSPACE: {
118
+ readonly status: 404;
119
+ readonly meaning: "`?workspace=` names no workspace this panel has";
120
+ };
121
+ readonly SERVER_EXISTS: {
122
+ readonly status: 409;
123
+ readonly meaning: "a server with this id already exists in the workspace";
124
+ };
125
+ readonly INVALID_SERVER: {
126
+ readonly status: 400;
127
+ readonly meaning: "the store refused the entry as written; the message names the field";
128
+ };
129
+ readonly WORKSPACE_EXISTS: {
130
+ readonly status: 409;
131
+ readonly meaning: "a workspace with that id already exists";
132
+ };
133
+ readonly INVALID_WORKSPACE: {
134
+ readonly status: 400;
135
+ readonly meaning: "the workspace registry refused the change (a bad id or label, or removing the only workspace)";
136
+ };
137
+ readonly NO_DEPLOY: {
138
+ readonly status: 400;
139
+ readonly meaning: "this server has no deploy steps — nothing to run. Add a `deploy` block to its entry";
140
+ };
141
+ readonly DEPLOY_RUNNING: {
142
+ readonly status: 409;
143
+ readonly meaning: "a deploy is already running for this server; wait for it, or stop the server to cancel it";
144
+ };
145
+ readonly DEPLOY_FAILED: {
146
+ readonly status: 409;
147
+ readonly meaning: "a deploy step failed — the previous process is still running, and its log names the step";
148
+ };
149
+ readonly ACCOUNT_EXISTS: {
150
+ readonly status: 409;
151
+ readonly meaning: "an account with that id already exists — ids are what a login is keyed on, so two cannot share one";
152
+ };
153
+ readonly UNKNOWN_JOB: {
154
+ readonly status: 404;
155
+ readonly meaning: "no job has that id in this workspace";
156
+ };
157
+ readonly JOB_EXISTS: {
158
+ readonly status: 409;
159
+ readonly meaning: "a job with that id already exists — the id names its log and its history, so two would interleave output that cannot be untangled";
160
+ };
161
+ readonly UNKNOWN_JOB_RUN: {
162
+ readonly status: 404;
163
+ readonly meaning: "that job has no run with this id — only its last 50 runs are kept";
164
+ };
165
+ readonly JOB_RUNNING: {
166
+ readonly status: 409;
167
+ readonly meaning: "that job is already running; a second copy is refused rather than queued behind the first";
168
+ };
169
+ readonly INVALID_JOB: {
170
+ readonly status: 400;
171
+ readonly meaning: "the job would not be runnable — the message names the field and the fix (usually a cron expression that does not parse)";
172
+ };
173
+ readonly INVALID_CONFIG: {
174
+ readonly status: 400;
175
+ readonly meaning: "the jobs file could not be read, or is not a jobs file — it was left untouched so a hand-edit is not lost";
176
+ };
177
+ readonly UNKNOWN_ACCOUNT: {
178
+ readonly status: 404;
179
+ readonly meaning: "no account has that id";
180
+ };
181
+ readonly CANNOT_REVOKE_SELF: {
182
+ readonly status: 400;
183
+ readonly meaning: "that is the account making the request — sign in as another one to revoke it, or the caller signs itself out mid-action";
184
+ };
185
+ readonly LAST_ACCOUNT: {
186
+ readonly status: 400;
187
+ readonly meaning: "that is the last account that can sign in; revoking it would leave the panel with no way in";
188
+ };
189
+ readonly LAST_ADMIN: {
190
+ readonly status: 400;
191
+ readonly meaning: "that is the last enabled account with `admin`; taking it away would leave no one able to manage accounts from the panel";
192
+ };
193
+ readonly UNKNOWN_SERVER: {
194
+ readonly status: 404;
195
+ readonly meaning: "no server has that id in the workspace";
196
+ };
197
+ readonly SERVER_DISABLED: {
198
+ readonly status: 409;
199
+ readonly meaning: "the entry is switched off (`enabled: false`)";
200
+ };
201
+ readonly SERVER_BUSY: {
202
+ readonly status: 409;
203
+ readonly meaning: "a stop, or the same action, is already in flight";
204
+ };
205
+ readonly PORT_IN_USE: {
206
+ readonly status: 409;
207
+ readonly meaning: "the entry's port is held and could not be freed";
208
+ };
209
+ readonly FREE_PORT_FAILED: {
210
+ readonly status: 409;
211
+ readonly meaning: "the entry's port could not be freed: nothing holds it, or the holder is supervised by this panel";
212
+ };
213
+ readonly DEPENDENCY_FAILED: {
214
+ readonly status: 409;
215
+ readonly meaning: "an entry in `dependsOn` could not be started";
216
+ };
217
+ readonly ACTION_FAILED: {
218
+ readonly status: 409;
219
+ readonly meaning: "a lifecycle refusal none of the more specific codes describes";
220
+ };
221
+ readonly UNKNOWN_ORPHAN: {
222
+ readonly status: 404;
223
+ readonly meaning: "no orphaned process is running under that id";
224
+ };
225
+ readonly ORPHAN_SURVIVED: {
226
+ readonly status: 409;
227
+ readonly meaning: "an orphaned process ignored the stop";
228
+ };
229
+ readonly UNKNOWN_LOG_FILE: {
230
+ readonly status: 404;
231
+ readonly meaning: "that file is not one of this entry's log rotations";
232
+ };
233
+ readonly CURSOR_OUT_OF_RANGE: {
234
+ readonly status: 400;
235
+ readonly meaning: "an `?after=`/`?before=` log cursor is older than the lines this route reads; download the log file for the full history";
236
+ };
237
+ readonly INVALID_PROXY: {
238
+ readonly status: 400;
239
+ readonly meaning: "the proxy configuration failed validation; `detail` lists the problems";
240
+ };
241
+ readonly PROXY_DISABLED: {
242
+ readonly status: 400;
243
+ readonly meaning: "the reverse proxy is switched off";
244
+ };
245
+ readonly PROXY_ROUTE_UNKNOWN: {
246
+ readonly status: 404;
247
+ readonly meaning: "no proxy route has that id";
248
+ };
249
+ readonly PROXY_CERT_NOT_MANAGED: {
250
+ readonly status: 400;
251
+ readonly meaning: "that host is not one a CA issues for, so there is no certificate to retry";
252
+ };
253
+ readonly PROXY_CERT_RETRY_LAST_ROUTE: {
254
+ readonly status: 409;
255
+ readonly meaning: "that is the only route on its name; the certificate could not be dropped for a retry";
256
+ };
257
+ readonly PROXY_TLS_IN_USE: {
258
+ readonly status: 400;
259
+ readonly meaning: "that certificate is still used by a route";
260
+ };
261
+ readonly PROXY_PORT_IN_USE: {
262
+ readonly status: 409;
263
+ readonly meaning: "a proxy port is held by something else; `detail.holders` names them";
264
+ };
265
+ readonly PROXY_CONFIG_REJECTED: {
266
+ readonly status: 400;
267
+ readonly meaning: "the engine refused the generated configuration";
268
+ };
269
+ readonly PROXY_NO_PREVIOUS: {
270
+ readonly status: 400;
271
+ readonly meaning: "there is no earlier engine configuration to revert to";
272
+ };
273
+ readonly PROXY_NO_ADMIN_PORT: {
274
+ readonly status: 500;
275
+ readonly meaning: "no free loopback port was found for the engine admin endpoint";
276
+ };
277
+ readonly INVALID_CERTIFICATE: {
278
+ readonly status: 400;
279
+ readonly meaning: "an uploaded PEM pair was rejected";
280
+ };
281
+ readonly UNKNOWN_ENGINE: {
282
+ readonly status: 500;
283
+ readonly meaning: "the configured proxy engine name is not one this panel implements";
284
+ };
285
+ readonly ENGINE_MISSING: {
286
+ readonly status: 400;
287
+ readonly meaning: "the proxy engine is not installed yet";
288
+ };
289
+ readonly ENGINE_NOT_RUNNING: {
290
+ readonly status: 400;
291
+ readonly meaning: "the proxy engine is not running";
292
+ };
293
+ readonly ENGINE_NOT_READY: {
294
+ readonly status: 502;
295
+ readonly meaning: "the engine started but never answered on its admin endpoint";
296
+ };
297
+ readonly ENGINE_UNREACHABLE: {
298
+ readonly status: 502;
299
+ readonly meaning: "the engine admin endpoint did not answer";
300
+ };
301
+ readonly ENGINE_ALREADY_RUNNING: {
302
+ readonly status: 409;
303
+ readonly meaning: "an engine is running whose admin endpoint the panel does not know";
304
+ };
305
+ readonly ENGINE_BUSY: {
306
+ readonly status: 409;
307
+ readonly meaning: "the engine is running, so it cannot be replaced";
308
+ };
309
+ readonly ENGINE_INTEGRITY: {
310
+ readonly status: 409;
311
+ readonly meaning: "the installed engine binary is not the one the panel downloaded";
312
+ };
313
+ readonly ENGINE_MODULE_NOT_INSTALLED: {
314
+ readonly status: 400;
315
+ readonly meaning: "the engine module is not available in this install";
316
+ };
317
+ readonly ENGINE_DOWNLOAD_FAILED: {
318
+ readonly status: 502;
319
+ readonly meaning: "the engine download or its verification failed";
320
+ };
321
+ readonly ENGINE_DOWNLOAD_UNTRUSTED: {
322
+ readonly status: 502;
323
+ readonly meaning: "the engine download did not come from where it should";
324
+ };
325
+ readonly INVALID_ENGINE_VERSION: {
326
+ readonly status: 400;
327
+ readonly meaning: "that is not a version of this engine";
328
+ };
329
+ readonly UNSUPPORTED_PLATFORM: {
330
+ readonly status: 400;
331
+ readonly meaning: "the engine has no build for this platform/architecture";
332
+ };
333
+ readonly BACKUP_FAILED: {
334
+ readonly status: 400;
335
+ readonly meaning: "the archive could not be written";
336
+ };
337
+ readonly BACKUP_NOT_FOUND: {
338
+ readonly status: 404;
339
+ readonly meaning: "no archive has that name";
340
+ };
341
+ readonly MISSING_ARCHIVE: {
342
+ readonly status: 400;
343
+ readonly meaning: "a restore needs a backup name or an uploaded file";
344
+ };
345
+ readonly INVALID_INCLUDE: {
346
+ readonly status: 400;
347
+ readonly meaning: "an upload's `include` field is not a JSON array of item ids";
348
+ };
349
+ readonly INVALID_EXCLUDE: {
350
+ readonly status: 400;
351
+ readonly meaning: "an upload's `exclude` field is not a JSON array of item ids";
352
+ };
353
+ readonly MISSING_FILE: {
354
+ readonly status: 400;
355
+ readonly meaning: "the multipart body carried no `file` field";
356
+ };
357
+ readonly MISSING_NAME: {
358
+ readonly status: 400;
359
+ readonly meaning: "a restore needs `name` (or `from`)";
360
+ };
361
+ readonly NAME_AND_FROM: {
362
+ readonly status: 400;
363
+ readonly meaning: "a restore takes `name` or `from`, not both";
364
+ };
365
+ readonly FROM_NOT_ABSOLUTE: {
366
+ readonly status: 400;
367
+ readonly meaning: "`from` must be an absolute path";
368
+ };
369
+ readonly RESTORE_FAILED: {
370
+ readonly status: 400;
371
+ readonly meaning: "the restore plan could not be applied; `detail` names the items";
372
+ };
373
+ readonly RESTORE_IN_PROGRESS: {
374
+ readonly status: 409;
375
+ readonly meaning: "a restore is already running";
376
+ };
377
+ readonly INVALID_UI: {
378
+ readonly status: 400;
379
+ readonly meaning: "the uploaded UI zip was rejected";
380
+ };
381
+ readonly UPLOAD_TOO_LARGE: {
382
+ readonly status: 413;
383
+ readonly meaning: "the upload is larger than the limit";
384
+ };
385
+ readonly CONFIG_COPY_CONFLICT: {
386
+ readonly status: 400;
387
+ readonly meaning: "a directory could not be copied over a non-directory (this used to leak the Node code `ERR_FS_CP_DIR_TO_NON_DIR`)";
388
+ };
389
+ readonly TELEGRAM_TOKEN_REJECTED: {
390
+ readonly status: 400;
391
+ readonly meaning: "Telegram did not accept the bot token";
392
+ };
393
+ readonly TELEGRAM_LIST_FAILED: {
394
+ readonly status: 400;
395
+ readonly meaning: "listing chats from Telegram failed";
396
+ };
397
+ readonly TELEGRAM_SEND_FAILED: {
398
+ readonly status: 400;
399
+ readonly meaning: "the test message could not be delivered through Telegram";
400
+ };
401
+ readonly WEBHOOK_SEND_FAILED: {
402
+ readonly status: 400;
403
+ readonly meaning: "the test webhook could not be delivered";
404
+ };
405
+ readonly UNKNOWN_DESTINATION: {
406
+ readonly status: 404;
407
+ readonly meaning: "no notification destination has that id in this workspace";
408
+ };
409
+ readonly INVALID_DDNS: {
410
+ readonly status: 400;
411
+ readonly meaning: "the DDNS configuration failed validation; `detail` lists the problems";
412
+ };
413
+ readonly INVALID_DDNS_CREDENTIALS: {
414
+ readonly status: 400;
415
+ readonly meaning: "the DDNS account credentials were rejected by their provider";
416
+ };
417
+ readonly UNKNOWN_DDNS_PROVIDER: {
418
+ readonly status: 400;
419
+ readonly meaning: "no DDNS provider has that id";
420
+ };
421
+ readonly NOT_WSL: {
422
+ readonly status: 400;
423
+ readonly meaning: "the temperature bridge is WSL2-only";
424
+ };
425
+ readonly WINDOWS_DRIVE_MISSING: {
426
+ readonly status: 400;
427
+ readonly meaning: "the Windows drive is not mounted where the helper must be written";
428
+ };
429
+ readonly SCRIPT_WRITE_FAILED: {
430
+ readonly status: 400;
431
+ readonly meaning: "the temperature helper could not be written";
432
+ };
433
+ readonly LIBRARY_INSTALL_FAILED: {
434
+ readonly status: 400;
435
+ readonly meaning: "LibreHardwareMonitor could not be installed";
436
+ };
437
+ };
438
+ export declare function statusOfCode(code: string): number | null;
@@ -1,8 +1,2 @@
1
- /**
2
- * One rendering for a thrown value, so a caught error reads the same everywhere.
3
- *
4
- * `catch` binds `unknown`, and the same ternary was written out in ~60 places across the
5
- * panel and both UIs. Two idioms in one codebase is how they drift, and the UIs are
6
- * separate bundles: a fix applied to one copy silently misses the others.
7
- */
1
+ /** One rendering for a thrown value, so a caught error reads the same everywhere. */
8
2
  export declare function errorMessage(caught: unknown): string;
@@ -1,21 +1,11 @@
1
- /**
2
- * The textarea round-trips a server form needs: a list is one entry per line, an env
3
- * map is `KEY=value` per line.
4
- *
5
- * These were written out in `uis/stock` and `uis/noc-console` and had already been
6
- * copy-pasted twice inside one of them. The two products differ elsewhere, but not
7
- * here — and a change to how a line is parsed has to be made once, not in four places.
8
- * Imports nothing, so it is safe in a UI bundle.
9
- */
10
- /** One entry per line, blank lines dropped, each entry trimmed. */
1
+ /** The textarea round-trips a server form needs: one entry per line, or `KEY=value` per line. */
2
+ /** Blank lines dropped, each entry trimmed. */
11
3
  export declare function linesToArray(value: string): string[];
12
- /** An env map as `KEY=value` lines, in the map's own order. */
13
4
  export declare function envToText(env: Record<string, string>): string;
14
- /**
15
- * `KEY=value` lines into the map the config stores. A line with no `=`, or one that
16
- * starts with it (which names nothing), is skipped rather than stored under an empty
17
- * key; both halves of a pair are trimmed.
18
- */
5
+ /** A line with no `=`, or starting with one, is skipped rather than stored under an empty key. */
19
6
  export declare function textToEnv(value: string): Record<string, string>;
20
- /** Comma-separated ids into the list the config stores (`dependsOn`). */
7
+ /** `dependsOn`. */
21
8
  export declare function commaList(value: string): string[];
9
+ /** A list edited one entry per line. Commas still separate, as the older comma-separated boxes did. */
10
+ export declare function listToArray(value: string): string[];
11
+ export declare function arrayToLines(values: readonly string[]): string;