home-hosted 0.10.3 → 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 (317) 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 +229 -24861
  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 +12 -3
  288. package/docs/NOTIFICATIONS.md +3 -1
  289. package/docs/RESTORE_DEMO.md +6 -4
  290. package/docs/REVERSE_PROXY.md +2 -2
  291. package/docs/SECURITY.md +82 -0
  292. package/docs/SERVERS.md +47 -15
  293. package/docs/UI_CREATION.md +82 -286
  294. package/package.json +18 -9
  295. package/uis/stock/dist/assets/de-DyGrM1KK.js +1 -0
  296. package/uis/stock/dist/assets/es-BebHdc0E.js +1 -0
  297. package/uis/stock/dist/assets/fr-DsDTrxhI.js +1 -0
  298. package/uis/stock/dist/assets/index-6LANO2Ua.css +2 -0
  299. package/uis/stock/dist/assets/index-D06cUZbM.js +56 -0
  300. package/uis/stock/dist/assets/ja-D3RARJjW.js +1 -0
  301. package/uis/stock/dist/assets/ko-CKI3dFoD.js +1 -0
  302. package/uis/stock/dist/assets/ru-DEU5ujXt.js +1 -0
  303. package/uis/stock/dist/assets/vi-ULKPnasj.js +1 -0
  304. package/uis/stock/dist/assets/zh-CN-tCvnOxWy.js +1 -0
  305. package/uis/stock/dist/index.html +2 -2
  306. package/uis/stock/dist/ui.json +3 -3
  307. package/AGENTS.md +0 -403
  308. package/uis/stock/dist/assets/de-CiSKBON6.js +0 -1
  309. package/uis/stock/dist/assets/es-BgNQbboq.js +0 -1
  310. package/uis/stock/dist/assets/fr-WzBF8AXI.js +0 -1
  311. package/uis/stock/dist/assets/index-CXDl25BP.js +0 -53
  312. package/uis/stock/dist/assets/index-Cok5msAO.css +0 -2
  313. package/uis/stock/dist/assets/ja-DMQqF4ip.js +0 -1
  314. package/uis/stock/dist/assets/ko-DgfSg9v_.js +0 -1
  315. package/uis/stock/dist/assets/ru-DjIByX61.js +0 -1
  316. package/uis/stock/dist/assets/vi-DOB8nYFC.js +0 -1
  317. package/uis/stock/dist/assets/zh-CN-DZ3WlUgy.js +0 -1
