feat(studio): Welcome page Phase B — embedded doc reader (v0.38.0)
Second slice of the Welcome surface. Operator-facing
documentation now lives inside Studio as bundled assets and
renders inline via a modal sheet — no browser, no external
link, air-gap-tauglich.
- Four operator-readable explainers under `assets/docs/`,
each with an EN + DE pair:
architecture[_de].md — Hub / Module / Flow + how they fit
security[_de].md — sandbox model, declared perms,
operator ceiling
audit[_de].md — hash-chained log, WORM-1 mechanics,
`fai admin verify-events`
flows[_de].md — flow YAML, templating reference,
extract→summarize example
These are short (≈ 300-500 words each), operator-shaped
prose. Not copies of the architecture docs in
fai_platform/docs/architecture/ — those are
contributor-dense.
- pubspec.yaml declares `assets/docs/` so the markdown ships
inside the Studio binary. Air-gap deployments read them
with no network access.
- New `_DocReaderSheet` modal: 85 %-of-viewport bottom sheet,
drag handle + title bar with the doc icon and close button,
scrollable Markdown body styled to match Studio chrome.
Loads `assets/docs/<slug>_<locale>.md` first, falls back to
the EN file. Locale comes from
`Localizations.localeOf(context)`.
- `_DocsRow` on the Welcome page sits below the trust-posture
deck. Two-column grid on ≥ 640 dp, single column below.
Each card is icon + title + one-line blurb + chevron;
click opens the reader sheet for that slug.
- 12 new ARB keys for the docs section (header, blurb, four
card titles + blurbs, close button, error message).
- 4 new icons reused: `account_tree_outlined` (architecture),
`shield_outlined` (security), `verified_outlined` (audit),
`alt_route_outlined` (flows).
Implements Phase B of `docs/landing-page-design.md`. Phase C
(live getting-started checklist with persistent state) is the
last remaining slice.
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
3a7d0e74ad
commit
3b07d340d5
16 changed files with 1051 additions and 3 deletions
68
assets/docs/security_de.md
Normal file
68
assets/docs/security_de.md
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# Sandbox-Modell
|
||||
|
||||
Jedes F∆I-Modul läuft in einer WebAssembly-Sandbox ohne
|
||||
ambienten Hostzugriff. Das Modul kann genau das, was es in
|
||||
seiner `module.yaml` deklariert — und sonst nichts.
|
||||
|
||||
## Was ein Modul deklariert
|
||||
|
||||
```yaml
|
||||
permissions:
|
||||
- net: api.openai.com # nur ausgehendes HTTPS
|
||||
- net: 127.0.0.1:11434 # lokales Ollama
|
||||
- fs.read: /var/lib/fai/in # nur-lese-Verzeichnis
|
||||
- fs.write: /var/lib/fai/out # schreibbares Verzeichnis
|
||||
- env: OPENAI_API_KEY # eine bestimmte Umgebungsvariable
|
||||
- hub: invoke # andere Module aufrufen
|
||||
```
|
||||
|
||||
Was nicht auf der Liste steht, ist zur Laufzeit unmöglich. Ein
|
||||
Modul, das `net:` vergisst, kann das Netzwerk gar nicht
|
||||
erreichen. Der `WasiCtxBuilder` des Hubs verdrahtet nur die
|
||||
deklarierten Preopens und Env-Vars — keine Hintertür.
|
||||
|
||||
## Was der Operator kontrolliert
|
||||
|
||||
Operatoren setzen ihre eigene Obergrenze in
|
||||
`~/.fai/config.yaml`:
|
||||
|
||||
```yaml
|
||||
security:
|
||||
module_allowlist: # nur diese Module laden
|
||||
- "text.*"
|
||||
module_denylist: # diese nie laden
|
||||
- "experimental.*"
|
||||
max_permissions: # Cap je Scope
|
||||
net: ["api.openai.com"]
|
||||
fs.read: ["/var/lib/fai"]
|
||||
require_signatures: true # unsignierte Bundles ablehnen
|
||||
require_sbom: true # Bundles ohne CycloneDX ablehnen
|
||||
```
|
||||
|
||||
Module, deren Berechtigungen die Operator-Obergrenze
|
||||
überschreiten, scheitern beim Laden mit explizitem Fehler. Die
|
||||
Operator-Obergrenze ist die zweite Schleuse; die Modul-eigene
|
||||
Deklaration ist die erste.
|
||||
|
||||
## Was du in dieser App siehst
|
||||
|
||||
- Das **Store**-Detail-Sheet eines installierten Moduls zeigt
|
||||
die Berechtigungsliste mit Icons (`net:` Globus, `fs.read:`
|
||||
Ordner, `fs.write:` Stift, `env:` Terminal).
|
||||
- Die **Diagnose**-Seite zeigt Modul-Anzahl und Capability-
|
||||
Anzahl im Summary.
|
||||
- Ein **Flow-Lauf**, der eine Berechtigung verletzt, schlägt
|
||||
mit benanntem Fehler fehl (`PermissionDenied:
|
||||
net:example.com`) — sichtbar im Protokoll.
|
||||
|
||||
## Was es nicht gibt
|
||||
|
||||
- Keine Prozess-Isolation zwischen Modulen. Alle laufen im
|
||||
einen Hub-Prozess. Ein WASM-Trap eskaliert zum
|
||||
Flow-Schritt-Fehler, nicht zum Hub-Crash, aber
|
||||
Speicher-Überlastung in einem Modul kann die anderen
|
||||
beeinträchtigen. Pooled-Instance-Modus ist auf der Roadmap.
|
||||
- Keine Live-Policy-Backend (OPA-artige Laufzeit-
|
||||
Entscheidungen). Berechtigungslisten sind statisch zur
|
||||
Modul-Ladezeit. Kunden-getrieben; aufgeschoben bis ein
|
||||
echter Einsatz es braucht.
|
||||
Loading…
Add table
Add a link
Reference in a new issue