Skip to content

Architecture

Runtime Layers

  1. Protocol Layer
  2. JSON-RPC envelope parsing/encoding
  3. stable error contract behavior

  4. Gateway Layer

  5. HTTP entrypoint
  6. request dispatch and error routing
  7. graceful process shutdown path

  8. Dispatcher Layer

  9. maps method -> implementation
  10. central compatibility and policy enforcement layer
  11. cross-domain state orchestration

  12. Domain Services

  13. runtime/tool runtime
  14. security/diagnostics
  15. browser/auth
  16. channels (telegram)
  17. memory
  18. edge/advanced contracts

  19. Runtime Profiles

  20. OS-hosted profile (src/main.zig) with HTTP + JSON-RPC gateway and full feature surface
  21. 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.zig
  • src/gateway/http_server.zig
  • src/gateway/dispatcher.zig
  • src/gateway/registry.zig
  • src/runtime/*
  • src/security/*
  • src/channels/telegram_runtime.zig
  • src/bridge/*
  • src/memory/store.zig
  • src/baremetal/abi.zig
  • src/baremetal/x86_bootstrap.zig
  • src/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.