feat(host): add typed host capability boundary

Introduce hemx-host with typed capability manifests, calls, events, host-check failures, reusable browser/PWA and native-shell profiles, and a tiny optional browser adapter for haptics/share that returns host events without DOM mutation.

req: host/001

req: host/002

req: host/003

req: host/004

req: host/005
This commit is contained in:
slhx agent
2026-06-11 19:35:20 +02:00
parent 736f9f3c7e
commit 2cc6c85e37
9 changed files with 769 additions and 1 deletions
+19
View File
@@ -484,6 +484,25 @@ what a valid business email is.
---
## host
### req: host/001
001 Host capabilities are declared as typed capability uses with one of four shapes: fire, request, stream, or schedule. This contract covers browser, PWA, WebView, and native-shell hosts without adding a second UI runtime.
### req: host/002
002 Host adapters may produce host events or perform explicit host side effects, but they must not mutate DOM, own application/domain state, append domain events, bypass generated hemx effects, or introduce a client app-state framework.
### req: host/003
003 Permission-sensitive host capabilities require an explicit user-facing reason in the app-owned manifest before standard host checks may pass.
### req: host/004
004 Host checks report concrete failures for undeclared capability use, unsupported host capability shape, and missing permission reasons before a host adapter executes the capability call.
### req: host/005
005 Host results return to app code as facts. App/domain code decides whether they become commands, events, persistence, or UI effects; hemx UI updates still happen through normal EffectBatch output.
---
## auth
### req: auth/001