Architecture¶
Runtime Layers¶
- Protocol Layer
- JSON-RPC envelope parsing/encoding
-
stable error contract behavior
-
Gateway Layer
- HTTP entrypoint
- request dispatch and error routing
-
graceful process shutdown path
-
Dispatcher Layer
- maps
method-> implementation - central compatibility and policy enforcement layer
-
cross-domain state orchestration
-
Domain Services
- runtime/tool runtime
- security/diagnostics
- browser/auth
- channels (telegram)
- memory
-
edge/advanced contracts
-
Runtime Profiles
- OS-hosted profile (
src/main.zig) with HTTP + JSON-RPC gateway and full feature surface - freestanding bare-metal profile (
src/baremetal_main.zig) with exported lifecycle hooks, command/mailbox ABI exports, descriptor/interrupt bootstrap exports, and Multiboot2 header for bootloader/hypervisor integration
Major Modules¶
src/protocol/envelope.zigsrc/gateway/http_server.zigsrc/gateway/dispatcher.zigsrc/gateway/registry.zigsrc/runtime/*src/security/*src/channels/telegram_runtime.zigsrc/bridge/*src/memory/store.zigsrc/baremetal/abi.zigsrc/baremetal/x86_bootstrap.zigsrc/baremetal_main.zig
State and Lifecycle¶
- process-global runtime instances are initialized on demand and reset on config changes
- bounded in-memory histories are retained for compat/edge job/event surfaces
- memory store persists history for recall and diagnostics
- auth and telegram state retain provider/account/session bindings
Browser Policy¶
- Browser contract handling is intentionally Lightpanda-only in Zig.
- Playwright/Puppeteer are rejected by policy at dispatcher level.