home-hosted 0.11.0 → 0.12.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 (314) hide show
  1. package/README.md +273 -628
  2. package/dist/chunks/archive-DpCwA8Nf.js +339 -0
  3. package/dist/chunks/archive-DpCwA8Nf.js.map +1 -0
  4. package/dist/chunks/atomic-CEfCUfkQ.js +25 -0
  5. package/dist/chunks/atomic-CEfCUfkQ.js.map +1 -0
  6. package/dist/chunks/backup-CPrJVPJI.js +797 -0
  7. package/dist/chunks/backup-CPrJVPJI.js.map +1 -0
  8. package/dist/chunks/backups-Bd2SF2qd.js +4346 -0
  9. package/dist/chunks/backups-Bd2SF2qd.js.map +1 -0
  10. package/dist/chunks/config-text-DifCHhnz.js +50 -0
  11. package/dist/chunks/config-text-DifCHhnz.js.map +1 -0
  12. package/dist/chunks/contracts-ku5ypHXJ.js +2256 -0
  13. package/dist/chunks/contracts-ku5ypHXJ.js.map +1 -0
  14. package/dist/chunks/daemon-TwXk5vb8.js +215 -0
  15. package/dist/chunks/daemon-TwXk5vb8.js.map +1 -0
  16. package/dist/chunks/daemon-log-BVj8cDEo.js +241 -0
  17. package/dist/chunks/daemon-log-BVj8cDEo.js.map +1 -0
  18. package/dist/chunks/docker-CGv4Uv7w.js +436 -0
  19. package/dist/chunks/docker-CGv4Uv7w.js.map +1 -0
  20. package/dist/chunks/down-BlX5X3bm.js +378 -0
  21. package/dist/chunks/down-BlX5X3bm.js.map +1 -0
  22. package/dist/chunks/init-DdmqHVra.js +263 -0
  23. package/dist/chunks/init-DdmqHVra.js.map +1 -0
  24. package/dist/chunks/last-stop-BZ08Z89-.js +52 -0
  25. package/dist/chunks/last-stop-BZ08Z89-.js.map +1 -0
  26. package/dist/chunks/layout-D74TGUnr.js +24 -0
  27. package/dist/chunks/layout-D74TGUnr.js.map +1 -0
  28. package/dist/chunks/log-buffer-HnP0jKhZ.js +350 -0
  29. package/dist/chunks/log-buffer-HnP0jKhZ.js.map +1 -0
  30. package/dist/chunks/logger-B5U4GD3j.js +13 -0
  31. package/dist/chunks/logger-B5U4GD3j.js.map +1 -0
  32. package/dist/chunks/logs-gI_69Q1P.js +265 -0
  33. package/dist/chunks/logs-gI_69Q1P.js.map +1 -0
  34. package/dist/chunks/migrate-BTlsibvF.js +155 -0
  35. package/dist/chunks/migrate-BTlsibvF.js.map +1 -0
  36. package/dist/chunks/nanny-20aBXL1o.js +1069 -0
  37. package/dist/chunks/nanny-20aBXL1o.js.map +1 -0
  38. package/dist/chunks/nanny-CjnnrIpm.js +132 -0
  39. package/dist/chunks/nanny-CjnnrIpm.js.map +1 -0
  40. package/dist/chunks/nanny-DUaAfCV-.js +39 -0
  41. package/dist/chunks/nanny-DUaAfCV-.js.map +1 -0
  42. package/dist/chunks/nanny-sweep-Ca9kPAVi.js +104 -0
  43. package/dist/chunks/nanny-sweep-Ca9kPAVi.js.map +1 -0
  44. package/dist/chunks/nearest-6KgQEDUe.js +41 -0
  45. package/dist/chunks/nearest-6KgQEDUe.js.map +1 -0
  46. package/dist/chunks/parse-B9owE47G.js +383 -0
  47. package/dist/chunks/parse-B9owE47G.js.map +1 -0
  48. package/dist/chunks/paths-BT94q6-w.js +172 -0
  49. package/dist/chunks/paths-BT94q6-w.js.map +1 -0
  50. package/dist/chunks/port-B8WBTRMk.js +333 -0
  51. package/dist/chunks/port-B8WBTRMk.js.map +1 -0
  52. package/dist/chunks/restart-UZgeDukG.js +126 -0
  53. package/dist/chunks/restart-UZgeDukG.js.map +1 -0
  54. package/dist/chunks/rolldown-runtime-D7D4PA-g.js +13 -0
  55. package/dist/chunks/schema-o7Lgk0V1.js +102 -0
  56. package/dist/chunks/schema-o7Lgk0V1.js.map +1 -0
  57. package/dist/chunks/secrets-D7PdYh71.js +544 -0
  58. package/dist/chunks/secrets-D7PdYh71.js.map +1 -0
  59. package/dist/chunks/server-BuIeSsRu.js +169 -0
  60. package/dist/chunks/server-BuIeSsRu.js.map +1 -0
  61. package/dist/chunks/server-ids-DRuNLVCV.js +32 -0
  62. package/dist/chunks/server-ids-DRuNLVCV.js.map +1 -0
  63. package/dist/chunks/set-password-DegMumPh.js +43 -0
  64. package/dist/chunks/set-password-DegMumPh.js.map +1 -0
  65. package/dist/chunks/set-token-21d1FTDC.js +78 -0
  66. package/dist/chunks/set-token-21d1FTDC.js.map +1 -0
  67. package/dist/chunks/settings-BVSBnIwJ.js +332 -0
  68. package/dist/chunks/settings-BVSBnIwJ.js.map +1 -0
  69. package/dist/chunks/setup-temp-XiuAtiW2.js +150 -0
  70. package/dist/chunks/setup-temp-XiuAtiW2.js.map +1 -0
  71. package/dist/chunks/shape-DnTKzjQ2.js +24 -0
  72. package/dist/chunks/shape-DnTKzjQ2.js.map +1 -0
  73. package/dist/chunks/src-BL97vLVb.js +11153 -0
  74. package/dist/chunks/src-BL97vLVb.js.map +1 -0
  75. package/dist/chunks/status-EuWdRq8Q.js +119 -0
  76. package/dist/chunks/status-EuWdRq8Q.js.map +1 -0
  77. package/dist/chunks/ui-DbPuwddJ.js +323 -0
  78. package/dist/chunks/ui-DbPuwddJ.js.map +1 -0
  79. package/dist/chunks/ui-dir-CsU3uLNV.js +39 -0
  80. package/dist/chunks/ui-dir-CsU3uLNV.js.map +1 -0
  81. package/dist/chunks/ui-release-DKzVvlLd.js +312 -0
  82. package/dist/chunks/ui-release-DKzVvlLd.js.map +1 -0
  83. package/dist/chunks/ui-revert-BhqOAhmM.js +27 -0
  84. package/dist/chunks/ui-revert-BhqOAhmM.js.map +1 -0
  85. package/dist/chunks/ui-switch-CMoslPO2.js +150 -0
  86. package/dist/chunks/ui-switch-CMoslPO2.js.map +1 -0
  87. package/dist/chunks/ui-update-TTBBoDik.js +272 -0
  88. package/dist/chunks/ui-update-TTBBoDik.js.map +1 -0
  89. package/dist/chunks/up-C4H13hBw.js +196 -0
  90. package/dist/chunks/up-C4H13hBw.js.map +1 -0
  91. package/dist/chunks/usage-CSBgLRN5.js +85 -0
  92. package/dist/chunks/usage-CSBgLRN5.js.map +1 -0
  93. package/dist/chunks/workspaces-CAln2sQ7.js +221 -0
  94. package/dist/chunks/workspaces-CAln2sQ7.js.map +1 -0
  95. package/dist/chunks/wsl-temperature-BiCI4iK6.js +322 -0
  96. package/dist/chunks/wsl-temperature-BiCI4iK6.js.map +1 -0
  97. package/dist/cli.js +218 -25205
  98. package/dist/cli.js.map +1 -1
  99. package/dist/client.js +120 -0
  100. package/dist/client.js.map +1 -0
  101. package/dist/types/api/acme.d.ts +24 -0
  102. package/dist/types/api/auth/$.routes.d.ts +103 -0
  103. package/dist/types/api/backups.d.ts +179 -0
  104. package/dist/types/api/control.d.ts +469 -0
  105. package/dist/types/api/ddns.d.ts +432 -0
  106. package/dist/types/api/events.d.ts +21 -0
  107. package/dist/types/api/health.d.ts +27 -0
  108. package/dist/types/api/logs.d.ts +95 -0
  109. package/dist/types/api/metrics.d.ts +19 -0
  110. package/dist/types/api/notifications.d.ts +141 -0
  111. package/dist/types/api/proxy.d.ts +1128 -0
  112. package/dist/types/api/servers/$.routes.d.ts +1318 -0
  113. package/dist/types/api/settings.d.ts +642 -0
  114. package/dist/types/api/state.d.ts +492 -0
  115. package/dist/types/api/static.d.ts +11 -0
  116. package/dist/types/api/tls.d.ts +112 -0
  117. package/dist/types/api/workspaces/$.routes.d.ts +797 -0
  118. package/dist/types/api/wsl-temperature.d.ts +113 -0
  119. package/dist/types/app.d.ts +6080 -0
  120. package/dist/types/cli/args.d.ts +75 -0
  121. package/dist/types/cli/backup-offline.d.ts +23 -0
  122. package/dist/types/cli/backup.d.ts +79 -0
  123. package/dist/types/cli/down.d.ts +75 -0
  124. package/dist/types/cli/init.d.ts +60 -0
  125. package/dist/types/cli/io.d.ts +65 -0
  126. package/dist/types/cli/logs.d.ts +64 -0
  127. package/dist/types/cli/migrate.d.ts +33 -0
  128. package/dist/types/cli/nanny.d.ts +19 -0
  129. package/dist/types/cli/nearest.d.ts +10 -0
  130. package/dist/types/cli/restart.d.ts +42 -0
  131. package/dist/types/cli/server.d.ts +68 -0
  132. package/dist/types/cli/set-password.d.ts +14 -0
  133. package/dist/types/cli/set-token.d.ts +21 -0
  134. package/dist/types/cli/setup-temp.d.ts +65 -0
  135. package/dist/types/cli/status.d.ts +14 -0
  136. package/dist/types/cli/ui-revert.d.ts +3 -0
  137. package/dist/types/cli/ui-switch.d.ts +27 -0
  138. package/dist/types/cli/ui-update.d.ts +72 -0
  139. package/dist/types/cli/up.d.ts +90 -0
  140. package/dist/types/cli/usage.d.ts +23 -0
  141. package/dist/types/cli.d.ts +12 -0
  142. package/dist/types/client.d.ts +6284 -0
  143. package/dist/types/config/layout.d.ts +11 -0
  144. package/dist/types/config/migrations.d.ts +69 -0
  145. package/dist/types/config/parse.d.ts +54 -0
  146. package/dist/types/config/patch.d.ts +20 -0
  147. package/dist/types/config/schema.d.ts +318 -0
  148. package/dist/types/config/secret-parts.d.ts +48 -0
  149. package/dist/types/config/secrets.d.ts +206 -0
  150. package/dist/types/config/seed.d.ts +30 -0
  151. package/dist/types/config/server-ids.d.ts +14 -0
  152. package/dist/types/config/settings.d.ts +74 -0
  153. package/dist/types/config/store.d.ts +132 -0
  154. package/dist/types/config/workspaces.d.ts +96 -0
  155. package/dist/types/helpers/action-result.d.ts +46 -0
  156. package/dist/types/helpers/atomic.d.ts +9 -0
  157. package/dist/types/helpers/backoff.d.ts +7 -0
  158. package/dist/types/helpers/bind.d.ts +16 -0
  159. package/dist/types/helpers/config-text.d.ts +23 -0
  160. package/dist/types/helpers/cookies.d.ts +19 -0
  161. package/dist/types/helpers/copy-tree.d.ts +15 -0
  162. package/dist/types/helpers/daemon-log.d.ts +45 -0
  163. package/dist/types/helpers/daemon.d.ts +122 -0
  164. package/dist/types/helpers/deferred.d.ts +7 -0
  165. package/dist/types/helpers/env-file.d.ts +20 -0
  166. package/dist/types/helpers/error.d.ts +18 -0
  167. package/dist/types/helpers/factory.d.ts +6 -0
  168. package/dist/types/helpers/last-stop.d.ts +20 -0
  169. package/dist/types/helpers/logger.d.ts +7 -0
  170. package/dist/types/helpers/open.d.ts +2 -0
  171. package/dist/types/helpers/openapi.d.ts +46 -0
  172. package/dist/types/helpers/paths.d.ts +94 -0
  173. package/dist/types/helpers/restore-lock.d.ts +32 -0
  174. package/dist/types/helpers/runtime.d.ts +18 -0
  175. package/dist/types/helpers/secret-compare.d.ts +13 -0
  176. package/dist/types/helpers/shell.d.ts +19 -0
  177. package/dist/types/helpers/sse.d.ts +23 -0
  178. package/dist/types/helpers/template.d.ts +8 -0
  179. package/dist/types/helpers/ui-dir.d.ts +11 -0
  180. package/dist/types/helpers/validate.d.ts +7 -0
  181. package/dist/types/helpers/validator.d.ts +12 -0
  182. package/dist/types/helpers/version.d.ts +10 -0
  183. package/dist/types/helpers/workspace.d.ts +25 -0
  184. package/dist/types/index.d.ts +17 -0
  185. package/dist/types/middleware/auth.d.ts +37 -0
  186. package/dist/types/middleware/host.d.ts +29 -0
  187. package/dist/types/middleware/loopback.d.ts +18 -0
  188. package/dist/types/openapi-reference.d.ts +22 -0
  189. package/dist/types/openapi.d.ts +34 -0
  190. package/dist/types/providers/archive.d.ts +54 -0
  191. package/dist/types/providers/backup-hook.d.ts +34 -0
  192. package/dist/types/providers/ddns/cloudflare.d.ts +2 -0
  193. package/dist/types/providers/ddns/desec.d.ts +2 -0
  194. package/dist/types/providers/ddns/digitalocean.d.ts +2 -0
  195. package/dist/types/providers/ddns/duckdns.d.ts +2 -0
  196. package/dist/types/providers/ddns/dyndns2.d.ts +15 -0
  197. package/dist/types/providers/ddns/dynu.d.ts +2 -0
  198. package/dist/types/providers/ddns/freedns.d.ts +2 -0
  199. package/dist/types/providers/ddns/gandi.d.ts +2 -0
  200. package/dist/types/providers/ddns/godaddy.d.ts +2 -0
  201. package/dist/types/providers/ddns/henet.d.ts +3 -0
  202. package/dist/types/providers/ddns/index.d.ts +12 -0
  203. package/dist/types/providers/ddns/ip.d.ts +27 -0
  204. package/dist/types/providers/ddns/namecheap-api.d.ts +13 -0
  205. package/dist/types/providers/ddns/namecheap.d.ts +6 -0
  206. package/dist/types/providers/ddns/noip.d.ts +2 -0
  207. package/dist/types/providers/ddns/porkbun.d.ts +2 -0
  208. package/dist/types/providers/ddns/spaceship.d.ts +7 -0
  209. package/dist/types/providers/ddns/types.d.ts +98 -0
  210. package/dist/types/providers/ddns/zone.d.ts +11 -0
  211. package/dist/types/providers/docker.d.ts +117 -0
  212. package/dist/types/providers/entry-state.d.ts +15 -0
  213. package/dist/types/providers/health-check.d.ts +27 -0
  214. package/dist/types/providers/host.d.ts +147 -0
  215. package/dist/types/providers/identity.d.ts +54 -0
  216. package/dist/types/providers/log-tail.d.ts +29 -0
  217. package/dist/types/providers/nanny-sweep.d.ts +51 -0
  218. package/dist/types/providers/nanny.d.ts +94 -0
  219. package/dist/types/providers/port.d.ts +142 -0
  220. package/dist/types/providers/proc.d.ts +116 -0
  221. package/dist/types/providers/process.d.ts +61 -0
  222. package/dist/types/providers/proxy/caddy.d.ts +2 -0
  223. package/dist/types/providers/proxy/index.d.ts +7 -0
  224. package/dist/types/providers/proxy/types.d.ts +54 -0
  225. package/dist/types/providers/server-vars.d.ts +4 -0
  226. package/dist/types/providers/telegram.d.ts +32 -0
  227. package/dist/types/providers/ui-release.d.ts +113 -0
  228. package/dist/types/providers/webhook.d.ts +64 -0
  229. package/dist/types/providers/wsl-temperature.d.ts +69 -0
  230. package/dist/types/services/acme-challenge.d.ts +44 -0
  231. package/dist/types/services/auth.d.ts +145 -0
  232. package/dist/types/services/backups.d.ts +352 -0
  233. package/dist/types/services/config-watch.d.ts +40 -0
  234. package/dist/types/services/control-server.d.ts +58 -0
  235. package/dist/types/services/ddns.d.ts +67 -0
  236. package/dist/types/services/dependencies.d.ts +21 -0
  237. package/dist/types/services/events.d.ts +17 -0
  238. package/dist/types/services/exposure.d.ts +33 -0
  239. package/dist/types/services/history.d.ts +36 -0
  240. package/dist/types/services/host-monitor.d.ts +32 -0
  241. package/dist/types/services/init.d.ts +71 -0
  242. package/dist/types/services/log-buffer.d.ts +28 -0
  243. package/dist/types/services/log-files.d.ts +87 -0
  244. package/dist/types/services/log-relay.d.ts +36 -0
  245. package/dist/types/services/nanny.d.ts +14 -0
  246. package/dist/types/services/notifications.d.ts +124 -0
  247. package/dist/types/services/panel.d.ts +194 -0
  248. package/dist/types/services/proxy-config.d.ts +83 -0
  249. package/dist/types/services/proxy.d.ts +454 -0
  250. package/dist/types/services/state.d.ts +41 -0
  251. package/dist/types/services/supervisor/compose.d.ts +17 -0
  252. package/dist/types/services/supervisor/entry.d.ts +139 -0
  253. package/dist/types/services/supervisor/health.d.ts +55 -0
  254. package/dist/types/services/supervisor/pending-load.d.ts +6 -0
  255. package/dist/types/services/supervisor/persistent.d.ts +55 -0
  256. package/dist/types/services/supervisor/port-preflight.d.ts +45 -0
  257. package/dist/types/services/supervisor/records.d.ts +38 -0
  258. package/dist/types/services/supervisor/spawn.d.ts +15 -0
  259. package/dist/types/services/supervisor/view.d.ts +4 -0
  260. package/dist/types/services/supervisor.d.ts +113 -0
  261. package/dist/types/services/tls.d.ts +48 -0
  262. package/dist/types/services/ui-update.d.ts +44 -0
  263. package/dist/types/services/ui.d.ts +50 -0
  264. package/dist/types/shared/api-client.d.ts +137 -0
  265. package/dist/types/shared/backup-scope.d.ts +109 -0
  266. package/dist/types/shared/clone.d.ts +14 -0
  267. package/dist/types/shared/contracts.d.ts +4233 -0
  268. package/dist/types/shared/cpu-scale.d.ts +25 -0
  269. package/dist/types/shared/ddns-form.d.ts +62 -0
  270. package/dist/types/shared/endpoint.d.ts +8 -0
  271. package/dist/types/shared/error-message.d.ts +8 -0
  272. package/dist/types/shared/fields.d.ts +21 -0
  273. package/dist/types/shared/generated.d.ts +26 -0
  274. package/dist/types/shared/host-readings.d.ts +185 -0
  275. package/dist/types/shared/patch-diff.d.ts +94 -0
  276. package/dist/types/shared/probe-latency.d.ts +25 -0
  277. package/dist/types/shared/proxy-form.d.ts +182 -0
  278. package/dist/types/shared/server-attention.d.ts +37 -0
  279. package/dist/types/shared/server-key.d.ts +13 -0
  280. package/dist/types/shared/server-readings.d.ts +55 -0
  281. package/dist/types/shared/server-url.d.ts +43 -0
  282. package/dist/types/shared/shape.d.ts +17 -0
  283. package/dist/types/shared/ui-format.d.ts +89 -0
  284. package/docs/API.md +180 -0
  285. package/docs/BACKUPS.md +97 -0
  286. package/docs/CLI.md +122 -0
  287. package/docs/DDNS.md +9 -1
  288. package/docs/RESTORE_DEMO.md +1 -1
  289. package/docs/REVERSE_PROXY.md +2 -2
  290. package/docs/SECURITY.md +82 -0
  291. package/docs/SERVERS.md +41 -13
  292. package/docs/UI_CREATION.md +82 -291
  293. package/package.json +18 -8
  294. package/uis/stock/dist/assets/de-DyGrM1KK.js +1 -0
  295. package/uis/stock/dist/assets/es-BebHdc0E.js +1 -0
  296. package/uis/stock/dist/assets/fr-DsDTrxhI.js +1 -0
  297. package/uis/stock/dist/assets/index-6LANO2Ua.css +2 -0
  298. package/uis/stock/dist/assets/{index-KdyqrVv8.js → index-D06cUZbM.js} +15 -12
  299. package/uis/stock/dist/assets/ja-D3RARJjW.js +1 -0
  300. package/uis/stock/dist/assets/ko-CKI3dFoD.js +1 -0
  301. package/uis/stock/dist/assets/ru-DEU5ujXt.js +1 -0
  302. package/uis/stock/dist/assets/vi-ULKPnasj.js +1 -0
  303. package/uis/stock/dist/assets/zh-CN-tCvnOxWy.js +1 -0
  304. package/uis/stock/dist/index.html +2 -2
  305. package/uis/stock/dist/ui.json +3 -3
  306. package/uis/stock/dist/assets/de-0YLueNal.js +0 -1
  307. package/uis/stock/dist/assets/es-FCHhRmn2.js +0 -1
  308. package/uis/stock/dist/assets/fr-C69Z8o0z.js +0 -1
  309. package/uis/stock/dist/assets/index-Cok5msAO.css +0 -2
  310. package/uis/stock/dist/assets/ja-Chz9YOqR.js +0 -1
  311. package/uis/stock/dist/assets/ko-CtXZ2x1l.js +0 -1
  312. package/uis/stock/dist/assets/ru-D_jE64xN.js +0 -1
  313. package/uis/stock/dist/assets/vi-sxSffss7.js +0 -1
  314. package/uis/stock/dist/assets/zh-CN-ChTpf29X.js +0 -1
