# QuantaPrism Code: open-source parts and licences

Everything below runs inside the learner's browser. All parts are open source; versions are
pinned and the files are kept in `vendor/` (no CDN). Each file is far below GitHub's 90 MB limit
(the biggest is `vendor/yaegi/yaegi.wasm`, 12.3 MB).

## Runtimes and libraries

| Part | Version | Licence | Where it came from | Files in `vendor/` |
|---|---|---|---|---|
| Pyodide (Python 3 in WebAssembly), core only | 0.29.5 | MPL-2.0 (Python itself: PSF licence; see `LICENSE`) | npm `pyodide@0.29.5` | `pyodide-0.29.5/` |
| v86 x86 emulator | 0.5.473 | BSD-2-Clause | npm `v86@0.5.473` | `v86-0.5.473/libv86.mjs`, `v86.wasm`, `LICENSE` |
| SeaBIOS + VGA BIOS (built by the v86 project) | v86 commit cc37f35c43bf | LGPL-3.0 (`COPYING.LESSER-bios`) | github.com/copy/v86/tree/cc37f35c43bf14865d74ad76879ecf9410f69eb1/bios | `v86-0.5.473/seabios.bin`, `vgabios.bin` |
| xterm.js terminal | 6.0.0 | MIT | npm `@xterm/xterm@6.0.0` | `xterm-6.0.0/` |
| CodeMirror 6 editor (bundle of the packages below) | see table below | MIT | npm, bundled with esbuild 0.25.9 (`tools/codemirror/`) | `codemirror/cm6.js`, `LICENSE` |
| Yaegi Go interpreter, built to WebAssembly | v0.16.1 | Apache-2.0 (`LICENSE-yaegi`) | Go module `github.com/traefik/yaegi@v0.16.1`, built with go1.26.8 (`tools/yaegi-wasm/`) | `yaegi/yaegi.wasm` |
| Go runtime in yaegi.wasm + `wasm_exec.js` | go1.26.8 | BSD-3-Clause (`LICENSE-go`) | Go toolchain | `yaegi/wasm_exec.js` |
| Noto Sans SemiBold (Latin) | from KidsLibrary | SIL OFL 1.1 (`fonts/OFL.txt`) | KidsLibrary/internal/library/web/fonts | `fonts/` |

