ZEQ · SDKzeqstate.com

Skins and packages

Skins

A skin is a user interface the machine serves at /ui/NAME/: HTML, CSS and scripts that run in your browser and talk to this machine and nothing else. Every skin is served:

The key it holds is its only authority, and it lives in the page's memory.

SkinOpened byWhat it is
console--consolethe machine's console, on a key of its own handed through a one-time token
launcher--ui launcherthe machine's home page: every skin it serves and the applications born on it
studio--ui studioyour projects as repositories, edited in the browser; a deploy makes one a skin
starter--ui startera template to copy
hitevault--ui hitevaultfiles sealed into HITE v4 vaults and opened again in the browser

GET /ui lists the skins a machine serves. A carried skin is served only while its signed manifest.json verifies and each file still hashes to it.

How a skin gets its key. --ui NAME launches the machine and opens the skin with a one-time token in the address's fragment. The skin trades it at POST /handoff for a key of its own, and the fragment leaves the address bar at once. No key ever rides in a URL.

Make your own

  1. Copy the template. Copy plugins/starter and change it. Leave out its manifest.json: --pack writes and signs yours.
  2. Pack it with your own publisher seed (a 32-byte Ed25519 seed, mode 600, kept outside the folder):
python3 zeq.py --pack my-skin/ --name my-skin --kind skin --version 1.0.0 --scope read \
               --entry index.html --summary "my skin" --seed-file my.seed
  1. Install it on the machine. Naming the publisher with --trust is the owner's consent:
python3 zeq.py --install my-skin-1.0.0.zeqpkg --trust ZEQ7…    # the publisher ZID --pack printed
python3 zeq.py --ui my-skin

Installing checks the signature, every file's hash, every path and the publisher before it writes a byte. The package receives its own key with the scope it asked for. A skin asks for write at most; ask for read when that is enough. --packages lists what is installed, and --remove NAME deletes it and revokes its key.

Inside the page, call the machine with fetch(path, {headers: {Authorization: 'Bearer ' + key}}). Scripts load from the skin's own files only: the policy allows no inline script and no outside address.

Other packages

A package can also be: