Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/cloudflare-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
- name: Play every PSYCHO SYBER stage to its exit
# A scripted run per stage (psycho-syber/test/scripts.mjs) and a check that the 21 Atlas marks match src/lacuna/atlas/sites.js.
run: node psycho-syber/test/run.mjs
- name: "Check PSYCHO SYBER: ARENA's invite codes, page and scripts"
# The duel's invite and reply pack and read back, the page holds every element the script looks up, and the
# page's rules hold (no form, one STUN server and no other address). CLAUDE.md, "PSYCHO SYBER: ARENA".
run: node psycho-syber/test/arena.mjs
- name: Refresh dependency panel targets
run: |
node scripts/githits-snapshot.mjs --targets || echo "githits: keeping committed targets.json"
Expand Down Expand Up @@ -185,6 +189,16 @@ jobs:
grep -Fq 'href="/psycho-syber/"' dist/index.html
grep -Fq 'href="/lacuna/#paracas"' dist/psycho-syber/index.html
if grep -rqi '<form' dist/psycho-syber --include='*.html'; then echo 'form on the game page'; exit 1; fi
# PSYCHO SYBER: ARENA (/psycho-syber/arena/): the page, its scripts, the three.js it serves itself, and the links
# to it from the game page and to its "What is sent" from /privacy/. Its links carry the hashes stamp.mjs adds.
test -s dist/psycho-syber/arena/index.html
test -s dist/psycho-syber/arena/game.js
test -s dist/psycho-syber/arena/link.js
test -s dist/psycho-syber/arena/vendor/three.min.js
test -s dist/psycho-syber/arena/vendor/three.LICENSE.txt
grep -Fq 'href="/psycho-syber/arena/"' dist/psycho-syber/index.html
grep -Fq 'href="/psycho-syber/arena/#sent"' dist/privacy/index.html
grep -Eq 'src="/psycho-syber/arena/game\.js\?v=[0-9a-f]{8}"' dist/psycho-syber/arena/index.html
test -s dist/privacy/index.html
test -s dist/plus/index.html
test -s dist/plus/plus.css
Expand Down
51 changes: 51 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,57 @@ the game's link in the homepage's first screen and one note in its Studio part l
Music and effects are synthesised in the browser. Progress, the Atlas marks found, the story pace, the command ship's gift and the best share in THE ANOMALOUS SYSTEM are `localStorage` keys that
begin `psycho-syber.`. `psycho-syber/test/` and `psycho-syber/README.md` are not published.

## PSYCHO SYBER: ARENA

Since November 19, 2026 the site carries a second game at `/psycho-syber/arena/` (`psycho-syber/arena/`): a
first-person arena in 3D with the same two forms, Psycho and Syber, changed with Q. It has two modes: Waves, for one
player, and the Duel, for two players in two browsers. The owner chose its name, its place under `/psycho-syber/`
and its two modes on that day. "The game" on the game's page links to it. The header, the Menu, the homepage and
that game's title do not: one more button on the title pushes its words off a phone's screen.

- It is a separate game. PSYCHO SYBER's rules about stages, scripted runs, the Atlas marks, music and the narrator do
not apply to it. What the two share: invented names only, Wording for the page's copy, plain lines inside the game,
the banned word, no form, and no script, stylesheet or font from another origin.
- The forms are Psycho and Syber and the merged form is Psycho Syber. Use no other spelling of the game's name or of
a form's name anywhere in `psycho-syber/arena/`: `node psycho-syber/test/arena.mjs` runs CI's name guard on it.
- An earlier build, made outside this repository, had a story mode and a codex of research theses. The owner left
both off the site: its copy states facts a reader can check. Do not add either without the owner's direction.
- The files are `index.html`, `arena.css`, `game.js` (one classic script), `link.js` (the duel's invite and reply
codes; no DOM) and `vendor/three.min.js`, which is three.js r160 as npm publishes it, with its licence beside it.
The test checks the library's hash: replace the file whole or not at all. Write the page's links without a `?v=`
token; this is the one page under `psycho-syber/` that `scripts/stamp.mjs` stamps.
- The Duel is the one place on the site where a visitor's browser connects to anything but syberlabs.io. The two
browsers open a direct WebRTC link. No server of ours takes part: the first player sends an invite and the second
sends back a reply, as links (`#d=`, `#r=`) or as pasted text. The owner chose this over a third-party broker and
over the staff Function. Do not add a signalling server, a relay (TURN) or a library for it without the owner's
direction.
- The scripts name one address, `stun:stun.cloudflare.com:3478`, which tells a browser its public address. The test
fails if they name another or call `fetch`.
- Nothing is contacted until the visitor presses `Make an invite` or `Answer the invite`. Opening an invite link only
shows it. Keep it so.
- An invite and a reply contain the network addresses of the browser that made them. The panel says so beside each,
and "What is sent" on the page and "Game duels" on `/privacy/` say what a duel sends and that SyberLabs receives
none of it. A change to what is sent changes all three in the same commit.
- Waves sends nothing. The best score and the aim speed are `localStorage` keys that begin `psycho-syber.arena.`. A
reply link opened in a new tab reaches the tab that made the invite through a `BroadcastChannel` named
`psycho-syber.arena`, which does not leave the browser.
- While a game is on, the stage covers the whole screen, the header included (`run` on `#ar-stage`). Pause and the
two end panels have `Leave the game`, which brings the page back: keep menu, privacy and account access one tap
from Pause.
- A duel does not pause, because one browser cannot stop the other's game. In a duel the panel says the duel goes on,
that the player stands still and can be hit, and that the next round closes it. Never show "Paused." over a duel.
- Each browser reports its own hits, and the first player's browser keeps the rounds and the score. The page says a
player who alters the game can cheat, that there is no relay, and what has not been tested. Keep those lines true:
when a duel has been played across two networks, on a phone or in another browser, change the line that says it
has not.
- `node psycho-syber/test/arena.mjs` runs in CI: the codes pack and read back, the page holds every element the script
looks up, and the rules above hold. `psycho-syber/test/arena-browser.mjs` plays a wave at a desktop and a phone
width and two duels in headless Chrome; CI has no browser, so run it by hand after a change to `game.js` or
`link.js` and put what it printed in the pull request. `psycho-syber/README.md` ("ARENA") has the messages the two
browsers exchange.
- The page's first section names the four products and Lacuna Institute. With reduced motion the picture behind the
title holds still.