The spoken narration (`audio/narration-en/*.mp3`, `data/narration-en.json`: the lesson texts read
aloud, speaker buttons and "Read to me") is ours: our own lesson texts spoken by Kokoro-82M
(Apache-2.0, https://huggingface.co/hexgrad/Kokoro-82M) running on our own server, 2026-11-17;
voices af_heart, af_bella, bf_emma, am_puck, am_fenrir, af_sarah. The model is not shipped, only
the recordings. Made by `tools/build_narration.py`. `js/narration.js` is ours (the same as the AI Lab's).

`tools/yaegi-wasm/minstd/` holds a copy of 22 of Yaegi's generated standard-library symbol files
(Apache-2.0, unchanged) so the WebAssembly file only carries the packages learners need
(fmt, strings, strconv, math, sort, time, slices, maps, os, ...): 12 MB instead of 40 MB.

### CodeMirror packages in `cm6.js` (all MIT)

@codemirror/autocomplete 6.20.4, commands 6.11.1, lang-cpp 6.0.3, lang-css 6.3.1, lang-go 6.0.1,
lang-html 6.4.12, lang-javascript 6.2.5, lang-python 6.2.1, language 6.13.1, legacy-modes 6.5.5,
lint 6.9.8, search 6.7.2, state 6.7.6, view 6.43.15; @lezer/common 1.5.5, cpp 1.1.6, css 1.3.9,
go 1.0.1, highlight 1.2.5, html 1.3.13, javascript 1.5.6, lr 1.4.12, python 1.1.19;
@marijn/find-cluster-break 1.0.4, crelt 1.0.7, style-mod 4.1.4, w3c-keyname 2.2.8
(exact list with npm integrity hashes: `tools/codemirror/lock.json`).

## Tiny Linux (the in-browser Linux)

Built by `tools/tinylinux/build.sh` in an i386 Alpine Linux 3.22 container from Alpine's own
binary packages (exact versions: `vendor/tinylinux/packages.txt`):

| Package | Version | Licence |
|---|---|---|
| linux-virt (the kernel, `bzImage`) | 6.12.117-r0 | GPL-2.0-only |
| busybox-static (shell and commands) | 1.37.0-r20 | GPL-2.0-only |
| tcc, tcc-libs, tcc-libs-static, tcc-dev (C compiler) | 0.9.27_git20250106-r0 | LGPL-2.1-or-later |
| musl, musl-dev (C library and headers) | 1.2.5-r13 | MIT |
| cmatrix | 2.0-r2 | GPL-3.0-or-later |
| sl | 5.02-r1 | MIT (Toyoda's licence) |
| figlet | 2.2.5-r3 | BSD-3-Clause |
| fortune | 0.1-r5 | BSD-3-Clause |
| libncursesw, ncurses-terminfo-base | 6.5_p20250503-r0 | X11 (MIT style) |
| libbsd 0.12.2-r0, libmd 1.1.0-r0 | | BSD-3-Clause / BSD-2-Clause / ISC / public domain |
| pkgconf (pulled in by musl-dev) | 2.4.3-r0 | ISC |

QuantaPrism's own parts: `hello.ko` (source `tools/tinylinux/hello/hello.c`,
GPL because kernel modules must be), the small `cowsay` shell script, `help-me`, `/init`,
`/etc/profile`, `motd`, `animals.txt`.

## Source code (GPL / LGPL / MPL)

**Written offer.** The Tiny Linux in this site contains free software under the GNU GPL and
LGPL. The exact source code is at https://source.quantaprism.com/ (on the local network:
http://192.168.0.7:30104/); you may also ask us at quantaprism.network@gmail.com for a copy,
for at least three years.

The site's "Source code" links (footer, home page) choose the address in one place:
`SOURCE_PUBLIC_URL` in `js/util.js` (opened from this computer or the local network, they go to
port 30104 of the same machine). If the public address changes, change it there and here.

What the source page holds (fetched by `tools/tinylinux/fetch-sources.sh` into
`/disk2/work/tinylinux-source/`, about 160 MB, kept out of git; served by the `source-site`
deployment in `golive/learnsites/`, NodePort 30104):

| Folder | Covers | Licence | What is in it |
|---|---|---|---|
| `linux-lts-6.12.117-r0` | linux-virt (bzImage), linux-virt-dev (to build hello.ko) | GPL-2.0-only | Alpine aports `main/linux-lts` at commit e30fb966aa1d (APKBUILD, patches, `virt.x86.config`), `linux-6.12.tar.xz` + `patch-6.12.117.patch.xz` from kernel.org |
| `busybox-1.37.0-r20` | busybox-static | GPL-2.0-only | aports `main/busybox` at 2e97d754a30d (APKBUILD, 41 patches, `busyboxconfig`), `busybox-1.37.0.tar.bz2` |
| `tcc-0.9.27_git20250106-r0` | tcc, tcc-libs, tcc-libs-static, tcc-dev | LGPL-2.1-or-later | aports `community/tcc` at 0f89d47b17bb, tinycc snapshot f6385c05308f |
| `cmatrix-2.0-r2` | cmatrix | GPL-3.0-or-later | aports `community/cmatrix` at dcf926d126ee, `cmatrix-2.0.tar.gz` |
| `seabios-1.16.2` | `vendor/v86-0.5.473/seabios.bin`, `vgabios.bin` | LGPL-3.0-or-later | `seabios-1.16.2.tar.gz` (tag rel-1.16.2) + v86's `fetch-and-build-seabios.sh`, `seabios.config` at v86 commit cc37f35c43bf |
| `pyodide-0.29.5` | `vendor/pyodide-0.29.5/` | MPL-2.0 | release tag archive from GitHub |
| `quantaprism-tinylinux-<git>` | our build | GPL-2.0-only (hello.c) | `build.sh`, `build-in-container.sh`, `hello/`, `rootfs/`, `packages.txt`, sha256 of the shipped bzImage and initrd.gz |

The aports commit of each package is the one that built the binary package (field `c:` of
Alpine 3.22's x86 APKINDEX, kept in `alpine-3.22-x86-apkindex/`), and every upstream file is
checked against the sha512sums in its APKBUILD. musl, ncurses, libbsd, libmd, pkgconf, sl,
figlet and fortune (and utmps/skalibs, linked into busybox.static) are MIT/BSD/ISC style: no
source offer needed. The other runtimes (v86 BSD-2-Clause, xterm.js and CodeMirror MIT, Yaegi
Apache-2.0, Go BSD-3-Clause, Noto Sans OFL-1.1) are not copyleft for this use.

## Pictures

`art/*.webp` are round crops (`tools/make-mascots.py`) of our own Kids Book characters (Ellie,
Tara, Moku, Bina, Robo) from `DemoBotAcadTutorial/kidsbook/library`, made by QuantaPrism with
CinefyAI's own tools. Animals and mascots only.

## sha256 of every vendored file

```
82b32ae24e54400294a63099db1f8d7ab73207a9b6818be4da644440f465d2c4  vendor/codemirror/cm6.js
05c6130cda97e7600ca91427a41e8a065efcf82365fc0293e7de80faec494c07  vendor/codemirror/LICENSE
1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5  vendor/pyodide-0.29.5/LICENSE
356c42f69e1695397e9d8670bd3c2e678248cde76e18bdae1731e848537b47d7  vendor/pyodide-0.29.5/pyodide.asm.js
54309a5a2cfd757b1f0fdbc9093c92503f7b341500110329d932487183912718  vendor/pyodide-0.29.5/pyodide.asm.wasm
7f832a350240263d9946a9c3c877f7bcdab6c37d6dc65f72cd3be5905dca62dd  vendor/pyodide-0.29.5/pyodide.js
14d2c2dba101277999e17135e653d8f15389ad1437f53eae213bf0c3cdff723d  vendor/pyodide-0.29.5/pyodide-lock.json
831fd1e535084b972f87c6a35275de3d236efd5166f5e77ce89497710635e73c  vendor/pyodide-0.29.5/python_stdlib.zip
1804ff841d0496d58090ce7294590561cd04c87d064f3baaba5fb4edb4a0732a  vendor/tinylinux/bzImage
e57922be0bca8a621e6695248e6bc339d096f6efd7af7c3ae64a438105d573cc  vendor/tinylinux/initrd.gz
a853c2ffec17057872340eee242ae4d96cbf2b520ae27d903e1b2fef1a5f9d1c  vendor/v86-0.5.473/COPYING.LESSER-bios
f9f3b4cae7dafb882e10e51aae9137ec52d5aed5ffbc9026f9081c73bbaae4c8  vendor/v86-0.5.473/libv86.mjs
3f61ba65e3215b09ef264ba8d777d73c19644309fbb705967634eb5147e500a0  vendor/v86-0.5.473/LICENSE
73e3f359102e3a9982c35fce98eb7cd08f18303ac7f1ba6ebfbe6cdc1c244d98  vendor/v86-0.5.473/seabios.bin
2f0c4150f266415b754a84a32e6f8e4c975a1d3abb94c78b047fa30027db1ef1  vendor/v86-0.5.473/v86.wasm
a4bc0d80cc3ca028c73dafa8fee396b8d054ce87ebd8abfbd31b06b437607880  vendor/v86-0.5.473/vgabios.bin
b569f629d00f2626a8100df2a1798210535621e42164dfd426a6fe5aac7b0ccd  vendor/xterm-6.0.0/LICENSE
854a7c0fb70e8b1a083c16797ab827299fb18744f5ad34f227b48337e33293c6  vendor/xterm-6.0.0/xterm.css
14903579ff54664cd72f8e8699e6961a6272c21863ec1c3b118cdc8af5d4a972  vendor/xterm-6.0.0/xterm.js
911f8f5782931320f5b8d1160a76365b83aea6447ee6c04fa6d5591467db9dad  vendor/yaegi/LICENSE-go
9aaa5d967b90e8e460c31214618517a1fb49810fbc79ebc78df0c7c81259aff6  vendor/yaegi/LICENSE-yaegi
0c949f4996f9a89698e4b5c586de32249c3b69b7baadb64d220073cc04acba14  vendor/yaegi/wasm_exec.js
021c5bb9d99ca37582178a08a0bd245ade9a3915b8c8f826e90057fce4a65e32  vendor/yaegi/yaegi.wasm
```

Check with `cd CodeSite && sha256sum -c` on the lines above. Rebuilding Tiny Linux or Yaegi
changes their hashes (Alpine updates its packages): update this table after a rebuild.
