1. Why Streamlit Requires a Bootstrap Wrapper for Native Compilation
Streamlit normally launches via streamlit run dashboard.py, which expects a raw .py script path on disk. By separating the thin Tornado entrypoint from your imported core_rag/ and prompts/ packages, you can compile your entire proprietary AI logic into ChaCha20 vaults + stripped C extensions while keeping Streamlit's UI renderer intact:
# run_app.py
from streamlit.web import cli as stcli
import sys
if __name__ == "__main__":
sys.argv = ["streamlit", "run", "ui_entry.py", "--server.headless=true", "--global.developmentMode=false"]
sys.exit(stcli.main())
2. Seal Prompts & Pipelines + Bind On-Prem Trials to Hardware
pip install -U pykevlar pykevlar audit . pykevlar build run_app.py --protect core_rag,prompts --mix-str --enable-bcc --anti-llm --outer -F -O dist # Issue a 14-day enterprise evaluation key locked to the client's server: pykevlar key -O poc_key -b spa-dev-8812fe09a41c7721 -e +14d