implements PLN-0132

This commit is contained in:
2026-07-03 17:23:49 +01:00
parent 46b2fae514
commit f49accc796
5 changed files with 79 additions and 2 deletions
@@ -39,6 +39,10 @@ The VM does not own the machine lifecycle. Firmware does.
`Hub`, `Task(TaskId)`, and `Overlay`.
- **Shell task window**: a `WindowManager` window whose owner is
`WindowOwner::Task(TaskId)`.
- **Games root**: a host-provided local directory used by Hub/Home to discover
Game directory cartridges.
- **Library entry**: an internal catalog record retained by Hub/SystemOS for a
discovered cartridge.
## 3 POS Responsibilities
@@ -65,9 +69,20 @@ PrometeuHub is responsible for:
- reading cartridge metadata needed for launch decisions;
- deciding launch behavior based on `AppMode`;
- managing the system window surface for system-mode apps.
- presenting the host-provided local games library when `--games-root <dir>` is
configured;
- emitting system-owned launch actions for selected Home entries.
The Hub does not execute bytecode directly. It always delegates execution setup to POS.
For v1, the local games library is Game-only. Hub/Home must not expose Shell or
System cartridges from the games root. The internal library entry must retain
the loaded manifest data, `title`, `app_id`, `app_version`, the cartridge path,
and discovery metadata such as a timestamp or equivalent discovery marker.
The Home UI may display only `title`, `app_id`, and `app_version`. Path and
operational metadata may remain internal.
## 5 App Modes
### Game
@@ -154,6 +169,16 @@ If VM initialization fails, firmware transitions to the crash path.
POS selects the cartridge and its execution context, but the cartridge's initial callable is not chosen by firmware metadata. Execution starts from the cartridge boot protocol defined in [`13-cartridge.md`](13-cartridge.md), currently `func_id = 0`.
When Home launches a discovered Game entry, the request is a system-owned action
from PrometeuHub to POS/firmware. Firmware must load the selected cartridge
through the normal cartridge loader and transition to `LoadCartridge` on
success. This path must not use a guest syscall and must not reintroduce
userland `run_cart`.
If the selected cartridge cannot be loaded, firmware must leave or return the
machine in the Hub/Home flow and record the failure through diagnostics or
logging. A polished Home error surface is not required by v1.
## 8 Firmware States
The current firmware state model includes: