Zenith AutoOS — SDK Aberto & Guia de Plugins Isolados (Fase 102)
O Zenith AutoOS permite instalar novos temas visuais, widgets 3D Godot (.pck) e scripts de automação IoT via pendrive USB sem comprometer os sistemas críticos de segurança (CAN Bus, freios, motor, ECU Flasher ou ESP32).
🏠 README · 📚 Documentação · ⬅️ 36 · Relatório 120–151 · 38 · Godot ADAS ➡️
📑 Neste guia — 3 seções · ~3 min de leitura
🗺️ Visão geral em diagrama
flowchart LR
USB["Pendrive USB<br/>/zenith_plugins"] --> MANIFEST["plugin.json"]
MANIFEST --> VALIDATE["Validação de manifesto"]
VALIDATE --> PERM{"Permissão<br/>crítica?"}
PERM -->|sim| BLOCK["Bloqueado<br/>CAN · freio · motor"]
PERM -->|não| SANDBOX["Sandbox LXC/chroot<br/>UID nobody · rlimits"]
SANDBOX --> THEME["theme_pack"]
SANDBOX --> PCK["godot_pck"]
SANDBOX --> IOT["iot_script"]
style USB fill:#64748B,color:#fff,stroke:#CBD5E1
style BLOCK fill:#B91C1C,color:#fff,stroke:#FCA5A5
style SANDBOX fill:#0A5C36,color:#fff,stroke:#C8A951Como ler: o diagrama resume o fluxo principal deste guia; os detalhes, pinagens, endpoints e trechos de código aparecem nas seções abaixo.
1. Estrutura de um Plugin no Pendrive USB
Coloque sua pasta dentro de /zenith_plugins/<seu_plugin>/ na raiz do pendrive:
text
/zenith_plugins/meu_tema_cyber/
├── plugin.json
└── tema.json # (ou painel_extra.pck / automacao.py)Exemplo de plugin.json
json
{
"id": "meu_tema_cyber",
"name": "Meu Tema Cyberpunk",
"version": "1.0.0",
"kind": "theme_pack",
"entry": "tema.json",
"author": "Comunidade",
"permissions": ["theme_pack", "read_telemetry"]
}Tipos (kind) Suportados
theme_pack: arquivo JSON de tema visual compatível com Fase 94 (instalado em/data/themes/).godot_pck: pacote Godot Engine 4 carregado viaProjectSettings.load_resource_pack(path, false)comreplace_files = false(impede sobrescrita deZenithMaster.gd,Radar3D.gdou telas críticas).iot_script: script Python executado em jaula isolada (LXCouchroot+ UID65534nobody+ limitesRLIMIT_CPU/RLIMIT_AS/RLIMIT_NOFILE).
2. Permissões Permitidas vs. Bloqueadas pelo Sandbox
| Permissão | Status | Motivo |
|---|---|---|
theme_pack, dashboard_widget, iot_automation, read_telemetry |
Permitida | Opera em modo leitura ou camada visual/IoT isolada |
can_control, brake_control, engine_control, esp32_raw, ecu_flash, root_exec, raw_serial |
Bloqueada | Rejeitada automaticamente por zenith_plugin_sandbox.py e ZenithPluginLoader.gd |
⬅️ 36 · Relatório 120–151 · ⬆️ Topo · 📚 Índice · 38 · Godot ADAS ➡️
Zenith AutoOS 11.0 · Documentação técnica · Novembro de 2026 · README principal