AI-spel static assets
This repository publishes Piper/ONNX runtime assets, Swedish voice models, and the browser's local Gemma 3/Wllama package through a dedicated Nginx service. The game keeps the same origin: ingress routes /static/ here, / to the frontend, and /api to Rust.
The service contains only public, version-pinned files. Gitea Actions on the existing large runner downloads and verifies model files, runs checks, builds a linux/amd64 image, bumps the patch version, and publishes the image, Helm chart, and rendered manifest to Harbor. Argo CD tracks the latest chart in the existing ai-spel project and namespace.
Asset URLs and caching
Assets under /static/piper-wasm-v1/ are served with Cache-Control: public, max-age=31536000, immutable. Keep this path and its contents stable. To change assets, publish under a new asset path and update the frontend to reference it after the new static release is healthy.
/static/piper-wasm-v1/voices/— Alma, Lisa, and NST Swedish voices, plus attribution./static/piper-wasm-v1/onnx/— ONNX Runtime WASM and ES module loader./static/piper-wasm-v1/piper/— Piper phonemizer WASM and data./static/wllama-gemma3-v1/— local AI client adapter, integrity-pinned Wllama WebAssembly runtime, Gemma 3 1B Q4_K_M (806 MB), static manifest, and YAML assistance prompt. The client downloads these only from this server and caches the model on-device.- Gemma distribution must also include the applicable Gemma Terms of Use copy, required notice, prohibited-use policy reference, source/conversion provenance, and all runtime/model license notices. The frontend must obtain explicit acceptance before download or use. Do not release the Gemma files until those resources and the client acceptance gate are implemented and checked by CI.
/static/version.txt— active deployment version, without long-lived caching./static/version.json— active deployment version as{"version":"<semver>"}, generated from the sameVERSIONvalue used by the image and Helm chart and checked after deployment.
The frontend's small orchestration code remains part of the frontend; it fetches every model, runtime, WebAssembly file, and browser prompt from same-origin static URLs. Upstream sources are used only by the pinned static CI fetcher. The browser does not request runtime assets from external hosts.
Argo CD bootstrap
After the first chart has been published, bootstrap the app once from deploy/argocd/application.yaml:
kubectl -n argocd apply -f deploy/argocd/application.yaml
It tracks the newest chart (*), uses automated sync/self-heal without pruning, and deploys to ai-spel. Later releases do not need manual Argo actions.
Local policy
Do not build or run locally. CI runs static checks, tests, image build, and Helm lint/render on the existing runner; runtime verification happens on Kubernetes.