29 Commits

Author SHA1 Message Date
f38dec2ac4 Merge pull request 'ci(image): clean up after the image build and the deploy' (#50) from chore/ci-self-cleanup into main
All checks were successful
Build and publish the image / build (push) Successful in 1m37s
Build and publish the image / deploy (push) Successful in 10s
PR checks / checks (push) Successful in 2m42s
Reviewed-on: #50
2026-11-04 12:10:59 +00:00
080f9827b8 ci(image): clean up after the image build and the deploy
All checks were successful
PR checks / checks (pull_request) Successful in 3m41s
The build job runs docker on the runner host's daemon, so every run left
two tagged images behind for good. Remove this run's tags once they are
pushed and cap BuildKit's cache at 5 GB, always, never failing the job.

The deploy drops the dangling image its pull replaced on the rgcom host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-11-02 11:20:50 -06:00
7ac19a791c Merge pull request 'fix(app): turn the APK download back on for v0.7.0' (#49) from fix/apk-serviceable into main
Some checks failed
Build and publish the image / build (push) Successful in 3m55s
Build and publish the image / deploy (push) Successful in 13s
PR checks / checks (push) Failing after 14m24s
Reviewed-on: #49
2026-10-31 05:38:36 +00:00
b8306dcdaf fix(app): turn the APK download back on for v0.7.0
All checks were successful
PR checks / checks (pull_request) Successful in 2m30s
platform.json's androidApk.serviceable goes to true. It was false because
v0.5.0's build did not work. v0.7.0's released APK (SHA256 matches
SHA256SUMS) was installed on an Android 16 emulator, connected to the
public demo and read its Rust servers, so /app/ links the download again.

The comment beside the flag now says when it was last checked and to set
it back to false when `asset` moves to a release nobody has run. PLAN.md
D29 gets a dated note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-31 00:21:46 -05:00
08a4973bde Merge pull request 'feat(app): quote Android v0.7.0, with report, block and hide and account deletion' (#48) from fix/android-v0.7.0 into main
All checks were successful
PR checks / checks (push) Successful in 2m39s
Build and publish the image / build (push) Successful in 4m12s
Build and publish the image / deploy (push) Successful in 37s
Reviewed-on: #48
2026-10-30 23:09:29 +00:00
8b8896f54b feat(app): quote Android v0.7.0, with report, block and hide and account deletion
Some checks failed
PR checks / checks (pull_request) Failing after 3m28s
Android-app v0.7.0 released 2026-10-30 (M8's cutover). platform.json
quotes it and its APK; /app/ gains the two things it added for a member
(report/block/hide on chat lines, and deleting the account), and the
Moderation docs name the app's long press beside the site's menu.

androidApk.serviceable is left false: it records a person having run
the build, and nobody has run v0.7.0's release APK on a phone yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-30 18:08:14 -05:00
e5ec81b172 Merge pull request 'fix(facts): quote 2026-10-30's releases, and the moderation that 1.21.0 brought' (#47) from fix/platform-facts-2026-10-30 into main
All checks were successful
PR checks / checks (push) Successful in 4m4s
Build and publish the image / build (push) Successful in 5m1s
Build and publish the image / deploy (push) Successful in 1m7s
Reviewed-on: #47
2026-10-30 22:31:46 +00:00
e0b2885cd7 fix(facts): quote 2026-10-30's releases, and the moderation that 1.21.0 brought
All checks were successful
PR checks / checks (pull_request) Successful in 5m26s
check:facts went red on seven facts after the day's releases: Module API
1.21.0, Module-Rust v0.7.0 (coreApi ^1.21.0), Module-uo v1.4.1,
Rust-Plugins v0.3.1, and the Rust bundle 2026.10.30 (plugin v0.3.1).
platform.json now quotes them, verified 2026-10-30.

Re-reading the pages that quote them: Module API 1.21.0 is report, block
and hide, so the Moderation page's Reports section described a queue
that no longer exists (forum-only, and "handling a report never touches
the content"). It now covers chat-line reports, the report snapshot,
Hide for everyone from the queue, and what members do for themselves
(Hide for me, Block, Account -> Blocked). The Rust docs' Feed row names
the chat-line menu. The app's menu is not mentioned: the app release
that carries it (v0.7.0) has not shipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-30 17:30:39 -05:00
c1b38081f5 Merge pull request 'fix(legal): declare report, block and hide in the app's data safety' (#46) from fix/play-data-safety-user-safety into main
Some checks failed
Build and publish the image / build (push) Successful in 1m41s
Build and publish the image / deploy (push) Successful in 10s
PR checks / checks (push) Failing after 3m5s
Reviewed-on: #46
2026-10-30 16:05:05 +00:00
dff4232491 fix(legal): declare report, block and hide in the app's data safety
Some checks failed
PR checks / checks (pull_request) Failing after 3m21s
The app now sends reports, blocks and hides (USER_SAFETY.md step 4,
Android-app#64). A new app row, app-safety, declares them: App activity ->
Other user-generated content (the report's note) and Other actions (the
report, block and hide themselves), collected, not shared, required. Other
actions moves from "not collected" to collected in PLAY_DATA_SAFETY.md.

The deployment row for posted content now says a report keeps a copy of
what it reported, and that blocks and hides are kept on the account and
deleted with it (user_blocks and user_hidden_items cascade).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-30 11:02:56 -05:00
caab3476eb Merge pull request 'feat(legal): /delete-account/, the page Google Play is given (D85, D86)' (#45) from feat/delete-account-page into main
All checks were successful
PR checks / checks (push) Successful in 2m22s
Build and publish the image / build (push) Successful in 2m49s
Build and publish the image / deploy (push) Successful in 10s
Reviewed-on: #45
2026-10-30 06:42:54 +00:00
70b31302b7 fix(facts): quote Module API 1.20.0 and Module-uo v1.4.0
All checks were successful
PR checks / checks (pull_request) Successful in 2m34s
check:facts was red on main after account deletion's core and module
steps merged: core's MODULE_API is 1.20.0, Module-uo declares coreApi
^1.20.0, and Module-uo released v1.4.0. Every page reads these from
platform.json, and none needed rewording. Folded into this PR by the org
lead's choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-30 01:40:52 -05:00
094c606238 feat(legal): /delete-account/, the page Google Play is given (D85, D86)
Some checks failed
PR checks / checks (pull_request) Failing after -31s
Step 5 of docs/website/ACCOUNT_DELETION.md (§4.5). The page explains how
to delete an account on a community's site and in the app, what goes,
what stays and for how long, and who to ask when you cannot sign in. It
cannot delete anything, because we hold no account.

- The facts are one deployment row in collection.mjs (deletion.goes,
  .stays with a keep each, .staff), in the website's own words. /privacy
  section 3 renders it as prose, the page renders its lists, and
  PLAY_DATA_SAFETY.md prints them under the console's deletion questions.
- The app rows that a deletion touches (session, trust token, push,
  inbox snapshot) say so. The Data Safety notes now answer "yes" to
  account deletion and name the URL. lastUpdated is 2026-10-30.
- D85: linked from the footer's legal bar, /privacy sections 2 and 3,
  and /app/'s "Two ways to get it".
- D86: someone who cannot sign in is sent to their community's operator,
  never to us.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-30 01:25:48 -05:00
338cc6f3de Merge pull request 'fix(legal): declare what the app sends as collected, not shared (D84)' (#44) from fix/play-data-safety-collected into main
Some checks failed
PR checks / checks (push) Failing after -1m24s
Build and publish the image / build (push) Successful in 3m5s
Build and publish the image / deploy (push) Successful in 30s
Reviewed-on: #44
2026-10-29 22:30:29 +00:00
d6d5a70ed4 fix(legal): declare what the app sends as collected, not shared (D84)
All checks were successful
PR checks / checks (pull_request) Successful in 2m33s
Play counts data that leaves the device as collected, whoever runs the
server it lands on. The generated Data Safety notes answered "not
collected" because we run no server, which is true of /privacy and the
wrong answer to the form (org lead, 2026-10-29, Android PLAN.md M8).

An audit of the app's edge (every body, query and header in data/api/)
found more leaving the phone than section 2 listed. New rows: the
User-Agent, game-account links and creation, the Contact form, staff
posts and moderation, notification read state and preferences, search
text. The sign-in and trusted-device rows now say what is sent (the
credentials, the device's make and model).

- PlayMapping: a list of console types, plus required and purposes,
  checked against PLAY_DATA_TYPES / PLAY_PURPOSES (the first version
  filed "Other user-generated content" under Messages).
- The generator answers per data type, lists every type not collected,
  and answers the form's security questions.
- The premise test now asserts what is still true: nothing is shared.
- legal.lastUpdated moves to 2026-10-29 with /privacy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-29 08:20:25 -05:00
04e8c14d1f Merge pull request 'fix(facts): quote Module-Rust v0.6.3' (#43) from fix/facts-module-rust-063 into main
Some checks failed
PR checks / checks (push) Successful in 2m44s
Build and publish the image / build (push) Failing after 1h35m32s
Build and publish the image / deploy (push) Has been skipped
Reviewed-on: #43
2026-10-29 11:59:52 +00:00
bda4662a89 fix(facts): quote Module-Rust v0.6.3
All checks were successful
PR checks / checks (pull_request) Successful in 9m11s
check:facts was red on main: platform.json said Module-Rust v0.6.0 and
releases/latest says v0.6.3. v0.6.1 and v0.6.3 are demo-only fixes (DM26,
DM27; there is no v0.6.2) and still require MODULE_API ^1.19.0, so no
page's prose changes. Every page that shows the version interpolates it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-29 05:48:51 -05:00
fcc1a06361 Merge pull request 'feat(demo): list the demo's sign-ins on /beta and link into it per game' (#42) from feat/demo-live into main
Some checks failed
Build and publish the image / build (push) Failing after 3m41s
Build and publish the image / deploy (push) Has been skipped
PR checks / checks (push) Failing after 4m37s
Reviewed-on: #42
2026-10-29 10:12:41 +00:00
769d213c80 feat(demo): list the demo's sign-ins on /beta and link into it per game
Some checks failed
PR checks / checks (pull_request) Failing after 2m16s
The public demo (demo.runicgateway.com) is live, so the site's demo slot
can be switched on. Two decisions of record, PLAN.md §15:

- D82: /beta reads the demo's GET /api/v1/public/settings demo.logins on
  the server, caches it for a minute, and lists the published sign-ins
  with the next wipe. If the demo does not answer, /beta links to its
  sign-in page instead. Gate two reads as in place.
- D83: a deep link into a game module's pages carries data-demo-game, and
  applyBrand.mjs fills it only for games in the new mounted demoGames
  list. The Rust features gain links into /rust and /rust/servers/demo.
  UO's stay hidden on a Rust demo.

The public-demo not-built entry is removed, because its resolvedBy was met.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-28 15:32:34 -05:00
8701126d64 Merge pull request 'fix(docker): pin Node 22.23.4 for the image and CI (Node2Shell)' (#41) from fix/node22-node2shell into main
All checks were successful
PR checks / checks (push) Successful in 3m41s
Build and publish the image / build (push) Successful in 3m53s
Build and publish the image / deploy (push) Successful in 24s
Reviewed-on: #41
2026-10-27 17:49:06 +00:00
e7bbc250a5 chore(facts): Module API 1.19.0, Module-Rust v0.6.0
All checks were successful
PR checks / checks (pull_request) Successful in 5m58s
checkFacts turned this PR red on drift from the demo-mode merges, not on
the Node change: website main is at MODULE_API 1.19.0, Module-Rust main
declares coreApi ^1.19.0, and Module-Rust released v0.6.0. Every page
reads the three values from platform.json; verifiedOn moves to today.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-27 12:37:48 -05:00
d59c993430 fix(docker): pin Node 22.23.4 for the image and CI (Node2Shell)
Some checks failed
PR checks / checks (pull_request) Failing after 2m24s
CVE-2026-111497 ("Node2Shell") is an out-of-bounds write in Node's
bundled Brotli decoder, fixed on 2026-10-21 in 22.23.4. The image used
the floating node:22-bookworm-slim tag, so a cached or stale base could
still carry an older 22.x. Pin the patched version in both stages and in
the PR checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-26 10:01:49 -05:00
9b11c5cb99 Merge pull request 'chore(site): weapon names in the Rust shots; Android-app v0.6.0 and Module-Rust v0.5.1' (#40) from chore/rust-weapon-shots-and-versions into main
All checks were successful
PR checks / checks (push) Successful in 2m15s
Build and publish the image / build (push) Successful in 1m54s
Build and publish the image / deploy (push) Successful in 50s
Reviewed-on: #40
2026-10-23 07:35:45 +00:00
06a8892895 chore(facts): Android-app v0.6.0 and Module-Rust v0.5.1
All checks were successful
PR checks / checks (pull_request) Successful in 2m28s
Both were released on 2026-10-23. Android-app v0.6.0 is the cutover that
ships the Rust screens and the app's core wording (M20), and its APK asset
is runic-gateway-0.6.0.apk. Module-Rust v0.5.1 brings the weapon names in
the feed. verifiedOn moves to 2026-10-23, and checkFacts agrees on all 41
facts.

androidApk.serviceable stays false. It records a person's confirmation
that the published APK works, and nobody has run v0.6.0 against a real
site yet. A smoke test of the signed APK on the emulator covered install,
launch, the HTTPS rule and one TLS round trip, but no Runic Gateway site
serves HTTPS locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-23 02:32:59 -05:00
a918e9248e feat(screens): retake the Rust feed shots with weapon names
rust-feed (web) and app-rust-server (phone) showed the prefab names the
module printed before Module-Rust#60 ("with ak47u entity"). Both were
retaken from the Rust demo running that fix, after re-running
mockRustDemo.mjs so the feed's times are fresh. They now read "with
Assault Rifle", "with Thompson", "with MP5A4".

The phone shot was taken with the emulator in Pacific/Honolulu so that no
row crosses midnight and picks up a date; the timezone was restored
afterwards. The real Oxide rig has nobody on, so the server reads 0 of
40 online, and app-rust-server's alt now says "how many players are
online" rather than "six".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-23 02:06:19 -05:00
abf7dceb06 Merge pull request 'feat(site): phase 18 — the Rust screenshots, web and app' (#39) from feat/phase-18-screenshots into main
All checks were successful
PR checks / checks (push) Successful in 2m33s
Build and publish the image / build (push) Successful in 3m26s
Build and publish the image / deploy (push) Successful in 50s
Reviewed-on: #39
2026-10-23 03:09:15 +00:00
c47e9c1aa4 feat(site): phase 18 - the Rust screenshots, web and app
All checks were successful
PR checks / checks (pull_request) Successful in 2m55s
Nine captures tagged rust (D65): the server list, feed, leaderboard,
live map, permissions and the RunicNPC profile editor on the web, and a
server's feed, its map and the player's Rust account in the app, from
an Android-app edge debug build.

D80: every name in a capture is a role (admin, moderator, player...),
from this phase on. D81: the Rust demo's players are mock data written
by scripts/mockRustDemo.mjs; the server, its status, map, permission
groups and RunicNPC sync state are the real Oxide test server's. The
captions and /modules/rust/ and /app/ say which part is a demo cast.

seedDemo.mjs gains --game rust (server row with a weekly wipe, public
presence for the demo, two NPC profiles, a VIP group). captureScreens.mjs
gains a click list per screen. The homepage shows the Rust live map beside
the UO capture (D76); three Rust docs pages carry their screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-22 22:05:06 -05:00
4f38e29ad7 Merge pull request 'feat(site): phase 17 — per-game module pages, /runicnpc/, and checkTerms over the built site' (#38) from feat/phase-17-marketing into main
All checks were successful
PR checks / checks (push) Successful in 2m26s
Build and publish the image / build (push) Successful in 3m0s
Build and publish the image / deploy (push) Successful in 53s
Reviewed-on: #38
2026-10-23 01:26:01 +00:00
56473d4d51 feat(site): phase 17 - per-game module pages, /runicnpc/, and checkTerms over the built site
All checks were successful
PR checks / checks (pull_request) Successful in 2m37s
PLAN.md §16 phase 17, built on the org lead's answers of 2026-10-22,
recorded as D75-D79 (count of record 79).

- D75: core marketing pages describe what a game module adds in core's
  words. "Game intelligence" became "What a game module adds"; each
  game's own list moved to src/data/games/ and renders only on the new
  /modules/uo/ and /modules/rust/. /modules/ is a card per game.
- The page-side capability check is per game (assertGameCoverage), the
  item phase 13 moved here.
- D76: the homepage keeps its game screenshot, labelled. screens.mjs
  entries may carry `game` (D67); Screenshot.astro and the app grid
  print the game's name and mark the figure data-game.
- D77: /app/ describes the Rust screens (released the same day).
- D78: /runicnpc/, the standalone page, is in the header and footer;
  the narrow header was re-measured so five links keep two rows.
- D79: checkTerms.mjs --built reads every built page's visible text
  after the build; game routes and data-game elements allow their
  game's words. Proven against ten plants. Still the twelfth check.
- Re-read fixes: /architecture/'s "two machines is also the maximum",
  Discord "guild" on /integrations/, and collection.mjs against what
  Steam sign-in and the Rust module keep (PLAY_DATA_SAFETY.md
  regenerated; the Play answers are unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-22 20:10:51 -05:00
67 changed files with 4669 additions and 715 deletions

View File

@@ -157,6 +157,21 @@ jobs:
docker push "${IMAGE}:latest" docker push "${IMAGE}:latest"
docker push "${IMAGE}:${TAG}" docker push "${IMAGE}:${TAG}"
- name: Remove this run's image and cap the build cache
# The build runs on the HOST daemon, so whatever it leaves stays on the
# runner host for good: every run used to leave two tagged images, and
# each newer `latest` turned the previous one into a permanent `sha-` image
# until the host ran out of disk. Both tags are in the registry by now, so
# the local copies are dead weight. BuildKit keeps its layer cache apart
# from the images, so the next build stays fast; the cache is pruned to a
# cap instead of growing forever (`--reserved-space` is the same flag's
# name on newer Docker). Runs even after a failure, and never fails the job.
if: always()
run: |
docker image rm "${IMAGE}:latest" "${IMAGE}:${TAG}" 2>/dev/null || true
docker builder prune -f --keep-storage 5GB \
|| docker builder prune -f --reserved-space 5GB || true
- name: Log out - name: Log out
if: always() if: always()
run: docker logout "${REGISTRY}" || true run: docker logout "${REGISTRY}" || true
@@ -207,3 +222,11 @@ jobs:
echo "::error::The site did not become healthy within 150s." echo "::error::The site did not become healthy within 150s."
docker compose logs --tail 100 site docker compose logs --tail 100 site
exit 1 exit 1
- name: Remove the image this deploy replaced
# The pull moves `latest` to the new image and leaves the old one untagged
# on the host. Untagged images are never used again (a rollback pulls a
# `sha-` tag from the registry), so drop them. Dangling images only: nothing
# tagged and nothing a container is using is touched.
if: always()
run: docker image prune -f || true

View File

@@ -22,7 +22,7 @@ jobs:
- name: Set up Node - name: Set up Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '22' node-version: '22.23.4'
cache: npm cache: npm
- name: Install - name: Install
@@ -115,6 +115,17 @@ jobs:
# fails because some other host is slow is a check people learn to ignore. # fails because some other host is slow is a check people learn to ignore.
run: npm run check:links run: npm run check:links
- name: Game vocabulary in the built pages
# PLAN.md §16, D79 — phase 17 widened the twelfth check to the whole site. The
# marketing pages are templates fed from src/data/, so the words a reader sees are
# mostly not in any source file: a capability label, a screenshot caption, a value
# from platform.json. This pass reads every built page's visible text, alt, title and
# aria-label, the way check:links reads its hrefs. A game's routes, and elements
# marked data-game (<GameExample>, a game-tagged screenshot), allow that game's words.
#
# Still the twelfth check, not a thirteenth: the same script, the same word list.
run: npm run check:terms:built
- name: Platform facts - name: Platform facts
# PLAN.md §12 — every version, protocol number and bundle tag is re-read from # PLAN.md §12 — every version, protocol number and bundle tag is re-read from
# its authority over the Gitea API and must agree with src/data/platform.json. # its authority over the Gitea API and must agree with src/data/platform.json.

View File

@@ -244,7 +244,7 @@ recolours the site and leaves every logo alone. `PLAN.md` §7 is the full accoun
``` ```
brand/ brand/
brand.json Site name, tagline, contact address, Discord invite, Gitea org, brand.json Site name, tagline, contact address, Discord invite, Gitea org,
demo URL, Play opt-in URL demo URL and the games it runs, Play opt-in URL
logo.png ONE raster. Every size the site asks for — header at three pixel logo.png ONE raster. Every size the site asks for — header at three pixel
ratios, install icons, apple-touch, favicons, a real .ico — is ratios, install icons, apple-touch, favicons, a real .ico — is
derived from it on demand derived from it on demand
@@ -264,6 +264,14 @@ mounted site name has to reach forty-nine pages that were rendered before the fi
day the Play closed test opens, pasting the URL into `brand/brand.json` puts a working link on the day the Play closed test opens, pasting the URL into `brand/brand.json` puts a working link on the
confirmation screen on the very next request. confirmation screen on the very next request.
**The public demo** is two fields. `demoUrl` shows the homepage's "See it running" button and the
core features' links into it; `demoGames` lists the game modules it runs (`["rust"]` for
`demo.runicgateway.com`), and only those games' links show. Both need the restart. `/beta` also
reads `demoUrl` live: it fetches the demo's published sign-ins from
`<demoUrl>/api/v1/public/settings` and lists them, so the container must be able to reach the
demo's public address. If it cannot, `/beta` links to the demo's sign-in page instead and logs
`[beta] could not read the demo's sign-ins`.
To see which source answered a given asset: To see which source answered a given asset:
```bash ```bash

View File

@@ -15,7 +15,7 @@
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Stage 1 — build # Stage 1 — build
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
FROM node:22-bookworm-slim AS build FROM node:22.23.4-bookworm-slim AS build
WORKDIR /build WORKDIR /build
@@ -54,7 +54,7 @@ RUN mkdir -p /split \
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Stage 2 — runtime # Stage 2 — runtime
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
FROM node:22-bookworm-slim AS runtime FROM node:22.23.4-bookworm-slim AS runtime
WORKDIR /app WORKDIR /app

294
PLAN.md
View File

@@ -232,12 +232,12 @@ Taken by the org lead (Colby Whitlock) on 2026-08-19. Recorded so they are not r
| **D9** | **No analytics.** No tracking scripts, no third-party requests, no cookie banner. | Reverse-proxy access logs are the only traffic data. | | **D9** | **No analytics.** No tracking scripts, no third-party requests, no cookie banner. | Reverse-proxy access logs are the only traffic data. |
| **D10** | **Support routes to Discord and Gitea issues.** Invite: `https://discord.gg/t2Jav8yT4g`. | §10. Discord is the front door; Gitea takes issues from anyone with an account, which today is nobody outside the org — §14, N3. | | **D10** | **Support routes to Discord and Gitea issues.** Invite: `https://discord.gg/t2Jav8yT4g`. | §10. Discord is the front door; Gitea takes issues from anyone with an account, which today is nobody outside the org — §14, N3. |
| **D11** | **Keep the existing emblem.** `runic-emblem.png` is the mark on both the website and the Android launcher icon; the site adopts it rather than drawing a new one. | §11. Revision 1's "draw a new geometric mark" recommendation is withdrawn. | | **D11** | **Keep the existing emblem.** `runic-emblem.png` is the mark on both the website and the Android launcher icon; the site adopts it rather than drawing a new one. | §11. Revision 1's "draw a new geometric mark" recommendation is withdrawn. |
| **D12** | **A public demo instance is planned but out of scope today** — a Proxmox VM running the full stack including ServUO, with restricted settings and an hourly automatic reset. | §15. The IA reserves the slot so it lands later without a restructure. | | **D12** | **A public demo instance is planned but out of scope today** — a Proxmox VM running the full stack including ServUO, with restricted settings and an hourly automatic reset. | §15. The IA reserves the slot so it lands later without a restructure. **Built 2026-10-27** as `demo.runicgateway.com`, on Rust with a two-hour reset; the site reaches it through D82 and D83 (§15). |
| **D13** | **Publish the existing address.** No mailbox has been created at the domain and the org lead elected not to wait for one: `whitlocktech@gmail.com` is the published contact wherever the site needs one — `/privacy`, `/terms`, `/community`, the Play listing — and `docs/SECURITY.md` keeps the address it already carries. | Taken 2026-08-19, superseding §14 N2 as a blocker. The address lives **only** in `brand.json` (§7), never in prose, so moving to `privacy@`/`security@` later is a file edit and a restart. Phase 0's PR 0.10 is withdrawn, not deferred. | | **D13** | **Publish the existing address.** No mailbox has been created at the domain and the org lead elected not to wait for one: `whitlocktech@gmail.com` is the published contact wherever the site needs one — `/privacy`, `/terms`, `/community`, the Play listing — and `docs/SECURITY.md` keeps the address it already carries. | Taken 2026-08-19, superseding §14 N2 as a blocker. The address lives **only** in `brand.json` (§7), never in prose, so moving to `privacy@`/`security@` later is a file edit and a restart. Phase 0's PR 0.10 is withdrawn, not deferred. |
**Decisions after D13 are recorded where they were taken**, in the section describing the phase that **Decisions after D13 are recorded where they were taken**, in the section describing the phase that
raised them, rather than appended here — a decision is only re-litigated when its reasoning is raised them, rather than appended here — a decision is only re-litigated when its reasoning is
somewhere other than the thing it decided. The count of record is **seventy-four**: somewhere other than the thing it decided. The count of record is **eighty-four**:
| # | Where | What it settled | | # | Where | What it settled |
|---|---|---| |---|---|---|
@@ -260,6 +260,11 @@ somewhere other than the thing it decided. The count of record is **seventy-four
| D68–D69 | §16, "How phase 14 built it" | A game's real example on a core page is a tagged, labelled block; *Verify the whole stack* stays in Getting started, game-neutral (amending D60) | | D68–D69 | §16, "How phase 14 built it" | A game's real example on a core page is a tagged, labelled block; *Verify the whole stack* stays in Getting started, game-neutral (amending D60) |
| D70–D71 | §16, "How phase 15 built it" | The Rust group is fifteen pages, one per admin screen where it can be; the Rust event kinds are checked against the module's own classification | | D70–D71 | §16, "How phase 15 built it" | The Rust group is fifteen pages, one per admin screen where it can be; the Rust event kinds are checked against the module's own classification |
| D72–D74 | §16, "How phase 16 built it" | The RunicNPC subgroup is eight pages with a shared profile-field reference; the API check compares signatures and every data shape's field names; the site's API page carries the current API only, with no decision numbers and no version history | | D72–D74 | §16, "How phase 16 built it" | The RunicNPC subgroup is eight pages with a shared profile-field reference; the API check compares signatures and every data shape's field names; the site's API page carries the current API only, with no decision numbers and no version history |
| D75–D79 | §16, "How phase 17 built it" | Core marketing pages describe what a game module adds in core's words and link to each game's page; the homepage keeps its game screenshot, labelled; `/app/` describes the Rust screens, released the same day; `/runicnpc/` is in the header; `checkTerms.mjs` gains a pass over the built pages |
| D80–D81 | §16, "How phase 18 built it" | A name in a screenshot is a role; the Rust captures' players are mock data |
| D82–D83 | §15, "How the site reaches it" | `/beta` lists the demo's sign-ins as the demo publishes them; a demo deep link names its game and shows only for the games the mounted `demoGames` lists |
| D84 | §9, "How phase 6 built the legal pages" | The Data Safety answers say "collected, not shared" for everything the app sends, amending D33 |
| D85–D86 | §9, "`/delete-account/`" | The deletion page is linked from the footer, `/privacy` and `/app/`; someone who cannot sign in is sent to their community's operator, never to us |
--- ---
@@ -951,6 +956,8 @@ deliberately so — no fetch can tell whether an APK runs. `checkFacts.mjs` asse
still exist and that `minSdk` still says what "Android 10 or newer" claims, so the link is correct still exist and that `minSdk` still says what "Android 10 or newer" claims, so the link is correct
the moment a working build flips the boolean. The panel is not removed while the link is off: a page the moment a working build flips the boolean. The panel is not removed while the link is off: a page
that omitted sideloading would read, to somebody who knows the APK exists, as a page hiding it. that omitted sideloading would read, to somebody who knows the APK exists, as a page hiding it.
*(2026-10-31: the link is back on. Android `v0.7.0`'s APK was installed on an Android 16 emulator,
connected to the public demo and read its Rust servers, so `serviceable` is `true`.)*
**Three mechanisms this phase added that the plan did not anticipate.** **Three mechanisms this phase added that the plan did not anticipate.**
@@ -1065,6 +1072,51 @@ not shared"**, failing with the reason rather than a diff: "we operate no server
is the premise of the whole section, and a telemetry endpoint added later must not be able to is the premise of the whole section, and a telemetry endpoint added later must not be able to
produce a row that quietly contradicts the lede three inches above it. produce a row that quietly contradicts the lede three inches above it.
**D84 — The Data Safety answers say "collected" for everything the app sends** (org lead,
2026-10-29, Android `PLAN.md` M8; amends D33). Play counts data that leaves the device as
collected, whoever runs the server it lands on, so "not collected because we run no server" was the
wrong answer to the form's question even though it is the right sentence for `/privacy`. An audit of
the app's `edge` (every Retrofit body, query and header in `data/api/`) found more leaving the phone
than section 2 listed: the sign-in itself, the device's make and model on a trusted-device request,
the User-Agent, game-account links and in-app game-account creation, the Contact form's name, email
and message, staff posts and moderation, notification read state and preferences, and search text.
Each is now a row, declared **collected, not shared, encrypted in transit, required**; the rows
that stay on the phone say so and carry no console type. `PlayMapping` takes a list of `types`
(checked against `PLAY_DATA_TYPES`, the console's own vocabulary, which caught the original file
filing "Other user-generated content" under Messages), `required` and `purposes`; the generator
folds rows into one answer per data type, lists every type that is not collected, and answers the
form's security questions. D33's test now asserts the part of the premise that is still true:
**nothing is shared**. `/privacy` section 2 keeps saying none of it reaches us, and `lastUpdated`
moved with it. Report, block and hide (Android M8 step 3) adds its rows when it lands.
### `/delete-account/` (2026-10-30)
Play needs one account-deletion address from whoever publishes the app. The platform gained
self-service deletion on the website and in the app (`docs/website/ACCOUNT_DELETION.md`, AD1), and
this page is the address Play is given (AD2, §4.5 there). It cannot delete anything: we hold no
account, so it explains where the button is in the app and on the website, what goes and what stays
and for how long, and who to ask when you cannot sign in.
**The facts are one row.** What a deletion takes is the `deploy-account-deletion` row in
`src/data/collection.mjs`, whose `deletion` field holds the website's own words for what goes and
what stays (`client/src/lib/accountDeletion.js`, which the app's strings repeat) plus how long each
kept thing is kept, which Play asks and the screens do not say. `/privacy` section 3 renders the row
as prose, the page renders its lists, and `PLAY_DATA_SAFETY.md` prints them under the console's
deletion questions, so the three cannot disagree. `deletionRow()` throws when the row is missing,
and `test/legal.test.mjs` fails a kept entry with no retention. The app rows that deletion touches
(the session, the trust token, push and the inbox snapshot) say so, and `lastUpdated` moved.
**D85 — The page is linked from the footer, `/privacy` and `/app/`** (org lead, 2026-10-30). The
footer's legal bar reads Privacy · Terms · Delete account, because a player looking for it looks
where the privacy link is; `/privacy` sections 2 and 3 and the bottom of `/app/`'s "Two ways to get
it" link to it as well.
**D86 — Someone who cannot sign in is sent to their community's operator, never to us** (org lead,
2026-10-30). The page offers "Forgot your password?" first, which works when the account has an
email address and the site can send mail, and then the operator, who can delete any account from the
admin panel. It says plainly that we cannot do it: we hold no account and have no access to any
community's site. Offering our contact address to help find an operator was considered and declined.
**What phase 6 also closed.** `/privacy/` and `/terms/` were the last two entries in **What phase 6 also closed.** `/privacy/` and `/terms/` were the last two entries in
`checkLinks.mjs`'s `PLANNED_ROUTES`; building them emptied the list, and its reverse check is what `checkLinks.mjs`'s `PLANNED_ROUTES`; building them emptied the list, and its reverse check is what
forced the deletion. The list itself stays, because §10's documentation routes land in phases 7 and 8 forced the deletion. The list itself stays, because §10's documentation routes land in phases 7 and 8
@@ -1090,6 +1142,7 @@ Organised by what a reader is trying to do. A reader should never need to know t
| `/beta/` | The closed-beta signup (§8). The one page that handles its own POST (D28) | | `/beta/` | The closed-beta signup (§8). The one page that handles its own POST (D28) |
| `/community/` | Discord (`discord.gg/t2Jav8yT4g`) as the front door, the Gitea org for code and contributions, the `brand.json` contact address for vulnerabilities (D13) — the split in §14 N3 | | `/community/` | Discord (`discord.gg/t2Jav8yT4g`) as the front door, the Gitea org for code and contributions, the `brand.json` contact address for vulnerabilities (D13) — the split in §14 N3 |
| `/privacy/`, `/terms/` | §9 | | `/privacy/`, `/terms/` | §9 |
| `/delete-account/` | §9: how to delete an account you use in the app, and what it keeps. The address Play is given (D85, D86) |
**Feature grouping**, using project terminology: **Feature grouping**, using project terminology:
@@ -1675,8 +1728,10 @@ a mechanism rather than diligence:
- **`scripts/checkTokens.mjs`** — no colour literal outside the token file (§7). - **`scripts/checkTokens.mjs`** — no colour literal outside the token file (§7).
- **`scripts/checkTerms.mjs`** — added in phase 14 for D63 and D64, the twelfth check. No game's - **`scripts/checkTerms.mjs`** — added in phase 14 for D63 and D64, the twelfth check. No game's
vocabulary outside that game's section: its docs group, its sidebar group, or a vocabulary outside that game's section: its docs group, its sidebar group, or a
`<GameExample>` block (D68). Reads the docs and both sidebar trees; phase 17 widens it to all of `<GameExample>` block (D68). Reads the docs and both sidebar trees before the build; since
`src/`. phase 17 (D79) a second pass, `--built`, reads every built page's visible text after it, so
the marketing pages and the words their data renders are covered too. A game's own routes, and
an element marked `data-game`, allow that game's words.
- `astro check` plus a production build, in CI on every PR. - `astro check` plus a production build, in CI on every PR.
--- ---
@@ -1804,9 +1859,56 @@ whether or not N3 is actioned; only one sentence changes.
--- ---
## 15. Planned, not in scope: the demo instance ## 15. The demo instance
D12. Recorded now so the IA reserves room for it and nothing has to be restructured later. D12. Recorded on 2026-08-19 so the IA reserved room for it and nothing had to be restructured
later. **It exists now:** `https://demo.runicgateway.com`, built in `website` and live since
2026-10-27. Its design of record is `docs/website/DEMO_MODE.md` (DM1-DM29), not this section, and
it came out different from the plan below in three ways that matter to this site:
- **It runs Rust, not Ultima Online.** The site is the normal `website` image with the Rust module,
linked to the org's Oxide test server. So the `/uo/…` deep links D25 wrote have nothing to open
there.
- **It resets every two hours, not hourly, and not by reverting a VM.** A scheduled workflow
restores the game server from a baseline, recreates the site's database, and seeds it again
(`DEMO_MODE.md` §7). The banner gives the next reset in UTC.
- **Its sign-ins are generated on its host.** The passwords exist only in the demo's own `.env`
and in what the demo publishes: with `DEMO_MODE` on, `GET /api/v1/public/settings` answers
`demo.logins`, which is what its sign-in page lists.
### How the site reaches it (2026-10-28)
`DEMO_MODE.md` §10 step 6 says "runicgateway.com `/beta` publishes the logins". The org lead took
two decisions to do that:
**D82 — `/beta` lists the demo's sign-ins as the demo publishes them.** With `demoUrl` mounted,
`/beta` (already rendered per request) reads the demo's `GET /api/v1/public/settings` on the
server, caches the answer for a minute, and lists each `demo.logins` row with the next wipe
time. A copy pasted into `brand.json` was the alternative, and it is one regenerated `.env` away
from publishing passwords that do not work. The read is this server's, not the visitor's, so D9
and the CSP are unchanged. It never fails the page: the demo is down for a few minutes at every
wipe, and then (or after 1.5 seconds without an answer) `/beta` links to the demo's own sign-in
page instead, and asks again 15 seconds later. Every field is shape- and length-checked before
it is rendered. Gate two ("somewhere to point it") reads as in place, with the demo's host name
to type into the app's first screen. `lib/demoLogins.mjs` holds it; `test/demo.test.mjs` tests it.
**D83 — a demo deep link names its game, and shows only for the games the demo runs.** A link
into a game module's pages carries `data-demo-game` after `data-demo-path`. A new mounted list,
`demoGames` (stock `[]`), names the modules the demo runs, and `applyBrand.mjs` fills a game's
links only for a game listed there. Core's links (`/wiki`, `/site/events`, `/site/news`) carry no
game and follow `demoUrl` alone. The Rust features gain links into the demo's server page
(`/rust`, and `/rust/servers/demo` with its `?tab=` for the feed, leaderboard, online, map,
wipes and clans). `demo` is the server's id, fixed by the demo's seed fixture. UO's links stay
in the markup and stay hidden, so a UO demo later is one more entry in the list. `checkBrand.mjs`
holds `demoGames` to the games in `games/index.mjs` and checks that `DEEP_LINK` reads the game.
The `public-demo` entry in `notBuilt.mjs` is gone, because its `resolvedBy` was met.
**What the operator mounts:** `"demoUrl": "https://demo.runicgateway.com"` and
`"demoGames": ["rust"]` in the site's `brand.json`, then a restart. `/beta` follows `demoUrl` on
the next request; the prerendered pages follow both at the restart.
### The plan as written (2026-08-19)
**Shape:** a VM on the org lead's Proxmox host running the full stack — website, `module-uo`, the **Shape:** a VM on the org lead's Proxmox host running the full stack — website, `module-uo`, the
uo-link sidecar and a real ServUO shard — so an evaluator clicks one link and sees the actual uo-link sidecar and a real ServUO shard — so an evaluator clicks one link and sees the actual
@@ -2262,6 +2364,186 @@ exception to "every page links out".
The check parses them line by line and was not affected. Fixed at the org lead's ask in `docs` The check parses them line by line and was not affected. Fixed at the org lead's ask in `docs`
#371, which removes the two blank lines and changes nothing else. #371, which removes the two blank lines and changes nothing else.
### How phase 17 built it
Five decisions, taken by the org lead on 2026-10-22 before any page was written, each from a
concrete example. The count of record is now **seventy-nine**.
**D75 — core marketing pages describe what a game module adds in core's words, and link to
the games.** The homepage, `/features/`, `/architecture/` and `/app/` name both games and use
neither game's vocabulary. The module-supplied group became *What a game module adds*: seven
things both modules supply, each in its own way (live server status, a live feed, leaderboards,
maps, Teams from the game, players' own game accounts, game steps for events), with a button
to each game's page. Each game's real list, in its own words, lives in `src/data/games/` and
renders only on `/modules/uo/` and `/modules/rust/`. The alternative was D68 applied to
marketing — game-labelled blocks carrying each game's real list on the core pages. It was
declined as longer, and as the front door carrying two games' jargon at once.
**D76 — the homepage's "What it looks like" keeps its game screenshot, labelled.** This is
D67's choice, made. The capture stays the Ultima Online live-status screen, now printing
"Ultima Online" beside it, because the claim under the data-path diagram is live game state
on a public page and no core screen shows that. Phase 18 adds a labelled Rust capture beside
it. The alternative, a core screen such as the admin dashboard, was declined.
**D77 — `/app/` describes the app's Rust screens.** When the phase began they were on
`Android-app` `edge` only, 26 commits ahead of `main` and in no release. The org lead chose to
describe them and release them the same day, rather than hold the page or say "next release".
`/app/`'s game section is now *The game, live*: one item per game, titled with the game's name
and written in core's words, plus Rust's half of *Your own side of the game*.
**D78 — `/runicnpc/` is in the header.** The top navigation is now five items, so a Rust
server owner who runs no Runic Gateway finds the plugin from any page (D61's reason). It is in
the footer's Product column and on the Rust module page's RunicNPC card too. The alternative
was the footer and the card only.
**D79 — `checkTerms.mjs` reads the built pages.** D64 had the check widen to all of `src/`. A
source scan of the marketing pages would see expressions rather than the words they render —
a capability label, a screenshot caption, a value from `platform.json` — and would take ids
like `shard-status` and slugs like `guilds` for prose. So the check gained a second pass,
`--built`, run after the build the way `checkLinks.mjs` is. It reads every page's visible text
plus `alt`, `title`, `aria-label`, `placeholder`, the `<title>` and the meta description, and
not link targets, scripts, styles or comments. A game's routes (`GAME_ROUTES`: its docs group,
its module page, and `/runicnpc/` for Rust) allow its words, and so does any element marked
`data-game` — `<GameExample>` and, new this phase, a game-tagged `<Screenshot>`. Starlight's
sidebar and the previous/next links are skipped, because the source pass reads the sidebar as
data and each neighbour's title is checked on its own page. The source pass is unchanged and
still runs first, naming a file and a line. Failures from the built pass name a route and a
snippet. It is still the twelfth check: one script, one word list, one allowlist (whose entry
now carries a `route` as well as a `file`). The alternative was a source scan with per-file
exemptions.
**The check was proven before it was trusted.** Ten plants went into the built HTML. Six
failed, each naming where: a word in a core page's text, in an `alt`, in a `title`, a
UO word inside a block marked Rust, a word split across two syntax-highlighting `<span>`s, and a
UO word on a Rust page. Four passed: a word only in an `href`, one in a `<script>`, UO words on
`/modules/uo/`, and a UO block on a core page. On the build as it stood before this phase, the
pass found 49 words on seven marketing pages; all are gone.
**What was built.**
- **`/modules/`** is core now. Its Ultima Online worked example became a card per game, from
`src/data/games/index.mjs`, and what the modules share — a sidecar, their own tables, their
own releases — is said once beneath them.
- **`/modules/uo/`** carries the Ultima Online list that used to be *Game intelligence*, the
three pieces with their versions, and the five screenshots `/features/` showed until now.
- **`/modules/rust/`** carries eight features for players and four for staff, written from the
Rust docs group phase 15 walked, the four pieces (the module, rust-link, `RunicGateway.cs`,
RunicNPC) and the RunicNPC card D61 asked for. It has no screenshots and no slots for them
(D65, D4).
- **`/runicnpc/`** is written for a server owner with no site: what it does, the two ways to run
it, and where to get it. Every number is read — release, API version and floors from
`platform.json`, the counts of calls and hooks from `runicnpc.mjs`, which phase 16's check
holds to `API.md`.
- **The page-side capability check is per game**, closing the item phase 13 moved here.
`assertGameCoverage()` holds each game's list to its module's declared capabilities in both
directions. The homepage, `/features/` and each game page call it, and
`assertDetailCoverage()` now reads the games' lists too.
- **The supported-games strip** (D63) is `src/components/SupportedGames.astro`, on the homepage,
`/features/` and `/modules/`.
- **D67 is in the components.** `screens.mjs` entries may carry `game`; nine are tagged `uo`.
`Screenshot.astro` and `/app/`'s phone grid print the game's name beside each tagged capture
and mark it `data-game`.
**What the re-read found**, fixed here:
- **`/architecture/` said two machines is "the minimum and also the maximum"**, false since Rust
shipped: one sidecar serves one server, so a community with six servers runs six. The caption
now says two is the minimum and a sidecar sits beside each game server, and its game host
section no longer says the installer prints "four values" (that count was one game's).
- **`/integrations/` and the Discord capability called a Discord server a "guild"** — Discord's
API word, but read on this site as a game's. They say *Discord server* now, as phase 14 made
the docs say.
- **`collection.mjs` was re-read against what the Rust module and Steam sign-in keep**, as the
plan required, before anything was claimed. *Account records* now names linked sign-in
identities, Steam's display name and avatar address included (`user_identities`). *Game data
from the connected server* names, for Rust, each player's Steam id and in-game name, their
statistics, who is online, and the event record, which includes chat, player reports and the
IP addresses on sign-in attempts and bans, readable by staff only. Its retention now states
the module's 30 days for that record and the sidecar's 14-day default. The Play Data Safety
answers did not change: the app's Rust screens read from the deployment and send it only a
one-time link code, which the existing "everything you read and post" row already covers. Its
wording lost "shard", so `PLAY_DATA_SAFETY.md` was regenerated.
### How phase 18 built it
Two decisions, taken by the org lead on 2026-10-22 while the phase was under way. The count of
record is now **eighty-one**.
**D80 — a name in a screenshot is a role.** Every username a capture shows — a site account, a
player in a feed, a member of a group — is `admin`, `moderator` or `player`, numbered
(`player2` …) when one screen needs several. A name that says what the account is reads as a
demonstration; an invented person's name reads as somebody's real community. It holds from
this phase on: the phase 9 captures keep their cast, by the org lead's ruling ("no going back
to change the old ones").
**D81 — the Rust captures' players are mock data.** The rig has no players. The phase first
staged stand-in players on it with a rig-only plugin, and the org lead stopped that in favour
of writing the game data straight into the demo's database. This amends D4 for the Rust
captures only. What is real in them is still most of the screen: a real Oxide test server
behind a real rust-link sidecar, its status, its world map and markers, the permission groups
its plugins hold, and RunicNPC's sync state. What is mock is the players: the feed, the
leaderboard, the weapon kills, the server list's player count and the linked Steam account.
`scripts/mockRustDemo.mjs` writes them as SQL in the module's own row shapes, and every name
in them is a role (D80). The captions describe what a screen does and never claim a player did
something; `screens.mjs`, `/modules/rust/` and `/app/` say plainly which part is a demo cast.
The homepage's Rust capture (D76) is the live map, because nothing in that frame is mocked.
The alternative, staging real kills with stand-ins, was abandoned after it cost a morning:
the Rust update had left the rig rebuilding its navmesh for ten minutes, and it stopped
answering the console for most of that time.
**The demo is a second deployment.** One deployment runs one game module (the core refuses a
second at boot), so the Rust demo has its own database, `rgdemorust`, its own core on the
review machine, and Module-Rust v0.5.0. The recipe, in order:
1. Bring the rig up to date (Rust, Oxide and Carbon, the rig rule). The org lead ruled one rig
enough: the Oxide rig, now Rust 26139947 and Oxide 2.0.7839. A restart did not update Rust:
steamcmd cancelled the delta on a DLL Oxide patches ("Corrupt game files"), and a panel
reinstall did not help either. Removing `steamapps/appmanifest_258550.acf` and starting
made steamcmd verify everything and finish. The Carbon rig was left on 25902425.
2. Create the database (without a `COLLATE` clause) and start the core against it with
`MODULES_DIR` holding the module and `BRAND_NAME="Runic Gateway Demo"`. Create `admin`,
`moderator` and `player` with generated passwords.
3. `node scripts/seedDemo.mjs --game rust`, with `RG_RUST_SERVERS` naming a JSON file outside
the repository that holds the server's id, name, sidecar address and token. It writes the
neutral identity, the two accounts, the server row with a weekly wipe, public visibility
for who is online and the map's players (the demo's choice, said in the seed), two RunicNPC
profiles on a kit the rig's Kits holds, and a VIP group with `player` in it.
4. `node scripts/mockRustDemo.mjs`, piped into the database, after the site has seen the
server once so its current wipe exists.
5. `npm run screens:capture` with the Rust ids. Set the server's player count just before
`rust-servers`, since the live server writes its own every thirty seconds.
**What was built.**
- **Nine captures**, all tagged `rust`: six web (the server list, the feed, the leaderboard,
the live map, the permissions screen with a group open, and the NPC profile editor) and three
phone (a server's feed, its map, and the player's Rust account). The phone ones are from an
`Android-app` `edge` debug build on the `s22_ultra` AVD, signed in as `player`; the Rust
screens were not in a release yet. The app's server list was left out: one server card on a
phone-height screen is mostly empty.
- **`captureScreens.mjs` can click.** An entry may carry `click`, the visible text of what to
click before the shot, for a subject behind a tab or a button the route cannot reach — the
permissions group and the profile editor. A step that matches nothing fails the shot.
- **Where they show:** `/modules/rust/` (the public four under what players see, the two staff
screens under theirs, with a sentence saying which part is a demo cast); the homepage's
*What it looks like*, the live map beside the Ultima Online capture (D76); `/app/`'s grid,
whose lede no longer says "not mocked up"; and three docs pages — the live map, permissions
and groups, and RunicNPC's NPC profiles.
**What the phase found**, reported, not fixed here:
- **The feed prints prefab names as weapons**: "with ak47u entity", "with bolt rifle entity".
The bridge sends `weapon` as the held entity's short prefab name, and Module-Rust's feed
prints it through `format.js`'s `prefab()`, which only turns dots and underscores into
spaces; the app does the same. It is in the captures as
the product shows it.
- **The app's first-run and sign-in screens say "shard"** ("Connect to your shard", "Sign in
with your shard account"), on every deployment, a Rust one included.
- **The permissions screen's Players tab lists Steam ids the rig already held**, among them
the org lead's own account from the player walk. That is the screen working (D31's reversal
adopts every grant), and why the capture opens the Groups tab; it is noted because any
demo pointed at a rig shows them.
--- ---
[api]: https://gitea.whitlocktech.com/RunicGateway/docs/src/branch/main/website/MODULE_API.md [api]: https://gitea.whitlocktech.com/RunicGateway/docs/src/branch/main/website/MODULE_API.md

View File

@@ -1,7 +1,7 @@
<!-- <!--
GENERATED FILE — do not edit. GENERATED FILE — do not edit.
Source: src/data/collection.mjs (scope "app") + src/data/legal.mjs Source: src/data/collection.mjs (scope "app", and the deletion row) + src/data/legal.mjs
Generator: scripts/playDataSafety.mjs Generator: scripts/playDataSafety.mjs
Edit the data file and run `npm run play:datasafety`. CI runs the same Edit the data file and run `npm run play:datasafety`. CI runs the same
@@ -19,49 +19,100 @@ The Play Console asks, for every category of data, whether the app **collects**
We operate **no server the app talks to.** The app ships pointed at nothing: its first screen asks for the address of a Runic Gateway deployment and validates it before anything else in the app runs. That deployment belongs to whoever runs that community. Data therefore travels from the device to *their* server, and there is no endpoint of ours anywhere in the path — not for content, not for telemetry, and not for crash reports, of which there are none. We operate **no server the app talks to.** The app ships pointed at nothing: its first screen asks for the address of a Runic Gateway deployment and validates it before anything else in the app runs. That deployment belongs to whoever runs that community. Data therefore travels from the device to *their* server, and there is no endpoint of ours anywhere in the path — not for content, not for telemetry, and not for crash reports, of which there are none.
That is why nearly every answer below is "not collected", and it is also the answer most likely to be questioned in a review. The supporting facts are in the table: each row names the file it was read out of. Play still counts what the app sends to that server as **collected**: the data leaves the device, and the form does not ask whose server it lands on. So everything the app sends is declared collected, not shared, and required, which is the conservative answer and the accurate one (org lead, 2026-10-29). What stays true, and what `/privacy` says, is that none of it reaches us.
Where the console offers free text about security practices, two things are worth saying: credentials are held in Android’s encrypted storage (AES-256-GCM via Jetpack Security), and push notifications carry **no content** — a relay receives a stream name and a reference, and the app fetches the actual message over its own authenticated connection. ## Data collection and security
## Data types - **Does the app collect or share any of the required user data types?** Yes, it collects them (below). It shares none.
- **Is all of the user data collected by the app encrypted in transit?** Yes. The release build’s network security config sets `cleartextTrafficPermitted="false"` for every connection, and the app refuses an `http` deployment address outside debug builds. Read from: `app/src/main/res/xml/network_security_config.xml`, `core/net/ServerUrl.kt`.
- **Is any of it processed ephemerally?** No. The deployment keeps what it receives, under its operator’s policy, and we cannot promise otherwise on its behalf.
- **Free text on security practices**, where the console offers it: credentials are held in Android’s encrypted storage (AES-256-GCM via Jetpack Security), and push notifications carry **no content**: a relay receives a stream name and a reference, and the app fetches the actual message over its own authenticated connection.
| Category | Data type | Collected by us | Shared by us | Answer | ## Data types the app collects
|---|---|---|---|---|
| Personal info | User IDs | No | No | Not collected by us. | | Category | Data type | Collected | Shared | Required | Purposes | From |
| Personal info | User IDs | No | No | Not collected by us. | |---|---|---|---|---|---|---|
| App info and performance | Other app data | No | No | Not collected by us. Stored on the device only. | | Personal info | Name | Yes | No | Yes | App functionality | Your name, email address and message, if you use Contact |
| Messages | Other in-app messages | No | No | Not collected by us. Declare the relay hop in the console’s free-text security section if it asks. | | Personal info | Email address | Yes | No | Yes | App functionality | Your name, email address and message, if you use Contact |
| Messages | Other user-generated content | No | No | Not collected by us. | | Personal info | User IDs | Yes | No | Yes | App functionality; Fraud prevention, security, and compliance; Account management | Your sign-in, and the tokens it issues; Linking a game account |
| Messages | Other in-app messages | No | No | Not collected by us. Stored on the device only. | | Messages | Other in-app messages | Yes | No | Yes | App functionality | Your name, email address and message, if you use Contact; What you post and send from the app |
| Device or other IDs | Device or other IDs | No | No | Not collected. | | App activity | App interactions | Yes | No | Yes | App functionality; Personalization | Which notifications you have read, and which you want |
| App activity | In-app search history | Yes | No | Yes | App functionality | What you search for |
| App activity | Other user-generated content | Yes | No | Yes | App functionality; Fraud prevention, security, and compliance; Personalization | What you post and send from the app; What you report, block or hide |
| App activity | Other actions | Yes | No | Yes | App functionality; Fraud prevention, security, and compliance; Personalization | What you report, block or hide |
| App info and performance | Diagnostics | Yes | No | Yes | App functionality; Fraud prevention, security, and compliance | The app’s version and your Android version |
| Device or other IDs | Device or other IDs | Yes | No | Yes | App functionality; Fraud prevention, security, and compliance; Account management | The trusted-device token and the device’s name, if you asked for one; Push registration, if you turn notifications on |
## Data types the app does not collect
The form lists every type, so every one is answered. Vocabulary read from Play Console Help on 2026-10-29; check it against the console’s current list.
- **Location:** none collected.
- **Personal info:** Address, Phone number, Race and ethnicity, Political or religious beliefs, Sexual orientation, Other info: not collected.
- **Financial info:** none collected.
- **Health and fitness:** none collected.
- **Messages:** Emails, SMS or MMS: not collected.
- **Photos and videos:** none collected.
- **Audio files:** none collected.
- **Files and docs:** none collected.
- **Calendar:** none collected.
- **Contacts:** none collected.
- **App activity:** Installed apps: not collected.
- **Web browsing:** none collected.
- **App info and performance:** Crash logs, Other app performance data: not collected.
## Held on the device only
Not collected, because none of it leaves the phone; listed so nobody declares it by mistake.
- **The address of the deployment you chose.** It never leaves the phone. It is the destination of requests, not the contents of one.
- **A snapshot of your notifications, so the inbox opens without a signal.** The snapshot is written on the phone from data the deployment had already delivered. It is not uploaded anywhere.
- **No analytics, no crash reporting, no advertising.** No crash reporter, no advertising ID, no analytics identifier, and no library that would generate one is linked into the build.
## Each answer, and why it is the truthful one ## Each answer, and why it is the truthful one
### Your sign-in tokens ### Your sign-in, and the tokens it issues
**Personal info → User IDs.** Not collected by us. **Personal info → User IDs.** Collected, not shared, required.
When you sign in to a deployment, the app keeps the access and refresh tokens it was issued, plus the username, role and account id they belong to. They are held in encrypted storage on the device (AES-256-GCM through Jetpack Security) and are sent to exactly one place: the deployment that issued them. Purposes: App functionality; Account management; Fraud prevention, security, and compliance.
- **Why that answer:** The credentials are issued by, and returned to, a server the user nominated. Nothing reaches an endpoint under our control, because we run none. Signing in sends your username and password to the deployment, or with single sign-on a one-time code from the provider, plus a two-factor code when the account has one. The deployment answers with an access and a refresh token and the username, role and account id they belong to. The tokens are held in encrypted storage on the device (AES-256-GCM through Jetpack Security) and are sent to exactly one place: the deployment that issued them, with every request. Changing your username or password, setting up two-factor sign-in and generating recovery codes from the app go to the same place. So does deleting the account, which sends your username, your password and, if the account has one, a two-factor code.
- **Retention:** On the device until you sign out
- **In detail:** Signing out clears them; uninstalling the app removes them with it.
- **Read from:** `core/auth/EncryptedTokenStore.kt`
### The trusted-device token, if you asked for one - **Why that answer:** The username, password and tokens leave the phone for the deployment the user chose, and Play counts that as collection whoever runs the server. None of it reaches us. Security is a purpose because the deployment checks two-factor codes and trusted devices with it.
- **Retention:** On the device until you sign out or delete the account
- **In detail:** Signing out clears them, and so does deleting the account; uninstalling the app removes them with it.
- **Read from:** `data/api/AuthApi.kt, data/api/SsoApi.kt, data/api/MeApi.kt, core/auth/EncryptedTokenStore.kt`
**Personal info → User IDs.** Not collected by us. ### The trusted-device token and the device’s name, if you asked for one
Ticking “trust this device” during two-factor sign-in stores an opaque token so the deployment can skip the second factor next time. It lives in its own encrypted store, deliberately separate from the session, because it has to outlive a sign-out to be worth anything — and the deployment holds only a hash of it, so the copy on your phone is the only usable one. **Device or other IDs → Device or other IDs.** Collected, not shared, required.
- **Why that answer:** Same as the session tokens: minted by the user’s deployment, stored on the device, presented back to that same deployment. Purposes: Account management; Fraud prevention, security, and compliance.
Ticking “trust this device” during two-factor sign-in stores an opaque token so the deployment can skip the second factor next time. It lives in its own encrypted store, deliberately separate from the session, because it has to outlive a sign-out to be worth anything — and the deployment holds only a hash of it, so the copy on your phone is the only usable one. The phone’s make and model, such as “Samsung SM-S918B”, goes with the request as the device’s label, so you can tell it apart in the deployment’s list of trusted devices. It is a model name, not a hardware identifier.
- **Why that answer:** The token identifies this device to the deployment, and the label is sent with it. Both are presented to the deployment that minted the token and to nothing else.
- **Retention:** On the device until it expires or you revoke it - **Retention:** On the device until it expires or you revoke it
- **In detail:** Thirty days, and revocable at any time from the deployment’s Trusted Devices screen, which is also where it can be revoked if the phone is lost. - **In detail:** Thirty days, and revocable at any time from the deployment’s Trusted Devices screen, which is also where it can be revoked if the phone is lost. Deleting the account from the app drops it from the phone too, since there is no next sign-in for it to skip.
- **Read from:** `core/auth/EncryptedTrustTokenStore.kt` - **Read from:** `core/auth/EncryptedTrustTokenStore.kt, core/auth/DeviceNameProvider.kt`
### The app’s version and your Android version
**App info and performance → Diagnostics.** Collected, not shared, required.
Purposes: App functionality; Fraud prevention, security, and compliance.
Every request carries a User-Agent such as “RunicGatewayApp/0.6.0 (Android 15)”. It is there because a deployment turns away traffic that looks like a scanner, and it names nothing about you or the phone beyond those two version numbers.
- **Why that answer:** It is technical information about the app and the device, and it is sent with every request. The deployment uses it to tell the app from a scanner.
- **Retention:** Under the deployment operator’s policy
- **In detail:** A deployment’s access log may keep it, as any web server keeps the user agent of a browser.
- **Read from:** `di/NetworkModule.kt, core/net/UserAgentInterceptor.kt`
### The address of the deployment you chose ### The address of the deployment you chose
**App info and performance → Other app data.** Not collected by us. Stored on the device only. **No console type.** Not collected. Stored on the device only.
The app ships pointed at nothing and asks for an address on first run. That address is stored in ordinary preferences rather than encrypted storage — it is not a secret, it is the equivalent of a bookmark — and it is what every other screen in the app talks to. The app ships pointed at nothing and asks for an address on first run. That address is stored in ordinary preferences rather than encrypted storage — it is not a secret, it is the equivalent of a bookmark — and it is what every other screen in the app talks to.
@@ -71,43 +122,110 @@ The app ships pointed at nothing and asks for an address on first run. That addr
### Push registration, if you turn notifications on ### Push registration, if you turn notifications on
**Messages → Other in-app messages.** Not collected by us. Declare the relay hop in the console’s free-text security section if it asks. **Device or other IDs → Device or other IDs.** Collected, not shared, required. Mention the relay in the free-text security section if the console asks.
Purposes: App functionality.
Push is off until you enable it. When you do, the app mints a random, unguessable topic name on the notification relay the deployment nominates, and registers that topic’s URL with the deployment so it has somewhere to send a nudge. What actually travels through the relay is content-free — a stream name and a reference, never the message — and the app then fetches the real content over its authenticated connection to the deployment. A leaked topic name therefore reveals nothing, which is the reason the relay needs no account and holds nothing about you. Push is off until you enable it. When you do, the app mints a random, unguessable topic name on the notification relay the deployment nominates, and registers that topic’s URL with the deployment so it has somewhere to send a nudge. What actually travels through the relay is content-free — a stream name and a reference, never the message — and the app then fetches the real content over its authenticated connection to the deployment. A leaked topic name therefore reveals nothing, which is the reason the relay needs no account and holds nothing about you.
- **Why that answer:** The notification passes through a relay chosen by the deployment, and it carries no content — the app pulls the content itself, authenticated. Neither hop reaches a server we operate. - **Why that answer:** The topic URL is an address for this device, and the app sends it to the deployment. The relay is the one the deployment nominates to deliver its own notifications, so it carries them on the deployment’s behalf rather than receiving a share. It only ever sees a topic name and a tickle; the app pulls the content itself, authenticated. No hop reaches a server we operate.
- **Retention:** Until you turn push off, sign out, or uninstall - **Retention:** Until you turn push off, sign out, delete the account, or uninstall
- **In detail:** Signing out or disabling push unregisters the device with the deployment and discards the topic. The relay retains whatever its own operator configures it to; if the deployment points at a relay it does not run, that relay is a third party to both of us, and it still only ever sees a tickle. - **In detail:** Signing out or disabling push unregisters the device with the deployment and discards the topic; deleting the account drops the registration on the deployment with everything else. The relay retains whatever its own operator configures it to; if the deployment points at a relay it does not run, that relay is a third party to both of us, and it still only ever sees a tickle.
- **Read from:** `core/push/NtfyTopic.kt, core/push/PushPreferences.kt` - **Read from:** `core/push/NtfyTopic.kt, core/push/PushPreferences.kt, data/api/NotificationsApi.kt`
### Everything you read and post in the app ### Linking a game account
**Messages → Other user-generated content.** Not collected by us. **Personal info → User IDs.** Collected, not shared, required.
Forum posts, Team activity, character and shard information, notification preferences: all of it is a live read or write against the deployment. Apart from the notification snapshot described in the next entry, nothing is cached for offline use and nothing is duplicated anywhere else — the app with no signal is an app with almost no content, which is a limitation and also an accurate description of where the data lives. Purposes: App functionality; Account management.
- **Why that answer:** Content is written to the community’s own installation. We have no copy, no access and no way to obtain one. Linking your site account to a game sends the one-time code the game gave you. Where a game server offers it, the app can also create a new game account, which sends the account name and password you chose. Unlinking sends the id being unlinked, such as a Steam id. All of it goes to the deployment, which keeps the link against your site account.
- **Why that answer:** Game account names, Steam ids and link codes identify a player, and the app sends them to the deployment.
- **Retention:** Held by the deployment until you unlink, under its operator’s policy
- **Read from:** `data/api/PlayerShardApi.kt, data/api/PlayerRustApi.kt, data/api/MeApi.kt`
### Your name, email address and message, if you use Contact
**Personal info → Name; Personal info → Email address; Messages → Other in-app messages.** Collected, not shared, required.
Purposes: App functionality.
The Contact screen sends the name, email address and message you type to the deployment, which passes them on to its operator by email so they can reply. Nothing is sent until you press send.
- **Why that answer:** The form’s three fields leave the phone for the deployment, whose operator receives them.
- **Retention:** Held by the deployment’s operator, under their policy
- **In detail:** The message is delivered to the operator’s mailbox, and kept as long as they keep it.
- **Read from:** `data/api/PublicApi.kt, data/api/dto/ContactDto.kt`
### What you post and send from the app
**Messages → Other in-app messages; App activity → Other user-generated content.** Collected, not shared, required.
Purposes: App functionality.
Most of the app is reading. What it sends is what you write, and most of that is for staff: news posts, wiki categories, a broadcast to the game, the answer to a player’s help page, and the account and reason on a kick or a ban. All of it is a live write to the deployment. Apart from the notification snapshot described below, nothing is cached for offline use and nothing is duplicated anywhere else — the app with no signal is an app with almost no content, which is a limitation and also an accurate description of where the data lives.
- **Why that answer:** Posts, broadcasts and replies are written to the community’s own installation. We have no copy, no access and no way to obtain one.
- **Retention:** Held by the deployment, under its operator’s policy - **Retention:** Held by the deployment, under its operator’s policy
- **Read from:** `PLAN.md §9 section 2` - **Read from:** `data/api/AdminApi.kt`
### What you report, block or hide
**App activity → Other user-generated content; App activity → Other actions.** Collected, not shared, required.
Purposes: App functionality; Fraud prevention, security, and compliance; Personalization.
Long-pressing a chat line offers Report, Hide for me and Block player. A report sends which line it is, the reason you picked and, if you wrote one, a note of up to 500 characters, so the deployment’s staff can review it. Hide for me and Block player send which line it is; the deployment works out who wrote it and keeps the hide or the block on your account, so it applies on the website and on every device. Your list of blocks, and unblocking someone, come from and go to the same place. For staff, Hide for everyone and Show to everyone again send the line too. Nothing is sent until you choose one.
- **Why that answer:** The report’s note is text the user writes, and reporting, blocking and hiding are actions the app sends to the deployment, which keeps them. Reports exist so staff can act on abuse; blocks and hides change what this one reader is shown.
- **Retention:** Held by the deployment, under its operator’s policy
- **In detail:** A block or a hide lasts until you remove it or delete the account, which deletes them. A report stays as a moderation record, with a copy of what the line said, until the operator removes it.
- **Read from:** `data/api/SafetyApi.kt, data/api/dto/SafetyDto.kt, data/api/RustApi.kt`
### Which notifications you have read, and which you want
**App activity → App interactions.** Collected, not shared, required.
Purposes: App functionality; Personalization.
Opening a notification marks it read on the deployment, so the badge agrees on every device you use. Your choice of notification streams, and of which arrive by push or email, is saved there too.
- **Why that answer:** Read state and preferences are actions in the app that are sent to, and kept by, the deployment.
- **Retention:** Held by the deployment, under its operator’s policy
- **Read from:** `data/api/NotificationsApi.kt`
### What you search for
**App activity → In-app search history.** Collected, not shared, required.
Purposes: App functionality.
Searching the wiki, a game’s market or its creature atlas sends what you typed to the deployment, because the deployment does the searching. The app keeps no history of searches.
- **Why that answer:** Search text leaves the phone in the request to the deployment.
- **Retention:** Under the deployment operator’s policy
- **In detail:** The query is part of the request’s address, so a deployment’s access log may record it. That is why it is declared rather than called ephemeral.
- **Read from:** `data/api/PublicApi.kt`
### A snapshot of your notifications, so the inbox opens without a signal ### A snapshot of your notifications, so the inbox opens without a signal
**Messages → Other in-app messages.** Not collected by us. Stored on the device only. **No console type.** Not collected. Stored on the device only.
The app keeps the most recent notifications it has already fetched — at most thirty, and only the first page — on the device, so opening the inbox shows you what you had rather than a spinner. It is a copy of what the deployment already sent you and it is refreshed from there; nothing is written here that was not read from your own account. It is scoped to the account that fetched it, so a second person signing in on the same phone is never shown the first one’s messages. The app keeps the most recent notifications it has already fetched — at most thirty, and only the first page — on the device, so opening the inbox shows you what you had rather than a spinner. It is a copy of what the deployment already sent you and it is refreshed from there; nothing is written here that was not read from your own account. It is scoped to the account that fetched it, so a second person signing in on the same phone is never shown the first one’s messages.
- **Why that answer:** The snapshot is written on the phone from data the deployment had already delivered. It is not uploaded anywhere, and no server we operate is on either end of it. - **Why that answer:** The snapshot is written on the phone from data the deployment had already delivered. It is not uploaded anywhere.
- **Retention:** Until you sign out, or the thirty are pushed out by newer ones - **Retention:** Until you sign out or delete the account, or the thirty are pushed out by newer ones
- **In detail:** Signing out deletes the snapshot outright. It lives in the app’s ordinary preference store rather than the encrypted one — sign-in tokens are the thing that store is for — which is worth stating plainly: on a device where someone has root, these are readable, and they are notification bodies rather than credentials. - **In detail:** Signing out, or deleting the account, deletes the snapshot outright. It lives in the app’s ordinary preference store rather than the encrypted one — sign-in tokens are the thing that store is for — which is worth stating plainly: on a device where someone has root, these are readable, and they are notification bodies rather than credentials.
- **Read from:** `core/inbox/DataStoreInboxCache.kt, data/repository/AuthRepository.kt` - **Read from:** `core/inbox/DataStoreInboxCache.kt, data/repository/AuthRepository.kt`
### No analytics, no crash reporting, no advertising ### No analytics, no crash reporting, no advertising
**Device or other IDs → Device or other IDs.** Not collected. **App info and performance → Crash logs.** Not collected. The advertising ID declaration is "no".
There is no third-party SDK in the app at all — no Firebase, no Crashlytics, no advertising identifier, no measurement library. That is checkable rather than claimed: it is what the dependency list and the manifest say, and a build that gained one would gain permissions with it. There is no third-party SDK in the app at all — no Firebase, no Crashlytics, no advertising identifier, no measurement library. That is checkable rather than claimed: it is what the dependency list and the manifest say, and a build that gained one would gain permissions with it.
- **Why that answer:** No advertising ID, no analytics identifier, and no library that would generate one is linked into the build. - **Why that answer:** No crash reporter, no advertising ID, no analytics identifier, and no library that would generate one is linked into the build.
- **Retention:** Nothing to retain - **Retention:** Nothing to retain
- **Read from:** `app/build.gradle.kts, app/src/main/AndroidManifest.xml` - **Read from:** `app/build.gradle.kts, app/src/main/AndroidManifest.xml`
@@ -115,8 +233,31 @@ There is no third-party SDK in the app at all — no Firebase, no Crashlytics, n
- **Privacy policy URL:** `/privacy` on this site. It is the URL Play is given, and section 2 of it is about the app specifically. - **Privacy policy URL:** `/privacy` on this site. It is the URL Play is given, and section 2 of it is about the app specifically.
- **Target audience:** adults. The beta is stated as **18 or older** (D31); the app contains no content directed at children and no age verification. - **Target audience:** adults. The beta is stated as **18 or older** (D31); the app contains no content directed at children and no age verification.
- **Account deletion:** the app creates no account with us — an account belongs to the deployment the user chose, and is deleted there. The only list we hold is the beta signup, which is erased on request; `/privacy` section 4 says how to ask. - **Accounts the app can start:** the sign-in screen links to the deployment’s own sign-up page, which opens in the browser, and where a game server offers it the app creates a game account on it. Read from: `ui/auth/LoginViewModel.kt`, `data/api/PlayerShardApi.kt`.
- **Data deletion request URL:** the contact address published on `/privacy`, which is read from the mounted `brand.json` rather than typed anywhere in the source (D13). - **Can users delete their account? Yes,** in the app (*My account* → *Delete my account…*) and on the deployment’s website (*Account* → *Delete my account*). It takes the password, and a two-factor code where the account has one, and the account is deleted at once. The account belongs to the deployment the user chose, so it is deleted there; we hold none. Read from: `ui/auth/DeleteAccountScreen.kt`, `data/api/MeApi.kt`.
- **Delete account URL:** `/delete-account/` on this site (D85). It names the app and us, gives the steps in the app and on the website, says what is deleted and what is kept and for how long, and tells someone who cannot sign in to ask their community’s operator, who can delete any account from the admin panel (D86).
- **Deleting some data without deleting the account:** the deployment holds it, so that is a request to its operator. The one list we hold, the beta signup, is erased on request; `/privacy` section 4 says how to ask.
## What an account deletion deletes and keeps
The console asks what is deleted and what is kept. These are the same words `/delete-account/` renders, from the same row of `src/data/collection.mjs`.
**Deleted at once:**
- your sign-in, password, email address, two-factor settings and recovery codes
- every signed-in device, trusted device and push registration
- your linked sign-ins, such as Google, Discord or Steam
- your game-account links, and anything this site granted in the game through them
- your notification settings and inbox
**Kept:**
- What you wrote where others read it, such as forum posts, stays. Other members see it as written by “[deleted player]”. *Until a moderator or the operator removes it, as with any post.*
- Reports you filed and appeals you made stay as moderation records. Staff can still see who it was, and the activity log keeps its IP addresses. *Until the operator removes them.*
- Event results stay with the score and the in-game name, with no site account behind them. *Until the operator removes them.*
- A game account stays on the game server. Only its link to this site goes. *For as long as the game server keeps it, which is up to whoever runs that server.*
- The record of notifications sent to you keeps a one-way hash of your email address, never the address, and no longer names your account. An address that bounced or was reported as spam stays on the suppression list, so it is never mailed again. *The record is swept after a period the operator sets, 180 days by default. The suppression list does not expire.*
- If you were staff, your username can never be used again, by anyone.
## What the website collects, for the same reviewer ## What the website collects, for the same reviewer
@@ -128,4 +269,4 @@ Not part of the Data Safety form — that form is about the app — but a review
- **Your browser’s user-agent string, truncated** — With the row; blanked on removal. - **Your browser’s user-agent string, truncated** — With the row; blanked on removal.
- **The web server’s access log** — Short-term operational retention, then rotated away. - **The web server’s access log** — Short-term operational retention, then rotated away.
Last generated from data dated 2026-09-01. Regenerate with `npm run play:datasafety` after any change to what the app stores. Last generated from data dated 2026-10-30. Regenerate with `npm run play:datasafety` after any change to what the app stores.

View File

@@ -32,7 +32,7 @@ npm run build # → dist/ (prerendered pages + the Node server entry)
npm start # serve the built site npm start # serve the built site
``` ```
Node 22 LTS or newer. Nothing else — no database, no game server, no container runtime. Node 22.23.4+ (or 24.22.1+); older builds carry the Node2Shell Brotli bug, CVE-2026-111497. Nothing else — no database, no game server, no container runtime.
## Running it in production ## Running it in production
@@ -56,7 +56,7 @@ that would otherwise decay quietly.
```bash ```bash
npm run check:sidebar # the rendered docs tree still matches the planned one npm run check:sidebar # the rendered docs tree still matches the planned one
npm run check:terms # no game's vocabulary outside that game's section npm run check:terms # no game's vocabulary outside its section: docs + sidebar
npm run check:screens # every screenshot has an entry, at the size declared npm run check:screens # every screenshot has an entry, at the size declared
npm run check:tokens # no colour literal outside the token file npm run check:tokens # no colour literal outside the token file
npm run check:brand # the branding pipeline's two quiet failures npm run check:brand # the branding pipeline's two quiet failures
@@ -65,6 +65,7 @@ npm run check # astro check
npm test # the beta signup's decision path, and the policy data npm test # the beta signup's decision path, and the policy data
npm run build # everything below reads the build npm run build # everything below reads the build
npm run check:links # every internal link resolves npm run check:links # every internal link resolves
npm run check:terms:built # the same rule over every built page, as rendered
GITEA_TOKEN=<token> npm run check:facts # every version agrees with its authority GITEA_TOKEN=<token> npm run check:facts # every version agrees with its authority
GITEA_TOKEN=<token> npm run check:quickstart # the install page still matches website's own files GITEA_TOKEN=<token> npm run check:quickstart # the install page still matches website's own files
GITEA_TOKEN=<token> npm run check:reference # every name the Reference lists still exists GITEA_TOKEN=<token> npm run check:reference # every name the Reference lists still exists
@@ -229,11 +230,15 @@ src/
data/collection.mjs What is collected, in three scopes. /privacy renders it and the data/collection.mjs What is collected, in three scopes. /privacy renders it and the
Play Data Safety notes are generated from it — one inventory. Play Data Safety notes are generated from it — one inventory.
data/legal.mjs The values /terms, /privacy and the consent sentence must share. data/legal.mjs The values /terms, /privacy and the consent sentence must share.
data/games/ One file per game, in that game's words, checked against its
module's capabilities. Only that game's pages render it.
styles/tokens.css THE token file — the only place a colour literal may appear. styles/tokens.css THE token file — the only place a colour literal may appear.
styles/global.css The layout shell, built entirely from tokens. styles/global.css The layout shell, built entirely from tokens.
styles/starlight.css Restates our tokens as Starlight's, so the docs cannot drift. styles/starlight.css Restates our tokens as Starlight's, so the docs cannot drift.
layouts/, components/ The marketing chrome. layouts/, components/ The marketing chrome.
pages/ Marketing routes. pages/ Marketing routes.
pages/modules/ One page per game module; with /runicnpc/, the only marketing
routes that may use a game's own words (D63, checkTerms --built).
pages/beta.astro The signup. Renders AND handles its own POST — runs per request. pages/beta.astro The signup. Renders AND handles its own POST — runs per request.
content/docs/docs/ Documentation. The extra level mounts Starlight at /docs. content/docs/docs/ Documentation. The extra level mounts Starlight at /docs.
pages/brand/ GET /brand/* — the mount, resolved and derived. Runs per request. pages/brand/ GET /brand/* — the mount, resolved and derived. Runs per request.

View File

@@ -23,13 +23,22 @@
"giteaOrg": "https://gitea.whitlocktech.com/RunicGateway", "giteaOrg": "https://gitea.whitlocktech.com/RunicGateway",
"$comment_demo": [ "$comment_demo": [
"§15 / D12. A public demo instance is planned and out of scope today. The homepage's", "§15 / D12. The public demo's address, e.g. https://demo.runicgateway.com. The",
"'See it running' slot and /features/'s per-capability affordance render only when this", "homepage's 'See it running' slot and /features/'s per-capability affordance render only",
"is a non-empty URL, so the site gains a working demo by way of one line in a mounted", "when this is a non-empty URL, so the site gains a working demo by way of one line in a",
"file — no rebuild, consistent with §7." "mounted file — no rebuild, consistent with §7. /beta also reads the demo's published",
"sign-ins from it, on the next request (D82)."
], ],
"demoUrl": "", "demoUrl": "",
"$comment_demoGames": [
"D83. The game modules the demo at demoUrl runs, by module id (\"rust\", \"uo\"). A",
"'See it running' link into a game's own pages shows only for a game listed here, so",
"a Rust demo never links to a /uo/ page it does not have. Core's links (the wiki, the",
"event calendar, news) follow demoUrl alone. Read at the next restart, like demoUrl."
],
"demoGames": [],
"$comment_beta": [ "$comment_beta": [
"PLAN.md §8 / D27. The Google Play closed-test opt-in URL. Empty until the track", "PLAN.md §8 / D27. The Google Play closed-test opt-in URL. Empty until the track",
"exists, and /beta renders a waiting state rather than a broken link while it is.", "exists, and /beta renders a waiting state rather than a broken link while it is.",

View File

@@ -23,16 +23,17 @@
"check:reference": "node scripts/checkReference.mjs", "check:reference": "node scripts/checkReference.mjs",
"check:sidebar": "node scripts/checkSidebar.mjs", "check:sidebar": "node scripts/checkSidebar.mjs",
"check:terms": "node scripts/checkTerms.mjs", "check:terms": "node scripts/checkTerms.mjs",
"check:terms:built": "node scripts/checkTerms.mjs --built",
"check:screens": "node scripts/checkScreens.mjs", "check:screens": "node scripts/checkScreens.mjs",
"check:a11y": "node scripts/checkA11y.mjs", "check:a11y": "node scripts/checkA11y.mjs",
"check:csp": "node scripts/checkCsp.mjs", "check:csp": "node scripts/checkCsp.mjs",
"play:datasafety": "node scripts/playDataSafety.mjs", "play:datasafety": "node scripts/playDataSafety.mjs",
"beta": "node scripts/beta.mjs", "beta": "node scripts/beta.mjs",
"test": "node --test test/beta.test.mjs test/legal.test.mjs test/footer.test.mjs", "test": "node --test test/beta.test.mjs test/legal.test.mjs test/footer.test.mjs test/demo.test.mjs",
"brand:assets": "node scripts/buildBrandAssets.mjs", "brand:assets": "node scripts/buildBrandAssets.mjs",
"screens:capture": "node scripts/captureScreens.mjs", "screens:capture": "node scripts/captureScreens.mjs",
"csp:hashes": "node scripts/checkCsp.mjs --reset && astro build && node scripts/checkCsp.mjs --write && astro build && node scripts/checkCsp.mjs", "csp:hashes": "node scripts/checkCsp.mjs --reset && astro build && node scripts/checkCsp.mjs --write && astro build && node scripts/checkCsp.mjs",
"verify": "npm run check:sidebar && npm run check:terms && npm run check:screens && npm run check:tokens && npm run check:brand && npm run check:datasafety && npm run check && npm test && npm run build && npm run check:links && npm run check:facts && npm run check:quickstart && npm run check:reference && npm run test:served && npm run check:a11y && npm run check:csp", "verify": "npm run check:sidebar && npm run check:terms && npm run check:screens && npm run check:tokens && npm run check:brand && npm run check:datasafety && npm run check && npm test && npm run build && npm run check:links && npm run check:terms:built && npm run check:facts && npm run check:quickstart && npm run check:reference && npm run test:served && npm run check:a11y && npm run check:csp",
"test:served": "node --test test/headers.test.mjs" "test:served": "node --test test/headers.test.mjs"
}, },
"dependencies": { "dependencies": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -193,17 +193,38 @@ if (demoFrom !== demoTo) {
* because `global.css` hides `[data-demo-url='']` — the visibility rule stays one rule for * because `global.css` hides `[data-demo-url='']` — the visibility rule stays one rule for
* both kinds of link, and only the `href` differs. * both kinds of link, and only the `href` differs.
*/ */
const DEEP_LINK = /href="[^"]*" data-demo-url="[^"]*" data-demo-path="([^"]*)"/g; const DEEP_LINK = /href="[^"]*" data-demo-url="[^"]*" data-demo-path="([^"]*)"(?: data-demo-game="([^"]*)")?/g;
const deepLinkTo = (demoPath) => { /**
const href = demoTo ? `${demoTo.replace(/\/+$/, '')}${demoPath}` : ''; * Which games the demo runs (D83). A deep link into a game module's pages carries that
* game's id in `data-demo-game`, and it is filled only when the mounted `demoGames` names
* it: the demo is a Rust deployment, and a `/uo/market` link into it is a 404. Core's own
* links (`/wiki`, `/site/events`) carry no game and follow `demoUrl` alone, because every
* deployment has them.
*
* An absent or malformed list means no game's links, not every game's. A demo whose games
* nobody named is one whose game links cannot be known to work.
*/
const gamesOf = (value) => (Array.isArray(value) ? value.filter((id) => typeof id === 'string') : []);
const gamesFrom = gamesOf(previous.demoGames);
const gamesTo = gamesOf(resolved.demoGames);
const gamesChanged = gamesFrom.join(',') !== gamesTo.join(',');
if ('demoGames' in mounted && !Array.isArray(mounted.demoGames)) {
console.warn('[brand] the mounted "demoGames" is not a list of game ids — no game links will show.');
}
const deepLinkTo = (demoPath, game) => {
const root = !game || gamesTo.includes(game) ? demoTo : '';
const href = root ? `${root.replace(/\/+$/, '')}${demoPath}` : '';
return ( return (
`href="${escapeHtml(href)}" data-demo-url="${escapeHtml(demoTo)}" ` + `href="${escapeHtml(href)}" data-demo-url="${escapeHtml(root)}" ` +
`data-demo-path="${demoPath}"` `data-demo-path="${demoPath}"` +
(game === undefined ? '' : ` data-demo-game="${game}"`)
); );
}; };
if (!replacements.length) { if (!replacements.length && !gamesChanged) {
console.log('[brand] mount matches what is already applied; nothing to rewrite.'); console.log('[brand] mount matches what is already applied; nothing to rewrite.');
process.exit(0); process.exit(0);
} }
@@ -303,8 +324,8 @@ for (const file of walk(CLIENT)) {
// After the literal swaps, never before: the plain-slot replacement also matches the // After the literal swaps, never before: the plain-slot replacement also matches the
// first two attributes of a deep link, so it runs first and this pass corrects the // first two attributes of a deep link, so it runs first and this pass corrects the
// `href` it just wrote. Recomputing rather than replacing is what makes that safe. // `href` it just wrote. Recomputing rather than replacing is what makes that safe.
after = after.replace(DEEP_LINK, (whole, demoPath) => { after = after.replace(DEEP_LINK, (whole, demoPath, game) => {
const rebuilt = deepLinkTo(demoPath); const rebuilt = deepLinkTo(demoPath, game);
if (rebuilt !== whole) counts.set('demoDeep', counts.get('demoDeep') + 1); if (rebuilt !== whole) counts.set('demoDeep', counts.get('demoDeep') + 1);
return rebuilt; return rebuilt;
}); });
@@ -330,6 +351,9 @@ if (counts.get('demoDeep')) {
` ${'demoUrl deep'.padEnd(14)} ${demoTo ? `linked -> ${demoTo}/…` : 'links hidden'} (${counts.get('demoDeep')}x)` ` ${'demoUrl deep'.padEnd(14)} ${demoTo ? `linked -> ${demoTo}/…` : 'links hidden'} (${counts.get('demoDeep')}x)`
); );
} }
if (gamesChanged) {
console.log(` ${'demoGames'.padEnd(14)} ${gamesTo.length ? gamesTo.join(', ') : 'no game links'}`);
}
if (inlineCollisions.length) { if (inlineCollisions.length) {
console.error( console.error(

View File

@@ -138,6 +138,23 @@ for (const shot of todo) {
try { try {
await page.goto(url, { waitUntil: 'networkidle2', timeout: 30_000 }); await page.goto(url, { waitUntil: 'networkidle2', timeout: 30_000 });
// A screen whose subject is behind a tab or a button the route cannot reach. Each step is
// the visible text the element starts with; the first visible button, link or tab that
// matches is clicked. A step that matches nothing fails the shot rather than capturing
// the wrong screen.
for (const label of shot.click ?? []) {
const clicked = await page.evaluate((text) => {
const candidates = [...document.querySelectorAll('button, a, [role="tab"], [role="button"], li')];
const hit = candidates.find(
(el) => el.offsetParent !== null && el.textContent.trim().startsWith(text),
);
if (hit) hit.click();
return Boolean(hit);
}, label);
if (!clicked) throw new Error(`nothing to click starting "${label}"`);
await new Promise((resolve) => setTimeout(resolve, 800));
}
if (shot.scrollY) { if (shot.scrollY) {
await page.evaluate((y) => window.scrollTo(0, y), shot.scrollY); await page.evaluate((y) => window.scrollTo(0, y), shot.scrollY);
} }

View File

@@ -32,6 +32,7 @@ import path from 'node:path';
import sharp from 'sharp'; import sharp from 'sharp';
import { classify } from '../src/lib/brandAssets.mjs'; import { classify } from '../src/lib/brandAssets.mjs';
import { games } from '../src/data/games/index.mjs';
const ROOT = fileURLToPath(new URL('..', import.meta.url)); const ROOT = fileURLToPath(new URL('..', import.meta.url));
const DEFAULTS = path.join(ROOT, 'brand-default'); const DEFAULTS = path.join(ROOT, 'brand-default');
@@ -157,6 +158,20 @@ if (brand) {
} }
} }
// D83: the one list-valued field. Each entry is a game module's id, checked against the
// games this site describes, so a typo is a failed build rather than a demo whose game
// links silently never appear.
const gameIds = games.map((game) => game.key);
if (!Array.isArray(brand.demoGames)) {
fail('brand.json is missing the list field "demoGames" (an empty list is the stock value).');
} else {
for (const id of brand.demoGames) {
if (!gameIds.includes(id)) {
fail(`brand.json's "demoGames" names ${JSON.stringify(id)}, which is not one of ${gameIds.join(', ')}.`);
}
}
}
/** /**
* Kept in step with `TEXT_FIELDS` in `applyBrand.mjs` by reading that file rather than by * Kept in step with `TEXT_FIELDS` in `applyBrand.mjs` by reading that file rather than by
* restating the list. A field added there and forgotten here would be unchecked; a field * restating the list. A field added there and forgotten here would be unchecked; a field
@@ -348,6 +363,23 @@ if (!deepPattern) {
); );
} }
// A game's link (D83) must also be read WITH its game. A pattern that matched the first
// three attributes and dropped the fourth would treat a /uo/ link as a core one and fill
// it on every demo, which is the 404 the attribute exists to prevent.
const gameSample = `${sample} data-demo-game="rust"`;
let gameRead = null;
try {
gameRead = new RegExp(deepPattern[1]).exec(gameSample)?.[2] ?? null;
} catch {
// Reported above.
}
if (gameRead !== 'rust') {
fail(
`applyBrand.mjs's DEEP_LINK does not read the game out of \`${gameSample}\`.\n` +
' Game links would follow demoUrl alone and point into modules the demo may not run.'
);
}
const deepStrays = []; const deepStrays = [];
let deepLinks = 0; let deepLinks = 0;

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env node #!/usr/bin/env node
/** /**
* checkTerms.mjs — PLAN.md §16, D63 and D64. The twelfth check, added in phase 14. * checkTerms.mjs — PLAN.md §16, D63 and D64. The twelfth check, added in phase 14 and widened
* to the whole site in phase 17 (D79).
* *
* D63: outside a game's own section, the site may NAME the games it supports, but it may not * D63: outside a game's own section, the site may NAME the games it supports, but it may not
* use their VOCABULARY. Core concepts keep core's names — a Team, a game server, the sidecar, * use their VOCABULARY. Core concepts keep core's names — a Team, a game server, the sidecar,
@@ -13,7 +14,12 @@
* was measured before this check existed — "shard" 227 times in 45 files — and none of that * was measured before this check existed — "shard" 227 times in 45 files — and none of that
* was anybody's decision; it was the residue of a site written while there was one game. * was anybody's decision; it was the residue of a site written while there was one game.
* *
* What it reads, as of phase 14: * It runs in two passes, one before the build and one after.
*
* node scripts/checkTerms.mjs # the SOURCE pass: docs pages and the sidebar
* node scripts/checkTerms.mjs --built # the BUILT pass: every page in dist/, as rendered
*
* ── The source pass (phase 14) ──────────────────────────────────────────────────────────
* *
* - every page under `src/content/docs`, frontmatter included (a title and a description * - every page under `src/content/docs`, frontmatter included (a title and a description
* are what a reader sees first, in the sidebar and in search results); * are what a reader sees first, in the sidebar and in search results);
@@ -21,29 +27,44 @@
* page label, in both trees. Its comments are not scanned, because a comment is not * page label, in both trees. Its comments are not scanned, because a comment is not
* something a reader of the site ever sees. * something a reader of the site ever sees.
* *
* Phase 17 widens it to all of `src/`, once the marketing pages have a game page to move * It needs no build, so it runs early and fails fast, and it names a file and a line.
* their game content to. That is also when it learns D67's screenshot tag.
* *
* Where a game's words are allowed: * ── The built pass (phase 17, D79) ──────────────────────────────────────────────────────
* *
* - in that game's own docs directory (`GAME_DIRS`), and its own sidebar group — a group * The marketing pages are `.astro` templates fed from `src/data/`, so most of the words a
* reader sees on them are not in the template at all: a capability's label, a screenshot's
* caption, a version read from `platform.json`. A source scan sees an expression and skips
* it, or sees an id like `shard-status` and takes it for prose. So this pass reads what the
* build actually produced — the same argument `checkLinks.mjs` makes for links. For every
* page in `dist/client` it reads the visible text, plus `alt`, `title`, `aria-label`,
* `placeholder`, the `<title>` and the meta description. It does not read link targets,
* scripts, styles or comments. It names a route and a snippet rather than a line; the source
* pass still gives lines for the docs, where most of the words are.
*
* Two parts of every docs page are skipped, because each is checked somewhere better:
* Starlight's sidebar (the source pass reads both trees as data, group by group) and the
* previous/next links (each is a neighbouring page's title, checked on that page).
*
* ── Where a game's words are allowed ────────────────────────────────────────────────────
*
* - in that game's own docs directory (`GAME_DIRS`) and its own sidebar group — a group
* whose label is the game's `name` in `platform.json`; * whose label is the game's `name` in `platform.json`;
* - between `<GameExample game="…">` tags on a core page (D68). The component prints the * - on that game's own routes (`GAME_ROUTES`): its docs group, its module page, and for
* game's name above the block, so the words arrive already labelled. * Rust the standalone RunicNPC page;
* - inside an element marked `data-game="…"`: `<GameExample>` on a docs page (D68) and a
* game-tagged `<Screenshot>` (D67). Both print the game's name beside the words, which is
* the bargain: a game's words are honest on a core page when the game is named right
* there. In the source pass, the `<GameExample>` tags themselves mark the region.
* *
* What is NOT read, deliberately: * What is NOT read, deliberately: link targets and bare URLs or paths (a repository is called
* what it is called, and an address is not prose — but LINK TEXT is read, so `[Module-uo](…)`
* fails and `[releases](…)` passes), MDX `import` lines, and, in the source pass only, `{…}`
* expressions — the built pass reads what they rendered.
* *
* - link targets and bare URLs. A repository is called what it is called, and an address is * No token and no network: everything it reads is in this repository or its build output.
* not prose. The LINK TEXT is read, so `[Module-uo](…)` fails and `[releases](…)` passes;
* - `import` lines and `{…}` expressions. They are code, and what an expression renders is
* a value from `platform.json` or `src/data/`, which phase 17 brings into scope.
*
* node scripts/checkTerms.mjs
*
* No token and no network: everything it reads is in this repository.
*/ */
import { readFileSync } from 'node:fs'; import { readFileSync, existsSync } from 'node:fs';
import { readdir } from 'node:fs/promises'; import { readdir } from 'node:fs/promises';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
import path from 'node:path'; import path from 'node:path';
@@ -52,6 +73,7 @@ import { docsSidebar, plannedSidebar, flatLabels } from '../src/config/sidebar.m
const ROOT = fileURLToPath(new URL('..', import.meta.url)); const ROOT = fileURLToPath(new URL('..', import.meta.url));
const platform = JSON.parse(readFileSync(path.join(ROOT, 'src/data/platform.json'), 'utf8')); const platform = JSON.parse(readFileSync(path.join(ROOT, 'src/data/platform.json'), 'utf8'));
const BUILT = process.argv.includes('--built');
/** /**
* The words, each tagged with the game it belongs to. Matching is case-insensitive and on * The words, each tagged with the game it belongs to. Matching is case-insensitive and on
@@ -90,20 +112,32 @@ const GAME_DIRS = {
}; };
/** /**
* The allowlist: an exact phrase in one file that may use a word the rule would otherwise * Each game's own routes, for the built pass: its docs group, the page about its module, and
* refuse. Short on purpose, and every entry says why. An entry that no longer matches its * for Rust the standalone RunicNPC page (D61), which a server owner reads without knowing what
* file fails the check too, so the list cannot rot into a set of permanent exemptions. * the platform is. A route matches when the page's path starts with one of these.
*/
const GAME_ROUTES = {
uo: ['/docs/ultima-online/', '/modules/uo/'],
rust: ['/docs/rust/', '/modules/rust/', '/runicnpc/'],
};
/**
* The allowlist: an exact phrase on one page that may use a word the rule would otherwise
* refuse. Short on purpose, and every entry says why. `file` is where the source pass meets
* it and `route` is where the built pass does. An entry that no longer matches fails the
* check too, so the list cannot rot into a set of permanent exemptions.
*/ */
const ALLOW = [ const ALLOW = [
{ {
file: 'src/content/docs/docs/administration/notifications-and-email.mdx', file: 'src/content/docs/docs/administration/notifications-and-email.mdx',
route: '/docs/administration/notifications-and-email/',
text: 'Guild (server) ID', text: 'Guild (server) ID',
why: "Discord's own word, not a game's: it is the label on core's Discord Bot screen.", why: "Discord's own word, not a game's: it is the label on core's Discord Bot screen.",
}, },
]; ];
for (const game of Object.keys(GAME_DIRS)) { for (const game of new Set([...Object.keys(GAME_DIRS), ...Object.keys(GAME_ROUTES)])) {
if (!platform.games[game]) throw new Error(`checkTerms: GAME_DIRS names "${game}", which platform.json does not.`); if (!platform.games[game]) throw new Error(`checkTerms: "${game}" is given a section here, but platform.json has no such game.`);
} }
for (const t of TERMS) { for (const t of TERMS) {
if (!platform.games[t.game]) throw new Error(`checkTerms: "${t.word}" is tagged "${t.game}", which platform.json does not know.`); if (!platform.games[t.game]) throw new Error(`checkTerms: "${t.word}" is tagged "${t.game}", which platform.json does not know.`);
@@ -115,6 +149,35 @@ const fail = (where, detail) => failures.push({ where, detail });
/** Replace a span with spaces, keeping newlines, so later line numbers stay true. */ /** Replace a span with spaces, keeping newlines, so later line numbers stay true. */
const blank = (text) => text.replace(/[^\n]/g, ' '); const blank = (text) => text.replace(/[^\n]/g, ' ');
/** Hits for every term the given context may not use. `allowed` is a game key, or null. */
function scan(text, allowed) {
const hits = [];
for (const t of TERMS) {
if (t.game === allowed) continue;
t.re.lastIndex = 0;
for (const m of text.matchAll(t.re)) hits.push({ term: t, value: m[0], index: m.index });
}
return hits;
}
const gameName = (game) => platform.games[game].name;
async function* walk(dir, pattern) {
let entries;
try {
entries = await readdir(dir, { withFileTypes: true });
} catch {
return;
}
for (const entry of entries) {
const full = path.join(dir, entry.name);
if (entry.isDirectory()) yield* walk(full, pattern);
else if (pattern.test(entry.name)) yield full;
}
}
// ═══ The source pass ═══════════════════════════════════════════════════════════════════
/** The game whose directory holds this file, or null for a core page. */ /** The game whose directory holds this file, or null for a core page. */
function gameOfPath(relative) { function gameOfPath(relative) {
const posix = relative.split(path.sep).join('/'); const posix = relative.split(path.sep).join('/');
@@ -122,6 +185,10 @@ function gameOfPath(relative) {
return null; return null;
} }
function lineOf(source, index) {
return source.slice(0, index).split('\n').length;
}
/** /**
* Turn an MDX source into the text a reader would actually see, with everything that is not * Turn an MDX source into the text a reader would actually see, with everything that is not
* prose blanked out. Returns that text plus the GameExample regions, as offsets into it. * prose blanked out. Returns that text plus the GameExample regions, as offsets into it.
@@ -162,110 +229,221 @@ function proseOf(source, relative) {
return { text, regions }; return { text, regions };
} }
function lineOf(source, index) { async function sourcePass() {
return source.slice(0, index).split('\n').length; // ── 1. The documentation pages ──
} let files = 0;
const allowUsed = new Set();
/** Hits for every term the given context may not use. */ for await (const file of walk(path.join(ROOT, 'src', 'content', 'docs'), /\.mdx?$/)) {
function scan(text, allowedGame) { const relative = path.relative(ROOT, file).split(path.sep).join('/');
const hits = []; const source = readFileSync(file, 'utf8').replace(/\r\n/g, '\n');
for (const t of TERMS) { files++;
if (t.game === allowedGame) continue;
t.re.lastIndex = 0;
for (const m of text.matchAll(t.re)) hits.push({ term: t, value: m[0], index: m.index });
}
return hits;
}
async function* walk(dir) { let { text, regions } = proseOf(source, relative);
let entries;
try {
entries = await readdir(dir, { withFileTypes: true });
} catch {
return;
}
for (const entry of entries) {
const full = path.join(dir, entry.name);
if (entry.isDirectory()) yield* walk(full);
else if (/\.mdx?$/.test(entry.name)) yield full;
}
}
// ── 1. The documentation pages ────────────────────────────────────────────── for (const [i, entry] of ALLOW.entries()) {
let files = 0; if (entry.file !== relative) continue;
const allowUsed = new Set(); if (text.includes(entry.text)) {
allowUsed.add(i);
text = text.split(entry.text).join(blank(entry.text));
}
}
for await (const file of walk(path.join(ROOT, 'src', 'content', 'docs'))) { const pageGame = gameOfPath(relative);
const relative = path.relative(ROOT, file).split(path.sep).join('/'); for (const hit of scan(text, pageGame)) {
const posix = relative; const region = regions.find((r) => hit.index >= r.start && hit.index < r.end);
const source = readFileSync(file, 'utf8').replace(/\r\n/g, '\n'); if (region && region.game === hit.term.game) continue;
files++; const where = region ? `inside <GameExample game="${region.game}">` : pageGame ? `in the ${gameName(pageGame)} group` : 'on a core page';
fail(`${relative}:${lineOf(source, hit.index)}`, `"${hit.value}" is ${gameName(hit.term.game)} vocabulary, ${where}`);
let { text, regions } = proseOf(source, relative);
for (const [i, entry] of ALLOW.entries()) {
if (entry.file !== posix) continue;
if (text.includes(entry.text)) {
allowUsed.add(i);
text = text.split(entry.text).join(blank(entry.text));
} }
} }
const pageGame = gameOfPath(relative); for (const [i, entry] of ALLOW.entries()) {
for (const hit of scan(text, pageGame)) { if (!allowUsed.has(i)) fail(`allowlist: ${entry.file}`, `"${entry.text}" no longer appears there — remove the entry`);
const region = regions.find((r) => hit.index >= r.start && hit.index < r.end);
if (region && region.game === hit.term.game) continue;
const where = region ? `inside <GameExample game="${region.game}">` : pageGame ? `in the ${platform.games[pageGame].name} group` : 'on a core page';
fail(
`${relative}:${lineOf(source, hit.index)}`,
`"${hit.value}" is ${platform.games[hit.term.game].name} vocabulary, ${where}`,
);
} }
}
for (const [i, entry] of ALLOW.entries()) { // ── 2. The sidebar, as data ──
if (!allowUsed.has(i)) { const gameByName = new Map(Object.entries(platform.games).map(([key, g]) => [g.name, key]));
fail(`allowlist: ${entry.file}`, `"${entry.text}" no longer appears there — remove the entry`); const trees = [
} ['docsSidebar', docsSidebar.map((g) => [g.label, flatLabels(g.items)])],
} ['plannedSidebar', Object.entries(plannedSidebar).map(([label, items]) => [label, flatLabels(items)])],
];
// ── 2. The sidebar, as data ───────────────────────────────────────────────── let labels = 0;
const gameByName = new Map(Object.entries(platform.games).map(([key, g]) => [g.name, key])); for (const [treeName, groups] of trees) {
const trees = [ for (const [groupLabel, items] of groups) {
['docsSidebar', docsSidebar.map((g) => [g.label, flatLabels(g.items)])], const game = gameByName.get(groupLabel) ?? null;
['plannedSidebar', Object.entries(plannedSidebar).map(([label, items]) => [label, flatLabels(items)])], for (const label of [groupLabel, ...items]) {
]; labels++;
let labels = 0; for (const hit of scan(label, game)) {
for (const [treeName, groups] of trees) { fail(
for (const [groupLabel, items] of groups) { `src/config/sidebar.mjs ${treeName} → ${groupLabel}`,
const game = gameByName.get(groupLabel) ?? null; `"${label}" uses "${hit.value}", ${gameName(hit.term.game)} vocabulary, ${game ? `in the ${gameName(game)} group` : 'in a core group'}`,
for (const label of [groupLabel, ...items]) { );
labels++; }
for (const hit of scan(label, game)) {
fail(
`src/config/sidebar.mjs ${treeName} → ${groupLabel}`,
`"${label}" uses "${hit.value}", ${platform.games[hit.term.game].name} vocabulary, ${game ? `in the ${platform.games[game].name} group` : 'in a core group'}`,
);
} }
} }
} }
return `${files} docs pages and ${labels} sidebar labels use only their own game's words`;
} }
// ── Report ────────────────────────────────────────────────────────────────── // ═══ The built pass ════════════════════════════════════════════════════════════════════
const DIST = path.join(ROOT, 'dist', 'client');
/** `dist/client/a/b/index.html` → `/a/b/`; `dist/client/404.html` → `/404`. */
function routeOf(file) {
const rel = path.relative(DIST, file).split(path.sep).join('/');
if (rel === 'index.html') return '/';
if (rel.endsWith('/index.html')) return `/${rel.slice(0, -'index.html'.length)}`;
return `/${rel.replace(/\.html$/, '')}`;
}
function gameOfRoute(route) {
for (const [game, prefixes] of Object.entries(GAME_ROUTES)) {
if (prefixes.some((p) => route.startsWith(p))) return game;
}
return null;
}
/**
* Where the element opening at `start` closes, counting nested elements of the same name.
* Astro's output is well formed, which is what makes this enough without a parser.
*/
function elementEnd(html, start, tag) {
const re = new RegExp(`<(/?)${tag}\\b[^>]*?(/?)>`, 'gi');
re.lastIndex = start;
let depth = 0;
for (let m = re.exec(html); m; m = re.exec(html)) {
if (m[2] === '/') continue; // self-closing
depth += m[1] === '/' ? -1 : 1;
if (depth === 0) return re.lastIndex;
}
return html.length;
}
/** Every element whose opening tag matches `openRe`, as `{ start, end, match }`. */
function elements(html, openRe) {
const found = [];
for (const m of html.matchAll(openRe)) {
const tag = /^<([a-z0-9-]+)/i.exec(m[0])[1];
found.push({ start: m.index, end: elementEnd(html, m.index, tag), match: m });
}
return found;
}
const ENTITIES = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'", nbsp: ' ', rsquo: '’', lsquo: '‘', ldquo: '“', rdquo: '”', mdash: '—', ndash: '–', hellip: '…', rarr: '→', middot: '·' };
const decode = (s) =>
s.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (m, e) => {
if (e[0] === '#') return String.fromCodePoint(e[1] === 'x' || e[1] === 'X' ? parseInt(e.slice(2), 16) : Number(e.slice(1)));
return ENTITIES[e.toLowerCase()] ?? m;
});
/**
* Elements whose text runs on into the next word with no space between: a word split across
* two `<span>`s by a syntax highlighter is still one word to a reader. Everything else is a
* boundary, so `<h3>Guilds</h3><p>Guild…` does not read as "GuildsGuild".
*/
const INLINE = /^(?:a|abbr|b|bdi|bdo|cite|code|data|dfn|em|i|kbd|mark|q|s|samp|small|span|strong|sub|sup|time|u|var|wbr)$/i;
/** The words a reader sees in a piece of HTML: its text, and the attributes that are read aloud or shown. */
function visibleText(html) {
const attrs = [];
for (const m of html.matchAll(/\s(?:alt|title|aria-label|placeholder)="([^"]*)"/gi)) attrs.push(m[1]);
let text = html.replace(/<\/?([a-z][a-z0-9-]*)\b[^>]*>/gi, (_, tag) => (INLINE.test(tag) ? '' : ' '));
text = decode([text, ...attrs.map(decode)].join(' \n '));
text = text.replace(/\bhttps?:\/\/\S+/g, ' '); // bare URLs
text = text.replace(/(^|[\s(“"'])\/[\w./#?=&%-]+/g, '$1 '); // bare paths — an address, not prose
return text.replace(/\s+/g, ' ');
}
function snippet(text, index, length) {
const from = Math.max(0, index - 50);
const to = Math.min(text.length, index + length + 50);
return `${from > 0 ? '…' : ''}${text.slice(from, to).trim()}${to < text.length ? '…' : ''}`;
}
async function builtPass() {
if (!existsSync(DIST)) {
console.error('checkTerms --built: dist/client does not exist. Run `npm run build` first.');
process.exit(1);
}
let pages = 0;
let regionsSeen = 0;
const allowUsed = new Set();
for await (const file of walk(DIST, /\.html$/)) {
const route = routeOf(file);
let html = readFileSync(file, 'utf8');
pages++;
// The head: only the parts a reader sees, in a tab or a search result.
const head = /<head\b[\s\S]*?<\/head>/i.exec(html)?.[0] ?? '';
const headText = [/<title>([\s\S]*?)<\/title>/i.exec(head)?.[1] ?? '', /<meta\s+name="description"\s+content="([^"]*)"/i.exec(head)?.[1] ?? ''].join(' \n ');
html = html.replace(/<head\b[\s\S]*?<\/head>/i, ' ');
html = html.replace(/<(script|style|template|noscript)\b[\s\S]*?<\/\1>/gi, ' ');
html = html.replace(/<!--[\s\S]*?-->/g, ' ');
// Checked elsewhere (see the header): Starlight's sidebar and its previous/next links.
for (const skip of [/<nav\b[^>]*\baria-label="Main"[^>]*>/gi, /<div\b[^>]*\bclass="pagination-links\b[^>]*>/gi]) {
for (const el of elements(html, skip).reverse()) html = html.slice(0, el.start) + ' ' + html.slice(el.end);
}
const pageGame = gameOfRoute(route);
const pieces = [{ text: decode(headText), allowed: pageGame, where: 'in the page title or description' }];
// Regions marked with a game. Read with that game's words allowed, then cut out.
for (const el of elements(html, /<[a-z][a-z0-9-]*\b[^>]*\bdata-game="([^"]*)"[^>]*>/gi).reverse()) {
const game = el.match[1];
regionsSeen++;
if (!platform.games[game]) {
fail(route, `an element is marked data-game="${game}", which platform.json does not have`);
continue;
}
pieces.push({ text: visibleText(html.slice(el.start, el.end)), allowed: game, also: pageGame, where: `inside a block marked ${gameName(game)}` });
html = html.slice(0, el.start) + ' ' + html.slice(el.end);
}
pieces.push({ text: visibleText(html), allowed: pageGame, where: pageGame ? `on a ${gameName(pageGame)} page` : 'on a core page' });
for (const piece of pieces) {
let { text } = piece;
for (const [i, entry] of ALLOW.entries()) {
if (entry.route !== route || !text.includes(entry.text)) continue;
allowUsed.add(i);
text = text.split(entry.text).join(' '.repeat(entry.text.length));
}
for (const hit of scan(text, piece.allowed)) {
if (piece.also && hit.term.game === piece.also) continue;
fail(route, `"${hit.value}" is ${gameName(hit.term.game)} vocabulary, ${piece.where}\n ${snippet(text, hit.index, hit.value.length)}`);
}
}
}
for (const [i, entry] of ALLOW.entries()) {
if (!allowUsed.has(i)) fail(`allowlist: ${entry.route}`, `"${entry.text}" no longer appears in the built page — remove the entry`);
}
return `${pages} built pages use only their own game's words (${regionsSeen} game-marked blocks read with their game's words allowed)`;
}
// ═══ Report ════════════════════════════════════════════════════════════════════════════
const summary = BUILT ? await builtPass() : await sourcePass();
if (failures.length === 0) { if (failures.length === 0) {
console.log( console.log(`checkTerms${BUILT ? ' --built' : ''}: ${summary} (${TERMS.length} terms, ${ALLOW.length} allowlisted phrase${ALLOW.length === 1 ? '' : 's'}).`);
`checkTerms: ${files} docs pages and ${labels} sidebar labels use only their own game's words ` +
`(${TERMS.length} terms, ${ALLOW.length} allowlisted phrase${ALLOW.length === 1 ? '' : 's'}).`,
);
} else { } else {
console.error(`\ncheckTerms: ${failures.length} game word(s) outside their game's section:\n`); console.error(`\ncheckTerms${BUILT ? ' --built' : ''}: ${failures.length} game word(s) outside their game's section:\n`);
for (const f of failures) console.error(` ✗ ${f.where}\n ${f.detail}`); for (const f of failures) console.error(` ✗ ${f.where}\n ${f.detail}`);
console.error(` console.error(`
PLAN.md §16, D63: name the games anywhere, but keep their vocabulary in their own section. PLAN.md §16, D63: name the games anywhere, but keep their vocabulary in their own section.
Use core's word instead — a Team, a game server, the sidecar, the bridge plugin, the game Use core's word instead — a Team, a game server, the sidecar, the bridge plugin, the game
module. If a core page genuinely needs a game's real example, wrap it in module. A marketing page describes what a game module adds in core's words and links to
<GameExample game="…"> (D68), which labels it with the game's name. Add to the allowlist the game's own page (D75). If a docs page genuinely needs a game's real example, wrap it in
in this script only for a word that is not a game's at all, and say why. <GameExample game="…"> (D68); a screenshot of a game screen carries its game tag (D67).
Add to the allowlist in this script only for a word that is not a game's at all, and say why.
`); `);
process.exit(1); process.exit(1);
} }

205
scripts/mockRustDemo.mjs Normal file
View File

@@ -0,0 +1,205 @@
#!/usr/bin/env node
/**
* mockRustDemo.mjs — the game data on the Rust demo's screenshots. PLAN.md §16 phase 18, D81.
*
* node scripts/mockRustDemo.mjs > rust-demo.sql
* docker exec -i <db container> mariadb -u<user> -p<password> <rust demo db> < rust-demo.sql
*
* Prints SQL; it connects to nothing. Run it after `seedDemo.mjs --game rust`, with the demo
* site connected to its server at least once, so the server row and its current wipe exist.
*
* ---------------------------------------------------------------------------------------
* WHY THIS IS MOCK DATA, WHEN THE UO CAPTURES ARE NOT
* ---------------------------------------------------------------------------------------
* D4 asks for real captures, and phase 9 got them from a real shard with a person signed in.
* The Rust rig has no players. Phase 18 first staged stand-in players on it with a rig-only
* plugin; that cost a morning of a server the update had left rebuilding its navmesh, and the
* org lead chose this instead (D81): the feed, the leaderboard and the linked Steam account
* are written into the demo's database here, in the module's own row shapes, and everything
* else on the screens is the real server's (its status, its world map, its sync state).
*
* Every name is a role (D80): player, player2 … player7, and moderator. The Steam ids sit in a
* range no real account uses.
*
* Re-running replaces what it wrote: it deletes the server's events, stats, weapon kills and
* these players first. Real events that arrived from the server are deleted with them.
*/
const SERVER = 'rust-oxide';
const ID_BASE = 76561199920000000n;
/** The cast. `n` makes the Steam id; `user` links one to a site account by username. */
const CAST = [
{ n: 1, name: 'player', user: 'player' },
{ n: 2, name: 'player2' },
{ n: 3, name: 'player3' },
{ n: 4, name: 'player4' },
{ n: 5, name: 'player5' },
{ n: 6, name: 'player6' },
{ n: 7, name: 'player7' },
{ n: 9, name: 'moderator' },
];
const steam = (n) => String(ID_BASE + BigInt(n));
const who = (n) => CAST.find((c) => c.n === n).name;
const now = Date.now();
const ago = (minutes) => now - Math.round(minutes * 60_000);
// ── The feed, oldest first ─────────────────────────────────────────────────────────────
//
// Each frame is the shape the bridge plugin emits (copied from frames the walk database
// holds), less `serverId`/`wipeId`/`t`/`type`, which `frame()` adds.
const death = (killer, victim, weapon, distance, grid, extra = {}) => ({
kind: 'player.death',
steamId: steam(victim),
name: who(victim),
attackerId: steam(killer),
attackerName: who(killer),
attackerType: 'player',
weapon,
distance,
grid,
sleeping: false,
...extra,
});
const world = (event, fields = {}) => ({ kind: 'world.event', event, ...fields });
const FEED = [
[150, { kind: 'player.connected', steamId: steam(1), name: who(1) }],
[148, { kind: 'player.connected', steamId: steam(2), name: who(2) }],
[146, { kind: 'player.connected', steamId: steam(3), name: who(3) }],
[141, world('cargo.arrived', { x: 2900, z: -2100 })],
[137, { kind: 'player.connected', steamId: steam(9), name: who(9) }],
[131, { kind: 'player.chat', steamId: steam(2), name: who(2), channel: 'Global', message: 'anyone selling scrap at outpost?' }],
[126, death(3, 4, 'bolt_rifle.entity', 187.4, 'AF10')],
[119, { kind: 'player.connected', steamId: steam(5), name: who(5) }],
[112, world('crate.hack.started', { steamId: steam(2), name: who(2), where: 'oilrig_small', x: 3358, z: 1721 })],
[104, death(1, 2, 'ak47u.entity', 22.4, 'R18')],
[98, world('heli.arrived', { x: 400, z: -900 })],
[96, world('crate.unlocked', { steamId: steam(5), name: who(5), where: 'oilrig_small', x: 3358, z: 1721 })],
[91, { kind: 'player.connected', steamId: steam(6), name: who(6) }],
[86, death(5, 3, 'lr300.entity', 64.9, 'H7')],
[80, world('heli.downed', {
x: 2453, z: -943,
credit: {
blow: steam(3), last: steam(1), most: steam(1),
damagers: [{ steamId: steam(1), damage: 5200 }, { steamId: steam(3), damage: 3900 }, { steamId: steam(6), damage: 900 }],
},
names: { [steam(1)]: who(1), [steam(3)]: who(3), [steam(6)]: who(6) },
creditRule: 'most',
})],
[74, { kind: 'player.chat', steamId: steam(9), name: who(9), channel: 'Global', message: 'wipe is Thursday 19:00, bases stay up till then' }],
[69, { kind: 'npc.boss.died', name: 'Gate Warden', killerName: who(6), killerId: steam(6), damagers: 3 }],
[63, death(6, 1, 'semi_auto_rifle.entity', 41.2, 'K12')],
[58, world('airdrop.looted', { steamId: steam(4), name: who(4), x: 164, z: -1507 })],
[52, { kind: 'player.connected', steamId: steam(7), name: who(7) }],
[47, death(2, 6, 'mp5.entity', 12.6, 'R17', { }) ],
[41, { kind: 'dt.won', steamId: steam(4), name: who(4), invaderCount: 2, invaders: [steam(4), steam(7)], x: 150, z: -800 }],
[36, world('bradley.destroyed', {
where: 'launch_site', x: -1200, z: 300,
credit: {
blow: steam(1), last: steam(1), most: steam(5),
damagers: [{ steamId: steam(5), damage: 630 }, { steamId: steam(1), damage: 385 }],
},
names: { [steam(1)]: who(1), [steam(5)]: who(5) },
creditRule: 'most',
})],
[31, death(1, 7, 'ak47u.entity', 96.3, 'J9')],
[25, { kind: 'gc.ended', steamId: steam(7), name: who(7), x: 200, z: -800 }],
[21, {
kind: 'raid.completed', base: 'raideasy7', difficulty: 'Easy', level: 0, pvp: false,
id: 'raid-demo-1', key: 'demo', ownerId: steam(6), ownerName: who(6), raiderCount: 1,
raiders: [{ steamId: steam(6), name: who(6) }], x: 280, z: -800,
}],
[16, death(3, 5, 'bolt_rifle.entity', 241.7, 'AB4', { })],
[12, { kind: 'player.chat', steamId: steam(1), name: who(1), channel: 'Global', message: 'gg on the heli' }],
[8, world('cargo.docking', { harbour: 'harbor_2', harbourName: 'Harbor', x: 2595, z: -2215 })],
[5, death(4, 2, 'thompson.entity', 18.9, 'Q14')],
[2, { kind: 'player.disconnected', steamId: steam(2), name: who(2), reason: 'Disconnected', sessionSec: 8760 }],
];
// ── The leaderboard ────────────────────────────────────────────────────────────────────
//
// Consistent with the feed in spirit, not to the kill: a wipe is days long and the feed above
// is its last two hours.
const STATS = {
1: { kills: 31, deaths: 12, npc_kills: 58, headshots: 14, best_pvp_m: 212.4, structures: 340, playtime_sec: 61200, heli_kills: 2, apc_kills: 1, crates_hacked: 3, drops_looted: 5 },
3: { kills: 27, deaths: 9, npc_kills: 22, headshots: 19, best_pvp_m: 288.1, structures: 120, playtime_sec: 48900, heli_kills: 1, crates_hacked: 1, drops_looted: 2 },
5: { kills: 19, deaths: 15, npc_kills: 41, headshots: 6, best_pvp_m: 133.0, structures: 510, playtime_sec: 55800, apc_kills: 1, crates_hacked: 2, drops_looted: 7 },
6: { kills: 16, deaths: 11, npc_kills: 30, headshots: 5, best_pvp_m: 97.6, structures: 260, playtime_sec: 40100, raids_completed: 2, drops_looted: 3 },
4: { kills: 12, deaths: 18, npc_kills: 25, headshots: 3, best_pvp_m: 74.2, structures: 180, playtime_sec: 37400, treasures_won: 1, drops_looted: 4 },
2: { kills: 9, deaths: 21, npc_kills: 47, headshots: 2, best_pvp_m: 58.8, structures: 610, playtime_sec: 52300, crates_hacked: 2, drops_looted: 6 },
7: { kills: 6, deaths: 10, npc_kills: 13, headshots: 1, best_pvp_m: 96.3, structures: 90, playtime_sec: 21000, guarded_won: 1, drops_looted: 1 },
9: { kills: 2, deaths: 1, npc_kills: 4, headshots: 0, best_pvp_m: 35.0, structures: 40, playtime_sec: 9800 },
};
const WEAPON_KILLS = {
1: { 'ak47u.entity': 21, 'semi_auto_rifle.entity': 6, 'python.entity': 4 },
3: { 'bolt_rifle.entity': 22, 'lr300.entity': 5 },
5: { 'lr300.entity': 13, 'mp5.entity': 6 },
6: { 'semi_auto_rifle.entity': 10, 'ak47u.entity': 6 },
4: { 'thompson.entity': 8, 'mp5.entity': 4 },
2: { 'mp5.entity': 7, 'thompson.entity': 2 },
7: { 'ak47u.entity': 4, 'python.entity': 2 },
9: { 'lr300.entity': 2 },
};
// ── SQL ────────────────────────────────────────────────────────────────────────────────
const q = (value) =>
value === null || value === undefined ? 'NULL' : `'${String(value).replace(/\\/g, '\\\\').replace(/'/g, "''")}'`;
const ids = CAST.map((c) => q(steam(c.n))).join(', ');
const out = [];
out.push('-- mockRustDemo.mjs — PLAN.md §16 phase 18 (D81). Generated; do not edit by hand.');
out.push(`SET @server = ${q(SERVER)};`);
out.push(
"SET @wipe = (SELECT wipe_id FROM rust_wipes WHERE server_id = @server ORDER BY last_seen DESC LIMIT 1);",
);
out.push("SELECT IF(@wipe IS NULL, 'NO WIPE YET: connect the site to the server first', CONCAT('wipe ', @wipe)) AS mock;");
out.push('DELETE FROM rust_events WHERE server_id = @server;');
out.push('DELETE FROM rust_player_wipe_stats WHERE server_id = @server;');
out.push('DELETE FROM rust_weapon_kills WHERE server_id = @server;');
out.push(`DELETE FROM rust_account_links WHERE steam_id IN (${ids});`);
out.push(`DELETE FROM rust_players WHERE steam_id IN (${ids});`);
for (const c of CAST) {
out.push(
`INSERT INTO rust_players (steam_id, name, first_seen, last_seen) VALUES (${q(steam(c.n))}, ${q(c.name)}, NOW() - INTERVAL 6 DAY, NOW() - INTERVAL 2 MINUTE);`,
);
}
for (const [minutes, body] of FEED) {
const t = ago(minutes);
const raw = JSON.stringify({ ...body, serverId: SERVER, t, type: 'event', wipeId: '@@WIPE@@' });
const [before, after] = raw.split('"@@WIPE@@"');
out.push(
`INSERT INTO rust_events (server_id, wipe_id, kind, t, steam_id, raw, created_at) VALUES (@server, @wipe, ${q(body.kind)}, ${t}, ${q(body.steamId ?? null)}, CONCAT(${q(before)}, JSON_QUOTE(@wipe), ${q(after)}), FROM_UNIXTIME(${Math.floor(t / 1000)}));`,
);
}
for (const [n, row] of Object.entries(STATS)) {
const cols = Object.keys(row);
out.push(
`INSERT INTO rust_player_wipe_stats (server_id, wipe_id, steam_id, sessions, last_seen, ${cols.join(', ')}) VALUES (@server, @wipe, ${q(steam(Number(n)))}, 6, NOW() - INTERVAL 2 MINUTE, ${cols.map((k) => row[k]).join(', ')});`,
);
}
for (const [n, weapons] of Object.entries(WEAPON_KILLS)) {
for (const [weapon, kills] of Object.entries(weapons)) {
out.push(
`INSERT INTO rust_weapon_kills (server_id, wipe_id, steam_id, weapon, kills) VALUES (@server, @wipe, ${q(steam(Number(n)))}, ${q(weapon)}, ${kills});`,
);
}
}
for (const c of CAST.filter((member) => member.user)) {
out.push(
`INSERT INTO rust_account_links (steam_id, user_id, name, server_id, linked_at) SELECT ${q(steam(c.n))}, id, ${q(c.name)}, @server, NOW() - INTERVAL 5 DAY FROM users WHERE username = ${q(c.user)};`,
);
}
console.log(out.join('\n'));

View File

@@ -38,7 +38,14 @@ import { readFileSync, writeFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
import path from 'node:path'; import path from 'node:path';
import { collectedIn, playRows } from '../src/data/collection.mjs'; import {
collectedIn,
deletionRow,
PLAY_DATA_TYPES,
PLAY_PURPOSES,
PLAY_VOCABULARY_READ,
playRows,
} from '../src/data/collection.mjs';
import { legal } from '../src/data/legal.mjs'; import { legal } from '../src/data/legal.mjs';
const ROOT = fileURLToPath(new URL('..', import.meta.url)); const ROOT = fileURLToPath(new URL('..', import.meta.url));
@@ -52,6 +59,33 @@ const cell = (text) => String(text).replace(/\|/g, '\\|').replace(/\s*\n\s*/g, '
const yesNo = (value) => (value ? 'Yes' : 'No'); const yesNo = (value) => (value ? 'Yes' : 'No');
/**
* The form asks per data type, not per row, and two rows can answer the same type (the
* trusted-device token and the push topic are both "Device or other IDs"). So the
* collected rows are folded into one entry per type, in the console's order: required if
* any row requires it, the union of the purposes, and the rows it came from.
*/
function declaredTypes(rows) {
const entries = [];
for (const [category, types] of Object.entries(PLAY_DATA_TYPES)) {
for (const type of types) {
const from = rows.filter(
(row) => row.play.collected && row.play.types.some((t) => t.category === category && t.type === type)
);
if (!from.length) continue;
const purposes = new Set(from.flatMap((row) => row.play.purposes));
entries.push({
category,
type,
required: from.some((row) => row.play.required),
purposes: PLAY_PURPOSES.filter((p) => purposes.has(p)),
rows: from,
});
}
}
return entries;
}
function render() { function render() {
const rows = playRows(); const rows = playRows();
const site = collectedIn('site'); const site = collectedIn('site');
@@ -61,7 +95,9 @@ function render() {
lines.push('<!--'); lines.push('<!--');
lines.push(' GENERATED FILE — do not edit.'); lines.push(' GENERATED FILE — do not edit.');
lines.push(''); lines.push('');
lines.push(` Source: src/data/collection.mjs (scope "app") + src/data/legal.mjs`); lines.push(
` Source: src/data/collection.mjs (scope "app", and the deletion row) + src/data/legal.mjs`
);
lines.push(` Generator: ${GENERATOR}`); lines.push(` Generator: ${GENERATOR}`);
lines.push(''); lines.push('');
lines.push(' Edit the data file and run `npm run play:datasafety`. CI runs the same'); lines.push(' Edit the data file and run `npm run play:datasafety`. CI runs the same');
@@ -101,40 +137,87 @@ function render() {
); );
lines.push(''); lines.push('');
lines.push( lines.push(
'That is why nearly every answer below is "not collected", and it is also the answer ' + 'Play still counts what the app sends to that server as **collected**: the data leaves ' +
'most likely to be questioned in a review. The supporting facts are in the table: ' + 'the device, and the form does not ask whose server it lands on. So everything the ' +
'each row names the file it was read out of.' 'app sends is declared collected, not shared, and required, which is the conservative ' +
); 'answer and the accurate one (org lead, 2026-10-29). What stays true, and what ' +
lines.push(''); '`/privacy` says, is that none of it reaches us.'
lines.push(
'Where the console offers free text about security practices, two things are worth ' +
'saying: credentials are held in Android’s encrypted storage (AES-256-GCM via ' +
'Jetpack Security), and push notifications carry **no content** — a relay receives a ' +
'stream name and a reference, and the app fetches the actual message over its own ' +
'authenticated connection.'
); );
lines.push(''); lines.push('');
/* --------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------- */
lines.push('## Data types'); lines.push('## Data collection and security');
lines.push(''); lines.push('');
lines.push('| Category | Data type | Collected by us | Shared by us | Answer |'); lines.push('- **Does the app collect or share any of the required user data types?** Yes, it collects them (below). It shares none.');
lines.push('|---|---|---|---|---|'); lines.push(
for (const row of rows) { '- **Is all of the user data collected by the app encrypted in transit?** Yes. The ' +
'release build’s network security config sets `cleartextTrafficPermitted="false"` ' +
'for every connection, and the app refuses an `http` deployment address outside ' +
'debug builds. Read from: `app/src/main/res/xml/network_security_config.xml`, ' +
'`core/net/ServerUrl.kt`.'
);
lines.push(
'- **Is any of it processed ephemerally?** No. The deployment keeps what it receives, ' +
'under its operator’s policy, and we cannot promise otherwise on its behalf.'
);
lines.push(
'- **Free text on security practices**, where the console offers it: credentials are ' +
'held in Android’s encrypted storage (AES-256-GCM via Jetpack Security), and push ' +
'notifications carry **no content**: a relay receives a stream name and a reference, ' +
'and the app fetches the actual message over its own authenticated connection.'
);
lines.push('');
/* --------------------------------------------------------------------------------- */
const declared = declaredTypes(rows);
lines.push('## Data types the app collects');
lines.push('');
lines.push('| Category | Data type | Collected | Shared | Required | Purposes | From |');
lines.push('|---|---|---|---|---|---|---|');
for (const entry of declared) {
lines.push( lines.push(
`| ${cell(row.play.category)} | ${cell(row.play.type)} | ${yesNo(row.play.collected)} ` + `| ${cell(entry.category)} | ${cell(entry.type)} | Yes | No | ${yesNo(entry.required)} ` +
`| ${yesNo(row.play.shared)} | ${cell(row.play.answer)} |` `| ${cell(entry.purposes.join('; '))} | ${cell(entry.rows.map((r) => r.title).join('; '))} |`
); );
} }
lines.push(''); lines.push('');
lines.push('## Data types the app does not collect');
lines.push('');
lines.push(
'The form lists every type, so every one is answered. Vocabulary read from Play ' +
`Console Help on ${PLAY_VOCABULARY_READ}; check it against the console’s current list.`
);
lines.push('');
for (const [category, types] of Object.entries(PLAY_DATA_TYPES)) {
const rest = types.filter((type) => !declared.some((e) => e.category === category && e.type === type));
if (!rest.length) continue;
const all = rest.length === types.length;
lines.push(`- **${category}:** ${all ? 'none collected' : `${rest.join(', ')}: not collected`}.`);
}
lines.push('');
const onDevice = rows.filter((row) => !row.play.collected);
lines.push('## Held on the device only');
lines.push('');
lines.push('Not collected, because none of it leaves the phone; listed so nobody declares it by mistake.');
lines.push('');
for (const row of onDevice) lines.push(`- **${cell(row.title)}.** ${cell(row.play.because)}`);
lines.push('');
lines.push('## Each answer, and why it is the truthful one'); lines.push('## Each answer, and why it is the truthful one');
lines.push(''); lines.push('');
for (const row of rows) { for (const row of rows) {
const types = row.play.types.map((t) => `${t.category} → ${t.type}`).join('; ');
lines.push(`### ${row.title}`); lines.push(`### ${row.title}`);
lines.push(''); lines.push('');
lines.push(`**${row.play.category} → ${row.play.type}.** ${cell(row.play.answer)}`); lines.push(`**${types || 'No console type'}.** ${cell(row.play.answer)}`);
lines.push(''); lines.push('');
if (row.play.collected) {
lines.push(`Purposes: ${row.play.purposes.join('; ')}.`);
lines.push('');
}
lines.push(cell(row.body)); lines.push(cell(row.body));
lines.push(''); lines.push('');
lines.push(`- **Why that answer:** ${cell(row.play.because)}`); lines.push(`- **Why that answer:** ${cell(row.play.because)}`);
@@ -156,14 +239,49 @@ function render() {
'(D31); the app contains no content directed at children and no age verification.' '(D31); the app contains no content directed at children and no age verification.'
); );
lines.push( lines.push(
'- **Account deletion:** the app creates no account with us — an account belongs to ' + '- **Accounts the app can start:** the sign-in screen links to the deployment’s own ' +
'the deployment the user chose, and is deleted there. The only list we hold is the ' + 'sign-up page, which opens in the browser, and where a game server offers it the app ' +
'beta signup, which is erased on request; `/privacy` section 4 says how to ask.' 'creates a game account on it. Read from: `ui/auth/LoginViewModel.kt`, ' +
'`data/api/PlayerShardApi.kt`.'
); );
lines.push( lines.push(
'- **Data deletion request URL:** the contact address published on `/privacy`, which ' + '- **Can users delete their account? Yes,** in the app (*My account* → *Delete my ' +
'is read from the mounted `brand.json` rather than typed anywhere in the source (D13).' 'account…*) and on the deployment’s website (*Account* → *Delete my account*). It ' +
'takes the password, and a two-factor code where the account has one, and the account ' +
'is deleted at once. The account belongs to the deployment the user chose, so it is ' +
'deleted there; we hold none. Read from: `ui/auth/DeleteAccountScreen.kt`, ' +
'`data/api/MeApi.kt`.'
); );
lines.push(
'- **Delete account URL:** `/delete-account/` on this site (D85). It names the app and ' +
'us, gives the steps in the app and on the website, says what is deleted and what is ' +
'kept and for how long, and tells someone who cannot sign in to ask their community’s ' +
'operator, who can delete any account from the admin panel (D86).'
);
lines.push(
'- **Deleting some data without deleting the account:** the deployment holds it, so ' +
'that is a request to its operator. The one list we hold, the beta signup, is erased ' +
'on request; `/privacy` section 4 says how to ask.'
);
lines.push('');
/* --------------------------------------------------------------------------------- */
const deletion = deletionRow().deletion;
lines.push('## What an account deletion deletes and keeps');
lines.push('');
lines.push(
'The console asks what is deleted and what is kept. These are the same words ' +
'`/delete-account/` renders, from the same row of `src/data/collection.mjs`.'
);
lines.push('');
lines.push('**Deleted at once:**');
lines.push('');
for (const item of deletion.goes) lines.push(`- ${cell(item)}`);
lines.push('');
lines.push('**Kept:**');
lines.push('');
for (const entry of deletion.stays) lines.push(`- ${cell(entry.what)} *${cell(entry.keep)}*`);
lines.push(`- ${cell(deletion.staff)}`);
lines.push(''); lines.push('');
lines.push('## What the website collects, for the same reviewer'); lines.push('## What the website collects, for the same reviewer');

View File

@@ -4,17 +4,26 @@
* *
* node scripts/seedDemo.mjs → seed (idempotent; safe to re-run) * node scripts/seedDemo.mjs → seed (idempotent; safe to re-run)
* node scripts/seedDemo.mjs --dry-run → say what it would do, write nothing * node scripts/seedDemo.mjs --dry-run → say what it would do, write nothing
* node scripts/seedDemo.mjs --game rust → the Rust demo instead (PLAN.md §16 phase 18)
* *
* Environment (all optional; the defaults are this machine's review stack): * Environment (all optional; the defaults are this machine's review stack):
* *
* RG_BASE http://localhost:3000 the website the seed drives * RG_BASE http://localhost:3000 the website the seed drives
* RG_ADMIN_USER demoadmin an existing admin, created by website's own * RG_ADMIN_USER demoadmin (rust: admin) an existing admin, created by website's own
* RG_ADMIN_PASS DemoReview!2026 `npm run seed` — see PLAN.md §13 phase 9 * RG_ADMIN_PASS DemoReview!2026 `npm run seed` — see PLAN.md §13 phase 9
* RG_DEMO_PASS DemoReview!2026 the password every seeded cast member gets * RG_DEMO_PASS DemoReview!2026 the password every seeded cast member gets
* UOLINK_BASE http://127.0.0.1:8080 sidecar REST, written to Admin → Shard * UOLINK_BASE http://127.0.0.1:8080 sidecar REST, written to Admin → Shard
* UOLINK_WS ws://127.0.0.1:8080/ws sidecar WebSocket * UOLINK_WS ws://127.0.0.1:8080/ws sidecar WebSocket
* UOLINK_TOKEN (unset) sidecar auth token; skipped when absent * UOLINK_TOKEN (unset) sidecar auth token; skipped when absent
* UOLINK_PROTOCOL (platform.json) wire protocol to pin — see the note below * UOLINK_PROTOCOL (platform.json) wire protocol to pin — see the note below
* RG_RUST_SERVERS (unset) rust only: a JSON file outside the repository,
* [{ id, name, sidecarBaseUrl, sidecarToken }]
*
* One deployment runs one game module (the core refuses a second at boot), so the Rust demo
* is a second deployment with its own database, and `--game rust` seeds that one. Its cast
* is named for its roles — admin, moderator, player — and so is every stand-in on the game
* server behind it (D80): a name in a screenshot should say what the account is, not
* invent a person.
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* WHY THE SEED DRIVES THE API AND NEVER THE DATABASE * WHY THE SEED DRIVES THE API AND NEVER THE DATABASE
@@ -47,9 +56,17 @@ import { readFileSync } from 'node:fs';
import platform from '../src/data/platform.json' with { type: 'json' }; import platform from '../src/data/platform.json' with { type: 'json' };
const gameAt = process.argv.indexOf('--game');
const GAME = gameAt === -1 ? 'uo' : process.argv[gameAt + 1];
if (!['uo', 'rust'].includes(GAME)) {
console.error(`--game is uo or rust, not "${GAME}"`);
process.exit(1);
}
const BASE = (process.env.RG_BASE || 'http://localhost:3000').replace(/\/+$/, ''); const BASE = (process.env.RG_BASE || 'http://localhost:3000').replace(/\/+$/, '');
const API = `${BASE}/api/v1`; const API = `${BASE}/api/v1`;
const ADMIN_USER = process.env.RG_ADMIN_USER || 'demoadmin'; const ADMIN_USER = process.env.RG_ADMIN_USER || (GAME === 'rust' ? 'admin' : 'demoadmin');
const ADMIN_PASS = process.env.RG_ADMIN_PASS || 'DemoReview!2026'; const ADMIN_PASS = process.env.RG_ADMIN_PASS || 'DemoReview!2026';
const DEMO_PASS = process.env.RG_DEMO_PASS || 'DemoReview!2026'; const DEMO_PASS = process.env.RG_DEMO_PASS || 'DemoReview!2026';
const UOLINK_BASE = process.env.UOLINK_BASE || 'http://127.0.0.1:8080'; const UOLINK_BASE = process.env.UOLINK_BASE || 'http://127.0.0.1:8080';
@@ -109,6 +126,85 @@ const USERS = [
{ username: 'mirenavox', role: 'player' }, { username: 'mirenavox', role: 'player' },
]; ];
// ── The Rust demo (PLAN.md §16 phase 18) ───────────────────────────────────────────────
//
// The same neutral identity (D43) over a Rust server. The cast is two accounts besides the
// admin, each named for its role (D80). Teams, the feed, the leaderboard and the map are the
// game's, as they are for UO; what the site owns here is the server row, the NPC profiles
// and a permission group, so those are seeded.
const RUST_SETTINGS = {
...SETTINGS,
status_message: 'Live — the demo server is up.',
homepage_teaser:
'A public demonstration of Runic Gateway: a self-hosted community site wired to a ' +
'live Rust server. Everything on this site is real data from the server behind it.',
};
const RUST_USERS = [
{ username: 'moderator', role: 'moderator' },
{ username: 'player', role: 'player' },
];
// Two RunicNPC profiles: a guard who fights, and a passive trader who talks. Their kit is
// one the rig's Kits holds; a profile naming a kit Kits does not have is refused by RunicNPC
// and shows as refused on the screen, which is not the screen being shown. The guard's name
// sorts first, so the editor the NPC screenshot opens (its first Edit) is the fuller one.
const NPC_KIT = process.env.RG_NPC_KIT || 'rnpc_campguard';
const NPC_PROFILES = [
{
name: 'guard',
allServers: true,
body: {
names: ['Camp Guard', 'Gate Guard'],
kits: [NPC_KIT],
prefab: 'scientistnpc_roam',
role: 'guard',
movement: { mode: 'wander', radius: 12 },
health: 300,
faction: 'wardens',
alertRadius: 30,
},
},
{
name: 'trader',
allServers: true,
body: {
names: ['Quartermaster'],
kits: [NPC_KIT],
prefab: 'scientistnpc_roam',
role: 'passive',
movement: { mode: 'stand', radius: 0 },
hurtByPlayers: false,
use: { mode: 'chat', lines: ['Back again, {player}?', 'Supplies are short this wipe.'], title: '', text: '' },
},
},
];
// One group the site authored, so the permissions screen shows the site doing something
// beside what the server already had. Its permissions are ones the rig's plugins register,
// and its member is the `player` account, through its linked Steam id.
const PERM_GROUP = {
name: 'vip',
title: 'VIP',
rank: 10,
permissions: ['backpacks.use', 'autodoors.use'],
members: ['player'],
};
// Who sees who is online, and the map's player layer. Both default to staff, which is right
// for a real community and wrong for a demo whose public pages exist to be looked at: with
// them at staff, the public feed leaves out every death and the map shows no one. The only
// players on the demo server are the stand-ins phase 18 staged, named by role (D80), so
// opening them to the public shows nobody's real name.
const RUST_VISIBILITY = { fleet: 'public', map: { fleet: { players: 'public' } } };
// A weekly wipe, so the server list has a next wipe to show: Thursday evening, the usual
// Rust community habit.
const RUST_WIPE = { wipeRule: 'weekly', wipeDay: 4, wipeTime: '19:00', wipeTz: 'America/Chicago' };
const siteSettings = GAME === 'rust' ? RUST_SETTINGS : SETTINGS;
const cast = GAME === 'rust' ? RUST_USERS : USERS;
// ── News, five-on-friday, the newsletter ─────────────────────────────────────────────── // ── News, five-on-friday, the newsletter ───────────────────────────────────────────────
// //
// Written as a small community's real output rather than lorem: a patch note, an event, a // Written as a small community's real output rather than lorem: a patch note, an event, a
@@ -312,12 +408,12 @@ async function login() {
async function settings() { async function settings() {
console.log('\nsite settings (D43 — the neutral demo identity)'); console.log('\nsite settings (D43 — the neutral demo identity)');
if (DRY) { if (DRY) {
for (const [k, v] of Object.entries(SETTINGS)) say('~', `${k} = ${v}`); for (const [k, v] of Object.entries(siteSettings)) say('~', `${k} = ${v}`);
return; return;
} }
const res = await call('PUT', '/admin/settings', SETTINGS); const res = await call('PUT', '/admin/settings', siteSettings);
if (!res.ok) return fail('settings', res); if (!res.ok) return fail('settings', res);
for (const [k, v] of Object.entries(SETTINGS)) say('+', `${k} = ${String(v).slice(0, 60)}`); for (const [k, v] of Object.entries(siteSettings)) say('+', `${k} = ${String(v).slice(0, 60)}`);
} }
async function uoLink() { async function uoLink() {
@@ -358,7 +454,7 @@ async function users() {
if (!list.ok) return fail('list users', list); if (!list.ok) return fail('list users', list);
const rows = Array.isArray(list.data) ? list.data : (list.data?.users ?? []); const rows = Array.isArray(list.data) ? list.data : (list.data?.users ?? []);
const have = new Set(rows.map((u) => u.username)); const have = new Set(rows.map((u) => u.username));
for (const user of USERS) { for (const user of cast) {
if (have.has(user.username)) { if (have.has(user.username)) {
say('=', `${user.username} (${user.role})`); say('=', `${user.username} (${user.role})`);
continue; continue;
@@ -447,23 +543,175 @@ async function wiki() {
} }
} }
// ── The Rust steps ─────────────────────────────────────────────────────────────────────
/** The servers file, read once. The tokens in it are sent to the site and never printed. */
function rustServerList() {
const file = process.env.RG_RUST_SERVERS;
if (!file) return [];
return JSON.parse(readFileSync(file, 'utf8'));
}
async function rustServers() {
console.log('\nRust servers (Admin → Rust → Servers)');
const wanted = rustServerList();
if (wanted.length === 0) {
say('~', 'RG_RUST_SERVERS unset — leaving the server list alone');
return;
}
const now = await call('GET', '/admin/rust/servers');
if (now.status === 404) {
say('~', 'no /admin/rust route — the rust module is not installed');
return;
}
if (!now.ok) return fail('list servers', now);
for (const server of wanted) {
const have = (now.data?.servers ?? []).find((row) => row.id === server.id);
if (
have &&
have.sidecarBaseUrl === server.sidecarBaseUrl &&
have.enabled &&
have.schedule?.rule === RUST_WIPE.wipeRule
) {
say('=', `${server.id} at ${server.sidecarBaseUrl}`);
continue;
}
if (DRY) {
say('~', `${server.id} at ${server.sidecarBaseUrl}`);
continue;
}
const res = await call('PUT', `/admin/rust/servers/${encodeURIComponent(server.id)}`, {
name: server.name,
sidecarBaseUrl: server.sidecarBaseUrl,
// Omitted on an existing row, which is how the API says "keep the token" — so a re-run
// never needs the token file to hold a token it already sent.
sidecarToken: have ? undefined : server.sidecarToken,
enabled: true,
...RUST_WIPE,
});
if (!res.ok) {
fail(`save server ${server.id}`, res);
continue;
}
say('+', `${server.id} "${server.name}" at ${server.sidecarBaseUrl}`);
}
}
async function rustVisibility() {
console.log('\nvisibility (Admin → Rust → Visibility)');
const now = await call('GET', '/admin/rust/visibility');
if (!now.ok) return fail('read visibility', now);
if (now.data?.presence?.fleet === 'public' && now.data?.map?.fleet?.players === 'public') {
say('=', 'who is online and the map’s players are public');
return;
}
if (DRY) return say('~', 'would make who is online and the map’s players public');
const res = await call('PUT', '/admin/rust/visibility', RUST_VISIBILITY);
if (!res.ok) return fail('visibility', res);
say('+', 'who is online and the map’s players are public');
}
async function npcProfiles() {
console.log('\nRunicNPC profiles (Admin → Rust → NPCs)');
const now = await call('GET', '/admin/rust/npcs');
if (!now.ok) return fail('list NPC profiles', now);
const live = (now.data?.profiles ?? []).filter((profile) => !profile.replaced);
for (const profile of NPC_PROFILES) {
const have = live.find((row) => row.name === profile.name);
if (DRY) {
say('~', `profile ${profile.name}`);
continue;
}
// An existing profile is saved again rather than skipped, so a change to its body here
// reaches the demo on the next run. RunicNPC answers the push the same either way.
const res = have
? await call('PUT', `/admin/rust/npcs/profiles/${have.id}`, profile)
: await call('POST', '/admin/rust/npcs/profiles', profile);
if (!res.ok) {
fail(`${have ? 'save' : 'create'} profile ${profile.name}`, res);
continue;
}
say(have ? '=' : '+', `profile ${profile.name}${have ? ' (saved again)' : ''}`);
}
}
async function permGroup() {
console.log('\npermission group (Admin → Rust → Permissions)');
for (const server of rustServerList()) {
const base = `/admin/rust/permissions/servers/${encodeURIComponent(server.id)}`;
const now = await call('GET', base);
if (!now.ok) {
fail(`read permissions on ${server.id}`, now);
continue;
}
if (DRY) {
say('~', `${server.id}: group ${PERM_GROUP.name}`);
continue;
}
let id = (now.data?.groups ?? []).find((group) => group.name === PERM_GROUP.name)?.id;
if (id) {
say('=', `${server.id}: group ${PERM_GROUP.name}`);
} else {
const made = await call('POST', `${base}/groups`, {
name: PERM_GROUP.name,
title: PERM_GROUP.title,
rank: PERM_GROUP.rank,
});
if (!made.ok) {
fail(`create group ${PERM_GROUP.name} on ${server.id}`, made);
continue;
}
id = made.data.id;
say('+', `${server.id}: group ${PERM_GROUP.name}`);
}
// The permission set is replaced whole, so saving it again is the update.
const perms = await call('PUT', `/admin/rust/permissions/groups/${id}/permissions`, {
permissions: PERM_GROUP.permissions,
});
if (!perms.ok) fail(`grant ${PERM_GROUP.name}'s permissions`, perms);
else say('=', ` permissions ${PERM_GROUP.permissions.join(', ')}`);
for (const username of PERM_GROUP.members) {
const added = await call('POST', `/admin/rust/permissions/groups/${id}/members`, { username });
if (added.ok) say('=', ` member ${username}`);
else if (added.status === 409) say('=', ` member ${username} (already)`);
else fail(`add ${username} to ${PERM_GROUP.name}`, added);
}
}
}
// ── main ─────────────────────────────────────────────────────────────────────────────── // ── main ───────────────────────────────────────────────────────────────────────────────
console.log(DRY ? '\nseedDemo — DRY RUN, nothing will be written' : '\nseedDemo'); console.log(
`${DRY ? '\nseedDemo — DRY RUN, nothing will be written' : '\nseedDemo'} (${GAME})`,
);
await login(); await login();
await settings(); await settings();
await uoLink();
await users(); await users();
await posts();
await wiki(); // The news and the wiki are written in one game's voice (a patch note about house decay, a
// champion spawn), so they belong to the UO demo. The Rust captures show none of them.
if (GAME === 'rust') {
await rustServers();
await rustVisibility();
await npcProfiles();
await permGroup();
} else {
await uoLink();
await posts();
await wiki();
}
console.log( console.log(
`\n${DRY ? 'would create' : 'created'} ${created}, already present ${existed}` + `\n${DRY ? 'would create' : 'created'} ${created}, already present ${existed}` +
(process.exitCode ? ' — with failures above' : ''), (process.exitCode ? ' — with failures above' : ''),
); );
console.log( console.log(
'\nWhat this does NOT seed, on purpose: teams, the marketplace, houses, points boards\n' + GAME === 'rust'
'and the atlas. Those arrive from the shard over the bridge (D42) — start the sidecar\n' + ? '\nWhat this does NOT seed, on purpose: the feed, the leaderboard, who is online, clans\n' +
'and the shard, and they populate themselves.\n', 'and the map. Those arrive from the server over the bridge — start the server, and\n' +
'they populate themselves. PLAN.md §16 phase 18 says how its players were staged.\n'
: '\nWhat this does NOT seed, on purpose: teams, the marketplace, houses, points boards\n' +
'and the atlas. Those arrive from the shard over the bridge (D42) — start the sidecar\n' +
'and the shard, and they populate themselves.\n',
); );

View File

@@ -13,6 +13,8 @@ import platform from '../data/platform.json';
* in the legal bar at the foot rather than in the columns: a legal link is not a thing a * in the legal bar at the foot rather than in the columns: a legal link is not a thing a
* reader browses to alongside Features, it is a thing they go looking for, and the line * reader browses to alongside Features, it is a thing they go looking for, and the line
* that already carries the licence and the copyright is where people look. * that already carries the licence and the copyright is where people look.
* `/delete-account/` joined them for the same reason (D85): it is the address Google Play
* is given, and a player looking for it looks where the privacy link is.
*/ */
// `/beta` renders per request, so the footer it gets must read the mount rather than the // `/beta` renders per request, so the footer it gets must read the mount rather than the
// value baked at build time. See `renderBrand` in src/lib/brand.mjs (phase 11). // value baked at build time. See `renderBrand` in src/lib/brand.mjs (phase 11).
@@ -59,6 +61,7 @@ const isExternal = (href: string) => href.startsWith('http');
<span class="site-footer__links"> <span class="site-footer__links">
<a href="/privacy/">Privacy</a> <a href="/privacy/">Privacy</a>
<a href="/terms/">Terms</a> <a href="/terms/">Terms</a>
<a href="/delete-account/">Delete account</a>
</span> </span>
</p> </p>
<p class="site-footer__meta"> <p class="site-footer__meta">

View File

@@ -0,0 +1,112 @@
---
import type { Capability } from '../data/capabilities.mjs';
/**
* A game's own feature list, with the argument for each — PLAN.md §16, phase 17.
*
* Rendered only by a game's page under `/modules/` (`GAME_ROUTES` in `checkTerms.mjs`),
* which is what lets the items be written in the game's own words. It is `/features/`'s
* card treatment (D20: the label and the detail, never the label alone), so a reader who has
* seen that page reads this one the same way.
*
* A feature with a `demoPath` gets the per-capability demo link of D25. The markup is the
* exact contract `scripts/checkBrand.mjs` enforces and `applyBrand.mjs` rewrites at boot —
* see the note in `/features/` before touching it. A stock build hides every one.
*
* `game` is the module's id, written as `data-demo-game` straight after the path: these
* links are into that module's pages, so they show only on a demo whose mounted
* `demoGames` names it (D83).
*/
interface Props {
title: string;
lede?: string;
game: string;
items: Capability[];
}
const { title, lede, game, items } = Astro.props;
---
<section class="page section feats">
<h2>{title}</h2>
{lede && <p class="prose feats__lede">{lede}</p>}
<ul class="feats__items">
{
items.map((item) => (
<li class="panel feats__item">
<h3>{item.label}</h3>
<p class="feats__detail">{item.detail}</p>
{item.demoPath && (
<a
class="demo-link"
href="" data-demo-url="" data-demo-path={item.demoPath} data-demo-game={game}
rel="noopener noreferrer"
>
See it running
</a>
)}
</li>
))
}
</ul>
</section>
<style>
.feats h2 {
margin: 0;
font-size: clamp(1.5rem, 3vw, 1.95rem);
}
.feats__lede {
margin: 0.85rem 0 0;
color: var(--muted);
}
.feats__items {
display: grid;
gap: 1rem;
margin: 1.75rem 0 0;
padding: 0;
list-style: none;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
}
.feats__item {
display: flex;
flex-direction: column;
}
.feats__item h3 {
margin: 0 0 0.6rem;
color: var(--gold);
font-size: 1.04rem;
}
.feats__detail {
flex: 1;
margin: 0;
color: var(--muted);
font-size: 0.94rem;
}
/* As on /features/: a link rather than a button, and the flex item itself, so the
global rule that hides an empty demo link takes its margin with it. */
.demo-link {
display: inline-flex;
align-items: center;
gap: 0.35rem;
margin-top: 1rem;
color: var(--portal);
font-size: 0.88rem;
text-decoration-color: color-mix(in srgb, var(--portal) 40%, transparent);
}
.demo-link:hover {
color: var(--portal-bright);
}
.demo-link::after {
content: '\2197';
}
</style>

View File

@@ -28,6 +28,8 @@ const brand = renderBrand(Astro);
const links = [ const links = [
{ href: '/features/', label: 'Features' }, { href: '/features/', label: 'Features' },
{ href: '/docs/', label: 'Docs' }, { href: '/docs/', label: 'Docs' },
// D78 (phase 17): the standalone RunicNPC page, for a Rust server owner who runs no site.
{ href: '/runicnpc/', label: 'RunicNPC' },
{ href: '/app/', label: 'App' }, { href: '/app/', label: 'App' },
{ href: '/community/', label: 'Community' }, { href: '/community/', label: 'Community' },
]; ];

View File

@@ -1,5 +1,6 @@
--- ---
import { screenById, WEB, PHONE } from '../data/screens.mjs'; import { screenById, WEB, PHONE } from '../data/screens.mjs';
import platform from '../data/platform.json';
/** /**
* One screenshot, as a figure with its caption. PLAN.md §13 phase 9, D4 / D44. * One screenshot, as a figure with its caption. PLAN.md §13 phase 9, D4 / D44.
@@ -44,9 +45,16 @@ const src = `/screens/${shot.id}.webp`;
// taken at one geometry (see screens.mjs), and `checkScreens.mjs` asserts the files really // taken at one geometry (see screens.mjs), and `checkScreens.mjs` asserts the files really
// are that size, so these attributes cannot drift from the pixels. // are that size, so these attributes cannot drift from the pixels.
const { width, height } = shot.family === 'web' ? WEB : PHONE; const { width, height } = shot.family === 'web' ? WEB : PHONE;
// D67: a game's screen says whose it is. The name comes from `platform.json`, as
// GameExample's does, so the label cannot disagree with the tag the check reads.
const game = shot.game ? platform.games[shot.game] : null;
if (shot.game && !game) {
throw new Error(`Screenshot "${id}" is tagged game "${shot.game}", which platform.json does not have`);
}
--- ---
<figure class="shot"> <figure class="shot" data-game={shot.game}>
<img <img
src={src} src={src}
alt={shot.alt} alt={shot.alt}
@@ -55,7 +63,14 @@ const { width, height } = shot.family === 'web' ? WEB : PHONE;
loading="lazy" loading="lazy"
decoding="async" decoding="async"
/> />
{!bare && <figcaption>{shot.caption}</figcaption>} {
(game || !bare) && (
<figcaption>
{game && <span class="shot__game">{game.name}</span>}
{!bare && shot.caption}
</figcaption>
)
}
</figure> </figure>
<style> <style>
@@ -78,4 +93,18 @@ const { width, height } = shot.family === 'web' ? WEB : PHONE;
font-size: 0.9rem; font-size: 0.9rem;
line-height: 1.5; line-height: 1.5;
} }
/* The game's name, ahead of the caption (D67). Styled here rather than with the global
chip, because the docs pages render this component without the marketing stylesheet. */
.shot__game {
display: inline-block;
margin-right: 0.5rem;
padding: 0.05rem 0.55rem;
border: 1px solid var(--line);
border-radius: var(--radius-pill);
color: var(--muted);
font-size: 0.76rem;
letter-spacing: 0.04em;
white-space: nowrap;
}
</style> </style>

View File

@@ -0,0 +1,63 @@
---
import { games } from '../data/games/index.mjs';
/**
* "Supported games: Ultima Online · Rust" — PLAN.md §16, D63.
*
* The one place a core page names the games, and the way it hands a reader on to them. Core
* pages describe what a game module adds in core's words (D75); this strip is the link to
* the page where each game says it in its own. The names come from `platform.json` through
* `games/index.mjs`, so a third game appears here the day it is added there.
*/
interface Props {
/** Extra class for the caller's spacing. */
class?: string;
}
const { class: className } = Astro.props;
---
<p class:list={['games', className]}>
<span class="games__label">Supported games</span>
{
games.map((game, index) => (
<>
{index > 0 && <span class="games__sep" aria-hidden="true">·</span>}
<a class="games__link" href={game.href}>
{game.name}
</a>
</>
))
}
</p>
<style>
.games {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.35rem 0.65rem;
margin: 0;
font-size: 0.95rem;
}
.games__label {
color: var(--dim);
font-size: 0.78rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.games__label::after {
content: ':';
}
.games__sep {
color: var(--dim);
}
.games__link {
color: var(--gold);
font-weight: 600;
}
</style>

View File

@@ -1,5 +1,6 @@
--- ---
import { screensOf, PHONE } from '../../data/screens.mjs'; import { screensOf, PHONE } from '../../data/screens.mjs';
import platform from '../../data/platform.json';
/** /**
* The app's screenshot strip. Reserved in phase 5 (D26), filled in phase 9. * The app's screenshot strip. Reserved in phase 5 (D26), filled in phase 9.
@@ -38,14 +39,15 @@ const shots = screensOf('phone');
<section class="page section shots"> <section class="page section shots">
<h2>What it looks like</h2> <h2>What it looks like</h2>
<p class="prose shots__lede"> <p class="prose shots__lede">
Captured against a real deployment with real content, not mocked up. The app takes its Captured from the app against two demo deployments: one with a real Ultima Online
colours, type and navigation from the site it is connected to, so these show one server behind it, and one with a real Rust server whose players are a demo cast. The
community's app rather than a neutral one. app takes its colours, type and navigation from the site it is connected to, so these
show one community's app rather than a neutral one.
</p> </p>
<ul class="shots__grid"> <ul class="shots__grid">
{shots.map((shot) => ( {shots.map((shot) => (
<li class="shots__item"> <li class="shots__item" data-game={shot.game}>
<img <img
src={`/screens/${shot.id}.webp`} src={`/screens/${shot.id}.webp`}
alt={shot.alt} alt={shot.alt}
@@ -54,7 +56,10 @@ const shots = screensOf('phone');
loading="lazy" loading="lazy"
decoding="async" decoding="async"
/> />
<p class="shots__caption">{shot.caption}</p> <p class="shots__caption">
{shot.game && <span class="shots__game">{platform.games[shot.game].name}</span>}
{shot.caption}
</p>
</li> </li>
))} ))}
</ul> </ul>
@@ -91,6 +96,19 @@ const shots = screensOf('phone');
box-shadow: var(--shadow-card); box-shadow: var(--shadow-card);
} }
/* The game's name on a game's screen (D67), as Screenshot.astro prints it. */
.shots__game {
display: inline-block;
margin-right: 0.5rem;
padding: 0.05rem 0.55rem;
border: 1px solid var(--line);
border-radius: var(--radius-pill);
color: var(--muted);
font-size: 0.74rem;
letter-spacing: 0.04em;
white-space: nowrap;
}
.shots__caption { .shots__caption {
margin: 0.85rem 0 0; margin: 0.85rem 0 0;
color: var(--dim); color: var(--dim);

View File

@@ -26,8 +26,8 @@ import platform from '../../data/platform.json';
<p class="eyebrow">Where the game stops</p> <p class="eyebrow">Where the game stops</p>
<h2>A seam, with a version on it</h2> <h2>A seam, with a version on it</h2>
<p class="prose"> <p class="prose">
The core site does not know what a shard is, what a guild is, or that Ultima Online The core site does not know what game it serves, what that game calls a group of
exists. Everything that does lives in an installable module on the other side of a players, or that Ultima Online and Rust exist. Everything that does lives in an installable module on the other side of a
declared interface — which is what makes "put your game on it" a shape rather than a declared interface — which is what makes "put your game on it" a shape rather than a
slogan. slogan.
</p> </p>
@@ -123,8 +123,8 @@ import platform from '../../data/platform.json';
<p> <p>
Core owns the Teams primitive — the roster, the forum, the notifications, the voice Core owns the Teams primitive — the roster, the forum, the notifications, the voice
channel — and does not own the <em>word</em>. A Team cannot be created in core at channel — and does not own the <em>word</em>. A Team cannot be created in core at
all; it arrives from the module, which is why the UO module calls them guilds and all; it arrives from the module, which is why each module calls them by its own
builds those pages itself. That is the pattern the whole interface is built on: core game’s word and builds those pages itself. That is the pattern the whole interface is built on: core
supplies the machinery, the module supplies the meaning. supplies the machinery, the module supplies the meaning.
</p> </p>
</section> </section>

View File

@@ -9,7 +9,10 @@
* doing capacity planning, and "how many machines is this" is the first question they have. * doing capacity planning, and "how many machines is this" is the first question they have.
* *
* Drawn generically for the same reason the homepage's diagram is (D17) — "your game host", * Drawn generically for the same reason the homepage's diagram is (D17) — "your game host",
* not "your ServUO box" — with the prose beside it naming the real components. The boundary * not a particular game's server — with the prose beside it linking to each game's page,
* which names its real components (D75). Until phase 17 the caption named one game's and
* said two machines was also the maximum, which stopped being true when Rust shipped: one
* sidecar serves one server, so six servers means six sidecars. The boundary
* is the one drawn argument: everything above it is reachable because you published it, and * is the one drawn argument: everything above it is reachable because you published it, and
* everything below it is not reachable at all. * everything below it is not reachable at all.
* *
@@ -73,8 +76,10 @@
</svg> </svg>
<p class="diagram__caption"> <p class="diagram__caption">
Today the game server is a ServUO shard and the sidecar is uo-link. Two machines is The sidecar and the bridge plugin are each game’s own — see
the minimum and also the maximum — nothing here scales by adding a third. <a href="/modules/uo/">Ultima Online</a> and <a href="/modules/rust/">Rust</a>. Two
machines is the minimum. A community running several game servers runs a sidecar
beside each one, on whichever host that server already lives on.
</p> </p>
</div> </div>
@@ -92,10 +97,10 @@
<section> <section>
<h3>The game host</h3> <h3>The game host</h3>
<p> <p>
The machine your game server is already on. One installer binary puts the plugin The machine your game server is already on. One installer binary puts the bridge
into the server's tree, installs the sidecar beside it and registers the service — plugin into the server's tree, installs the sidecar beside it and registers the
then prints four values. It never contacts your website; you paste those four service — then prints what the site needs. It never contacts your website; you enter
values into the admin panel yourself, and that is the moment the two halves meet. those values in the admin panel yourself, and that is the moment the two halves meet.
</p> </p>
</section> </section>

View File

@@ -1,6 +1,7 @@
--- ---
import platform from '../../data/platform.json'; import { capabilityGroups } from '../../data/capabilities.mjs';
import { capabilityGroups, assertCapabilityCoverage } from '../../data/capabilities.mjs'; import { games, assertGameCoverage } from '../../data/games/index.mjs';
import SupportedGames from '../SupportedGames.astro';
/** /**
* The grouped capabilities (PLAN.md §10). All five groups, named only — the argument for * The grouped capabilities (PLAN.md §10). All five groups, named only — the argument for
@@ -8,8 +9,10 @@ import { capabilityGroups, assertCapabilityCoverage } from '../../data/capabilit
* copy to keep true. * copy to keep true.
* *
* The call below is the point of the exercise: it throws, and therefore fails the build, if * The call below is the point of the exercise: it throws, and therefore fails the build, if
* the "Game intelligence" list and the module's own declared capabilities have drifted * either game's own feature list (`src/data/games/`) and its module's declared capabilities
* apart. `checkFacts.mjs` already keeps `platform.json` honest against the module manifest; * have drifted apart. The homepage names neither list — its module-supplied group is the
* neutral one, in core's words (D75) — but it is the page a reader meets first, so it is
* the page that should refuse to build when a game page is out of date. `checkFacts.mjs` already keeps `platform.json` honest against the module manifest;
* this makes the page honest against `platform.json`, which is the half that was missing. * this makes the page honest against `platform.json`, which is the half that was missing.
* *
* The "not built" line at the bottom is not a disclaimer bolted on — §2's absent-features * The "not built" line at the bottom is not a disclaimer bolted on — §2's absent-features
@@ -17,17 +20,18 @@ import { capabilityGroups, assertCapabilityCoverage } from '../../data/capabilit
* what exists while quietly omitting the well-known things that do not is the exact failure * what exists while quietly omitting the well-known things that do not is the exact failure
* §1 is written to prevent. * §1 is written to prevent.
*/ */
assertCapabilityCoverage(platform.games.uo.module.capabilities); for (const game of games) assertGameCoverage(game.key);
--- ---
<section class="page section caps"> <section class="page section caps">
<p class="eyebrow">What it does</p> <p class="eyebrow">What it does</p>
<h2>A community site, and a window into the game</h2> <h2>A community site, and a window into the game</h2>
<p class="prose caps__lede"> <p class="prose caps__lede">
The core is game-agnostic: it does not know what a shard is. Everything that does arrives The core is game-agnostic: it does not know what game you run. Everything that does
as an installable <a href="/modules/">module</a>, which is why the same platform can carry arrives as an installable <a href="/modules/">module</a>, which is why the same platform
a different game without a fork. carries two games without a fork.
</p> </p>
<SupportedGames class="caps__games" />
<div class="caps__grid"> <div class="caps__grid">
{ {
@@ -69,6 +73,10 @@ assertCapabilityCoverage(platform.games.uo.module.capabilities);
color: var(--muted); color: var(--muted);
} }
.caps__games {
margin-top: 1.25rem;
}
.caps__grid { .caps__grid {
display: grid; display: grid;
gap: 1rem; gap: 1rem;

View File

@@ -4,7 +4,7 @@ import { brand } from '../../lib/brand.mjs';
/** /**
* The get-started CTA (PLAN.md §10, the `/` row), built around the trap in §10's * The get-started CTA (PLAN.md §10, the `/` row), built around the trap in §10's
* "installation path": a "Runic Gateway install" is two independent installs. The installer * "installation path": a "Runic Gateway install" is two independent installs. The installer
* binary sets up the shard side only and never contacts the website; the website is a * binary sets up the game side only and never contacts the website; the website is a
* separate Docker deployment. * separate Docker deployment.
* *
* That belongs on the homepage rather than being saved for the docs. It is the single * That belongs on the homepage rather than being saved for the docs. It is the single
@@ -13,7 +13,9 @@ import { brand } from '../../lib/brand.mjs';
* project. Saying it here is what makes the docs a confirmation rather than a surprise. * project. Saying it here is what makes the docs a confirmation rather than a surprise.
* *
* The two halves are ordered site-first because that is the order they must be done in: the * The two halves are ordered site-first because that is the order they must be done in: the
* shard side ends by pasting four values into the site's admin panel, which has to exist. * game side ends by entering what the installer printed into the site's admin panel, which
* has to exist. Which screen that is belongs to the game module, so this says "the game
* module's screen" rather than naming one game's menu (D63).
* *
* Both "read the docs" links point at `/docs/` rather than at a page inside the journey. * Both "read the docs" links point at `/docs/` rather than at a page inside the journey.
* Phases 7 and 8 write those pages and own their slugs; guessing one now would put a URL in * Phases 7 and 8 write those pages and own their slugs; guessing one now would put a URL in
@@ -44,9 +46,10 @@ import { brand } from '../../lib/brand.mjs';
<div class="start__half"> <div class="start__half">
<h3><span class="start__num">2</span> The game side</h3> <h3><span class="start__num">2</span> The game side</h3>
<p> <p>
One binary, run on the machine the game server already lives on. It syncs the plugin, One binary, run on the machine the game server already lives on — or, for Rust, a
installs the sidecar as a service, and prints four values. You paste those into Pterodactyl egg. It puts the bridge plugin in place, installs the sidecar, and prints
Admin → Shard, and the two halves find each other. what the site needs. You enter that on the game module’s screen in the admin panel,
and the two halves find each other.
</p> </p>
</div> </div>
</div> </div>

View File

@@ -2,19 +2,27 @@
import Screenshot from '../Screenshot.astro'; import Screenshot from '../Screenshot.astro';
/** /**
* The homepage's one screenshot. PLAN.md §13 phase 9, D4 / D44. * The homepage's screenshots, one per game. PLAN.md §13 phase 9, D4 / D44; §16 phase 18.
* *
* ----------------------------------------------------------------------------------------- * -----------------------------------------------------------------------------------------
* WHY ONE, AND WHY THIS ONE * WHY ONE PER GAME, AND WHY THESE
* ----------------------------------------------------------------------------------------- * -----------------------------------------------------------------------------------------
* `DataPath` above it draws the claim — a private game server, a sidecar, a public site — * `DataPath` above it draws the claim — a private game server, a sidecar, a public site —
* and a diagram of a data path is a promise that the data arrives. This is the page where * and a diagram of a data path is a promise that the data arrives. This is the page where
* it arrives, captured from a deployment wired to a running shard, so the section directly * it arrives, captured from a deployment wired to a running game server, so the section
* under the diagram is the diagram's evidence. * directly under the diagram is the diagram's evidence.
*
* It is one game's screen, and says so (D76, taken in phase 17 under D67): the screenshot is
* tagged `uo` in `screens.mjs`, so it prints "Ultima Online" beside it and may keep that
* game's words in its alt and caption. A core screen was the alternative and was declined:
* the claim here is live game state on a public page, which no core screen shows. Phase 18
* added a Rust capture beside it, labelled the same way: the live map, because every pixel
* of it is the running server's — the Rust demo's players are a demo cast (D81), and the
* map shows none of them.
* *
* A gallery here would compete with `Capabilities` further down, which is the part of the * A gallery here would compete with `Capabilities` further down, which is the part of the
* homepage that enumerates. So: one figure, the signature screen, and the rest of the set * homepage that enumerates. So: one figure per game, its signature screen, and the rest of
* on `/features/` where each one sits beside the claim it supports. * the set on each game's page under `/modules/`, where each sits beside the claim it supports.
*/ */
--- ---
@@ -22,12 +30,16 @@ import Screenshot from '../Screenshot.astro';
<p class="eyebrow">What it looks like</p> <p class="eyebrow">What it looks like</p>
<h2>The other end of that diagram</h2> <h2>The other end of that diagram</h2>
<p class="prose looks__lede"> <p class="prose looks__lede">
A demo deployment with a real shard behind it. The gold supply, the state of the link and Two demo deployments, each with a real game server behind it. On the first, the gold
the player online in Britain are all read from the game server over the bridge. None of it supply, the state of the link and the player online are all read from an Ultima Online
is typed in, and none of it is a mock-up. server over the bridge. On the second, the map is the running Rust server's own: its
island, its monuments, and the events on it as they happen.
</p> </p>
<Screenshot id="shard-status" /> <div class="looks__pair">
<Screenshot id="shard-status" />
<Screenshot id="rust-map" />
</div>
</section> </section>
<style> <style>
@@ -41,4 +53,11 @@ import Screenshot from '../Screenshot.astro';
max-width: 46rem; max-width: 46rem;
color: var(--muted); color: var(--muted);
} }
/* Side by side where there is room for two screenshots to stay readable, stacked below. */
.looks__pair {
display: grid;
gap: 0 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
}
</style> </style>

View File

@@ -1,6 +1,6 @@
--- ---
title: Moderation title: Moderation
description: Three screens that do three different jobs — Discord moderation, content reports, and appeals against a sanction. description: Three screens that do three different jobs — Discord moderation, content reports, and appeals against a sanction — and what members can do for themselves.
--- ---
import { Aside } from '@astrojs/starlight/components'; import { Aside } from '@astrojs/starlight/components';
@@ -11,7 +11,7 @@ not overlap.
| Screen | Is about | Comes from | | Screen | Is about | Comes from |
|---|---|---| |---|---|---|
| **Moderation** | Your **Discord** server — bans, kicks, mutes, warnings, joins, leaves, filter and spam hits | the bot, captured live | | **Moderation** | Your **Discord** server — bans, kicks, mutes, warnings, joins, leaves, filter and spam hits | the bot, captured live |
| **Reports** | **Team forum content** members have reported | the site | | **Reports** | **Content** members have reported — Team forum threads and posts, and a game's chat lines where its module offers them | the site |
| **Appeals** | Sanctions people are asking you to reverse | the site | | **Appeals** | Sanctions people are asking you to reverse | the site |
## Moderation (Discord) ## Moderation (Discord)
@@ -29,13 +29,20 @@ browsing the window.
## Reports ## Reports
Reports raised by members about Team forum content. Two design decisions show through in Reports raised by members about Team forum threads and posts and, where a game module offers
how this screen behaves: it, the game's chat lines — the Rust module does, from the `⋯` menu on a chat line on the
site and a long press in the [app](/app/). Each report keeps a copy of what the item said when it was
reported, so an author editing it afterwards does not change what staff read. Three design
decisions show through in how this screen behaves:
- **They come to site staff, and a Team's own leaders never see them.** A leader moderates - **They come to site staff, and a Team's own leaders never see them.** A leader moderates
their own forum, so a report *about a leader* has to reach someone above them. their own forum, so a report *about a leader* has to reach someone above them.
- **Handling a report records a decision about the report.** It does not touch the content: - **A report changes nothing on its own.** Filing one must never be a way to hide
hiding or removing a post is done in the forum, or as a sanction against the account. something, so the reported item stays where it is until staff act.
- **Acting is a separate, deliberate step.** *Hide for everyone* on a report hides the item
from everybody except staff, who still see it marked *Hidden by staff* and can show it
again, and it records the report as actioned. Removing content outright, or sanctioning the
account, is still done in the forum or against the account.
The filters are *Open*, *Reviewing*, *Actioned*, *Dismissed* and *All*, and the count of The filters are *Open*, *Reviewing*, *Actioned*, *Dismissed* and *All*, and the count of
open reports sits at the top so the screen is glanceable. open reports sits at the top so the screen is glanceable.
@@ -46,6 +53,19 @@ that never empties stops being read, and the reporter's next report is the one t
matters. matters.
</Aside> </Aside>
## What members do for themselves
Two tools need no staff at all, and nothing about them reaches the queue:
- **Hide for me** takes one item out of that member's own view, on every device.
- **Block** takes everything a person writes — chat lines and forum content — out of the
blocker's view, on the site and in the app. The blocked person is not told. Staff cannot be
blocked, and a block whose target later becomes staff stops applying and says so. A game
player who has not linked a site account is blocked by their game identity, which turns
into a block on their account if they link one later.
A member undoes either from **Account → Blocked**.
## Appeals ## Appeals
An appeal is a request to reverse a sanction, filtered by *Open*, *Pending*, *Under An appeal is a request to reverse a sanction, filtered by *Open*, *Pending*, *Under

View File

@@ -42,7 +42,7 @@ with six tabs.
| Tab | What it shows | | Tab | What it shows |
|---|---| |---|---|
| **Feed** | Kills, chat, comings and goings, the server's own story, RunicNPC bosses, and Rust's world events — cargo, helicopters, airdrops — as they happen | | **Feed** | Kills, chat, comings and goings, the server's own story, RunicNPC bosses, and Rust's world events — cargo, helicopters, airdrops — as they happen. A signed-in member can report a chat line, hide it for themself or block the player from its `⋯` menu, and staff can hide a line for everyone ([Moderation](/docs/administration/moderation/)) |
| **Leaderboard** | Per wipe: kills, deaths, NPC kills, structures, time played, and the chat titles players have earned | | **Leaderboard** | Per wipe: kills, deaths, NPC kills, structures, time played, and the chat titles players have earned |
| **Online** | Who is on right now | | **Online** | Who is on right now |
| **Map** | The [live map](/docs/rust/the-live-map/): the server's own map picture, with layers | | **Map** | The [live map](/docs/rust/the-live-map/): the server's own map picture, with layers |

View File

@@ -4,6 +4,7 @@ description: Admin → Rust permissions — the site holds every server's permis
--- ---
import { Aside } from '@astrojs/starlight/components'; import { Aside } from '@astrojs/starlight/components';
import Screenshot from '../../../../components/Screenshot.astro';
**Admin → Rust permissions** (`/admin/rust`) is where the site holds every permission and group **Admin → Rust permissions** (`/admin/rust`) is where the site holds every permission and group
on each server: what was there before the site, what is made here, and what is changed in the on each server: what was there before the site, what is made here, and what is changed in the
@@ -66,6 +67,8 @@ new one. Each group has four tabs:
same permissions and players on every server it is on — including servers added later, if you same permissions and players on every server it is on — including servers added later, if you
tick that — and a change made in one game gives that server its own copy. tick that — and a change made in one game gives that server its own copy.
<Screenshot id="admin-rust-permissions" />
### Chat styles ### Chat styles
A group's **Settings** tab has a **Chat style (BetterChat)** section. Give a group a style and A group's **Settings** tab has a **Chat style (BetterChat)** section. Give a group a style and

View File

@@ -4,6 +4,7 @@ description: Authoring RunicNPC's profiles and faction table on the site — whi
--- ---
import { Aside } from '@astrojs/starlight/components'; import { Aside } from '@astrojs/starlight/components';
import Screenshot from '../../../../../components/Screenshot.astro';
**Admin → Rust NPC profiles** is where a Runic Gateway site authors RunicNPC's profiles. There is **Admin → Rust NPC profiles** is where a Runic Gateway site authors RunicNPC's profiles. There is
no in-game profile editor: on a server a site manages, the profiles and the faction table are the no in-game profile editor: on a server a site manages, the profiles and the faction table are the
@@ -47,6 +48,8 @@ Each row shows a profile's label and RunicNPC name, the servers it is for, its r
a boss or has its own loot, its health, kits and movement, and how its kills count. **New profile** a boss or has its own loot, its health, kits and movement, and how its kills count. **New profile**
and **Edit** open the editor below the list. and **Edit** open the editor below the list.
<Screenshot id="admin-rust-npcs" />
### Which servers ### Which servers
A profile is for **every server** — including servers added later — or for the ones ticked. Each A profile is for **every server** — including servers added later — or for the ones ticked. Each

View File

@@ -4,11 +4,14 @@ description: The Map tab on each server's page — where the picture comes from,
--- ---
import { Aside } from '@astrojs/starlight/components'; import { Aside } from '@astrojs/starlight/components';
import Screenshot from '../../../../components/Screenshot.astro';
Each server's public page has a **Map** tab: this wipe's map, with the game's own grid, its Each server's public page has a **Map** tab: this wipe's map, with the game's own grid, its
monuments, and layers for everything that moves. It is drawn in the browser from two things the monuments, and layers for everything that moves. It is drawn in the browser from two things the
bridge answers live — the picture, and the positions. bridge answers live — the picture, and the positions.
<Screenshot id="rust-map" />
## The picture ## The picture
**From Rust+, when it is on.** A server with `app.port` set renders its map at boot and keeps the **From Rust+, when it is on.** A server with `app.port` set renders its map at boot and keeps the

View File

@@ -4,9 +4,9 @@
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* WHY THIS IS NOT capabilities.mjs * WHY THIS IS NOT capabilities.mjs
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* `capabilities.mjs` describes what a DEPLOYMENT does, and it is checked against * `capabilities.mjs` and `games/` describe what a DEPLOYMENT does, and each game's list is
* `module-uo`'s manifest because the module declares its capabilities in a machine-readable * checked against its module's manifest because a module declares its capabilities in a
* file. The app declares nothing of the kind: what it does is a set of screens in * machine-readable file. The app declares nothing of the kind: what it does is a set of screens in
* `Routes.kt`, and there is no manifest to diff against. So these are written from that * `Routes.kt`, and there is no manifest to diff against. So these are written from that
* file and carry the route names, which is the closest thing to a citation available — a * file and carry the route names, which is the closest thing to a citation available — a
* reader who wants to check a claim here has a file to open. * reader who wants to check a claim here has a file to open.
@@ -18,11 +18,19 @@
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* "GATED BY WHAT THE DEPLOYMENT PUBLISHES" IS LOAD-BEARING, NOT A DISCLAIMER * "GATED BY WHAT THE DEPLOYMENT PUBLISHES" IS LOAD-BEARING, NOT A DISCLAIMER
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* Almost everything here is conditional on the site the app is pointed at: shard screens * Almost everything here is conditional on the site the app is pointed at: game screens
* appear only when the deployment runs a game module and has that visibility feature * appear only when the deployment runs a game module and has that visibility feature
* turned on, staff screens only for a staff account, push only where the operator runs an * turned on, staff screens only for a staff account, push only where the operator runs an
* ntfy. A features list that omitted that would be describing an app nobody will see, * ntfy. A features list that omitted that would be describing an app nobody will see,
* because there is no default deployment — see `requiresDeployment` below. * because there is no default deployment — see `requiresDeployment` below.
*
* ---------------------------------------------------------------------------------------
* ONE ITEM PER GAME, NAMED BY THE GAME (phase 17, D75 and D77)
* ---------------------------------------------------------------------------------------
* `/app/` is a core page, so it names the games but not their vocabulary. The game screens
* are one item per game, titled with the game's name and described in core's words. The
* Rust screens (`ui/rust/` on `Android-app`) were on `edge` when this was written; the org
* lead released them the same day (D77), so the page describes them as shipped.
*/ */
/** /**
@@ -54,33 +62,29 @@ export const requiresDeployment = {
/** @type {{ heading: string, blurb: string, items: AppFeature[] }[]} */ /** @type {{ heading: string, blurb: string, items: AppFeature[] }[]} */
export const appFeatures = [ export const appFeatures = [
{ {
heading: 'The shard, live', heading: 'The game, live',
blurb: blurb:
'The same feed the website shows, on a phone. Every one of these appears only when ' + 'The same feed the website shows, on a phone. Every one of these appears only when ' +
'the deployment runs a game module and the operator has published that surface — ' + 'the deployment runs a game module and the operator has published that surface — ' +
'the visibility settings are per-feature and default to off.', 'the visibility settings are per-feature and default to off.',
items: [ items: [
{ {
title: 'Status, and the boards', title: 'Ultima Online: the server, its boards and its market',
body: body:
'Whether the game server is up, plus champion spawns, guilds, city governors and ' + 'Whether the game server is up and what it reports — its champions, Teams, ' +
'houses as the shard reports them.', 'governors and houses — plus the player marketplace down to a single vendor, the ' +
gate: 'A game module, and the matching visibility feature', "published ruleset, the leaderboards and the creature atlas. Item names are " +
"resolved against the game's own string table, so they read the way they read in " +
'the client.',
gate: 'The Ultima Online module, per feature',
}, },
{ {
title: 'The player marketplace', title: 'Rust: every server, live',
body: body:
'Player-run vendors and what is on their shelves, down to a single vendor. Item ' + 'Every server the community runs, and a page for each with its feed, its ' +
"names arrive as the game's own string ids and are resolved against its string " + 'leaderboard, who is online, its history on the site, and its live map with the ' +
'table, so they read the way they read in the client.', 'layers you may see — positions refreshed every ten seconds while the map is open.',
gate: 'A game module publishing the market', gate: 'The Rust module, per feature',
},
{
title: 'Rules, leaderboards and the spawn atlas',
body:
"The deployment's published ruleset, its points and loyalty boards, and the " +
'creature atlas — what spawns where, and what it drops.',
gate: 'A game module, per feature',
}, },
], ],
}, },
@@ -117,12 +121,29 @@ export const appFeatures = [
'per device from the app.', 'per device from the app.',
}, },
{ {
title: 'Your characters, vendors and houses', title: 'Your own side of the game',
body: body:
'Character sheets, the vendors you run and the houses you own, visible to the ' + 'On Ultima Online, your character sheets, the vendors you run and the houses you ' +
'account they belong to and to nobody else.', 'own; on Rust, the Steam accounts you have linked, your coins and your backpack. ' +
'Visible to the account they belong to and to nobody else.',
gate: 'A game module', gate: 'A game module',
}, },
{
title: 'Report, block and hide',
body:
'Long-press a chat line to report it to the site’s staff, hide it for yourself, or ' +
'block the player. A block is kept on your account, so it applies on the website and ' +
'on every device too; staff cannot be blocked, and Account → Blocked undoes any of ' +
'it. Staff get Hide for everyone on the same menu.',
gate: 'A game module whose chat lines can be reported (Rust)',
},
{
title: 'Deleting your account',
body:
'From My account, with your password and, where the account has one, a two-factor ' +
'code. The account is deleted on the deployment at once — see what that removes and ' +
'what it keeps on the delete-account page.',
},
], ],
}, },
{ {

View File

@@ -32,9 +32,9 @@
* 2. SOMEWHERE TO POINT IT. `ConnectScreen.kt` on `Android-app` `main` is blunt about * 2. SOMEWHERE TO POINT IT. `ConnectScreen.kt` on `Android-app` `main` is blunt about
* this — "nothing else in the app runs until a valid Runic Gateway site is entered and * this — "nothing else in the app runs until a valid Runic Gateway site is entered and
* validated". An installed app with no deployment behind it is a text field. D27 makes * validated". An installed app with no deployment behind it is a text field. D27 makes
* the public demo (§15) the tester target rather than naming a private shard, which * the public demo (§15) the tester target rather than naming a private shard. The demo
* means the beta opens when the demo VM does. `notBuilt.mjs` already carries that * went up on 2026-10-27; with `demoUrl` mounted, `/beta` marks this gate in place and
* absence; this page renders the demo link from `demoUrl` when there is one. * lists the demo's sign-ins as the demo publishes them (D82, `lib/demoLogins.mjs`).
* *
* Neither gate is a reason not to collect addresses now — the list is what makes the first * Neither gate is a reason not to collect addresses now — the list is what makes the first
* batch possible on day one — but a page that hid them would be advertising a beta that * batch possible on day one — but a page that hid them would be advertising a beta that
@@ -180,8 +180,7 @@ export const requirements = [
body: body:
'The app ships pointed at nothing. Its first screen asks for the address of a site ' + 'The app ships pointed at nothing. Its first screen asks for the address of a site ' +
'running this platform and validates it before anything else in the app will run — ' + 'running this platform and validates it before anything else in the app will run — ' +
'so a tester needs either their own deployment or the public demo, which is the ' + 'so a tester needs either their own deployment or the public demo.',
'second of the two things this beta is waiting on.',
}, },
]; ];

View File

@@ -16,23 +16,17 @@
* the homepage without an argument to go with it. * the homepage without an argument to go with it.
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* THE PART THAT IS A CHECK, NOT A LIST * THE ONE GROUP CORE DOES NOT SUPPLY, IN CORE'S WORDS
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* "Game intelligence" is the only group core does not supply — it comes from whichever * "What a game module adds" is the only group core does not supply — it comes from
* module is installed, and today that is `module-uo`. Its items therefore carry the * whichever module is installed. Until phase 17 it was "Game intelligence" and listed the
* capability slugs the module actually declares in its `module.json`, and * Ultima Online module's features in that game's words, on the homepage and `/features/`.
* `assertCapabilityCoverage()` fails the build if the two lists drift apart. * Two modules exist now, and D63 keeps a game's vocabulary on its own pages, so the group
* says what BOTH modules add, in core's words, and each game's real list lives in
* `src/data/games/` and on its page under `/modules/` (D75).
* *
* That closes a real gap. `platform.json` holds `games.uo.module.capabilities` and * The capability check moved with the lists: `assertGameCoverage()` in `games/index.mjs`
* `scripts/checkFacts.mjs` re-reads it from the module's manifest on every build — so the * holds each game's features to the capabilities its module declares, in both directions.
* day `module-uo` gains a capability, the JSON goes red and someone updates it. Before this
* function, updating the JSON was the end of it and the page kept the old list. Now the
* page is what goes red next.
*
* Note that slugs are NOT one-per-item in either direction: `shard` is the source of four
* separate user-facing capabilities, and the marketplace draws on `market` and `cliloc`
* together (item names arrive as cliloc ids and are resolved against the shard's own
* string table). The check is coverage in both directions, not a bijection.
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* `needsModule` — THE THIRD STATE, WHICH PHASE 3 DID NOT HAVE * `needsModule` — THE THIRD STATE, WHICH PHASE 3 DID NOT HAVE
@@ -47,8 +41,8 @@
* the tables, the roster resolver, the forums, the notification streams, the Discord bridge, * the tables, the roster resolver, the forums, the notification streams, the Discord bridge,
* the voice channels, the activity feed and `/admin/teams` — and cannot *originate* a Team. * the voice channels, the activity feed and `/admin/teams` — and cannot *originate* a Team.
* They arrive from the installed module, which is exactly the point: core does not own the * They arrive from the installed module, which is exactly the point: core does not own the
* word for a Team, so `module-uo` calls them guilds and builds the pages, and a future * word for a Team, so each module calls them what its game calls them and builds the pages
* module can call them something else on the same primitive. * on the same primitive.
* *
* So `needsModule` marks an item that is core machinery a module has to populate. On a bare * So `needsModule` marks an item that is core machinery a module has to populate. On a bare
* core it is present, correct and permanently empty. `/` renders the requalified group * core it is present, correct and permanently empty. `/` renders the requalified group
@@ -57,7 +51,7 @@
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* `demoPath` — DEEP LINKS THAT ONLY EXIST WHEN A DEMO DOES * `demoPath` — DEEP LINKS THAT ONLY EXIST WHEN A DEMO DOES
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* §15/D12 keeps the public demo out of scope while requiring the site to gain one by way of * §15/D12 kept the public demo out of scope while requiring the site to gain one by way of
* a line in a mounted `brand.json`. `brand.json`'s own comment promised `/features/` a * a line in a mounted `brand.json`. `brand.json`'s own comment promised `/features/` a
* "per-capability affordance" that had never been defined; D25 defines it as a deep link * "per-capability affordance" that had never been defined; D25 defines it as a deep link
* per capability that has a stable public route, appended to the mounted `demoUrl` by * per capability that has a stable public route, appended to the mounted `demoUrl` by
@@ -68,11 +62,15 @@
* character sheets are reachable only by the account they belong to, and a Team forum lives * character sheets are reachable only by the account they belong to, and a Team forum lives
* behind a Team id no static page can know. Paths are read from the real route tables — * behind a Team id no static page can know. Paths are read from the real route tables —
* core's `client/src/App.jsx` and `module-uo`'s `client/src/entry.jsx` on `main` — never * core's `client/src/App.jsx` and `module-uo`'s `client/src/entry.jsx` on `main` — never
* guessed. Note the module's public pages are namespaced under its own id, so a UO route is * guessed. A module's public pages are namespaced under its own id, so a route into the
* `/uo/…`; a deployment running a different module would deep-link somewhere else, which is * Ultima Online module is `/uo/…`. A link into a module's pages names that game
* why these sit beside the `caps` slugs on the module-supplied items. * (`demoGame` here, the `game` prop of `GameFeatures` for the lists in `games/`), and it
* shows only when the mounted `demoGames` lists it (D83): the demo that exists runs Rust,
* so the Teams item's `/uo/guilds` stays hidden there and Rust's clans link stands in.
*/ */
import { games } from './games/index.mjs';
/** /**
* The shape of a capability, written out because TypeScript otherwise infers it per group * The shape of a capability, written out because TypeScript otherwise infers it per group
* from whichever fields that group's items happen to use — and then `/features/` cannot * from whichever fields that group's items happen to use — and then `/features/` cannot
@@ -83,9 +81,10 @@
* @typedef {object} Capability * @typedef {object} Capability
* @property {string} label What it is called, on every page that lists it. * @property {string} label What it is called, on every page that lists it.
* @property {string} detail The argument for it. `/features/` only; see D20. * @property {string} detail The argument for it. `/features/` only; see D20.
* @property {string[]} [caps] Module capability slugs, on module-supplied items only. * @property {string[]} [caps] Module capability slugs, on a game's own items (`games/`) only.
* @property {boolean} [needsModule] Core machinery a module has to populate (D24). * @property {boolean} [needsModule] Core machinery a module has to populate (D24).
* @property {string} [demoPath] A stable public route, deep-linked into a demo (D25). * @property {string} [demoPath] A stable public route, deep-linked into a demo (D25).
* @property {string} [demoGame] The game module whose pages `demoPath` is in, if any (D83).
* *
* @typedef {object} CapabilityGroup * @typedef {object} CapabilityGroup
* @property {string} id * @property {string} id
@@ -120,12 +119,13 @@ const community = {
label: 'Teams', label: 'Teams',
needsModule: true, needsModule: true,
demoPath: '/uo/guilds', demoPath: '/uo/guilds',
demoGame: 'uo',
detail: detail:
'A roster, a leader, a private forum, its own notification streams and a Discord ' + 'A roster, a leader, a private forum, its own notification streams and a Discord ' +
'voice channel, all hanging off one group. Core owns every part of that machinery ' + 'voice channel, all hanging off one group. Core owns every part of that machinery ' +
'and deliberately cannot create a Team: they arrive from the installed module, ' + 'and deliberately cannot create a Team: they arrive from the installed module, ' +
'which is how a guild inside the game becomes a Team on the site — and why a ' + 'which is how a group the game already has becomes a Team on the site — and why ' +
'different game can call them something else without core learning a new word.', 'each game keeps its own name for one without core learning a new word.',
}, },
{ {
label: 'Team forums', label: 'Team forums',
@@ -178,102 +178,66 @@ const community = {
}; };
/** /**
* Game intelligence — module-supplied. The `caps` arrays are the contract with * What a game module adds — module-supplied, and written in core's words (D63, D75). Each
* `platform.json`; see `assertCapabilityCoverage` below. * item is something BOTH modules supply, each in its own game's way; the game's own list,
* in its own words, is on its page under `/modules/`, which `/features/` and the homepage
* link to. No `caps` here: they belong to a game's own items in `src/data/games/`, where
* `assertGameCoverage()` checks them.
* *
* @type {CapabilityGroup} * @type {CapabilityGroup}
*/ */
const gameIntelligence = { const gameModule = {
id: 'game-intelligence', id: 'game-module',
title: 'Game intelligence', title: 'What a game module adds',
moduleSupplied: true, moduleSupplied: true,
summary: summary:
'Supplied by the installed game module, not by the core site. Two modules exist, for ' + 'Supplied by the installed game module, not by the core site. Two modules exist, for ' +
'Ultima Online and for Rust; this is what the Ultima Online module publishes from a ' + 'Ultima Online and for Rust, and each adds its own set from a live game server — these ' +
'live game server, and the Rust module brings its own set in its place.', 'are the parts they share.',
items: [ items: [
{ {
label: 'Live server status', label: 'Live server status',
caps: ['shard'],
demoPath: '/uo/shard',
detail: detail:
'Whether the server is up, who is on it, and how long ago the site last heard from ' + 'Whether each game server is up, who is on it, and how long ago the site last heard ' +
'it. When the game is down this page is the thing that says so — the site does not ' + 'from it. When the game is down the site is the thing that says so — it does not go ' +
'go down with it.', 'down with it.',
}, },
{ {
label: 'Economy and activity', label: 'A live feed of the world',
caps: ['shard'],
demoPath: '/uo/shard/activity',
detail: detail:
'A live feed of what is happening in the world, and the economy underneath it. ' + 'What is happening in the game, as it happens. Every kind of event passes an ' +
'Every event passes an allowlist before it can reach a public page; staff read a ' + 'allowlist the module holds before it can reach a public page; staff read a second ' +
'second stream carrying the rest.', 'stream carrying the rest.',
}, },
{ {
label: 'Character sheets', label: 'Leaderboards',
caps: ['shard'],
detail: detail:
'Skills, stats and equipment, drawn from the live world rather than from a form ' + 'The numbers the game already keeps, published without anyone exporting a ' +
'somebody filled in. Reachable by the account the character is linked to, and by ' + 'spreadsheet on a Sunday — and kept by the site after the game has moved on.',
'staff — not by the public.',
}, },
{ {
label: 'Points and loyalty boards', label: 'Maps of the world',
caps: ['shard'],
demoPath: '/uo/leaderboards',
detail: detail:
'The leaderboards the game already keeps, published without anyone exporting a ' + 'Where things are, drawn from the server rather than from someone else’s idea of the ' +
'spreadsheet on a Sunday.', 'game: one module maps what spawns where, the other shows what is moving now.',
}, },
{ {
label: 'Player-vendor marketplace', label: 'Teams, from the game',
caps: ['market', 'cliloc'],
demoPath: '/uo/market',
detail: detail:
'Every player vendor on the server and what is on it, searchable without logging ' + 'The groups players already form in the game arrive as Teams on the site, with the ' +
'in to the game. Item names arrive from the world as numeric ids and are resolved ' + 'forum, notifications and voice channel core attaches to one.',
"against the game's own string table, so they read as names rather than numbers — " +
"beside the item's own picture, in the colour it was dyed.",
}, },
{ {
label: 'Houses and IDOC decay', label: 'Players’ own game accounts',
caps: ['houses'],
demoPath: '/uo/houses',
detail: detail:
'Who owns what and where it stands, including which houses are decaying — ' + 'A player links their game identity to their site account and sees their own side ' +
'published while it is still information rather than after it has become a rumour.', 'of the game on it. Who may see another player at all is the operator’s choice.',
}, },
{ {
label: 'Spawn atlas', label: 'Game steps for scheduled events',
caps: ['atlas'],
demoPath: '/uo/atlas',
detail: detail:
"A bestiary and spawn map built by reading your shard's own spawn tables, so it " + 'What an event may do inside the world comes from the module: core runs the ' +
"describes your server rather than someone else's idea of the game. Regions, " + 'calendar, the budget and the undo, and the module brings the steps.',
'landmarks and champion altars come with it, and each creature is shown as the ' +
'artwork your own client draws it with.',
},
{
label: 'Champion boards',
caps: ['champs'],
demoPath: '/uo/champs',
detail: 'Which altars are running, how far along they are, and what turned up.',
},
{
label: 'Guilds',
caps: ['guilds'],
demoPath: '/uo/guilds',
detail:
'Guild rosters and standings, kept in step with the game. This is also what fills ' +
'the Teams primitive above: a guild in the world becomes a Team on the site, with ' +
"the forum, the notifications and the voice channel that core attaches to one.",
},
{
label: 'City governors',
caps: ['governors'],
demoPath: '/uo/governors',
detail: 'Who holds which city, and what they did with it.',
}, },
], ],
}; };
@@ -372,7 +336,7 @@ const integration = {
{ {
label: 'Discord: slash commands, notifications, voice', label: 'Discord: slash commands, notifications, voice',
detail: detail:
'A bot for the guild you already have. Commands answer from your site, ' + 'A bot for the Discord server you already have. Commands answer from your site, ' +
'notifications bridge into channels, and a Team can be granted a voice channel ' + 'notifications bridge into channels, and a Team can be granted a voice channel ' +
'that maintains its own membership.', 'that maintains its own membership.',
}, },
@@ -429,7 +393,7 @@ const infrastructure = {
export const capabilityGroups = [ export const capabilityGroups = [
community, community,
gameIntelligence, gameModule,
administration, administration,
integration, integration,
infrastructure, infrastructure,
@@ -456,46 +420,11 @@ export function capabilityGroup(id) {
); );
} }
/** /*
* Fails the build when the module's declared capabilities and this page's list disagree. * The capability check that lived here — "Game intelligence" against the module's declared
* * capabilities — moved to `assertGameCoverage()` in `games/index.mjs` in phase 17, with the
* Called from the component rather than from a check script on purpose: the failure needs * lists it checks.
* to reach whoever is editing the page, and an Astro build error names the component. It
* also means the rule cannot be skipped by running `astro build` without `npm run verify`.
*/ */
export function assertCapabilityCoverage(declared) {
const claimed = new Set();
for (const item of gameIntelligence.items) {
for (const cap of item.caps || []) claimed.add(cap);
}
const known = new Set(declared);
const unlisted = declared.filter((cap) => !claimed.has(cap));
const invented = [...claimed].filter((cap) => !known.has(cap));
if (!unlisted.length && !invented.length) return;
const lines = [];
if (unlisted.length) {
lines.push(
`the installed module declares ${unlisted.map((c) => `"${c}"`).join(', ')}, which no ` +
`capability on the homepage claims — the site is under-selling what it can show.`
);
}
if (invented.length) {
lines.push(
`the homepage claims ${invented.map((c) => `"${c}"`).join(', ')}, which the module no ` +
`longer declares — the site is advertising something that is gone (§1).`
);
}
throw new Error(
`src/data/capabilities.mjs disagrees with platform.json's games.uo.module.capabilities:\n` +
lines.map((line) => ` - ${line}`).join('\n') +
`\n\nUpdate the "Game intelligence" items, or the JSON if the module itself changed.\n`
);
}
/** /**
* Fails the build when a capability has no `detail`. * Fails the build when a capability has no `detail`.
@@ -505,8 +434,9 @@ export function assertCapabilityCoverage(declared) {
* asymmetry between the two renderings is the whole of D20, and this is what keeps the * asymmetry between the two renderings is the whole of D20, and this is what keeps the
* thinner one from being the only one anybody notices. * thinner one from being the only one anybody notices.
* *
* Called from `/features/` for the same reason `assertCapabilityCoverage` is called from * Called from `/features/` for the same reason `assertGameCoverage` is called from the
* the homepage: the build error should name the page that would have shipped wrong. * homepage: the build error should name the page that would have shipped wrong. It also
* reads each game's own list, which its page under `/modules/` renders with the detail too.
*/ */
export function assertDetailCoverage() { export function assertDetailCoverage() {
const missing = []; const missing = [];
@@ -515,6 +445,11 @@ export function assertDetailCoverage() {
if (!item.detail?.trim()) missing.push(`${group.title} → ${item.label}`); if (!item.detail?.trim()) missing.push(`${group.title} → ${item.label}`);
} }
} }
for (const game of games) {
for (const item of game.features) {
if (!item.detail?.trim()) missing.push(`${game.name} → ${item.label}`);
}
}
if (!missing.length) return; if (!missing.length) return;

View File

@@ -24,8 +24,9 @@
* `site` This website. We are the data controller. It is one form. * `site` This website. We are the data controller. It is one form.
* `app` The Android app. We operate NO server it talks to — every byte goes to * `app` The Android app. We operate NO server it talks to — every byte goes to
* a deployment the user typed the address of, run by whoever runs that * a deployment the user typed the address of, run by whoever runs that
* community. What is listed here is therefore mostly what the device * community. What is listed here is what the device holds and what it
* HOLDS, not what we receive, because we receive nothing. * sends to that deployment. None of it reaches us, because we receive
* nothing; Play still counts what is sent as collected (see `PlayMapping`).
* `deployment` A self-hosted install of the platform. The operator is the controller, * `deployment` A self-hosted install of the platform. The operator is the controller,
* not us. This scope exists so an operator sees the responsibility they * not us. This scope exists so an operator sees the responsibility they
* are taking on, and so a player never mistakes this policy for the one * are taking on, and so a player never mistakes this policy for the one
@@ -46,13 +47,23 @@
* @property {string} summary Short enough to sit in a table cell. * @property {string} summary Short enough to sit in a table cell.
* @property {string} [detail] The mechanism, where the summary alone would be a promise. * @property {string} [detail] The mechanism, where the summary alone would be a promise.
* *
* @typedef {object} PlayType
* @property {string} category The console's grouping, a key of `PLAY_DATA_TYPES`.
* @property {string} type The console's data type within that grouping.
*
* @typedef {object} PlayMapping * @typedef {object} PlayMapping
* How this row answers Google Play's Data Safety form. `app` scope only — see * How this row answers Google Play's Data Safety form. `app` scope only — see
* `scripts/playDataSafety.mjs`, which is the only reader. * `scripts/playDataSafety.mjs`, which is the only reader.
* @property {string} category The console's grouping, e.g. "Personal info". * @property {PlayType[]} types The console data types this row answers.
* @property {string} type The console's data type within that grouping. * @property {boolean} collected Does it leave the device? Play counts data the app sends
* @property {boolean} collected Does it leave the device to a server WE operate? * off the phone as collected, whoever runs the server it
* @property {boolean} shared Do we pass it to a third party? * goes to. Ours receives none of it, because we run none;
* the deployment the user chose receives it (org lead,
* 2026-10-29: the conservative answers).
* @property {boolean} shared Is it passed to a third party? Never, for this app.
* @property {boolean} [required] Collected rows only. Declared required throughout (same
* decision), rather than arguing feature by feature.
* @property {string[]} [purposes] Collected rows only, from `PLAY_PURPOSES`.
* @property {string} answer The recommended console answer, in one line. * @property {string} answer The recommended console answer, in one line.
* @property {string} because Why that answer is the truthful one. * @property {string} because Why that answer is the truthful one.
* *
@@ -64,9 +75,74 @@
* @property {Retention} retention * @property {Retention} retention
* @property {string} source The file this was read out of, repo-relative. * @property {string} source The file this was read out of, repo-relative.
* @property {PlayMapping} [play] * @property {PlayMapping} [play]
* @property {Deletion} [deletion] The one row `/delete-account/` renders. See that row.
* *
* @type {Collected[]} * @typedef {object} Kept
* @property {string} what What stays, and who sees what of it.
* @property {string} keep For how long. Play asks for the retention of what stays.
*
* @typedef {object} Deletion
* @property {string[]} goes What goes with the account, in the deployment's own words.
* @property {Kept[]} stays
* @property {string} staff Said of a staff account only (AD9).
*/ */
/**
* The Data Safety form's own vocabulary: every category and the data types under it, and
* the purposes a collected type can be given. Read from Play Console Help ("Provide
* information for Google Play's Data safety section") on `PLAY_VOCABULARY_READ`.
*
* Here so a typo or a misfiled type fails a test instead of reaching the console. The
* first version of this file filed "Other user-generated content" under Messages; it
* lives under App activity. The full list is also what lets the generator say, for every
* type the app does NOT collect, that it does not — the form asks about all of them.
*/
export const PLAY_VOCABULARY_READ = '2026-10-29';
export const PLAY_DATA_TYPES = {
Location: ['Approximate location', 'Precise location'],
'Personal info': [
'Name',
'Email address',
'User IDs',
'Address',
'Phone number',
'Race and ethnicity',
'Political or religious beliefs',
'Sexual orientation',
'Other info',
],
'Financial info': ['User payment info', 'Purchase history', 'Credit score', 'Other financial info'],
'Health and fitness': ['Health info', 'Fitness info'],
Messages: ['Emails', 'SMS or MMS', 'Other in-app messages'],
'Photos and videos': ['Photos', 'Videos'],
'Audio files': ['Voice or sound recordings', 'Music files', 'Other audio files'],
'Files and docs': ['Files and docs'],
Calendar: ['Calendar events'],
Contacts: ['Contacts'],
'App activity': [
'App interactions',
'In-app search history',
'Installed apps',
'Other user-generated content',
'Other actions',
],
'Web browsing': ['Web browsing history'],
'App info and performance': ['Crash logs', 'Diagnostics', 'Other app performance data'],
'Device or other IDs': ['Device or other IDs'],
};
export const PLAY_PURPOSES = [
'App functionality',
'Analytics',
'Developer communications',
'Advertising or marketing',
'Fraud prevention, security, and compliance',
'Personalization',
'Account management',
];
/** @type {Collected[]} */
export const collected = [ export const collected = [
/* ===================================================================================== /* =====================================================================================
1. THIS WEBSITE 1. THIS WEBSITE
@@ -163,8 +239,14 @@ export const collected = [
the app talks to. `ConnectScreen.kt` gates the entire app on an address the user the app talks to. `ConnectScreen.kt` gates the entire app on an address the user
enters and the app validates; everything below either stays on the phone or goes to enters and the app validates; everything below either stays on the phone or goes to
that address. There is no telemetry SDK, no crash reporter and no analytics in the that address. There is no telemetry SDK, no crash reporter and no analytics in the
build — the manifest asks for INTERNET, network state, notifications and a data-sync build — the manifest asks for INTERNET, network state, notifications, a special-use
foreground service, and nothing else. foreground service for push and the boot broadcast that restarts it, and nothing else.
What goes to that address is still COLLECTED in Play's sense, because it leaves the
phone, and it is declared that way (org lead, 2026-10-29). Read out of the Retrofit
interfaces in `data/api/` on the Android app's `edge` (19c2f77): every request body,
query and header the app sends is in one of the rows below. Rows that stay on the
phone say so, and carry no console type.
`play` is filled in on every row here, because a row in this scope with no mapping is `play` is filled in on every row here, because a row in this scope with no mapping is
a question on the console form that somebody will answer from memory (D33). a question on the console form that somebody will answer from memory (D33).
@@ -172,54 +254,103 @@ export const collected = [
{ {
id: 'app-session-tokens', id: 'app-session-tokens',
scope: 'app', scope: 'app',
title: 'Your sign-in tokens', title: 'Your sign-in, and the tokens it issues',
body: body:
'When you sign in to a deployment, the app keeps the access and refresh tokens it ' + 'Signing in sends your username and password to the deployment, or with single ' +
'was issued, plus the username, role and account id they belong to. They are held ' + 'sign-on a one-time code from the provider, plus a two-factor code when the account ' +
'in encrypted storage on the device (AES-256-GCM through Jetpack Security) and are ' + 'has one. The deployment answers with an access and a refresh token and the ' +
'sent to exactly one place: the deployment that issued them.', 'username, role and account id they belong to. The tokens are held in encrypted ' +
'storage on the device (AES-256-GCM through Jetpack Security) and are sent to ' +
'exactly one place: the deployment that issued them, with every request. Changing ' +
'your username or password, setting up two-factor sign-in and generating recovery ' +
'codes from the app go to the same place. So does deleting the account, which sends ' +
'your username, your password and, if the account has one, a two-factor code.',
retention: { retention: {
summary: 'On the device until you sign out', summary: 'On the device until you sign out or delete the account',
detail: 'Signing out clears them; uninstalling the app removes them with it.', detail:
'Signing out clears them, and so does deleting the account; uninstalling the app ' +
'removes them with it.',
}, },
source: 'core/auth/EncryptedTokenStore.kt', source:
'data/api/AuthApi.kt, data/api/SsoApi.kt, data/api/MeApi.kt, core/auth/EncryptedTokenStore.kt',
play: { play: {
category: 'Personal info', types: [{ category: 'Personal info', type: 'User IDs' }],
type: 'User IDs', collected: true,
collected: false,
shared: false, shared: false,
answer: 'Not collected by us.', required: true,
purposes: [
'App functionality',
'Account management',
'Fraud prevention, security, and compliance',
],
answer: 'Collected, not shared, required.',
because: because:
'The credentials are issued by, and returned to, a server the user nominated. ' + 'The username, password and tokens leave the phone for the deployment the user ' +
'Nothing reaches an endpoint under our control, because we run none.', 'chose, and Play counts that as collection whoever runs the server. None of it ' +
'reaches us. Security is a purpose because the deployment checks two-factor codes ' +
'and trusted devices with it.',
}, },
}, },
{ {
id: 'app-trust-token', id: 'app-trust-token',
scope: 'app', scope: 'app',
title: 'The trusted-device token, if you asked for one', title: 'The trusted-device token and the device’s name, if you asked for one',
body: body:
'Ticking “trust this device” during two-factor sign-in stores an opaque token so ' + 'Ticking “trust this device” during two-factor sign-in stores an opaque token so ' +
'the deployment can skip the second factor next time. It lives in its own encrypted ' + 'the deployment can skip the second factor next time. It lives in its own encrypted ' +
'store, deliberately separate from the session, because it has to outlive a sign-out ' + 'store, deliberately separate from the session, because it has to outlive a sign-out ' +
'to be worth anything — and the deployment holds only a hash of it, so the copy on ' + 'to be worth anything — and the deployment holds only a hash of it, so the copy on ' +
'your phone is the only usable one.', 'your phone is the only usable one. The phone’s make and model, such as “Samsung ' +
'SM-S918B”, goes with the request as the device’s label, so you can tell it apart ' +
'in the deployment’s list of trusted devices. It is a model name, not a hardware ' +
'identifier.',
retention: { retention: {
summary: 'On the device until it expires or you revoke it', summary: 'On the device until it expires or you revoke it',
detail: detail:
'Thirty days, and revocable at any time from the deployment’s Trusted Devices ' + 'Thirty days, and revocable at any time from the deployment’s Trusted Devices ' +
'screen, which is also where it can be revoked if the phone is lost.', 'screen, which is also where it can be revoked if the phone is lost. Deleting the ' +
'account from the app drops it from the phone too, since there is no next sign-in ' +
'for it to skip.',
}, },
source: 'core/auth/EncryptedTrustTokenStore.kt', source: 'core/auth/EncryptedTrustTokenStore.kt, core/auth/DeviceNameProvider.kt',
play: { play: {
category: 'Personal info', types: [{ category: 'Device or other IDs', type: 'Device or other IDs' }],
type: 'User IDs', collected: true,
collected: false,
shared: false, shared: false,
answer: 'Not collected by us.', required: true,
purposes: ['Account management', 'Fraud prevention, security, and compliance'],
answer: 'Collected, not shared, required.',
because: because:
'Same as the session tokens: minted by the user’s deployment, stored on the ' + 'The token identifies this device to the deployment, and the label is sent with ' +
'device, presented back to that same deployment.', 'it. Both are presented to the deployment that minted the token and to nothing ' +
'else.',
},
},
{
id: 'app-user-agent',
scope: 'app',
title: 'The app’s version and your Android version',
body:
'Every request carries a User-Agent such as “RunicGatewayApp/0.6.0 (Android 15)”. ' +
'It is there because a deployment turns away traffic that looks like a scanner, ' +
'and it names nothing about you or the phone beyond those two version numbers.',
retention: {
summary: 'Under the deployment operator’s policy',
detail:
'A deployment’s access log may keep it, as any web server keeps the user agent of ' +
'a browser.',
},
source: 'di/NetworkModule.kt, core/net/UserAgentInterceptor.kt',
play: {
types: [{ category: 'App info and performance', type: 'Diagnostics' }],
collected: true,
shared: false,
required: true,
purposes: ['App functionality', 'Fraud prevention, security, and compliance'],
answer: 'Collected, not shared, required.',
because:
'It is technical information about the app and the device, and it is sent with ' +
'every request. The deployment uses it to tell the app from a scanner.',
}, },
}, },
{ {
@@ -234,11 +365,10 @@ export const collected = [
retention: { summary: 'On the device until you change it or uninstall' }, retention: { summary: 'On the device until you change it or uninstall' },
source: 'core/prefs/ServerPreferences.kt', source: 'core/prefs/ServerPreferences.kt',
play: { play: {
category: 'App info and performance', types: [],
type: 'Other app data',
collected: false, collected: false,
shared: false, shared: false,
answer: 'Not collected by us. Stored on the device only.', answer: 'Not collected. Stored on the device only.',
because: because:
'It never leaves the phone. It is the destination of requests, not the contents ' + 'It never leaves the phone. It is the destination of requests, not the contents ' +
'of one.', 'of one.',
@@ -257,52 +387,210 @@ export const collected = [
'authenticated connection to the deployment. A leaked topic name therefore reveals ' + 'authenticated connection to the deployment. A leaked topic name therefore reveals ' +
'nothing, which is the reason the relay needs no account and holds nothing about you.', 'nothing, which is the reason the relay needs no account and holds nothing about you.',
retention: { retention: {
summary: 'Until you turn push off, sign out, or uninstall', summary: 'Until you turn push off, sign out, delete the account, or uninstall',
detail: detail:
'Signing out or disabling push unregisters the device with the deployment and ' + 'Signing out or disabling push unregisters the device with the deployment and ' +
'discards the topic. The relay retains whatever its own operator configures it to; ' + 'discards the topic; deleting the account drops the registration on the deployment ' +
'with everything else. The relay retains whatever its own operator configures it to; ' +
'if the deployment points at a relay it does not run, that relay is a third party ' + 'if the deployment points at a relay it does not run, that relay is a third party ' +
'to both of us, and it still only ever sees a tickle.', 'to both of us, and it still only ever sees a tickle.',
}, },
source: 'core/push/NtfyTopic.kt, core/push/PushPreferences.kt', source: 'core/push/NtfyTopic.kt, core/push/PushPreferences.kt, data/api/NotificationsApi.kt',
play: { play: {
category: 'Messages', types: [{ category: 'Device or other IDs', type: 'Device or other IDs' }],
type: 'Other in-app messages', collected: true,
collected: false,
shared: false, shared: false,
required: true,
purposes: ['App functionality'],
answer: answer:
'Not collected by us. Declare the relay hop in the console’s free-text ' + 'Collected, not shared, required. Mention the relay in the free-text security ' +
'security section if it asks.', 'section if the console asks.',
because: because:
'The notification passes through a relay chosen by the deployment, and it carries ' + 'The topic URL is an address for this device, and the app sends it to the ' +
'no content — the app pulls the content itself, authenticated. Neither hop reaches ' + 'deployment. The relay is the one the deployment nominates to deliver its own ' +
'a server we operate.', 'notifications, so it carries them on the deployment’s behalf rather than ' +
'receiving a share. It only ever sees a topic name and a tickle; the app pulls the ' +
'content itself, authenticated. No hop reaches a server we operate.',
},
},
{
id: 'app-game-accounts',
scope: 'app',
title: 'Linking a game account',
body:
'Linking your site account to a game sends the one-time code the game gave you. ' +
'Where a game server offers it, the app can also create a new game account, which sends ' +
'the account name and password you chose. Unlinking sends the id being unlinked, ' +
'such as a Steam id. All of it goes to the deployment, which keeps the link against ' +
'your site account.',
retention: {
summary: 'Held by the deployment until you unlink, under its operator’s policy',
},
source: 'data/api/PlayerShardApi.kt, data/api/PlayerRustApi.kt, data/api/MeApi.kt',
play: {
types: [{ category: 'Personal info', type: 'User IDs' }],
collected: true,
shared: false,
required: true,
purposes: ['App functionality', 'Account management'],
answer: 'Collected, not shared, required.',
because:
'Game account names, Steam ids and link codes identify a player, and the app ' +
'sends them to the deployment.',
},
},
{
id: 'app-contact',
scope: 'app',
title: 'Your name, email address and message, if you use Contact',
body:
'The Contact screen sends the name, email address and message you type to the ' +
'deployment, which passes them on to its operator by email so they can reply. ' +
'Nothing is sent until you press send.',
retention: {
summary: 'Held by the deployment’s operator, under their policy',
detail: 'The message is delivered to the operator’s mailbox, and kept as long as they keep it.',
},
source: 'data/api/PublicApi.kt, data/api/dto/ContactDto.kt',
play: {
types: [
{ category: 'Personal info', type: 'Name' },
{ category: 'Personal info', type: 'Email address' },
{ category: 'Messages', type: 'Other in-app messages' },
],
collected: true,
shared: false,
required: true,
purposes: ['App functionality'],
answer: 'Collected, not shared, required.',
because:
'The form’s three fields leave the phone for the deployment, whose operator ' +
'receives them.',
}, },
}, },
{ {
id: 'app-content', id: 'app-content',
scope: 'app', scope: 'app',
title: 'Everything you read and post in the app', title: 'What you post and send from the app',
body: body:
'Forum posts, Team activity, character and shard information, notification ' + 'Most of the app is reading. What it sends is what you write, and most of that is ' +
'preferences: all of it is a live read or write against the deployment. Apart from ' + 'for staff: news posts, wiki categories, a broadcast to the game, the answer to a ' +
'the notification snapshot described in the next entry, nothing is cached for ' + 'player’s help page, and the account and reason on a kick or a ban. All of it is a ' +
'offline use and nothing is duplicated anywhere else — the app with no signal is ' + 'live write to the deployment. Apart from the notification snapshot described ' +
'an app with almost no content, which is a limitation and also an accurate ' + 'below, nothing is cached for offline use and nothing is duplicated anywhere else ' +
'description of where the data lives.', '— the app with no signal is an app with almost no content, which is a limitation ' +
'and also an accurate description of where the data lives.',
retention: { retention: {
summary: 'Held by the deployment, under its operator’s policy', summary: 'Held by the deployment, under its operator’s policy',
}, },
source: 'PLAN.md §9 section 2', source: 'data/api/AdminApi.kt',
play: { play: {
category: 'Messages', types: [
type: 'Other user-generated content', { category: 'Messages', type: 'Other in-app messages' },
collected: false, { category: 'App activity', type: 'Other user-generated content' },
],
collected: true,
shared: false, shared: false,
answer: 'Not collected by us.', required: true,
purposes: ['App functionality'],
answer: 'Collected, not shared, required.',
because: because:
'Content is written to the community’s own installation. We have no copy, no ' + 'Posts, broadcasts and replies are written to the community’s own installation. ' +
'access and no way to obtain one.', 'We have no copy, no access and no way to obtain one.',
},
},
/*
* Report, block and hide (USER_SAFETY.md §4.3), on Android-app#64 rather than the edge
* commit the section header names. Read out of `data/api/SafetyApi.kt` and
* `data/api/dto/SafetyDto.kt`: a report sends the item's type and id, a reason and an
* optional note; a block and a hide send the item's type and id; unblocking sends the
* block's id. No request names the person being blocked — the deployment works out who
* wrote the line — so none of it is a User ID.
*/
{
id: 'app-safety',
scope: 'app',
title: 'What you report, block or hide',
body:
'Long-pressing a chat line offers Report, Hide for me and Block player. A report ' +
'sends which line it is, the reason you picked and, if you wrote one, a note of up to ' +
'500 characters, so the deployment’s staff can review it. Hide for me and Block ' +
'player send which line it is; the deployment works out who wrote it and keeps the ' +
'hide or the block on your account, so it applies on the website and on every device. ' +
'Your list of blocks, and unblocking someone, come from and go to the same place. For ' +
'staff, Hide for everyone and Show to everyone again send the line too. Nothing is ' +
'sent until you choose one.',
retention: {
summary: 'Held by the deployment, under its operator’s policy',
detail:
'A block or a hide lasts until you remove it or delete the account, which deletes ' +
'them. A report stays as a moderation record, with a copy of what the line said, ' +
'until the operator removes it.',
},
source: 'data/api/SafetyApi.kt, data/api/dto/SafetyDto.kt, data/api/RustApi.kt',
play: {
types: [
{ category: 'App activity', type: 'Other user-generated content' },
{ category: 'App activity', type: 'Other actions' },
],
collected: true,
shared: false,
required: true,
purposes: ['App functionality', 'Fraud prevention, security, and compliance', 'Personalization'],
answer: 'Collected, not shared, required.',
because:
'The report’s note is text the user writes, and reporting, blocking and hiding are ' +
'actions the app sends to the deployment, which keeps them. Reports exist so staff ' +
'can act on abuse; blocks and hides change what this one reader is shown.',
},
},
{
id: 'app-interactions',
scope: 'app',
title: 'Which notifications you have read, and which you want',
body:
'Opening a notification marks it read on the deployment, so the badge agrees on ' +
'every device you use. Your choice of notification streams, and of which arrive by ' +
'push or email, is saved there too.',
retention: {
summary: 'Held by the deployment, under its operator’s policy',
},
source: 'data/api/NotificationsApi.kt',
play: {
types: [{ category: 'App activity', type: 'App interactions' }],
collected: true,
shared: false,
required: true,
purposes: ['App functionality', 'Personalization'],
answer: 'Collected, not shared, required.',
because:
'Read state and preferences are actions in the app that are sent to, and kept ' +
'by, the deployment.',
},
},
{
id: 'app-search',
scope: 'app',
title: 'What you search for',
body:
'Searching the wiki, a game’s market or its creature atlas sends what you typed ' +
'to the deployment, because the deployment does the searching. The app keeps no ' +
'history of searches.',
retention: {
summary: 'Under the deployment operator’s policy',
detail:
'The query is part of the request’s address, so a deployment’s access log may ' +
'record it. That is why it is declared rather than called ephemeral.',
},
source: 'data/api/PublicApi.kt',
play: {
types: [{ category: 'App activity', type: 'In-app search history' }],
collected: true,
shared: false,
required: true,
purposes: ['App functionality'],
answer: 'Collected, not shared, required.',
because: 'Search text leaves the phone in the request to the deployment.',
}, },
}, },
{ {
@@ -318,9 +606,9 @@ export const collected = [
'second person signing in on the same phone is never shown the first one’s ' + 'second person signing in on the same phone is never shown the first one’s ' +
'messages.', 'messages.',
retention: { retention: {
summary: 'Until you sign out, or the thirty are pushed out by newer ones', summary: 'Until you sign out or delete the account, or the thirty are pushed out by newer ones',
detail: detail:
'Signing out deletes the snapshot outright. It lives in the app’s ordinary ' + 'Signing out, or deleting the account, deletes the snapshot outright. It lives in the app’s ordinary ' +
'preference store rather than the encrypted one — sign-in tokens are the thing ' + 'preference store rather than the encrypted one — sign-in tokens are the thing ' +
'that store is for — which is worth stating plainly: on a device where someone ' + 'that store is for — which is worth stating plainly: on a device where someone ' +
'has root, these are readable, and they are notification bodies rather than ' + 'has root, these are readable, and they are notification bodies rather than ' +
@@ -328,15 +616,13 @@ export const collected = [
}, },
source: 'core/inbox/DataStoreInboxCache.kt, data/repository/AuthRepository.kt', source: 'core/inbox/DataStoreInboxCache.kt, data/repository/AuthRepository.kt',
play: { play: {
category: 'Messages', types: [],
type: 'Other in-app messages',
collected: false, collected: false,
shared: false, shared: false,
answer: 'Not collected by us. Stored on the device only.', answer: 'Not collected. Stored on the device only.',
because: because:
'The snapshot is written on the phone from data the deployment had already ' + 'The snapshot is written on the phone from data the deployment had already ' +
'delivered. It is not uploaded anywhere, and no server we operate is on either ' + 'delivered. It is not uploaded anywhere.',
'end of it.',
}, },
}, },
{ {
@@ -351,14 +637,13 @@ export const collected = [
retention: { summary: 'Nothing to retain' }, retention: { summary: 'Nothing to retain' },
source: 'app/build.gradle.kts, app/src/main/AndroidManifest.xml', source: 'app/build.gradle.kts, app/src/main/AndroidManifest.xml',
play: { play: {
category: 'Device or other IDs', types: [{ category: 'App info and performance', type: 'Crash logs' }],
type: 'Device or other IDs',
collected: false, collected: false,
shared: false, shared: false,
answer: 'Not collected.', answer: 'Not collected. The advertising ID declaration is "no".',
because: because:
'No advertising ID, no analytics identifier, and no library that would generate ' + 'No crash reporter, no advertising ID, no analytics identifier, and no library ' +
'one is linked into the build.', 'that would generate one is linked into the build.',
}, },
}, },
@@ -376,9 +661,90 @@ export const collected = [
body: body:
'A username, a password hash, an optional email address, the role, and — where the ' + 'A username, a password hash, an optional email address, the role, and — where the ' +
'operator has enabled it — a two-factor secret and single-use recovery codes. The ' + 'operator has enabled it — a two-factor secret and single-use recovery codes. The ' +
'time and IP address of the last sign-in are stored on the account row.', 'time and IP address of the last sign-in are stored on the account row. A sign-in ' +
'identity linked to the account — Google, Discord, an OIDC provider or Steam — keeps ' +
'that provider’s id for the person; a Steam link also keeps the Steam display name ' +
'and the address of the Steam avatar. Linked identities are deleted with the account.',
retention: { summary: 'Set by the operator; nothing expires on its own' }, retention: { summary: 'Set by the operator; nothing expires on its own' },
source: 'website server/db/schema.sql — users', source: 'website server/db/schema.sql — users, user_identities',
},
/*
* The facts `/delete-account/` is built from (ACCOUNT_DELETION.md §4.5), which is the page
* Google Play is given. A row here, rather than a list on that page, so `/privacy` and the
* deletion page cannot disagree about what a deletion takes.
*
* `goes` and the first four `stays` are the website's own words, from
* `client/src/lib/accountDeletion.js` (WHAT_GOES, WHAT_STAYS), which the app's strings
* repeat: a member who reads this page and then the confirm step must recognise the list.
* Play also asks how long what stays is kept, which the screens do not say, so each
* `stays` entry carries a `keep`. The last entry, the delivery log, is on BACKEND_DESIGN.md
* §6.6's list but not on the screens; it is here because Play asks about everything kept.
*/
{
id: 'deploy-account-deletion',
scope: 'deployment',
title: 'Deleting an account',
body:
'You can delete your own account, on the site from the Account page, or in the app ' +
'from My account. It takes your password, and a two-factor code if the account has ' +
'one, and the account goes at once: there is no waiting period and nothing to ' +
'cancel. Your sign-in, email address, devices, linked sign-ins, game-account links ' +
'and inbox go with it. What you wrote where others read it stays, and other members ' +
'see it as written by “[deleted player]”; staff still see who it was, for ' +
'moderation. An operator can delete any account from the admin panel in the same way.',
retention: {
summary: 'Deleted at once; what stays, and for how long, is on the account-deletion page',
detail:
'Where the site can send email and the account had an address, one last message ' +
'goes to it, saying the account was deleted.',
},
source:
'website server/src/auth/accountDeletion.js, client/src/lib/accountDeletion.js; ' +
'docs/website/ACCOUNT_DELETION.md',
deletion: {
goes: [
'your sign-in, password, email address, two-factor settings and recovery codes',
'every signed-in device, trusted device and push registration',
'your linked sign-ins, such as Google, Discord or Steam',
'your game-account links, and anything this site granted in the game through them',
'your notification settings and inbox',
],
stays: [
{
what:
'What you wrote where others read it, such as forum posts, stays. Other members ' +
'see it as written by “[deleted player]”.',
keep: 'Until a moderator or the operator removes it, as with any post.',
},
{
what:
'Reports you filed and appeals you made stay as moderation records. Staff can ' +
'still see who it was, and the activity log keeps its IP addresses.',
keep: 'Until the operator removes them.',
},
{
what:
'Event results stay with the score and the in-game name, with no site account ' +
'behind them.',
keep: 'Until the operator removes them.',
},
{
what: 'A game account stays on the game server. Only its link to this site goes.',
keep: 'For as long as the game server keeps it, which is up to whoever runs that server.',
},
{
what:
'The record of notifications sent to you keeps a one-way hash of your email ' +
'address, never the address, and no longer names your account. An address that ' +
'bounced or was reported as spam stays on the suppression list, so it is never ' +
'mailed again.',
keep:
'The record is swept after a period the operator sets, 180 days by default. The ' +
'suppression list does not expire.',
},
],
staff: 'If you were staff, your username can never be used again, by anyone.',
},
}, },
{ {
id: 'deploy-sessions', id: 'deploy-sessions',
@@ -425,7 +791,10 @@ export const collected = [
title: 'Everything posted on the site', title: 'Everything posted on the site',
body: body:
'Forum threads and replies, uploads, wiki revisions, moderation actions, warnings, ' + 'Forum threads and replies, uploads, wiki revisions, moderation actions, warnings, ' +
'reports and appeals — with the account that made each one. Where the operator has ' + 'reports and appeals — with the account that made each one. A report keeps a copy ' +
'of what the reported post or chat line said, so staff read what was reported even ' +
'after it is edited or pruned. Each member’s blocks and the items they hid for ' +
'themselves are kept against their account, and deleted with it. Where the operator has ' +
'connected Discord, some of that crosses into Discord and is then also subject to ' + 'connected Discord, some of that crosses into Discord and is then also subject to ' +
'Discord’s own terms.', 'Discord’s own terms.',
retention: { retention: {
@@ -434,7 +803,9 @@ export const collected = [
'Soft-deleted forum uploads and Team activity have retention windows an admin ' + 'Soft-deleted forum uploads and Team activity have retention windows an admin ' +
'sets; most other content is kept until somebody removes it.', 'sets; most other content is kept until somebody removes it.',
}, },
source: 'website server/db/schema.sql — team_forum_*, mod_actions, content_reports', source:
'website server/db/schema.sql — team_forum_*, mod_actions, content_reports, ' +
'user_blocks, user_hidden_items',
}, },
{ {
id: 'deploy-engagement', id: 'deploy-engagement',
@@ -505,12 +876,23 @@ export const collected = [
scope: 'deployment', scope: 'deployment',
title: 'Game data from the connected server', title: 'Game data from the connected server',
body: body:
'Where a game module is installed, information about characters, guilds, houses and ' + 'Where a game module is installed, what happens on the game server flows to the site ' +
'the in-game economy flows from the game server to the site through the bridge. ' + 'through the bridge, and the module keeps it. With Ultima Online that is characters ' +
'Which of it is visible to the public is the operator’s decision, made in the ' + 'and their accounts, Teams, houses and the in-game economy. With Rust it is each ' +
'admin panel — the bridge itself forwards, and the site decides.', 'player’s Steam id and in-game name, their statistics, who is online, and the ' +
retention: { summary: 'Operator-configured' }, 'server’s event record — which includes in-game chat, player reports and the IP ' +
source: 'docs/link/v7.md — the visibility framework', 'addresses on sign-in attempts and bans, readable by staff only. A linked Steam ' +
'account is kept against the site account and deleted with it. Which of any of this ' +
'the public sees is the operator’s decision, made in the admin panel — the bridge ' +
'forwards, and the site decides.',
retention: {
summary:
'Operator-configured. The Rust module keeps its event record 30 days, and its ' +
'sidecar keeps its own copy 14 days by default; statistics until the operator removes them',
},
source:
'docs/link/v7.md — the visibility framework; Module-Rust server/db/schema.sql, ' +
'server/catalogue.js, server/boot.js (EVENT_RETENTION_DAYS); Rust-Link sidecar/src/config.rs',
}, },
]; ];
@@ -519,6 +901,24 @@ export function collectedIn(scope) {
return collected.filter((entry) => entry.scope === scope); return collected.filter((entry) => entry.scope === scope);
} }
/**
* The row `/delete-account/` renders. It throws rather than returning nothing, because
* that page is the address Google Play is given, and with no row it would render as a
* deletion page that names nothing deleted.
*
* @returns {Collected & { deletion: Deletion }}
*/
export function deletionRow() {
const rows = collected.filter((entry) => entry.deletion);
if (rows.length !== 1) {
throw new Error(
`src/data/collection.mjs: expected exactly one row with \`deletion\`, found ${rows.length}.\n` +
'\n/delete-account/ renders that row (ACCOUNT_DELETION.md §4.5).\n'
);
}
return /** @type {Collected & { deletion: Deletion }} */ (rows[0]);
}
/** /**
* The `app` rows that carry a Play mapping — the Data Safety generator's input. * The `app` rows that carry a Play mapping — the Data Safety generator's input.
* *

View File

@@ -30,6 +30,7 @@ export function footerColumns(brand) {
{ href: '/features/', label: 'Features' }, { href: '/features/', label: 'Features' },
{ href: '/architecture/', label: 'Architecture' }, { href: '/architecture/', label: 'Architecture' },
{ href: '/modules/', label: 'Modules' }, { href: '/modules/', label: 'Modules' },
{ href: '/runicnpc/', label: 'RunicNPC' },
{ href: '/app/', label: 'Android app' }, { href: '/app/', label: 'Android app' },
], ],
}, },

104
src/data/games/index.mjs Normal file
View File

@@ -0,0 +1,104 @@
/**
* games/index.mjs — the games the platform supports, and the check that holds each one's
* feature list to its module's declared capabilities.
*
* PLAN.md §16, phase 17. Each game has a file of its own (`uo.mjs`, `rust.mjs`) written in
* that game's words, which only that game's pages render. This file is what the core pages
* read instead: the game's name and where its page is, which D63 lets any page say.
*
* The order is the order the games were supported in, and every list of games on the site
* follows it.
*/
import platform from '../platform.json' with { type: 'json' };
import * as uo from './uo.mjs';
import * as rust from './rust.mjs';
/**
* @typedef {object} Game
* @property {'uo'|'rust'} key A key of `platform.json`'s `games`.
* @property {string} name The game's own name, from `platform.json`.
* @property {string} href Its marketing page.
* @property {string} docs Its docs group.
* @property {string} release Its module's release, from `platform.json`.
* @property {string} blurb One sentence in core's words, for the core pages' game cards.
* @property {import('../capabilities.mjs').Capability[]} features
*/
/** @type {Game[]} */
export const games = [
{
key: 'uo',
name: platform.games.uo.name,
href: '/modules/uo/',
docs: '/docs/ultima-online/',
release: platform.releases['Module-uo'],
blurb:
'The first module, and the one the seam was cut around: the server’s live state, its ' +
'economy and its players’ own groups, extracted from the site without changing a URL.',
features: uo.features,
},
{
key: 'rust',
name: platform.games.rust.name,
href: '/modules/rust/',
docs: '/docs/rust/',
release: platform.releases['Module-Rust'],
blurb:
'Any number of servers, each with its own sidecar: a live feed, leaderboards that ' +
'outlast a reset, a live map, and permissions and events run from the site.',
features: [...rust.features, ...rust.staffFeatures],
},
];
for (const key of Object.keys(platform.games)) {
if (!games.some((game) => game.key === key)) {
throw new Error(`src/data/games/index.mjs has no entry for "${key}", which platform.json's games declares.`);
}
}
/** One game by key, or a build failure naming it. @param {string} key */
export function gameByKey(key) {
const game = games.find((candidate) => candidate.key === key);
if (game) return game;
throw new Error(`src/data/games/index.mjs has no game "${key}". Known: ${games.map((g) => g.key).join(', ')}.`);
}
/**
* Fails the build when a game's feature list and its module's declared capabilities
* disagree, in either direction.
*
* Called from the pages rather than a check script, for the reason phase 3 gave: the failure
* should reach whoever is editing the page, and an Astro build error names the component. It
* also means `astro build` alone cannot skip it.
*
* @param {string} key
*/
export function assertGameCoverage(key) {
const game = gameByKey(key);
const declared = platform.games[key].module.capabilities;
const claimed = new Set(game.features.flatMap((item) => item.caps || []));
const unlisted = declared.filter((cap) => !claimed.has(cap));
const invented = [...claimed].filter((cap) => !declared.includes(cap));
if (!unlisted.length && !invented.length) return;
const lines = [];
if (unlisted.length) {
lines.push(
`the module declares ${unlisted.map((c) => `"${c}"`).join(', ')}, which no feature on ` +
`its page claims — the site is under-selling what it can show.`,
);
}
if (invented.length) {
lines.push(
`the page claims ${invented.map((c) => `"${c}"`).join(', ')}, which the module no ` +
`longer declares — the site is advertising something that is gone (§1).`,
);
}
throw new Error(
`src/data/games/${key}.mjs disagrees with platform.json's games.${key}.module.capabilities:\n` +
lines.map((line) => ` - ${line}`).join('\n') +
`\n\nUpdate the features in src/data/games/${key}.mjs, or the JSON if the module itself changed.\n`,
);
}

142
src/data/games/rust.mjs Normal file
View File

@@ -0,0 +1,142 @@
/**
* games/rust.mjs — what the Rust module adds, in Rust's own words.
*
* PLAN.md §16, phase 17. `/modules/rust/` renders this; the core pages describe what a game
* module adds in core's words and link there (D75). It is the Rust half of the coverage
* assertion phase 13 moved here: `caps` is the contract with `platform.json`'s
* `games.rust.module.capabilities`, re-read by `checkFacts.mjs` from `Module-Rust`'s own
* `module.json`, and `assertGameCoverage()` in `index.mjs` holds the two together.
*
* Every item was written from the Rust docs group, which phase 15 walked on the walk site
* and checked against the module's source (D36) — this file says less than those pages and
* nothing they do not. `rust` names the module itself rather than a surface (Module-Rust's
* README: "the single gate a whole navigation group hangs on"), so it rides on the server
* list, which is the page that gate opens.
*
* The staff items carry no `caps`: a capability is what a client feature-detects on, and
* the admin screens are not something any client detects.
*
* `demoPath` is a public route in Module-Rust's own `client/src/entry.jsx` (`/rust`, and
* `/rust/servers/:id` with its `?tab=` search parameter, which `ServerDetail.jsx` reads).
* The public demo runs Rust (§15), and `demo` is its server's id, fixed by
* `website/deploy/demo/seed.json` (`modules.rust.servers`) and recreated at every wipe.
* The links show only while the mounted `demoGames` lists `rust` (D83). The staff items
* carry none: every admin page needs a sign-in, and D25's links are to public routes.
*/
/** @typedef {import('../capabilities.mjs').Capability} Capability */
/** For visitors and players. @type {Capability[]} */
export const features = [
{
label: 'Every server, live',
caps: ['rust', 'servers'],
demoPath: '/rust',
detail:
'Every Rust server the community runs, as it last reported itself: up or down, who is ' +
'on, which map, and when the next wipe is. One sidecar serves one server, so a ' +
'community with six servers sees six — and a server that is down says so while the ' +
'site carries on.',
},
{
label: 'The kill feed',
caps: ['killfeed'],
demoPath: '/rust/servers/demo',
detail:
'Kills, chat, comings and goings, RunicNPC bosses, and the world itself — cargo, ' +
'helicopters, airdrops — as they happen. Every kind passes a default-deny allowlist ' +
'before it reaches a public page; staff read the rest, connection records and player ' +
'reports included.',
},
{
label: 'Leaderboards, per wipe',
caps: ['leaderboard'],
demoPath: '/rust/servers/demo?tab=leaderboard',
detail:
'Kills, deaths, NPC kills, structures and time played, for one wipe or all-time — with ' +
'the chat titles players have earned. The record survives the wipe: the game forgets, ' +
'and the site does not.',
},
{
label: 'Who is online',
caps: ['presence'],
demoPath: '/rust/servers/demo?tab=online',
detail:
'Who is on right now, and who is asleep. Nothing names a player to the public by ' +
'default: how far a name reaches — staff, signed-in players, everyone — is the ' +
'operator’s choice, made per surface.',
},
{
label: 'Wipes',
caps: ['wipes'],
demoPath: '/rust/servers/demo?tab=wipes',
detail:
'Every wipe the site has seen, and the next one once the server has a wipe schedule — ' +
'the monthly forced wipe or a rule of your own.',
},
{
label: 'The live map',
caps: ['map'],
demoPath: '/rust/servers/demo?tab=map',
detail:
'The server’s own map picture with layers on it: monuments and world events, the ' +
'zones and NPCs your events placed, players, bases as positions only, and a player’s ' +
'own clan. Each layer has its own audience, and positions are never stored.',
},
{
label: 'Steam accounts, linked',
caps: ['identity'],
detail:
'A player joins their Steam account to their site account with a code from /link in ' +
'game, or by signing in with Steam. Staff can undo a wrong link. Rewards go to Steam ' +
'ids, so a player earns them before they ever link.',
},
{
label: 'Clans are Teams',
demoPath: '/rust/servers/demo?tab=clans',
detail:
'Each clan on a server is a Team on the site: a page, a feed for its members and ' +
'core’s Team notifications. Who may see a clan’s roster is set alongside who may see ' +
'a name at all.',
},
];
/** For staff, one per admin screen the module adds. @type {Capability[]} */
export const staffFeatures = [
{
label: 'Permissions and groups, from the site',
detail:
'The site holds every server’s Oxide or Carbon groups and permissions and pushes them ' +
'in. One vip on the site is one vip in game, on the servers it covers, and a change ' +
'made in game is noticed rather than silently kept.',
},
{
label: 'Mod config, from the site',
detail:
'Edit your plugins’ config files on the game host from the admin panel, with a backup ' +
'first, a watched reload, and an automatic undo if the plugin does not come back.',
},
{
label: 'Events, zones and rewards',
detail:
'Rust steps for core’s scheduled events: open a ZoneManager zone with a dome, place ' +
'NPCs, count who is present, reward a kit, pay coins, start a raid base, or run ' +
'console commands. Every step arrives switched off, on the server as well as on the ' +
'site.',
},
{
label: 'Optional plugins, recognised',
detail:
'BetterChat, Economics, Backpacks, TruePVE, Dynamic PVP, Dangerous Treasures, Guarded ' +
'Crate, RaidableBases and more each add something where they are installed: coins, ' +
'titles, map layers, event steps. None is required.',
},
];
/**
* The screenshots `/modules/rust/` shows, by id from `screens.mjs`: what players see under that
* list, and the staff screens under theirs. Each is tagged `game: 'rust'` there (D67). Captured
* in phase 18 (D65) from the Oxide rig, with stand-in players named by their role (D80).
*/
export const screens = ['rust-servers', 'rust-feed', 'rust-leaderboard', 'rust-map'];
export const staffScreens = ['admin-rust-permissions', 'admin-rust-npcs'];

118
src/data/games/uo.mjs Normal file
View File

@@ -0,0 +1,118 @@
/**
* games/uo.mjs — what the Ultima Online module adds, in Ultima Online's own words.
*
* PLAN.md §16, phase 17. Until this phase these items were the "Game intelligence" group of
* `capabilities.mjs`, which the homepage and `/features/` render — core pages, which D63
* says may name the games but not use their vocabulary. They moved here, to a file that
* belongs to one game, and `/modules/uo/` renders them. The core pages now describe what a
* game module adds in core's words and link here (D75).
*
* `caps` is the contract with `platform.json`'s `games.uo.module.capabilities`, which
* `checkFacts.mjs` re-reads from the module's own `module.json`. `assertGameCoverage()` in
* `index.mjs` fails the build when the two drift apart, in either direction — so the day the
* module gains a capability, the JSON goes red, and the day the JSON moves, this page does.
*
* Slugs are NOT one-per-item: `shard` is the source of four separate user-facing features,
* and the marketplace draws on `market` and `cliloc` together (item names arrive as cliloc
* ids and are resolved against the shard's own string table). Coverage, not a bijection.
*
* `demoPath` is a stable public route on the module's own pages, deep-linked into a demo
* when one is mounted (D25) and the mounted `demoGames` lists `uo` (D83) — which the public
* demo, a Rust deployment, does not. Paths are read from `module-uo`'s `client/src/entry.jsx`.
*/
/** @typedef {import('../capabilities.mjs').Capability} Capability */
/** @type {Capability[]} */
export const features = [
{
label: 'Live shard status',
caps: ['shard'],
demoPath: '/uo/shard',
detail:
'Whether the shard is up, who is on it, and how long ago the site last heard from it. ' +
'When the game is down this page is the thing that says so — the site does not go ' +
'down with it.',
},
{
label: 'Economy and activity',
caps: ['shard'],
demoPath: '/uo/shard/activity',
detail:
'A live feed of what is happening in the world, and the economy underneath it. Every ' +
'event passes an allowlist before it can reach a public page; staff read a second ' +
'stream carrying the rest.',
},
{
label: 'Character sheets',
caps: ['shard'],
detail:
'Skills, stats and equipment, drawn from the live world rather than from a form ' +
'somebody filled in. Reachable by the account the character is linked to, and by ' +
'staff — not by the public.',
},
{
label: 'Points and loyalty boards',
caps: ['shard'],
demoPath: '/uo/leaderboards',
detail:
'The leaderboards the shard already keeps, published without anyone exporting a ' +
'spreadsheet on a Sunday.',
},
{
label: 'Player-vendor marketplace',
caps: ['market', 'cliloc'],
demoPath: '/uo/market',
detail:
'Every player vendor on the shard and what is on it, searchable without logging in to ' +
'the game. Item names arrive from the world as cliloc ids and are resolved against the ' +
"shard's own string table, so they read as names rather than numbers — beside the " +
"item's own picture, in the colour it was dyed.",
},
{
label: 'Houses and IDOC decay',
caps: ['houses'],
demoPath: '/uo/houses',
detail:
'Who owns what and where it stands, including which houses are decaying — published ' +
'while it is still information rather than after it has become a rumour.',
},
{
label: 'Spawn atlas',
caps: ['atlas'],
demoPath: '/uo/atlas',
detail:
"A bestiary and spawn map built by reading your shard's own spawn tables, so it " +
"describes your server rather than someone else's idea of the game. Regions, " +
'landmarks and champion altars come with it, and each creature is shown as the ' +
'artwork your own client draws it with.',
},
{
label: 'Champion boards',
caps: ['champs'],
demoPath: '/uo/champs',
detail: 'Which altars are running, how far along they are, and what turned up.',
},
{
label: 'Guilds',
caps: ['guilds'],
demoPath: '/uo/guilds',
detail:
'Guild rosters and standings, kept in step with the shard. Each guild is also a Team ' +
'on the site, with the forum, the notifications and the voice channel that core ' +
'attaches to one.',
},
{
label: 'City governors',
caps: ['governors'],
demoPath: '/uo/governors',
detail: 'Who holds which city, and what they did with it.',
},
];
/**
* The screenshots `/modules/uo/` shows beside the list, by id from `screens.mjs`. Every one
* is tagged `game: 'uo'` there, so it prints the game's name beside it (D67) wherever it is
* shown. They lived on `/features/` until phase 17.
*/
export const screens = ['shard-status', 'marketplace', 'spawn-atlas', 'guilds', 'houses'];

View File

@@ -29,7 +29,7 @@ export const legal = {
* from git: a build timestamp would move on every rebuild and tell a reader nothing, * from git: a build timestamp would move on every rebuild and tell a reader nothing,
* and a commit date would move when a stylesheet changed. * and a commit date would move when a stylesheet changed.
*/ */
lastUpdated: '2026-09-01', lastUpdated: '2026-10-30',
/** /**
* The minimum age to sign up for the beta. The org lead's decision, 2026-08-24 (D31). * The minimum age to sign up for the beta. The org lead's decision, 2026-08-24 (D31).

View File

@@ -117,23 +117,9 @@ export const notBuilt = [
resolvedBy: 'A game server that runs there.', resolvedBy: 'A game server that runs there.',
link: { href: `${GITEA}/docs/src/branch/main/installer/INSTALL.md`, label: 'The operator guide' }, link: { href: `${GITEA}/docs/src/branch/main/installer/INSTALL.md`, label: 'The operator guide' },
}, },
{ // `public-demo` stood here until 2026-10-28. Its `resolvedBy` was met when
id: 'public-demo', // demo.runicgateway.com went up (docs/website/DEMO_MODE.md), and the site reaches it through
// Phase 5 added `app` and `beta`, and that is not tidying. D27 makes the demo the // the mounted `demoUrl`, as the entry promised (D82, D83).
// deployment a beta tester connects to, so on those two pages this stopped being a
// thing the site lacks and became the thing the beta is waiting for. An absence that
// blocks a call to action has to be on the page carrying that call to action.
scope: ['features', 'app', 'beta'],
title: 'A public demo you can click through',
body:
'Planned and out of scope today: a virtual machine running the whole stack including ' +
'a game server, with settings locked down and an hourly reset. Until it exists this ' +
'site does not link to one, and there is no screenshot here of something that is not ' +
'running somewhere.',
resolvedBy:
'The machine being stood up. The site is already built to gain it by way of one line ' +
'in a configuration file, rather than a rebuild.',
},
/* --------------------------------------------------------------------------------------- /* ---------------------------------------------------------------------------------------
THE ANDROID CLIENT (phase 5) THE ANDROID CLIENT (phase 5)

View File

@@ -12,14 +12,14 @@
"wrong protocol number in the first place." "wrong protocol number in the first place."
], ],
"verifiedOn": "2026-10-22", "verifiedOn": "2026-10-30",
"$comment_moduleApi": [ "$comment_moduleApi": [
"The one version every deployment shares, whichever game it runs. D66: it is the only", "The one version every deployment shares, whichever game it runs. D66: it is the only",
"version the homepage hero and the footer show — a protocol and a bundle belong to a game,", "version the homepage hero and the footer show — a protocol and a bundle belong to a game,",
"so they appear on that game's own pages." "so they appear on that game's own pages."
], ],
"moduleApi": "1.17.0", "moduleApi": "1.21.0",
"$comment_releases": [ "$comment_releases": [
"Every repository whose release the site quotes, flat, so checkFacts.mjs reads them all", "Every repository whose release the site quotes, flat, so checkFacts.mjs reads them all",
@@ -27,12 +27,12 @@
], ],
"releases": { "releases": {
"installer": "v0.8.1", "installer": "v0.8.1",
"Android-app": "v0.5.0", "Android-app": "v0.7.0",
"link": "v2.3.0", "link": "v2.3.0",
"Module-uo": "v1.3.0", "Module-uo": "v1.4.1",
"Rust-Link": "v0.3.0", "Rust-Link": "v0.3.0",
"Rust-Plugins": "v0.3.0", "Rust-Plugins": "v0.3.1",
"Module-Rust": "v0.5.0", "Module-Rust": "v0.7.0",
"runicnpc-rust": "v1.0.0" "runicnpc-rust": "v1.0.0"
}, },
@@ -61,7 +61,7 @@
"protocol": 8, "protocol": 8,
"module": { "module": {
"repo": "Module-uo", "repo": "Module-uo",
"coreApi": "^1.10.0", "coreApi": "^1.20.0",
"capabilities": ["shard", "atlas", "market", "governors", "guilds", "houses", "champs", "cliloc"] "capabilities": ["shard", "atlas", "market", "governors", "guilds", "houses", "champs", "cliloc"]
}, },
"sidecarRepo": "link", "sidecarRepo": "link",
@@ -79,15 +79,15 @@
"protocol": 14, "protocol": 14,
"module": { "module": {
"repo": "Module-Rust", "repo": "Module-Rust",
"coreApi": "^1.17.0", "coreApi": "^1.21.0",
"capabilities": ["rust", "servers", "killfeed", "leaderboard", "presence", "wipes", "identity", "map"] "capabilities": ["rust", "servers", "killfeed", "leaderboard", "presence", "wipes", "identity", "map"]
}, },
"sidecarRepo": "Rust-Link", "sidecarRepo": "Rust-Link",
"pluginRepo": "Rust-Plugins", "pluginRepo": "Rust-Plugins",
"bundle": { "bundle": {
"tag": "2026.10.22", "tag": "2026.10.30",
"sidecar": "v0.3.0", "sidecar": "v0.3.0",
"plugin": "v0.3.0", "plugin": "v0.3.1",
"oxideMin": "2.0.7585", "oxideMin": "2.0.7585",
"carbonMin": "2.0.259", "carbonMin": "2.0.259",
"requiresPlugins": ["Kits", "ZoneManager"], "requiresPlugins": ["Kits", "ZoneManager"],
@@ -120,17 +120,18 @@
"", "",
"`serviceable` is the one value here with no authority to check it against, and it is", "`serviceable` is the one value here with no authority to check it against, and it is",
"deliberately manual. It answers a question no API can: does the published build", "deliberately manual. It answers a question no API can: does the published build",
"actually work. The org lead reports v0.5.0's does not, so the download block renders a", "actually work. v0.5.0's did not, and while false the download block renders a 'being",
"'being replaced' state instead of a link, and flipping this to true is the single edit", "replaced' state instead of a link. A check cannot run an APK; a person can, and this",
"that turns the link back on once a working build is released. A check cannot run an", "is where they record that they did. v0.7.0's was installed on an Android 16 emulator",
"APK; a person can, and this is where they record that they did." "on 2026-10-31, connected to the public demo and read its Rust servers: true.",
"When `asset` moves to a new release, set this back to false until someone has run it."
], ],
"androidApk": { "androidApk": {
"asset": "runic-gateway-0.5.0.apk", "asset": "runic-gateway-0.7.0.apk",
"checksums": "SHA256SUMS", "checksums": "SHA256SUMS",
"minSdk": 29, "minSdk": 29,
"minAndroid": "10", "minAndroid": "10",
"serviceable": false "serviceable": true
}, },
"gitea": { "gitea": {

View File

@@ -39,7 +39,24 @@
* deployment is branded "Runic Gateway Demo" rather than a real community's name (D43) — * deployment is branded "Runic Gateway Demo" rather than a real community's name (D43) —
* the screenshots show the platform, not somebody's private shard. * the screenshots show the platform, not somebody's private shard.
* *
* Nothing here is a mock-up, and nothing here was drawn. * None of those is a mock-up, and nothing here was drawn.
*
* The Rust captures (phase 18) are a second demo deployment, since one deployment runs one
* game module, wired to the Oxide test server over a real rust-link sidecar. The server, its
* status, its world map and markers, the permission groups its plugins hold and RunicNPC's
* sync state are that server's. Its players are not: the rig has none, so the feed, the
* leaderboard and the linked Steam account were written into the demo's database by
* `scripts/mockRustDemo.mjs`, in the module's own row shapes (D81), with every name a role
* (D80). The captions say what the screen does, never that a player did it.
*
* ---------------------------------------------------------------------------------------
* A SCREENSHOT BELONGS TO ITS GAME (D67)
* ---------------------------------------------------------------------------------------
* A capture of one game's screen shows that game's words in its pixels, and its alt text has
* to describe the image honestly. So an entry may carry `game`: its alt and caption may then
* use that game's words, and `Screenshot.astro` prints the game's name beside it wherever it
* appears, marking the figure `data-game` for `checkTerms.mjs --built`. A core screen — the
* news, the dashboard, the modules list — carries no tag.
*/ */
/** Web capture geometry. The capture script and the check both read these. */ /** Web capture geometry. The capture script and the check both read these. */
@@ -60,9 +77,12 @@ export const PHONE = { width: 1440, height: 3088 };
* @property {string} route Route on the demo deployment. The capture script's only input. * @property {string} route Route on the demo deployment. The capture script's only input.
* @property {boolean} admin Capture signed in as an administrator rather than anonymously. * @property {boolean} admin Capture signed in as an administrator rather than anonymously.
* @property {number} [scrollY] Pixels to scroll before the shot, when the subject is below the fold. * @property {number} [scrollY] Pixels to scroll before the shot, when the subject is below the fold.
* @property {string[]} [click] Visible text of what to click, in order, before the shot — for a
* subject behind a tab or a button the route cannot reach.
* @property {string} alt What the screen shows, for somebody who cannot see it. * @property {string} alt What the screen shows, for somebody who cannot see it.
* @property {string} caption The sentence printed under the figure. * @property {string} caption The sentence printed under the figure.
* @property {'web'|'phone'} family Which geometry the file follows. * @property {'web'|'phone'} family Which geometry the file follows.
* @property {'uo'|'rust'} [game] The game whose screen this is (D67), a key of `platform.json`'s `games`.
*/ */
/** @type {Screen[]} */ /** @type {Screen[]} */
@@ -70,6 +90,7 @@ export const screens = [
// ── The product's public surfaces ─────────────────────────────────────────────────── // ── The product's public surfaces ───────────────────────────────────────────────────
{ {
id: 'shard-status', id: 'shard-status',
game: 'uo',
route: '/uo/shard', route: '/uo/shard',
admin: false, admin: false,
alt: 'The shard page of a Runic Gateway site, showing the shard online, its gold supply, the state of the shard link, and one player online in Britain.', alt: 'The shard page of a Runic Gateway site, showing the shard online, its gold supply, the state of the shard link, and one player online in Britain.',
@@ -79,6 +100,7 @@ export const screens = [
}, },
{ {
id: 'marketplace', id: 'marketplace',
game: 'uo',
route: '/uo/market', route: '/uo/market',
admin: false, admin: false,
scrollY: 470, scrollY: 470,
@@ -89,6 +111,7 @@ export const screens = [
}, },
{ {
id: 'spawn-atlas', id: 'spawn-atlas',
game: 'uo',
route: '/uo/atlas', route: '/uo/atlas',
admin: false, admin: false,
scrollY: 466, scrollY: 466,
@@ -99,6 +122,7 @@ export const screens = [
}, },
{ {
id: 'guilds', id: 'guilds',
game: 'uo',
route: '/uo/guilds', route: '/uo/guilds',
admin: false, admin: false,
alt: 'The guilds page, listing each guild on the shard with its abbreviation, how many members are online, and its leader.', alt: 'The guilds page, listing each guild on the shard with its abbreviation, how many members are online, and its leader.',
@@ -108,6 +132,7 @@ export const screens = [
}, },
{ {
id: 'houses', id: 'houses',
game: 'uo',
route: '/uo/houses', route: '/uo/houses',
admin: false, admin: false,
alt: 'The houses page, listing homes that have entered their final decay stage with their owner and location.', alt: 'The houses page, listing homes that have entered their final decay stage with their owner and location.',
@@ -116,6 +141,57 @@ export const screens = [
family: 'web', family: 'web',
}, },
// ── Rust's public pages (PLAN.md §16 phase 18, D65) ─────────────────────────────────
//
// The second demo deployment (see WHAT IS IN THEM above): a real server, demo players.
// The demo makes who is online public, which a real community decides for itself; the
// players it would name are the demo cast. The server list's player count is the cast's
// too, written just before the shot, since the live server reports its own every 30 s.
{
id: 'rust-servers',
game: 'rust',
route: '/rust',
admin: false,
alt: 'The Rust servers page of a Runic Gateway site, with one server card: its map, world size, when it last wiped, its next wipe a week away, and six of forty players online.',
caption:
'Every server the community runs, as each last reported itself — and the next wipe, worked out from the schedule the operator set.',
family: 'web',
},
{
id: 'rust-feed',
game: 'rust',
route: '/rust/servers/rust-oxide',
admin: false,
scrollY: 268,
alt: "A Rust server's feed: players killing each other with the weapon, distance and map square, chat lines, a cargo ship docking, a raid base cleared, a guarded crate won, a Bradley destroyed and players connecting and leaving, newest first.",
caption:
'The feed: kills, chat, comings and goings and the world’s own events, as the bridge reports them. Who sees players named in it is the operator’s choice.',
family: 'web',
},
{
id: 'rust-leaderboard',
game: 'rust',
route: '/rust/servers/rust-oxide?tab=leaderboard',
admin: false,
scrollY: 520,
alt: "A Rust server's leaderboard for the current wipe, ranking eight players by kills, with deaths, NPC kills, structures built, time played, crates hacked, drops looted and treasures won.",
caption:
'The wipe’s leaderboard. Any column sorts it, and a column for an optional plugin appears only where that plugin is installed.',
family: 'web',
},
{
id: 'rust-map',
game: 'rust',
route: '/rust/servers/rust-oxide?tab=map',
admin: false,
scrollY: 470,
click: ['+'],
alt: "A Rust server's live map: the island from the game's own render under a grid, with monuments, airdrops and a PvP zone around the cargo ship marked, above the switches for each layer.",
caption:
'The live map, rendered from the running server and refreshed every ten seconds while the tab is open. Each layer has its own audience.',
family: 'web',
},
{ {
id: 'news', id: 'news',
route: '/site/news', route: '/site/news',
@@ -145,6 +221,7 @@ export const screens = [
}, },
{ {
id: 'admin-shard', id: 'admin-shard',
game: 'uo',
route: '/admin/uo/link', route: '/admin/uo/link',
admin: true, admin: true,
alt: 'The shard connection screen, showing the sidecar connected, the websocket ingest live, and fields for the sidecar URL, token and protocol version.', alt: 'The shard connection screen, showing the sidecar connected, the websocket ingest live, and fields for the sidecar URL, token and protocol version.',
@@ -154,6 +231,7 @@ export const screens = [
}, },
{ {
id: 'admin-client-files', id: 'admin-client-files',
game: 'uo',
route: '/admin/uo/files', route: '/admin/uo/files',
admin: true, admin: true,
alt: 'The client files screen, showing the creature portraits section: 1,095 pictures held of 1,095 catalogued, 746 of 800 creatures matched, the last import and the extractor version, above Update and Re-import everything buttons.', alt: 'The client files screen, showing the creature portraits section: 1,095 pictures held of 1,095 catalogued, 746 of 800 creatures matched, the last import and the extractor version, above Update and Re-import everything buttons.',
@@ -179,6 +257,30 @@ export const screens = [
family: 'web', family: 'web',
}, },
{
id: 'admin-rust-permissions',
game: 'rust',
route: '/admin/rust',
admin: true,
click: ['Groups', 'vip'],
alt: "The Rust permissions screen: the server's groups listed down the left, the VIP group open with its permissions filed under the plugin that registers each one, and Granted or Revoked beside every permission.",
caption:
'Every permission and group on the server, kept by the site — what was there before it, what is made here, and what is changed in the game — and pushed back after a wipe.',
family: 'web',
},
{
id: 'admin-rust-npcs',
game: 'rust',
route: '/admin/rust/npcs',
admin: true,
click: ['Edit'],
scrollY: 900,
alt: 'The RunicNPC profile editor for a guard: its names, its Kits kit, prefab and role, how far it notices players before it sleeps, and its health, damage, aim and vision.',
caption:
'A RunicNPC profile, edited on the site and pushed to every server it is for. RunicNPC checks each field the same way here, in the console and through its API.',
family: 'web',
},
// ── The Android app, against the same deployment on the same day (D26) ────────────── // ── The Android app, against the same deployment on the same day (D26) ──────────────
// //
// Captured from an emulator pointed at the demo stack through `adb reverse`, signed in as // Captured from an emulator pointed at the demo stack through `adb reverse`, signed in as
@@ -195,6 +297,7 @@ export const screens = [
}, },
{ {
id: 'app-shard', id: 'app-shard',
game: 'uo',
route: '/shard', route: '/shard',
admin: false, admin: false,
alt: "The app's shard screen, showing the shard online with one player and its gold supply, links to champion spawns, guilds, governors and falling houses, and a live activity feed.", alt: "The app's shard screen, showing the shard online with one player and its gold supply, links to champion spawns, guilds, governors and falling houses, and a live activity feed.",
@@ -204,6 +307,7 @@ export const screens = [
}, },
{ {
id: 'app-market', id: 'app-market',
game: 'uo',
route: '/market', route: '/market',
admin: false, admin: false,
alt: "The app's marketplace, listing weapons for sale with their price, the shop selling them and where it stands.", alt: "The app's marketplace, listing weapons for sale with their price, the shop selling them and where it stands.",
@@ -237,6 +341,37 @@ export const screens = [
"The drawer is the deployment's own navigation, not a fixed menu — a site that renames or reorders its pages renames and reorders them here.", "The drawer is the deployment's own navigation, not a fixed menu — a site that renames or reorders its pages renames and reorders them here.",
family: 'phone', family: 'phone',
}, },
// The app's Rust screens (phase 18), against the Rust demo, signed in as `player` (D80).
// From an `Android-app` `edge` debug build: they were not in a release when captured.
{
id: 'app-rust-server',
game: 'rust',
route: '/rust/servers/rust-oxide',
admin: false,
alt: "The app's Rust server screen: the server's map, size, last and next wipe and how many players are online, tabs for the feed, leaderboard, online list, map and wipes, and the feed of kills with the weapon's name, chat and players connecting.",
caption: 'Each server in the app: the same feed as the site, with the same filters.',
family: 'phone',
},
{
id: 'app-rust-map',
game: 'rust',
route: '/rust/servers/rust-oxide?tab=map',
admin: false,
alt: "The app's live map of a Rust server: the island under a grid with monuments and world events marked, and switches for the grid, monuments and world events, site events and players.",
caption: 'The live map on a phone, refreshed every ten seconds while it is open.',
family: 'phone',
},
{
id: 'app-rust-account',
game: 'rust',
route: '/account/rust',
admin: false,
alt: "The app's Rust account screen for a signed-in player: a box for the link code the game gives, the linked Steam account, the VIP group it has on the server, its coins, and a button to open its backpack.",
caption:
'A player’s own side: link a Steam account with a code from the game, then see what it can do, its coins and its backpack on every server.',
family: 'phone',
},
]; ];
/** One entry by id, or `undefined`. */ /** One entry by id, or `undefined`. */

124
src/lib/demoLogins.mjs Normal file
View File

@@ -0,0 +1,124 @@
/**
* demoLogins.mjs — the public demo's sign-ins, read from the demo itself (D82).
*
* ---------------------------------------------------------------------------------------
* WHY THE PASSWORDS ARE NOT IN THIS REPOSITORY
* ---------------------------------------------------------------------------------------
* The demo's accounts are recreated at every wipe from passwords generated on the demo's own
* host, so the only copy that is right by definition is the one the demo serves. It already
* publishes them: with `DEMO_MODE` on, `GET /api/v1/public/settings` answers
* `demo: { resetsAt, logins: [{ username, password, role }] }`, which is what its own
* sign-in page lists (`docs/website/DEMO_MODE.md` §4 and §6). `/beta` reads the same answer.
* A copy pasted into a mounted file would be one regenerated `.env` away from a page
* publishing passwords that no longer work.
*
* ---------------------------------------------------------------------------------------
* WHAT THIS DOES NOT CHANGE
* ---------------------------------------------------------------------------------------
* The fetch is made by this server, never by the browser, so D9 and §6's CSP stand: the
* visitor's page loads nothing from another origin. Only `/beta` calls it, and `/beta`
* already renders per request.
*
* It never throws and never holds a page up for long. The demo is down for a few minutes at
* every wipe, and a sign-up page must not fail with it: a failed or slow read answers `null`,
* the page points at the demo's own sign-in page instead, and the failure is cached briefly
* so a down demo is not asked again on every request.
*
* Everything read is checked before it is used. The demo is ours, but it is a public admin
* playground, and a string from it goes into this page's markup. Astro escapes it, and the
* length and shape limits below keep a strange answer from becoming a strange page.
*/
const OK_TTL_MS = 60_000;
const FAIL_TTL_MS = 15_000;
const TIMEOUT_MS = 1_500;
const MAX_LOGINS = 8;
const MAX_FIELD = 64;
let cache = { key: '', until: 0, value: null };
let pending = null;
const isShortString = (value) => typeof value === 'string' && value.length > 0 && value.length <= MAX_FIELD;
/**
* The demo's answer reduced to what `/beta` shows, or `null` when it is not the shape
* `DEMO_MODE.md` §6 describes. Exported for the tests.
*
* @param {unknown} body The parsed JSON of `GET /api/v1/public/settings`.
* @returns {{ logins: { username: string, password: string, role: string }[], resetsAt: string | null } | null}
*/
export function readDemo(body) {
const demo = body && typeof body === 'object' ? body.demo : null;
if (!demo || typeof demo !== 'object' || !Array.isArray(demo.logins)) return null;
const logins = demo.logins
.filter((l) => l && isShortString(l.username) && isShortString(l.password) && isShortString(l.role))
.slice(0, MAX_LOGINS)
.map(({ username, password, role }) => ({ username, password, role }));
if (!logins.length) return null;
const at = typeof demo.resetsAt === 'string' ? new Date(demo.resetsAt) : null;
const resetsAt = at && !Number.isNaN(at.getTime()) ? at.toISOString() : null;
return { logins, resetsAt };
}
/**
* "22:00 UTC" — in UTC and not converted, matching the demo's own banner (§6).
* @param {string | null} iso
*/
export function resetTime(iso) {
return iso ? `${iso.slice(11, 16)} UTC` : null;
}
/**
* The sign-ins the demo at `demoUrl` publishes now, cached for a minute.
*
* @param {string} demoUrl The mounted `brand.json` `demoUrl`.
* @param {{ fetchImpl?: typeof fetch, now?: () => number }} [options] For the tests.
* @returns {Promise<ReturnType<typeof readDemo>>}
*/
export async function demoLogins(demoUrl, { fetchImpl = fetch, now = Date.now } = {}) {
let base;
try {
base = new URL(demoUrl);
} catch {
return null;
}
if (base.protocol !== 'https:' && base.protocol !== 'http:') return null;
const key = base.origin + base.pathname.replace(/\/+$/, '');
if (cache.key === key && now() < cache.until) return cache.value;
if (pending?.key === key) return pending.promise;
const promise = (async () => {
let value = null;
try {
const response = await fetchImpl(`${key}/api/v1/public/settings`, {
headers: { accept: 'application/json' },
redirect: 'error',
signal: AbortSignal.timeout(TIMEOUT_MS),
});
if (response.ok) value = readDemo(await response.json());
if (!value) console.warn(`[beta] the demo at ${key} published no sign-ins (HTTP ${response.status}).`);
} catch (error) {
console.warn(`[beta] could not read the demo's sign-ins from ${key}: ${error.message}`);
}
cache = { key, until: now() + (value ? OK_TTL_MS : FAIL_TTL_MS), value };
return value;
})();
pending = { key, promise };
try {
return await promise;
} finally {
if (pending?.promise === promise) pending = null;
}
}
/** Forget the cache. For the tests. */
export function resetDemoLoginsCache() {
cache = { key: '', until: 0, value: null };
pending = null;
}

View File

@@ -54,8 +54,8 @@ import { playPolicy } from '../data/beta.mjs';
*/ */
const title = 'The Android app'; const title = 'The Android app';
const description = const description =
'A native Android client for a Runic Gateway deployment: the shard, the site and your ' + 'A native Android client for a Runic Gateway deployment: the game, the site and your ' +
'account, themed by whichever community you point it at.'; 'account, themed by whichever community you point it at — Ultima Online or Rust.';
const apk = platform.androidApk; const apk = platform.androidApk;
const release = platform.releases['Android-app']; const release = platform.releases['Android-app'];
@@ -196,6 +196,12 @@ const downloadBase = `${releasePage}/download/${release}`;
</p> </p>
</div> </div>
</div> </div>
<!-- D85: the deletion page Play is given, beside the two ways in. -->
<p class="app-delete">
Done with it? <a href="/delete-account/">How to delete the account you use in the
app</a>, and what deleting it keeps.
</p>
</section> </section>
<NotBuilt scope="app" title="What the app does not do" /> <NotBuilt scope="app" title="What the app does not do" />
@@ -335,6 +341,12 @@ const downloadBase = `${releasePage}/download/${release}`;
padding-top: 0.4rem; padding-top: 0.4rem;
} }
.app-delete {
margin: 1.25rem 0 0;
color: var(--muted);
font-size: 0.95rem;
}
.app-get__foot { .app-get__foot {
margin: 1rem 0 0; margin: 1rem 0 0;
padding-top: 0.85rem; padding-top: 0.85rem;

View File

@@ -4,6 +4,7 @@ import PageHeader from '../components/PageHeader.astro';
import NotBuilt from '../components/NotBuilt.astro'; import NotBuilt from '../components/NotBuilt.astro';
import { liveBrand } from '../lib/brand.mjs'; import { liveBrand } from '../lib/brand.mjs';
import { demoLogins, resetTime } from '../lib/demoLogins.mjs';
import { isFull, liveCount } from '../lib/betaStore.mjs'; import { isFull, liveCount } from '../lib/betaStore.mjs';
import { issueFormToken, OUTCOME, submit, isSuccess } from '../lib/betaSignup.mjs'; import { issueFormToken, OUTCOME, submit, isSuccess } from '../lib/betaSignup.mjs';
import { CONSENT_TEXT, fields, limits, playPolicy, requirements } from '../data/beta.mjs'; import { CONSENT_TEXT, fields, limits, playPolicy, requirements } from '../data/beta.mjs';
@@ -35,9 +36,9 @@ import { CONSENT_TEXT, fields, limits, playPolicy, requirements } from '../data/
* The beta cannot start yet for two independent reasons — no Play track, and nowhere for a * The beta cannot start yet for two independent reasons — no Play track, and nowhere for a
* tester to point the app (see `beta.mjs` for both in full). The page collects addresses * tester to point the app (see `beta.mjs` for both in full). The page collects addresses
* anyway, because the list is what makes the first batch possible on day one, and says * anyway, because the list is what makes the first batch possible on day one, and says
* plainly that it is a list rather than a queue that is moving. The demo is rendered * plainly that it is a list rather than a queue that is moving. Gate two closed when the
* through `NotBuilt` so the absence appears in the same shape it takes everywhere else on * public demo went up (2026-10-27): with `demoUrl` mounted it says so, and the page lists
* the site rather than as an apology invented for this page. * the demo's sign-ins as the demo itself publishes them (D82).
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* WHAT THE SUCCESS SCREEN SHOWS, AND WHY IT CAN SHOW IT * WHAT THE SUCCESS SCREEN SHOWS, AND WHY IT CAN SHOW IT
@@ -53,6 +54,22 @@ export const prerender = false;
const brand = liveBrand(); const brand = liveBrand();
/**
* The public demo, which closes gate two (D27): the deployment a tester points the app at.
* Its sign-ins are read from the demo on this request (D82, `demoLogins.mjs`), so they are
* whatever the demo's own sign-in page lists. `null` with a `demoUrl` set means the demo did
* not answer, and the page sends people to that sign-in page instead.
*/
let demoHost = '';
try {
demoHost = brand.demoUrl ? new URL(brand.demoUrl).host : '';
} catch {
console.warn(`[beta] the mounted demoUrl is not a URL: ${JSON.stringify(brand.demoUrl)}`);
}
const demoBase = demoHost ? brand.demoUrl.replace(/\/+$/, '') : '';
const demo = demoBase ? await demoLogins(demoBase) : null;
const demoReset = resetTime(demo?.resetsAt ?? null);
/** /**
* A POST is a submission; anything else is somebody arriving. `Astro.request.formData()` * A POST is a submission; anything else is somebody arriving. `Astro.request.formData()`
* parses both `application/x-www-form-urlencoded` and `multipart/form-data`, and this form * parses both `application/x-www-form-urlencoded` and `multipart/form-data`, and this form
@@ -193,7 +210,7 @@ const formToken = issueFormToken();
test. This is the list of people who want a place on it. test. This is the list of people who want a place on it.
</p> </p>
<p> <p>
It has not opened yet, and the two reasons are below rather than behind a It has not opened yet, and what it is waiting on is below rather than behind a
&ldquo;coming soon&rdquo;. Adding your address now means you are in the first batch &ldquo;coming soon&rdquo;. Adding your address now means you are in the first batch
rather than hearing about it afterwards. rather than hearing about it afterwards.
</p> </p>
@@ -249,8 +266,11 @@ const formToken = issueFormToken();
<section class="page section"> <section class="page section">
<h2 class="beta-h2">What it is waiting on</h2> <h2 class="beta-h2">What it is waiting on</h2>
<p class="prose beta-lede"> <p class="prose beta-lede">
Two things, neither of which is a date. Both are visible from outside, so there is no {demoBase
reason to be vague about them. ? 'Two things, neither of which is a date, and the second is in place. Both are ' +
'visible from outside, so there is no reason to be vague about them.'
: 'Two things, neither of which is a date. Both are visible from outside, so there ' +
'is no reason to be vague about them.'}
</p> </p>
<ol class="beta-gates"> <ol class="beta-gates">
@@ -271,22 +291,85 @@ const formToken = issueFormToken();
</li> </li>
<li class="panel beta-gate"> <li class="panel beta-gate">
<p class="eyebrow">Gate two</p> <p class="eyebrow">{demoBase ? 'Gate two · in place' : 'Gate two'}</p>
<h3>Somewhere to point it</h3> <h3>Somewhere to point it</h3>
<p> {
The app is a client and ships pointed at nothing — its first screen asks for the demoBase ? (
address of a site running this platform. So a tester needs a deployment, and the <p>
public demo is the one being built for that. Until it is running, a place on the The app is a client and ships pointed at nothing — its first screen asks for the
test would be a place to install an app with nothing behind it. address of a site running this platform. The public demo is that site: a real
</p> deployment with a real game server behind it, open to anyone with the sign-ins{' '}
<a href="#demo">below</a>.
</p>
) : (
<p>
The app is a client and ships pointed at nothing — its first screen asks for the
address of a site running this platform. So a tester needs a deployment, and
without a public one to point at, a place on the test would be a place to
install an app with nothing behind it.
</p>
)
}
<p class="beta-gate__foot"> <p class="beta-gate__foot">
If you already run a Runic Gateway deployment, this gate does not apply to you — If you already run a Runic Gateway deployment, you can point the app at that
say so in Discord. instead — say so in Discord.
</p> </p>
</li> </li>
</ol> </ol>
</section> </section>
{
demoBase && (
<section class="page section" id="demo">
<h2 class="beta-h2">The demo</h2>
<p class="prose beta-lede">
Enter <strong>{demoHost}</strong> on the app's first screen, or{' '}
<a href={demoBase} rel="noopener noreferrer">open it in a browser</a>. Every account
below is shared with everyone else trying it, and the site is wiped back to the same
starting point every few hours, so nothing you change there lasts.
</p>
{demo ? (
<div class="panel beta-demo">
<table class="beta-demo__logins">
<caption>Sign-ins, as the demo publishes them right now</caption>
<thead>
<tr>
<th scope="col">Account</th>
<th scope="col">Password</th>
<th scope="col">Role</th>
</tr>
</thead>
<tbody>
{demo.logins.map((login) => (
<tr>
<td><code>{login.username}</code></td>
<td><code>{login.password}</code></td>
<td>{login.role}</td>
</tr>
))}
</tbody>
</table>
{demoReset && (
<p class="beta-demo__foot">
Next wipe at {demoReset}. Anything you change before then goes with it.
</p>
)}
</div>
) : (
<div class="panel beta-notice beta-notice--warn">
<h3>The demo did not answer just now.</h3>
<p>
It is offline for a few minutes at every wipe. Its sign-ins are listed on{' '}
<a href={`${demoBase}/account/login`} rel="noopener noreferrer">its own sign-in page</a>
{' '}once it is back.
</p>
</div>
)}
</section>
)
}
<section class="page section"> <section class="page section">
<h2 class="beta-h2">What a tester needs</h2> <h2 class="beta-h2">What a tester needs</h2>
<ul class="beta-reqs"> <ul class="beta-reqs">
@@ -524,6 +607,46 @@ const formToken = issueFormToken();
font-size: 0.86rem; font-size: 0.86rem;
} }
/* The demo's sign-ins (D82). A plain table: three columns a person copies from, so the
passwords are code and nothing about them is decorated. */
.beta-demo {
margin-top: 1.25rem;
overflow-x: auto;
}
.beta-demo__logins {
width: 100%;
border-collapse: collapse;
}
.beta-demo__logins caption {
margin-bottom: 0.65rem;
color: var(--dim);
font-size: 0.86rem;
text-align: left;
}
.beta-demo__logins th,
.beta-demo__logins td {
padding: 0.55rem 0.75rem 0.55rem 0;
border-bottom: 1px solid var(--line-soft);
text-align: left;
}
.beta-demo__logins th {
color: var(--head);
font-weight: 600;
}
.beta-demo__logins td {
color: var(--text);
}
.beta-demo__foot {
margin: 0.85rem 0 0;
color: var(--muted);
}
/* The form and the counter. The counter is deliberately narrow and secondary — it is /* The form and the counter. The counter is deliberately narrow and secondary — it is
context for the decision, not the reason to make it. */ context for the decision, not the reason to make it. */
.beta-formwrap { .beta-formwrap {

View File

@@ -0,0 +1,327 @@
---
import Base from '../layouts/Base.astro';
import PageHeader from '../components/PageHeader.astro';
import { deletionRow } from '../data/collection.mjs';
import { legal } from '../data/legal.mjs';
import { brand } from '../lib/brand.mjs';
/**
* `/delete-account/` — the page Google Play is given for account deletion
* (docs/website/ACCOUNT_DELETION.md §4.5, AD2).
*
* ---------------------------------------------------------------------------------------
* IT EXPLAINS; IT CANNOT PERFORM
* ---------------------------------------------------------------------------------------
* Play needs one deletion address from whoever publishes the app, and that is us. But we
* hold no account: every community runs its own site, and the account lives there. So this
* page says where the button is on the website and in the app, what goes and what stays,
* and who to ask when you cannot sign in, which is that community's operator and never us
* (D86). We have no access to any community's site, so offering to help would promise
* something we cannot do.
*
* What goes and what stays is not written here. It is the `deletion` row in
* `src/data/collection.mjs`, the same row `/privacy` section 3 renders, so the two pages
* cannot disagree about what a deletion takes.
*/
const title = 'Delete your account';
const description =
`How to delete an account you use in the ${brand.siteName} Android app or on a ` +
`${brand.siteName} community site, what is deleted, and what is kept.`;
const row = deletionRow();
const { goes, stays, staff } = row.deletion;
const surfaces = [
{
id: 'on-the-website',
eyebrow: 'On the website',
heading: 'Your community’s site',
steps: [
'Sign in to the site.',
'Open “Account”. Staff open “Account” in the admin panel instead.',
'Scroll to the bottom, to “Delete my account”, and press “Delete my account…”.',
'Type your username, then your password, and a two-factor code if the account has two-factor sign-in on.',
'Press “Delete my account”. You are signed out everywhere, and the site says the account has been deleted.',
],
},
{
id: 'in-the-app',
eyebrow: 'In the app',
heading: `The ${brand.siteName} app`,
steps: [
'Sign in, if you are not already.',
'Open the menu and choose “My account”.',
'Scroll to the bottom and tap “Delete my account…”.',
'Type your username, then your password, and a two-factor code if the account has two-factor sign-in on.',
'Tap “Delete my account”. The app forgets the account and returns to sign-in, saying it has been deleted.',
],
},
];
---
<Base title={title} description={description}>
<PageHeader eyebrow="Account deletion" title="Deleting your account">
<p>
For the {brand.siteName} Android app, and for the community sites it connects to. We
are {brand.siteName}, the project that makes both.
</p>
<p>
You can delete your account yourself, on the website or in the app. It is deleted at
once: there is no waiting period and nothing to cancel.
</p>
</PageHeader>
<section class="page section legal-meta">
<p class="legal-meta__line">
<span class="chip chip--version">Last updated {legal.lastUpdated}</span>
<a class="legal-meta__link" href="/privacy/#deployments">The same list is on the privacy page</a>
</p>
</section>
<section class="page section">
<div class="panel del-who">
<h2>Your account is with your community, not with us</h2>
<p>
The app ships pointed at nothing. On first run it asks for the address of a
{' '}{brand.siteName} site, and that site is run by whoever runs that community. Your
account lives there, under their control. We hold no account for you and have no
copy of one, so the deletion happens on that site, and you are the one who does it.
</p>
</div>
</section>
<section class="page section" id="how">
<h2 class="del-h2">How to delete it</h2>
<p class="prose del-lede">
The same steps on both, and either one deletes the account everywhere: deleting it in
the app also deletes it on the website, and the other way round.
</p>
<div class="del-grid">
{
surfaces.map((surface) => (
<div class="panel del-surface" id={surface.id}>
<p class="eyebrow">{surface.eyebrow}</p>
<h3>{surface.heading}</h3>
<ol class="del-steps">
{surface.steps.map((step) => (
<li>{step}</li>
))}
</ol>
</div>
))
}
</div>
<ul class="del-notes">
<li>
<strong>A password is required.</strong> If you only ever signed in with Google,
Discord or Steam and never set a password, set one in the Password section of the
same page first.
</li>
<li>
<strong>The only admin cannot delete themselves.</strong> Make someone else an admin
first, so the site is never left with nobody to run it.
</li>
</ul>
</section>
<section class="page section" id="what-goes">
<div class="del-cols">
<div class="panel del-list">
<p class="eyebrow">Deleted</p>
<h2>What goes with the account</h2>
<ul>
{goes.map((item) => <li>{item[0].toUpperCase() + item.slice(1)}.</li>)}
</ul>
<p class="del-list__foot">{row.retention.detail}</p>
</div>
<div class="panel del-list">
<p class="eyebrow">Kept</p>
<h2>What stays, and for how long</h2>
<ul class="del-kept">
{
stays.map((entry) => (
<li>
{entry.what}
<span class="del-kept__keep">
<span class="del-kept__label">How long</span>
{entry.keep}
</span>
</li>
))
}
</ul>
<p class="del-list__foot">{staff}</p>
</div>
</div>
</section>
<section class="page section" id="cannot-sign-in">
<div class="panel del-who">
<h2>If you cannot sign in</h2>
<ol class="del-steps">
<li>
Use “Forgot your password?” on the sign-in page, on the website or in the app. It
works if your account has an email address and the site can send email.
</li>
<li>
Otherwise, ask the community that runs the site. Its operator can delete any
account from the admin panel, and the result is the same as deleting it yourself.
</li>
</ol>
<p class="del-who__note">
We cannot do it for you. We hold no account, and we have no access to any
community’s site.
</p>
</div>
</section>
</Base>
<style>
/* The header strip, as /privacy and /terms render it. Astro scopes component styles, so
each legal page carries its own copy (see the note in terms.astro). */
/* Unlike /privacy, a panel follows the strip directly, so it keeps some room below. */
.legal-meta {
padding-top: 0;
padding-bottom: 1.25rem;
}
.legal-meta__line {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem;
margin: 0;
}
.legal-meta__link {
color: var(--dim);
font-size: 0.9rem;
}
.del-h2 {
margin: 0 0 0.75rem;
font-size: clamp(1.6rem, 3.2vw, 2.1rem);
}
.del-lede {
margin: 0 0 1.75rem;
color: var(--muted);
}
/* The two panels that frame the page: who holds the account, and who to ask. Gold edge,
as /app's prerequisite panel, because each is a fact about the product rather than a
warning. */
.del-who {
padding: clamp(1.25rem, 4vw, 2.25rem);
border-color: var(--gold-deep);
}
.del-who h2 {
margin: 0 0 0.7rem;
font-size: clamp(1.3rem, 3vw, 1.7rem);
}
.del-who p,
.del-who li {
max-width: var(--measure);
color: var(--muted);
}
.del-who p {
margin: 0;
}
/* The one sentence a reader who skims must not miss, so it is brighter than the rest. */
.del-who .del-who__note {
margin-top: 1rem;
color: var(--ink);
}
.del-grid,
.del-cols {
display: grid;
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
}
.del-surface,
.del-list {
padding: clamp(1.1rem, 3vw, 1.75rem);
}
.del-surface h3 {
margin: 0 0 0.8rem;
font-size: 1.15rem;
}
.del-list h2 {
margin: 0 0 0.8rem;
font-size: clamp(1.2rem, 2.6vw, 1.45rem);
}
.del-steps {
margin: 0;
padding-left: 1.3rem;
color: var(--muted);
font-size: 0.97rem;
}
.del-steps li + li {
margin-top: 0.45rem;
}
.del-notes {
margin: 1.25rem 0 0;
padding-left: 1.2rem;
max-width: var(--measure);
color: var(--muted);
font-size: 0.95rem;
}
.del-notes li + li {
margin-top: 0.5rem;
}
.del-list ul {
margin: 0;
padding-left: 1.2rem;
color: var(--muted);
font-size: 0.95rem;
}
.del-list li + li {
margin-top: 0.5rem;
}
.del-kept li + li {
margin-top: 0.9rem;
}
.del-kept__keep {
display: block;
margin-top: 0.3rem;
color: var(--dim);
font-size: 0.88rem;
}
.del-kept__label {
display: block;
color: var(--muted);
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.11em;
text-transform: uppercase;
}
.del-list__foot {
margin: 1.1rem 0 0;
padding-top: 0.9rem;
border-top: 1px solid var(--line-soft);
color: var(--dim);
font-size: 0.88rem;
}
</style>

View File

@@ -3,13 +3,10 @@ import Base from '../layouts/Base.astro';
import PageHeader from '../components/PageHeader.astro'; import PageHeader from '../components/PageHeader.astro';
import NotBuilt from '../components/NotBuilt.astro'; import NotBuilt from '../components/NotBuilt.astro';
import Screenshot from '../components/Screenshot.astro'; import Screenshot from '../components/Screenshot.astro';
import SupportedGames from '../components/SupportedGames.astro';
import platform from '../data/platform.json'; import { capabilityGroups, assertDetailCoverage } from '../data/capabilities.mjs';
import { import { games, assertGameCoverage } from '../data/games/index.mjs';
capabilityGroups,
assertCapabilityCoverage,
assertDetailCoverage,
} from '../data/capabilities.mjs';
/** /**
* `/features/` — PLAN.md §13 phase 4, built to D20. * `/features/` — PLAN.md §13 phase 4, built to D20.
@@ -24,8 +21,8 @@ import {
* a thing somebody has to notice. * a thing somebody has to notice.
* *
* Both assertions below run at build time and both name this page in their message. * Both assertions below run at build time and both name this page in their message.
* `assertCapabilityCoverage` is the module contract the homepage also runs — repeated here * `assertGameCoverage` is the module contract the homepage and each game page also run —
* deliberately, since either page can be built alone and each should fail on its own. * repeated here deliberately, since any page can be built alone and each should fail on its own.
* `assertDetailCoverage` is this page's own: a capability with no detail renders as a * `assertDetailCoverage` is this page's own: a capability with no detail renders as a
* heading with nothing under it, and nothing else in the repo would notice. * heading with nothing under it, and nothing else in the repo would notice.
* *
@@ -53,7 +50,7 @@ import {
* matches bytes, and a stock build hides every one of these links, so a mistake here is * matches bytes, and a stock build hides every one of these links, so a mistake here is
* invisible until the day somebody configures a demo. * invisible until the day somebody configures a demo.
*/ */
assertCapabilityCoverage(platform.games.uo.module.capabilities); for (const game of games) assertGameCoverage(game.key);
assertDetailCoverage(); assertDetailCoverage();
/** /**
@@ -66,19 +63,21 @@ assertDetailCoverage();
* the container runs and who owns the database, and a picture of a web page says nothing * the container runs and who owns the database, and a picture of a web page says nothing
* true about either. * true about either.
* *
* The module-supplied group has none since phase 17: its screenshots were of one game's
* screens, and they moved with that game's list to its page under `/modules/` (D75).
*
* `Screenshot` throws on an id that `screens.mjs` does not declare, so a typo here fails the * `Screenshot` throws on an id that `screens.mjs` does not declare, so a typo here fails the
* build rather than rendering a broken image. * build rather than rendering a broken image.
*/ */
const groupScreens: Record<string, string[]> = { const groupScreens: Record<string, string[]> = {
community: ['news'], community: ['news'],
'game-intelligence': ['marketplace', 'spawn-atlas', 'guilds', 'houses'],
administration: ['admin-dashboard', 'admin-users'], administration: ['admin-dashboard', 'admin-users'],
integration: ['admin-modules'], integration: ['admin-modules'],
}; };
const title = 'Features'; const title = 'Features';
const description = const description =
'What a Runic Gateway deployment does — core, and what the installed game module adds.'; 'What a Runic Gateway deployment does — core, and what the installed game module adds, for Ultima Online or Rust.';
--- ---
<Base title={title} description={description}> <Base title={title} description={description}>
@@ -86,16 +85,17 @@ const description =
<p> <p>
Grouped the way the software is actually divided, because that division is the thing Grouped the way the software is actually divided, because that division is the thing
most worth understanding before you install it: the core site is game-agnostic and does most worth understanding before you install it: the core site is game-agnostic and does
not know what a shard is, and everything that does arrives as an <a href="/modules/" not know what game you run, and everything that does arrives as an <a href="/modules/"
>installable module</a >installable module</a
>. >.
</p> </p>
<p> <p>
Two modules exist today, for Ultima Online and for Rust, and a deployment runs one of Two modules exist today, for Ultima Online and for Rust, and a deployment runs one of
them. The second group below is what the Ultima Online module adds; the Rust module them. The second group below is what both of them add, each in its own game’s way;
brings its own set in its place. On a deployment with no module, that group is simply each game’s own list is on its page. On a deployment with no module, that group is
absent and the other four are unchanged. simply absent and the other four are unchanged.
</p> </p>
<SupportedGames class="features__games" />
</PageHeader> </PageHeader>
{ {
@@ -110,6 +110,16 @@ const description =
<p class="prose group__summary">{group.summary}</p> <p class="prose group__summary">{group.summary}</p>
{group.moduleSupplied && (
<div class="group__games">
{games.map((game) => (
<a class="btn btn--ghost" href={game.href}>
What the {game.name} module adds
</a>
))}
</div>
)}
<ul class="group__items"> <ul class="group__items">
{group.items.map((item) => ( {group.items.map((item) => (
<li class="panel group__item"> <li class="panel group__item">
@@ -123,7 +133,7 @@ const description =
{item.demoPath && ( {item.demoPath && (
<a <a
class="demo-link" class="demo-link"
href="" data-demo-url="" data-demo-path={item.demoPath} href="" data-demo-url="" data-demo-path={item.demoPath} data-demo-game={item.demoGame}
rel="noopener noreferrer" rel="noopener noreferrer"
> >
See it running See it running
@@ -175,6 +185,17 @@ const description =
color: var(--muted); color: var(--muted);
} }
.group__games {
display: flex;
flex-wrap: wrap;
gap: 0.6rem;
margin-top: 1.25rem;
}
.features__games {
margin-top: 1.5rem;
}
.group__items { .group__items {
display: grid; display: grid;
gap: 1rem; gap: 1rem;

View File

@@ -43,7 +43,7 @@ const integrations = [
{ {
title: 'Slash commands', title: 'Slash commands',
body: body:
'Commands registered with your guild that answer from your site — so the thing ' + 'Commands registered with your Discord server that answer from your site — so the thing ' +
'somebody wants to look up is available where the conversation is happening, ' + 'somebody wants to look up is available where the conversation is happening, ' +
'rather than one tab away.', 'rather than one tab away.',
}, },
@@ -60,13 +60,13 @@ const integrations = [
body: body:
'A Team can be granted its own voice channel, with membership maintained by the ' + 'A Team can be granted its own voice channel, with membership maintained by the ' +
'bot rather than by whoever is online. The bot creates the category, and the ' + 'bot rather than by whoever is online. The bot creates the category, and the ' +
'panel reports how many roles your guild has left before Discord’s own limit.', 'panel reports how many roles your Discord server has left before Discord’s own limit.',
}, },
], ],
caveat: caveat:
'Voice access is granted with a Discord role, and roles are visible on a member’s ' + 'Voice access is granted with a Discord role, and roles are visible on a member’s ' +
'profile — so a Team with a voice channel is a Team anyone in your guild can see the ' + 'profile — so a Team with a voice channel is a Team anyone in your Discord server can ' +
'membership of. That was a deliberate trade for a limit that counts per guild rather ' + 'see the membership of. That was a deliberate trade for a limit that counts per server rather ' +
'than per channel, and it is the right one for most communities, but it is not private.', 'than per channel, and it is the right one for most communities, but it is not private.',
}, },
{ {

View File

@@ -2,26 +2,27 @@
import Base from '../layouts/Base.astro'; import Base from '../layouts/Base.astro';
import PageHeader from '../components/PageHeader.astro'; import PageHeader from '../components/PageHeader.astro';
import NotBuilt from '../components/NotBuilt.astro'; import NotBuilt from '../components/NotBuilt.astro';
import SupportedGames from '../components/SupportedGames.astro';
import platform from '../data/platform.json'; import platform from '../data/platform.json';
import { capabilityGroup } from '../data/capabilities.mjs'; import { games } from '../data/games/index.mjs';
/** /**
* `/modules/` — PLAN.md §13 phase 4. * `/modules/` — PLAN.md §13 phase 4, restructured in §16 phase 17.
* *
* §10 gives this page four jobs: what a module is, `module-uo` as the worked example, * §10 gave this page four jobs: what a module is, a worked example, writing your own, and
* writing your own, and the Integration Kit with its draft badge (D8). They are in that * the Integration Kit with its draft badge (D8). They are in that order because they are
* order because they are increasing commitment — a reader deciding whether to install one, * increasing commitment — a reader deciding whether to install one, a reader wondering what
* a reader wondering what they get, a reader considering building one. * they get, a reader considering building one.
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* THE WORKED EXAMPLE READS ITS OWN CAPABILITIES * TWO GAMES, EACH ON ITS OWN PAGE
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* The `module-uo` section lists what the module publishes, and it takes that list from * The worked example was the Ultima Online module, listed in that game's words. Since phase
* `capabilities.mjs` rather than retyping it — the same list the homepage names and * 17 there are two modules, and D63 keeps a game's vocabulary on its own pages, so this page
* `/features/` expands, which is already checked against the module's own manifest through * is core: a card per game, in core's words, from `games/index.mjs`, each linking to
* `platform.json` (§12). A third hand-maintained copy on this page is exactly the failure * `/modules/uo/` or `/modules/rust/`, where the game's real feature list is (D75). What the
* that machinery exists to prevent, and this is the page where it would be least visible. * modules share — a sidecar, their own tables, their own releases — stays here, said once.
* *
* --------------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------------
* THE DRAFT CHIP IS A DECISION, NOT A DISCLAIMER * THE DRAFT CHIP IS A DECISION, NOT A DISCLAIMER
@@ -34,14 +35,12 @@ import { capabilityGroup } from '../data/capabilities.mjs';
*/ */
const title = 'Modules'; const title = 'Modules';
const description = const description =
'What a module is, what the Ultima Online module publishes, and what it takes to write ' + 'What a module is, the two game modules that exist — Ultima Online and Rust — and what it ' +
'one for another game.'; 'takes to write one for another game.';
const gitea = `${platform.gitea.base}/${platform.gitea.org}`; const gitea = `${platform.gitea.base}/${platform.gitea.org}`;
const docs = `${gitea}/docs/src/branch/main`; const docs = `${gitea}/docs/src/branch/main`;
const gameIntelligence = capabilityGroup('game-intelligence');
/** The three ways a module reaches a running deployment. None of them is a build. */ /** The three ways a module reaches a running deployment. None of them is a build. */
const installPaths = [ const installPaths = [
{ {
@@ -81,8 +80,10 @@ const installPaths = [
<p> <p>
That division is not an aspiration bolted on afterwards. The Ultima Online support was That division is not an aspiration bolted on afterwards. The Ultima Online support was
extracted out of the site into a module, and every URL it had before the move it still extracted out of the site into a module, and every URL it had before the move it still
has — which is the only version of this claim worth making. has — which is the only version of this claim worth making. Rust followed, built
against the same seam.
</p> </p>
<SupportedGames class="mod__supported" />
</PageHeader> </PageHeader>
<section class="page section mod" id="what"> <section class="page section mod" id="what">
@@ -146,60 +147,65 @@ const installPaths = [
</ol> </ol>
</section> </section>
<section class="page section mod" id="module-uo"> <section class="page section mod" id="games">
<div class="mod__head"> <p class="eyebrow">The game modules</p>
<p class="eyebrow">The worked example</p> <h2>Two games, one module each</h2>
<h2>module-uo</h2>
<span class="chip chip--version">{platform.releases['Module-uo']}</span>
</div>
<p class="prose mod__lede"> <p class="prose mod__lede">
The Ultima Online module, and the reference every module that follows is measured Both were built inside this project, and a deployment runs one of them — the site
against. It is what turns a general-purpose community site into something that knows refuses to start a second. Each has a page of its own, in its own game's words, and a
what a shard is — and it is the proof that the seam described on documentation group that starts from installing it.
<a href="/architecture/">the architecture page</a> is real, because the code on the far
side of it was moved there rather than designed there.
</p> </p>
<div class="mod__example"> <ul class="mod__games">
<div class="panel mod__caps"> {
<h3>What it publishes</h3> games.map((game) => (
<ul> <li class="panel mod__game">
{gameIntelligence.items.map((item) => <li>{item.label}</li>)} <div class="mod__head">
</ul> <h3>{game.name}</h3>
<p class="mod__caps-note"> <span class="chip chip--version">
The same list <a href="/features/">features</a> expands, read from one file that is {game.release}
checked against the module's own manifest on every build. </span>
</p> </div>
</div> <p>{game.blurb}</p>
<div class="mod__game-links">
<a class="btn btn--primary" href={game.href}>
What the {game.name} module adds
</a>
<a class="btn btn--ghost" href={game.docs}>
Its documentation
</a>
</div>
</li>
))
}
</ul>
<div class="mod__facts"> <div class="mod__facts mod__facts--shared">
<section> <section>
<h3>It connects to a real server</h3> <h3>Each connects to a real server</h3>
<p> <p>
The module talks to the sidecar beside your game server, not to the game. You A module talks to the sidecar beside your game server, not to the game. You deploy
deploy that side with the installer and paste four values into the admin panel; that side with the installer and give the admin panel its address and token;
nothing here requires the game to exist, and with no server configured the site nothing here requires the game to exist, and with no server configured the site
renders normally and shows it offline. renders normally and shows it offline.
</p> </p>
</section> </section>
<section> <section>
<h3>It owns its own tables</h3> <h3>Each owns its own tables</h3>
<p> <p>
Its schema is applied by the site on every boot and its data is its own. The Its schema is applied by the site on every boot and its data is its own. A module
module declares which versions of the core interface it speaks — the site runs declares which versions of the core interface it speaks — the site runs
{' '}{platform.moduleApi} — and refuses to load against one it does not. {' '}{platform.moduleApi} — and refuses to load against one it does not.
</p> </p>
</section> </section>
<section> <section>
<h3>It is a separate release</h3> <h3>Each is a separate release</h3>
<p> <p>
Versioned, tagged and published on its own cadence, independently of the site. Versioned, tagged and published on its own cadence, independently of the site.
Upgrading one does not mean upgrading the other, as long as the declared interface Upgrading one does not mean upgrading the other, as long as the declared interface
range still holds. range still holds.
</p> </p>
</section> </section>
</div>
</div> </div>
</section> </section>
@@ -239,9 +245,6 @@ const installPaths = [
<a class="btn btn--ghost" href={`${docs}/website/MODULE_API.md`} rel="noopener noreferrer"> <a class="btn btn--ghost" href={`${docs}/website/MODULE_API.md`} rel="noopener noreferrer">
The module contract The module contract
</a> </a>
<a class="btn btn--ghost" href={`${docs}/modules/uo/README.md`} rel="noopener noreferrer">
module-uo in depth
</a>
</div> </div>
</section> </section>
@@ -287,7 +290,6 @@ const installPaths = [
.mod__grid h3, .mod__grid h3,
.mod__paths h3, .mod__paths h3,
.mod__caps h3,
.mod__facts h3, .mod__facts h3,
.mod__draft h3 { .mod__draft h3 {
margin: 0 0 0.5rem; margin: 0 0 0.5rem;
@@ -317,55 +319,53 @@ const installPaths = [
font-style: italic; font-style: italic;
} }
.mod__example { .mod__games {
display: grid; display: grid;
gap: 1rem; gap: 1rem;
margin-top: 2rem; margin: 2rem 0 0;
grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
align-items: start;
}
.mod__caps ul {
margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
}
.mod__game {
display: flex;
flex-direction: column;
}
.mod__game h3 {
margin: 0;
color: var(--gold);
font-size: 1.25rem;
}
.mod__game p {
margin: 0.75rem 0 0;
color: var(--muted);
font-size: 0.94rem; font-size: 0.94rem;
} }
.mod__caps li { .mod__game-links {
position: relative; display: flex;
padding-left: 1.1rem; flex-wrap: wrap;
color: var(--text); gap: 0.6rem;
margin-top: auto;
padding-top: 1.25rem;
} }
.mod__caps li + li { .mod__supported {
margin-top: 0.3rem; margin-top: 1.5rem;
} }
/* The same drawn marker the homepage's capability lists use, so a reader who has .mod__facts--shared {
seen this list once recognises it as the same list. */ display: grid;
.mod__caps li::before { gap: 1.4rem;
content: ''; margin-top: 2.25rem;
position: absolute; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
left: 0;
top: 0.62em;
width: 5px;
height: 5px;
border-radius: var(--radius-pill);
background: var(--portal);
opacity: 0.75;
} }
.mod__caps-note { .mod__facts--shared section + section {
margin: 1rem 0 0; margin-top: 0;
padding-top: 0.85rem;
border-top: 1px solid var(--line-soft);
color: var(--dim);
font-size: 0.85rem;
}
.mod__facts section + section {
margin-top: 1.4rem;
} }
.mod__facts p { .mod__facts p {
@@ -395,10 +395,4 @@ const installPaths = [
gap: 0.7rem; gap: 0.7rem;
margin-top: 1.75rem; margin-top: 1.75rem;
} }
@media (max-width: 860px) {
.mod__example {
grid-template-columns: minmax(0, 1fr);
}
}
</style> </style>

View File

@@ -0,0 +1,220 @@
---
import Base from '../../layouts/Base.astro';
import PageHeader from '../../components/PageHeader.astro';
import GameFeatures from '../../components/GameFeatures.astro';
import Screenshot from '../../components/Screenshot.astro';
import platform from '../../data/platform.json';
import { features, staffFeatures, screens, staffScreens } from '../../data/games/rust.mjs';
import { assertGameCoverage } from '../../data/games/index.mjs';
/**
* `/modules/rust/` — PLAN.md §16, phase 17.
*
* The Rust module's own page, in Rust's words (D63; `GAME_ROUTES` in `checkTerms.mjs`). The
* lists are `games/rust.mjs`, written from the Rust docs group that phase 15 walked, and the
* call below holds them to the capabilities `Module-Rust` declares — the page-side half of
* the coverage assertion phase 13 moved here.
*
* It carries the RunicNPC card D61 asked for, pointing at the standalone `/runicnpc/` page.
*
* The screenshots came in phase 18 (D65), from the Oxide rig: the public ones under what
* players see, the staff screens under what staff run. Each is tagged `rust` in `screens.mjs`.
*/
assertGameCoverage('rust');
const rust = platform.games.rust;
const pieces = [
{
role: 'The module',
name: rust.module.repo,
version: platform.releases['Module-Rust'],
what: 'Every Rust screen on the site, installed from Admin → Modules.',
},
{
role: 'The sidecar',
name: 'rust-link',
version: rust.bundle.sidecar,
what: 'One beside each server, and the only part of the bridge that listens on a network.',
},
{
role: 'The bridge plugin',
name: 'RunicGateway.cs',
version: rust.bundle.plugin,
what: 'One file that runs unchanged on Oxide and Carbon, plus its optional helpers.',
},
{
role: 'NPCs',
name: 'RunicNPC',
version: rust.bundle.runicnpc,
what: 'Our NPC plugin, which the bridge drives for every NPC an event places.',
},
];
const title = 'The Rust module';
const description =
'What the Rust module adds to a Runic Gateway site: every server live, the kill feed, ' +
'leaderboards per wipe, the live map, Steam linking, and permissions, mod config and events run from the site.';
---
<Base title={title} description={description}>
<PageHeader eyebrow="Game module" title="Rust">
<p>
The <code>rust</code> module turns a Runic Gateway site into a Rust community’s site. It
follows any number of servers, each running Oxide or Carbon with a sidecar of its own,
and keeps what each one tells it after the wipe has taken it from the game.
</p>
<p>
The server side is installed as one bundle — <strong>{rust.bundle.tag}</strong>,
speaking protocol {rust.protocol} — with the installer, from a Pterodactyl egg, or by
hand. It needs Oxide {rust.bundle.oxideMin} or Carbon {rust.bundle.carbonMin} or newer,
and the uMod plugins {rust.bundle.requiresPlugins.join(' and ')}.
</p>
</PageHeader>
<section class="page section pieces" aria-labelledby="pieces-heading">
<h2 id="pieces-heading">The pieces</h2>
<ul class="pieces__list">
{
pieces.map((piece) => (
<li class="panel">
<p class="pieces__role">{piece.role}</p>
<p class="pieces__name">
<code>{piece.name}</code>
<span class="chip chip--version">{piece.version}</span>
</p>
<p class="pieces__what">{piece.what}</p>
</li>
))
}
</ul>
</section>
<GameFeatures
game="rust"
title="What players see"
lede="Every public surface is the operator's to widen: nothing names a player to the public by default."
items={features}
/>
<section class="page section shots" aria-label="Screenshots of the public pages">
<p class="prose shots__note">
Captured from a demo site connected to a real Rust test server. The server, its status
and its map are that server's own; the players in the feed and the leaderboard are a
demo cast, named for their roles.
</p>
{screens.map((id) => <Screenshot id={id} />)}
</section>
<GameFeatures
game="rust"
title="What staff run from the site"
lede="Seven admin screens, and a Rust section on each user's page."
items={staffFeatures}
/>
<section class="page section shots" aria-label="Screenshots of the staff screens">
{staffScreens.map((id) => <Screenshot id={id} />)}
</section>
<section class="page section npc">
<div class="panel npc__card">
<p class="eyebrow">Also from this project</p>
<h2>RunicNPC</h2>
<p>
Our own NPC plugin for Rust: NPCs where you want them, with the kit, health, aim and
behaviour you give them — roamers, sentries, guards, quest-givers and bosses with
phases. On a Runic Gateway server it is required and the site authors its profiles;
on any other Rust server it runs on its own, with <code>/rnpc</code> commands and an
API for other plugins.
</p>
<div class="npc__links">
<a class="btn btn--primary" href="/runicnpc/">About RunicNPC</a>
<a class="btn btn--ghost" href="/docs/rust/runicnpc/">Its documentation</a>
</div>
</div>
</section>
<section class="page section next">
<h2>Setting it up</h2>
<p class="prose">
The documentation’s Rust group starts from installing the bridge and covers every admin
screen the module adds, with the reference for each file it reads.
</p>
<div class="next__links">
<a class="btn btn--primary" href="/docs/rust/">The Rust docs</a>
<a class="btn btn--ghost" href="/modules/">All modules</a>
</div>
</section>
</Base>
<style>
.shots__note {
margin: 0;
color: var(--muted);
}
.pieces h2,
.next h2 {
margin: 0 0 0.75rem;
font-size: clamp(1.5rem, 3vw, 1.95rem);
}
.pieces__list {
display: grid;
gap: 1rem;
margin: 1.25rem 0 0;
padding: 0;
list-style: none;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.pieces__role {
margin: 0;
color: var(--dim);
font-size: 0.78rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.pieces__name {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6rem;
margin: 0.5rem 0 0;
color: var(--gold);
}
.pieces__what {
margin: 0.6rem 0 0;
color: var(--muted);
font-size: 0.94rem;
}
.npc__card h2 {
margin: 0;
color: var(--gold);
font-size: clamp(1.4rem, 2.8vw, 1.8rem);
}
.npc__card p:not(.eyebrow) {
margin: 0.75rem 0 0;
max-width: var(--measure);
color: var(--muted);
}
.npc__links,
.next__links {
display: flex;
flex-wrap: wrap;
gap: 0.7rem;
margin-top: 1.5rem;
}
.next p {
margin: 0;
color: var(--muted);
}
</style>

166
src/pages/modules/uo.astro Normal file
View File

@@ -0,0 +1,166 @@
---
import Base from '../../layouts/Base.astro';
import PageHeader from '../../components/PageHeader.astro';
import GameFeatures from '../../components/GameFeatures.astro';
import Screenshot from '../../components/Screenshot.astro';
import platform from '../../data/platform.json';
import { features, screens } from '../../data/games/uo.mjs';
import { assertGameCoverage } from '../../data/games/index.mjs';
/**
* `/modules/uo/` — PLAN.md §16, phase 17.
*
* The Ultima Online module's own page, and so one of the few marketing pages that may use
* that game's words (D63; `GAME_ROUTES` in `checkTerms.mjs`). The feature list is
* `games/uo.mjs`, held to the module's declared capabilities by the call below, and the
* screenshots are the ones `/features/` showed until this phase — every one tagged with its
* game in `screens.mjs` (D67).
*
* Versions are read from `platform.json`, which `checkFacts.mjs` holds to the module's
* release, the installer's bundle and both halves of the bridge.
*/
assertGameCoverage('uo');
const uo = platform.games.uo;
const gitea = `${platform.gitea.base}/${platform.gitea.org}`;
const docs = `${gitea}/docs/src/branch/main`;
const pieces = [
{
role: 'The module',
name: uo.module.repo,
version: platform.releases['Module-uo'],
what: 'Every Ultima Online screen on the site, installed from Admin → Modules.',
},
{
role: 'The sidecar',
name: 'uo-link',
version: uo.bundle.sidecar,
what: 'Beside the shard, and the only part of the bridge that listens on a network.',
},
{
role: 'The bridge plugin',
name: uo.pluginRepo,
version: uo.bundle.overlay,
what: `An overlay compiled by ServUO at boot, on ServUO ${uo.bundle.servuoMin} or newer.`,
},
];
const title = 'The Ultima Online module';
const description =
'What the Ultima Online module adds to a Runic Gateway site: live shard status, the ' +
'player-vendor marketplace, the spawn atlas, guilds, houses and more, from a running ServUO shard.';
---
<Base title={title} description={description}>
<PageHeader eyebrow="Game module" title="Ultima Online">
<p>
The <code>uo</code> module turns a Runic Gateway site into an Ultima Online shard’s
site, fed live from a running ServUO shard. It was the first module, and the one the
seam was cut around: this support was extracted out of the site, and every URL it had
before the move it still has.
</p>
<p>
The shard side is installed with the installer as one bundle —
{' '}<strong>{uo.bundle.tag}</strong>, speaking protocol {uo.protocol} — and the site
side is a paste in the admin panel.
</p>
</PageHeader>
<section class="page section pieces" aria-labelledby="pieces-heading">
<h2 id="pieces-heading">The pieces</h2>
<ul class="pieces__list">
{
pieces.map((piece) => (
<li class="panel">
<p class="pieces__role">{piece.role}</p>
<p class="pieces__name">
<code>{piece.name}</code>
<span class="chip chip--version">{piece.version}</span>
</p>
<p class="pieces__what">{piece.what}</p>
</li>
))
}
</ul>
</section>
<GameFeatures
game="uo"
title="What it adds"
lede="Everything here is published from the live shard, and every public surface passes the visibility settings first — each one is the operator's to switch on."
items={features}
/>
<section class="page section shots" aria-label="Screenshots">
{screens.map((id) => <Screenshot id={id} />)}
</section>
<section class="page section next">
<h2>Setting it up</h2>
<p class="prose">
The documentation’s Ultima Online group starts from connecting a ServUO shard and ends
at the reference for every file the bridge reads.
</p>
<div class="next__links">
<a class="btn btn--primary" href="/docs/ultima-online/">The Ultima Online docs</a>
<a class="btn btn--ghost" href={`${docs}/modules/uo/README.md`} rel="noopener noreferrer">
The module in depth
</a>
<a class="btn btn--ghost" href="/modules/">All modules</a>
</div>
</section>
</Base>
<style>
.pieces h2,
.next h2 {
margin: 0 0 0.75rem;
font-size: clamp(1.5rem, 3vw, 1.95rem);
}
.pieces__list {
display: grid;
gap: 1rem;
margin: 1.25rem 0 0;
padding: 0;
list-style: none;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.pieces__role {
margin: 0;
color: var(--dim);
font-size: 0.78rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.pieces__name {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6rem;
margin: 0.5rem 0 0;
color: var(--gold);
}
.pieces__what {
margin: 0.6rem 0 0;
color: var(--muted);
font-size: 0.94rem;
}
.next p {
margin: 0;
color: var(--muted);
}
.next__links {
display: flex;
flex-wrap: wrap;
gap: 0.7rem;
margin-top: 1.5rem;
}
</style>

View File

@@ -66,6 +66,8 @@ const sections = [
'the app happens between your phone and their server, and there is no account with ' + 'the app happens between your phone and their server, and there is no account with ' +
'us, no service of ours in the middle, and no copy of anything on our side — because ' + 'us, no service of ours in the middle, and no copy of anything on our side — because ' +
'we do not operate one.', 'we do not operate one.',
/* The deletion page Play is given (D85). The app is where most people will look. */
link: { href: '/delete-account/', text: 'How to delete the account you use in the app' },
rows: collectedIn('app'), rows: collectedIn('app'),
}, },
{ {
@@ -79,6 +81,7 @@ const sections = [
'and their policy — this page is not it. What follows is an inventory of what the ' + 'and their policy — this page is not it. What follows is an inventory of what the ' +
'software collects, so that an operator can see plainly what they are taking on, ' + 'software collects, so that an operator can see plainly what they are taking on, ' +
'and a player can see what to ask their operator about.', 'and a player can see what to ask their operator about.',
link: { href: '/delete-account/', text: 'What deleting an account takes, and what it keeps' },
rows: collectedIn('deployment'), rows: collectedIn('deployment'),
}, },
]; ];
@@ -131,6 +134,11 @@ const sections = [
<h2>{section.heading}</h2> <h2>{section.heading}</h2>
<p class="legal-sec__who">{section.controller}</p> <p class="legal-sec__who">{section.controller}</p>
<p class="prose legal-sec__lede">{section.lede}</p> <p class="prose legal-sec__lede">{section.lede}</p>
{section.link && (
<p class="legal-sec__link">
<a href={section.link.href}>{section.link.text}</a>
</p>
)}
</div> </div>
<ul class="legal-rows"> <ul class="legal-rows">
@@ -304,6 +312,11 @@ const sections = [
color: var(--muted); color: var(--muted);
} }
.legal-sec__link {
margin: 0.75rem 0 0;
font-size: 0.95rem;
}
.legal-rows { .legal-rows {
display: grid; display: grid;
gap: 1rem; gap: 1rem;

238
src/pages/runicnpc.astro Normal file
View File

@@ -0,0 +1,238 @@
---
import Base from '../layouts/Base.astro';
import PageHeader from '../components/PageHeader.astro';
import platform from '../data/platform.json';
import { runicnpcCalls, runicnpcHooks } from '../data/runicnpc.mjs';
/**
* `/runicnpc/` — PLAN.md §16, D61, built in phase 17.
*
* The standalone page for RunicNPC, written for the owner of a Rust server who runs no
* Runic Gateway site at all and should be able to find and use the plugin without first
* learning what the platform is. It is in the header (D78) for the same reason. It may use
* Rust's words: it is one of the Rust routes in `checkTerms.mjs`.
*
* It says less than the docs subgroup (`/docs/rust/runicnpc/`), which phase 16 walked and
* drift-checked, and nothing that subgroup does not. Every number is read: the release and
* the API version and framework floors from `platform.json`, which `checkFacts.mjs` holds to
* `runicnpc-rust`'s own `plugin.toml`, and the counts of calls and hooks from
* `runicnpc.mjs`, which `checkReference.mjs` holds to `docs/runicnpc/API.md`.
*/
const npc = platform.runicnpc;
const release = platform.releases['runicnpc-rust'];
const repo = `${platform.gitea.base}/${platform.gitea.org}/runicnpc-rust`;
const calls = Object.keys(runicnpcCalls).length;
const hooks = Object.keys(runicnpcHooks).length;
const roles = [
{ name: 'Roamer', does: 'Moves, chases and fights.' },
{ name: 'Sentry', does: 'Stands still and shoots.' },
{ name: 'Guard', does: 'Holds its spot, chases within its leash, and walks back.' },
{
name: 'Passive',
does: 'Never fights. Pressing E says a line or opens a window — a quest-giver, a quartermaster.',
},
];
const title = 'RunicNPC';
const description =
'An NPC plugin for Rust on Oxide and Carbon: roamers, sentries, guards, quest-givers and ' +
'bosses with phases, placed in game or from a site, with an API for other plugins. Runs on any server.';
---
<Base title={title} description={description}>
<PageHeader eyebrow="A Rust plugin from this project" title="RunicNPC">
<p>
NPCs where you want them, with the kit, health, aim, ranges and behaviour you give them,
brought back after they die. One file, <code>RunicNPC.cs</code>, compiled by Oxide or
Carbon from source like any uMod plugin — and it runs on any Rust server, whether or not
a Runic Gateway site is anywhere near it.
</p>
</PageHeader>
<section class="page section facts" aria-label="At a glance">
<dl class="facts__list">
<div class="panel">
<dt>Release</dt>
<dd><span class="chip chip--version">{release}</span></dd>
</div>
<div class="panel">
<dt>Runs on</dt>
<dd>Oxide {npc.oxideMin} or Carbon {npc.carbonMin}, or newer</dd>
</div>
<div class="panel">
<dt>Needs</dt>
<dd>{npc.requiresPlugins.join(' and ')}. ZoneManager is optional.</dd>
</div>
<div class="panel">
<dt>API version</dt>
<dd>{npc.api} — {calls} calls and {hooks} hooks</dd>
</div>
</dl>
</section>
<section class="page section npc">
<h2>What it does</h2>
<ul class="npc__roles">
{
roles.map((role) => (
<li class="panel">
<h3>{role.name}</h3>
<p>{role.does}</p>
</li>
))
}
</ul>
<div class="npc__grid">
<section>
<h3>Bosses</h3>
<p>
Any role but passive can be a boss: a health bar at the top of the screen, phases as
its health falls, lines said in game, and loot of its own.
</p>
</section>
<section>
<h3>Placements and routes</h3>
<p>
A placement is a spot where a profile’s NPCs stand and come back after they die. It
survives a restart; the NPCs themselves are never saved, and each boot spawns fresh ones. A
route is a line of points you record in game for an NPC to walk.
</p>
</section>
<section>
<h3>Factions</h3>
<p>
With no settings an NPC fights players only. Profiles can be put on sides, turned on
Rust’s scientists or its animals, or allied to a clan, a team or one player.
</p>
</section>
<section>
<h3>A cost it tells you</h3>
<p>
What NPCs cost a server was measured on both frameworks, not guessed, and the
warning saying so appears wherever NPCs are added. Caps are an operator’s setting.
</p>
</section>
</div>
</section>
<section class="page section ways">
<h2>Two ways to run it</h2>
<div class="ways__grid">
<div class="panel">
<h3>On its own</h3>
<p>
Place NPCs in game with <code>/rnpc</code>, edit their profiles at the console, and
let other plugins drive it through its API. Nothing else is needed. It makes no
network call, downloads nothing and scans nothing at boot.
</p>
</div>
<div class="panel">
<h3>On a Runic Gateway server</h3>
<p>
It is required there, and installed with the bridge from the same bundle. The site
authors the profiles and the faction table and pushes them to each server, places
NPCs from its live map, and runs events that place them and wait on them dying
or on a boss’s health.
</p>
</div>
</div>
</section>
<section class="page section next">
<h2>Get it</h2>
<p class="prose">
Releases carry the plugin file. The documentation covers installing it by hand, every
command, every profile field, and the API in full for plugin authors.
</p>
<div class="next__links">
<a class="btn btn--primary" href={`${repo}/releases`} rel="noopener noreferrer">
Download {release}
</a>
<a class="btn btn--ghost" href="/docs/rust/runicnpc/install/">Install it</a>
<a class="btn btn--ghost" href="/docs/rust/runicnpc/commands/">Commands</a>
<a class="btn btn--ghost" href="/docs/rust/runicnpc/api/">The API</a>
<a class="btn btn--ghost" href="/modules/rust/">The Rust module</a>
</div>
</section>
</Base>
<style>
.npc h2,
.ways h2,
.next h2 {
margin: 0 0 0.75rem;
font-size: clamp(1.5rem, 3vw, 1.95rem);
}
.facts__list {
display: grid;
gap: 1rem;
margin: 0;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.facts__list dt {
color: var(--dim);
font-size: 0.78rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.facts__list dd {
margin: 0.5rem 0 0;
color: var(--text);
}
.npc__roles,
.ways__grid {
display: grid;
gap: 1rem;
margin: 1.25rem 0 0;
padding: 0;
list-style: none;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.ways__grid {
grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.npc__roles h3,
.ways__grid h3,
.npc__grid h3 {
margin: 0 0 0.5rem;
color: var(--gold);
font-size: 1.02rem;
}
.npc__roles p,
.ways__grid p,
.npc__grid p {
margin: 0;
color: var(--muted);
font-size: 0.94rem;
}
.npc__grid {
display: grid;
gap: 1.4rem;
margin-top: 2rem;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.next p {
margin: 0;
color: var(--muted);
}
.next__links {
display: flex;
flex-wrap: wrap;
gap: 0.7rem;
margin-top: 1.5rem;
}
</style>

View File

@@ -226,6 +226,7 @@ svg {
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
row-gap: 0.15rem; row-gap: 0.15rem;
column-gap: 0.5rem;
padding-block: 0.55rem; padding-block: 0.55rem;
min-height: 0; min-height: 0;
} }
@@ -236,12 +237,16 @@ svg {
gap: 0; gap: 0;
/* Pull the first link's own padding back to the gutter so the row of links /* Pull the first link's own padding back to the gutter so the row of links
lines up with the lockup above it rather than sitting indented. */ lines up with the lockup above it rather than sitting indented. */
margin-left: -0.45rem; margin-left: -0.3rem;
} }
/* Five links since phase 17 (D78, RunicNPC). Measured at 390px, the fifth pushed Search
onto a third row: the links ended at 326px, and the row's 24px gap plus the 32px
button needed 382 of the 366 available. A tighter gap, padding and type put all of it
back on the second row with room to spare, and every link still clears a 24px target. */
.site-nav a { .site-nav a {
padding-inline: 0.45rem; padding-inline: 0.3rem;
font-size: 0.86rem; font-size: 0.84rem;
} }
/* Search (D47) shares the second row with the links rather than taking a third. `order` /* Search (D47) shares the second row with the links rather than taking a third. `order`

208
test/demo.test.mjs Normal file
View File

@@ -0,0 +1,208 @@
/**
* The public demo's two hooks into this site (D82, D83).
*
* `demoLogins.mjs` decides what `/beta` prints from an answer it does not control, so its
* shape checks and its failure path are tested here rather than trusted. `applyBrand.mjs`
* decides which "See it running" links point anywhere, and the failure it guards against
* (a Rust demo linked to `/uo/` pages) is invisible in a build that has no demo mounted, so
* it is run here against a scratch build that does.
*/
import assert from 'node:assert/strict';
import { execFileSync } from 'node:child_process';
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { after, beforeEach, describe, it } from 'node:test';
import { demoLogins, readDemo, resetDemoLoginsCache, resetTime } from '../src/lib/demoLogins.mjs';
const ROOT = fileURLToPath(new URL('..', import.meta.url));
const LOGINS = [
{ username: 'demo-admin', password: 'pw-a', role: 'admin' },
{ username: 'demo-player', password: 'pw-p', role: 'player' },
];
const answer = (body, status = 200) => async () => ({
ok: status >= 200 && status < 300,
status,
json: async () => body,
});
describe('readDemo', () => {
it('keeps the logins and normalises the reset time', () => {
const read = readDemo({ demo: { resetsAt: '2026-10-28T22:00:00.000Z', logins: LOGINS } });
assert.deepEqual(read, { logins: LOGINS, resetsAt: '2026-10-28T22:00:00.000Z' });
assert.equal(resetTime(read.resetsAt), '22:00 UTC');
});
it('answers null for a site that is not in demo mode', () => {
assert.equal(readDemo({ site_mode: 'live' }), null);
assert.equal(readDemo(null), null);
assert.equal(readDemo({ demo: { logins: [] } }), null);
});
it('drops malformed rows, extra fields and an unreadable time', () => {
const read = readDemo({
demo: {
resetsAt: 'soon',
logins: [
{ username: 'demo-admin', password: 'pw-a', role: 'admin', token: 'x' },
{ username: 'x'.repeat(65), password: 'pw', role: 'admin' },
{ username: 'demo-player', password: 42, role: 'player' },
'demo-moderator',
],
},
});
assert.deepEqual(read, { logins: [LOGINS[0]], resetsAt: null });
assert.equal(resetTime(read.resetsAt), null);
});
it('shows at most eight', () => {
const many = Array.from({ length: 12 }, (_, i) => ({ username: `u${i}`, password: 'p', role: 'player' }));
assert.equal(readDemo({ demo: { logins: many } }).logins.length, 8);
});
});
describe('demoLogins', () => {
beforeEach(() => resetDemoLoginsCache());
it('reads the public settings route under the demo URL, without its trailing slash', async () => {
let asked = null;
const fetchImpl = async (url) => {
asked = url;
return answer({ demo: { logins: LOGINS } })();
};
const read = await demoLogins('https://demo.example.test/', { fetchImpl });
assert.equal(asked, 'https://demo.example.test/api/v1/public/settings');
assert.deepEqual(read.logins, LOGINS);
});
it('caches an answer for a minute', async () => {
let calls = 0;
let clock = 1_000;
const fetchImpl = async () => {
calls++;
return answer({ demo: { logins: LOGINS } })();
};
const options = { fetchImpl, now: () => clock };
await demoLogins('https://demo.example.test', options);
clock += 59_000;
await demoLogins('https://demo.example.test', options);
assert.equal(calls, 1);
clock += 2_000;
await demoLogins('https://demo.example.test', options);
assert.equal(calls, 2);
});
it('answers null when the demo is down, and asks again sooner', async () => {
let calls = 0;
let clock = 1_000;
const fetchImpl = async () => {
calls++;
throw new Error('connect ECONNREFUSED');
};
const options = { fetchImpl, now: () => clock };
assert.equal(await demoLogins('https://demo.example.test', options), null);
clock += 10_000;
assert.equal(await demoLogins('https://demo.example.test', options), null);
assert.equal(calls, 1);
clock += 6_000;
await demoLogins('https://demo.example.test', options);
assert.equal(calls, 2);
});
it('answers null for an error status and for a non-web URL', async () => {
assert.equal(await demoLogins('https://demo.example.test', { fetchImpl: answer({}, 502) }), null);
resetDemoLoginsCache();
let called = false;
const fetchImpl = async () => {
called = true;
return answer({ demo: { logins: LOGINS } })();
};
assert.equal(await demoLogins('file:///etc/passwd', { fetchImpl }), null);
assert.equal(await demoLogins('not a url', { fetchImpl }), null);
assert.equal(called, false);
});
it('shares one request between renders that arrive together', async () => {
let calls = 0;
const fetchImpl = async () => {
calls++;
await new Promise((resolve) => setTimeout(resolve, 20));
return answer({ demo: { logins: LOGINS } })();
};
const [a, b] = await Promise.all([
demoLogins('https://demo.example.test', { fetchImpl }),
demoLogins('https://demo.example.test', { fetchImpl }),
]);
assert.equal(calls, 1);
assert.deepEqual(a, b);
});
});
describe('applyBrand: which demo links point anywhere (D83)', () => {
const scratch = fs.mkdtempSync(path.join(os.tmpdir(), 'rg-demo-brand-'));
const dist = path.join(scratch, 'dist');
const mount = path.join(scratch, 'brand');
const page = path.join(dist, 'client', 'index.html');
// The four shapes a build writes: the homepage slot, a core deep link, and a link into
// each game's pages. Same attribute order as the templates; checkBrand.mjs holds them to it.
const STOCK =
'<a class="btn demo-cta" href="" data-demo-url="">See it running</a>\n' +
'<a class="demo-link" href="" data-demo-url="" data-demo-path="/wiki" rel="noopener">w</a>\n' +
'<a class="demo-link" href="" data-demo-url="" data-demo-path="/rust/servers/demo?tab=map" data-demo-game="rust" rel="noopener">r</a>\n' +
'<a class="demo-link" href="" data-demo-url="" data-demo-path="/uo/market" data-demo-game="uo" rel="noopener">u</a>\n';
fs.mkdirSync(path.dirname(page), { recursive: true });
fs.mkdirSync(mount, { recursive: true });
fs.writeFileSync(page, STOCK);
const apply = (brand) => {
fs.writeFileSync(path.join(mount, 'brand.json'), JSON.stringify(brand));
execFileSync(process.execPath, [path.join(ROOT, 'scripts/applyBrand.mjs')], {
env: {
...process.env,
BRAND_DIST: dist,
BRAND_DIR: mount,
BRAND_DEFAULT_DIR: path.join(ROOT, 'brand-default'),
},
stdio: 'pipe',
});
return fs.readFileSync(page, 'utf8');
};
const hrefOf = (html, marker) => html.split('\n').find((line) => line.includes(marker)).match(/href="([^"]*)"/)[1];
after(() => fs.rmSync(scratch, { recursive: true, force: true }));
it('fills the slot, core links and the listed game only', () => {
const html = apply({ demoUrl: 'https://demo.example.test', demoGames: ['rust'] });
assert.equal(hrefOf(html, 'demo-cta'), 'https://demo.example.test');
assert.equal(hrefOf(html, '/wiki'), 'https://demo.example.test/wiki');
assert.equal(hrefOf(html, 'tab=map'), 'https://demo.example.test/rust/servers/demo?tab=map');
assert.equal(hrefOf(html, '/uo/market'), '');
assert.match(html, /data-demo-path="\/uo\/market" data-demo-game="uo"/);
});
it('hides a game link again when only demoGames changes', () => {
const html = apply({ demoUrl: 'https://demo.example.test', demoGames: [] });
assert.equal(hrefOf(html, 'tab=map'), '');
assert.equal(hrefOf(html, '/wiki'), 'https://demo.example.test/wiki');
});
it('treats a malformed demoGames as no games', () => {
apply({ demoUrl: 'https://demo.example.test', demoGames: ['rust'] });
const html = apply({ demoUrl: 'https://demo.example.test', demoGames: 'rust' });
assert.equal(hrefOf(html, 'tab=map'), '');
});
it('returns to the stock markup when the demo is unmounted', () => {
apply({ demoUrl: 'https://demo.example.test', demoGames: ['rust', 'uo'] });
const html = apply({});
assert.equal(html, STOCK);
});
});

View File

@@ -12,8 +12,9 @@
* as "we keep this forever" or "we keep nothing", depending on the reader; * as "we keep this forever" or "we keep nothing", depending on the reader;
* - an `app`-scoped row with no Play mapping means a question on the console form gets * - an `app`-scoped row with no Play mapping means a question on the console form gets
* answered from memory, which is the exact failure D33 exists to prevent; * answered from memory, which is the exact failure D33 exists to prevent;
* - a row that claims we collect or share something contradicts the premise the whole * - a row that claims the app shares something contradicts the premise the whole page
* page rests on, and would be a real disclosure defect rather than a typo; * rests on, and would be a real disclosure defect rather than a typo;
* - a data type that is not the console's own, which the form then never asks about;
* - the consent sentence and /terms stating different minimum ages, which is the kind of * - the consent sentence and /terms stating different minimum ages, which is the kind of
* inconsistency a reviewer finds and a developer never does. * inconsistency a reviewer finds and a developer never does.
* *
@@ -32,6 +33,9 @@ import {
assertScopeNonEmpty, assertScopeNonEmpty,
collected, collected,
collectedIn, collectedIn,
deletionRow,
PLAY_DATA_TYPES,
PLAY_PURPOSES,
playRows, playRows,
} from '../src/data/collection.mjs'; } from '../src/data/collection.mjs';
import { legal } from '../src/data/legal.mjs'; import { legal } from '../src/data/legal.mjs';
@@ -74,38 +78,102 @@ describe('the Play Data Safety mapping', () => {
it('answers every mapped question completely', () => { it('answers every mapped question completely', () => {
for (const row of playRows()) { for (const row of playRows()) {
const { category, type, answer, because, collected: isCollected, shared } = row.play; const { types, answer, because, collected: isCollected, shared } = row.play;
assert.ok(category?.trim() && type?.trim(), `${row.id} has no console category/type`); assert.ok(Array.isArray(types), `${row.id}.play.types is not a list`);
assert.ok(answer?.trim() && because?.trim(), `${row.id} has no answer or reasoning`); assert.ok(answer?.trim() && because?.trim(), `${row.id} has no answer or reasoning`);
assert.equal(typeof isCollected, 'boolean', `${row.id}.play.collected is not a boolean`); assert.equal(typeof isCollected, 'boolean', `${row.id}.play.collected is not a boolean`);
assert.equal(typeof shared, 'boolean', `${row.id}.play.shared is not a boolean`); assert.equal(typeof shared, 'boolean', `${row.id}.play.shared is not a boolean`);
} }
}); });
/*
* The console's own words, or nothing. A type filed under the wrong category reads fine
* in the generated table and is simply not on the form, so whoever fills it in either
* skips it or guesses where it went.
*/
it('uses only the console’s categories, types and purposes', () => {
for (const row of playRows()) {
for (const { category, type } of row.play.types) {
assert.ok(PLAY_DATA_TYPES[category], `${row.id}: "${category}" is not a console category`);
assert.ok(
PLAY_DATA_TYPES[category].includes(type),
`${row.id}: "${type}" is not a data type under "${category}"`
);
}
for (const purpose of row.play.purposes ?? []) {
assert.ok(PLAY_PURPOSES.includes(purpose), `${row.id}: "${purpose}" is not a console purpose`);
}
}
});
/*
* The form asks three more questions of every collected type, and a collected row with
* no type is data leaving the phone that the form never hears about.
*/
it('answers the follow-up questions for everything collected', () => {
for (const row of playRows().filter((r) => r.play.collected)) {
assert.ok(row.play.types.length, `${row.id} is collected but names no console type`);
assert.equal(typeof row.play.required, 'boolean', `${row.id}.play.required is not a boolean`);
assert.ok(row.play.purposes?.length, `${row.id} is collected but gives no purpose`);
}
});
/* /*
* The one assertion here that is about the product rather than the shape of the data. * The one assertion here that is about the product rather than the shape of the data.
* *
* "We operate no server the app talks to" is the premise of /privacy section 2, of the * What the app sends is collected in Play's sense, and declared so: it leaves the phone
* generated declaration, and of the argument for why the app needs no account with us. * for the deployment the user chose. What stays true is the premise of /privacy section 2,
* If that ever stops being true — a telemetry endpoint, a crash reporter, a hosted * that none of it reaches us and none of it is handed on. A row that says otherwise — a
* directory of deployments — the honest change is a `collected: true` row AND a rewrite * telemetry endpoint, a crash reporter, a hosted directory of deployments — means that
* of the page's second section. This test makes the first impossible without noticing * premise has changed, and the page has to change with it rather than gaining a row that
* the second, by failing with the reason rather than the diff. * contradicts its own lede.
*/ */
it('holds the premise the whole section rests on', () => { it('holds the premise the whole section rests on', () => {
for (const row of playRows()) { for (const row of playRows()) {
assert.equal( assert.equal(
row.play.collected, row.play.shared,
false, false,
`${row.id} says we collect it. If that is now true, /privacy section 2's premise — ` + `${row.id} says the app shares it. If that is now true, /privacy section 2's ` +
'that we operate no server the app talks to — has changed, and the page has to ' + 'premise — that the app talks only to the deployment the user chose — has changed.'
'change with it rather than gaining a row that contradicts its own lede.'
); );
assert.equal(row.play.shared, false, `${row.id} says we share it — see above.`);
} }
}); });
}); });
/*
* `/delete-account/` is the address Google Play is given (ACCOUNT_DELETION.md §4.5), and
* Play asks two things of it that render fine when missing: what is deleted, and how long
* what stays is kept. A `stays` entry with no `keep` is a card with no answer to the
* second question.
*/
describe('the account-deletion row', () => {
it('exists exactly once, in the deployment scope', () => {
const row = deletionRow();
assert.equal(row.scope, 'deployment', 'the deletion row is about a deployment, not about us');
});
it('says what goes and what stays, with how long for each', () => {
const { goes, stays, staff } = deletionRow().deletion;
assert.ok(goes.length, 'the deletion row names nothing deleted');
assert.ok(stays.length, 'the deletion row names nothing kept');
for (const entry of stays) {
assert.ok(entry.what?.trim(), 'a kept entry says nothing about what is kept');
assert.ok(entry.keep?.trim(), `"${entry.what}" does not say how long it is kept`);
}
assert.ok(staff?.trim(), 'the staff note (AD9) is missing');
});
/*
* AD5 in test form: members see "[deleted player]", the wording the website and the app
* render. A page that named a different placeholder would describe a product that does
* not exist.
*/
it('names the placeholder members see', () => {
const text = deletionRow().deletion.stays.map((entry) => entry.what).join(' ');
assert.match(text, /“\[deleted player\]”/);
});
});
describe('the minimum age', () => { describe('the minimum age', () => {
it('is stated in the consent sentence the row records', () => { it('is stated in the consent sentence the row records', () => {
assert.match( assert.match(