@@ -0,0 +1,432 @@
1
+ import type { AppDeps } from '../app.js';
2
+ /**
3
+ * Dynamic DNS is configured as one whole block, not as settings patches: its
4
+ * accounts and hostnames are lists, and a key-by-key merge would leave a removed
5
+ * account or hostname behind. Provider credentials never come back over the API —
6
+ * the view only says which accounts have them.
7
+ *
8
+ * It is workspace-scoped: each workspace keeps its own hostnames, credentials and
9
+ * DDNS state under its directory.
10
+ */
11
+ export declare function createDdnsRoute(deps: AppDeps): import("hono/hono-base").HonoBase<import("hono").Env, {
12
+ "/ddns": {
13
+ $get: {
14
+ input: {
15
+ query: {
16
+ workspace?: string | undefined;
17
+ };
18
+ };
19
+ output: {
20
+ config: {
21
+ enabled: boolean;
22
+ intervalMs: number;
23
+ ipv4: {
24
+ enabled: boolean;
25
+ url: string;
26
+ };
27
+ ipv6: {
28
+ enabled: boolean;
29
+ url: string;
30
+ };
31
+ ttl: number;
32
+ accounts: {
33
+ id: string;
34
+ provider: string;
35
+ label: string;
36
+ }[];
37
+ domains: {
38
+ host: `${string}${string}.${string}${string}${string}`;
39
+ account: string;
40
+ types: ("A" | "AAAA")[];
41
+ proxied: boolean;
42
+ enabled: boolean;
43
+ zone?: string | undefined;
44
+ ttl?: number | undefined;
45
+ }[];
46
+ };
47
+ status: {
48
+ enabled: boolean;
49
+ running: boolean;
50
+ lastRunAt: number | null;
51
+ lastResult: string | null;
52
+ ipv4: string | null;
53
+ ipv6: string | null;
54
+ records: {
55
+ host: string;
56
+ account: string;
57
+ provider: string;
58
+ type: "A" | "AAAA";
59
+ ip: string | null;
60
+ state: "error" | "ok" | "pending" | "unchanged" | "skipped";
61
+ message: string | null;
62
+ updatedAt: number | null;
63
+ stopped?: boolean | undefined;
64
+ }[];
65
+ };
66
+ providers: {
67
+ id: string;
68
+ label: string;
69
+ docsUrl: string;
70
+ families: ("A" | "AAAA")[];
71
+ fields: {
72
+ key: string;
73
+ label: string;
74
+ hint: string;
75
+ optional: boolean;
76
+ }[];
77
+ ttl: boolean;
78
+ proxied: boolean;
79
+ txt: boolean;
80
+ }[];
81
+ credentials: string[];
82
+ };
83
+ outputFormat: "json";
84
+ status: import("hono/utils/http-status").ContentfulStatusCode;
85
+ };
86
+ };
87
+ } & {
88
+ "/ddns": {
89
+ $put: {
90
+ input: {
91
+ query: {
92
+ workspace?: string | undefined;
93
+ };
94
+ } & {
95
+ json: {
96
+ enabled?: boolean | undefined;
97
+ intervalMs?: number | undefined;
98
+ ttl?: number | undefined;
99
+ ipv4?: {
100
+ url?: string | undefined;
101
+ enabled?: boolean | undefined;
102
+ } | undefined;
103
+ ipv6?: {
104
+ url?: string | undefined;
105
+ enabled?: boolean | undefined;
106
+ } | undefined;
107
+ accounts?: {
108
+ id: string;
109
+ provider: string;
110
+ label?: string | undefined;
111
+ }[] | undefined;
112
+ domains?: {
113
+ host: `${string}${string}.${string}${string}${string}`;
114
+ account: string;
115
+ zone?: string | undefined;
116
+ ttl?: number | undefined;
117
+ types?: ("A" | "AAAA")[] | undefined;
118
+ enabled?: boolean | undefined;
119
+ proxied?: boolean | undefined;
120
+ }[] | undefined;
121
+ };
122
+ };
123
+ output: {
124
+ config: {
125
+ enabled: boolean;
126
+ intervalMs: number;
127
+ ipv4: {
128
+ enabled: boolean;
129
+ url: string;
130
+ };
131
+ ipv6: {
132
+ enabled: boolean;
133
+ url: string;
134
+ };
135
+ ttl: number;
136
+ accounts: {
137
+ id: string;
138
+ provider: string;
139
+ label: string;
140
+ }[];
141
+ domains: {
142
+ host: `${string}${string}.${string}${string}${string}`;
143
+ account: string;
144
+ types: ("A" | "AAAA")[];
145
+ proxied: boolean;
146
+ enabled: boolean;
147
+ zone?: string | undefined;
148
+ ttl?: number | undefined;
149
+ }[];
150
+ };
151
+ status: {
152
+ enabled: boolean;
153
+ running: boolean;
154
+ lastRunAt: number | null;
155
+ lastResult: string | null;
156
+ ipv4: string | null;
157
+ ipv6: string | null;
158
+ records: {
159
+ host: string;
160
+ account: string;
161
+ provider: string;
162
+ type: "A" | "AAAA";
163
+ ip: string | null;
164
+ state: "error" | "ok" | "pending" | "unchanged" | "skipped";
165
+ message: string | null;
166
+ updatedAt: number | null;
167
+ stopped?: boolean | undefined;
168
+ }[];
169
+ };
170
+ providers: {
171
+ id: string;
172
+ label: string;
173
+ docsUrl: string;
174
+ families: ("A" | "AAAA")[];
175
+ fields: {
176
+ key: string;
177
+ label: string;
178
+ hint: string;
179
+ optional: boolean;
180
+ }[];
181
+ ttl: boolean;
182
+ proxied: boolean;
183
+ txt: boolean;
184
+ }[];
185
+ credentials: string[];
186
+ };
187
+ outputFormat: "json";
188
+ status: import("hono/utils/http-status").ContentfulStatusCode;
189
+ };
190
+ };
191
+ } & {
192
+ "/ddns/credentials/:id": {
193
+ $put: {
194
+ input: {
195
+ query: {
196
+ workspace?: string | undefined;
197
+ };
198
+ } & {
199
+ param: {
200
+ id: string;
201
+ };
202
+ } & {
203
+ json: {
204
+ provider: string;
205
+ credentials: Record<string, string>;
206
+ };
207
+ };
208
+ output: {
209
+ config: {
210
+ enabled: boolean;
211
+ intervalMs: number;
212
+ ipv4: {
213
+ enabled: boolean;
214
+ url: string;
215
+ };
216
+ ipv6: {
217
+ enabled: boolean;
218
+ url: string;
219
+ };
220
+ ttl: number;
221
+ accounts: {
222
+ id: string;
223
+ provider: string;
224
+ label: string;
225
+ }[];
226
+ domains: {
227
+ host: `${string}${string}.${string}${string}${string}`;
228
+ account: string;
229
+ types: ("A" | "AAAA")[];
230
+ proxied: boolean;
231
+ enabled: boolean;
232
+ zone?: string | undefined;
233
+ ttl?: number | undefined;
234
+ }[];
235
+ };
236
+ status: {
237
+ enabled: boolean;
238
+ running: boolean;
239
+ lastRunAt: number | null;
240
+ lastResult: string | null;
241
+ ipv4: string | null;
242
+ ipv6: string | null;
243
+ records: {
244
+ host: string;
245
+ account: string;
246
+ provider: string;
247
+ type: "A" | "AAAA";
248
+ ip: string | null;
249
+ state: "error" | "ok" | "pending" | "unchanged" | "skipped";
250
+ message: string | null;
251
+ updatedAt: number | null;
252
+ stopped?: boolean | undefined;
253
+ }[];
254
+ };
255
+ providers: {
256
+ id: string;
257
+ label: string;
258
+ docsUrl: string;
259
+ families: ("A" | "AAAA")[];
260
+ fields: {
261
+ key: string;
262
+ label: string;
263
+ hint: string;
264
+ optional: boolean;
265
+ }[];
266
+ ttl: boolean;
267
+ proxied: boolean;
268
+ txt: boolean;
269
+ }[];
270
+ credentials: string[];
271
+ };
272
+ outputFormat: "json";
273
+ status: import("hono/utils/http-status").ContentfulStatusCode;
274
+ };
275
+ };
276
+ } & {
277
+ "/ddns/credentials/:id": {
278
+ $delete: {
279
+ input: {
280
+ query: {
281
+ workspace?: string | undefined;
282
+ };
283
+ } & {
284
+ param: {
285
+ id: string;
286
+ };
287
+ };
288
+ output: {
289
+ config: {
290
+ enabled: boolean;
291
+ intervalMs: number;
292
+ ipv4: {
293
+ enabled: boolean;
294
+ url: string;
295
+ };
296
+ ipv6: {
297
+ enabled: boolean;
298
+ url: string;
299
+ };
300
+ ttl: number;
301
+ accounts: {
302
+ id: string;
303
+ provider: string;
304
+ label: string;
305
+ }[];
306
+ domains: {
307
+ host: `${string}${string}.${string}${string}${string}`;
308
+ account: string;
309
+ types: ("A" | "AAAA")[];
310
+ proxied: boolean;
311
+ enabled: boolean;
312
+ zone?: string | undefined;
313
+ ttl?: number | undefined;
314
+ }[];
315
+ };
316
+ status: {
317
+ enabled: boolean;
318
+ running: boolean;
319
+ lastRunAt: number | null;
320
+ lastResult: string | null;
321
+ ipv4: string | null;
322
+ ipv6: string | null;
323
+ records: {
324
+ host: string;
325
+ account: string;
326
+ provider: string;
327
+ type: "A" | "AAAA";
328
+ ip: string | null;
329
+ state: "error" | "ok" | "pending" | "unchanged" | "skipped";
330
+ message: string | null;
331
+ updatedAt: number | null;
332
+ stopped?: boolean | undefined;
333
+ }[];
334
+ };
335
+ providers: {
336
+ id: string;
337
+ label: string;
338
+ docsUrl: string;
339
+ families: ("A" | "AAAA")[];
340
+ fields: {
341
+ key: string;
342
+ label: string;
343
+ hint: string;
344
+ optional: boolean;
345
+ }[];
346
+ ttl: boolean;
347
+ proxied: boolean;
348
+ txt: boolean;
349
+ }[];
350
+ credentials: string[];
351
+ };
352
+ outputFormat: "json";
353
+ status: import("hono/utils/http-status").ContentfulStatusCode;
354
+ };
355
+ };
356
+ } & {
357
+ "/ddns/check": {
358
+ $post: {
359
+ input: {
360
+ query: {
361
+ workspace?: string | undefined;
362
+ };
363
+ };
364
+ output: {
365
+ config: {
366
+ enabled: boolean;
367
+ intervalMs: number;
368
+ ipv4: {
369
+ enabled: boolean;
370
+ url: string;
371
+ };
372
+ ipv6: {
373
+ enabled: boolean;
374
+ url: string;
375
+ };
376
+ ttl: number;
377
+ accounts: {
378
+ id: string;
379
+ provider: string;
380
+ label: string;
381
+ }[];
382
+ domains: {
383
+ host: `${string}${string}.${string}${string}${string}`;
384
+ account: string;
385
+ types: ("A" | "AAAA")[];
386
+ proxied: boolean;
387
+ enabled: boolean;
388
+ zone?: string | undefined;
389
+ ttl?: number | undefined;
390
+ }[];
391
+ };
392
+ status: {
393
+ enabled: boolean;
394
+ running: boolean;
395
+ lastRunAt: number | null;
396
+ lastResult: string | null;
397
+ ipv4: string | null;
398
+ ipv6: string | null;
399
+ records: {
400
+ host: string;
401
+ account: string;
402
+ provider: string;
403
+ type: "A" | "AAAA";
404
+ ip: string | null;
405
+ state: "error" | "ok" | "pending" | "unchanged" | "skipped";
406
+ message: string | null;
407
+ updatedAt: number | null;
408
+ stopped?: boolean | undefined;
409
+ }[];
410
+ };
411
+ providers: {
412
+ id: string;
413
+ label: string;
414
+ docsUrl: string;
415
+ families: ("A" | "AAAA")[];
416
+ fields: {
417
+ key: string;
418
+ label: string;
419
+ hint: string;
420
+ optional: boolean;
421
+ }[];
422
+ ttl: boolean;
423
+ proxied: boolean;
424
+ txt: boolean;
425
+ }[];
426
+ credentials: string[];
427
+ };
428
+ outputFormat: "json";
429
+ status: import("hono/utils/http-status").ContentfulStatusCode;
430
+ };
431
+ };
432
+ }, "/", "/ddns/check">;
@@ -0,0 +1,21 @@
1
+ import type { AppDeps } from '../app.js';
2
+ /**
3
+ * One SSE stream per subscriber. `?workspace=<id>` narrows server and log frames to one workspace,
4
+ * `&serverId=<id>` to one server; the first frame always carries the full state snapshot.
5
+ */
6
+ export declare function createEventsRoute(deps: AppDeps): import("hono/hono-base").HonoBase<import("hono").Env, {
7
+ "/events": {
8
+ $get: {
9
+ input: {
10
+ query: {
11
+ serverId?: string | undefined;
12
+ workspace?: string | undefined;
13
+ logs?: string | undefined;
14
+ };
15
+ };
16
+ output: {};
17
+ outputFormat: string;
18
+ status: import("hono/utils/http-status").StatusCode;
19
+ };
20
+ };
21
+ }, "/", "/events">;
@@ -0,0 +1,27 @@
1
+ import type { AppDeps } from '../app.js';
2
+ /**
3
+ * Liveness for external monitors. Mounted outside `/api`, so it answers without a
4
+ * session: it reports whether the panel itself is serving, and 503 while any entry
5
+ * `needsAttention` — crashed, blocked on its port, given up on by the panel, or running and
6
+ * failing its own health check. Server details are only included for an authenticated caller.
7
+ */
8
+ export declare function createHealthRoute(deps: AppDeps): import("hono/hono-base").HonoBase<import("hono").Env, {
9
+ "/healthz": {
10
+ $get: {
11
+ input: {};
12
+ output: {
13
+ servers?: {
14
+ total: number;
15
+ running: number;
16
+ crashed: number;
17
+ unhealthy: number;
18
+ } | undefined;
19
+ hostAlerts?: string[] | undefined;
20
+ status: string;
21
+ uptimeMs: number;
22
+ };
23
+ outputFormat: "json";
24
+ status: 200 | 503;
25
+ };
26
+ };
27
+ }, "/", "/healthz">;
@@ -0,0 +1,95 @@
1
+ import type { AppDeps } from '../app.js';
2
+ export declare function createLogsRoute(deps: AppDeps): import("hono/hono-base").HonoBase<import("hono").Env, {
3
+ "/logs": {
4
+ $get: {
5
+ input: {
6
+ query: {
7
+ workspace?: string | undefined;
8
+ };
9
+ };
10
+ output: {
11
+ servers: {
12
+ enabled: boolean;
13
+ sizeBytes: number;
14
+ files: {
15
+ name: string;
16
+ sizeBytes: number;
17
+ }[];
18
+ serverId: string;
19
+ label: string;
20
+ status: "stopped" | "running" | "starting" | "stopping" | "backoff" | "crashed" | "conflict";
21
+ }[];
22
+ };
23
+ outputFormat: "json";
24
+ status: import("hono/utils/http-status").ContentfulStatusCode;
25
+ };
26
+ };
27
+ } & {
28
+ "/logs/:id": {
29
+ $get: {
30
+ input: {
31
+ query: {
32
+ tail?: string | undefined;
33
+ search?: string | undefined;
34
+ stream?: "stdout" | "stderr" | "system" | undefined;
35
+ workspace?: string | undefined;
36
+ };
37
+ } & {
38
+ param: {
39
+ id: string;
40
+ };
41
+ };
42
+ output: {
43
+ serverId: string;
44
+ enabled: boolean;
45
+ sizeBytes: number;
46
+ files: string[];
47
+ searched: number | null;
48
+ lines: {
49
+ ts: number;
50
+ stream: "stdout" | "stderr" | "system";
51
+ text: string;
52
+ }[];
53
+ };
54
+ outputFormat: "json";
55
+ status: import("hono/utils/http-status").ContentfulStatusCode;
56
+ };
57
+ };
58
+ } & {
59
+ "/logs/:id/download": {
60
+ $get: {
61
+ input: {
62
+ query: {
63
+ file?: string | undefined;
64
+ workspace?: string | undefined;
65
+ };
66
+ } & {
67
+ param: {
68
+ id: string;
69
+ };
70
+ };
71
+ output: ReadableStream<any>;
72
+ outputFormat: "body";
73
+ status: 200;
74
+ };
75
+ };
76
+ } & {
77
+ "/logs/:id": {
78
+ $delete: {
79
+ input: {
80
+ query: {
81
+ workspace?: string | undefined;
82
+ };
83
+ } & {
84
+ param: {
85
+ id: string;
86
+ };
87
+ };
88
+ output: {
89
+ ok: true;
90
+ };
91
+ outputFormat: "json";
92
+ status: import("hono/utils/http-status").ContentfulStatusCode;
93
+ };
94
+ };
95
+ }, "/", "/logs/:id">;
@@ -0,0 +1,19 @@
1
+ import type { AppDeps } from '../app.js';
2
+ /**
3
+ * Prometheus text for whatever wants to scrape the panel (Beszel, Grafana,
4
+ * `curl`). Lives under `/api`, so it needs a session like every other route.
5
+ *
6
+ * It aggregates every workspace: each per-server sample carries its
7
+ * `workspace` label so a same-named server in another unit is still distinct.
8
+ */
9
+ export declare function createMetricsRoute(deps: AppDeps): import("hono/hono-base").HonoBase<import("hono").Env, {
10
+ "/metrics": {
11
+ $get: {
12
+ input: {};
13
+ output: `${string}
14
+ `;
15
+ outputFormat: "text";
16
+ status: 200;
17
+ };
18
+ };
19
+ }, "/", "/metrics">;