## Homepage

The homepage (`src/home/page.js`, parts in `src/home/parts/`) was redesigned on November 18, 2026, when the owner asked
Expand Down
3 changes: 2 additions & 1 deletion privacy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ <h1 class="sy-display">What this site does with your data.</h1>
<div><dt>Hosting</dt><dd>The site is served by Cloudflare Pages. Like any service that delivers web pages, Cloudflare processes technical request data, such as your IP address and browser details, to deliver pages and protect the service.</dd></div>
<div><dt>Fonts</dt><dd>Pages load their typefaces from syberlabs.io. No font file is requested from another company.</dd></div>
<div><dt>Video</dt><dd>The RISE demo page embeds a video from YouTube using its privacy-enhanced domain (youtube-nocookie.com). Nothing loads from YouTube until you press play on that video. The site’s own demo video is served from syberlabs.io.</dd></div>
<div id="duel"><dt>Game duels</dt><dd>The game PSYCHO SYBER: ARENA has a mode for two players in which the two visitors’ browsers connect to each other directly, using WebRTC. Nothing is contacted until you press Make an invite or Answer the invite. Your browser then asks a STUN server run by Cloudflare (stun.cloudflare.com) for your public network address, and the invite or reply you send to the other player contains that address. The other player’s browser sees your IP address while the duel lasts. No SyberLabs server carries the invite, the reply or the game, and SyberLabs receives and keeps nothing from a duel. The <a href="/psycho-syber/arena/#sent">game page</a> lists what the two browsers send each other.</dd></div>
<div><dt>Email</dt><dd>Contact links open your email app. SyberLabs receives only what you choose to send and uses it to reply to you.</dd></div>
<div id="account-saves"><dt>Private app backups</dt><dd>Signed-in people can explicitly save a private backup from Omni, RISE or Sketch to their account. We store the selected document or canvas content, its name, app and save time in Cloudflare D1, linked to the account. There is no automatic upload: existing local work stays in the browser until you choose Save to account. The apps can retrieve only their own app’s backups for that signed-in account. Backups stay until you ask us to remove them; use the contact below to request removal. Each account can store up to 50 backups, with a 1 MB limit each and 10 MB total. These backups do not carry model API credentials or grant application permissions.</dd></div>
<div id="staff"><dt>Staff sign-in</dt><dd>People SyberLabs adds can sign in with GitHub, and can add Google. We receive the account’s numeric id and username from GitHub and keep them, with the roles we grant and sign-in times, in a Cloudflare database. For Google, we receive the account’s id and email address. Sessions and admin actions are recorded with a shortened IP address and the browser name. We never keep Google or GitHub access tokens. Starting a sign-in sets a 10-minute cookie on syberlabs.io; signing in sets a session cookie that expires after 13 hours, and the session itself ends after 12. Nothing is set for visitors who don’t start a sign-in, nothing is recorded about people who are refused, and the session cookie stays on syberlabs.io. Omni, RISE and Sketch can check that session through a restricted account service. Records are kept for about 400 days. Staff accounts are turned off, not deleted, when access ends; ask us and we will remove your details. Processors: GitHub, Google, Cloudflare.</dd></div>
<div><dt>Other sites</dt><dd>Links to GitHub, TypeSafe AI and other sites follow those sites’ own policies. The RISE reading app has its own <a href="https://rise.syberlabs.io/privacy.html">RISE privacy policy</a>.</dd></div>
</dl>
<p class="sy-small privacy__updated">Last updated 18 November 2026. Questions: <a href="mailto:syberlabs.support@gmail.com">syberlabs.support@gmail.com</a></p>
<p class="sy-small privacy__updated">Last updated 19 November 2026. Questions: <a href="mailto:syberlabs.support@gmail.com">syberlabs.support@gmail.com</a></p>
</main>
<footer class="sy-footer">
<div class="sy-footer__in">
Expand Down
71 changes: 71 additions & 0 deletions psycho-syber/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,74 @@ and have not been tuned by people playing.
Where the structure came from: the sectors follow the parts of AnomalyOS (github.com/the-bugeater/AnomalyOS), a
browser desktop made as an art piece by another author. The scene uses none of its text, art or code, and that
repository carried no license file on November 18, 2026. The page does not name it.