@@ -0,0 +1,1318 @@
1
+ import type { AppDeps } from '../../app.js';
2
+ export declare function createServersRoute(deps: AppDeps): import("hono/hono-base").HonoBase<import("hono").Env, {
3
+ "/": {
4
+ $get: {
5
+ input: {
6
+ query: {
7
+ workspace?: string | undefined;
8
+ };
9
+ };
10
+ output: {
11
+ servers: {
12
+ id: string;
13
+ url: string | null;
14
+ maxRetries: number;
15
+ health: "unknown" | "disabled" | "healthy" | "unhealthy";
16
+ resources: {
17
+ cpuPercent: number | null;
18
+ rssBytes: number | null;
19
+ processes: number;
20
+ sampledAt: number;
21
+ } | null;
22
+ status: "stopped" | "running" | "starting" | "stopping" | "backoff" | "crashed" | "conflict";
23
+ startedAt: number | null;
24
+ restarts: number;
25
+ pid: number | null;
26
+ lastError: string | null;
27
+ workspaceId?: string | undefined;
28
+ bindHost: string;
29
+ portState: "unknown" | "free" | "in-use";
30
+ adopted?: boolean | undefined;
31
+ exitCode: number | null;
32
+ exitSignal: string | null;
33
+ nextRetryAt: number | null;
34
+ unhealthySince: number | null;
35
+ bufferedLines: number;
36
+ history: {
37
+ windowMs: number;
38
+ uptimeRatio: number | null;
39
+ restarts: number;
40
+ crashes: number;
41
+ forcedRestarts: number;
42
+ lastCrashAt: number | null;
43
+ lastExitAt: number | null;
44
+ lastRuntimeMs: number | null;
45
+ events: {
46
+ serverId: string;
47
+ ts: number;
48
+ type: "start" | "crash" | "unhealthy" | "exit" | "forced-restart" | "recovered";
49
+ detail: string;
50
+ runtimeMs?: number | undefined;
51
+ actor?: "policy" | "user" | "agent" | "boot" | undefined;
52
+ }[];
53
+ };
54
+ responseMs: number | null;
55
+ stoppedByPanel?: boolean | undefined;
56
+ config: {
57
+ id: string;
58
+ label?: string | null | undefined;
59
+ bind: "local" | "lan" | `${number}.${number}.${number}.${number}`;
60
+ enabled: boolean;
61
+ command: string;
62
+ args: string[];
63
+ env: {
64
+ [x: string]: string;
65
+ };
66
+ autostart: boolean;
67
+ persistent: boolean;
68
+ cwd: string;
69
+ dataEnvs: {
70
+ [x: string]: string;
71
+ };
72
+ bootstrap?: {
73
+ command: string;
74
+ args: string[];
75
+ env: {
76
+ [x: string]: string;
77
+ };
78
+ timeoutMs: number;
79
+ runOnce: boolean;
80
+ } | null | undefined;
81
+ dump?: {
82
+ command: string;
83
+ args: string[];
84
+ env: {
85
+ [x: string]: string;
86
+ };
87
+ timeoutMs: number;
88
+ waitMs: number;
89
+ } | null | undefined;
90
+ load?: {
91
+ command: string;
92
+ args: string[];
93
+ env: {
94
+ [x: string]: string;
95
+ };
96
+ timeoutMs: number;
97
+ waitMs: number;
98
+ } | null | undefined;
99
+ onPortConflict: "warn" | "block" | "follow" | "reclaim" | "kill";
100
+ restart: {
101
+ enabled: boolean;
102
+ maxRetries: number;
103
+ baseDelayMs: number;
104
+ factor: number;
105
+ maxDelayMs: number;
106
+ resetAfterMs: number;
107
+ };
108
+ health: {
109
+ enabled: boolean;
110
+ mode: "http" | "port";
111
+ http: {
112
+ scheme: "http" | "https";
113
+ allowInvalidCert: boolean;
114
+ path: string;
115
+ method: "GET" | "HEAD";
116
+ expectStatusBelow: number;
117
+ expectBody: string;
118
+ expectStatus?: number | null | undefined;
119
+ };
120
+ intervalMs: number;
121
+ timeoutMs: number;
122
+ unhealthyThreshold: number;
123
+ forceRestartAfterMs: number;
124
+ startTimeoutMs: number;
125
+ };
126
+ stop: {
127
+ signal: "SIGTERM" | "SIGINT" | "SIGKILL";
128
+ killGroup: boolean;
129
+ graceMs: number;
130
+ killPortHolders: boolean;
131
+ };
132
+ logBufferLines: number;
133
+ dependsOn: string[];
134
+ envFile: string;
135
+ resources: {
136
+ maxRssBytes: number;
137
+ };
138
+ backupPaths: string[];
139
+ backupIgnoreGenerated: boolean;
140
+ port: number | null;
141
+ };
142
+ }[];
143
+ };
144
+ outputFormat: "json";
145
+ status: import("hono/utils/http-status").ContentfulStatusCode;
146
+ };
147
+ };
148
+ } & {
149
+ "/": {
150
+ $post: {
151
+ input: {
152
+ query: {
153
+ workspace?: string | undefined;
154
+ };
155
+ } & {
156
+ json: {
157
+ command: string;
158
+ id: string;
159
+ label?: string | null | undefined;
160
+ enabled?: boolean | undefined;
161
+ autostart?: boolean | undefined;
162
+ persistent?: boolean | undefined;
163
+ args?: string[] | undefined;
164
+ cwd?: string | undefined;
165
+ env?: Record<string, string> | undefined;
166
+ dataEnvs?: Record<string, string> | undefined;
167
+ bootstrap?: {
168
+ command?: string | undefined;
169
+ args?: string[] | undefined;
170
+ env?: Record<string, string> | undefined;
171
+ timeoutMs?: number | undefined;
172
+ runOnce?: boolean | undefined;
173
+ } | null | undefined;
174
+ dump?: {
175
+ command?: string | undefined;
176
+ args?: string[] | undefined;
177
+ env?: Record<string, string> | undefined;
178
+ timeoutMs?: number | undefined;
179
+ waitMs?: number | undefined;
180
+ } | null | undefined;
181
+ load?: {
182
+ command?: string | undefined;
183
+ args?: string[] | undefined;
184
+ env?: Record<string, string> | undefined;
185
+ timeoutMs?: number | undefined;
186
+ waitMs?: number | undefined;
187
+ } | null | undefined;
188
+ port?: number | null | undefined;
189
+ bind?: "local" | "lan" | `${number}.${number}.${number}.${number}` | undefined;
190
+ onPortConflict?: "warn" | "block" | "follow" | "reclaim" | "kill" | undefined;
191
+ restart?: {
192
+ enabled?: boolean | undefined;
193
+ maxRetries?: number | undefined;
194
+ baseDelayMs?: number | undefined;
195
+ factor?: number | undefined;
196
+ maxDelayMs?: number | undefined;
197
+ resetAfterMs?: number | undefined;
198
+ } | undefined;
199
+ health?: {
200
+ enabled?: boolean | undefined;
201
+ mode?: "http" | "port" | undefined;
202
+ http?: {
203
+ scheme?: "http" | "https" | undefined;
204
+ allowInvalidCert?: boolean | undefined;
205
+ path?: string | undefined;
206
+ method?: "GET" | "HEAD" | undefined;
207
+ expectStatus?: number | null | undefined;
208
+ expectStatusBelow?: number | undefined;
209
+ expectBody?: string | undefined;
210
+ } | undefined;
211
+ intervalMs?: number | undefined;
212
+ timeoutMs?: number | undefined;
213
+ unhealthyThreshold?: number | undefined;
214
+ forceRestartAfterMs?: number | undefined;
215
+ startTimeoutMs?: number | undefined;
216
+ } | undefined;
217
+ stop?: {
218
+ signal?: "SIGTERM" | "SIGINT" | "SIGKILL" | undefined;
219
+ killGroup?: boolean | undefined;
220
+ graceMs?: number | undefined;
221
+ killPortHolders?: boolean | undefined;
222
+ } | undefined;
223
+ logBufferLines?: number | undefined;
224
+ dependsOn?: string[] | undefined;
225
+ envFile?: string | undefined;
226
+ resources?: {
227
+ maxRssBytes?: number | undefined;
228
+ } | undefined;
229
+ backupPaths?: string[] | undefined;
230
+ backupIgnoreGenerated?: boolean | undefined;
231
+ };
232
+ };
233
+ output: {
234
+ server: {
235
+ id: string;
236
+ label?: string | null | undefined;
237
+ bind: "local" | "lan" | `${number}.${number}.${number}.${number}`;
238
+ enabled: boolean;
239
+ command: string;
240
+ args: string[];
241
+ env: {
242
+ [x: string]: string;
243
+ };
244
+ autostart: boolean;
245
+ persistent: boolean;
246
+ cwd: string;
247
+ dataEnvs: {
248
+ [x: string]: string;
249
+ };
250
+ bootstrap?: {
251
+ command: string;
252
+ args: string[];
253
+ env: {
254
+ [x: string]: string;
255
+ };
256
+ timeoutMs: number;
257
+ runOnce: boolean;
258
+ } | null | undefined;
259
+ dump?: {
260
+ command: string;
261
+ args: string[];
262
+ env: {
263
+ [x: string]: string;
264
+ };
265
+ timeoutMs: number;
266
+ waitMs: number;
267
+ } | null | undefined;
268
+ load?: {
269
+ command: string;
270
+ args: string[];
271
+ env: {
272
+ [x: string]: string;
273
+ };
274
+ timeoutMs: number;
275
+ waitMs: number;
276
+ } | null | undefined;
277
+ onPortConflict: "warn" | "block" | "follow" | "reclaim" | "kill";
278
+ restart: {
279
+ enabled: boolean;
280
+ maxRetries: number;
281
+ baseDelayMs: number;
282
+ factor: number;
283
+ maxDelayMs: number;
284
+ resetAfterMs: number;
285
+ };
286
+ health: {
287
+ enabled: boolean;
288
+ mode: "http" | "port";
289
+ http: {
290
+ scheme: "http" | "https";
291
+ allowInvalidCert: boolean;
292
+ path: string;
293
+ method: "GET" | "HEAD";
294
+ expectStatusBelow: number;
295
+ expectBody: string;
296
+ expectStatus?: number | null | undefined;
297
+ };
298
+ intervalMs: number;
299
+ timeoutMs: number;
300
+ unhealthyThreshold: number;
301
+ forceRestartAfterMs: number;
302
+ startTimeoutMs: number;
303
+ };
304
+ stop: {
305
+ signal: "SIGTERM" | "SIGINT" | "SIGKILL";
306
+ killGroup: boolean;
307
+ graceMs: number;
308
+ killPortHolders: boolean;
309
+ };
310
+ logBufferLines: number;
311
+ dependsOn: string[];
312
+ envFile: string;
313
+ resources: {
314
+ maxRssBytes: number;
315
+ };
316
+ backupPaths: string[];
317
+ backupIgnoreGenerated: boolean;
318
+ port: number | null;
319
+ };
320
+ };
321
+ outputFormat: "json";
322
+ status: 201;
323
+ };
324
+ };
325
+ } & {
326
+ "/:id": {
327
+ $put: {
328
+ input: {
329
+ query: {
330
+ workspace?: string | undefined;
331
+ };
332
+ } & {
333
+ param: {
334
+ id: string;
335
+ };
336
+ } & {
337
+ json: {
338
+ command: string;
339
+ id: string;
340
+ label?: string | null | undefined;
341
+ enabled?: boolean | undefined;
342
+ autostart?: boolean | undefined;
343
+ persistent?: boolean | undefined;
344
+ args?: string[] | undefined;
345
+ cwd?: string | undefined;
346
+ env?: Record<string, string> | undefined;
347
+ dataEnvs?: Record<string, string> | undefined;
348
+ bootstrap?: {
349
+ command?: string | undefined;
350
+ args?: string[] | undefined;
351
+ env?: Record<string, string> | undefined;
352
+ timeoutMs?: number | undefined;
353
+ runOnce?: boolean | undefined;
354
+ } | null | undefined;
355
+ dump?: {
356
+ command?: string | undefined;
357
+ args?: string[] | undefined;
358
+ env?: Record<string, string> | undefined;
359
+ timeoutMs?: number | undefined;
360
+ waitMs?: number | undefined;
361
+ } | null | undefined;
362
+ load?: {
363
+ command?: string | undefined;
364
+ args?: string[] | undefined;
365
+ env?: Record<string, string> | undefined;
366
+ timeoutMs?: number | undefined;
367
+ waitMs?: number | undefined;
368
+ } | null | undefined;
369
+ port?: number | null | undefined;
370
+ bind?: "local" | "lan" | `${number}.${number}.${number}.${number}` | undefined;
371
+ onPortConflict?: "warn" | "block" | "follow" | "reclaim" | "kill" | undefined;
372
+ restart?: {
373
+ enabled?: boolean | undefined;
374
+ maxRetries?: number | undefined;
375
+ baseDelayMs?: number | undefined;
376
+ factor?: number | undefined;
377
+ maxDelayMs?: number | undefined;
378
+ resetAfterMs?: number | undefined;
379
+ } | undefined;
380
+ health?: {
381
+ enabled?: boolean | undefined;
382
+ mode?: "http" | "port" | undefined;
383
+ http?: {
384
+ scheme?: "http" | "https" | undefined;
385
+ allowInvalidCert?: boolean | undefined;
386
+ path?: string | undefined;
387
+ method?: "GET" | "HEAD" | undefined;
388
+ expectStatus?: number | null | undefined;
389
+ expectStatusBelow?: number | undefined;
390
+ expectBody?: string | undefined;
391
+ } | undefined;
392
+ intervalMs?: number | undefined;
393
+ timeoutMs?: number | undefined;
394
+ unhealthyThreshold?: number | undefined;
395
+ forceRestartAfterMs?: number | undefined;
396
+ startTimeoutMs?: number | undefined;
397
+ } | undefined;
398
+ stop?: {
399
+ signal?: "SIGTERM" | "SIGINT" | "SIGKILL" | undefined;
400
+ killGroup?: boolean | undefined;
401
+ graceMs?: number | undefined;
402
+ killPortHolders?: boolean | undefined;
403
+ } | undefined;
404
+ logBufferLines?: number | undefined;
405
+ dependsOn?: string[] | undefined;
406
+ envFile?: string | undefined;
407
+ resources?: {
408
+ maxRssBytes?: number | undefined;
409
+ } | undefined;
410
+ backupPaths?: string[] | undefined;
411
+ backupIgnoreGenerated?: boolean | undefined;
412
+ };
413
+ };
414
+ output: {
415
+ server: {
416
+ id: string;
417
+ label?: string | null | undefined;
418
+ bind: "local" | "lan" | `${number}.${number}.${number}.${number}`;
419
+ enabled: boolean;
420
+ command: string;
421
+ args: string[];
422
+ env: {
423
+ [x: string]: string;
424
+ };
425
+ autostart: boolean;
426
+ persistent: boolean;
427
+ cwd: string;
428
+ dataEnvs: {
429
+ [x: string]: string;
430
+ };
431
+ bootstrap?: {
432
+ command: string;
433
+ args: string[];
434
+ env: {
435
+ [x: string]: string;
436
+ };
437
+ timeoutMs: number;
438
+ runOnce: boolean;
439
+ } | null | undefined;
440
+ dump?: {
441
+ command: string;
442
+ args: string[];
443
+ env: {
444
+ [x: string]: string;
445
+ };
446
+ timeoutMs: number;
447
+ waitMs: number;
448
+ } | null | undefined;
449
+ load?: {
450
+ command: string;
451
+ args: string[];
452
+ env: {
453
+ [x: string]: string;
454
+ };
455
+ timeoutMs: number;
456
+ waitMs: number;
457
+ } | null | undefined;
458
+ onPortConflict: "warn" | "block" | "follow" | "reclaim" | "kill";
459
+ restart: {
460
+ enabled: boolean;
461
+ maxRetries: number;
462
+ baseDelayMs: number;
463
+ factor: number;
464
+ maxDelayMs: number;
465
+ resetAfterMs: number;
466
+ };
467
+ health: {
468
+ enabled: boolean;
469
+ mode: "http" | "port";
470
+ http: {
471
+ scheme: "http" | "https";
472
+ allowInvalidCert: boolean;
473
+ path: string;
474
+ method: "GET" | "HEAD";
475
+ expectStatusBelow: number;
476
+ expectBody: string;
477
+ expectStatus?: number | null | undefined;
478
+ };
479
+ intervalMs: number;
480
+ timeoutMs: number;
481
+ unhealthyThreshold: number;
482
+ forceRestartAfterMs: number;
483
+ startTimeoutMs: number;
484
+ };
485
+ stop: {
486
+ signal: "SIGTERM" | "SIGINT" | "SIGKILL";
487
+ killGroup: boolean;
488
+ graceMs: number;
489
+ killPortHolders: boolean;
490
+ };
491
+ logBufferLines: number;
492
+ dependsOn: string[];
493
+ envFile: string;
494
+ resources: {
495
+ maxRssBytes: number;
496
+ };
497
+ backupPaths: string[];
498
+ backupIgnoreGenerated: boolean;
499
+ port: number | null;
500
+ };
501
+ };
502
+ outputFormat: "json";
503
+ status: 200 | 201;
504
+ };
505
+ };
506
+ } & {
507
+ "/orphans/:id/stop": {
508
+ $post: {
509
+ input: {
510
+ query: {
511
+ workspace?: string | undefined;
512
+ };
513
+ } & {
514
+ param: {
515
+ id: string;
516
+ };
517
+ };
518
+ output: {
519
+ ok: true;
520
+ };
521
+ outputFormat: "json";
522
+ status: import("hono/utils/http-status").ContentfulStatusCode;
523
+ };
524
+ };
525
+ } & {
526
+ "/start-all": {
527
+ $post: {
528
+ input: {
529
+ query: {
530
+ workspace?: string | undefined;
531
+ };
532
+ };
533
+ output: {
534
+ servers: {
535
+ id: string;
536
+ url: string | null;
537
+ maxRetries: number;
538
+ health: "unknown" | "disabled" | "healthy" | "unhealthy";
539
+ resources: {
540
+ cpuPercent: number | null;
541
+ rssBytes: number | null;
542
+ processes: number;
543
+ sampledAt: number;
544
+ } | null;
545
+ status: "stopped" | "running" | "starting" | "stopping" | "backoff" | "crashed" | "conflict";
546
+ startedAt: number | null;
547
+ restarts: number;
548
+ pid: number | null;
549
+ lastError: string | null;
550
+ workspaceId?: string | undefined;
551
+ bindHost: string;
552
+ portState: "unknown" | "free" | "in-use";
553
+ adopted?: boolean | undefined;
554
+ exitCode: number | null;
555
+ exitSignal: string | null;
556
+ nextRetryAt: number | null;
557
+ unhealthySince: number | null;
558
+ bufferedLines: number;
559
+ history: {
560
+ windowMs: number;
561
+ uptimeRatio: number | null;
562
+ restarts: number;
563
+ crashes: number;
564
+ forcedRestarts: number;
565
+ lastCrashAt: number | null;
566
+ lastExitAt: number | null;
567
+ lastRuntimeMs: number | null;
568
+ events: {
569
+ serverId: string;
570
+ ts: number;
571
+ type: "start" | "crash" | "unhealthy" | "exit" | "forced-restart" | "recovered";
572
+ detail: string;
573
+ runtimeMs?: number | undefined;
574
+ actor?: "policy" | "user" | "agent" | "boot" | undefined;
575
+ }[];
576
+ };
577
+ responseMs: number | null;
578
+ stoppedByPanel?: boolean | undefined;
579
+ config: {
580
+ id: string;
581
+ label?: string | null | undefined;
582
+ bind: "local" | "lan" | `${number}.${number}.${number}.${number}`;
583
+ enabled: boolean;
584
+ command: string;
585
+ args: string[];
586
+ env: {
587
+ [x: string]: string;
588
+ };
589
+ autostart: boolean;
590
+ persistent: boolean;
591
+ cwd: string;
592
+ dataEnvs: {
593
+ [x: string]: string;
594
+ };
595
+ bootstrap?: {
596
+ command: string;
597
+ args: string[];
598
+ env: {
599
+ [x: string]: string;
600
+ };
601
+ timeoutMs: number;
602
+ runOnce: boolean;
603
+ } | null | undefined;
604
+ dump?: {
605
+ command: string;
606
+ args: string[];
607
+ env: {
608
+ [x: string]: string;
609
+ };
610
+ timeoutMs: number;
611
+ waitMs: number;
612
+ } | null | undefined;
613
+ load?: {
614
+ command: string;
615
+ args: string[];
616
+ env: {
617
+ [x: string]: string;
618
+ };
619
+ timeoutMs: number;
620
+ waitMs: number;
621
+ } | null | undefined;
622
+ onPortConflict: "warn" | "block" | "follow" | "reclaim" | "kill";
623
+ restart: {
624
+ enabled: boolean;
625
+ maxRetries: number;
626
+ baseDelayMs: number;
627
+ factor: number;
628
+ maxDelayMs: number;
629
+ resetAfterMs: number;
630
+ };
631
+ health: {
632
+ enabled: boolean;
633
+ mode: "http" | "port";
634
+ http: {
635
+ scheme: "http" | "https";
636
+ allowInvalidCert: boolean;
637
+ path: string;
638
+ method: "GET" | "HEAD";
639
+ expectStatusBelow: number;
640
+ expectBody: string;
641
+ expectStatus?: number | null | undefined;
642
+ };
643
+ intervalMs: number;
644
+ timeoutMs: number;
645
+ unhealthyThreshold: number;
646
+ forceRestartAfterMs: number;
647
+ startTimeoutMs: number;
648
+ };
649
+ stop: {
650
+ signal: "SIGTERM" | "SIGINT" | "SIGKILL";
651
+ killGroup: boolean;
652
+ graceMs: number;
653
+ killPortHolders: boolean;
654
+ };
655
+ logBufferLines: number;
656
+ dependsOn: string[];
657
+ envFile: string;
658
+ resources: {
659
+ maxRssBytes: number;
660
+ };
661
+ backupPaths: string[];
662
+ backupIgnoreGenerated: boolean;
663
+ port: number | null;
664
+ };
665
+ }[];
666
+ };
667
+ outputFormat: "json";
668
+ status: import("hono/utils/http-status").ContentfulStatusCode;
669
+ };
670
+ };
671
+ } & {
672
+ "/stop-all": {
673
+ $post: {
674
+ input: {
675
+ query: {
676
+ withPersistent?: string | undefined;
677
+ workspace?: string | undefined;
678
+ };
679
+ };
680
+ output: {
681
+ servers: {
682
+ id: string;
683
+ url: string | null;
684
+ maxRetries: number;
685
+ health: "unknown" | "disabled" | "healthy" | "unhealthy";
686
+ resources: {
687
+ cpuPercent: number | null;
688
+ rssBytes: number | null;
689
+ processes: number;
690
+ sampledAt: number;
691
+ } | null;
692
+ status: "stopped" | "running" | "starting" | "stopping" | "backoff" | "crashed" | "conflict";
693
+ startedAt: number | null;
694
+ restarts: number;
695
+ pid: number | null;
696
+ lastError: string | null;
697
+ workspaceId?: string | undefined;
698
+ bindHost: string;
699
+ portState: "unknown" | "free" | "in-use";
700
+ adopted?: boolean | undefined;
701
+ exitCode: number | null;
702
+ exitSignal: string | null;
703
+ nextRetryAt: number | null;
704
+ unhealthySince: number | null;
705
+ bufferedLines: number;
706
+ history: {
707
+ windowMs: number;
708
+ uptimeRatio: number | null;
709
+ restarts: number;
710
+ crashes: number;
711
+ forcedRestarts: number;
712
+ lastCrashAt: number | null;
713
+ lastExitAt: number | null;
714
+ lastRuntimeMs: number | null;
715
+ events: {
716
+ serverId: string;
717
+ ts: number;
718
+ type: "start" | "crash" | "unhealthy" | "exit" | "forced-restart" | "recovered";
719
+ detail: string;
720
+ runtimeMs?: number | undefined;
721
+ actor?: "policy" | "user" | "agent" | "boot" | undefined;
722
+ }[];
723
+ };
724
+ responseMs: number | null;
725
+ stoppedByPanel?: boolean | undefined;
726
+ config: {
727
+ id: string;
728
+ label?: string | null | undefined;
729
+ bind: "local" | "lan" | `${number}.${number}.${number}.${number}`;
730
+ enabled: boolean;
731
+ command: string;
732
+ args: string[];
733
+ env: {
734
+ [x: string]: string;
735
+ };
736
+ autostart: boolean;
737
+ persistent: boolean;
738
+ cwd: string;
739
+ dataEnvs: {
740
+ [x: string]: string;
741
+ };
742
+ bootstrap?: {
743
+ command: string;
744
+ args: string[];
745
+ env: {
746
+ [x: string]: string;
747
+ };
748
+ timeoutMs: number;
749
+ runOnce: boolean;
750
+ } | null | undefined;
751
+ dump?: {
752
+ command: string;
753
+ args: string[];
754
+ env: {
755
+ [x: string]: string;
756
+ };
757
+ timeoutMs: number;
758
+ waitMs: number;
759
+ } | null | undefined;
760
+ load?: {
761
+ command: string;
762
+ args: string[];
763
+ env: {
764
+ [x: string]: string;
765
+ };
766
+ timeoutMs: number;
767
+ waitMs: number;
768
+ } | null | undefined;
769
+ onPortConflict: "warn" | "block" | "follow" | "reclaim" | "kill";
770
+ restart: {
771
+ enabled: boolean;
772
+ maxRetries: number;
773
+ baseDelayMs: number;
774
+ factor: number;
775
+ maxDelayMs: number;
776
+ resetAfterMs: number;
777
+ };
778
+ health: {
779
+ enabled: boolean;
780
+ mode: "http" | "port";
781
+ http: {
782
+ scheme: "http" | "https";
783
+ allowInvalidCert: boolean;
784
+ path: string;
785
+ method: "GET" | "HEAD";
786
+ expectStatusBelow: number;
787
+ expectBody: string;
788
+ expectStatus?: number | null | undefined;
789
+ };
790
+ intervalMs: number;
791
+ timeoutMs: number;
792
+ unhealthyThreshold: number;
793
+ forceRestartAfterMs: number;
794
+ startTimeoutMs: number;
795
+ };
796
+ stop: {
797
+ signal: "SIGTERM" | "SIGINT" | "SIGKILL";
798
+ killGroup: boolean;
799
+ graceMs: number;
800
+ killPortHolders: boolean;
801
+ };
802
+ logBufferLines: number;
803
+ dependsOn: string[];
804
+ envFile: string;
805
+ resources: {
806
+ maxRssBytes: number;
807
+ };
808
+ backupPaths: string[];
809
+ backupIgnoreGenerated: boolean;
810
+ port: number | null;
811
+ };
812
+ }[];
813
+ };
814
+ outputFormat: "json";
815
+ status: import("hono/utils/http-status").ContentfulStatusCode;
816
+ };
817
+ };
818
+ } & {
819
+ "/:id": {
820
+ $get: {
821
+ input: {
822
+ query: {
823
+ workspace?: string | undefined;
824
+ };
825
+ } & {
826
+ param: {
827
+ id: string;
828
+ };
829
+ };
830
+ output: {
831
+ server: {
832
+ id: string;
833
+ url: string | null;
834
+ maxRetries: number;
835
+ health: "unknown" | "disabled" | "healthy" | "unhealthy";
836
+ resources: {
837
+ cpuPercent: number | null;
838
+ rssBytes: number | null;
839
+ processes: number;
840
+ sampledAt: number;
841
+ } | null;
842
+ status: "stopped" | "running" | "starting" | "stopping" | "backoff" | "crashed" | "conflict";
843
+ startedAt: number | null;
844
+ restarts: number;
845
+ pid: number | null;
846
+ lastError: string | null;
847
+ workspaceId?: string | undefined;
848
+ bindHost: string;
849
+ portState: "unknown" | "free" | "in-use";
850
+ adopted?: boolean | undefined;
851
+ exitCode: number | null;
852
+ exitSignal: string | null;
853
+ nextRetryAt: number | null;
854
+ unhealthySince: number | null;
855
+ bufferedLines: number;
856
+ history: {
857
+ windowMs: number;
858
+ uptimeRatio: number | null;
859
+ restarts: number;
860
+ crashes: number;
861
+ forcedRestarts: number;
862
+ lastCrashAt: number | null;
863
+ lastExitAt: number | null;
864
+ lastRuntimeMs: number | null;
865
+ events: {
866
+ serverId: string;
867
+ ts: number;
868
+ type: "start" | "crash" | "unhealthy" | "exit" | "forced-restart" | "recovered";
869
+ detail: string;
870
+ runtimeMs?: number | undefined;
871
+ actor?: "policy" | "user" | "agent" | "boot" | undefined;
872
+ }[];
873
+ };
874
+ responseMs: number | null;
875
+ stoppedByPanel?: boolean | undefined;
876
+ config: {
877
+ id: string;
878
+ label?: string | null | undefined;
879
+ bind: "local" | "lan" | `${number}.${number}.${number}.${number}`;
880
+ enabled: boolean;
881
+ command: string;
882
+ args: string[];
883
+ env: {
884
+ [x: string]: string;
885
+ };
886
+ autostart: boolean;
887
+ persistent: boolean;
888
+ cwd: string;
889
+ dataEnvs: {
890
+ [x: string]: string;
891
+ };
892
+ bootstrap?: {
893
+ command: string;
894
+ args: string[];
895
+ env: {
896
+ [x: string]: string;
897
+ };
898
+ timeoutMs: number;
899
+ runOnce: boolean;
900
+ } | null | undefined;
901
+ dump?: {
902
+ command: string;
903
+ args: string[];
904
+ env: {
905
+ [x: string]: string;
906
+ };
907
+ timeoutMs: number;
908
+ waitMs: number;
909
+ } | null | undefined;
910
+ load?: {
911
+ command: string;
912
+ args: string[];
913
+ env: {
914
+ [x: string]: string;
915
+ };
916
+ timeoutMs: number;
917
+ waitMs: number;
918
+ } | null | undefined;
919
+ onPortConflict: "warn" | "block" | "follow" | "reclaim" | "kill";
920
+ restart: {
921
+ enabled: boolean;
922
+ maxRetries: number;
923
+ baseDelayMs: number;
924
+ factor: number;
925
+ maxDelayMs: number;
926
+ resetAfterMs: number;
927
+ };
928
+ health: {
929
+ enabled: boolean;
930
+ mode: "http" | "port";
931
+ http: {
932
+ scheme: "http" | "https";
933
+ allowInvalidCert: boolean;
934
+ path: string;
935
+ method: "GET" | "HEAD";
936
+ expectStatusBelow: number;
937
+ expectBody: string;
938
+ expectStatus?: number | null | undefined;
939
+ };
940
+ intervalMs: number;
941
+ timeoutMs: number;
942
+ unhealthyThreshold: number;
943
+ forceRestartAfterMs: number;
944
+ startTimeoutMs: number;
945
+ };
946
+ stop: {
947
+ signal: "SIGTERM" | "SIGINT" | "SIGKILL";
948
+ killGroup: boolean;
949
+ graceMs: number;
950
+ killPortHolders: boolean;
951
+ };
952
+ logBufferLines: number;
953
+ dependsOn: string[];
954
+ envFile: string;
955
+ resources: {
956
+ maxRssBytes: number;
957
+ };
958
+ backupPaths: string[];
959
+ backupIgnoreGenerated: boolean;
960
+ port: number | null;
961
+ };
962
+ };
963
+ };
964
+ outputFormat: "json";
965
+ status: import("hono/utils/http-status").ContentfulStatusCode;
966
+ };
967
+ };
968
+ } & {
969
+ "/:id/logs": {
970
+ $get: {
971
+ input: {
972
+ query: {
973
+ limit?: string | undefined;
974
+ workspace?: string | undefined;
975
+ };
976
+ } & {
977
+ param: {
978
+ id: string;
979
+ };
980
+ };
981
+ output: {
982
+ lines: {
983
+ ts: number;
984
+ stream: "stdout" | "stderr" | "system";
985
+ text: string;
986
+ }[];
987
+ };
988
+ outputFormat: "json";
989
+ status: import("hono/utils/http-status").ContentfulStatusCode;
990
+ };
991
+ };
992
+ } & {
993
+ "/:id/stream": {
994
+ $get: {
995
+ input: {
996
+ query: {
997
+ workspace?: string | undefined;
998
+ };
999
+ } & {
1000
+ param: {
1001
+ id: string;
1002
+ };
1003
+ };
1004
+ output: {};
1005
+ outputFormat: string;
1006
+ status: import("hono/utils/http-status").StatusCode;
1007
+ };
1008
+ };
1009
+ } & {
1010
+ "/:id/start": {
1011
+ $post: {
1012
+ input: {
1013
+ query: {
1014
+ workspace?: string | undefined;
1015
+ };
1016
+ } & {
1017
+ param: {
1018
+ id: string;
1019
+ };
1020
+ };
1021
+ output: {
1022
+ ok: boolean;
1023
+ error?: string | undefined;
1024
+ code?: string | undefined;
1025
+ message?: string | undefined;
1026
+ };
1027
+ outputFormat: "json";
1028
+ status: 200 | 404 | 409;
1029
+ };
1030
+ };
1031
+ } & {
1032
+ "/:id/stop": {
1033
+ $post: {
1034
+ input: {
1035
+ query: {
1036
+ workspace?: string | undefined;
1037
+ };
1038
+ } & {
1039
+ param: {
1040
+ id: string;
1041
+ };
1042
+ };
1043
+ output: {
1044
+ ok: boolean;
1045
+ error?: string | undefined;
1046
+ code?: string | undefined;
1047
+ message?: string | undefined;
1048
+ };
1049
+ outputFormat: "json";
1050
+ status: 200 | 404 | 409;
1051
+ };
1052
+ };
1053
+ } & {
1054
+ "/:id/restart": {
1055
+ $post: {
1056
+ input: {
1057
+ query: {
1058
+ workspace?: string | undefined;
1059
+ };
1060
+ } & {
1061
+ param: {
1062
+ id: string;
1063
+ };
1064
+ };
1065
+ output: {
1066
+ ok: boolean;
1067
+ error?: string | undefined;
1068
+ code?: string | undefined;
1069
+ message?: string | undefined;
1070
+ };
1071
+ outputFormat: "json";
1072
+ status: 200 | 404 | 409;
1073
+ };
1074
+ };
1075
+ } & {
1076
+ "/:id/clear-logs": {
1077
+ $post: {
1078
+ input: {
1079
+ query: {
1080
+ workspace?: string | undefined;
1081
+ };
1082
+ } & {
1083
+ param: {
1084
+ id: string;
1085
+ };
1086
+ };
1087
+ output: {
1088
+ ok: true;
1089
+ };
1090
+ outputFormat: "json";
1091
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1092
+ };
1093
+ };
1094
+ } & {
1095
+ "/:id/free-port": {
1096
+ $post: {
1097
+ input: {
1098
+ query: {
1099
+ workspace?: string | undefined;
1100
+ };
1101
+ } & {
1102
+ param: {
1103
+ id: string;
1104
+ };
1105
+ };
1106
+ output: {
1107
+ ok: boolean;
1108
+ port: number | null;
1109
+ terminated: number[];
1110
+ forced: number[];
1111
+ skipped: number[];
1112
+ free: boolean;
1113
+ error?: string | undefined;
1114
+ };
1115
+ outputFormat: "json";
1116
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1117
+ };
1118
+ };
1119
+ } & {
1120
+ "/:id": {
1121
+ $patch: {
1122
+ input: {
1123
+ query: {
1124
+ workspace?: string | undefined;
1125
+ };
1126
+ } & {
1127
+ param: {
1128
+ id: string;
1129
+ };
1130
+ } & {
1131
+ json: {
1132
+ label?: string | null | undefined;
1133
+ enabled?: boolean | undefined;
1134
+ autostart?: boolean | undefined;
1135
+ persistent?: boolean | undefined;
1136
+ command?: string | undefined;
1137
+ args?: string[] | undefined;
1138
+ cwd?: string | undefined;
1139
+ env?: Record<string, string> | undefined;
1140
+ dataEnvs?: Record<string, string> | undefined;
1141
+ bootstrap?: {
1142
+ command?: string | undefined;
1143
+ args?: string[] | undefined;
1144
+ env?: Record<string, string> | undefined;
1145
+ timeoutMs?: number | undefined;
1146
+ runOnce?: boolean | undefined;
1147
+ } | null | undefined;
1148
+ dump?: {
1149
+ command?: string | undefined;
1150
+ args?: string[] | undefined;
1151
+ env?: Record<string, string> | undefined;
1152
+ timeoutMs?: number | undefined;
1153
+ waitMs?: number | undefined;
1154
+ } | null | undefined;
1155
+ load?: {
1156
+ command?: string | undefined;
1157
+ args?: string[] | undefined;
1158
+ env?: Record<string, string> | undefined;
1159
+ timeoutMs?: number | undefined;
1160
+ waitMs?: number | undefined;
1161
+ } | null | undefined;
1162
+ port?: number | null | undefined;
1163
+ bind?: "local" | "lan" | `${number}.${number}.${number}.${number}` | undefined;
1164
+ onPortConflict?: "warn" | "block" | "follow" | "reclaim" | "kill" | undefined;
1165
+ restart?: {
1166
+ enabled?: boolean | undefined;
1167
+ maxRetries?: number | undefined;
1168
+ baseDelayMs?: number | undefined;
1169
+ factor?: number | undefined;
1170
+ maxDelayMs?: number | undefined;
1171
+ resetAfterMs?: number | undefined;
1172
+ } | undefined;
1173
+ health?: {
1174
+ enabled?: boolean | undefined;
1175
+ mode?: "http" | "port" | undefined;
1176
+ http?: {
1177
+ scheme?: "http" | "https" | undefined;
1178
+ allowInvalidCert?: boolean | undefined;
1179
+ path?: string | undefined;
1180
+ method?: "GET" | "HEAD" | undefined;
1181
+ expectStatus?: number | null | undefined;
1182
+ expectStatusBelow?: number | undefined;
1183
+ expectBody?: string | undefined;
1184
+ } | undefined;
1185
+ intervalMs?: number | undefined;
1186
+ timeoutMs?: number | undefined;
1187
+ unhealthyThreshold?: number | undefined;
1188
+ forceRestartAfterMs?: number | undefined;
1189
+ startTimeoutMs?: number | undefined;
1190
+ } | undefined;
1191
+ stop?: {
1192
+ signal?: "SIGTERM" | "SIGINT" | "SIGKILL" | undefined;
1193
+ killGroup?: boolean | undefined;
1194
+ graceMs?: number | undefined;
1195
+ killPortHolders?: boolean | undefined;
1196
+ } | undefined;
1197
+ logBufferLines?: number | undefined;
1198
+ dependsOn?: string[] | undefined;
1199
+ envFile?: string | undefined;
1200
+ resources?: {
1201
+ maxRssBytes?: number | undefined;
1202
+ } | undefined;
1203
+ backupPaths?: string[] | undefined;
1204
+ backupIgnoreGenerated?: boolean | undefined;
1205
+ };
1206
+ };
1207
+ output: {
1208
+ server: {
1209
+ id: string;
1210
+ label?: string | null | undefined;
1211
+ bind: "local" | "lan" | `${number}.${number}.${number}.${number}`;
1212
+ enabled: boolean;
1213
+ command: string;
1214
+ args: string[];
1215
+ env: {
1216
+ [x: string]: string;
1217
+ };
1218
+ autostart: boolean;
1219
+ persistent: boolean;
1220
+ cwd: string;
1221
+ dataEnvs: {
1222
+ [x: string]: string;
1223
+ };
1224
+ bootstrap?: {
1225
+ command: string;
1226
+ args: string[];
1227
+ env: {
1228
+ [x: string]: string;
1229
+ };
1230
+ timeoutMs: number;
1231
+ runOnce: boolean;
1232
+ } | null | undefined;
1233
+ dump?: {
1234
+ command: string;
1235
+ args: string[];
1236
+ env: {
1237
+ [x: string]: string;
1238
+ };
1239
+ timeoutMs: number;
1240
+ waitMs: number;
1241
+ } | null | undefined;
1242
+ load?: {
1243
+ command: string;
1244
+ args: string[];
1245
+ env: {
1246
+ [x: string]: string;
1247
+ };
1248
+ timeoutMs: number;
1249
+ waitMs: number;
1250
+ } | null | undefined;
1251
+ onPortConflict: "warn" | "block" | "follow" | "reclaim" | "kill";
1252
+ restart: {
1253
+ enabled: boolean;
1254
+ maxRetries: number;
1255
+ baseDelayMs: number;
1256
+ factor: number;
1257
+ maxDelayMs: number;
1258
+ resetAfterMs: number;
1259
+ };
1260
+ health: {
1261
+ enabled: boolean;
1262
+ mode: "http" | "port";
1263
+ http: {
1264
+ scheme: "http" | "https";
1265
+ allowInvalidCert: boolean;
1266
+ path: string;
1267
+ method: "GET" | "HEAD";
1268
+ expectStatusBelow: number;
1269
+ expectBody: string;
1270
+ expectStatus?: number | null | undefined;
1271
+ };
1272
+ intervalMs: number;
1273
+ timeoutMs: number;
1274
+ unhealthyThreshold: number;
1275
+ forceRestartAfterMs: number;
1276
+ startTimeoutMs: number;
1277
+ };
1278
+ stop: {
1279
+ signal: "SIGTERM" | "SIGINT" | "SIGKILL";
1280
+ killGroup: boolean;
1281
+ graceMs: number;
1282
+ killPortHolders: boolean;
1283
+ };
1284
+ logBufferLines: number;
1285
+ dependsOn: string[];
1286
+ envFile: string;
1287
+ resources: {
1288
+ maxRssBytes: number;
1289
+ };
1290
+ backupPaths: string[];
1291
+ backupIgnoreGenerated: boolean;
1292
+ port: number | null;
1293
+ };
1294
+ };
1295
+ outputFormat: "json";
1296
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1297
+ };
1298
+ };
1299
+ } & {
1300
+ "/:id": {
1301
+ $delete: {
1302
+ input: {
1303
+ query: {
1304
+ workspace?: string | undefined;
1305
+ };
1306
+ } & {
1307
+ param: {
1308
+ id: string;
1309
+ };
1310
+ };
1311
+ output: {
1312
+ ok: true;
1313
+ };
1314
+ outputFormat: "json";
1315
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1316
+ };
1317
+ };
1318
+ }, "/", "/:id">;