home-hosted 0.13.1 → 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-DeAJ3pbO.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-C59ne5aM.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-rewguyXg.js → nanny-BWh7nuvv.js} +21 -14
  64. package/dist/chunks/nanny-BWh7nuvv.js.map +1 -0
  65. package/dist/chunks/{nanny-Dnun3hVB.js → nanny-BjF2-1pv.js} +3 -3
  66. package/dist/chunks/{nanny-Dnun3hVB.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-ClVuNJRo.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-k5VBw8t9.js → port-CnsrxKNR.js} +23 -70
  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-BYu_E7x5.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-BOBh9MBf.js → src-BnzkVy_M.js} +12547 -10578
  112. package/dist/chunks/src-BnzkVy_M.js.map +1 -0
  113. package/dist/chunks/{status-B6f2-qhs.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-DNZuTi2q.js → up-BQSnYxYd.js} +47 -53
  138. package/dist/chunks/up-BQSnYxYd.js.map +1 -0
  139. package/dist/chunks/{usage-BrnDARNM.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-DeAJ3pbO.js.map +0 -1
  405. package/dist/chunks/backups-twva7x2n.js +0 -4691
  406. package/dist/chunks/backups-twva7x2n.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-CofN9k6Q.js +0 -247
  411. package/dist/chunks/daemon-CofN9k6Q.js.map +0 -1
  412. package/dist/chunks/daemon-log-BVj8cDEo.js +0 -241
  413. package/dist/chunks/daemon-log-BVj8cDEo.js.map +0 -1
  414. package/dist/chunks/docker-Cy9Lyvda.js.map +0 -1
  415. package/dist/chunks/down-C59ne5aM.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-COyCJXj9.js +0 -1172
  430. package/dist/chunks/nanny-COyCJXj9.js.map +0 -1
  431. package/dist/chunks/nanny-rewguyXg.js.map +0 -1
  432. package/dist/chunks/nanny-sweep-ClVuNJRo.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-k5VBw8t9.js.map +0 -1
  437. package/dist/chunks/restart-BYu_E7x5.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-By-zktjx.js +0 -169
  442. package/dist/chunks/server-By-zktjx.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-xJkA1IZp.js +0 -78
  448. package/dist/chunks/set-token-xJkA1IZp.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-BOBh9MBf.js.map +0 -1
  454. package/dist/chunks/status-B6f2-qhs.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-DNZuTi2q.js.map +0 -1
  462. package/dist/chunks/usage-BrnDARNM.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,99 @@
1
+ import type { JobEntryView, JobRun } from '../shared/contracts.js';
2
+ export declare const jobListCommand: import("citty").CommandDef<{
3
+ readonly workspace: {
4
+ readonly type: "string";
5
+ readonly alias: "w";
6
+ readonly description: "the workspace that owns it (default: the panel's default workspace)";
7
+ };
8
+ readonly json: {
9
+ readonly type: "boolean";
10
+ readonly description: "print one document on stdout";
11
+ };
12
+ }>;
13
+ /** One `ls` row. Exported for its test. */
14
+ export declare function jobLine(job: JobEntryView, now: number): string;
15
+ /** How a run ended, in one line. Exported for its test. */
16
+ export declare function runLine(run: JobRun): string;
17
+ export declare const jobRunCommand: import("citty").CommandDef<{
18
+ readonly id: {
19
+ readonly type: "positional";
20
+ readonly required: false;
21
+ readonly description: "the job id from the workspace's jobs.config.json";
22
+ };
23
+ readonly workspace: {
24
+ readonly type: "string";
25
+ readonly alias: "w";
26
+ readonly description: "the workspace that owns it (default: the panel's default workspace)";
27
+ };
28
+ readonly detach: {
29
+ readonly type: "boolean";
30
+ readonly description: "start it and return at once";
31
+ };
32
+ readonly json: {
33
+ readonly type: "boolean";
34
+ readonly description: "print one document on stdout";
35
+ };
36
+ }>;
37
+ export declare const jobStopCommand: import("citty").CommandDef<{
38
+ readonly id: {
39
+ readonly type: "positional";
40
+ readonly required: false;
41
+ readonly description: "the job id from the workspace's jobs.config.json";
42
+ };
43
+ readonly workspace: {
44
+ readonly type: "string";
45
+ readonly alias: "w";
46
+ readonly description: "the workspace that owns it (default: the panel's default workspace)";
47
+ };
48
+ readonly json: {
49
+ readonly type: "boolean";
50
+ readonly description: "print one document on stdout";
51
+ };
52
+ }>;
53
+ export declare const jobRunsCommand: import("citty").CommandDef<{
54
+ readonly id: {
55
+ readonly type: "positional";
56
+ readonly required: false;
57
+ readonly description: "the job id from the workspace's jobs.config.json";
58
+ };
59
+ readonly workspace: {
60
+ readonly type: "string";
61
+ readonly alias: "w";
62
+ readonly description: "the workspace that owns it (default: the panel's default workspace)";
63
+ };
64
+ readonly json: {
65
+ readonly type: "boolean";
66
+ readonly description: "print one document on stdout";
67
+ };
68
+ }>;
69
+ export declare const jobLogCommand: import("citty").CommandDef<{
70
+ readonly id: {
71
+ readonly type: "positional";
72
+ readonly required: false;
73
+ readonly description: "the job id from the workspace's jobs.config.json";
74
+ };
75
+ readonly workspace: {
76
+ readonly type: "string";
77
+ readonly alias: "w";
78
+ readonly description: "the workspace that owns it (default: the panel's default workspace)";
79
+ };
80
+ readonly run: {
81
+ readonly type: "string";
82
+ readonly description: "only this run's lines (an id from `job runs`)";
83
+ };
84
+ readonly follow: {
85
+ readonly type: "boolean";
86
+ readonly alias: "f";
87
+ readonly description: "keep printing new lines until interrupted";
88
+ };
89
+ readonly json: {
90
+ readonly type: "boolean";
91
+ readonly description: "print one document on stdout";
92
+ };
93
+ }>;
94
+ export declare const jobCommand: import("citty").CommandDef<{
95
+ readonly command: {
96
+ readonly type: "positional";
97
+ readonly required: false;
98
+ };
99
+ }>;
@@ -23,24 +23,15 @@ export declare const logsArgs: {
23
23
  readonly description: "the workspace the server is in (default: the panel's default workspace)";
24
24
  };
25
25
  };
