home-hosted 0.13.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -322
- package/bin/home-hosted.mjs +41 -0
- package/dist/chunks/account-DiLrSyww.js +359 -0
- package/dist/chunks/account-DiLrSyww.js.map +1 -0
- package/dist/chunks/add-DEIYVkNK.js +183 -0
- package/dist/chunks/add-DEIYVkNK.js.map +1 -0
- package/dist/chunks/{archive-DP-XQR8X.js → archive-DFi3qK1c.js} +25 -73
- package/dist/chunks/archive-DFi3qK1c.js.map +1 -0
- package/dist/chunks/{atomic-C1PfJpE7.js → atomic-SZUwDtGD.js} +3 -6
- package/dist/chunks/atomic-SZUwDtGD.js.map +1 -0
- package/dist/chunks/{backup-CZcVca2a.js → backup-DnyxIzw0.js} +110 -190
- package/dist/chunks/backup-DnyxIzw0.js.map +1 -0
- package/dist/chunks/backups-BrrN6cwW.js +2203 -0
- package/dist/chunks/backups-BrrN6cwW.js.map +1 -0
- package/dist/chunks/bind-DIxrnUst.js +43 -0
- package/dist/chunks/bind-DIxrnUst.js.map +1 -0
- package/dist/chunks/config-text-DxMOQQnk.js +34 -0
- package/dist/chunks/config-text-DxMOQQnk.js.map +1 -0
- package/dist/chunks/{contracts-CMBD1TF9.js → contracts-CxZ7u1L3.js} +1239 -1454
- package/dist/chunks/contracts-CxZ7u1L3.js.map +1 -0
- package/dist/chunks/daemon-BAAYUYQC.js +211 -0
- package/dist/chunks/daemon-BAAYUYQC.js.map +1 -0
- package/dist/chunks/daemon-log-Ccu-69vB.js +179 -0
- package/dist/chunks/daemon-log-Ccu-69vB.js.map +1 -0
- package/dist/chunks/deploy-CggSOEkq.js +144 -0
- package/dist/chunks/deploy-CggSOEkq.js.map +1 -0
- package/dist/chunks/{docker-Cy9Lyvda.js → docker--Un0uLfF.js} +32 -68
- package/dist/chunks/docker--Un0uLfF.js.map +1 -0
- package/dist/chunks/{down-pKbGCW9d.js → down-CpIN7LEQ.js} +34 -94
- package/dist/chunks/down-CpIN7LEQ.js.map +1 -0
- package/dist/chunks/exposure-CDJNvOCK.js +229 -0
- package/dist/chunks/exposure-CDJNvOCK.js.map +1 -0
- package/dist/chunks/import-Bd4VZH0f.js +205 -0
- package/dist/chunks/import-Bd4VZH0f.js.map +1 -0
- package/dist/chunks/import-plan--fDS_l5r.js +147 -0
- package/dist/chunks/import-plan--fDS_l5r.js.map +1 -0
- package/dist/chunks/import-write-BTfbeV26.js +42 -0
- package/dist/chunks/import-write-BTfbeV26.js.map +1 -0
- package/dist/chunks/{init-BZ7hK9Vf.js → init-Bv3oH65x.js} +14 -50
- package/dist/chunks/init-Bv3oH65x.js.map +1 -0
- package/dist/chunks/job-CYOdN6Ub.js +341 -0
- package/dist/chunks/job-CYOdN6Ub.js.map +1 -0
- package/dist/chunks/jobs-BX4ahcfh.js +489 -0
- package/dist/chunks/jobs-BX4ahcfh.js.map +1 -0
- package/dist/chunks/last-stop-DD3lHwo_.js +42 -0
- package/dist/chunks/last-stop-DD3lHwo_.js.map +1 -0
- package/dist/chunks/layout-D0ysDNav.js +18 -0
- package/dist/chunks/layout-D0ysDNav.js.map +1 -0
- package/dist/chunks/lazy-kfcBNeqj.js +48 -0
- package/dist/chunks/lazy-kfcBNeqj.js.map +1 -0
- package/dist/chunks/log-buffer-B7jmn7ts.js +110 -0
- package/dist/chunks/log-buffer-B7jmn7ts.js.map +1 -0
- package/dist/chunks/log-files-CZL2UhuE.js +488 -0
- package/dist/chunks/log-files-CZL2UhuE.js.map +1 -0
- package/dist/chunks/{logger-B5U4GD3j.js → logger-BnrKTBHQ.js} +2 -6
- package/dist/chunks/logger-BnrKTBHQ.js.map +1 -0
- package/dist/chunks/{logs---TI_bxM.js → logs-DxKI6OW2.js} +23 -73
- package/dist/chunks/logs-DxKI6OW2.js.map +1 -0
- package/dist/chunks/ls-BseUHy_m.js +128 -0
- package/dist/chunks/ls-BseUHy_m.js.map +1 -0
- package/dist/chunks/migrate-D4w_dXDm.js +268 -0
- package/dist/chunks/migrate-D4w_dXDm.js.map +1 -0
- package/dist/chunks/{nanny-B-Eu0sFW.js → nanny-BWh7nuvv.js} +21 -14
- package/dist/chunks/nanny-BWh7nuvv.js.map +1 -0
- package/dist/chunks/{nanny-ChMtq1Zl.js → nanny-BjF2-1pv.js} +3 -3
- package/dist/chunks/{nanny-ChMtq1Zl.js.map → nanny-BjF2-1pv.js.map} +1 -1
- package/dist/chunks/nanny-DGTXVq5d.js +806 -0
- package/dist/chunks/nanny-DGTXVq5d.js.map +1 -0
- package/dist/chunks/{nanny-sweep-DErnlPY1.js → nanny-sweep-hjmZ_p7S.js} +14 -24
- package/dist/chunks/nanny-sweep-hjmZ_p7S.js.map +1 -0
- package/dist/chunks/{nearest-6KgQEDUe.js → nearest-DOx4jySJ.js} +2 -10
- package/dist/chunks/nearest-DOx4jySJ.js.map +1 -0
- package/dist/chunks/{parse-DhmG26fI.js → parse-DVMPLUDe.js} +47 -72
- package/dist/chunks/parse-DVMPLUDe.js.map +1 -0
- package/dist/chunks/password-policy-Clq6PGE-.js +9 -0
- package/dist/chunks/password-policy-Clq6PGE-.js.map +1 -0
- package/dist/chunks/{paths-CGlGDrOU.js → paths-C34-TJLh.js} +32 -56
- package/dist/chunks/paths-C34-TJLh.js.map +1 -0
- package/dist/chunks/{port-B8WBTRMk.js → port-CnsrxKNR.js} +27 -71
- package/dist/chunks/port-CnsrxKNR.js.map +1 -0
- package/dist/chunks/process-CboOFPU_.js +192 -0
- package/dist/chunks/process-CboOFPU_.js.map +1 -0
- package/dist/chunks/{restart-Des4DrAN.js → restart-C0J8dZ2L.js} +11 -29
- package/dist/chunks/restart-C0J8dZ2L.js.map +1 -0
- package/dist/chunks/run-deploy-DoNDvwT4.js +91 -0
- package/dist/chunks/run-deploy-DoNDvwT4.js.map +1 -0
- package/dist/chunks/{schema-B240VXcV.js → schema-CZ6f-PHD.js} +7 -20
- package/dist/chunks/schema-CZ6f-PHD.js.map +1 -0
- package/dist/chunks/secret-MY397r90.js +219 -0
- package/dist/chunks/secret-MY397r90.js.map +1 -0
- package/dist/chunks/secrets-CG5N4lwY.js +1061 -0
- package/dist/chunks/secrets-CG5N4lwY.js.map +1 -0
- package/dist/chunks/server-Dm_dXfTW.js +255 -0
- package/dist/chunks/server-Dm_dXfTW.js.map +1 -0
- package/dist/chunks/server-attention-UQwYXqKe.js +10 -0
- package/dist/chunks/server-attention-UQwYXqKe.js.map +1 -0
- package/dist/chunks/server-create-D7nvhgBd.js +96 -0
- package/dist/chunks/server-create-D7nvhgBd.js.map +1 -0
- package/dist/chunks/server-ids-BEQD2rFz.js +23 -0
- package/dist/chunks/server-ids-BEQD2rFz.js.map +1 -0
- package/dist/chunks/server-vars-DMYmHutL.js +27 -0
- package/dist/chunks/server-vars-DMYmHutL.js.map +1 -0
- package/dist/chunks/service-C8l-ewNA.js +585 -0
- package/dist/chunks/service-C8l-ewNA.js.map +1 -0
- package/dist/chunks/{settings-xu-XTfWg.js → settings-CtYDs5PX.js} +62 -78
- package/dist/chunks/settings-CtYDs5PX.js.map +1 -0
- package/dist/chunks/{setup-temp-CAN4_bA-.js → setup-temp-TAtDmMMU.js} +43 -37
- package/dist/chunks/setup-temp-TAtDmMMU.js.map +1 -0
- package/dist/chunks/shape-CDGeYl_J.js +9 -0
- package/dist/chunks/shape-CDGeYl_J.js.map +1 -0
- package/dist/chunks/{src-BtWMFmzZ.js → src-BnzkVy_M.js} +12548 -10576
- package/dist/chunks/src-BnzkVy_M.js.map +1 -0
- package/dist/chunks/{status-DT1EsA-B.js → status-efbbfYZQ.js} +53 -26
- package/dist/chunks/status-efbbfYZQ.js.map +1 -0
- package/dist/chunks/store-Bs_Lljjm.js +2082 -0
- package/dist/chunks/store-Bs_Lljjm.js.map +1 -0
- package/dist/chunks/template-xan58bJh.js +28 -0
- package/dist/chunks/template-xan58bJh.js.map +1 -0
- package/dist/chunks/token-DDeWfZA4.js +142 -0
- package/dist/chunks/token-DDeWfZA4.js.map +1 -0
- package/dist/chunks/{ui-D562aqw5.js → ui-BcIAtyxE.js} +68 -79
- package/dist/chunks/ui-BcIAtyxE.js.map +1 -0
- package/dist/chunks/{ui-dir-CsU3uLNV.js → ui-dir-ClCzVRc3.js} +3 -7
- package/dist/chunks/ui-dir-ClCzVRc3.js.map +1 -0
- package/dist/chunks/ui-format-CDvvqOoi.js +53 -0
- package/dist/chunks/ui-format-CDvvqOoi.js.map +1 -0
- package/dist/chunks/{ui-release-DKzVvlLd.js → ui-release-XbJ85pYI.js} +36 -38
- package/dist/chunks/ui-release-XbJ85pYI.js.map +1 -0
- package/dist/chunks/{ui-revert-EkBBwRTt.js → ui-revert-Dgawq7ze.js} +4 -4
- package/dist/chunks/ui-revert-Dgawq7ze.js.map +1 -0
- package/dist/chunks/{ui-switch-BnZTdMDd.js → ui-switch-CfQMbZ0g.js} +31 -38
- package/dist/chunks/ui-switch-CfQMbZ0g.js.map +1 -0
- package/dist/chunks/{ui-update-_xryLYxw.js → ui-update-B3PPivUm.js} +30 -48
- package/dist/chunks/ui-update-B3PPivUm.js.map +1 -0
- package/dist/chunks/ui-update-CAiH2tFb.js +109 -0
- package/dist/chunks/ui-update-CAiH2tFb.js.map +1 -0
- package/dist/chunks/{up-Pdz-l6IH.js → up-BQSnYxYd.js} +47 -53
- package/dist/chunks/up-BQSnYxYd.js.map +1 -0
- package/dist/chunks/{usage-DFrCVXpT.js → usage-KG8TeOio.js} +7 -20
- package/dist/chunks/usage-KG8TeOio.js.map +1 -0
- package/dist/chunks/{workspaces-DYcfvKV_.js → workspaces-D9akpzU8.js} +80 -68
- package/dist/chunks/workspaces-D9akpzU8.js.map +1 -0
- package/dist/chunks/{wsl-temperature-BiCI4iK6.js → wsl-temperature-D-_d4Yk1.js} +47 -42
- package/dist/chunks/wsl-temperature-D-_d4Yk1.js.map +1 -0
- package/dist/cli.js +306 -238
- package/dist/cli.js.map +1 -1
- package/dist/client.js +76 -29
- package/dist/client.js.map +1 -1
- package/dist/types/api/acme.d.ts +3 -7
- package/dist/types/api/auth/$.routes.d.ts +107 -16
- package/dist/types/api/backups.d.ts +5 -5
- package/dist/types/api/control.d.ts +747 -38
- package/dist/types/api/ddns.d.ts +13 -18
- package/dist/types/api/events.d.ts +9 -3
- package/dist/types/api/health.d.ts +2 -4
- package/dist/types/api/jobs.d.ts +438 -0
- package/dist/types/api/logs.d.ts +20 -0
- package/dist/types/api/metrics.d.ts +2 -5
- package/dist/types/api/notifications.d.ts +3 -6
- package/dist/types/api/proxy.d.ts +63 -23
- package/dist/types/api/server-ops.d.ts +17 -0
- package/dist/types/api/servers/$.routes.d.ts +418 -186
- package/dist/types/api/session-required.d.ts +16 -0
- package/dist/types/api/settings.d.ts +7 -7
- package/dist/types/api/state.d.ts +100 -10
- package/dist/types/api/static.d.ts +2 -2
- package/dist/types/api/tls.d.ts +2 -5
- package/dist/types/api/workspaces/$.routes.d.ts +186 -12
- package/dist/types/api/wsl-temperature.d.ts +4 -10
- package/dist/types/app.d.ts +4511 -2778
- package/dist/types/cli/account.d.ts +23 -0
- package/dist/types/cli/add.d.ts +96 -0
- package/dist/types/cli/args.d.ts +24 -35
- package/dist/types/cli/backup-offline.d.ts +2 -8
- package/dist/types/cli/backup.d.ts +12 -21
- package/dist/types/cli/down.d.ts +15 -41
- package/dist/types/cli/import-plan.d.ts +55 -0
- package/dist/types/cli/import-write.d.ts +5 -0
- package/dist/types/cli/import.d.ts +86 -0
- package/dist/types/cli/io.d.ts +26 -35
- package/dist/types/cli/job.d.ts +99 -0
- package/dist/types/cli/logs.d.ts +1 -10
- package/dist/types/cli/ls.d.ts +57 -0
- package/dist/types/cli/migrate.d.ts +31 -8
- package/dist/types/cli/nearest.d.ts +1 -9
- package/dist/types/cli/run-deploy.d.ts +36 -0
- package/dist/types/cli/secret.d.ts +90 -0
- package/dist/types/cli/server.d.ts +6 -15
- package/dist/types/cli/service.d.ts +135 -0
- package/dist/types/cli/setup-temp.d.ts +17 -13
- package/dist/types/cli/status.d.ts +7 -1
- package/dist/types/cli/token.d.ts +6 -0
- package/dist/types/cli/ui-switch.d.ts +3 -14
- package/dist/types/cli/ui-update.d.ts +3 -16
- package/dist/types/cli/up.d.ts +9 -22
- package/dist/types/cli/usage.d.ts +2 -6
- package/dist/types/cli.d.ts +1 -10
- package/dist/types/client.d.ts +4099 -1142
- package/dist/types/config/accounts.d.ts +16 -0
- package/dist/types/config/jobs.d.ts +68 -0
- package/dist/types/config/layout.d.ts +2 -8
- package/dist/types/config/migrations.d.ts +9 -41
- package/dist/types/config/parse.d.ts +8 -13
- package/dist/types/config/patch.d.ts +1 -6
- package/dist/types/config/schema.d.ts +16 -18
- package/dist/types/config/secret-parts.d.ts +6 -27
- package/dist/types/config/secrets.d.ts +167 -88
- package/dist/types/config/seed.d.ts +1 -6
- package/dist/types/config/server-ids.d.ts +2 -11
- package/dist/types/config/settings.d.ts +13 -49
- package/dist/types/config/store.d.ts +17 -54
- package/dist/types/config/workspaces.d.ts +24 -56
- package/dist/types/helpers/action-result.d.ts +18 -32
- package/dist/types/helpers/atomic.d.ts +1 -4
- package/dist/types/helpers/backoff.d.ts +0 -1
- package/dist/types/helpers/bind.d.ts +3 -11
- package/dist/types/helpers/config-text.d.ts +4 -19
- package/dist/types/helpers/cookies.d.ts +2 -7
- package/dist/types/helpers/copy-tree.d.ts +4 -12
- package/dist/types/helpers/daemon-log.d.ts +8 -33
- package/dist/types/helpers/daemon.d.ts +20 -70
- package/dist/types/helpers/deferred.d.ts +2 -4
- package/dist/types/helpers/env-file.d.ts +2 -7
- package/dist/types/helpers/error.d.ts +3 -14
- package/dist/types/helpers/event-stream.d.ts +18 -10
- package/dist/types/helpers/factory.d.ts +2 -3
- package/dist/types/helpers/last-stop.d.ts +5 -12
- package/dist/types/helpers/logger.d.ts +1 -5
- package/dist/types/helpers/open.d.ts +0 -1
- package/dist/types/helpers/openapi.d.ts +19 -5
- package/dist/types/helpers/paths.d.ts +18 -53
- package/dist/types/helpers/restore-lock.d.ts +2 -17
- package/dist/types/helpers/runtime.d.ts +3 -13
- package/dist/types/helpers/secret-compare.d.ts +2 -10
- package/dist/types/helpers/server-create.d.ts +15 -0
- package/dist/types/helpers/shell.d.ts +2 -16
- package/dist/types/helpers/sse.d.ts +8 -6
- package/dist/types/helpers/ui-dir.d.ts +1 -5
- package/dist/types/helpers/utf8-chunks.d.ts +2 -8
- package/dist/types/helpers/validate.d.ts +2 -4
- package/dist/types/helpers/validator.d.ts +8 -4
- package/dist/types/helpers/version.d.ts +1 -6
- package/dist/types/helpers/workspace.d.ts +24 -16
- package/dist/types/index.d.ts +2 -3
- package/dist/types/middleware/auth.d.ts +8 -27
- package/dist/types/middleware/body-limit.d.ts +10 -0
- package/dist/types/middleware/host.d.ts +4 -23
- package/dist/types/middleware/loopback.d.ts +1 -8
- package/dist/types/middleware/token-scope.d.ts +34 -0
- package/dist/types/node-compat.d.ts +43 -0
- package/dist/types/openapi-reference.d.ts +4 -19
- package/dist/types/openapi.d.ts +5 -8
- package/dist/types/providers/archive.d.ts +8 -25
- package/dist/types/providers/backup-hook.d.ts +4 -19
- package/dist/types/providers/ddns/dyndns2.d.ts +0 -3
- package/dist/types/providers/ddns/index.d.ts +2 -3
- package/dist/types/providers/ddns/ip.d.ts +2 -12
- package/dist/types/providers/ddns/namecheap-api.d.ts +3 -2
- package/dist/types/providers/ddns/types.d.ts +6 -32
- package/dist/types/providers/ddns/zone.d.ts +1 -4
- package/dist/types/providers/docker.d.ts +18 -45
- package/dist/types/providers/entry-state.d.ts +4 -9
- package/dist/types/providers/health-check.d.ts +1 -5
- package/dist/types/providers/host.d.ts +33 -108
- package/dist/types/providers/identity.d.ts +9 -34
- package/dist/types/providers/log-tail.d.ts +14 -24
- package/dist/types/providers/nanny-sweep.d.ts +8 -25
- package/dist/types/providers/nanny.d.ts +16 -58
- package/dist/types/providers/port.d.ts +28 -83
- package/dist/types/providers/proc.d.ts +22 -80
- package/dist/types/providers/process.d.ts +12 -36
- package/dist/types/providers/proxy/admin.d.ts +11 -0
- package/dist/types/providers/proxy/types.d.ts +4 -16
- package/dist/types/providers/telegram.d.ts +1 -17
- package/dist/types/providers/ui-release.d.ts +15 -25
- package/dist/types/providers/webhook.d.ts +8 -29
- package/dist/types/providers/wsl-temperature.d.ts +13 -22
- package/dist/types/services/acme-challenge.d.ts +2 -16
- package/dist/types/services/auth.d.ts +65 -80
- package/dist/types/services/backups/archive-safety.d.ts +30 -0
- package/dist/types/services/backups/paths.d.ts +31 -0
- package/dist/types/services/backups.d.ts +61 -271
- package/dist/types/services/config-watch.d.ts +3 -15
- package/dist/types/services/control-server.d.ts +6 -10
- package/dist/types/services/ddns.d.ts +12 -13
- package/dist/types/services/dependencies.d.ts +3 -14
- package/dist/types/services/deploy.d.ts +34 -0
- package/dist/types/services/events.d.ts +15 -9
- package/dist/types/services/exposure.d.ts +13 -63
- package/dist/types/services/history.d.ts +5 -14
- package/dist/types/services/host-monitor.d.ts +6 -11
- package/dist/types/services/init.d.ts +5 -35
- package/dist/types/services/job-ledger.d.ts +27 -0
- package/dist/types/services/jobs.d.ts +113 -0
- package/dist/types/services/log-buffer.d.ts +7 -8
- package/dist/types/services/log-files.d.ts +12 -42
- package/dist/types/services/log-relay.d.ts +3 -13
- package/dist/types/services/nanny.d.ts +3 -10
- package/dist/types/services/notifications.d.ts +31 -61
- package/dist/types/services/panel.d.ts +32 -78
- package/dist/types/services/proxy-certificates/certificates.d.ts +31 -69
- package/dist/types/services/proxy-config.d.ts +15 -36
- package/dist/types/services/proxy-dns01.d.ts +14 -0
- package/dist/types/services/proxy.d.ts +73 -254
- package/dist/types/services/scheduler.d.ts +46 -0
- package/dist/types/services/state.d.ts +17 -8
- package/dist/types/services/supervisor/compose.d.ts +2 -6
- package/dist/types/services/supervisor/entry.d.ts +29 -32
- package/dist/types/services/supervisor/health.d.ts +8 -31
- package/dist/types/services/supervisor/job-run.d.ts +36 -0
- package/dist/types/services/supervisor/output.d.ts +13 -77
- package/dist/types/services/supervisor/persistent.d.ts +5 -11
- package/dist/types/services/supervisor/port-preflight.d.ts +4 -10
- package/dist/types/services/supervisor/records.d.ts +27 -60
- package/dist/types/services/supervisor/restart-required.d.ts +13 -0
- package/dist/types/services/supervisor/spawn.d.ts +3 -5
- package/dist/types/services/supervisor/view.d.ts +3 -1
- package/dist/types/services/supervisor.d.ts +31 -43
- package/dist/types/services/tls.d.ts +6 -17
- package/dist/types/services/ui-update.d.ts +19 -17
- package/dist/types/services/ui.d.ts +10 -19
- package/dist/types/shared/action-outcome.d.ts +2 -7
- package/dist/types/shared/api-client.d.ts +133 -177
- package/dist/types/shared/api-scopes.d.ts +17 -0
- package/dist/types/shared/backup-scope.d.ts +16 -90
- package/dist/types/shared/clone.d.ts +2 -11
- package/dist/types/shared/contracts/accounts.d.ts +99 -0
- package/dist/types/shared/contracts/backups.d.ts +219 -0
- package/dist/types/shared/contracts/ddns.d.ts +208 -0
- package/dist/types/shared/contracts/frames.d.ts +1395 -0
- package/dist/types/shared/contracts/index.d.ts +3 -0
- package/dist/types/shared/contracts/logs.d.ts +107 -0
- package/dist/types/shared/contracts/proxy.d.ts +303 -0
- package/dist/types/shared/contracts.d.ts +852 -1982
- package/dist/types/shared/cpu-scale.d.ts +3 -19
- package/dist/types/shared/crash-cause.d.ts +8 -0
- package/dist/types/shared/cron.d.ts +70 -0
- package/dist/types/shared/ddns-form.d.ts +9 -43
- package/dist/types/shared/endpoint.d.ts +1 -7
- package/dist/types/shared/error-codes.d.ts +438 -0
- package/dist/types/shared/error-message.d.ts +1 -7
- package/dist/types/shared/fields.d.ts +7 -17
- package/dist/types/shared/form-repair.d.ts +1 -5
- package/dist/types/shared/generated.d.ts +3 -19
- package/dist/types/shared/host-readings.d.ts +25 -128
- package/dist/types/shared/lazy.d.ts +1 -1
- package/dist/types/shared/live-frames.d.ts +2 -8
- package/dist/types/shared/live-series.d.ts +2 -8
- package/dist/types/shared/live-store.d.ts +4 -8
- package/dist/types/shared/log-download.d.ts +6 -0
- package/dist/types/shared/meta.d.ts +6 -0
- package/dist/types/shared/password-policy.d.ts +10 -0
- package/dist/types/shared/patch-diff.d.ts +13 -72
- package/dist/types/shared/port-reading.d.ts +18 -0
- package/dist/types/shared/probe-latency.d.ts +3 -21
- package/dist/types/shared/proxy-form.d.ts +33 -74
- package/dist/types/shared/proxy-validate.d.ts +11 -0
- package/dist/types/shared/query-params.d.ts +8 -0
- package/dist/types/shared/server-attention.d.ts +2 -27
- package/dist/types/shared/server-form.d.ts +15 -54
- package/dist/types/shared/server-key.d.ts +1 -12
- package/dist/types/shared/server-readings.d.ts +7 -32
- package/dist/types/shared/server-url.d.ts +9 -31
- package/dist/types/shared/shape.d.ts +1 -16
- package/dist/types/shared/stream-access.d.ts +2 -8
- package/dist/types/shared/ui-format.d.ts +25 -65
- package/docs/API.md +315 -107
- package/docs/BACKUPS.md +61 -56
- package/docs/CLI.md +255 -49
- package/docs/DDNS.md +35 -49
- package/docs/JOBS.md +129 -0
- package/docs/NOTIFICATIONS.md +58 -90
- package/docs/REVERSE_PROXY.md +116 -188
- package/docs/SECURITY.md +126 -44
- package/docs/SERVERS.md +282 -409
- package/docs/UI_CREATION.md +90 -47
- package/docs/demo/blank-host-restore.sh +31 -7
- package/package.json +15 -6
- package/scripts/prepare.mjs +47 -0
- package/uis/stock/dist/assets/CopyButton-8mliL0xi.js +1 -0
- package/uis/stock/dist/assets/GlobalSettingsView-BINXY77E.js +1 -0
- package/uis/stock/dist/assets/LogViewer-kiSnTwdY.js +1 -0
- package/uis/stock/dist/assets/LogsView-DDXf_ONs.js +1 -0
- package/uis/stock/dist/assets/Modal-lrUuViF2.js +39 -0
- package/uis/stock/dist/assets/ProxyView-uXMaJdSQ.js +1 -0
- package/uis/stock/dist/assets/ServerDetailView-CW0Vb_c0.js +4 -0
- package/uis/stock/dist/assets/SettingsShell-B135xWjJ.js +1 -0
- package/uis/stock/dist/assets/SettingsView-BLtWxVkl.js +2 -0
- package/uis/stock/dist/assets/de-BIoTrHBQ.js +1 -0
- package/uis/stock/dist/assets/es-x4-ih8lH.js +1 -0
- package/uis/stock/dist/assets/fr-DatqBBkO.js +1 -0
- package/uis/stock/dist/assets/index-CnojaKcA.css +2 -0
- package/uis/stock/dist/assets/index-D-CiZReu.js +16 -0
- package/uis/stock/dist/assets/ja-CW1703Gw.js +1 -0
- package/uis/stock/dist/assets/ko-wFbT4XtK.js +1 -0
- package/uis/stock/dist/assets/ru-C1p5C4VN.js +1 -0
- package/uis/stock/dist/assets/useUnsavedGuard-BcsXsfCC.js +9 -0
- package/uis/stock/dist/assets/vi-CDqr0uie.js +1 -0
- package/uis/stock/dist/assets/zh-CN-BJ7iit-X.js +1 -0
- package/uis/stock/dist/index.html +4 -3
- package/uis/stock/dist/ui.json +3 -3
- package/dist/chunks/archive-DP-XQR8X.js.map +0 -1
- package/dist/chunks/atomic-C1PfJpE7.js.map +0 -1
- package/dist/chunks/backup-CZcVca2a.js.map +0 -1
- package/dist/chunks/backups-CFRaWe_m.js +0 -4691
- package/dist/chunks/backups-CFRaWe_m.js.map +0 -1
- package/dist/chunks/config-text-DifCHhnz.js +0 -50
- package/dist/chunks/config-text-DifCHhnz.js.map +0 -1
- package/dist/chunks/contracts-CMBD1TF9.js.map +0 -1
- package/dist/chunks/daemon-log-BVj8cDEo.js +0 -241
- package/dist/chunks/daemon-log-BVj8cDEo.js.map +0 -1
- package/dist/chunks/daemon-qKVECISl.js +0 -247
- package/dist/chunks/daemon-qKVECISl.js.map +0 -1
- package/dist/chunks/docker-Cy9Lyvda.js.map +0 -1
- package/dist/chunks/down-pKbGCW9d.js.map +0 -1
- package/dist/chunks/init-BZ7hK9Vf.js.map +0 -1
- package/dist/chunks/last-stop-C-BXz_XI.js +0 -53
- package/dist/chunks/last-stop-C-BXz_XI.js.map +0 -1
- package/dist/chunks/layout-DwTtmund.js +0 -24
- package/dist/chunks/layout-DwTtmund.js.map +0 -1
- package/dist/chunks/lazy-Ce5zEAq1.js +0 -66
- package/dist/chunks/lazy-Ce5zEAq1.js.map +0 -1
- package/dist/chunks/log-buffer-Dy9HHDMD.js +0 -414
- package/dist/chunks/log-buffer-Dy9HHDMD.js.map +0 -1
- package/dist/chunks/logger-B5U4GD3j.js.map +0 -1
- package/dist/chunks/logs---TI_bxM.js.map +0 -1
- package/dist/chunks/migrate-Cfoq-Vgh.js +0 -155
- package/dist/chunks/migrate-Cfoq-Vgh.js.map +0 -1
- package/dist/chunks/nanny-B-Eu0sFW.js.map +0 -1
- package/dist/chunks/nanny-BtWfy0QH.js +0 -1167
- package/dist/chunks/nanny-BtWfy0QH.js.map +0 -1
- package/dist/chunks/nanny-sweep-DErnlPY1.js.map +0 -1
- package/dist/chunks/nearest-6KgQEDUe.js.map +0 -1
- package/dist/chunks/parse-DhmG26fI.js.map +0 -1
- package/dist/chunks/paths-CGlGDrOU.js.map +0 -1
- package/dist/chunks/port-B8WBTRMk.js.map +0 -1
- package/dist/chunks/restart-Des4DrAN.js.map +0 -1
- package/dist/chunks/schema-B240VXcV.js.map +0 -1
- package/dist/chunks/secrets-BieELnZh.js +0 -562
- package/dist/chunks/secrets-BieELnZh.js.map +0 -1
- package/dist/chunks/server-Bge2r2qQ.js +0 -169
- package/dist/chunks/server-Bge2r2qQ.js.map +0 -1
- package/dist/chunks/server-ids-DRuNLVCV.js +0 -32
- package/dist/chunks/server-ids-DRuNLVCV.js.map +0 -1
- package/dist/chunks/set-password-D5vZqqSX.js +0 -43
- package/dist/chunks/set-password-D5vZqqSX.js.map +0 -1
- package/dist/chunks/set-token-obPiEJYk.js +0 -78
- package/dist/chunks/set-token-obPiEJYk.js.map +0 -1
- package/dist/chunks/settings-xu-XTfWg.js.map +0 -1
- package/dist/chunks/setup-temp-CAN4_bA-.js.map +0 -1
- package/dist/chunks/shape-DnTKzjQ2.js +0 -24
- package/dist/chunks/shape-DnTKzjQ2.js.map +0 -1
- package/dist/chunks/src-BtWMFmzZ.js.map +0 -1
- package/dist/chunks/status-DT1EsA-B.js.map +0 -1
- package/dist/chunks/ui-D562aqw5.js.map +0 -1
- package/dist/chunks/ui-dir-CsU3uLNV.js.map +0 -1
- package/dist/chunks/ui-release-DKzVvlLd.js.map +0 -1
- package/dist/chunks/ui-revert-EkBBwRTt.js.map +0 -1
- package/dist/chunks/ui-switch-BnZTdMDd.js.map +0 -1
- package/dist/chunks/ui-update-_xryLYxw.js.map +0 -1
- package/dist/chunks/up-Pdz-l6IH.js.map +0 -1
- package/dist/chunks/usage-DFrCVXpT.js.map +0 -1
- package/dist/chunks/workspaces-DYcfvKV_.js.map +0 -1
- package/dist/chunks/wsl-temperature-BiCI4iK6.js.map +0 -1
- package/dist/types/cli/set-password.d.ts +0 -14
- package/dist/types/cli/set-token.d.ts +0 -21
- package/uis/stock/dist/assets/CopyButton-BUBKRJyY.js +0 -1
- package/uis/stock/dist/assets/GlobalSettingsView-yYMcRWvt.js +0 -1
- package/uis/stock/dist/assets/LogViewer-DIliXy62.js +0 -1
- package/uis/stock/dist/assets/LogsView-B7Z-7RNg.js +0 -1
- package/uis/stock/dist/assets/Modal-DmKa5Qpp.js +0 -39
- package/uis/stock/dist/assets/ProxyView-DvZiNkwb.js +0 -1
- package/uis/stock/dist/assets/ServerDetailView-6idGT_EX.js +0 -2
- package/uis/stock/dist/assets/SettingsShell-CeGtleYI.js +0 -1
- package/uis/stock/dist/assets/SettingsView-BrhJIrmk.js +0 -2
- package/uis/stock/dist/assets/de-BRITeb0H.js +0 -1
- package/uis/stock/dist/assets/es-B2zIEssV.js +0 -1
- package/uis/stock/dist/assets/fr-s0ZOBEqh.js +0 -1
- package/uis/stock/dist/assets/index-C1MehbKy.css +0 -2
- package/uis/stock/dist/assets/index-CnBN54wF.js +0 -15
- package/uis/stock/dist/assets/ja-CU7MR85V.js +0 -1
- package/uis/stock/dist/assets/ko-tL5Me6d-.js +0 -1
- package/uis/stock/dist/assets/ru-92yrvkNJ.js +0 -1
- package/uis/stock/dist/assets/vi-CzvY16k2.js +0 -1
- package/uis/stock/dist/assets/zh-CN-DDwFW_uW.js +0 -1
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copies `current` over any emptied or non-finite number in `next`, in place, recursing into
|
|
3
|
-
* nested groups and objects. Non-numeric values (`''` for a text field, a boolean, a list)
|
|
4
|
-
* are left exactly as they are — only a slot the live config holds a number in is repaired.
|
|
5
|
-
*/
|
|
1
|
+
/** In place, recursively; only a slot the live config holds a number in is repaired. */
|
|
6
2
|
export declare function repairNumbers<T extends Record<string, unknown>>(next: T, current: Record<string, unknown>): T;
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Names that only
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* A backup walks a declared data directory and copies whatever it finds; on a
|
|
6
|
-
* project directory that is mostly `node_modules` and framework caches, which
|
|
7
|
-
* bloats the archive with content nobody needs to restore. An entry with
|
|
8
|
-
* `backupIgnoreGenerated` (on by default) skips these.
|
|
9
|
-
*
|
|
10
|
-
* Matching is by exact name, on any segment, at any depth: `dist/` and
|
|
11
|
-
* `app/node_modules/` are generated, `distributed/` and `my-node_modules/` are
|
|
12
|
-
* not.
|
|
13
|
-
*
|
|
14
|
-
* `.git` is deliberately absent however much a `.gitignore` would not list it:
|
|
15
|
-
* a package manager can reinstall `node_modules`, but nobody can restore a
|
|
16
|
-
* commit that was never pushed.
|
|
2
|
+
* Names that only hold build output or installed dependencies, skipped by `backupIgnoreGenerated`.
|
|
3
|
+
* Matched by exact name on any segment. `.git` is deliberately absent: an unpushed commit is not regenerable.
|
|
17
4
|
*/
|
|
18
5
|
/** Whole directories that are regenerated, never authored. */
|
|
19
6
|
export declare const GENERATED_DIRS: readonly string[];
|
|
20
7
|
/** One-off files worth skipping, by exact name. */
|
|
21
8
|
export declare const GENERATED_FILES: readonly string[];
|
|
22
|
-
/**
|
|
23
|
-
* True when a path *relative to the declared root* looks generated. Accepts
|
|
24
|
-
* either separator, so a `path.relative` result can be passed straight in.
|
|
25
|
-
*/
|
|
9
|
+
/** `relative` is to the declared root; either separator. */
|
|
26
10
|
export declare function isGeneratedPath(relative: string): boolean;
|
|
@@ -1,80 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The host's measurements, and the one place that decides a sample exists.
|
|
3
|
-
*
|
|
4
|
-
* `emptyHostView()` is what `HostMonitor` starts from, and it is also the frame a panel keeps for
|
|
5
|
-
* ever when host vitals are switched off: `sampledAt: null`, with **every value zero** because the
|
|
6
|
-
* wire type says `number`. `/api/metrics` refuses to publish those zeros — a scrape has no page to
|
|
7
|
-
* qualify a number, so a `0` it invents silences the alert rule that exists to catch a full disk.
|
|
8
|
-
* The panel's own pages read the same frame and printed it: `0.0%` memory, `0.0%` swap, `0.00`
|
|
9
|
-
* load, under a head that says "sampling off". On a homelab box being told memory is at 0% is the
|
|
10
|
-
* same lie as a dashboard being told it, told to the person instead.
|
|
11
|
-
*
|
|
12
|
-
* So `sampledAt === null` means "nothing has been measured" and every reading here is `null`.
|
|
13
|
-
* The zeros stay on the wire: an older overridden UI under `.hh/.ui` reads `memoryUsedPercent` as a
|
|
14
|
-
* `number` and calls `.toFixed()` on it, so a nullable field would crash it — the absence is decided
|
|
15
|
-
* where it is rendered, once, instead.
|
|
16
|
-
*
|
|
17
|
-
* `cpus` and `uptimeMs` are **not** readings: they describe the machine, not a sample, and the
|
|
18
|
-
* empty frame already reports them truthfully.
|
|
19
|
-
*
|
|
20
|
-
* `loadAlertPerCpu` is not a reading either: it is the threshold the panel *notifies* on, and it
|
|
21
|
-
* travels with the frame so a surface can band the load against the number a person actually
|
|
22
|
-
* chose. `AGENTS.md` names the rule — a verdict is measured against the configured threshold, and
|
|
23
|
-
* one module decides it — after two surfaces hardcoded the default and kept calling a box a person
|
|
24
|
-
* had raised the threshold on `danger`, for a notification that stayed silent.
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* The load per cpu a panel notifies on when nothing else is configured.
|
|
28
|
-
*
|
|
29
|
-
* One home: `hostSchema` defaults to it, and a surface reading a frame from a panel that predates
|
|
30
|
-
* the field bands its load against the same number the older panel alerted on.
|
|
2
|
+
* The host's measurements, and the one place that decides a sample exists. `sampledAt === null` means
|
|
3
|
+
* nothing was measured: the wire keeps zeros for older UIs, so absence is decided here.
|
|
31
4
|
*/
|
|
32
5
|
export declare const LOAD_ALERT_PER_CPU_DEFAULT = 2;
|
|
33
|
-
/**
|
|
34
|
-
* The alert thresholds a percentage reading is banded against, when the frame carries none.
|
|
35
|
-
*
|
|
36
|
-
* One home, the same rule as `LOAD_ALERT_PER_CPU_DEFAULT`: `hostSchema` defaults to these, and a
|
|
37
|
-
* surface reading a frame from a panel that predates the fields bands against the numbers that
|
|
38
|
-
* panel alerted on.
|
|
39
|
-
*/
|
|
40
6
|
export declare const HOST_ALERT_DEFAULTS: {
|
|
41
7
|
readonly diskUsedPercent: 90;
|
|
42
8
|
readonly memoryUsedPercent: 90;
|
|
43
9
|
readonly swapUsedPercent: 50;
|
|
44
10
|
readonly tempCelsius: 85;
|
|
45
11
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/** `host.diskUsedPercent` — the threshold the panel notifies on, `0` disabling it. */
|
|
12
|
+
interface HostAlertThresholds {
|
|
13
|
+
/** `0` disables the alert. */
|
|
49
14
|
diskUsedPercentAlert?: number;
|
|
50
|
-
/** `host.memoryUsedPercent` — the threshold the panel notifies on, `0` disabling it. */
|
|
51
15
|
memoryUsedPercentAlert?: number;
|
|
52
16
|
swapUsedPercentAlert?: number;
|
|
53
17
|
tempCelsiusAlert?: number;
|
|
54
18
|
}
|
|
55
|
-
|
|
56
|
-
export interface HostDiskReading {
|
|
19
|
+
interface HostDiskReading {
|
|
57
20
|
path: string;
|
|
58
21
|
totalBytes: number;
|
|
59
22
|
freeBytes: number;
|
|
60
23
|
usedPercent: number;
|
|
61
|
-
/**
|
|
62
|
-
* How urgent that filesystem's usage is, against `host.diskUsedPercent` — the threshold the panel
|
|
63
|
-
* **notifies** on — else `null` when nothing was measured.
|
|
64
|
-
*
|
|
65
|
-
* It rides on the disk rather than beside the frame because the threshold is per-path usage and a
|
|
66
|
-
* frame can carry several paths; a single `diskBand` next to `memoryBand` would answer for one of
|
|
67
|
-
* them. The band was the last literal: `Gauge`/`Meter` defaulted to `75`/`90` and both
|
|
68
|
-
* noc-console surfaces restated the same pair, which is `hostSchema`'s *default*, so lowering
|
|
69
|
-
* `host.diskUsedPercent` to 80 made the panel notify at 82% while every surface called it `warn`.
|
|
70
|
-
*/
|
|
24
|
+
/** Against the configured `host.diskUsedPercent` alert, per path; `null` when nothing was measured. */
|
|
71
25
|
band: HostBand;
|
|
72
26
|
}
|
|
73
|
-
/** What the predicate needs: the sample's stamp and the numbers the frame carries. */
|
|
74
27
|
export interface HostReadingSource extends HostAlertThresholds {
|
|
75
28
|
sampledAt: number | null;
|
|
29
|
+
/** `false` once sampling is switched off: whatever the frame still carries is no longer current. */
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
/** Readings this sample could not take (Windows load, a failed macOS read); each is absent. */
|
|
32
|
+
unmeasured?: readonly string[];
|
|
76
33
|
cpus: number;
|
|
77
|
-
/** The alert thresholds from the panel's own config; absent on a panel that predates the fields. */
|
|
78
34
|
loadAlertPerCpu?: number;
|
|
79
35
|
cpuUsedPercent?: number | null;
|
|
80
36
|
memoryUsedPercent: number;
|
|
@@ -88,98 +44,39 @@ export interface HostReadingSource extends HostAlertThresholds {
|
|
|
88
44
|
usedPercent: number;
|
|
89
45
|
}>;
|
|
90
46
|
}
|
|
91
|
-
/** One host sample, with every measurement absent until the host has been sampled. */
|
|
92
47
|
export interface HostReadings {
|
|
93
|
-
/** Whether the frame carries a sample at all. */
|
|
94
48
|
sampled: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Readings the **platform** could not take (`load` on Windows): "measured, no such number", unlike
|
|
51
|
+
* `sampled: false`. `[]` when everything was taken.
|
|
52
|
+
*/
|
|
53
|
+
unmeasured: readonly string[];
|
|
54
|
+
/** Unsampled, but the panel holds a sample it is not showing (sampling off, or stale): its stamp. */
|
|
55
|
+
staleSince: number | null;
|
|
95
56
|
cpuUsedPercent: number | null;
|
|
96
57
|
memoryUsedPercent: number | null;
|
|
97
58
|
swapUsedPercent: number | null;
|
|
98
59
|
load1m: number | null;
|
|
99
60
|
load5m: number | null;
|
|
100
61
|
load15m: number | null;
|
|
101
|
-
/**
|
|
102
|
-
* The 1-minute load as a share of one core. Load is a **count of runnable tasks**, so this is a
|
|
103
|
-
* count per core, never a percentage — `1.00` is one core's worth of work.
|
|
104
|
-
*/
|
|
62
|
+
/** The 1-minute load per core: a count of runnable tasks, never a percentage. */
|
|
105
63
|
loadPerCpu: number | null;
|
|
106
64
|
tempCelsius: number | null;
|
|
107
|
-
/** Each configured filesystem, carrying its own band. Empty when nothing was sampled. */
|
|
108
65
|
disks: HostDiskReading[];
|
|
109
|
-
/**
|
|
110
|
-
* How urgent that per-cpu load is: `null` when nothing was measured (an absent reading has no
|
|
111
|
-
* band of its own, or a zero would read as healthy), else the alert threshold it crossed.
|
|
112
|
-
*/
|
|
66
|
+
/** `null` when nothing was measured, else the band against the configured alert. */
|
|
113
67
|
loadBand: HostBand;
|
|
114
|
-
/**
|
|
115
|
-
* The same verdict for the three percentage readings, each against the threshold the panel
|
|
116
|
-
* **notifies** on — `null` when nothing was measured. A surface paints `thresholdBand`, never a
|
|
117
|
-
* literal: the swap bar used to call 50% `warn` while the alert fired there, and a raised
|
|
118
|
-
* `tempCelsius` left a box painted `danger` for a notification that never arrives.
|
|
119
|
-
*/
|
|
68
|
+
/** The same, each against the threshold the panel **notifies** on — never a literal. */
|
|
120
69
|
memoryBand: HostBand;
|
|
121
70
|
swapBand: HostBand;
|
|
122
71
|
tempBand: HostBand;
|
|
123
72
|
}
|
|
124
|
-
/**
|
|
73
|
+
/** `null` when there is no reading to judge. */
|
|
125
74
|
export type HostBand = 'ok' | 'warn' | 'danger' | null;
|
|
126
|
-
/**
|
|
127
|
-
* How a per-cpu load sits against the threshold the panel notifies on.
|
|
128
|
-
*
|
|
129
|
-
* The ratio is what a person configures: `host.loadPerCpu` is the count the alert fires at, so
|
|
130
|
-
* `danger` is that number itself and `warn` is the approach to it. `0` disables the alert in
|
|
131
|
-
* `sampleHost`, so nothing can breach it and the band is `ok` — painting a box red for a
|
|
132
|
-
* notification that will never arrive is the same defect as inventing a reading. It lives here
|
|
133
|
-
* rather than in a component so both UIs share one band, the mistake that produced two hardcoded
|
|
134
|
-
* copies of the default.
|
|
135
|
-
*/
|
|
136
|
-
export declare function loadBand(loadPerCpu: number | null, alertPerCpu: number | undefined): HostBand;
|
|
137
|
-
/**
|
|
138
|
-
* The band for the host's own CPU share, which has no configurable alert.
|
|
139
|
-
*
|
|
140
|
-
* `host.cpuUsedPercent` is a share of the whole machine, and `hostSchema` has no threshold for it —
|
|
141
|
-
* so there is nothing a person chose for a surface to follow, and a fixed band is a decision. The
|
|
142
|
-
* decision is *this one*: the two UIs disagreed (noc-console painted 70/90, every stock dial 80/95),
|
|
143
|
-
* so one 75% reading came back `warn` on one page and `ok` on the other — `AGENTS.md`'s "UIs move
|
|
144
|
-
* together" broken by two literal pairs. A real alert would make this a `…Alert` field on the frame
|
|
145
|
-
* like its neighbours; until then it is a constant here, not a pair at each call site.
|
|
146
|
-
*/
|
|
147
|
-
export declare const HOST_CPU_BAND: {
|
|
148
|
-
readonly warnAt: 80;
|
|
149
|
-
readonly dangerAt: 95;
|
|
150
|
-
};
|
|
151
|
-
/** The band for a host cpu share, against {@link HOST_CPU_BAND}. */
|
|
152
75
|
export declare function hostCpuBand(percent: number | null): HostBand;
|
|
153
|
-
/**
|
|
154
|
-
* How a reading sits against the threshold the panel notifies on.
|
|
155
|
-
*
|
|
156
|
-
* `danger` at the threshold is the whole point: the alert fires there, so a bar that stays `warn`
|
|
157
|
-
* while a notification goes out disagrees with the panel's own verdict. `0` disables that alert in
|
|
158
|
-
* `sampleHost`, so nothing can breach it and the band is `ok`. One rule for the per-cpu load, the
|
|
159
|
-
* three percentages and each disk — they differ only in what the number means, and the mistake this
|
|
160
|
-
* replaced was four surfaces each deciding a band for itself.
|
|
161
|
-
*/
|
|
162
|
-
export declare function percentageBand(value: number | null, alertAt: number | undefined, fallback: number): HostBand;
|
|
163
|
-
/**
|
|
164
|
-
* The full scale of a temperature dial: the threshold the panel **notifies** on.
|
|
165
|
-
*
|
|
166
|
-
* There is no natural `100 °C`, so unlike a percentage a temperature has no scale of its own —
|
|
167
|
-
* the alert is the only number a person configured for it, and it is what the dial is drawn
|
|
168
|
-
* against. `0` disables the alert and leaves no scale to draw, so the default the older panels
|
|
169
|
-
* alerted on is kept rather than dividing by zero.
|
|
170
|
-
*
|
|
171
|
-
* This exists because the *band* was moved onto the frame and the *scale* was not: one stock
|
|
172
|
-
* surface scaled by `tempCelsiusAlert` while the other kept `(tempCelsius / 85) * 100`, so one
|
|
173
|
-
* frame at 60 °C against an alert of 95 drew arcs of `101.19` and `113.10` — the same number
|
|
174
|
-
* fuller on one page than the other. A tone test cannot see that; only the arc can.
|
|
175
|
-
*/
|
|
76
|
+
/** A temperature dial's full scale is the alert threshold; `0` (disabled) falls back to the default. */
|
|
176
77
|
export declare function tempScale(alertAt: number | undefined): number;
|
|
177
|
-
/**
|
|
178
|
-
* How full a temperature dial is, as the percentage a `Gauge`/bar draws: a share of `tempScale`.
|
|
179
|
-
*
|
|
180
|
-
* `null` when nothing was measured — an absent reading has no dial, the same rule every other
|
|
181
|
-
* reading on the frame follows.
|
|
182
|
-
*/
|
|
78
|
+
/** A share of `tempScale`, `null` when nothing was measured. */
|
|
183
79
|
export declare function tempDialPercent(temp: number | null | undefined, alertAt: number | undefined): number | null;
|
|
184
|
-
/**
|
|
80
|
+
/** A missing frame is the same as an unsampled one. */
|
|
185
81
|
export declare function hostReadings(host: HostReadingSource | null | undefined): HostReadings;
|
|
82
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** So a test can prove an import built none. */
|
|
2
2
|
export declare function lazyBuilds(): number;
|
|
3
3
|
export declare function lazySchemas(): ReadonlyArray<() => unknown>;
|
|
4
4
|
export declare function lazy<T extends object>(build: () => T): T;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import type { AppState, SseMessage } from './contracts.js';
|
|
2
2
|
/**
|
|
3
|
-
* The client side of the frame contract: strict where a UI depends on structure, tolerant of
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* The full schema closes every enum (`serverStatusSchema`, `logStreamSchema`, …), which is right for
|
|
7
|
-
* the panel and its spec but wrong for a client: one status a newer panel added failed the whole
|
|
8
|
-
* frame, every frame after it too, and the UI froze on the last frame it understood. So a frame
|
|
9
|
-
* that fails the full schema is still accepted when its envelope (`type`, `ts`) and the containers a
|
|
10
|
-
* view walks (workspaces, servers, lines) have the right shape; the leaves are shown as they came.
|
|
3
|
+
* The client side of the frame contract: strict where a UI depends on structure, tolerant of an enum
|
|
4
|
+
* value a newer panel added — a frame failing the full schema is accepted when its containers fit.
|
|
11
5
|
*/
|
|
12
6
|
export interface ParsedFrame {
|
|
13
7
|
frame: SseMessage;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { ServerView } from './contracts.js';
|
|
2
2
|
/**
|
|
3
|
-
* Client-side telemetry history.
|
|
4
|
-
*
|
|
5
|
-
* The panel only ever sends a *current* reading, so a chart's series is built in the UI: one ring
|
|
6
|
-
* per server, fed from `state` and `server` frames and capped so a page left open for a week does
|
|
7
|
-
* not grow. A point is `null` when nothing was measured — a stopped entry has no reading, and the
|
|
8
|
-
* chart must break there rather than draw a vertex on the floor.
|
|
3
|
+
* Client-side telemetry history: one capped ring per server. A point is `null` when nothing was
|
|
4
|
+
* measured, so the chart breaks there rather than drawing a zero.
|
|
9
5
|
*/
|
|
10
6
|
export interface ServerSeries {
|
|
11
7
|
ts: number[];
|
|
@@ -15,7 +11,5 @@ export interface ServerSeries {
|
|
|
15
11
|
/** Last `resources.sampledAt` folded in, so 1 Hz state frames do not double up. */
|
|
16
12
|
lastSampledAt: number;
|
|
17
13
|
}
|
|
18
|
-
/** The panel samples the process tree every 5 s. */
|
|
19
|
-
export declare const MIN_SAMPLE_GAP_MS = 4000;
|
|
20
14
|
export declare function createSeries(): ServerSeries;
|
|
21
15
|
export declare function recordSample(series: ServerSeries, server: ServerView, now: number, capacity: number): void;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type { AppState, LogLine } from './contracts.js';
|
|
2
2
|
import type { ServerSeries } from './live-series.js';
|
|
3
3
|
/**
|
|
4
|
-
* The live-data layer both UIs build on
|
|
5
|
-
*
|
|
6
|
-
* It owns the panel-wide event stream, the per-server log streams (shared between viewers by a
|
|
7
|
-
* refcount), their line buffers and the sample history. A UI wraps it in its own reactivity: it
|
|
8
|
-
* hands in a state holder and an `observe` for the series, and hears about buffer changes through
|
|
9
|
-
* `onLogs`. Every one of these used to live twice, once per UI, and the copies drifted — a fix
|
|
10
|
-
* landed in one and the other kept the bug.
|
|
4
|
+
* The framework-free live-data layer both UIs build on: the event stream, refcounted per-server log
|
|
5
|
+
* streams, their buffers and the sample history. A UI supplies its own reactivity.
|
|
11
6
|
*/
|
|
12
7
|
export type ConnectionState = 'connecting' | 'open' | 'closed';
|
|
13
8
|
/** `EventSource.CLOSED`: the browser has given up and will not retry on its own. */
|
|
@@ -17,8 +12,10 @@ export interface LiveEventSource {
|
|
|
17
12
|
readonly readyState: number;
|
|
18
13
|
onopen: ((event: never) => unknown) | null;
|
|
19
14
|
onerror: ((event: never) => unknown) | null;
|
|
15
|
+
/** `lastEventId` is the frame's `id:` line, which a reconnect resumes from. */
|
|
20
16
|
addEventListener: (type: string, listener: (event: {
|
|
21
17
|
data: string;
|
|
18
|
+
lastEventId?: string;
|
|
22
19
|
}) => void) => void;
|
|
23
20
|
close: () => void;
|
|
24
21
|
}
|
|
@@ -67,6 +64,5 @@ export declare function createLiveStore(options: LiveStoreOptions): {
|
|
|
67
64
|
/** One viewer fewer; the last closes the stream. */
|
|
68
65
|
releaseLogs(workspaceId: string, serverId: string): void;
|
|
69
66
|
series: (key: string) => ServerSeries;
|
|
70
|
-
/** Drops everything kept for a removed server. */
|
|
71
67
|
forget(workspaceId: string, serverId: string): void;
|
|
72
68
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Which log file a download link may point at: only one in the panel's file list, which is built from disk. */
|
|
2
|
+
export interface LogFileEntry {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
/** The file named `preferred` when it is on disk, else `null` — so a caller can hide the control. */
|
|
6
|
+
export declare function existingLogFile(files: readonly LogFileEntry[], preferred: string): string | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AuthIdentity } from '../services/auth.js';
|
|
2
|
+
import type { CredentialKind, CredentialView } from './contracts.js';
|
|
3
|
+
/** A session, and this machine with auth unarmed, are refused nothing: the CLI can do all of it anyway. */
|
|
4
|
+
export declare function credentialRefusals(kind: CredentialKind): string[];
|
|
5
|
+
/** `local` is auth unarmed and a loopback peer, admitted only because the caller is this machine. */
|
|
6
|
+
export declare function credentialOf(identity: AuthIdentity, apiTokenHint: string | null): CredentialView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shortest password the panel may be exposed beyond loopback behind — its own listener on a
|
|
3
|
+
* non-loopback bind, or a reverse-proxy route to it. Any length is accepted for a loopback-only
|
|
4
|
+
* panel: this is the exposure bar (`checkExposure`), not a schema floor.
|
|
5
|
+
*/
|
|
6
|
+
export declare const EXPOSED_PASSWORD_MIN_LENGTH = 12;
|
|
7
|
+
/** Below this, a secret is flagged short even for a loopback-only panel. */
|
|
8
|
+
export declare const WEAK_PASSWORD_LENGTH = 8;
|
|
9
|
+
/** Characters, not UTF-16 units: an emoji is one character to the person typing it. */
|
|
10
|
+
export declare function passwordLength(password: string): number;
|
|
@@ -1,105 +1,46 @@
|
|
|
1
1
|
import type { ServerConfig } from './contracts.js';
|
|
2
2
|
export type Patch = Record<string, unknown>;
|
|
3
|
-
/**
|
|
4
|
-
* Keeps only the fields that differ from `current`.
|
|
5
|
-
*
|
|
6
|
-
* Nested groups list only the sub-keys that changed, which is what lets the
|
|
7
|
-
* server merge a partial patch instead of replacing the whole group. Every
|
|
8
|
-
* comparison goes through `same`, including the one inside a group: `health.http`
|
|
9
|
-
* is an object, so comparing those members by reference reported the whole group
|
|
10
|
-
* as changed on a form nobody had touched, and a `null` the form carries where
|
|
11
|
-
* the config has no key at all is the same "nothing here" the server would clear.
|
|
12
|
-
*/
|
|
3
|
+
/** Keeps only the fields that differ from `current`; nested groups list only their changed sub-keys. */
|
|
13
4
|
export declare function diffFields(current: Patch, next: Patch, nested?: readonly string[]): Patch;
|
|
14
5
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* sending it writes the sender's whole view, including the entries it has never
|
|
19
|
-
* seen. So the comparison that decides "send it" must be against the list this form
|
|
20
|
-
* was **filled with**, never against live state — live state moving is precisely
|
|
21
|
-
* what another client's save looks like, and a form that treats that as its own
|
|
22
|
-
* edit deletes whatever arrived while it was open. Measured: with the workspace
|
|
23
|
-
* settings page open on `alpha`, a second client added `beta`; saving an unrelated
|
|
24
|
-
* policy toggle on the first page removed `beta` from disk.
|
|
25
|
-
*
|
|
26
|
-
* `filled` absent means the block was never filled, and a list that was never
|
|
27
|
-
* filled must not travel either: it is `[]`, and `[]` on a replaced list is
|
|
28
|
-
* "delete every entry".
|
|
6
|
+
* A replaced list (`destinations`, `routes`) is all-or-nothing on the wire, so whether to send it is
|
|
7
|
+
* judged against the list the form was **filled with**, never live state. `filled` absent means never
|
|
8
|
+
* filled: its `[]` must not travel, as that deletes every entry.
|
|
29
9
|
*/
|
|
30
|
-
export declare function replacedListEdited(filled: readonly unknown[] | undefined, next: readonly unknown[]): boolean;
|
|
31
10
|
export interface ReplacedListMerge<T> {
|
|
32
|
-
/**
|
|
11
|
+
/** Absent means the list was never filled. */
|
|
33
12
|
filled: readonly T[] | undefined;
|
|
34
|
-
/** What the form holds now. */
|
|
35
13
|
draft: readonly T[];
|
|
36
|
-
/** What the panel holds now, which another client may have changed. */
|
|
37
14
|
live: readonly T[];
|
|
38
15
|
/** One entry's identity; entries sharing a key are the same entry. */
|
|
39
16
|
key: (entry: T) => string;
|
|
40
17
|
}
|
|
41
18
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* A replaced list is merged three ways, which keeps a concurrent *addition*. It cannot keep a
|
|
45
|
-
* concurrent *edit*: both sides start from the same `filled` entry and both end with a different
|
|
46
|
-
* value, so whichever the merge prefers, the other is lost without a word. This names them so the
|
|
47
|
-
* save can refuse instead of choosing.
|
|
48
|
-
*
|
|
49
|
-
* The test is three-way and needs no revision field: this form changed the entry (`draft` differs
|
|
50
|
-
* from `filled`) **and** the panel changed it (`live` differs from `filled`). A change on one side
|
|
51
|
-
* only is ordinary — an edit here, or someone else's edit landing before this form saved — and is
|
|
52
|
-
* not a conflict. `filled` absent means the list was never filled, so nothing is comparable.
|
|
19
|
+
* Entries this form **and** the panel both changed since `filled`. The merge keeps a concurrent
|
|
20
|
+
* addition but not a concurrent edit, so the caller refuses the save instead of choosing.
|
|
53
21
|
*/
|
|
54
22
|
export declare function replacedListConflicts<T>({ filled, draft, live, key }: ReplacedListMerge<T>): string[];
|
|
55
23
|
/**
|
|
56
|
-
* The list to send
|
|
57
|
-
*
|
|
58
|
-
* The form's own edits win, an entry it **removed** stays removed, and an entry that
|
|
59
|
-
* appeared while it was open is kept. That last half is the point: a replaced list is
|
|
60
|
-
* all-or-nothing, so sending only the draft writes "the list I saw when I opened this
|
|
61
|
-
* page" and silently deletes a concurrent addition. A three-way merge — what I filled,
|
|
62
|
-
* what I hold, what is there now — keeps both.
|
|
63
|
-
*
|
|
64
|
-
* A concurrent edit to the *same* entry is not reconcilable here; `replacedListConflicts` names it
|
|
65
|
-
* and the caller refuses the save.
|
|
24
|
+
* The list to send, or `null` when this form changed nothing: the draft plus any entry that appeared
|
|
25
|
+
* meanwhile, so a concurrent addition is not deleted.
|
|
66
26
|
*/
|
|
67
27
|
export declare function mergeReplacedList<T>({ filled, draft, live, key }: ReplacedListMerge<T>): T[] | null;
|
|
68
28
|
/**
|
|
69
|
-
* A settings block's patch,
|
|
70
|
-
*
|
|
71
|
-
* A block stops refilling once someone edits it, so a form diffed against *live* state treats
|
|
72
|
-
* another client's change as this form's own: a host added to `allowedHosts` in a second tab was
|
|
73
|
-
* removed again by an unrelated save in the first. So a field travels only when this form changed
|
|
74
|
-
* it (`next` differs from `filled`), a replaced list goes through `mergeReplacedList` so concurrent
|
|
75
|
-
* additions survive, and anything already equal to `live` is dropped.
|
|
76
|
-
*
|
|
77
|
-
* `filled` absent means the block was never filled; the form then *is* its live view, and the
|
|
78
|
-
* diff is against `live` as before. Lists are compared and merged entry by value.
|
|
29
|
+
* A settings block's patch, against what the form was **filled** with, so another client's change is
|
|
30
|
+
* not sent back as this form's. `filled` absent: the diff is against `live`.
|
|
79
31
|
*/
|
|
80
32
|
export declare function patchSinceFilled(live: Patch, filled: Patch | undefined, next: Patch, nested?: readonly string[]): Patch;
|
|
81
|
-
/**
|
|
82
|
-
* Edits to one server entry.
|
|
83
|
-
*
|
|
84
|
-
* Comparing against the *effective* config (defaults already merged) means an
|
|
85
|
-
* untouched field is omitted from the patch, so an inherited default stays
|
|
86
|
-
* inherited instead of being frozen into `servers.config.json`.
|
|
87
|
-
*/
|
|
33
|
+
/** Against the effective config, so an inherited default stays inherited. */
|
|
88
34
|
export declare function diffServerConfig(current: ServerConfig, next: Patch): Patch;
|
|
89
35
|
export interface FieldChange {
|
|
90
36
|
path: string;
|
|
91
37
|
from: unknown;
|
|
92
38
|
to: unknown;
|
|
93
39
|
}
|
|
94
|
-
/** Flattens `{ a: { b: 1 } }` into `[{ path: 'a.b', value: 1 }]`. */
|
|
95
40
|
export declare function flattenLeaves(value: unknown, prefix?: string): Array<{
|
|
96
41
|
path: string;
|
|
97
42
|
value: unknown;
|
|
98
43
|
}>;
|
|
99
|
-
/**
|
|
100
|
-
* The pending patch as a readable list: what each changed leaf was, and what it
|
|
101
|
-
* is about to become. Values a snapshot does not have show as "unset".
|
|
102
|
-
*/
|
|
44
|
+
/** Each changed leaf, before and after; a leaf the snapshot lacks shows as unset. */
|
|
103
45
|
export declare function describeChanges(patch: Patch, current: Patch): FieldChange[];
|
|
104
|
-
/** Leaf count of a patch, for the "N fields changed" summary. */
|
|
105
46
|
export declare function countLeaves(patch: Patch): number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PortState, ServerStatus } from './contracts.js';
|
|
2
|
+
/**
|
|
3
|
+
* What a person reads in a server's port cell.
|
|
4
|
+
*
|
|
5
|
+
* The panel's `portState` only answers "does something accept on the port": an entry with no port
|
|
6
|
+
* reads `unknown` forever, and a running entry's own listener reads `in-use` — the same word a
|
|
7
|
+
* conflict uses. This splits those out so both UIs say the same thing.
|
|
8
|
+
*/
|
|
9
|
+
export type PortReading = 'none' | 'listening' | 'free' | 'in-use' | 'unknown';
|
|
10
|
+
/** Structural, so `noc-console`'s decoded rows fit without a cast. */
|
|
11
|
+
export interface PortSource {
|
|
12
|
+
status: ServerStatus;
|
|
13
|
+
portState: PortState;
|
|
14
|
+
config: {
|
|
15
|
+
port?: number | null;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare function portReading(server: PortSource): PortReading;
|
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* `responseMs` is rendered three times — the detail tile's number, the sparkline under it, and the
|
|
5
|
-
* list row's cell — and each restated its own thresholds: the number used `300`/`1000`, the
|
|
6
|
-
* sparkline had a second copy of the same two numbers in `probeColor()`, and the row called `1000`
|
|
7
|
-
* alone, in a different colour class. A latency of `1500` therefore read `danger` in the pane and
|
|
8
|
-
* `warn` in the row one click away, and a `500` reading was `warn` in the pane and plain in the row.
|
|
9
|
-
*
|
|
10
|
-
* The thresholds are a fixed decision by nature — `healthSchema` has no latency field for a person
|
|
11
|
-
* to set — so, like `hostCpuBand`, the band is a constant that one predicate owns and a surface
|
|
12
|
-
* paints. `cpu-scale.ts` is the same shape for a capacity.
|
|
13
|
-
*/
|
|
14
|
-
/** A probe slower than this is worth a warning; past `PROBE_DANGER_MS` it is an unhealthy entry. */
|
|
1
|
+
/** How a health probe's latency sits; fixed thresholds, since `healthSchema` has no latency field. */
|
|
2
|
+
/** Milliseconds. */
|
|
15
3
|
export declare const PROBE_WARN_MS = 300;
|
|
16
4
|
export declare const PROBE_DANGER_MS = 1000;
|
|
17
|
-
/**
|
|
18
|
-
* A reading is `unknown` when it does not exist — a stopped entry, or a probe that has not run.
|
|
19
|
-
*
|
|
20
|
-
* It is its own band rather than `ok`: the tile painted an absent reading `--ok` (`probeColor` read
|
|
21
|
-
* `responseMs ?? 0`), which is a healthy verdict for a number nobody measured.
|
|
22
|
-
*/
|
|
5
|
+
/** `unknown` is an absent reading (stopped, or not probed yet), never `ok`. */
|
|
23
6
|
export type ProbeBand = 'unknown' | 'ok' | 'warn' | 'danger';
|
|
24
|
-
/** The band a probe latency falls in. `null` is a reading that does not exist. */
|
|
25
7
|
export declare function probeBand(responseMs: number | null | undefined): ProbeBand;
|