home-hosted 0.6.0 → 0.6.1

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/AGENTS.md CHANGED
@@ -85,6 +85,19 @@ exists, so the first release has to be published by hand.
85
85
  - `uis/<name>/` — each UI is a Vite app (Vue 3 + Tailwind v4) built through `uis/vite.shared.ts`;
86
86
  `stock` is the one shipped inside the package. Aliases: `@` → that UI's `src`, `@shared` →
87
87
  `src/shared`, `@server` → `src` (**types only** — never import runtime server code into a UI).
88
+ Its `public/ui.json` is the UI's identity: `name` and `version` (what Settings shows),
89
+ `repo`/`tag`/`asset` (which release carries it, for `ui-update`) and `unix` (when it was built).
90
+ `UiService` carries those fields into the installed `$HHOSTED_HOME/.ui/ui.json` unchanged and adds
91
+ `uploadedAt`/`files` of its own.
92
+ - **Bumping a UI ships a new asset, so its `ui.json` is part of the change.** Any commit that alters
93
+ a UI under `uis/<name>/` bumps that `ui.json`'s `version` and sets `unix` to the commit's own epoch
94
+ seconds: patch for a fix, minor for a feature, and **major only for a rewrite or a restyle**. The
95
+ number is what tells a person how big the change is — `ui-update` prints it and holds it against
96
+ the release it is offering. `tag` is what pairs an official UI with its panel, and it is **stamped
97
+ by `build-uis.mjs`**, not trusted from the source file: a UI zip is built before its release is cut,
98
+ so the committed value is always a release behind the asset it ends up inside. The release workflow
99
+ passes `HHOSTED_UI_TAG`; anywhere else the build stamps `v<package.json version>`. Do not hand-edit
100
+ `tag` to chase a release — a stale one makes `ui-update` re-install the same UI on every boot.
88
101
  - `bin/home-hosted.mjs` — the published bin: `dist/cli.js`, or `src/cli.ts` through tsx when the
89
102
  build is missing (a linked checkout).
90
103
  - `scripts/` — `build-uis.mjs` (build one UI, optionally zip it), `typecheck-uis.mjs`,
package/README.md CHANGED
@@ -251,7 +251,7 @@ can be told what to be: *"Help me build a UI for home-hosted: nostalgic game the
251
251
  | 🤖 **Token API** | Scripts and agents drive it with `Authorization: Bearer` — no browser, no session. [↑](#-agents-scripts-and-tools) |
252
252
  | 🔔 **Notifications** | Telegram on crash, unhealthy, forced restart, recovery and host thresholds — [setup here](./docs/NOTIFICATIONS.md). |
253
253
  | 💾 **Backups** | One click for config, secrets, TLS and your declared data directories — plain `.zip`, or AES-256 with a password, restored per path. |
254
- | 🎨 **BYOU — Bring Your Own UI** | Upload a static build, `home-hosted ui-revert` to go back. [UI_CREATION.md](./docs/UI_CREATION.md) |
254
+ | 🎨 **BYOU — Bring Your Own UI** | Upload a static build, `ui-update` to follow its releases, `ui-revert` to go back. [UI_CREATION.md](./docs/UI_CREATION.md) |
255
255
  | 🔐 **Security** | Cookie sessions, API tokens, scrypt hashes, per-IP lockout, optional TLS, and a refusal to expose itself without a password. |
256
256
  | 🧩 **No special treatment** | A server is `command` + `args` + `env` + `cwd`; nothing is built in for any particular app. |
257
257
  | 🖥 **Cross-platform** | Linux, macOS and Windows: `/proc`, `ps` or Win32_Process, process groups or `taskkill /T`, no shell dependencies. |
@@ -292,6 +292,7 @@ restarts itself), and how hand-edits are validated: [SERVERS.md](./docs/SERVERS.
292
292
  | `home-hosted migrate` | bring `servers.config.json` up to this release's schema (`--dry-run`, `--yes`) |
293
293
  | `home-hosted init` | scaffold a project that keeps `state/` and its data in the repo |
294
294
  | `home-hosted ui-switch` | install a UI from a release asset, a zip file or a URL (interactive) |
295
+ | `home-hosted ui-update` | bring an installed UI up to date, or pick a release (`--old`, `--check`) |
295
296
  | `home-hosted ui-revert` | go back to the stock panel UI after uploading your own |
296
297
 
297
298
  <details>
@@ -309,6 +310,7 @@ set-password --clear
309
310
  set-token --generate --clear
310
311
  migrate --config --dry-run -y/--yes
311
312
  ui-switch --repo --tag --asset --file --list --token -y/--yes
313
+ ui-update --check --tag --asset --old --repo --token -y/--yes
312
314
  ui-revert (no flags)
313
315
 
314
316
  every command --home <dir> --project <dir> (or $HHOSTED_HOME, $HHOSTED_PROJECT)
@@ -412,7 +414,9 @@ attaches both as `home-hosted-ui-<name>.zip`. Yours can be anything that compile
412
414
  the server never cares what built it.
413
415
 
414
416
  <sub>Install a UI from the CLI: `home-hosted ui-switch` — with no flags it fetches the official asset
415
- built for this release.</sub>
417
+ built for this release. An **official** UI keeps itself paired with the panel: upgrade the panel and
418
+ the next `up` re-installs the matching asset. Someone else's UI declares its own `repo`/`asset` in
419
+ `ui.json`, and `home-hosted ui-update` offers its newer releases to pick from — `--old` for older ones.</sub>
416
420
 
417
421
  <details>
418
422
  <summary><b>🤖 Or have an agent build the UI you actually want</b></summary>