26
- /**
27
- * `--lines`: a whole decimal count of at least 1, or `all` — `0` inside means "the whole log", the
28
- * sentinel `readLog`/`followLog` take. Anything else is refused with the reason, never read as a
29
- * default: `--lines abc` and `--lines 0x10` silently printed 50 lines, and `--lines 0` (or a negative)
30
- * printed the whole log, so a typo or a bounded request answered something nobody asked for and the
31
- * output looked complete.
32
- */
26
+ /** `--lines`: a whole decimal count ≥ 1, or `all` (→ `0`, "the whole log"). Anything else is refused. */
33
27
  export declare function parseLines(raw: string | undefined): {
34
28
  lines: number;
35
29
  } | {
36
30
  error: string;
37
31
  };
38
32
  export interface LogTarget {
39
- /** The file the lines come from, for the header and for `--json`'s `path`. */
40
33
  file: string;
41
- /** The workspace the file is in, when the target is one server's log. */
42
34
  workspaceId?: string;
43
- /** The id asked for, when the target is one server's log. */
44
35
  serverId?: string;
45
36
  }
46
37
  export declare function runLogs(input: {
@@ -0,0 +1,57 @@
1
+ /**
2
+ * `ls [--workspace W] [--json]` — the entries one workspace declares, live from the panel when it is
3
+ * up (`GET /_hh/servers`), or read-only from `servers.config.json` when it is not.
4
+ */
5
+ export declare const lsArgs: {
6
+ readonly workspace: {
7
+ readonly type: "string";
8
+ readonly alias: "w";
9
+ readonly description: "the workspace to list (default: the default workspace)";
10
+ };
11
+ readonly json: {
12
+ readonly type: "boolean";
13
+ readonly description: "print machine-readable JSON";
14
+ };
15
+ };
16
+ export interface LsRow {
17
+ id: string;
18
+ /** `null` with no panel: nothing can say whether it runs. */
19
+ status: string | null;
20
+ port: number | null;
21
+ command: string;
22
+ args: string[];
23
+ autostart: boolean;
24
+ persistent: boolean;
25
+ enabled: boolean;
26
+ }
27
+ interface ViewLike {
28
+ id: string;
29
+ status?: string;
30
+ config?: {
31
+ port?: number | null;
32
+ command?: string;
33
+ args?: string[];
34
+ autostart?: boolean;
35
+ persistent?: boolean;
36
+ enabled?: boolean;
37
+ };
38
+ }
39
+ export declare function rowFromView(view: ViewLike): LsRow;
40
+ /** The table: `ID STATUS PORT COMMAND`, flags after the command. Jobs have `job ls`. */
41
+ export declare function lsLines(rows: readonly LsRow[]): string[];
42
+ export declare function runLs(input: {
43
+ workspace?: string;
44
+ json?: boolean;
45
+ }): Promise<void>;
46
+ export declare const lsCommand: import("citty").CommandDef<{
47
+ readonly workspace: {
48
+ readonly type: "string";
49
+ readonly alias: "w";
50
+ readonly description: "the workspace to list (default: the default workspace)";
51
+ };
52
+ readonly json: {
53
+ readonly type: "boolean";
54
+ readonly description: "print machine-readable JSON";
55
+ };
56
+ }>;
57
+ export {};
@@ -1,12 +1,7 @@
1
1
  /**
2
- * `migrate` lifts a state directory to the config schema this release understands:
3
- * it stamps the global settings, each workspace's settings and each workspace's
4
- * servers config, and applies any pending schema migration to them.
5
- *
6
- * Deliberately loud: it prints every step first, backs a file up before writing
7
- * it, refuses to write one it cannot read, and never runs on its own — a detached
8
- * daemon cannot prompt, so consent comes from `--yes`, from
9
- * `HHOSTED_MIGRATE=allow`, or from a person at a terminal.
2
+ * `migrate` lifts a state directory to the config schema this release understands. It prints every
3
+ * step first, backs a file up before writing it, refuses one it cannot read, and never runs on its
4
+ * own: consent comes from `--yes`, `HHOSTED_MIGRATE=allow`, or a person at a terminal.
10
5
  */
11
6
  export declare const migrateArgs: {
12
7
  readonly dryRun: {
@@ -31,3 +26,31 @@ export declare const migrateCommand: import("citty").CommandDef<{
31
26
  readonly description: "apply without asking (or set HHOSTED_MIGRATE=allow)";
32
27
  };
33
28
  }>;
29
+ /**
30
+ * Moves `kind: "job"` entries out of `servers.config.json` into `jobs.config.json`. A job left in a
31
+ * servers file is refused on read, so `migrate` has to do the move. Runs before the schema plan.
32
+ */
33
+ export interface JobMove {
34
+ workspaceId: string;
35
+ serversFile: string;
36
+ jobsFile: string;
37
+ ids: string[];
38
+ /** Ids `jobs.config.json` already declares; `runMigrate` refuses while this is non-empty. */
39
+ collisions: string[];
40
+ servers: Record<string, unknown>;
41
+ jobs: Record<string, unknown>;
42
+ }
43
+ export declare function planJobMoves(): JobMove[];
44
+ /**
45
+ * Jobs files that still say `timeoutMs` (before 0.20). The store lifts them on every read; this writes
46
+ * the lift down. A workspace with a planned move has its lift folded into the move's document.
47
+ */
48
+ export interface JobLift {
49
+ workspaceId: string;
50
+ jobsFile: string;
51
+ ids: string[];
52
+ document: Record<string, unknown>;
53
+ }
54
+ export declare function planJobLifts(moves: JobMove[]): JobLift[];
55
+ /** Writes a planned move, keeping a `.bak` of each file it touches. */
56
+ export declare function applyJobMove(move: JobMove): void;
@@ -1,10 +1,2 @@
1
- /**
2
- * The nearest word to a typo, or null when nothing is close.
3
- *
4
- * Two callers need it — a mistyped command and a mistyped option — so it takes its candidate list as
5
- * a parameter rather than reaching for one. One implementation, so both suggest by the same rule.
6
- *
7
- * Levenshtein distance, capped: only a genuinely near miss is worth naming, because suggesting an
8
- * unrelated word is worse than suggesting none.
9
- */
1
+ /** The nearest word to a typo by capped Levenshtein distance, or null: an unrelated suggestion is worse than none. */
10
2
  export declare function nearestWord(input: string, candidates: readonly string[]): string | null;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * `home-hosted deploy <id>` — run an entry's deploy steps; waits, and exits 1 on failure. Through the
3
+ * panel when it runs, else the same `runDeploy` the panel calls.
4
+ */
5
+ export declare const deployArgs: {
6
+ readonly id: {
7
+ readonly type: "positional";
8
+ readonly required: true;
9
+ readonly description: "the server id";
10
+ };
11
+ readonly workspace: {
12
+ readonly type: "string";
13
+ readonly alias: "w";
14
+ readonly description: "the workspace that owns it";
15
+ };
16
+ readonly json: {
17
+ readonly type: "boolean";
18
+ readonly description: "print one document on stdout";
19
+ };
20
+ };
21
+ export declare const deployCommand: import("citty").CommandDef<{
22
+ readonly id: {
23
+ readonly type: "positional";
24
+ readonly required: true;
25
+ readonly description: "the server id";
26
+ };
27
+ readonly workspace: {
28
+ readonly type: "string";
29
+ readonly alias: "w";
30
+ readonly description: "the workspace that owns it";
31
+ };
32
+ readonly json: {
33
+ readonly type: "boolean";
34
+ readonly description: "print one document on stdout";
35
+ };
36
+ }>;
@@ -0,0 +1,90 @@
1
+ /**
2
+ * `secret set|unset|ls <id> [NAME]` — a server's or job's secret environment, through the running
3
+ * panel when it is up, else the workspace's `.secrets.json` (both via `SecretsStore`).
4
+ *
5
+ * Nothing here prints a value, on any path, including an error.
6
+ */
7
+ export declare const secretSetArgs: {
8
+ readonly id: {
9
+ readonly type: "positional";
10
+ readonly required: true;
11
+ readonly description: "the server or job id";
12
+ };
13
+ readonly name: {
14
+ readonly type: "positional";
15
+ readonly required: true;
16
+ readonly description: "the variable name (A-Z, 0-9 and _)";
17
+ };
18
+ readonly stdin: {
19
+ readonly type: "boolean";
20
+ readonly description: "read the value from stdin instead of prompting";
21
+ };
22
+ readonly workspace: {
23
+ readonly type: "string";
24
+ readonly alias: "w";
25
+ readonly description: "the workspace that owns it (default: the default workspace)";
26
+ };
27
+ };
28
+ export declare const secretUnsetArgs: {
29
+ readonly id: {
30
+ readonly type: "positional";
31
+ readonly required: true;
32
+ readonly description: "the server or job id";
33
+ };
34
+ readonly name: {
35
+ readonly type: "positional";
36
+ readonly required: true;
37
+ readonly description: "the variable name";
38
+ };
39
+ readonly workspace: {
40
+ readonly type: "string";
41
+ readonly alias: "w";
42
+ readonly description: "the workspace that owns it";
43
+ };
44
+ };
45
+ export declare const secretLsArgs: {
46
+ readonly id: {
47
+ readonly type: "positional";
48
+ readonly required: true;
49
+ readonly description: "the server or job id";
50
+ };
51
+ readonly workspace: {
52
+ readonly type: "string";
53
+ readonly alias: "w";
54
+ readonly description: "the workspace that owns it";
55
+ };
56
+ readonly json: {
57
+ readonly type: "boolean";
58
+ readonly description: "print one document on stdout";
59
+ };
60
+ };
61
+ export declare const secretCommand: import("citty").CommandDef<{
62
+ readonly command: {
63
+ readonly type: "positional";
64
+ readonly required: false;
65
+ readonly description: "set, unset or ls";
66
+ };
67
+ readonly id: {
68
+ readonly type: "positional";
69
+ readonly required: false;
70
+ readonly description: "the server or job id";
71
+ };
72
+ readonly name: {
73
+ readonly type: "positional";
74
+ readonly required: false;
75
+ readonly description: "the variable name";
76
+ };
77
+ readonly stdin: {
78
+ readonly type: "boolean";
79
+ readonly description: "read the value from stdin instead of prompting";
80
+ };
81
+ readonly workspace: {
82
+ readonly type: "string";
83
+ readonly alias: "w";
84
+ readonly description: "the workspace that owns it";
85
+ };
86
+ readonly json: {
87
+ readonly type: "boolean";
88
+ readonly description: "print one document on stdout";
89
+ };
90
+ }>;
@@ -1,27 +1,18 @@
1
1
  /**
2
- * `start`/`stop`/`restart` for one supervised server.
3
- *
4
- * The supervisor lives inside the daemon, so a single server cannot be started or
5
- * stopped without it: these drive the running panel over its local control channel
6
- * (the same token `down` uses), which needs no session and no API token.
7
- *
8
- * `restart` shares the name with the panel's own restart, which is why the id is optional:
9
- * bare `restart` stays "down, then up", and `restart <id>` is one entry — the same thing the
10
- * UI's per-server Restart button does, which the shell could not.
2
+ * `start`/`stop`/`restart` for one supervised server, driven through the running panel's local
3
+ * control channel. `restart`'s id is optional: bare `restart` is the panel's own "down, then up".
11
4
  */
12
5
  export type ServerAction = 'start' | 'stop' | 'restart';
13
6
  export declare function runServerAction(action: ServerAction, id: string, workspace?: string): Promise<void>;
7
+ /** The last lines a server wrote: stderr when it wrote any, else whatever it wrote last. */
8
+ export declare function crashTail(raw: string, count?: number): string[];
14
9
  /**
15
- * `free-port` — ask whatever holds this entry's port to stop, then say what actually happened.
16
- *
17
- * The panel refuses what it supervises rather than signalling it, so a success is not simply
18
- * "ok": the report distinguishes the pids that left, the ones that ignored SIGTERM and had to be
19
- * killed, and any this panel owns that were deliberately left alone.
10
+ * `free-port` — the report separates pids that left, ones that had to be killed, and ones this panel
11
+ * supervises and deliberately left alone.
20
12
  */
21
13
  export declare function runFreePort(id: string, workspace?: string, options?: {
22
14
  tolerateFree?: boolean;
23
15
  }): Promise<void>;
24
- /** `free-port <id>` — the panel's Free port button, from a shell. */
25
16
  export declare const freePortCommand: import("citty").CommandDef<{
26
17
  readonly id: {
27
18
  readonly type: "positional";
@@ -0,0 +1,135 @@
1
+ import { Buffer } from '../node-compat.js';
2
+ /**
3
+ * `service install|uninstall|status` — start the panel at boot with the OS's own service manager.
4
+ *
5
+ * One pure generator per platform; the installer writes into a directory it is handed, so a test never
6
+ * touches systemd, launchd or Task Scheduler. A unit signals only the panel on stop (a persistent entry
7
+ * outlives it) and restarts on failure only.
8
+ */
9
+ export type ServicePlatform = 'linux' | 'darwin' | 'win32';
10
+ /**
11
+ * Marks a file as this command's, in each format's own comment syntax. `home-hosted.service` is also
12
+ * the name a distro package or a hand-written unit uses, so a path alone does not prove ownership.
13
+ */
14
+ export declare const SERVICE_MARKER = "Managed by home-hosted \u2014 `home-hosted service uninstall` removes it";
15
+ export declare function markerLine(platform: ServicePlatform): string | null;
16
+ /** A file with no marker is not ours — the safe direction for `uninstall`. */
17
+ export declare function isServiceOurs(contents: string, platform: ServicePlatform): boolean;
18
+ /**
19
+ * `startup` is the Windows-only no-privilege form: a `.cmd` in the user's Startup folder, because
20
+ * registering any scheduled task needs an administrator.
21
+ */
22
+ export type ServiceScope = 'user' | 'system' | 'startup';
23
+ export interface ServiceSpec {
24
+ node: string;
25
+ /** Runtime flags before the entry (`--import=<tsx>` in a source checkout), then the CLI entry. */
26
+ entry: string[];
27
+ home: string;
28
+ project: string;
29
+ pathEnv: string;
30
+ /** Where the panel's console goes when the manager has no journal of its own (launchd). */
31
+ logFile: string;
32
+ scope: ServiceScope;
33
+ /** The account a system unit runs as, so the home stays owned by the person who installed it. */
34
+ user: string;
35
+ name: string;
36
+ }
37
+ export declare function serviceArgv(spec: Pick<ServiceSpec, 'node' | 'entry' | 'home' | 'project'>): string[];
38
+ /**
39
+ * Refuse a value that cannot be represented in the file. These come from argv/env, and a newline in
40
+ * `--home` would inject a whole directive into a unit that starts at boot.
41
+ */
42
+ export declare function validateServiceSpec(spec: Pick<ServiceSpec, 'node' | 'entry' | 'home' | 'project' | 'pathEnv' | 'logFile' | 'user' | 'name'>): void;
43
+ export declare function systemdUnit(spec: ServiceSpec): string;
44
+ export declare function startupCommandLine(spec: Pick<ServiceSpec, 'node' | 'entry' | 'home' | 'project'>): string;
45
+ /**
46
+ * The Startup folder's `.cmd`: a user-scoped Windows entry that needs no administrator. It gives no
47
+ * restart policy or supervision; a crash waits for the next logon.
48
+ */
49
+ export declare function startupCmd(spec: ServiceSpec): string;
50
+ export declare function startupFolderDir(env?: NodeJS.ProcessEnv): string;
51
+ export declare function launchdLabel(name: string): string;
52
+ export declare function launchdPlist(spec: ServiceSpec): string;
53
+ /**
54
+ * Quote one argv word the way `CreateProcess` parses a command line: backslashes are literal except
55
+ * before a `"`, where they pair up, and a trailing run doubles so the closing quote survives.
56
+ */
57
+ export declare function windowsArg(word: string): string;
58
+ /**
59
+ * A Task Scheduler task: at logon for `user`, at boot as SYSTEM for `system`. A task cannot carry
60
+ * environment variables, so home and project travel as flags and PATH is the account's own.
61
+ */
62
+ export declare function scheduledTaskXml(spec: ServiceSpec): string;
63
+ export declare function renderService(platform: ServicePlatform, spec: ServiceSpec): {
64
+ text: string;
65
+ bytes: Buffer;
66
+ fileName: string;
67
+ };
68
+ /** Task Scheduler keeps the task itself; its XML is kept in the home as the record of what was registered. */
69
+ export declare function serviceDir(platform: ServicePlatform, scope: ServiceScope, context: {
70
+ homedir: string;
71
+ env: NodeJS.ProcessEnv;
72
+ hhDir: string;
73
+ }): string;
74
+ /** Injectable so a test records instead of running. */
75
+ export type ServiceRunner = (command: string, args: string[]) => {
76
+ status: number | null;
77
+ stdout: string;
78
+ stderr: string;
79
+ };
80
+ export declare function managerCommands(platform: ServicePlatform, scope: ServiceScope, action: 'install' | 'uninstall' | 'status', file: string, name: string): Array<[string, string[]]>;
81
+ export interface ServiceOptions {
82
+ action: 'install' | 'uninstall' | 'status';
83
+ scope: ServiceScope;
84
+ print: boolean;
85
+ platform?: NodeJS.Platform;
86
+ /** Overrides `serviceDir()` — keeps a test off the real manager's directories. */
87
+ targetDir?: string;
88
+ container?: string | null;
89
+ run?: ServiceRunner;
90
+ spec?: ServiceSpec;
91
+ out?: (text: string) => void;
92
+ }
93
+ /**
94
+ * This node's own directory first (so a server's `node` is the panel's), then the installing shell's
95
+ * PATH minus fnm's per-shell directories, which are gone after a reboot.
96
+ */
97
+ export declare function servicePath(current: string, node: string): string;
98
+ export declare function currentSpec(entry: string, scope: ServiceScope): Promise<ServiceSpec>;
99
+ /**
100
+ * The account a unit should run as — the person, not whoever elevated the command. `SUDO_USER`/
101
+ * `PKEXEC_USER` survive elevation; a name is trusted only while its `*_UID` sibling agrees, since a
102
+ * stale inherited name would collapse the unit to root.
103
+ */
104
+ export declare function serviceUser(env?: NodeJS.ProcessEnv): string;
105
+ /**
106
+ * The container this process runs in, or `null`. A boot entry written inside one lands in the
107
+ * container's filesystem, which the host's manager never reads. Probes are cheap local reads ordered
108
+ * by confidence; failure means "not a container".
109
+ */
110
+ export declare function detectContainer(env?: NodeJS.ProcessEnv): string | null;
111
+ export declare const CONTAINER_RESTART_HINT = "use the container restart policy instead: `docker run --restart unless-stopped`, or `restart: unless-stopped` in a compose file";
112
+ export declare function runService(options: ServiceOptions, entry: string): Promise<void>;
113
+ export declare function serviceCommand(entry: string): import("citty").CommandDef<{
114
+ readonly action: {
115
+ readonly type: "positional";
116
+ readonly required: false;
117
+ readonly description: "install | uninstall | status";
118
+ };
119
+ readonly user: {
120
+ readonly type: "boolean";
121
+ readonly description: "a service for this account (the default)";
122
+ };
123
+ readonly system: {
124
+ readonly type: "boolean";
125
+ readonly description: "a machine-wide service, started at boot (needs an administrator)";
126
+ };
127
+ readonly startup: {
128
+ readonly type: "boolean";
129
+ readonly description: "Windows only: a Startup-folder .cmd, which needs no administrator (starts at logon, no restart policy)";
130
+ };
131
+ readonly print: {
132
+ readonly type: "boolean";
133
+ readonly description: "with install: print the unit and install nothing";
134
+ };
135
+ }>;
@@ -1,3 +1,4 @@
1
+ import { GlobalSettingsStore } from '../config/settings.js';
1
2
  /**
2
3
  * `setup-temp` — teach the panel how to read this machine's CPU temperature.
3
4
  *
@@ -11,7 +12,7 @@ export declare const setupTempArgs: {
11
12
  };
12
13
  readonly clear: {
13
14
  readonly type: "boolean";
14
- readonly description: "stop using a configured command and delete its helper";
15
+ readonly description: "stop using a configured command, and delete its helper when this home runs it";
15
16
  readonly default: false;
16
17
  };
17
18
  readonly download: {
@@ -19,29 +20,32 @@ export declare const setupTempArgs: {
19
20
  readonly description: "download LibreHardwareMonitor without asking; --no-download never does (for a script)";
20
21
  };
21
22
  };
22
- /** The temperature sources `setup-temp` can install. One today; a flag each as more appear. */
23
23
  export type TemperatureSource = 'wsl';
24
- /** Which source a flag names, or null when the invocation asks for no change. */
25
24
  export declare function sourceFromFlags(flags: {
26
25
  wsl?: boolean;
27
26
  clear?: boolean;
28
27
  }): TemperatureSource | null;
29
28
  /**
30
- * The refusal for a flag set that cannot mean what it says, or `null`.
31
- *
32
- * `download` is a **modifier of `--wsl`**, not a command of its own: only the WSL2 branch fetches
33
- * anything, and the no-flag branch ends before a source is chosen. Left unreachable it was silently
34
- * dropped — `setup-temp --download` exited 0 having done nothing, which a script reads as
35
- * "installed" — so the flag is refused instead, naming the one it belongs to.
36
- *
37
- * `--clear` is the opposite request, so pairing it with either is refused rather than letting one
38
- * quietly win.
29
+ * The refusal for a flag set that cannot mean what it says, or `null`. `--download` only modifies
30
+ * `--wsl`, and `--clear` conflicts with both.
39
31
  */
40
32
  export declare function flagProblem(flags: {
41
33
  wsl?: boolean;
42
34
  clear?: boolean;
43
35
  download?: boolean;
44
36
  }): string | null;
37
+ /**
38
+ * `--clear`: stop using the configured command, and delete the machine-wide helper only when this
39
+ * home's command runs it — another home may use it. `helper` is injected so a test never names the
40
+ * real path.
41
+ */
42
+ export declare function clearTemperatureSource(store: GlobalSettingsStore, helper: string | null): {
43
+ ok: true;
44
+ lines: string[];
45
+ } | {
46
+ ok: false;
47
+ error: string;
48
+ };
45
49
  export declare function runSetupTemp(flags: {
46
50
  wsl?: boolean;
47
51
  clear?: boolean;
@@ -55,7 +59,7 @@ export declare const setupTempCommand: import("citty").CommandDef<{
55
59
  };
56
60
  readonly clear: {
57
61
  readonly type: "boolean";
58
- readonly description: "stop using a configured command and delete its helper";
62
+ readonly description: "stop using a configured command, and delete its helper when this home runs it";
59
63
  readonly default: false;
60
64
  };
61
65
  readonly download: {
@@ -1,4 +1,3 @@
1
- /** `status` answers "is it running, where, and how do I reach it". */
2
1
  export declare const statusArgs: {
3
2
  readonly json: {
4
3
  readonly type: "boolean";
@@ -6,6 +5,13 @@ export declare const statusArgs: {
6
5
  };
7
6
  };
8
7
  export declare function runStatus(json: boolean): Promise<void>;
8
+ export interface StatusServer {
9
+ id: string;
10
+ workspaceId: string;
11
+ status: string;
12
+ }
13
+ /** One line per server, the ones needing attention first; `workspace/id` outside the default workspace. */
14
+ export declare function serverLines(servers: readonly StatusServer[]): string[];
9
15
  export declare const statusCommand: import("citty").CommandDef<{
10
16
  readonly json: {
11
17
  readonly type: "boolean";
@@ -0,0 +1,6 @@
1
+ export declare const tokenCommand: import("citty").CommandDef<{
2
+ readonly command: {
3
+ readonly type: "positional";
4
+ readonly required: false;
5
+ };
6
+ }>;
@@ -1,14 +1,7 @@
1
1
  /**
2
- * `home-hosted ui-switch` installs the panel's frontend UI without the settings
3
- * page: a GitHub release asset (the default), a local zip, or an http(s) URL.
4
- *
5
- * This module is only ever imported dynamically, after `--home` has been applied,
6
- * so the modules that read the state directories are imported inside the command
7
- * rather than at the top. The release-side helpers it shares with `ui-update` are
8
- * in `#src/providers/ui-release`, and re-exported here so existing importers keep working.
2
+ * `home-hosted ui-switch` installs a UI from a GitHub release asset (the default), a local zip, or an
3
+ * http(s) URL. Imported only after `--home` is applied; state-reading modules load inside the command.
9
4
  */
10
- export * from '../providers/ui-release.js';
11
- /** What the command needs from the CLI that owns the readline prompts and the colours. */
12
5
  export interface UiSwitchIo {
13
6
  write: (text: string) => void;
14
7
  prompt: (question: string) => Promise<string>;
@@ -19,9 +12,5 @@ export interface UiSwitchIo {
19
12
  };
20
13
  }
21
14
  export declare function uiSwitch(argv: string[], io: UiSwitchIo): Promise<void>;
22
- /**
23
- * The citty entry. `ui-switch` keeps parsing its own flags (and its own error
24
- * messages) inside `uiSwitch`; citty dispatches with the argv it was handed, so
25
- * the invocation changes and the helpers do not.
26
- */
15
+ /** `ui-switch` parses its own flags inside `uiSwitch`. */
27
16
  export declare const uiSwitchCommand: import("citty").CommandDef<import("citty").ArgsDef>;