## ARENA

PSYCHO SYBER: ARENA is a second game, published at `/psycho-syber/arena/` since November 19, 2026: a first-person
arena in 3D with two modes, Waves and the Duel. Its rules for the site are in `CLAUDE.md` under "PSYCHO SYBER: ARENA".
It shares nothing with the game above but the two forms' names and this folder.

| File | What it does |
|---|---|
| `arena/index.html`, `arena/arena.css` | The page: the stage, the HUD, the touch controls, the panels, and the copy under it. Its header and footer come from `scripts/site-chrome.mjs` |
| `arena/game.js` | The whole game, one classic script: the block world, the two forms, enemies, waves, operators, sound, the duel and the loop |
| `arena/link.js` | Packs a WebRTC session description into an invite or reply code and reads one back. No DOM, no network |
| `arena/vendor/three.min.js`, `three.LICENSE.txt` | three.js r160, `build/three.min.js` from the npm package `three@0.160.0`, unchanged. It prints one deprecation notice to the console when it loads |
| `test/arena.mjs` | Runs in CI, in Node: the codes, the page's ids, the page's rules, the library's hash |
| `test/arena-browser.mjs` | Run by hand: a wave at a desktop and a phone width, and two duels between two browser contexts |

`game.js` was built outside this repository and ported. The port took out a story mode and its codex, renamed the
forms, put every element id under `ar-`, scoped the styles to `#ar-stage`, and replaced a third-party broker with
the invite and reply described here.

### How two browsers find each other

1. The first player (`D.role === 'lead'`) makes an `RTCPeerConnection` with two data channels, waits up to four
seconds for the browser to list its addresses, and packs the offer: `…/psycho-syber/arena/#d=<code>`.
2. The second player (`'join'`) opens that link. The page shows the invite and waits for a press. It then sets the
offer, packs its answer as `…/psycho-syber/arena/#r=<code>`, and waits.
3. The first player's tab takes the reply: pasted into the panel, or handed over by a new tab that opened the reply
link (a `BroadcastChannel`, same browser only). The channels open and the first round starts.

A code is `1`, then `o` or `a`, then `z` (deflate-raw) or `p` (plain), then base64url. An invite is about 600
characters. TCP candidates are dropped before packing. `link.js` refuses a description with an audio or video line.

The one STUN server is Cloudflare's. With no answer from it (a sandbox, or a network that blocks UDP) the code holds
local addresses only, the panel says so, and the link opens only on the same network. There is no TURN relay.

### What the two browsers send

`ctl` is ordered and reliable. `pos` is unordered and is never resent. Every message is a JSON array.

| First item | Channel | From | What it carries |
|---|---|---|---|
| `v` | ctl | both | The protocol version (`NET_V`). The first round starts when the lead has the join's |
| `R` | ctl | lead | A round starts: its number, the lead's form, the score |
| `E` | ctl | lead | A round ended: who won it, the score, whether the duel is over |
| `d` | ctl | join | My health ran out |
| `x` | ctl | join | Rematch |
| `h` | ctl | both | I hit you: damage, and the push in x, y, z. The receiver clamps each |
| `k` | ctl | both | Blocks I broke, by index |
| `b`, `r` | ctl | both | A blast to draw; a rocket to draw |
| `s` | pos | both | 30 times a second: position, velocity, aim, health, what the body is doing, the last arc shot |
| `p` | pos | both | Once a second, so that six seconds of silence means the other side is gone |

Each side draws the other 100 ms in the past, between the two positions on either side of that moment. A hit is
decided by the browser that fired. The lead decides rounds and the score.

### Running the browser checks

pnpm build:site
PW_REQUIRE_FROM=/opt/npm-tools/package.json PW_EXECUTABLE=/usr/bin/google-chrome node psycho-syber/test/arena-browser.mjs shots all

`ARENA_REPLY_WAIT=60` holds the reply for a minute before it is pasted, as a message app would. The script advances
both games by calling `update()` itself: the game caps a frame at 34 ms, and headless Chrome draws a few frames a
second, so a three-second countdown would take half a minute of real time.

### Not yet done

- No person has played a duel across two networks, on a phone, or in Firefox or Safari.
- The page has no social card of its own; it uses the game's.
- The header, the Menu, the homepage and `llms.txt` do not list the page.
- The picture's colours (rose for Psycho, teal for Syber) are the earlier build's, not the first game's.

Loading
Loading