56 lines
1.2 KiB
Markdown
56 lines
1.2 KiB
Markdown
# BeeOS Phase 4 Notes
|
|
|
|
## Completed in this phase
|
|
|
|
Phase 4 adds the first BeeOS Runtime API.
|
|
|
|
New core file:
|
|
|
|
```text
|
|
beeos/core/runtime_api.py
|
|
```
|
|
|
|
## New runtime concepts
|
|
|
|
- `BeeRuntime`
|
|
- `BeeRuntimeContext`
|
|
- `BeeDisplayAPI`
|
|
- `BeeStorageAPI`
|
|
- `RuntimeResult`
|
|
|
|
## Runtime API currently supports
|
|
|
|
- app lifecycle simulation
|
|
- `BeeApp(ctx).on_open()`
|
|
- `BeeApp(ctx).on_draw(display)`
|
|
- `main(ctx)` fallback
|
|
- script execution through `main(ctx)` or `run(ctx)`
|
|
- display command capture
|
|
- notifications through `ctx.notify(title, body)`
|
|
- package-local JSON storage
|
|
- permission checks through `ctx.has_permission(name)`
|
|
- simple system APIs:
|
|
- battery percent
|
|
- uptime
|
|
- RAM usage
|
|
- PSRAM usage
|
|
- storage usage
|
|
- CPU usage
|
|
|
|
## Not real sandboxing yet
|
|
|
|
This is a simulator runtime. It is not a security sandbox.
|
|
|
|
Actual watch firmware will need much stricter execution boundaries, especially for filesystem access, networking, Bluetooth, sensors, background services, plugin hooks, and permissions.
|
|
|
|
## Next possible phase
|
|
|
|
Phase 5 should probably add:
|
|
|
|
- app lifecycle sessions
|
|
- touch event delivery to apps
|
|
- package settings pages
|
|
- watch face runtime
|
|
- plugin hook registry
|
|
- basic permission approval screens
|