32 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
ec65b2d5aa Merge pull request 'feat(docs): phase 16 — the RunicNPC subgroup, its API carried in full and drift-checked' (#37) from feat/phase-16-runicnpc into main
All checks were successful
Build and publish the image / build (push) Successful in 2m32s
PR checks / checks (push) Successful in 2m52s
Build and publish the image / deploy (push) Successful in 34s
Reviewed-on: #37
2026-10-22 21:07:54 +00:00
297cc83db5 docs(plan): record the Oxide floor ruling and the API.md table fix
All checks were successful
PR checks / checks (pull_request) Successful in 8m36s
The bundle's Oxide 2.0.7585 is the original compatible version and stays
until the CI staging drill reports an issue (org lead, 2026-10-22). The
API.md table break is fixed in docs #371.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-22 16:02:40 -05:00
ecc556d7ac feat(docs): phase 16 - the RunicNPC subgroup, its API carried in full and drift-checked
All checks were successful
PR checks / checks (pull_request) Successful in 2m11s
PLAN.md §16 phase 16, with the org lead's D72-D74 (count of record 74).

- Eight pages nested in the Rust group at /docs/rust/runicnpc/ (D72): the
  overview, Install RunicNPC, Commands, NPC profiles, NPC placements, Cost and
  caps, Profile fields (the one field reference the editor, rnpc.profile set,
  the data file and the API all share) and The API.
- The API page carries every call, hook and data shape (D62), in the site's
  own words, with no decision numbers and no per-call version history (D74).
  Signatures print from src/data/runicnpc.mjs through Signature.astro.
- checkReference.mjs gains two sections. Against docs main:runicnpc/API.md:
  the API version, 24 call and 10 hook signatures, and the field names of the
  profile, RunicNpc_List rows, placements, routes and owners (D73), plus
  exactly one <Signature> per call on api.mdx. Against runicnpc-rust
  main:plugin/RunicNPC.cs: console verbs, permissions, place options and
  config keys. Six planted drifts all failed before it was trusted.
- checkSidebar and checkTerms read nested sidebar groups via flatLabels().
- The Rust overview, Events zones and rewards, and Canonical documents link
  the new pages; the canonical documents gain the four runicnpc/ docs.

Both NPC admin screens were walked on the walk site first (D36); nothing was
saved. npm run verify is green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
2026-10-22 15:49:07 -05:00
83 changed files with 6672 additions and 721 deletions

View File

@@ -157,6 +157,21 @@ jobs:
docker push "${IMAGE}:latest"
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
if: always()
run: docker logout "${REGISTRY}" || true
@@ -207,3 +222,11 @@ jobs:
echo "::error::The site did not become healthy within 150s."
docker compose logs --tail 100 site
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
uses: actions/setup-node@v4
with:
node-version: '22'
node-version: '22.23.4'
cache: npm
- name: Install
@@ -115,6 +115,17 @@ jobs:
# fails because some other host is slow is a check people learn to ignore.
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
# 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.

View File

@@ -244,7 +244,7 @@ recolours the site and leaves every logo alone. `PLAN.md` §7 is the full accoun
```
brand/
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
ratios, install icons, apple-touch, favicons, a real .ico — is
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
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:
```bash

View File

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

384
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. |
| **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. |
| **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. |
**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
somewhere other than the thing it decided. The count of record is **seventy-one**:
somewhere other than the thing it decided. The count of record is **eighty-four**:
| # | Where | What it settled |
|---|---|---|
@@ -259,6 +259,12 @@ somewhere other than the thing it decided. The count of record is **seventy-one*
| D67 | §16, "One rule the phases need" | A screenshot belongs to its game: a capture tagged with a game may carry its words, beside the game's name |
| 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 |
| 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 |
---
@@ -950,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
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.
*(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.**
@@ -1064,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
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
`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
@@ -1089,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) |
| `/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 |
| `/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:
@@ -1674,8 +1728,10 @@ a mechanism rather than diligence:
- **`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
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
`src/`.
`<GameExample>` block (D68). Reads the docs and both sidebar trees before the build; since
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.
---
@@ -1803,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
uo-link sidecar and a real ServUO shard — so an evaluator clicks one link and sees the actual
@@ -2172,6 +2275,275 @@ same day, each in its own repository's PR into `edge`:
helpers**; the bundle ships three. The org lead approved a separate `docs` PR for these:
`docs` #370.
### How phase 16 built it
Three decisions, taken by the org lead on 2026-10-22 before any page was written. The count of
record is now **seventy-four**.
**D72 — the RunicNPC subgroup is eight pages, one of them a shared profile-field reference.** D61
named five topics. The subgroup sits at the end of the Rust group, nested, at
`/docs/rust/runicnpc/`: *RunicNPC* (the overview), *Install RunicNPC*, *Commands*, *NPC profiles*,
*NPC placements*, *Cost and caps*, *Profile fields* and *The API*. The site's two NPC screens get a
page each, as the Rust group's screens do, and the cost warning and caps get their own page rather
than a section of *Install*. ***Profile fields* is the one page every way of writing a profile
links to**: the site's editor (whose sections it follows, with each field's label), `rnpc.profile
set` (which takes the same JSON paths), the data file, and the API. So the API page shows calls,
hooks, placements and routes, and links there for a profile's shape rather than repeating it. The
alternatives were D61's five pages, and seven without the shared reference.
**D73 — the API check compares signatures and field names.** D62 named calls, hooks and
signatures. The check also compares the field names of every data shape `API.md` gives: a
profile's fields, `RunicNpc_List`'s keys, a placement's keys, a route's keys, and the owners. A
field added to the profile upstream turns this site red the same way a new call does. The
alternative, calls and hooks only, would have let the largest and most-changed shape drift
unnoticed.
**D74 — the site's API page carries the current API only.** `API.md` explains itself with decision
numbers (*D258, D269*) and plan stages, and tags each call with the API version that added it. The
site page drops both. Decision numbers mean nothing to a plugin author outside this project — the
reason `Module-Rust` #59 removed them from the admin screens — and the version history is
`API.md`'s to keep. The page states the current API version, read from `platform.json`, and shows
how to check it before calling. The alternatives were keeping the "since API n" tags, and copying
`API.md` faithfully, decision numbers included.
**The drift check is two sections of `checkReference.mjs`**, so the count of checks stays at
twelve, as the plan said:
- **Against `docs` `main:runicnpc/API.md`**, through the `contents` endpoint: the API version
against `platform.json`; all 24 calls by whole signature, parsed from their headings; all 10
hooks by signature, from their table; and the field names of the five shapes (D73). A profile
field cell that names two fields (`hurtByPlayers`, `hurtsPlayers`), or a bare name after a dotted
one (`phases[].damageDealt`, `aimCone`), is read the way a person reads it. And the page itself:
every call must have exactly one `<Signature call="…" />` on `api.mdx`, so "carried in full" is
held by the build, not by whoever last edited the page.
- **Against `runicnpc-rust` `main:plugin/RunicNPC.cs`**: the console verbs it registers, the
permissions it registers (and that every command's permission is one of them), the `key=`
options `ParseOptions` accepts, and the JSON keys of its config classes. These are names on the
*Commands* and *Cost and caps* pages, and §12 has checked every name the Reference pages write
since phase 8. D62 did not ask for this half; it is the phase-15 precedent (the bridge plugin's
`RunicGateway.json` is read from its source the same way) applied to the two new pages that list
names.
Signatures print from `src/data/runicnpc.mjs` through `src/components/Signature.astro`, which
renders them with Starlight's `<Code>`, so the signature a reader copies is the one the check
compared. Descriptions live beside them as short strings, written in the site's words, and
`src/components/Ticks.astro` renders their backticks, bold and links — never HTML. Before the check
was trusted, six drifts were planted: a parameter added to a call, a hook renamed, a `RunicNpc_List`
key renamed, a profile field renamed, a command verb renamed, and one call's `<Signature>` removed
from the page. All six failed, each naming the side it broke.
**The sidebar check learned nested groups.** `checkSidebar.mjs` and `checkTerms.mjs` read both
trees through `flatLabels()` in `sidebar.mjs`, which writes a nested page as `RunicNPC › Commands`.
The plan's order, and its vocabulary, are held for a subgroup exactly as for a group.
**Every admin screen was walked first** (D36), signed in as the walk admin on the walk site against
both rigs: *Rust NPC profiles* (the servers with their RunicNPC version, API and last push; the
profile list; the faction table; the editor opened on a new profile, through every section) and
*Rust NPC placements* (the server picker, the map with its layers, a waiting placement whose
profile had gone, and the cost warning above the list). Nothing was saved. Two claims were then
checked in `Module-Rust`'s server before they were written: the push tick is 30 s with a
quarter-hourly audit (`npcSync.js`), and saving a profile asks every covered server that answers
for its kits.
**What else changed.** The Rust overview's staff table links the two NPC screens to their pages,
and its "In this group" table gains the subgroup. *Events, zones and rewards* links its *Place
NPCs* step to the profiles page. The canonical documents gain `runicnpc/API.md`, `COMMANDS.md`,
`INSTALL.md` and `PLAN.md` under Rust, and that page now names the API page as the one deliberate
exception to "every page links out".
**Two findings outside this repository**, reported in the PR:
- **The Rust bundle's Oxide floor is lower than RunicNPC's — and that is intended.**
`v2/rust/current.json` says Oxide 2.0.7585, the bridge plugin's floor, while RunicNPC's own
`plugin.toml` says 2.0.7726. The org lead ruled on 2026-10-22 that **2.0.7585 is the original
compatible version and stays**. It moves only when the CI staging drill reports an issue, and then
as part of the update that fixes it. The site states each number where it belongs (the Rust
overview quotes the bundle's, the RunicNPC pages RunicNPC's) and claims nothing about the gap.
- **`API.md`'s profile table broke in two places.** The `boss` rows and the `loot` rows each
followed a blank line with no header row, so Gitea rendered them as plain text full of pipes.
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.
### 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

View File

@@ -1,7 +1,7 @@
<!--
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
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.
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 |
|---|---|---|---|---|
| Personal info | User IDs | No | No | Not collected by us. |
| 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. |
| 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. |
| Messages | Other user-generated content | No | No | Not collected by us. |
| Messages | Other in-app messages | No | No | Not collected by us. Stored on the device only. |
| Device or other IDs | Device or other IDs | No | No | Not collected. |
## Data types the app collects
| Category | Data type | Collected | Shared | Required | Purposes | From |
|---|---|---|---|---|---|---|
| Personal info | Name | Yes | No | Yes | App functionality | Your name, email address and message, if you use Contact |
| Personal info | Email address | Yes | No | Yes | App functionality | Your name, email address and message, if you use Contact |
| 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 | Yes | No | Yes | App functionality | Your name, email address and message, if you use Contact; What you post and send from the app |
| 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
### 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.
- **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`
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.
### 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
- **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.
- **Read from:** `core/auth/EncryptedTrustTokenStore.kt`
- **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, 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
**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.
@@ -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
**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.
- **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.
- **Retention:** Until you turn push off, sign out, 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.
- **Read from:** `core/push/NtfyTopic.kt, core/push/PushPreferences.kt`
- **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, delete the account, or uninstall
- **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, 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
- **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
**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.
- **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.
- **Retention:** Until you sign out, 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.
- **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 delete the account, or the thirty are pushed out by newer ones
- **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`
### 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.
- **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
- **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.
- **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.
- **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).
- **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`.
- **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
@@ -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.
- **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
```
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
@@ -56,7 +56,7 @@ that would otherwise decay quietly.
```bash
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:tokens # no colour literal outside the token file
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 run build # everything below reads the build
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:quickstart # the install page still matches website's own files
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
Play Data Safety notes are generated from it — one inventory.
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/global.css The layout shell, built entirely from tokens.
styles/starlight.css Restates our tokens as Starlight's, so the docs cannot drift.
layouts/, components/ The marketing chrome.
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.
content/docs/docs/ Documentation. The extra level mounts Starlight at /docs.
pages/brand/ GET /brand/* — the mount, resolved and derived. Runs per request.

View File

@@ -23,13 +23,22 @@
"giteaOrg": "https://gitea.whitlocktech.com/RunicGateway",
"$comment_demo": [
"§15 / D12. A public demo instance is planned and out of scope today. The homepage's",
"'See it running' slot and /features/'s per-capability affordance render only when this",
"is a non-empty URL, so the site gains a working demo by way of one line in a mounted",
"file — no rebuild, consistent with §7."
"§15 / D12. The public demo's address, e.g. https://demo.runicgateway.com. The",
"homepage's 'See it running' slot and /features/'s per-capability affordance render only",
"when this is a non-empty URL, so the site gains a working demo by way of one line in a",
"mounted file — no rebuild, consistent with §7. /beta also reads the demo's published",
"sign-ins from it, on the next request (D82)."
],
"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": [
"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.",

View File

@@ -23,16 +23,17 @@
"check:reference": "node scripts/checkReference.mjs",
"check:sidebar": "node scripts/checkSidebar.mjs",
"check:terms": "node scripts/checkTerms.mjs",
"check:terms:built": "node scripts/checkTerms.mjs --built",
"check:screens": "node scripts/checkScreens.mjs",
"check:a11y": "node scripts/checkA11y.mjs",
"check:csp": "node scripts/checkCsp.mjs",
"play:datasafety": "node scripts/playDataSafety.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",
"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",
"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"
},
"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
* 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 (
`href="${escapeHtml(href)}" data-demo-url="${escapeHtml(demoTo)}" ` +
`data-demo-path="${demoPath}"`
`href="${escapeHtml(href)}" data-demo-url="${escapeHtml(root)}" ` +
`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.');
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
// 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.
after = after.replace(DEEP_LINK, (whole, demoPath) => {
const rebuilt = deepLinkTo(demoPath);
after = after.replace(DEEP_LINK, (whole, demoPath, game) => {
const rebuilt = deepLinkTo(demoPath, game);
if (rebuilt !== whole) counts.set('demoDeep', counts.get('demoDeep') + 1);
return rebuilt;
});
@@ -330,6 +351,9 @@ if (counts.get('demoDeep')) {
` ${'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) {
console.error(

View File

@@ -138,6 +138,23 @@ for (const shot of todo) {
try {
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) {
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 { classify } from '../src/lib/brandAssets.mjs';
import { games } from '../src/data/games/index.mjs';
const ROOT = fileURLToPath(new URL('..', import.meta.url));
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
* 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 = [];
let deepLinks = 0;

View File

@@ -48,6 +48,19 @@ import {
rustPluginConfig,
rustEventKinds,
} from '../src/data/reference.mjs';
import {
runicnpcOwners,
runicnpcCalls,
runicnpcHooks,
runicnpcListKeys,
runicnpcPlacementKeys,
runicnpcRouteKeys,
runicnpcProfileFields,
runicnpcCommands,
runicnpcPermissions,
runicnpcPlaceOptions,
runicnpcConfig,
} from '../src/data/runicnpc.mjs';
const ROOT = fileURLToPath(new URL('..', import.meta.url));
const platform = JSON.parse(readFileSync(path.join(ROOT, 'src/data/platform.json'), 'utf8'));
@@ -150,6 +163,196 @@ function frozenListOf(source, name) {
return [...code.matchAll(/'([^'\n]+)'/g)].map((x) => x[1]);
}
/**
* One section of a Markdown document: from the line starting with `heading` to the next
* heading of the same or a higher level. Null when there is no such heading, which every
* caller reports — a section that silently vanished must not read as an empty one.
*/
function mdSection(md, heading) {
const lines = md.split(/\r?\n/);
const start = lines.findIndex((l) => l.startsWith(heading));
if (start < 0) return null;
const level = heading.match(/^#+/)[0].length;
const stop = new RegExp(`^#{1,${level}} `);
let end = lines.length;
for (let i = start + 1; i < lines.length; i++) {
if (stop.test(lines[i])) {
end = i;
break;
}
}
return lines.slice(start + 1, end).join('\n');
}
/** The backticked names in the first cell of every table row of a section. */
function firstCellNames(section) {
return section
.split('\n')
.filter((l) => l.startsWith('| `'))
.map((l) => [...l.split('|')[1].matchAll(/`([^`]+)`/g)].map((m) => m[1]));
}
const collapse = (s) => s.replace(/\s+/g, ' ').trim();
/** The top-level keys of the first ```json block in a section. */
function jsonKeysOf(section) {
const m = section?.match(/```json\s*\n([\s\S]*?)\n```/);
if (!m) return null;
try {
return Object.keys(JSON.parse(m[1]));
} catch {
return null;
}
}
async function checkRunicNpcApi(md) {
const hint = 'docs main:runicnpc/API.md';
// The version the specification describes, against the one platform.json quotes (and
// checkFacts holds to the plugin's own plugin.toml). Together they close the loop.
const version = Number(md.match(/\*\*API version (\d+)\*\*/)?.[1]);
if (version !== platform.runicnpc.api) {
fail('RunicNPC API version', `${hint} describes API ${version || '(none found)'}; platform.json says ${platform.runicnpc.api}`);
} else ok(`RunicNPC API version (${version})`);
// Calls: `### \`RunicNpc_X(params)\` → \`returns\`` headings, compared by whole signature.
const theirCalls = new Map(
[...md.matchAll(/^### `(RunicNpc_\w+)\(([^)]*)\)` → `([^`]+)`\s*$/gm)].map((m) => [m[1], collapse(`(${m[2]}) → ${m[3]}`)]),
);
const myCalls = new Map(Object.entries(runicnpcCalls).map(([n, c]) => [n, collapse(`(${c.params}) → ${c.returns}`)]));
compareSignatures('RunicNPC call', myCalls, theirCalls, hint);
// Hooks: the first cell of each row of "Hooks it raises".
const hooksSection = mdSection(md, '## Hooks it raises');
if (!hooksSection) fail('RunicNPC hooks', `no "## Hooks it raises" section in ${hint}`);
else {
const theirHooks = new Map(
[...hooksSection.matchAll(/^\| `(OnRunicNpc\w+)\(([^)]*)\)` \|/gm)].map((m) => [m[1], collapse(`(${m[2]})`)]),
);
const myHooks = new Map(Object.entries(runicnpcHooks).map(([n, h]) => [n, collapse(`(${h.params})`)]));
compareSignatures('RunicNPC hook', myHooks, theirHooks, hint);
}
// The data shapes, by field name (D73).
const shape = (label, heading, mine, read) => {
const section = mdSection(md, heading);
const theirs = section && read(section);
if (!theirs || theirs.length === 0) fail(label, `could not read the "${heading}" section of ${hint}`);
else compareSets(label, mine, theirs, `${hint} "${heading.replace(/^#+ /, '')}"`);
};
shape('RunicNPC owner', '## Owners', Object.keys(runicnpcOwners), (s) => firstCellNames(s).flat());
shape('RunicNpc_List key', '### `RunicNpc_List', Object.keys(runicnpcListKeys), (s) => firstCellNames(s).flat());
// A profile's fields. A cell may name several (`hurtByPlayers`, `hurtsPlayers`), and a bare
// name after a dotted one shares its prefix (`phases[].damageDealt`, `aimCone`).
shape(
'RunicNPC profile field',
'### A profile',
Object.values(runicnpcProfileFields).flatMap((group) => Object.keys(group)),
(s) =>
firstCellNames(s).flatMap(([first, ...rest]) => {
const prefix = first.includes('.') ? first.slice(0, first.lastIndexOf('.') + 1) : '';
return [first, ...rest.map((n) => (n.includes('.') ? n : prefix + n))];
}),
);
// A placement's keys: the example's, plus the optional ones its bullets introduce.
shape('RunicNPC placement key', '### A placement', Object.keys(runicnpcPlacementKeys), (s) => {
const keys = jsonKeysOf(s);
return keys && [...new Set([...keys, ...[...s.matchAll(/^- `(\w+)`/gm)].map((m) => m[1])])];
});
shape('RunicNPC route key', '### A route', Object.keys(runicnpcRouteKeys), jsonKeysOf);
// The page itself: every call has exactly one <Signature call="…" />, so "in full" is held
// by the build and not by whoever last edited api.mdx.
const page = readFileSync(path.join(ROOT, 'src/content/docs/docs/rust/runicnpc/api.mdx'), 'utf8');
const onPage = [...page.matchAll(/<Signature\s+call="(\w+)"/g)].map((m) => m[1]);
let covered = true;
for (const call of Object.keys(runicnpcCalls)) {
const n = onPage.filter((c) => c === call).length;
if (n !== 1) {
covered = false;
fail(`RunicNPC API page: ${call}`, `has ${n} <Signature call="${call}" /> on api.mdx — every call needs exactly one, with its prose`);
}
}
if (covered) ok(`RunicNPC API page covers every call (${onPage.length})`);
}
/** Compare name → signature maps: both directions by name, then each shared name by signature. */
function compareSignatures(label, mine, theirs, hint) {
compareSets(label, [...mine.keys()], [...theirs.keys()], hint);
let same = true;
for (const [name, sig] of mine) {
if (theirs.has(name) && theirs.get(name) !== sig) {
same = false;
fail(`${label} ${name}`, `signature differs — here "${sig}", ${hint} "${theirs.get(name)}"`);
}
}
if (same) ok(`${label} signatures (${mine.size})`);
}
/** The text of a C# method, by brace counting from the first brace after its name. */
function methodBody(source, name) {
const start = source.search(new RegExp(`\\b${name}\\s*\\(`));
if (start < 0) return null;
const open = source.indexOf('{', start);
let depth = 0;
for (let i = open; i < source.length; i++) {
if (source[i] === '{') depth++;
else if (source[i] === '}' && --depth === 0) return source.slice(open + 1, i);
}
return null;
}
function checkRunicNpcSource(cs) {
const hint = 'runicnpc-rust main:plugin/RunicNPC.cs';
// The verbs: every `rnpc.<verb>` console command. The chat command answers the same verbs.
compareSets(
'RunicNPC command',
[...new Set(Object.values(runicnpcCommands).flatMap((s) => Object.keys(s)).map((usage) => usage.split(' ')[0]))],
[...cs.matchAll(/\[ConsoleCommand\("rnpc\.(\w+)"\)\]/g)].map((m) => m[1]),
`${hint} [ConsoleCommand]`,
);
// A command's permission must be one the plugin registers.
const perms = [...cs.matchAll(/const\s+string\s+Perm\w+\s*=\s*"(runicnpc\.\w+)"/g)].map((m) => m[1]);
compareSets('RunicNPC permission', Object.keys(runicnpcPermissions), perms, `${hint} Perm constants`);
for (const [section, commands] of Object.entries(runicnpcCommands)) {
for (const [usage, c] of Object.entries(commands)) {
if (c.perm.startsWith('runicnpc.') && !perms.includes(c.perm)) {
fail(`RunicNPC command ${usage}`, `(${section}) needs "${c.perm}", which the plugin does not register`);
}
}
}
const options = methodBody(cs, 'ParseOptions');
if (!options) fail('RunicNPC place option', `could not find ParseOptions in ${hint}`);
else {
compareSets(
'RunicNPC place option',
Object.keys(runicnpcPlaceOptions),
[...options.matchAll(/case\s+"(\w+)":/g)].map((m) => m[1]),
`${hint} ParseOptions`,
);
}
// The config: `[JsonProperty("name")] public Type Field`, and a field whose type is another
// config class is a section, its keys written `section.key`.
const jsonKeys = (className, prefix = '') => {
const body = classBody(cs, className);
if (!body) return null;
return [...body.matchAll(/\[JsonProperty\("(\w+)"\)\]\s*public\s+(\w+)\s+\w+/g)].flatMap(([, key, type]) => {
const nested = /Config$/.test(type) ? jsonKeys(type, `${prefix}${key}.`) : null;
return nested ?? [`${prefix}${key}`];
});
};
const configKeys = jsonKeys('PluginConfig');
if (!configKeys) fail('RunicNPC.json', `could not find class PluginConfig in ${hint}`);
else compareSets('RunicNPC.json', Object.keys(runicnpcConfig), configKeys, `${hint} PluginConfig`);
}
async function run() {
if (!TOKEN) {
console.error('checkReference: GITEA_TOKEN is not set. This check cannot run anonymously.');
@@ -287,6 +490,21 @@ async function run() {
}
}
// ── 10. RunicNPC: the API, against its specification ──────────────────────
//
// PLAN.md §16, D62 and D73. The one place this site carries a contract in full rather than
// linking to it, so the one place it must be held to the contract most tightly: every call
// and hook by its whole signature, and every field name of every data shape, both ways.
// `docs` `main:runicnpc/API.md` is normative, so it is the authority, not the plugin source.
await checkRunicNpcApi(await raw('docs', 'runicnpc/API.md'));
// ── 11. RunicNPC: the commands, permissions, options and config ───────────
//
// Names, checked against the plugin's own source the way RunicGateway.json is (check 8):
// the console verbs it registers, the permissions it registers, the `key=` options
// `place` and `here` parse, and the JSON keys of its config classes.
checkRunicNpcSource(await raw('runicnpc-rust', 'plugin/RunicNPC.cs'));
// ── Report ────────────────────────────────────────────────────────────────
if (failures.length === 0) {
console.log(`checkReference: ${checked.length} enumeration check(s) passed against their sources.`);

View File

@@ -22,13 +22,15 @@
* No token and no network: both trees are in this repository.
*/
import { docsSidebar, plannedSidebar } from '../src/config/sidebar.mjs';
import { docsSidebar, plannedSidebar, flatLabels } from '../src/config/sidebar.mjs';
const failures = [];
const fail = (what, detail) => failures.push({ what, detail });
const live = new Map(docsSidebar.map((g) => [g.label, g.items.map((i) => i.label)]));
const planned = new Map(Object.entries(plannedSidebar));
// A nested group (RunicNPC inside Rust, phase 16) flattens to `Group › Page` labels, so its
// pages and their order are held to the plan exactly as a top-level group's are.
const live = new Map(docsSidebar.map((g) => [g.label, flatLabels(g.items)]));
const planned = new Map(Object.entries(plannedSidebar).map(([label, items]) => [label, flatLabels(items)]));
// ── Groups ──────────────────────────────────────────────────────────────────
for (const label of live.keys()) {

View File

@@ -1,6 +1,7 @@
#!/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
* 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 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
* are what a reader sees first, in the sidebar and in search results);
@@ -21,37 +27,53 @@
* page label, in both trees. Its comments are not scanned, because a comment is not
* 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
* their game content to. That is also when it learns D67's screenshot tag.
* It needs no build, so it runs early and fails fast, and it names a file and a line.
*
* 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`;
* - between `<GameExample game="…">` tags on a core page (D68). The component prints the
* game's name above the block, so the words arrive already labelled.
* - on that game's own routes (`GAME_ROUTES`): its docs group, its module page, and for
* 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
* 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.
* No token and no network: everything it reads is in this repository or its build output.
*/
import { readFileSync } from 'node:fs';
import { readFileSync, existsSync } from 'node:fs';
import { readdir } from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import path from 'node:path';
import { docsSidebar, plannedSidebar } from '../src/config/sidebar.mjs';
import { docsSidebar, plannedSidebar, flatLabels } from '../src/config/sidebar.mjs';
const ROOT = fileURLToPath(new URL('..', import.meta.url));
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
@@ -90,20 +112,32 @@ const GAME_DIRS = {
};
/**
* The allowlist: an exact phrase in one file that may use a word the rule would otherwise
* refuse. Short on purpose, and every entry says why. An entry that no longer matches its
* file fails the check too, so the list cannot rot into a set of permanent exemptions.
* Each game's own routes, for the built pass: its docs group, the page about its module, and
* for Rust the standalone RunicNPC page (D61), which a server owner reads without knowing what
* 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 = [
{
file: 'src/content/docs/docs/administration/notifications-and-email.mdx',
route: '/docs/administration/notifications-and-email/',
text: 'Guild (server) ID',
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)) {
if (!platform.games[game]) throw new Error(`checkTerms: GAME_DIRS names "${game}", which platform.json does not.`);
for (const game of new Set([...Object.keys(GAME_DIRS), ...Object.keys(GAME_ROUTES)])) {
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) {
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. */
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. */
function gameOfPath(relative) {
const posix = relative.split(path.sep).join('/');
@@ -122,6 +185,10 @@ function gameOfPath(relative) {
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
* 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 };
}
function lineOf(source, index) {
return source.slice(0, index).split('\n').length;
}
async function sourcePass() {
// ── 1. The documentation pages ──
let files = 0;
const allowUsed = new Set();
/** Hits for every term the given context may not use. */
function scan(text, allowedGame) {
const hits = [];
for (const t of TERMS) {
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;
}
for await (const file of walk(path.join(ROOT, 'src', 'content', 'docs'), /\.mdx?$/)) {
const relative = path.relative(ROOT, file).split(path.sep).join('/');
const source = readFileSync(file, 'utf8').replace(/\r\n/g, '\n');
files++;
async function* walk(dir) {
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;
}
}
let { text, regions } = proseOf(source, relative);
// ── 1. The documentation pages ──────────────────────────────────────────────
let files = 0;
const allowUsed = new Set();
for (const [i, entry] of ALLOW.entries()) {
if (entry.file !== relative) continue;
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 relative = path.relative(ROOT, file).split(path.sep).join('/');
const posix = relative;
const source = readFileSync(file, 'utf8').replace(/\r\n/g, '\n');
files++;
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 hit of scan(text, pageGame)) {
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 ${gameName(pageGame)} group` : 'on a core page';
fail(`${relative}:${lineOf(source, hit.index)}`, `"${hit.value}" is ${gameName(hit.term.game)} vocabulary, ${where}`);
}
}
const pageGame = gameOfPath(relative);
for (const hit of scan(text, pageGame)) {
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()) {
if (!allowUsed.has(i)) fail(`allowlist: ${entry.file}`, `"${entry.text}" no longer appears there — remove the entry`);
}
}
for (const [i, entry] of ALLOW.entries()) {
if (!allowUsed.has(i)) {
fail(`allowlist: ${entry.file}`, `"${entry.text}" no longer appears there — remove the entry`);
}
}
// ── 2. The sidebar, as data ─────────────────────────────────────────────────
const gameByName = new Map(Object.entries(platform.games).map(([key, g]) => [g.name, key]));
const trees = [
['docsSidebar', docsSidebar.map((g) => [g.label, g.items.map((i) => i.label)])],
['plannedSidebar', Object.entries(plannedSidebar)],
];
let labels = 0;
for (const [treeName, groups] of trees) {
for (const [groupLabel, items] of groups) {
const game = gameByName.get(groupLabel) ?? null;
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'}`,
);
// ── 2. The sidebar, as data ──
const gameByName = new Map(Object.entries(platform.games).map(([key, g]) => [g.name, key]));
const trees = [
['docsSidebar', docsSidebar.map((g) => [g.label, flatLabels(g.items)])],
['plannedSidebar', Object.entries(plannedSidebar).map(([label, items]) => [label, flatLabels(items)])],
];
let labels = 0;
for (const [treeName, groups] of trees) {
for (const [groupLabel, items] of groups) {
const game = gameByName.get(groupLabel) ?? null;
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}", ${gameName(hit.term.game)} vocabulary, ${game ? `in the ${gameName(game)} 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) {
console.log(
`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'}).`,
);
console.log(`checkTerms${BUILT ? ' --built' : ''}: ${summary} (${TERMS.length} terms, ${ALLOW.length} allowlisted phrase${ALLOW.length === 1 ? '' : 's'}).`);
} 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}`);
console.error(`
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
module. If a core page genuinely needs a game's real example, wrap it in
<GameExample game="…"> (D68), which labels it with the game's name. Add to the allowlist
in this script only for a word that is not a game's at all, and say why.
module. A marketing page describes what a game module adds in core's words and links to
the game's own page (D75). If a docs page genuinely needs a game's real example, wrap it in
<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);
}

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 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';
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');
/**
* 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() {
const rows = playRows();
const site = collectedIn('site');
@@ -61,7 +95,9 @@ function render() {
lines.push('<!--');
lines.push(' GENERATED FILE — do not edit.');
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('');
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(
'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.'
);
lines.push('');
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.'
'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.'
);
lines.push('');
/* --------------------------------------------------------------------------------- */
lines.push('## Data types');
lines.push('## Data collection and security');
lines.push('');
lines.push('| Category | Data type | Collected by us | Shared by us | Answer |');
lines.push('|---|---|---|---|---|');
for (const row of rows) {
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(
'- **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(
`| ${cell(row.play.category)} | ${cell(row.play.type)} | ${yesNo(row.play.collected)} ` +
`| ${yesNo(row.play.shared)} | ${cell(row.play.answer)} |`
`| ${cell(entry.category)} | ${cell(entry.type)} | Yes | No | ${yesNo(entry.required)} ` +
`| ${cell(entry.purposes.join('; '))} | ${cell(entry.rows.map((r) => r.title).join('; '))} |`
);
}
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('');
for (const row of rows) {
const types = row.play.types.map((t) => `${t.category} → ${t.type}`).join('; ');
lines.push(`### ${row.title}`);
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('');
if (row.play.collected) {
lines.push(`Purposes: ${row.play.purposes.join('; ')}.`);
lines.push('');
}
lines.push(cell(row.body));
lines.push('');
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.'
);
lines.push(
'- **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`.'
);
lines.push(
'- **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`.'
);
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('## 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 --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):
*
* 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_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_WS ws://127.0.0.1:8080/ws sidecar WebSocket
* UOLINK_TOKEN (unset) sidecar auth token; skipped when absent
* 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
@@ -47,9 +56,17 @@ import { readFileSync } from 'node:fs';
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 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 DEMO_PASS = process.env.RG_DEMO_PASS || 'DemoReview!2026';
const UOLINK_BASE = process.env.UOLINK_BASE || 'http://127.0.0.1:8080';
@@ -109,6 +126,85 @@ const USERS = [
{ 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 ───────────────────────────────────────────────
//
// 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() {
console.log('\nsite settings (D43 — the neutral demo identity)');
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;
}
const res = await call('PUT', '/admin/settings', SETTINGS);
const res = await call('PUT', '/admin/settings', siteSettings);
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() {
@@ -358,7 +454,7 @@ async function users() {
if (!list.ok) return fail('list users', list);
const rows = Array.isArray(list.data) ? list.data : (list.data?.users ?? []);
const have = new Set(rows.map((u) => u.username));
for (const user of USERS) {
for (const user of cast) {
if (have.has(user.username)) {
say('=', `${user.username} (${user.role})`);
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 ───────────────────────────────────────────────────────────────────────────────
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 settings();
await uoLink();
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(
`\n${DRY ? 'would create' : 'created'} ${created}, already present ${existed}` +
(process.exitCode ? ' — with failures above' : ''),
);
console.log(
'\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',
GAME === 'rust'
? '\nWhat this does NOT seed, on purpose: the feed, the leaderboard, who is online, clans\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
* 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.
* `/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
// 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">
<a href="/privacy/">Privacy</a>
<a href="/terms/">Terms</a>
<a href="/delete-account/">Delete account</a>
</span>
</p>
<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 = [
{ href: '/features/', label: 'Features' },
{ 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: '/community/', label: 'Community' },
];

View File

@@ -1,5 +1,6 @@
---
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.
@@ -44,9 +45,16 @@ const src = `/screens/${shot.id}.webp`;
// 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.
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
src={src}
alt={shot.alt}
@@ -55,7 +63,14 @@ const { width, height } = shot.family === 'web' ? WEB : PHONE;
loading="lazy"
decoding="async"
/>
{!bare && <figcaption>{shot.caption}</figcaption>}
{
(game || !bare) && (
<figcaption>
{game && <span class="shot__game">{game.name}</span>}
{!bare && shot.caption}
</figcaption>
)
}
</figure>
<style>
@@ -78,4 +93,18 @@ const { width, height } = shot.family === 'web' ? WEB : PHONE;
font-size: 0.9rem;
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>

View File

@@ -0,0 +1,21 @@
---
import { Code } from '@astrojs/starlight/components';
import { runicnpcCalls } from '../data/runicnpc.mjs';
/**
* One RunicNPC call's signature, printed from `src/data/runicnpc.mjs` (PLAN.md §16, D62).
*
* The API page writes each call's prose by hand and prints its signature through this, so the
* signature a reader copies is the one `scripts/checkReference.mjs` holds against
* `docs` `main:runicnpc/API.md`. The check also requires exactly one of these per call.
*/
interface Props {
call: keyof typeof runicnpcCalls;
}
const { call } = Astro.props;
const sig = runicnpcCalls[call];
if (!sig) throw new Error(`Signature: "${call}" is not in runicnpcCalls (src/data/runicnpc.mjs).`);
---
<Code lang="csharp" code={`${sig.returns} ${call}(${sig.params})`} />

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

@@ -0,0 +1,35 @@
---
/**
* A short description from a data file, rendered inline (PLAN.md §16, phase 16).
*
* Reference data in `src/data/` is plain strings, because a check reads the same file. Three
* inline marks are understood, and nothing else: `code`, **bold**, and [a link](/path/). The
* text is never parsed as HTML, so a description cannot inject markup.
*/
interface Props {
text: string;
}
const { text } = Astro.props;
type Token = { kind: 'text' | 'code' | 'strong'; value: string } | { kind: 'link'; value: string; href: string };
const tokens: Token[] = [];
const pattern = /`([^`]+)`|\*\*([^*]+)\*\*|\[([^\]]+)\]\(([^)\s]+)\)/g;
let last = 0;
for (const m of String(text ?? '').matchAll(pattern)) {
if (m.index > last) tokens.push({ kind: 'text', value: text.slice(last, m.index) });
if (m[1] !== undefined) tokens.push({ kind: 'code', value: m[1] });
else if (m[2] !== undefined) tokens.push({ kind: 'strong', value: m[2] });
else tokens.push({ kind: 'link', value: m[3], href: m[4] });
last = m.index + m[0].length;
}
if (last < text.length) tokens.push({ kind: 'text', value: text.slice(last) });
---
{tokens.map((t) =>
t.kind === 'code' ? <code>{t.value}</code>
: t.kind === 'strong' ? <strong>{t.value}</strong>
: t.kind === 'link' ? <a href={t.href}>{t.value}</a>
: t.value
)}

View File

@@ -1,5 +1,6 @@
---
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.
@@ -38,14 +39,15 @@ const shots = screensOf('phone');
<section class="page section shots">
<h2>What it looks like</h2>
<p class="prose shots__lede">
Captured against a real deployment with real content, not mocked up. The 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.
Captured from the app against two demo deployments: one with a real Ultima Online
server behind it, and one with a real Rust server whose players are a demo cast. The
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>
<ul class="shots__grid">
{shots.map((shot) => (
<li class="shots__item">
<li class="shots__item" data-game={shot.game}>
<img
src={`/screens/${shot.id}.webp`}
alt={shot.alt}
@@ -54,7 +56,10 @@ const shots = screensOf('phone');
loading="lazy"
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>
))}
</ul>
@@ -91,6 +96,19 @@ const shots = screensOf('phone');
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 {
margin: 0.85rem 0 0;
color: var(--dim);

View File

@@ -26,8 +26,8 @@ import platform from '../../data/platform.json';
<p class="eyebrow">Where the game stops</p>
<h2>A seam, with a version on it</h2>
<p class="prose">
The core site does not know what a shard is, what a guild is, or that Ultima Online
exists. Everything that does lives in an installable module on the other side of a
The core site does not know what game it serves, what that game calls a group of
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
slogan.
</p>
@@ -123,8 +123,8 @@ import platform from '../../data/platform.json';
<p>
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
all; it arrives from the module, which is why the UO module calls them guilds and
builds those pages itself. That is the pattern the whole interface is built on: core
all; it arrives from the module, which is why each module calls them by its own
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.
</p>
</section>

View File

@@ -9,7 +9,10 @@
* 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",
* 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
* everything below it is not reachable at all.
*
@@ -73,8 +76,10 @@
</svg>
<p class="diagram__caption">
Today the game server is a ServUO shard and the sidecar is uo-link. Two machines is
the minimum and also the maximum — nothing here scales by adding a third.
The sidecar and the bridge plugin are each game’s own — see
<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>
</div>
@@ -92,10 +97,10 @@
<section>
<h3>The game host</h3>
<p>
The machine your game server is already on. One installer binary puts the plugin
into the server's tree, installs the sidecar beside it and registers the service —
then prints four values. It never contacts your website; you paste those four
values into the admin panel yourself, and that is the moment the two halves meet.
The machine your game server is already on. One installer binary puts the bridge
plugin into the server's tree, installs the sidecar beside it and registers the
service — then prints what the site needs. It never contacts your website; you enter
those values in the admin panel yourself, and that is the moment the two halves meet.
</p>
</section>

View File

@@ -1,6 +1,7 @@
---
import platform from '../../data/platform.json';
import { capabilityGroups, assertCapabilityCoverage } from '../../data/capabilities.mjs';
import { capabilityGroups } 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
@@ -8,8 +9,10 @@ import { capabilityGroups, assertCapabilityCoverage } from '../../data/capabilit
* copy to keep true.
*
* 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
* apart. `checkFacts.mjs` already keeps `platform.json` honest against the module manifest;
* either game's own feature list (`src/data/games/`) and its module's declared capabilities
* 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.
*
* 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
* §1 is written to prevent.
*/
assertCapabilityCoverage(platform.games.uo.module.capabilities);
for (const game of games) assertGameCoverage(game.key);
---
<section class="page section caps">
<p class="eyebrow">What it does</p>
<h2>A community site, and a window into the game</h2>
<p class="prose caps__lede">
The core is game-agnostic: it does not know what a shard is. Everything that does arrives
as an installable <a href="/modules/">module</a>, which is why the same platform can carry
a different game without a fork.
The core is game-agnostic: it does not know what game you run. Everything that does
arrives as an installable <a href="/modules/">module</a>, which is why the same platform
carries two games without a fork.
</p>
<SupportedGames class="caps__games" />
<div class="caps__grid">
{
@@ -69,6 +73,10 @@ assertCapabilityCoverage(platform.games.uo.module.capabilities);
color: var(--muted);
}
.caps__games {
margin-top: 1.25rem;
}
.caps__grid {
display: grid;
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
* "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.
*
* 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.
*
* 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.
* 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">
<h3><span class="start__num">2</span> The game side</h3>
<p>
One binary, run on the machine the game server already lives on. It syncs the plugin,
installs the sidecar as a service, and prints four values. You paste those into
Admin → Shard, and the two halves find each other.
One binary, run on the machine the game server already lives on — or, for Rust, a
Pterodactyl egg. It puts the bridge plugin in place, installs the sidecar, and prints
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>
</div>
</div>

View File

@@ -2,19 +2,27 @@
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 —
* 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
* under the diagram is the diagram's evidence.
* it arrives, captured from a deployment wired to a running game server, so the section
* 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
* homepage that enumerates. So: one figure, the signature screen, and the rest of the set
* on `/features/` where each one sits beside the claim it supports.
* homepage that enumerates. So: one figure per game, its signature screen, and the rest of
* 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>
<h2>The other end of that diagram</h2>
<p class="prose looks__lede">
A demo deployment with a real shard behind it. The gold supply, the state of the link and
the player online in Britain are all read from the game server over the bridge. None of it
is typed in, and none of it is a mock-up.
Two demo deployments, each with a real game server behind it. On the first, the gold
supply, the state of the link and the player online are all read from an Ultima Online
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>
<Screenshot id="shard-status" />
<div class="looks__pair">
<Screenshot id="shard-status" />
<Screenshot id="rust-map" />
</div>
</section>
<style>
@@ -41,4 +53,11 @@ import Screenshot from '../Screenshot.astro';
max-width: 46rem;
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>

View File

@@ -116,6 +116,20 @@ export const docsSidebar = [
{ label: 'sidecar.toml', slug: 'docs/rust/sidecar-toml' },
{ label: 'RunicGateway.json', slug: 'docs/rust/runicgateway-json' },
{ label: 'Event kinds', slug: 'docs/rust/event-kinds' },
// §16, D61/D72: RunicNPC is a subgroup of Rust, nested so it reads as part of the game.
{
label: 'RunicNPC',
items: [
{ label: 'RunicNPC', slug: 'docs/rust/runicnpc' },
{ label: 'Install RunicNPC', slug: 'docs/rust/runicnpc/install' },
{ label: 'Commands', slug: 'docs/rust/runicnpc/commands' },
{ label: 'NPC profiles', slug: 'docs/rust/runicnpc/npc-profiles' },
{ label: 'NPC placements', slug: 'docs/rust/runicnpc/npc-placements' },
{ label: 'Cost and caps', slug: 'docs/rust/runicnpc/cost-and-caps' },
{ label: 'Profile fields', slug: 'docs/rust/runicnpc/profile-fields' },
{ label: 'The API', slug: 'docs/rust/runicnpc/api' },
],
},
],
},
];
@@ -211,5 +225,34 @@ export const plannedSidebar = {
'sidecar.toml',
'RunicGateway.json',
'Event kinds',
{
RunicNPC: [
'RunicNPC',
'Install RunicNPC',
'Commands',
'NPC profiles',
'NPC placements',
'Cost and caps',
'Profile fields',
'The API',
],
},
],
};
/**
* A group's items as flat labels, a nested group's pages written `Group › Page` after the
* group's own label. Both trees go through this, so `checkSidebar.mjs` compares nested
* groups as strictly as top-level ones, and `checkTerms.mjs` reads every label.
*
* In `docsSidebar` a nested group is `{ label, items }`; in `plannedSidebar` it is
* `{ Label: [pages] }`.
*/
export function flatLabels(items) {
return items.flatMap((item) => {
if (typeof item === 'string') return [item];
if (Array.isArray(item.items)) return [item.label, ...flatLabels(item.items).map((l) => `${item.label} › ${l}`)];
if ('label' in item) return [item.label];
return Object.entries(item).flatMap(([label, pages]) => [label, ...flatLabels(pages).map((l) => `${label} › ${l}`)]);
});
}

View File

@@ -1,6 +1,6 @@
---
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';
@@ -11,7 +11,7 @@ not overlap.
| Screen | Is about | Comes from |
|---|---|---|
| **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 |
## Moderation (Discord)
@@ -29,13 +29,20 @@ browsing the window.
## Reports
Reports raised by members about Team forum content. Two design decisions show through in
how this screen behaves:
Reports raised by members about Team forum threads and posts and, where a game module offers
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
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:
hiding or removing a post is done in the forum, or as a sanction against the account.
- **A report changes nothing on its own.** Filing one must never be a way to hide
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
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.
</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
An appeal is a request to reverse a sanction, filtered by *Open*, *Pending*, *Under

View File

@@ -15,6 +15,10 @@ A documentation site that quietly re-specifies a contract becomes a second sourc
and second sources of truth drift. Every page here links out for exactly this reason, and
this page is the index of what it links to.
One page is a deliberate exception: [RunicNPC's API](/docs/rust/runicnpc/api/) is carried in
full, because its readers are plugin authors outside this project. Its every signature and field
name is checked against `runicnpc/API.md` on every build, and that document still wins.
If you find a disagreement, it is worth reporting — it means a check is missing.
</Aside>

View File

@@ -35,7 +35,7 @@ Picked from the step's **Action** list, beside core's own:
|---|---|---|
| **The world** | Open a zone | A ZoneManager zone, at a monument or coordinates, with flags from a [preset](#zone-presets), messages on entering and leaving, and optionally a dome |
| | Place crates | Crates, barrels and supply drops |
| | Place NPCs | Rust's scientists and guards, or RunicNPC profiles — placed through RunicNPC |
| | Place NPCs | Rust's scientists and guards, or [RunicNPC profiles](/docs/rust/runicnpc/npc-profiles/) — placed through RunicNPC |
| | Call a world event | Rust's own: a patrol helicopter, an airdrop, the cargo ship, a Bradley, the Travelling Vendor and the rest |
| **Counting** | Start counting participants | A tally of who is present in a zone or on the server, by seconds present, kills, or both |
| | Record participants | Reads the tally into the run, so later steps can reward from it |

View File

@@ -42,7 +42,7 @@ with six tabs.
| 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 |
| **Online** | Who is on right now |
| **Map** | The [live map](/docs/rust/the-live-map/): the server's own map picture, with layers |
@@ -66,7 +66,8 @@ NPC kills, coins and backpack. See [Linking Steam accounts](/docs/rust/linking-s
| Rust mod config | [Mod config from the site](/docs/rust/mod-config/) |
| Rust visibility | [Who sees who is online](/docs/rust/who-sees-who-is-online/) |
| Rust zone presets | [Events, zones and rewards](/docs/rust/events-zones-and-rewards/) |
| Rust NPC profiles, Rust NPC placements | RunicNPC, which has its own pages |
| Rust NPC profiles | [NPC profiles](/docs/rust/runicnpc/npc-profiles/), in the RunicNPC subgroup |
| Rust NPC placements | [NPC placements](/docs/rust/runicnpc/npc-placements/), in the RunicNPC subgroup |
The module also adds a **Rust** section to each user's page under **Admin → Users** (their
linked Steam accounts, permissions, coins and backpack), Rust steps and triggers to core's
@@ -98,3 +99,4 @@ every list, count and last-reported time comes from what the site stored.
| [sidecar.toml](/docs/rust/sidecar-toml/) | Changing the sidecar's binds, token, store or history |
| [RunicGateway.json](/docs/rust/runicgateway-json/) | Changing the bridge plugin's own settings and bounds |
| [Event kinds](/docs/rust/event-kinds/) | Knowing what the server can tell the site, and who may see each |
| [RunicNPC](/docs/rust/runicnpc/) | Our NPC plugin: placing NPCs, their profiles, and its API for other plugins — eight pages of its own |

View File

@@ -4,6 +4,7 @@ description: Admin → Rust permissions — the site holds every server's permis
---
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
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
tick that — and a change made in one game gives that server its own copy.
<Screenshot id="admin-rust-permissions" />
### Chat styles
A group's **Settings** tab has a **Chat style (BetterChat)** section. Give a group a style and

View File

@@ -0,0 +1,362 @@
---
title: The API
description: RunicNPC's API for other Oxide and Carbon plugins, in full — every call, every hook it raises, and the shapes of an NPC, a placement and a route.
---
import { Aside, Code } from '@astrojs/starlight/components';
import platform from '../../../../../data/platform.json';
import Signature from '../../../../../components/Signature.astro';
import Ticks from '../../../../../components/Ticks.astro';
import {
runicnpcOwners,
runicnpcHooks,
runicnpcListKeys,
runicnpcPlacementKeys,
runicnpcRouteKeys,
} from '../../../../../data/runicnpc.mjs';
<Aside title="The specification is normative">
This page carries RunicNPC's API in full, for plugin authors. Its specification is
[`docs/runicnpc/API.md`](https://gitea.whitlocktech.com/RunicGateway/docs/src/branch/main/runicnpc/API.md),
and where the two ever disagree, that wins. Every signature and every field name below is
checked against it on every build, so a call, hook or field that changes there turns this site
red until this page follows.
</Aside>
This is **API version {platform.runicnpc.api}**, shipped in RunicNPC
{platform.releases['runicnpc-rust']}. RunicNPC works without Runic Gateway, and so does
everything on this page.
## Calling it
RunicNPC is called by name through `Call`, like any Oxide or Carbon plugin API. Every call is
prefixed `RunicNpc_`, so no hook of another plugin is ever matched by accident.
<Code
lang="csharp"
code={[
'[PluginReference] private Plugin RunicNPC;',
'',
'int api = RunicNPC?.Call<int>("RunicNpc_ApiVersion") ?? 0;',
`if (api < ${platform.runicnpc.api}) { /* too old for this caller: say so */ }`,
'',
'BasePlayer npc = RunicNPC.Call("RunicNpc_Spawn", position, "warden", "plugin:MyPlugin", null) as BasePlayer;',
].join('\n')}
/>
**The API version moves when a call or a raised hook changes shape**, not on every release. The
release's manifest carries it too, so an installer can refuse a RunicNPC too old for its caller
before it is loaded. Check it before relying on a call.
**A call that cannot do what it was asked returns null, 0 or false, and says why in the server
log.** Calls that change data return the reason as a string instead, and null means success.
## Owners
Every NPC has an owner, and the owner decides how long it lives.
<table>
<thead><tr><th>Owner</th><th>Who uses it</th><th>Lifetime</th></tr></thead>
<tbody>
{Object.entries(runicnpcOwners).map(([owner, o]) => (
<tr key={owner}><td><code>{owner}</code></td><td><Ticks text={o.who} /></td><td><Ticks text={o.lifetime} /></td></tr>
))}
</tbody>
</table>
## Spawning and removing
### RunicNpc_ApiVersion
<Signature call="RunicNpc_ApiVersion" />
The API version: {platform.runicnpc.api}.
### RunicNpc_Spawn
<Signature call="RunicNpc_Spawn" />
Spawns one NPC now, or returns null.
- `owner` must be `run:<id>` or `plugin:<name>`.
- `overrides` may change any [profile field](/docs/rust/runicnpc/profile-fields/) for this NPC
only, in the profile's own shape, or be null. For example:
`{"health": 500, "names": ["Captain"], "movement": {"mode": "route:gate", "radius": 0}}`.
Arrays are replaced, not merged, and the merged profile is checked like a saved one.
- A roamer must stand on Rust's navmesh, within 3 m across and 2 m up or down of `at`. A sentry
may stand anywhere.
- It is refused until the map's navmesh is built, which takes 8–10 minutes on a map's first boot.
It is refused for an unknown or refused profile, a bad owner, an override that fails, a spot off
the navmesh, a cap an admin has set, or a navmesh not built yet.
### RunicNpc_Despawn
<Signature call="RunicNpc_Despawn" />
Removes one NPC by its net id, and returns 1, or 0 if it is not one of RunicNPC's. A placement's
NPC comes back after its respawn delay. **For a boss, it also removes the adds that boss
summoned**, even once the boss is dead, and counts them in what it returns: whoever placed the
boss knows only the boss's net id.
### RunicNpc_DespawnOwner
<Signature call="RunicNpc_DespawnOwner" />
Removes every NPC of `owner`, and returns how many it removed.
### RunicNpc_IsRunicNpc
<Signature call="RunicNpc_IsRunicNpc" />
Whether `entity` is one of RunicNPC's NPCs.
### RunicNpc_ProfileOf
<Signature call="RunicNpc_ProfileOf" />
The name of its profile, or null.
### RunicNpc_CostWarning
<Signature call="RunicNpc_CostWarning" />
The [cost warning](/docs/rust/runicnpc/cost-and-caps/) for the NPCs the server plans, plus
`adding`: what they add to a server frame, idle and fighting, and how slowly each then reacts. A
caller that adds NPCs should show it to whoever added them.
## Listing NPCs
### RunicNpc_List
<Signature call="RunicNpc_List" />
The live NPCs of `owner`, or of every owner when it is null. Each row has:
<table>
<thead><tr><th>Key</th><th>Type</th><th>What it is</th></tr></thead>
<tbody>
{Object.entries(runicnpcListKeys).map(([key, k]) => (
<tr key={key}><td><code>{key}</code></td><td><code>{k.type}</code></td><td><Ticks text={k.what} /></td></tr>
))}
</tbody>
</table>
## Orders for one NPC
### RunicNpc_Escort
<Signature call="RunicNpc_Escort" />
One of RunicNPC's NPCs escorts `target`: a player, or any other entity — a crate it guards, a
vehicle. It keeps within a few metres, never targets it, and fights whoever damages it. **When the
target dies, is destroyed or, for a player, leaves the server**, it walks back to its spot,
carries on as its profile does there, and `OnRunicNpcEscortEnded` is raised. A null `target`
stops it. Null on success; refused for a sentry, which never moves, and for a player who is not on
the server.
### RunicNpc_Ally
<Signature call="RunicNpc_Ally" />
Allies one NPC to `clan` (the game's own clan id), `team` (a Rust team id) or `player` (a Steam
id: that player, and their team if they have one), or to nobody with `none`. It **never targets**
the ally's people, and **defends them and what they own** — building blocks, doors, deployables:
whoever damages one of them within its leash is fought. Rust's own clans and teams only. Null on
success; refused for a clan or team the server does not have.
### RunicNpc_Tether
<Signature call="RunicNpc_Tether" />
Holds one NPC inside a ZoneManager zone: it never chases or wanders out, and if it ends up outside
— pushed, or the zone moved — it forgets the fight and walks home. A null `zone` frees it. Refused
for a sentry, on a server without ZoneManager, for a zone the server does not have, and for a zone
that does not hold the NPC.
## Profiles and factions
### RunicNpc_Profiles
<Signature call="RunicNpc_Profiles" />
`{"managed": bool, "profiles": {name: profile, …}, "factions": [pair, …], "refused": {name: reason, …}}`.
`managed` is whether a site manages this server. A refused profile is kept in the file but never
spawns — a kit the server lacks, for example. `factions` is the faction table. Every field of a
profile is on [Profile fields](/docs/rust/runicnpc/profile-fields/).
### RunicNpc_SetProfiles
<Signature call="RunicNpc_SetProfiles" />
Replaces the whole profile set with `all` (`{name: profile, …}`), as a site does on every push,
and **marks the server managed**: from then on, the console commands that edit profiles are
refused. It returns the profiles refused and why; the rest are in use at once. A placement whose
profile has gone waits, and spawns again when the profile returns.
### RunicNpc_Factions
<Signature call="RunicNpc_Factions" />
The faction table: `[{"a": "bandits", "b": "guards", "relation": "hostile"}, …]`, one row per
pair, meaning both ways. A pair not listed is neutral, and a faction is always allied to itself.
### RunicNpc_SetFactions
<Signature call="RunicNpc_SetFactions" />
Replaces the faction table, as a site does with every push, and **marks the server managed**.
Null on success; otherwise the first problem, and the old table is kept. Refused: a pair of one
faction with itself; a pair of `scientists` and `animals`, because RunicNPC does not change how
Rust's own NPCs treat each other; a relation other than `hostile`, `neutral` or `allied`; and a
pair given twice, in either order.
## Placements
A **placement** is a spot where a profile's NPCs stand and come back after they die. It is saved;
its NPCs never are. Its keys:
<table>
<thead><tr><th>Key</th><th>What it is</th></tr></thead>
<tbody>
{Object.entries(runicnpcPlacementKeys).map(([key, what]) => (
<tr key={key}><td><code>{key}</code></td><td><Ticks text={what} /></td></tr>
))}
</tbody>
</table>
```json
{
"profile": "warden",
"position": { "x": 100.0, "y": 12.5, "z": -340.0 },
"yaw": 90,
"count": 3,
"respawn": 300,
"respawnMode": "each",
"movement": { "mode": "route:gate", "radius": 0 }
}
```
A placement whose profile or zone has gone **waits**, and spawns again when it returns. **If the
ground under a placement goes later** — a player-built floor destroyed — a live NPC is put on the
nearest navmesh within 2 s, and the placement respawns its NPCs on the nearest navmesh until its
spot is walkable again. Rust itself would leave such an NPC standing in the air.
### RunicNpc_Placements
<Signature call="RunicNpc_Placements" />
Each placement as `{id, placement, alive, waiting, lastError, note}`: `placement` is its JSON,
`alive` how many of its NPCs are alive, and `waiting` why it cannot spawn now, or null. `note` is
set while its NPCs stand somewhere other than its spot because the ground there went, and null
otherwise.
### RunicNpc_AddPlacement
<Signature call="RunicNpc_AddPlacement" />
**Creates a placement and names it as `/rnpc place` does**: the profile's name and the first free
number, `warden-3`. It is checked and refused exactly as `/rnpc place` is, with the same
sentences, so a placement made by another plugin or a website and one made in game never disagree.
- `placement` has no id. **A `position` without `y` is a point on the map**: it is put on the
ground there by a ray down onto terrain and rock, never a building or a tree, then checked
against the navmesh like any other. A point off the map, or under water, is refused.
- The answer is `{id, position, built, cost}` — the name given, where it landed, whether that spot
is on something players built, and the cost warning — or `{error}`, the sentence `/rnpc place`
would have said.
### RunicNpc_SetPlacement
<Signature call="RunicNpc_SetPlacement" />
Adds or replaces a placement with the id you give. Null on success, or the reason. Replacing one
removes its NPCs and spawns them again from the new values. Every set logs the cost warning.
A roamer's spot must be on Rust's navmesh, within 2 m up or down, when it is set; otherwise the
answer says how far off it is. The check is skipped while the map's navmesh is still being built,
and for a profile that does not exist yet.
### RunicNpc_RenamePlacement
<Signature call="RunicNpc_RenamePlacement" />
Renames a placement, as `/rnpc rename` does: its live NPCs keep living under the new name. Null on
success, or why not — no such placement, the name taken, or not a name.
### RunicNpc_RespawnPlacement
<Signature call="RunicNpc_RespawnPlacement" />
Removes a placement's NPCs and spawns them again at once, as `/rnpc respawn` does. Returns how
many, or `-1` if there is no such placement.
### RunicNpc_RemovePlacement
<Signature call="RunicNpc_RemovePlacement" />
Removes a placement and its NPCs.
## Routes
A route is a line of points an NPC walks. An NPC joins a route at its nearest point.
<table>
<thead><tr><th>Key</th><th>What it is</th></tr></thead>
<tbody>
{Object.entries(runicnpcRouteKeys).map(([key, what]) => (
<tr key={key}><td><code>{key}</code></td><td><Ticks text={what} /></td></tr>
))}
</tbody>
</table>
```json
{ "points": [ { "x": 1, "y": 2, "z": 3 }, { "x": 4, "y": 2, "z": 6 } ], "loop": true }
```
### RunicNpc_Routes
<Signature call="RunicNpc_Routes" />
Every route, as `{name: route, …}`.
### RunicNpc_SetRoute
<Signature call="RunicNpc_SetRoute" />
Adds or replaces a route. Every point must be on Rust's navmesh. Null on success, or the reason.
**Unlike `/rnpc path`, it does not check that an NPC can walk from each point to the next**: a leg
Rust cannot path leaves the NPC standing at the last point it reached, so a caller that builds
routes should check its own legs.
### RunicNpc_RemoveRoute
<Signature call="RunicNpc_RemoveRoute" />
Removes a route. Placements that walk it wait until it exists again.
## Hooks it raises
Every hook is called on every plugin, and **none of them answers**: a return value is ignored.
<table>
<thead><tr><th>Hook</th><th>When</th></tr></thead>
<tbody>
{Object.entries(runicnpcHooks).map(([hook, h]) => (
<tr key={hook}><td><code>{`${hook}(${h.params})`}</code></td><td><Ticks text={h.when} /></td></tr>
))}
</tbody>
</table>
## Its files
`data/RunicNPC/profiles.json` (the profiles, the faction table and whether a site manages them),
`placements.json` and `routes.json`, under `oxide/` or `carbon/`. From a plugin, change them
through the calls above rather than the files. See [Install RunicNPC](/docs/rust/runicnpc/install/#its-files)
for every file and who writes it.
<Aside type="caution" title="A Kits reload reloads RunicNPC">
RunicNPC requires Kits, so both frameworks reload RunicNPC with it, and every NPC it had spawned is
lost. Placements come back; NPCs a plugin or an event spawned do not, and `OnRunicNpcDespawned` is
not raised for them.
</Aside>

View File

@@ -0,0 +1,104 @@
---
title: Commands
description: Every /rnpc chat command and rnpc.* console command RunicNPC answers, the two permissions they need, and the options for placing NPCs.
---
import Ticks from '../../../../../components/Ticks.astro';
import {
runicnpcCommands,
runicnpcPermissions,
runicnpcPlaceOptions,
} from '../../../../../data/runicnpc.mjs';
export const Commands = ({ section }) => (
<table>
<thead><tr><th>Command</th><th>Does</th><th>Needs</th></tr></thead>
<tbody>
{Object.entries(runicnpcCommands[section]).map(([usage, c]) => (
<tr key={usage}>
<td><code>{c.console ? `rnpc.${usage}` : `/rnpc ${usage}`}</code></td>
<td><Ticks text={c.does} /></td>
<td>{c.perm.startsWith('runicnpc.') ? <code>{c.perm}</code> : c.perm}</td>
</tr>
))}
</tbody>
</table>
);
## How commands are reached
- **In chat:** `/rnpc <verb> …`. `/rnpc` alone lists the verbs you are allowed to use.
- **In a console:** `rnpc.<verb> …`, in a player's F1 console, the server console or RCON. The
same code answers both, with the same permissions.
- **Four verbs answer only in a console** — `profile`, `faction`, `status` and `reload`. In chat
they tell you to open F1.
- **The server console has every permission.** It has no position, so placing there takes `at=`
and `yaw=` instead of where you look.
The verbs, the permissions and the placing options on this page are checked against the plugin's
own source on every build.
## Permissions
<table>
<thead><tr><th>Permission</th><th>Grants</th></tr></thead>
<tbody>
{Object.entries(runicnpcPermissions).map(([perm, grants]) => (
<tr key={perm}><td><code>{perm}</code></td><td><Ticks text={grants} /></td></tr>
))}
</tbody>
</table>
On a Runic Gateway server both show in **Admin → Rust permissions** like any plugin's, and the
site grants them there — see [Permissions and groups](/docs/rust/permissions-and-groups/).
## Placements
A **placement** is a spot where a profile's NPCs stand and come back after they die. It is saved
on the server and survives restarts. Placements made in game are named after their profile and a
number, `bandit-1`, and can be renamed. The site's [placements screen](/docs/rust/runicnpc/npc-placements/)
edits the same list.
<Commands section="Placements" />
### Options for `place` and `here`
`key=value`, in any order: `/rnpc place raider count=3 respawn=600 mode=group`.
<table>
<thead><tr><th>Option</th><th>Means</th><th>Default</th></tr></thead>
<tbody>
{Object.entries(runicnpcPlaceOptions).map(([key, o]) => (
<tr key={key}><td><code>{key}=</code></td><td><Ticks text={o.means} /></td><td><Ticks text={o.default} /></td></tr>
))}
</tbody>
</table>
**Every placement is checked against Rust's navmesh.** A roamer must stand on it; only a sentry,
or a passive NPC that stands, may stand off it. On a player-built floor the placement is made with
a warning: if the floor is destroyed, the NPCs fall back to the nearest navmesh, and return to
their spot once it is rebuilt. Every command that adds NPCs answers with the
[cost warning](/docs/rust/runicnpc/cost-and-caps/).
## Routes
A route is a line of points an NPC walks, recorded in game where you walk, one point at a time.
A recording is kept in memory only: a reload of RunicNPC discards it. A placement walks one with
`move=route:<name>`.
<Commands section="Routes" />
## At the console
**On a Runic Gateway server the site manages the profiles and the faction table.** There,
`rnpc.profile create`, `set` and `delete`, and `rnpc.faction set` and `clear`, are refused with
"managed by its website"; `show` and `list` still answer. On a server with no site, they are how
profiles are made: see [Profile fields](/docs/rust/runicnpc/profile-fields/) for every field
`set` takes.
<Commands section="At the console" />
A boss block or a press-E block is added with its defaults by `set <name> boss on` or
`set <name> use on`, and removed with `none`. Their fields are then set one at a time —
`boss.spawnLine The Juggernaut has risen!` — and a list of objects as JSON:
`boss.phases [{"at":0.5,"line":"…"}]`. Setting `role passive` also turns `hurtByPlayers` off.

View File

@@ -0,0 +1,79 @@
---
title: Cost and caps
description: What RunicNPC's NPCs cost a Rust server, measured rather than guessed, the warning that says so wherever NPCs are added, and the caps an operator can set.
---
import Ticks from '../../../../../components/Ticks.astro';
import { runicnpcConfig } from '../../../../../data/runicnpc.mjs';
**RunicNPC has no caps by default.** Instead, everything that adds NPCs answers with what the
server's RunicNPC NPCs will then cost: `/rnpc place`, the site's
[placements screen](/docs/rust/runicnpc/npc-placements/), an event's *Place NPCs* step, the API's
`RunicNpc_CostWarning`, and the end of `rnpc.status`. A server's owner knows their hardware and
their players; a number someone else picked would be wrong for most of them.
## The cost warning
It reads like this:
```
RunicNPC: 100 NPC(s) on this server. Measured on a test server, they add about 3 ms to every
server frame while idle with a player near enough to wake them, and about 0.5 ms once they sleep
with nobody near. If all fight at once they add about 9 ms, and Rust's shared 2 ms AI budget then
lets each react only every 3 s. …
```
What it means:
- **Idle NPCs are cheap, and sleeping ones cheaper.** NPCs that stand, wander or patrol with
nobody to fight add a little to a frame. One with no player within its sleep distance — 160 m
unless its profile says otherwise — walks home and sleeps, and then costs about a sixth of what
it did awake.
- **Fighting NPCs hit Rust's AI budget before the frame rate.** All of Rust's human NPCs, its own
scientists included, share one AI budget of 2 ms a frame (`aithinkmanager.framebudgetms`). With
many fighting at once, each reacts less often. The server stays smooth, and the NPCs get slower
to react.
- **Fighting other NPCs costs about what fighting players does.** That is a faction setting, and
off unless a profile opts in. On a map whose own AI is busy, each then reacts less often still;
the warning says by how much once any profile fights NPCs.
## Where the figures come from
They are measured, not guessed: 100 of the released NPC on both frameworks, on a 6000 map, as what
they add to the median server frame of the same session's empty server. Beside them is Rust's own
scientist, measured the same day.
| 100 NPCs, over an empty server | RunicNPC on Oxide | RunicNPC on Carbon | Rust's scientist (Oxide / Carbon) |
|---|---|---|---|
| Idle, a player near enough to keep them awake | +2.7 to +2.9 ms | +1.5 ms | +1.0 / +1.0 ms |
| Idle, asleep with nobody within 160 m | — | +0.5 ms | — |
| Fighting 20 players | +7.2 ms | +9.0 ms | +7.5 / +8.0 ms |
**Fighting costs what Rust's own AI costs.** The warning uses the worst figure in each row,
rounded up: 3 ms awake, 0.5 ms asleep and 9 ms fighting, per 100. The awake figure on Oxide is
higher than it should be, and is being worked on in
[runicnpc-rust#13](https://gitea.whitlocktech.com/RunicGateway/runicnpc-rust/issues/13). Your
server's own figures depend on its CPU, its map and its players.
## Caps
To cap them anyway, set any of these in `config/RunicNPC.json` (Carbon: `configs/RunicNPC.json`)
and reload RunicNPC. Every cap is 0, meaning none, until you set it.
<table>
<thead><tr><th>Key</th><th>What it limits</th></tr></thead>
<tbody>
{Object.entries(runicnpcConfig).map(([key, what]) => (
<tr key={key}><td><code>{key}</code></td><td><Ticks text={what} /></td></tr>
))}
</tbody>
</table>
These keys are checked against the plugin's own source on every build.
**A spawn over a cap is refused, naming the cap**, whether it came from `/rnpc`, the site, an
event step or another plugin.
**The bridge has its own bound too.** On a Runic Gateway server, `EventsMaxNpcs` in the bridge
plugin's [RunicGateway.json](/docs/rust/runicgateway-json/) limits how many NPCs one event step may
place — whatever RunicNPC's caps allow.

View File

@@ -0,0 +1,75 @@
---
title: RunicNPC
description: Runic Gateway's own NPC plugin for Rust — what it is, how it works with and without a Runic Gateway site, and where each page about it fits.
---
import platform from '../../../../../data/platform.json';
**RunicNPC** is an NPC plugin for Rust, on Oxide and Carbon, written by this project. It puts
NPCs where you want them, with the kit, health, aim, ranges and behaviour you give them, and
brings them back after they die. It is one file, `RunicNPC.cs`, compiled by the framework from
source like any uMod plugin.
| | |
|---|---|
| **Release** | {platform.releases['runicnpc-rust']}, from [`runicnpc-rust`](https://gitea.whitlocktech.com/RunicGateway/runicnpc-rust/releases) |
| **API version** | {platform.runicnpc.api} |
| **Runs on** | Oxide {platform.runicnpc.oxideMin} or Carbon {platform.runicnpc.carbonMin}, or newer |
| **Needs** | {platform.runicnpc.requiresPlugins.join(' and ')}. ZoneManager is optional, for holding NPCs inside a zone |
## Two ways to run it
**On its own.** RunicNPC runs on any Rust server, with no Runic Gateway site anywhere. You place
NPCs in game with `/rnpc`, edit their profiles at the console, and other plugins drive it through
its [API](/docs/rust/runicnpc/api/). Nothing on this page beyond this section is needed to use it
that way.
**On a Runic Gateway server.** There it is **required**, and installed with the bridge from the
same bundle. Every NPC an event places is RunicNPC's, Rust's own scientists included. The site
then owns the NPC **profiles** and the **faction table**, and pushes them to each server; the
console commands that would edit them are refused with "managed by its website". **Placements
stay the server's**: they are made in game or from the site's map, and both see the same list.
## What it is made of
- **A profile** is a named description of an NPC: its names and kits, its role, how it moves, how
hard it is, whom it fights, and optionally a boss's phases, what pressing E on it does, and its
own loot. See [Profile fields](/docs/rust/runicnpc/profile-fields/).
- **A placement** is a spot where a profile's NPCs stand and come back after they die. It is saved
on the server and survives restarts. **The NPCs themselves are never saved**: at boot, each
placement spawns fresh ones.
- **A route** is a line of points, recorded in game, that an NPC walks.
- **An owner.** Every NPC has one, and the owner decides how long it lives: a placement, an event
run, or another plugin. An event's NPCs go when the event is torn down, and another plugin's go
when it unloads.
**The roles.** A *roamer* moves, chases and fights. A *sentry* stands still and shoots. A *guard*
holds its spot, chases within its leash and walks back. A *passive* NPC never fights, and pressing
E on it says a line or opens a window — a quest-giver or a quartermaster. Any role but passive can
be a **boss**: a health bar at the top of the screen, phases as its health falls, and lines said
in game.
**Factions.** With no faction settings an NPC fights players only. Profiles can be put on sides,
made hostile to Rust’s scientists or animals, or to each other; through the API, one NPC can
also be allied to a clan, a team or a player, and defend what they own.
**On a Runic Gateway site** RunicNPC's NPCs also show up elsewhere: their names in a server’s
[feed](/docs/rust/), NPC kills on the leaderboard, bosses and event NPCs on the
[live map](/docs/rust/the-live-map/), and a step's "3 of 8 left" on a running event's page. An
event places them with its *Place NPCs* step and can wait on them dying or on a boss's health; see
[Events, zones and rewards](/docs/rust/events-zones-and-rewards/).
**It never phones home.** RunicNPC makes no network call, downloads nothing and scans nothing at
boot.
## In this group
| Page | Read it when |
|---|---|
| [Install RunicNPC](/docs/rust/runicnpc/install/) | Putting it on a server, with or without Runic Gateway, and after a Rust update |
| [Commands](/docs/rust/runicnpc/commands/) | Placing NPCs and recording routes in game, and the console |
| [NPC profiles](/docs/rust/runicnpc/npc-profiles/) | Authoring profiles and the faction table on the site |
| [NPC placements](/docs/rust/runicnpc/npc-placements/) | Placing NPCs from the site's map |
| [Cost and caps](/docs/rust/runicnpc/cost-and-caps/) | Knowing what NPCs cost a server, and capping them |
| [Profile fields](/docs/rust/runicnpc/profile-fields/) | Every field of a profile, for the editor, the console and the API alike |
| [The API](/docs/rust/runicnpc/api/) | Writing a plugin that spawns, orders or listens to RunicNPC's NPCs |

View File

@@ -0,0 +1,115 @@
---
title: Install RunicNPC
description: Putting RunicNPC on a Rust server — from the Runic Gateway bundle, or by hand on a server with no site — its files, and what to check after a Rust update.
---
import { Aside, Code } from '@astrojs/starlight/components';
import platform from '../../../../../data/platform.json';
## What it needs
| | |
|---|---|
| **Oxide {platform.runicnpc.oxideMin} or Carbon {platform.runicnpc.carbonMin}**, or newer | The builds it is known good on. Its release manifest states them, and the installer checks them |
| **[Kits](https://umod.org/plugins/kits)** | **Required.** A profile equips its NPCs with Kits kits, and RunicNPC declares `// Requires: Kits`, so neither framework loads it without Kits |
| **[ZoneManager](https://umod.org/plugins/zone-manager)** | Optional. Only holding NPCs inside a zone uses it |
**Kits and ZoneManager are reported, never installed.** The installer's `doctor` says when either
is missing; you install them from uMod.
<Aside type="caution" title="Do not reload Kits while an event runs">
RunicNPC requires Kits, so both frameworks reload RunicNPC whenever Kits reloads, and every NPC it
had spawned is gone. Placements come back on their own; an event's NPCs do not.
</Aside>
## On a Runic Gateway server
There is nothing to do by hand. RunicNPC is part of the Rust bundle — {platform.games.rust.bundle.tag}
carries RunicNPC {platform.games.rust.bundle.runicnpc} — beside the bridge plugin and the sidecar,
and it arrives the way they do. See [Install the bridge](/docs/rust/install-the-bridge/).
- **The installer** places `RunicNPC.cs` beside the bridge plugin, checked against the bundle's
checksum, and refuses a bundle without it. `doctor --game rust` **fails** when RunicNPC is
missing, and warns when the file was edited by hand. `uninstall` removes `RunicNPC.cs` and keeps
its data.
- **The Pterodactyl egg** places it the same way on every install and reinstall.
Once the server has started, **Admin → Rust servers** shows it as complete. A server without
RunicNPC, or with one older than the bridge needs, reads *Incomplete* with the reason, and every
*Place NPCs* step on it is refused. **Admin → Rust NPC profiles** lists each server's RunicNPC
version and API.
**The first push adopts what the server had.** When the site first pushes profiles to a server,
the profiles that server already had become site profiles for that server alone, so nothing on it
changes. See [NPC profiles](/docs/rust/runicnpc/npc-profiles/).
## Without Runic Gateway
1. Download `runicnpc-<version>.tar.gz` and `SHA256SUMS` from the
[releases page](https://gitea.whitlocktech.com/RunicGateway/runicnpc-rust/releases), and check
the tarball: `sha256sum -c SHA256SUMS`.
2. Install Kits from uMod if the server does not have it.
3. Copy `runicnpc/RunicNPC.cs` from the tarball into `oxide/plugins/` or `carbon/plugins/`. The
framework compiles and loads it at once.
4. At the server console, run `rnpc.status`. It should say `navmesh=ready` — a fresh map builds
its navmesh for several minutes after its first boot — and `swap fields: … missing=- added=-`.
5. Grant `runicnpc.place` or `runicnpc.admin` to whoever places NPCs, then `/rnpc place raider`
where you look.
**It comes with examples.** On its first load RunicNPC writes four example kits into Kits' data
file — `rnpc_raider`, `rnpc_campguard`, `rnpc_sniper` and `rnpc_juggernaut`, each where its name is
free and each behind a Kits permission nobody is granted, so no player can claim one. On a server
no site manages it also adds four example profiles: a raider, a camp guard, a sniper and the
Juggernaut, a boss. It then reloads Kits once so the new kits are known. **Nothing is written
again**, even if you delete them.
<Aside type="caution" title="Do not create RunicNPC's data folder yourself">
RunicNPC makes `data/RunicNPC/` on its first load. One made from outside the game — a panel's
file manager, for example — may not be writable by the game.
</Aside>
## Its files
Under `oxide/`, or `carbon/` on Carbon.
| File | What it holds | Who writes it |
|---|---|---|
| `plugins/RunicNPC.cs` | The plugin | The installer, the egg, or you |
| `config/RunicNPC.json` (Carbon: `configs/`) | The caps and the spawn budget — see [Cost and caps](/docs/rust/runicnpc/cost-and-caps/) | You |
| `data/RunicNPC/profiles.json` | The profiles and the faction table, and whether a site manages them | The site, on a Runic Gateway server; otherwise `rnpc.profile` and `rnpc.faction` |
| `data/RunicNPC/placements.json` | The placements | `/rnpc`, the API, and the site's map |
| `data/RunicNPC/routes.json` | The recorded routes | `/rnpc path` |
| `data/RunicNPC/state.json` | Its own bookkeeping: whether the examples were written | RunicNPC |
After editing `profiles.json` or `routes.json` by hand, run `rnpc.reload`.
## After a Rust update
Rust's monthly update can change the scientist RunicNPC is built on. After it:
1. **Wait for the navmesh.** `rnpc.status` says `navmesh=building` while Rust rebuilds it, about
ten minutes on a large map. Placements wait, and spawn when it is ready; a spawn through the
API is refused until then.
2. **Check the swap.** The `swap fields` line should end `missing=- added=-`. Anything else means
Rust's scientist has changed since this RunicNPC was released: update RunicNPC. On a Runic
Gateway server, `update --game rust` or an egg reinstall takes the current bundle.
3. **Check the hooks.** `rnpc.status` names any hook that has never fired as `silent`. One that
stays silent long after players have been on is the first sign Rust renamed it, because
neither framework reports a hook that matches nothing.
In the week before each monthly forced wipe, every new Rust staging build is tried against
RunicNPC, so a release that needs fixing is usually out before the update is.
## Reading `rnpc.status`
<Code
lang="text"
code={[
`RunicNPC ${platform.releases['runicnpc-rust'].replace(/^v/, '')} api=${platform.runicnpc.api} hooks=12 fired=12 silent=0`,
'framework=oxide navmesh=ready swap fields: npc=55/55 brain=32/32 missing=- added=-',
'npcs=14 awake=9 goingHome=0 asleep=5 owners: placement:bandit-1=3 run:42=11',
].join('\n')}
/>
The rest of its answer lists the profiles it refuses and why, the placements waiting and why, the
faction pairs, the caps, and the [cost warning](/docs/rust/runicnpc/cost-and-caps/).

View File

@@ -0,0 +1,68 @@
---
title: NPC placements
description: Placing RunicNPC's NPCs from the site's live map — how a click becomes a placement, and editing, renaming, respawning and removing what is already placed.
---
**Admin → Rust NPC placements** shows one server's RunicNPC placements on its live map, and
places new ones where you click. **Placements live on the server**, not on the site: an admin's
`/rnpc place` in game and this screen edit the same list, and both see each other's at once. So
every read and write here is a live round trip to the game, and a server that is down has nothing
to show.
A server appears in the **Server** list once its RunicNPC can take placements from the site. If
none can yet, the screen says why for each.
## Placing NPCs
**Click the map where they should stand.** The site sends the point — a spot on the map, with no
height — and the server does the rest, exactly as `/rnpc place` would:
- it **puts the point on the ground**, by a ray down onto terrain and rock — never a building or a
tree;
- it **checks the spot against Rust's navmesh**, and refuses a roamer's spot that is off it, with
how far off it is;
- it refuses a point off the map or under water;
- it **names the placement** after its profile and the first free number, `raider-3`.
The form under the map takes what `/rnpc place` takes:
| Field | Means |
|---|---|
| **Profile** | The profiles this server is pushed — see [NPC profiles](/docs/rust/runicnpc/npc-profiles/) |
| **How many** | How many NPCs stand there; all but the first are scattered within 3 m |
| **Respawn (s)** | Seconds after a death before an NPC comes back |
| **Come back** | *each*, after its own death, or *together*, once all are dead |
| **Movement** | The profile's own, `wander`, `monument`, or one of the server's recorded routes. Not shown for a sentry |
| **Radius (m)** | How far a wanderer strays |
| **Keep inside zone** | A ZoneManager zone its NPCs never leave. The server refuses a zone it does not have, or one that does not hold the spot |
**The answer** says the placement's name, where it landed and how high, and the
[cost warning](/docs/rust/runicnpc/cost-and-caps/) for the NPCs the server will then have. If the
spot is on something players built, it says so: if that is destroyed, the NPCs stand on the
nearest navmesh until it is rebuilt.
**A roof or the top of a building is placed in game.** The map only knows the ground; stand on
the roof and use `/rnpc place` or `/rnpc here`.
## What is already placed
Each placement is a pin on the map — yellow, or grey while it waits — and a row in **Placements**:
its name, how many of which profile, how many are alive, the respawn, the movement, its zone and
where it is. Above the list is the cost warning for everything this server runs now.
| Button | Does |
|---|---|
| **Edit** | Change any of the form's fields. Its NPCs are removed and spawn again from the new values |
| **Rename** | Give it a new name. Its live NPCs keep living under it |
| **Respawn** | Remove its NPCs and spawn them again at once |
| **Remove** | Remove the placement and its NPCs, after a second click to confirm |
**A placement can wait.** Its row says why in red — *profile 'guard' is missing*, for example,
because the profile was deleted or is no longer pushed to this server; or its route or zone has
gone; or the map's navmesh is still being built after an update. A waiting placement spawns again
by itself once the thing it waits for is back. A grey note under a row says its NPCs stand
somewhere other than their spot because the ground there went; *Last spawn failed* gives the last
error.
**Recording a route is done in game**, with `/rnpc path` — see
[Commands](/docs/rust/runicnpc/commands/#routes). Once saved, it is offered in **Movement** here.

View File

@@ -0,0 +1,113 @@
---
title: NPC profiles
description: Authoring RunicNPC's profiles and faction table on the site — which servers each profile is for, how the site pushes them, what the first push adopts, and the editor's sections.
---
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
no in-game profile editor: on a server a site manages, the profiles and the faction table are the
site's, and the console commands that would change them are refused. Where NPCs stand is a
separate question, answered on [NPC placements](/docs/rust/runicnpc/npc-placements/), in game with
`/rnpc place`, or by an event's *Place NPCs* step.
The screen has four parts: the servers, the profiles, the faction table, and — once there are
any — the profiles a first push replaced.
## Servers
One row per Rust server: its RunicNPC version and API, and when the site last pushed to it, or
why the last push failed. A server without RunicNPC, or with one too old to be managed, shows the
reason instead and is left alone; its events keep Rust's own scientists.
**The site pushes on its own.** Every half-minute it asks each server whether it needs a push —
the first one, a change to its set, a restart, a failure worth retrying, or a quarter-hourly
audit — and pushes only then. A saved profile reaches each server within about half a minute.
**Push now** does it at once, and says what happened: how many profiles went, what was adopted,
and any RunicNPC refused, with the reason.
**A refusal shows under its server.** A push replaces the server's whole set, and RunicNPC keeps
every profile it can accept: one it refuses — a kit that server lacks, say — is listed under the
server in red, and the rest are in use at once.
## The first push adopts what the server had
A server that ran RunicNPC before the site managed it already has profiles, and placements that
use them. So **before the first push, the site reads that server's own profiles and imports them
as profiles for that server alone**, then pushes them back. Nothing on the server changes, and its
placements keep spawning. An adopted profile says *adopted from* its server in the list.
Where a site profile of the same name already covered that server, the site's wins, and the
server's own is kept under **Replaced**, with **Restore** to put it back in use on its server and
**Delete** to drop it.
## Profiles
Each row shows a profile's label and RunicNPC name, the servers it is for, its role, whether it is
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.
<Screenshot id="admin-rust-npcs" />
### Which servers
A profile is for **every server** — including servers added later — or for the ones ticked. Each
server is pushed only the profiles that cover it, so two servers can each have a different
`warden`.
### The editor
**Name** is RunicNPC's name for the profile — 1 to 40 of a-z, 0-9, `_` and `-` — and what
`/rnpc place` and an event step use. The rest is in sections, each a group of
[profile fields](/docs/rust/runicnpc/profile-fields/), which says what every field does and its
limits:
| Section | What it sets | Shown |
|---|---|---|
| **Looks** | Names, kits, prefab and role | Always |
| **Moving** | How it moves, its wander radius, and when it sleeps | Not for a sentry, which never moves |
| **Fighting** | Health, damage dealt and taken, aim, vision, ranges, and the health thresholds an event can wait for | Always |
| **Press E** | A line in the player's chat, or a window | A passive profile only |
| **Boss** | The health bar, the lines said in game, and the phases | Any role but passive |
| **Loot** | What the corpse starts with, the rows always rolled, the pool, and the crate | Always; off keeps Rust's scientist loot |
| **Sides** | Faction, its own exceptions, alert radius, turrets, and whether players and it can hurt each other | Always |
| **The kit's extras** | Healing, grenades, melee, rockets and the flamethrower | Always |
**Choosing *Passive* changes two other fields** for you: it stops players hurting the NPC and
makes it stand where it is placed. Choosing another role again sets them back.
**The editor speaks in friendlier units than the file.** Health thresholds, a loot row's chance
and a phase's *At health* are percentages here, and a locked crate's hack time is in minutes; the
file and the API hold fractions and seconds. The site converts both ways.
**Kits are checked when you save.** Every server the profile is for that answers is asked for
its kits, and a kit any of them lacks refuses the save, naming the server and the kit. A server
that does not answer is left to RunicNPC, which refuses the profile there at the next push.
**Kills count** is the site's, not RunicNPC's: how the leaderboard and chat titles count this
profile's kills.
| Choice | Counts |
|---|---|
| **Per server** (the default) | Kills of this name on the server a leaderboard is for |
| **Every server with this name** | Kills of this name on every server |
| **This profile only** | Kills of this profile only, on whichever servers it is pushed to |
**Delete profile** removes it from every server it covered at the next push. Placements that use
it **wait** rather than vanish, and spawn again if a profile of that name comes back.
## The faction table
How factions treat each other, for the whole site, pushed to every server with the profiles. One
row is both ways: *bandits ↔ guards: hostile* makes each hunt the other. A pair that is not listed
is neutral, and a faction is always allied to itself. `scientists` and `animals` are Rust's own; a
profile hostile to scientists fights them, and they only take cover. A profile's own exceptions,
set in its **Sides**, win over the table.
<Aside title="Fighting NPCs is opt-in">
With no faction settings, a profile fights players only. Fighting Rust's scientists, animals or
other profiles costs about what fighting players does — see
[Cost and caps](/docs/rust/runicnpc/cost-and-caps/) — and an NPC only fights what comes within its
chase range of its spot: it never walks into a monument to look for scientists.
</Aside>

View File

@@ -0,0 +1,152 @@
---
title: Profile fields
description: Every field of a RunicNPC profile, by its JSON path — the same path the site's editor, rnpc.profile set, the data file and the API all use — with its limits and what it does.
---
import Ticks from '../../../../../components/Ticks.astro';
import { runicnpcProfileFields } from '../../../../../data/runicnpc.mjs';
export const Fields = ({ group }) => (
<table>
<thead><tr><th>Field</th><th>On the site</th><th>Allowed</th><th>What it does</th></tr></thead>
<tbody>
{Object.entries(runicnpcProfileFields[group]).map(([path, f]) => (
<tr key={path}>
<td><code>{path}</code></td>
<td>{f.site ?? <em>not in the editor</em>}</td>
<td><Ticks text={f.rule} /></td>
<td><Ticks text={f.meaning} /></td>
</tr>
))}
</tbody>
</table>
);
A profile is a named description of an NPC. Its fields are the same wherever a profile is
written, so this one page serves all four places:
- **The site's [profile editor](/docs/rust/runicnpc/npc-profiles/)**, whose sections this page
follows, and whose label for each field is in the second column.
- **The console**, where `rnpc.profile set <name> <field> <value>` takes the path in the first
column: `rnpc.profile set warden ranges.sense 40`.
- **The data file**, `data/RunicNPC/profiles.json`, on a server no site manages.
- **[The API](/docs/rust/runicnpc/api/)**: `RunicNpc_SetProfiles` takes profiles in this shape,
and `RunicNpc_Spawn`'s overrides change any of these fields for one NPC.
The paths are checked against the API's specification on every build. **The site's editor shows
some values in friendlier units**: health thresholds, a loot row's chance and a phase's health as
percentages, and the hack time in minutes. Everywhere else they are fractions and seconds.
**A profile is checked whole when it is saved.** A kit the server does not have refuses the
profile then, not when an NPC spawns; a refused profile is kept, and listed with its reason, but
never spawns.
## Looks
<Fields group="Looks" />
## Moving
<Fields group="Moving" />
## Fighting
<Fields group="Fighting" />
## Press E
<Fields group="Press E" />
A passive profile, as it looks in the file:
```json
{
"names": ["Quartermaster"], "kits": ["outpost_clothes"], "role": "passive",
"movement": { "mode": "stand", "radius": 0 },
"hurtByPlayers": false,
"use": { "mode": "chat", "lines": ["Back again, {player}?", "Supplies are short."], "title": "", "text": "" }
}
```
## Boss
<Fields group="Boss" />
A boss gives no reward of its own. On a Runic Gateway server, an event's reward steps do, and can
name everyone who hurt it.
## Loot
<Fields group="Loot" />
## Sides
<Fields group="Sides" />
**Whom it fights besides players** is decided by its own senses: only factions it is hostile to,
within its sense range of itself and its chase range of its spot, so it never walks into a
monument to look for scientists. Rust's scientists never fight back, by Rust's own rule; they take
cover. Whoever shoots one of RunicNPC's NPCs, it fights back, whatever the table says.
## The kit's extras
<Fields group="The kit’s extras" />
## A whole profile
A roamer that is also a boss, with its own loot, as it looks in the file and through the API:
```json
{
"names": ["Warden", "Old Warden"],
"kits": ["warden_rifle", "warden_smg"],
"prefab": "scientistnpc_roam",
"role": "roamer",
"movement": { "mode": "wander", "radius": 20 },
"health": 250,
"damageDealt": 1.0,
"damageTaken": { "head": 1.0, "body": 1.0, "legs": 1.0 },
"aimCone": 2.0,
"ranges": { "sense": 30, "loseTarget": 40, "chase": 40, "attack": 30 },
"visionCone": -0.8,
"sleepDistance": 160,
"healthThresholds": [0.5],
"faction": "bandits",
"relations": { "scientists": "hostile" },
"alertRadius": 40,
"turrets": "default",
"hurtByPlayers": true,
"hurtsPlayers": true,
"kitUse": { "heal": false, "grenades": false, "melee": false, "rockets": false, "flamethrower": false },
"boss": {
"barDistance": 100,
"announce": "chat",
"spawnLine": "{name} has risen!",
"deathLine": "{name} has fallen to {killer}.",
"phases": [
{ "at": 0.5, "adds": { "profile": "raider", "count": 3 }, "line": "{name} calls for help!" },
{ "at": 0.25, "damageDealt": 1.5, "speed": 1.3, "kit": "warden_heavy", "line": "{name} is enraged!" }
]
},
"use": null,
"loot": {
"start": "rust",
"always": [
{ "item": "scrap", "min": 100, "max": 300, "chance": 1 },
{ "item": "rope", "min": 1, "max": 1, "chance": 0.5 }
],
"pool": {
"pick": 1,
"nothing": 85,
"rows": [
{ "item": "lmg.m249", "min": 1, "max": 1, "weight": 10 },
{ "item": "explosive.timed", "min": 1, "max": 1, "weight": 5 }
]
},
"crate": "locked",
"hackSeconds": 600,
"corpseSeconds": 0,
"dropTable": true
}
}
```

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 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
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.
<Screenshot id="rust-map" />
## The picture
**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
* ---------------------------------------------------------------------------------------
* `capabilities.mjs` describes what a DEPLOYMENT does, and it is checked against
* `module-uo`'s manifest because the module declares its capabilities in a machine-readable
* file. The app declares nothing of the kind: what it does is a set of screens in
* `capabilities.mjs` and `games/` describe what a DEPLOYMENT does, and each game's list is
* checked against its module's manifest because a module declares its capabilities in a
* 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
* 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.
@@ -18,11 +18,19 @@
* ---------------------------------------------------------------------------------------
* "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
* 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,
* 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[] }[]} */
export const appFeatures = [
{
heading: 'The shard, live',
heading: 'The game, live',
blurb:
'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 visibility settings are per-feature and default to off.',
items: [
{
title: 'Status, and the boards',
title: 'Ultima Online: the server, its boards and its market',
body:
'Whether the game server is up, plus champion spawns, guilds, city governors and ' +
'houses as the shard reports them.',
gate: 'A game module, and the matching visibility feature',
'Whether the game server is up and what it reports — its champions, Teams, ' +
'governors and houses — plus the player marketplace down to a single vendor, the ' +
"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:
'Player-run vendors and what is on their shelves, down to a single vendor. Item ' +
"names arrive as the game's own string ids and are resolved against its string " +
'table, so they read the way they read in the client.',
gate: 'A game module publishing the market',
},
{
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',
'Every server the community runs, and a page for each with its feed, its ' +
'leaderboard, who is online, its history on the site, and its live map with the ' +
'layers you may see — positions refreshed every ten seconds while the map is open.',
gate: 'The Rust module, per feature',
},
],
},
@@ -117,12 +121,29 @@ export const appFeatures = [
'per device from the app.',
},
{
title: 'Your characters, vendors and houses',
title: 'Your own side of the game',
body:
'Character sheets, the vendors you run and the houses you own, visible to the ' +
'account they belong to and to nobody else.',
'On Ultima Online, your character sheets, the vendors you run and the houses you ' +
'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',
},
{
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
* 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
* the public demo (§15) the tester target rather than naming a private shard, which
* means the beta opens when the demo VM does. `notBuilt.mjs` already carries that
* absence; this page renders the demo link from `demoUrl` when there is one.
* the public demo (§15) the tester target rather than naming a private shard. The demo
* went up on 2026-10-27; with `demoUrl` mounted, `/beta` marks this gate in place and
* 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
* 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:
'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 — ' +
'so a tester needs either their own deployment or the public demo, which is the ' +
'second of the two things this beta is waiting on.',
'so a tester needs either their own deployment or the public demo.',
},
];

View File

@@ -16,23 +16,17 @@
* 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
* module is installed, and today that is `module-uo`. Its items therefore carry the
* capability slugs the module actually declares in its `module.json`, and
* `assertCapabilityCoverage()` fails the build if the two lists drift apart.
* "What a game module adds" is the only group core does not supply — it comes from
* whichever module is installed. Until phase 17 it was "Game intelligence" and listed the
* Ultima Online module's features in that game's words, on the homepage and `/features/`.
* 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
* `scripts/checkFacts.mjs` re-reads it from the module's manifest on every build — so the
* 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.
* The capability check moved with the lists: `assertGameCoverage()` in `games/index.mjs`
* holds each game's features to the capabilities its module declares, in both directions.
*
* ---------------------------------------------------------------------------------------
* `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 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
* word for a Team, so `module-uo` calls them guilds and builds the pages, and a future
* module can call them something else on the same primitive.
* word for a Team, so each module calls them what its game calls them and builds the pages
* on the same primitive.
*
* 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
@@ -57,7 +51,7 @@
* ---------------------------------------------------------------------------------------
* `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
* "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
@@ -68,11 +62,15 @@
* 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 —
* 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
* `/uo/…`; a deployment running a different module would deep-link somewhere else, which is
* why these sit beside the `caps` slugs on the module-supplied items.
* guessed. A module's public pages are namespaced under its own id, so a route into the
* Ultima Online module is `/uo/…`. A link into a module's pages names that game
* (`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
* from whichever fields that group's items happen to use — and then `/features/` cannot
@@ -83,9 +81,10 @@
* @typedef {object} Capability
* @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[]} [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 {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
* @property {string} id
@@ -120,12 +119,13 @@ const community = {
label: 'Teams',
needsModule: true,
demoPath: '/uo/guilds',
demoGame: 'uo',
detail:
'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 ' +
'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 ' +
'different game can call them something else without core learning a new word.',
'which is how a group the game already has becomes a Team on the site — and why ' +
'each game keeps its own name for one without core learning a new word.',
},
{
label: 'Team forums',
@@ -178,102 +178,66 @@ const community = {
};
/**
* Game intelligence — module-supplied. The `caps` arrays are the contract with
* `platform.json`; see `assertCapabilityCoverage` below.
* What a game module adds — module-supplied, and written in core's words (D63, D75). Each
* 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}
*/
const gameIntelligence = {
id: 'game-intelligence',
title: 'Game intelligence',
const gameModule = {
id: 'game-module',
title: 'What a game module adds',
moduleSupplied: true,
summary:
'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 ' +
'live game server, and the Rust module brings its own set in its place.',
'Ultima Online and for Rust, and each adds its own set from a live game server — these ' +
'are the parts they share.',
items: [
{
label: 'Live server status',
caps: ['shard'],
demoPath: '/uo/shard',
detail:
'Whether the server 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.',
'Whether each game server is up, who is on it, and how long ago the site last heard ' +
'from it. When the game is down the site is the thing that says so — it does not go ' +
'down with it.',
},
{
label: 'Economy and activity',
caps: ['shard'],
demoPath: '/uo/shard/activity',
label: 'A live feed of the world',
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.',
'What is happening in the game, as it happens. Every kind of event passes an ' +
'allowlist the module holds before it can reach a public page; staff read a second ' +
'stream carrying the rest.',
},
{
label: 'Character sheets',
caps: ['shard'],
label: 'Leaderboards',
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.',
'The numbers the game already keeps, published without anyone exporting a ' +
'spreadsheet on a Sunday — and kept by the site after the game has moved on.',
},
{
label: 'Points and loyalty boards',
caps: ['shard'],
demoPath: '/uo/leaderboards',
label: 'Maps of the world',
detail:
'The leaderboards the game already keeps, published without anyone exporting a ' +
'spreadsheet on a Sunday.',
'Where things are, drawn from the server rather than from someone else’s idea of the ' +
'game: one module maps what spawns where, the other shows what is moving now.',
},
{
label: 'Player-vendor marketplace',
caps: ['market', 'cliloc'],
demoPath: '/uo/market',
label: 'Teams, from the game',
detail:
'Every player vendor on the server and what is on it, searchable without logging ' +
'in to the game. Item names arrive from the world as numeric ids and are resolved ' +
"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.",
'The groups players already form in the game arrive as Teams on the site, with the ' +
'forum, notifications and voice channel core attaches to one.',
},
{
label: 'Houses and IDOC decay',
caps: ['houses'],
demoPath: '/uo/houses',
label: 'Players’ own game accounts',
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.',
'A player links their game identity to their site account and sees their own side ' +
'of the game on it. Who may see another player at all is the operator’s choice.',
},
{
label: 'Spawn atlas',
caps: ['atlas'],
demoPath: '/uo/atlas',
label: 'Game steps for scheduled events',
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 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.',
'What an event may do inside the world comes from the module: core runs the ' +
'calendar, the budget and the undo, and the module brings the steps.',
},
],
};
@@ -372,7 +336,7 @@ const integration = {
{
label: 'Discord: slash commands, notifications, voice',
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 ' +
'that maintains its own membership.',
},
@@ -429,7 +393,7 @@ const infrastructure = {
export const capabilityGroups = [
community,
gameIntelligence,
gameModule,
administration,
integration,
infrastructure,
@@ -456,46 +420,11 @@ export function capabilityGroup(id) {
);
}
/**
* Fails the build when the module's declared capabilities and this page's list disagree.
*
* Called from the component rather than from a check script on purpose: the failure needs
* 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`.
/*
* 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
* lists it checks.
*/
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`.
@@ -505,8 +434,9 @@ export function assertCapabilityCoverage(declared) {
* 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.
*
* Called from `/features/` for the same reason `assertCapabilityCoverage` is called from
* the homepage: the build error should name the page that would have shipped wrong.
* Called from `/features/` for the same reason `assertGameCoverage` is called from the
* 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() {
const missing = [];
@@ -515,6 +445,11 @@ export function assertDetailCoverage() {
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;

View File

@@ -24,8 +24,9 @@
* `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
* a deployment the user typed the address of, run by whoever runs that
* community. What is listed here is therefore mostly what the device
* HOLDS, not what we receive, because we receive nothing.
* community. What is listed here is what the device holds and what it
* 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,
* 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
@@ -46,13 +47,23 @@
* @property {string} summary Short enough to sit in a table cell.
* @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
* How this row answers Google Play's Data Safety form. `app` scope only — see
* `scripts/playDataSafety.mjs`, which is the only reader.
* @property {string} category The console's grouping, e.g. "Personal info".
* @property {string} type The console's data type within that grouping.
* @property {boolean} collected Does it leave the device to a server WE operate?
* @property {boolean} shared Do we pass it to a third party?
* @property {PlayType[]} types The console data types this row answers.
* @property {boolean} collected Does it leave the device? Play counts data the app sends
* off the phone as collected, whoever runs the server it
* 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} because Why that answer is the truthful one.
*
@@ -64,9 +75,74 @@
* @property {Retention} retention
* @property {string} source The file this was read out of, repo-relative.
* @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 = [
/* =====================================================================================
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
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
build — the manifest asks for INTERNET, network state, notifications and a data-sync
foreground service, and nothing else.
build — the manifest asks for INTERNET, network state, notifications, a special-use
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
a question on the console form that somebody will answer from memory (D33).
@@ -172,54 +254,103 @@ export const collected = [
{
id: 'app-session-tokens',
scope: 'app',
title: 'Your sign-in tokens',
title: 'Your sign-in, and the tokens it issues',
body:
'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.',
'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: {
summary: 'On the device until you sign out',
detail: 'Signing out clears them; uninstalling the app removes them with it.',
summary: 'On the device until you sign out or delete the account',
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: {
category: 'Personal info',
type: 'User IDs',
collected: false,
types: [{ category: 'Personal info', type: 'User IDs' }],
collected: true,
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:
'The credentials are issued by, and returned to, a server the user nominated. ' +
'Nothing reaches an endpoint under our control, because we run none.',
'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.',
},
},
{
id: 'app-trust-token',
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:
'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.',
'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: {
summary: 'On the device until it expires or you revoke it',
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.',
'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: {
category: 'Personal info',
type: 'User IDs',
collected: false,
types: [{ category: 'Device or other IDs', type: 'Device or other IDs' }],
collected: true,
shared: false,
answer: 'Not collected by us.',
required: true,
purposes: ['Account management', 'Fraud prevention, security, and compliance'],
answer: 'Collected, not shared, required.',
because:
'Same as the session tokens: minted by the user’s deployment, stored on the ' +
'device, presented back to that same deployment.',
'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.',
},
},
{
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' },
source: 'core/prefs/ServerPreferences.kt',
play: {
category: 'App info and performance',
type: 'Other app data',
types: [],
collected: false,
shared: false,
answer: 'Not collected by us. Stored on the device only.',
answer: 'Not collected. Stored on the device only.',
because:
'It never leaves the phone. It is the destination of requests, not the contents ' +
'of one.',
@@ -257,52 +387,210 @@ export const collected = [
'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.',
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:
'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 ' +
'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: {
category: 'Messages',
type: 'Other in-app messages',
collected: false,
types: [{ category: 'Device or other IDs', type: 'Device or other IDs' }],
collected: true,
shared: false,
required: true,
purposes: ['App functionality'],
answer:
'Not collected by us. Declare the relay hop in the console’s free-text ' +
'security section if it asks.',
'Collected, not shared, required. Mention the relay in the free-text security ' +
'section if the console asks.',
because:
'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.',
'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.',
},
},
{
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',
scope: 'app',
title: 'Everything you read and post in the app',
title: 'What you post and send from the app',
body:
'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.',
'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.',
retention: {
summary: 'Held by the deployment, under its operator’s policy',
},
source: 'PLAN.md §9 section 2',
source: 'data/api/AdminApi.kt',
play: {
category: 'Messages',
type: 'Other user-generated content',
collected: false,
types: [
{ category: 'Messages', type: 'Other in-app messages' },
{ category: 'App activity', type: 'Other user-generated content' },
],
collected: true,
shared: false,
answer: 'Not collected by us.',
required: true,
purposes: ['App functionality'],
answer: 'Collected, not shared, required.',
because:
'Content is written to the community’s own installation. We have no copy, no ' +
'access and no way to obtain one.',
'Posts, broadcasts and replies are written to the community’s own installation. ' +
'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 ' +
'messages.',
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:
'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 ' +
'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 ' +
@@ -328,15 +616,13 @@ export const collected = [
},
source: 'core/inbox/DataStoreInboxCache.kt, data/repository/AuthRepository.kt',
play: {
category: 'Messages',
type: 'Other in-app messages',
types: [],
collected: false,
shared: false,
answer: 'Not collected by us. Stored on the device only.',
answer: 'Not collected. Stored on the device only.',
because:
'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.',
'delivered. It is not uploaded anywhere.',
},
},
{
@@ -351,14 +637,13 @@ export const collected = [
retention: { summary: 'Nothing to retain' },
source: 'app/build.gradle.kts, app/src/main/AndroidManifest.xml',
play: {
category: 'Device or other IDs',
type: 'Device or other IDs',
types: [{ category: 'App info and performance', type: 'Crash logs' }],
collected: false,
shared: false,
answer: 'Not collected.',
answer: 'Not collected. The advertising ID declaration is "no".',
because:
'No advertising ID, no analytics identifier, and no library that would generate ' +
'one is linked into the build.',
'No crash reporter, no advertising ID, no analytics identifier, and no library ' +
'that would generate one is linked into the build.',
},
},
@@ -376,9 +661,90 @@ export const collected = [
body:
'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 ' +
'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' },
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',
@@ -425,7 +791,10 @@ export const collected = [
title: 'Everything posted on the site',
body:
'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 ' +
'Discord’s own terms.',
retention: {
@@ -434,7 +803,9 @@ export const collected = [
'Soft-deleted forum uploads and Team activity have retention windows an admin ' +
'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',
@@ -505,12 +876,23 @@ export const collected = [
scope: 'deployment',
title: 'Game data from the connected server',
body:
'Where a game module is installed, information about characters, guilds, houses and ' +
'the in-game economy flows from the game server to the site through the bridge. ' +
'Which of it is visible to the public is the operator’s decision, made in the ' +
'admin panel — the bridge itself forwards, and the site decides.',
retention: { summary: 'Operator-configured' },
source: 'docs/link/v7.md — the visibility framework',
'Where a game module is installed, what happens on the game server flows to the site ' +
'through the bridge, and the module keeps it. With Ultima Online that is characters ' +
'and their accounts, Teams, houses and the in-game economy. With Rust it is each ' +
'player’s Steam id and in-game name, their statistics, who is online, and the ' +
'server’s event record — which includes in-game chat, player reports and the IP ' +
'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);
}
/**
* 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.
*

View File

@@ -30,6 +30,7 @@ export function footerColumns(brand) {
{ href: '/features/', label: 'Features' },
{ href: '/architecture/', label: 'Architecture' },
{ href: '/modules/', label: 'Modules' },
{ href: '/runicnpc/', label: 'RunicNPC' },
{ 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,
* 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).

View File

@@ -117,23 +117,9 @@ export const notBuilt = [
resolvedBy: 'A game server that runs there.',
link: { href: `${GITEA}/docs/src/branch/main/installer/INSTALL.md`, label: 'The operator guide' },
},
{
id: 'public-demo',
// Phase 5 added `app` and `beta`, and that is not tidying. D27 makes the demo the
// 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.',
},
// `public-demo` stood here until 2026-10-28. Its `resolvedBy` was met when
// demo.runicgateway.com went up (docs/website/DEMO_MODE.md), and the site reaches it through
// the mounted `demoUrl`, as the entry promised (D82, D83).
/* ---------------------------------------------------------------------------------------
THE ANDROID CLIENT (phase 5)

View File

@@ -12,14 +12,14 @@
"wrong protocol number in the first place."
],
"verifiedOn": "2026-10-22",
"verifiedOn": "2026-10-30",
"$comment_moduleApi": [
"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,",
"so they appear on that game's own pages."
],
"moduleApi": "1.17.0",
"moduleApi": "1.21.0",
"$comment_releases": [
"Every repository whose release the site quotes, flat, so checkFacts.mjs reads them all",
@@ -27,12 +27,12 @@
],
"releases": {
"installer": "v0.8.1",
"Android-app": "v0.5.0",
"Android-app": "v0.7.0",
"link": "v2.3.0",
"Module-uo": "v1.3.0",
"Module-uo": "v1.4.1",
"Rust-Link": "v0.3.0",
"Rust-Plugins": "v0.3.0",
"Module-Rust": "v0.5.0",
"Rust-Plugins": "v0.3.1",
"Module-Rust": "v0.7.0",
"runicnpc-rust": "v1.0.0"
},
@@ -61,7 +61,7 @@
"protocol": 8,
"module": {
"repo": "Module-uo",
"coreApi": "^1.10.0",
"coreApi": "^1.20.0",
"capabilities": ["shard", "atlas", "market", "governors", "guilds", "houses", "champs", "cliloc"]
},
"sidecarRepo": "link",
@@ -79,15 +79,15 @@
"protocol": 14,
"module": {
"repo": "Module-Rust",
"coreApi": "^1.17.0",
"coreApi": "^1.21.0",
"capabilities": ["rust", "servers", "killfeed", "leaderboard", "presence", "wipes", "identity", "map"]
},
"sidecarRepo": "Rust-Link",
"pluginRepo": "Rust-Plugins",
"bundle": {
"tag": "2026.10.22",
"tag": "2026.10.30",
"sidecar": "v0.3.0",
"plugin": "v0.3.0",
"plugin": "v0.3.1",
"oxideMin": "2.0.7585",
"carbonMin": "2.0.259",
"requiresPlugins": ["Kits", "ZoneManager"],
@@ -120,17 +120,18 @@
"",
"`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",
"actually work. The org lead reports v0.5.0's does not, so the download block renders a",
"'being replaced' state instead of a link, and flipping this to true is the single edit",
"that turns the link back on once a working build is released. A check cannot run an",
"APK; a person can, and this is where they record that they did."
"actually work. v0.5.0's did not, and while false the download block renders a 'being",
"replaced' state instead of a link. A check cannot run an APK; a person can, and this",
"is where they record that they did. v0.7.0's was installed on an Android 16 emulator",
"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": {
"asset": "runic-gateway-0.5.0.apk",
"asset": "runic-gateway-0.7.0.apk",
"checksums": "SHA256SUMS",
"minSdk": 29,
"minAndroid": "10",
"serviceable": false
"serviceable": true
},
"gitea": {

View File

@@ -412,5 +412,9 @@ export const canonicalDocs = {
'modules/rust/PLAN.md': 'The Rust module design of record',
'modules/rust/OPERATING.md': "Running Oxide: uMod's operator pages, plus the notes on RaidableBases and Guarded Crate",
'modules/rust/CARBON.md': 'Where Carbon differs from Oxide, and nowhere else',
'runicnpc/API.md': "RunicNPC's API for other plugins — normative over the site's copy",
'runicnpc/COMMANDS.md': "RunicNPC's commands and permissions",
'runicnpc/INSTALL.md': 'Installing RunicNPC, with or without Runic Gateway',
'runicnpc/PLAN.md': "RunicNPC's design of record, and why each behaviour is shaped as it is",
},
};

513
src/data/runicnpc.mjs Normal file
View File

@@ -0,0 +1,513 @@
/**
* RunicNPC, as the site carries it — PLAN.md §16, phase 16 (D62, D72–D74).
*
* D62 made the API an exception to §1: the site carries it IN FULL rather than linking to it,
* because its readers are plugin authors outside this project. `docs` `main:runicnpc/API.md`
* stays normative, and `scripts/checkReference.mjs` holds everything below that API.md names
* against it in both directions (D73): every call's and hook's signature, and the field names
* of every data shape. A signature that differs by one parameter fails the build.
*
* The commands, permissions, `/rnpc place` options and config keys are names too, and are
* checked the same way against the plugin's own source, `runicnpc-rust` `main:plugin/RunicNPC.cs`.
*
* Descriptions are written in the site's own words and are NOT checked (the same rule as
* reference.mjs). D74: they carry no decision numbers and no "added in API n" history — the
* site describes the current API only. Backticks in a description render as code
* (`src/components/Ticks.astro`).
*/
/** Who owns an NPC, which decides how long it lives. API.md "Owners". */
export const runicnpcOwners = {
'run:<id>': {
who: 'An event run, through the bridge',
lifetime: 'Never saved. Removed by its caller, or by `RunicNpc_DespawnOwner`',
},
'plugin:<name>': {
who: 'Any other plugin — use your own plugin’s name',
lifetime: 'Never saved. **Removed when that plugin unloads**',
},
'placement:<id>': {
who: 'RunicNPC itself, for a placement. A caller cannot spawn with this owner',
lifetime: 'The NPC is never saved; the placement is, and spawns a fresh one at boot',
},
};
/**
* Every call, as `name: { params, returns }`. The signature compared is
* `name(params) → returns`, whitespace collapsed. The prose for each is on the API page,
* under a `<Signature call="…" />` for it; the check also requires every call here to have
* exactly one.
*/
export const runicnpcCalls = {
RunicNpc_ApiVersion: { params: '', returns: 'int' },
RunicNpc_Spawn: { params: 'Vector3 at, string profile, string owner, JObject overrides', returns: 'BasePlayer' },
RunicNpc_Despawn: { params: 'ulong netId', returns: 'int' },
RunicNpc_DespawnOwner: { params: 'string owner', returns: 'int' },
RunicNpc_List: { params: 'string owner', returns: 'List<Dictionary<string, object>>' },
RunicNpc_Profiles: { params: '', returns: 'JObject' },
RunicNpc_SetProfiles: { params: 'JObject all', returns: 'Dictionary<string, string>' },
RunicNpc_Placements: { params: '', returns: 'List<Dictionary<string, object>>' },
RunicNpc_SetPlacement: { params: 'string id, JObject placement', returns: 'string' },
RunicNpc_RemovePlacement: { params: 'string id', returns: 'bool' },
RunicNpc_AddPlacement: { params: 'JObject placement', returns: 'Dictionary<string, object>' },
RunicNpc_RenamePlacement: { params: 'string from, string to', returns: 'string' },
RunicNpc_RespawnPlacement: { params: 'string id', returns: 'int' },
RunicNpc_Routes: { params: '', returns: 'JObject' },
RunicNpc_SetRoute: { params: 'string name, JObject route', returns: 'string' },
RunicNpc_RemoveRoute: { params: 'string name', returns: 'bool' },
RunicNpc_IsRunicNpc: { params: 'BaseEntity entity', returns: 'bool' },
RunicNpc_ProfileOf: { params: 'BaseEntity entity', returns: 'string' },
RunicNpc_Factions: { params: '', returns: 'JArray' },
RunicNpc_SetFactions: { params: 'JArray pairs', returns: 'string' },
RunicNpc_Escort: { params: 'ulong netId, BaseEntity target', returns: 'string' },
RunicNpc_Ally: { params: 'ulong netId, string kind, string id', returns: 'string' },
RunicNpc_Tether: { params: 'ulong netId, string zone', returns: 'string' },
RunicNpc_CostWarning: { params: 'int adding', returns: 'string' },
};
/** Every hook RunicNPC raises. None answers: a return value is ignored. */
export const runicnpcHooks = {
OnRunicNpcSpawned: {
params: 'BasePlayer npc, string profile, string owner',
when: 'After an NPC spawns and is equipped.',
},
OnRunicNpcHealth: {
params: 'BasePlayer npc, string profile, float threshold',
when: 'The first time its health falls to one of its profile’s `healthThresholds`.',
},
OnRunicNpcDied: {
params: 'BasePlayer npc, string profile, string owner, HitInfo info, Dictionary<ulong, float> contributors',
when:
'When it dies. `contributors` maps each player’s Steam id to the health that player took from it, the killing blow included, after Rust’s protection — never more than its health in all.',
},
OnRunicNpcDespawned: {
params: 'BasePlayer npc, string owner',
when: 'When it is removed without dying. Not raised while RunicNPC itself unloads.',
},
OnRunicNpcPlacementChanged: {
params: 'string id, string change, string previous',
when:
'A placement was set, removed or renamed, through the API or in game. `change` is `set`, `removed` or `renamed`; `previous` is the old name for a rename, and null otherwise.',
},
OnRunicNpcEscortEnded: {
params: 'BasePlayer npc, string profile, string owner',
when: 'Whom it escorted died, was destroyed or left the server, and it is walking back to its spot.',
},
OnRunicNpcBossSpawned: {
params: 'BasePlayer npc, string profile, string owner',
when: 'After `OnRunicNpcSpawned`, for a profile with a `boss` block, once its spawn line has been said.',
},
OnRunicNpcBossPhase: {
params: 'BasePlayer npc, string profile, string owner, int phase, float at',
when:
'It entered a phase. `phase` counts from 1 and `at` is the phase’s health fraction. Raised once the phase’s changes apply and its line is said; a hit that crosses two thresholds raises both, highest first.',
},
OnRunicNpcBossDied: {
params: 'BasePlayer npc, string profile, string owner, HitInfo info, Dictionary<ulong, float> contributors',
when:
'After `OnRunicNpcDied`, for a boss, with the same contributors, once its death line has been said. RunicNPC gives no reward itself.',
},
OnRunicNpcUsed: {
params: 'BasePlayer npc, string profile, BasePlayer player',
when: 'A player pressed E on a passive NPC and was answered. At most once a second per player.',
},
};
/** The keys of each row `RunicNpc_List` returns. */
export const runicnpcListKeys = {
netId: { type: 'ulong', what: 'Its net id, which `RunicNpc_Despawn` and the orders take' },
profile: { type: 'string', what: 'Its profile’s name' },
name: { type: 'string', what: 'The name it was given from its profile’s `names`' },
owner: { type: 'string', what: 'Its owner' },
kit: { type: 'string', what: 'The kit picked for it' },
placement: { type: 'string', what: 'Its placement’s id, or null' },
position: { type: '{x, y, z}', what: 'Where it is' },
home: { type: '{x, y, z}', what: 'Where it spawned: what it wanders around, and walks back to before it sleeps' },
health: { type: 'float', what: 'Its health now' },
maxHealth: { type: 'float', what: 'Its full health' },
movement: { type: 'string', what: '`wander`, `monument` or `route:<name>`' },
rest: { type: 'string', what: '`Awake`, `GoingHome` or `Asleep`' },
state: { type: 'string', what: 'Rust’s own AI state: `Idle`, `Roam`, `Chase`, `Combat` and so on' },
leashes: { type: 'int', what: 'How many times it has given up a chase at its chase range' },
regrounded: {
type: 'int',
what: 'How many times the ground went from under it and it was put on the nearest navmesh',
},
faction: { type: 'string', what: 'Its faction, or `profile:<name>` when its profile has none' },
target: {
type: 'string',
what: 'The prefab of the NPC, animal or turret it is fighting, or null. Players are not reported here',
},
engaged: { type: 'bool', what: 'Whether it is fighting that target now — Rust fights players first' },
escort: { type: 'string', what: 'Whom it escorts: a player’s Steam id, or an entity’s prefab; null for none' },
ally: { type: 'string', what: '`clan:<id>`, `team:<id>` or `player:<steam id>`, or null' },
tether: { type: 'string', what: 'The ZoneManager zone it is held in, or null' },
shotsMarked: {
type: 'int',
what: 'Shots it made at an NPC target; each marks the target hostile for that shot only',
},
kitUsed: {
type: 'object',
what: '`heals`, `throws`, `rockets` and `meleeHits`: how much of its kit’s extras it has used',
},
role: { type: 'string', what: 'Its profile’s role: `roamer`, `sentry`, `guard` or `passive`' },
boss: {
type: 'object',
what: 'For a boss, `phase` (0 before the first, then 1, 2 …) and `damagers`, how many players have hurt it; null for any other NPC',
},
};
/** A placement's keys, as `RunicNpc_SetPlacement` and `RunicNpc_AddPlacement` take them. */
export const runicnpcPlacementKeys = {
profile: 'The profile its NPCs are made from',
position: '`{x, y, z}`. Through `RunicNpc_AddPlacement`, a position without `y` is a point on the map, put on the ground there',
yaw: 'Which way they face, in degrees',
count: 'How many NPCs stand there. All but the first are scattered within 3 m of the spot',
respawn: 'Seconds after a death before an NPC comes back; at least 1',
respawnMode: '`each`: every NPC comes back `respawn` after its own death. `group`: none comes back until all are dead, then all together',
movement: 'Optional. `{mode, radius}`, overriding the profile’s',
tether: 'Optional. A ZoneManager zone its NPCs never leave. A zone the server lacks, or one that does not hold the spot, is refused',
};
/** A route's keys. */
export const runicnpcRouteKeys = {
points: 'At least two `{x, y, z}` points, each on Rust’s navmesh',
loop: 'True: the last point leads back to the first. False: the route is walked back and forth',
};
/**
* A profile's fields, by their JSON path — the same path `rnpc.profile set` takes and the
* file and the API carry. Grouped as the site's profile editor groups them, with the label
* it shows (`site`); null where the editor has no control for a field.
*
* API.md names the boss phase fields `phases[].…`, and so does this list, so the two compare
* as written; on the page they sit under `boss.phases`.
*/
export const runicnpcProfileFields = {
Looks: {
names: { site: 'NPC names', rule: 'at least one', meaning: 'One is picked for each NPC. The first is the profile’s name on the leaderboard' },
kits: {
site: 'Kits',
rule: 'at least one; each must exist in Kits',
meaning: 'One is picked for each NPC, which is equipped with it. A kit the server lacks refuses the profile when it is saved, not when an NPC spawns',
},
prefab: { site: 'Prefab', rule: 'a plain Rust `scientistnpc_*` prefab', meaning: 'What it is built from' },
role: {
site: 'Role',
rule: '`roamer`, `sentry`, `guard` or `passive`',
meaning:
'A **roamer** moves, chases and fights. A **sentry** never moves, and may stand off the navmesh. A **guard** holds its spot facing the way it was placed, chases within its chase range, and walks back. A **passive** NPC never fights — it takes no target, does not shoot back and raises no alarm — and pressing E on it does what its `use` says',
},
},
Moving: {
'movement.mode': {
site: 'How it moves',
rule: '`wander`, `monument`, `route:<name>`, or `stand` for a passive profile only',
meaning:
'Wander around its spot, follow Rust’s own paths in the monument it stands in, or walk a recorded route. A passive NPC that stands holds its spot, may stand off the navmesh, and turns to whoever presses E on it. A placement may override it',
},
'movement.radius': { site: 'Wander radius (m)', rule: 'above 0 for `wander`', meaning: 'How far from home it wanders' },
sleepDistance: {
site: 'Sleeps with nobody within (m)',
rule: '0 or more',
meaning: 'With no player this close it walks home, then sleeps. 0: it never sleeps',
},
},
Fighting: {
health: { site: 'Health', rule: 'above 0', meaning: 'Its health, and its maximum' },
damageDealt: { site: 'Damage dealt ×', rule: '0 or more', meaning: 'Multiplies its weapon’s damage; 1 is the weapon’s full damage' },
aimCone: { site: 'Aim spread', rule: '0 or more', meaning: 'How much its aim spreads. Rust’s scientists use 2' },
visionCone: { site: 'Vision cone', rule: '−1 to 1', meaning: 'Rust’s vision cone' },
damageTaken: {
site: 'Damage taken × head, body, legs',
rule: '`head`, `body` and `legs`, each 0 or more',
meaning:
'Multiplies the damage it takes to the head, the legs (legs and feet) and the body — everything else, including hits with no body part, like fire and explosions',
},
'ranges.sense': { site: 'Notices players at (m)', rule: 'above 0', meaning: 'How far it notices players' },
'ranges.loseTarget': { site: 'Forgets them at (m)', rule: 'at least `sense`', meaning: 'How far a target must get before it is forgotten' },
'ranges.chase': {
site: 'Chases up to (m from home)',
rule: '0 or more',
meaning:
'How far from home it will chase; 0 is no limit. At that distance it waits 5 s for the target to come back within range, then gives up and walks home',
},
'ranges.attack': { site: 'Shoots from (m)', rule: 'above 0', meaning: 'How far it shoots from. This replaces the weapon’s own range' },
healthThresholds: {
site: 'Health thresholds (%)',
rule: 'fractions between 0 and 1',
meaning: 'Where `OnRunicNpcHealth` is raised, once each — and so what an event’s phase can wait for',
},
},
'Press E': {
use: {
site: 'Press E',
rule: 'required on a passive profile, refused on any other',
meaning:
'What pressing E on it does, from up to 3 m. `mode` `chat` says one of `lines` (picked at random, each at most 256 characters) in that player’s chat. `mode` `window` opens a window with `title` (blank: its name), `text` (at most 2,000 characters) and a Close button. `{player}` in either is the player’s name',
},
},
Boss: {
boss: {
site: 'It is a boss',
rule: 'null, or the block below; not on a passive profile',
meaning: 'Makes a roamer, sentry or guard a boss. It keeps moving and fighting as its role does',
},
'boss.barDistance': {
site: 'Bar shown within (m)',
rule: 'above 0, at most 1,000; default 100',
meaning:
'Players this close see its health bar at the top of the screen, and so does every player who has hurt it, wherever they are, until it dies or despawns. A player near two bosses sees the nearer',
},
'boss.announce': {
site: 'Lines said in',
rule: '`chat` or `popup`; default `chat`',
meaning: 'Where its lines are said. `popup` uses PopupNotifications where it is loaded, and chat where it is not',
},
'boss.spawnLine': {
site: 'When it spawns, to everyone',
rule: 'at most 256 characters; blank says nothing',
meaning: 'Said to everyone on the server. `{name}` is its name',
},
'boss.deathLine': {
site: 'When it dies, to everyone',
rule: 'at most 256 characters; blank says nothing',
meaning: 'Said to everyone on the server. `{killer}` is the player who landed the killing blow, empty when there was none',
},
'boss.phases': {
site: 'Phases',
rule: 'a list; each `at` a fraction between 0 and 1, no two alike',
meaning:
'When its health falls to a phase’s `at`, that phase applies from then on. Every other part of a phase is optional, and changes only that boss’s own copy of its profile',
},
'phases[].damageDealt': { site: 'Damage dealt ×', rule: '0 or more', meaning: 'Replaces the profile’s' },
'phases[].aimCone': { site: 'Aim spread', rule: '0 or more', meaning: 'Replaces the profile’s' },
'phases[].speed': { site: 'Speed ×', rule: 'above 0, at most 5', meaning: 'A multiple of Rust’s own speed for it: 1.3 is a third faster' },
'phases[].ranges': { site: 'Notices at, Forgets at, Chases to, Shoots from', rule: 'as the profile’s `ranges`', meaning: 'Replace the profile’s' },
'phases[].kit': {
site: 'Swaps to kit',
rule: 'a Kits kit the server has',
meaning: 'Its inventory is stripped, the kit given and its weapon equipped',
},
'phases[].adds': {
site: 'Summons (profile), How many',
rule: '`profile`: one that is not a boss; `count`: 1 to 20',
meaning:
'NPCs of that profile placed on a 6 m ring around it, one per server frame. They belong to its owner, so an event’s teardown removes them, and they fight on after it dies',
},
'phases[].line': {
site: 'Line',
rule: 'at most 256 characters',
meaning: 'Said only to the players near it (within `barDistance`) and to those who have hurt it',
},
},
Loot: {
loot: {
site: 'Its own loot',
rule: 'null, or the block below',
meaning: 'Null keeps Rust’s scientist loot',
},
'loot.start': {
site: 'The corpse starts with',
rule: '`rust` (default), `kit` or `none`',
meaning:
'What the corpse holds before the table: Rust’s scientist loot and the clothes it wore; what it carried (its kit) and the clothes; or nothing at all, clothes included',
},
'loot.always': {
site: 'Always rolled',
rule: 'up to 30 rows: `item`, `min`, `max`, `chance` (above 0, at most 1), and an optional `skin`',
meaning: 'Each row rolls on its own. `item` is a Rust short name — `scrap`, `rifle.ak`, `explosive.timed`',
},
'loot.pool': {
site: 'The pool',
rule: '`pick` (0 to its rows), `nothing` (a weight, 0 or more), and up to 30 `rows`, each with a `weight` above 0 instead of a chance',
meaning:
'At most `pick` draws by weight, never the same row twice; a draw of "nothing" uses one up. A kill never pays out more than `pick` pool rows, however lucky — the fair cap on rare items',
},
'loot.crate': {
site: 'The table goes into',
rule: 'null (the corpse), `wooden`, `military`, `elite` or `locked`',
meaning:
'The table goes into one of Rust’s crates beside the corpse, with Rust’s own loot off, and stays until emptied; a locked crate keeps Rust’s two-hour removal while unhacked. The always-rows plus `pick` must fit its slots: 6, 6, 12 or 24 (the corpse has 24)',
},
'loot.hackSeconds': {
site: 'Hack time (minutes)',
rule: '1 to 86,400; default 900',
meaning: 'A locked crate’s hack time, counted once a player starts the hack',
},
'loot.corpseSeconds': {
site: 'The corpse stays',
rule: 'null (Rust’s own 600 s), 0 (no corpse), or more',
meaning: 'How long the corpse lasts',
},
'loot.dropTable': {
site: null,
rule: 'true (default) or false',
meaning:
'False rolls no table; the start and the corpse’s time still apply. An event’s Place NPCs step sends it as false for the NPCs it places, through a spawn’s overrides',
},
},
Sides: {
faction: {
site: 'Faction',
rule: 'null, or 1–40 of a-z, 0-9, _ and -; not `scientists` or `animals`',
meaning: 'Profiles of one faction are allies. With none, its allies are its own profile’s NPCs',
},
relations: {
site: 'Its own exceptions',
rule: 'keys: a faction, `scientists`, `animals` or `profile:<name>`; values `hostile`, `neutral` or `allied`',
meaning:
'Its own exceptions, which win over the faction table. **A profile with no faction settings fights players only**',
},
alertRadius: {
site: 'Alert radius (m)',
rule: '0 or more; default 40',
meaning: 'Allies this close learn whoever attacked one of them, seen or not. 0 is off',
},
turrets: {
site: 'Turrets',
rule: '`default`, `ignore` or `always`',
meaning:
'`default`: as Rust’s scientists — player turrets shoot it, Outpost’s and Bandit Camp’s sentries do not. `ignore`: no turret targets it. `always`: those sentries too. It shoots back at a turret that shoots it',
},
hurtByPlayers: {
site: 'Players can hurt it',
rule: 'true or false; default true, but false for a passive profile unless it is given',
meaning:
'Off makes it unkillable by players. RunicNPC enforces it itself, and answers TruePVE’s and NextGenPVE’s damage checks the same way. Turrets, fire and other NPCs are not affected',
},
hurtsPlayers: {
site: 'It can hurt players',
rule: 'true or false; default true',
meaning: 'Off makes it harmless to players. It still fights NPCs and turrets',
},
},
'The kit’s extras': {
kitUse: {
site: 'The kit’s extras',
rule: '`heal`, `grenades`, `melee`, `rockets`, `flamethrower`, each true or false',
meaning:
'The extras its kit gives that it uses, each only if true and each used up from its inventory, so its loot is what is left. The main weapon — the belt’s first slot — is always used and never runs out',
},
},
};
/**
* The commands, keyed by how they are typed after `/rnpc ` or `rnpc.`. The first word is the
* verb, which is what the check compares against the plugin's `[ConsoleCommand("rnpc.…")]`
* list. `perm` is the permission it needs; `console` marks the verbs that answer only in a
* console.
*/
export const runicnpcCommands = {
Placements: {
'place <profile> [options]': {
perm: 'runicnpc.place',
does: 'Places the profile’s NPCs where you are looking, and answers with the placement’s name and the cost warning.',
},
'here <profile> [options]': {
perm: 'runicnpc.place',
does:
'The same, a metre in front of you and facing you. If something is in the way, or there is no ground or navmesh there, it stands where you do and the reply says so.',
},
'remove [placement]': {
perm: 'runicnpc.place',
does: 'Removes a placement and its NPCs: the one you name, or the one the NPC you are looking at belongs to.',
},
'rename <placement> <new name>': { perm: 'runicnpc.place', does: 'Renames a placement. Its live NPCs stay where they are.' },
'near [radius]': {
perm: 'runicnpc.place',
does: 'The placements and live NPCs around you, with distances and any note — waiting, or off the navmesh.',
},
info: {
perm: 'runicnpc.place',
does: 'The NPC you are looking at: name, profile, placement or owner, health, state and target.',
},
profiles: { perm: 'runicnpc.place', does: 'The profiles this server has, and any it refuses, with the reason.' },
'follow <placement> <player|me|off>': {
perm: 'runicnpc.place',
does:
'The placement’s live NPCs escort a player: they fight whoever attacks that player, and walk back to their spot if the player dies or leaves. For trying an escort out — it is kept in memory only, so a respawn or a reload ends it.',
},
'tp <placement>': { perm: 'runicnpc.admin', does: 'Teleports you to a placement.' },
'respawn <placement|all>': { perm: 'runicnpc.admin', does: 'Respawns a placement’s NPCs now, or every placement’s.' },
'clear <owner>': {
perm: 'runicnpc.admin',
does: 'Removes every NPC an owner has: a stuck event run (`run:42`), for example, or another plugin’s (`plugin:Name`).',
},
},
Routes: {
'path record <name>': { perm: 'runicnpc.place', does: 'Starts recording a route where you walk.' },
'path point': {
perm: 'runicnpc.place',
does: 'Adds the spot you stand on. A point the previous one has no walkable path to is refused.',
},
'path undo': { perm: 'runicnpc.place', does: 'Drops the last point.' },
'path save [loop|back]': {
perm: 'runicnpc.place',
does: 'Saves the route: `loop` walks back to the first point and round again, `back` walks it back and forth.',
},
'path cancel': { perm: 'runicnpc.place', does: 'Abandons the recording.' },
'path list': { perm: 'runicnpc.place', does: 'The saved routes.' },
'path delete <name>': {
perm: 'runicnpc.place',
does: 'Deletes a route. A placement that walks it waits until a route of that name exists again.',
},
},
'At the console': {
'profile list': { perm: 'runicnpc.admin', console: true, does: 'The same as `/rnpc profiles`.' },
'profile show <name>': { perm: 'runicnpc.admin', console: true, does: 'A profile in full, as JSON, and why it is refused if it is.' },
'profile create <name> [from=<profile>]': {
perm: 'runicnpc.admin',
console: true,
does: 'A new profile, empty or copied from another.',
},
'profile set <name> <field> <value>': {
perm: 'runicnpc.admin',
console: true,
does: 'Sets one field of a profile by its path — `health 200`, `ranges.sense 40`, `kits a,b`. See [Profile fields](/docs/rust/runicnpc/profile-fields/).',
},
'profile delete <name>': {
perm: 'runicnpc.admin',
console: true,
does: 'Deletes a profile. Placements that use it wait until a profile of that name exists again.',
},
'faction list': { perm: 'runicnpc.admin', console: true, does: 'The faction table: which factions fight, ignore or help each other.' },
'faction set <a> <b> hostile|neutral|allied': { perm: 'runicnpc.admin', console: true, does: 'Sets one pair, both ways.' },
'faction clear <a> <b>': { perm: 'runicnpc.admin', console: true, does: 'Removes a pair.' },
status: {
perm: 'the server console, RCON, or an admin’s F1',
console: true,
does: 'The version and API, the hooks that have fired, the navmesh, NPC counts by owner, profiles, placements, routes, the caps and the cost warning.',
},
reload: { perm: 'the server console, RCON, or an admin’s F1', console: true, does: 'Reads profiles and routes again after a hand edit of their files.' },
help: { perm: 'anyone', console: true, does: 'The verbs you may use, and nothing else — the same list as `/rnpc` alone in chat.' },
},
};
/** RunicNPC's two permissions. */
export const runicnpcPermissions = {
'runicnpc.place': 'Placing, removing, renaming and inspecting NPCs, recording routes, and `follow`',
'runicnpc.admin': 'Everything `runicnpc.place` grants, plus teleporting, respawning, clearing an owner, and the console-only verbs',
};
/** The options `place` and `here` take, as `key=value`, in any order. */
export const runicnpcPlaceOptions = {
count: { means: 'How many NPCs stand there', default: '1' },
respawn: { means: 'Seconds after a death before the NPC comes back', default: '300' },
mode: { means: '`each`: every NPC on its own timer. `group`: none until all are dead, then all at once', default: '`each`' },
move: { means: '`wander`, `monument` or `route:<name>`', default: 'the profile’s' },
radius: { means: 'How far a wanderer strays, in metres', default: 'the profile’s' },
tether: { means: 'A ZoneManager zone the NPCs never leave. Needs ZoneManager', default: 'none' },
at: { means: 'Server console only, which has no position: `at=x,y,z`', default: '—' },
yaw: { means: 'Server console only: which way they face, in degrees', default: '—' },
};
/** `config/RunicNPC.json` (Carbon: `configs/RunicNPC.json`), by JSON path. */
export const runicnpcConfig = {
'caps.total': 'RunicNPC’s NPCs on the server',
'caps.perOwner': 'NPCs of one owner: one placement, one event run, or one other plugin',
'caps.perProfile': 'NPCs of one profile',
'caps.spawnsPerSecond': 'How fast NPCs are spawned',
spawnBudgetMs:
'Milliseconds of each server frame placements may spend spawning; 8 by default. One NPC takes about 5 ms to spawn, so a large placement is spread over frames instead of stalling one',
};

View File

@@ -39,7 +39,24 @@
* deployment is branded "Runic Gateway Demo" rather than a real community's name (D43) —
* 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. */
@@ -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 {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 {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} caption The sentence printed under the figure.
* @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[]} */
@@ -70,6 +90,7 @@ export const screens = [
// ── The product's public surfaces ───────────────────────────────────────────────────
{
id: 'shard-status',
game: 'uo',
route: '/uo/shard',
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.',
@@ -79,6 +100,7 @@ export const screens = [
},
{
id: 'marketplace',
game: 'uo',
route: '/uo/market',
admin: false,
scrollY: 470,
@@ -89,6 +111,7 @@ export const screens = [
},
{
id: 'spawn-atlas',
game: 'uo',
route: '/uo/atlas',
admin: false,
scrollY: 466,
@@ -99,6 +122,7 @@ export const screens = [
},
{
id: 'guilds',
game: 'uo',
route: '/uo/guilds',
admin: false,
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',
game: 'uo',
route: '/uo/houses',
admin: false,
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',
},
// ── 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',
route: '/site/news',
@@ -145,6 +221,7 @@ export const screens = [
},
{
id: 'admin-shard',
game: 'uo',
route: '/admin/uo/link',
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.',
@@ -154,6 +231,7 @@ export const screens = [
},
{
id: 'admin-client-files',
game: 'uo',
route: '/admin/uo/files',
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.',
@@ -179,6 +257,30 @@ export const screens = [
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) ──────────────
//
// 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',
game: 'uo',
route: '/shard',
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.",
@@ -204,6 +307,7 @@ export const screens = [
},
{
id: 'app-market',
game: 'uo',
route: '/market',
admin: false,
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.",
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`. */

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 description =
'A native Android client for a Runic Gateway deployment: the shard, the site and your ' +
'account, themed by whichever community you point it at.';
'A native Android client for a Runic Gateway deployment: the game, the site and your ' +
'account, themed by whichever community you point it at — Ultima Online or Rust.';
const apk = platform.androidApk;
const release = platform.releases['Android-app'];
@@ -196,6 +196,12 @@ const downloadBase = `${releasePage}/download/${release}`;
</p>
</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>
<NotBuilt scope="app" title="What the app does not do" />
@@ -335,6 +341,12 @@ const downloadBase = `${releasePage}/download/${release}`;
padding-top: 0.4rem;
}
.app-delete {
margin: 1.25rem 0 0;
color: var(--muted);
font-size: 0.95rem;
}
.app-get__foot {
margin: 1rem 0 0;
padding-top: 0.85rem;

View File

@@ -4,6 +4,7 @@ import PageHeader from '../components/PageHeader.astro';
import NotBuilt from '../components/NotBuilt.astro';
import { liveBrand } from '../lib/brand.mjs';
import { demoLogins, resetTime } from '../lib/demoLogins.mjs';
import { isFull, liveCount } from '../lib/betaStore.mjs';
import { issueFormToken, OUTCOME, submit, isSuccess } from '../lib/betaSignup.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
* 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
* plainly that it is a list rather than a queue that is moving. The demo is rendered
* through `NotBuilt` so the absence appears in the same shape it takes everywhere else on
* the site rather than as an apology invented for this page.
* plainly that it is a list rather than a queue that is moving. Gate two closed when the
* public demo went up (2026-10-27): with `demoUrl` mounted it says so, and the page lists
* the demo's sign-ins as the demo itself publishes them (D82).
*
* ---------------------------------------------------------------------------------------
* WHAT THE SUCCESS SCREEN SHOWS, AND WHY IT CAN SHOW IT
@@ -53,6 +54,22 @@ export const prerender = false;
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()`
* 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.
</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
rather than hearing about it afterwards.
</p>
@@ -249,8 +266,11 @@ const formToken = issueFormToken();
<section class="page section">
<h2 class="beta-h2">What it is waiting on</h2>
<p class="prose beta-lede">
Two things, neither of which is a date. Both are visible from outside, so there is no
reason to be vague about them.
{demoBase
? '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>
<ol class="beta-gates">
@@ -271,22 +291,85 @@ const formToken = issueFormToken();
</li>
<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>
<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 the
public demo is the one being built for that. Until it is running, a place on the
test would be a place to install an app with nothing behind it.
</p>
{
demoBase ? (
<p>
The app is a client and ships pointed at nothing — its first screen asks for the
address of a site running this platform. The public demo is that site: a real
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">
If you already run a Runic Gateway deployment, this gate does not apply to you —
say so in Discord.
If you already run a Runic Gateway deployment, you can point the app at that
instead — say so in Discord.
</p>
</li>
</ol>
</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">
<h2 class="beta-h2">What a tester needs</h2>
<ul class="beta-reqs">
@@ -524,6 +607,46 @@ const formToken = issueFormToken();
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
context for the decision, not the reason to make it. */
.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 NotBuilt from '../components/NotBuilt.astro';
import Screenshot from '../components/Screenshot.astro';
import SupportedGames from '../components/SupportedGames.astro';
import platform from '../data/platform.json';
import {
capabilityGroups,
assertCapabilityCoverage,
assertDetailCoverage,
} from '../data/capabilities.mjs';
import { capabilityGroups, assertDetailCoverage } from '../data/capabilities.mjs';
import { games, assertGameCoverage } from '../data/games/index.mjs';
/**
* `/features/` — PLAN.md §13 phase 4, built to D20.
@@ -24,8 +21,8 @@ import {
* a thing somebody has to notice.
*
* 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
* deliberately, since either page can be built alone and each should fail on its own.
* `assertGameCoverage` is the module contract the homepage and each game page also run —
* 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
* 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
* invisible until the day somebody configures a demo.
*/
assertCapabilityCoverage(platform.games.uo.module.capabilities);
for (const game of games) assertGameCoverage(game.key);
assertDetailCoverage();
/**
@@ -66,19 +63,21 @@ assertDetailCoverage();
* the container runs and who owns the database, and a picture of a web page says nothing
* 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
* build rather than rendering a broken image.
*/
const groupScreens: Record<string, string[]> = {
community: ['news'],
'game-intelligence': ['marketplace', 'spawn-atlas', 'guilds', 'houses'],
administration: ['admin-dashboard', 'admin-users'],
integration: ['admin-modules'],
};
const title = 'Features';
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}>
@@ -86,16 +85,17 @@ const description =
<p>
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
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
>.
</p>
<p>
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
brings its own set in its place. On a deployment with no module, that group is simply
absent and the other four are unchanged.
them. The second group below is what both of them add, each in its own game’s way;
each game’s own list is on its page. On a deployment with no module, that group is
simply absent and the other four are unchanged.
</p>
<SupportedGames class="features__games" />
</PageHeader>
{
@@ -110,6 +110,16 @@ const description =
<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">
{group.items.map((item) => (
<li class="panel group__item">
@@ -123,7 +133,7 @@ const description =
{item.demoPath && (
<a
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"
>
See it running
@@ -175,6 +185,17 @@ const description =
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 {
display: grid;
gap: 1rem;

View File

@@ -43,7 +43,7 @@ const integrations = [
{
title: 'Slash commands',
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, ' +
'rather than one tab away.',
},
@@ -60,13 +60,13 @@ const integrations = [
body:
'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 ' +
'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:
'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 ' +
'membership of. That was a deliberate trade for a limit that counts per guild rather ' +
'profile — so a Team with a voice channel is a Team anyone in your Discord server can ' +
'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.',
},
{

View File

@@ -2,26 +2,27 @@
import Base from '../layouts/Base.astro';
import PageHeader from '../components/PageHeader.astro';
import NotBuilt from '../components/NotBuilt.astro';
import SupportedGames from '../components/SupportedGames.astro';
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,
* writing your own, and the Integration Kit with its draft badge (D8). They are in that
* order because they are increasing commitment — a reader deciding whether to install one,
* a reader wondering what they get, a reader considering building one.
* §10 gave this page four jobs: what a module is, a worked example, writing your own, and
* the Integration Kit with its draft badge (D8). They are in that order because they are
* increasing commitment — a reader deciding whether to install one, a reader wondering what
* 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
* `capabilities.mjs` rather than retyping it — the same list the homepage names and
* `/features/` expands, which is already checked against the module's own manifest through
* `platform.json` (§12). A third hand-maintained copy on this page is exactly the failure
* that machinery exists to prevent, and this is the page where it would be least visible.
* The worked example was the Ultima Online module, listed in that game's words. Since phase
* 17 there are two modules, and D63 keeps a game's vocabulary on its own pages, so this page
* is core: a card per game, in core's words, from `games/index.mjs`, each linking to
* `/modules/uo/` or `/modules/rust/`, where the game's real feature list is (D75). What the
* modules share — a sidecar, their own tables, their own releases — stays here, said once.
*
* ---------------------------------------------------------------------------------------
* THE DRAFT CHIP IS A DECISION, NOT A DISCLAIMER
@@ -34,14 +35,12 @@ import { capabilityGroup } from '../data/capabilities.mjs';
*/
const title = 'Modules';
const description =
'What a module is, what the Ultima Online module publishes, and what it takes to write ' +
'one for another game.';
'What a module is, the two game modules that exist — Ultima Online and Rust — and what it ' +
'takes to write one for another game.';
const gitea = `${platform.gitea.base}/${platform.gitea.org}`;
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. */
const installPaths = [
{
@@ -81,8 +80,10 @@ const installPaths = [
<p>
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
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>
<SupportedGames class="mod__supported" />
</PageHeader>
<section class="page section mod" id="what">
@@ -146,60 +147,65 @@ const installPaths = [
</ol>
</section>
<section class="page section mod" id="module-uo">
<div class="mod__head">
<p class="eyebrow">The worked example</p>
<h2>module-uo</h2>
<span class="chip chip--version">{platform.releases['Module-uo']}</span>
</div>
<section class="page section mod" id="games">
<p class="eyebrow">The game modules</p>
<h2>Two games, one module each</h2>
<p class="prose mod__lede">
The Ultima Online module, and the reference every module that follows is measured
against. It is what turns a general-purpose community site into something that knows
what a shard is — and it is the proof that the seam described on
<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.
Both were built inside this project, and a deployment runs one of them — the site
refuses to start a second. Each has a page of its own, in its own game's words, and a
documentation group that starts from installing it.
</p>
<div class="mod__example">
<div class="panel mod__caps">
<h3>What it publishes</h3>
<ul>
{gameIntelligence.items.map((item) => <li>{item.label}</li>)}
</ul>
<p class="mod__caps-note">
The same list <a href="/features/">features</a> expands, read from one file that is
checked against the module's own manifest on every build.
</p>
</div>
<ul class="mod__games">
{
games.map((game) => (
<li class="panel mod__game">
<div class="mod__head">
<h3>{game.name}</h3>
<span class="chip chip--version">
{game.release}
</span>
</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">
<section>
<h3>It connects to a real server</h3>
<p>
The module talks to the sidecar beside your game server, not to the game. You
deploy that side with the installer and paste four values into the admin panel;
nothing here requires the game to exist, and with no server configured the site
renders normally and shows it offline.
</p>
</section>
<section>
<h3>It owns its own tables</h3>
<p>
Its schema is applied by the site on every boot and its data is its own. The
module declares which versions of the core interface it speaks — the site runs
{' '}{platform.moduleApi} — and refuses to load against one it does not.
</p>
</section>
<section>
<h3>It is a separate release</h3>
<p>
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
range still holds.
</p>
</section>
</div>
<div class="mod__facts mod__facts--shared">
<section>
<h3>Each connects to a real server</h3>
<p>
A module talks to the sidecar beside your game server, not to the game. You deploy
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
renders normally and shows it offline.
</p>
</section>
<section>
<h3>Each owns its own tables</h3>
<p>
Its schema is applied by the site on every boot and its data is its own. A module
declares which versions of the core interface it speaks — the site runs
{' '}{platform.moduleApi} — and refuses to load against one it does not.
</p>
</section>
<section>
<h3>Each is a separate release</h3>
<p>
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
range still holds.
</p>
</section>
</div>
</section>
@@ -239,9 +245,6 @@ const installPaths = [
<a class="btn btn--ghost" href={`${docs}/website/MODULE_API.md`} rel="noopener noreferrer">
The module contract
</a>
<a class="btn btn--ghost" href={`${docs}/modules/uo/README.md`} rel="noopener noreferrer">
module-uo in depth
</a>
</div>
</section>
@@ -287,7 +290,6 @@ const installPaths = [
.mod__grid h3,
.mod__paths h3,
.mod__caps h3,
.mod__facts h3,
.mod__draft h3 {
margin: 0 0 0.5rem;
@@ -317,55 +319,53 @@ const installPaths = [
font-style: italic;
}
.mod__example {
.mod__games {
display: grid;
gap: 1rem;
margin-top: 2rem;
grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
align-items: start;
}
.mod__caps ul {
margin: 0;
margin: 2rem 0 0;
padding: 0;
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;
}
.mod__caps li {
position: relative;
padding-left: 1.1rem;
color: var(--text);
.mod__game-links {
display: flex;
flex-wrap: wrap;
gap: 0.6rem;
margin-top: auto;
padding-top: 1.25rem;
}
.mod__caps li + li {
margin-top: 0.3rem;
.mod__supported {
margin-top: 1.5rem;
}
/* The same drawn marker the homepage's capability lists use, so a reader who has
seen this list once recognises it as the same list. */
.mod__caps li::before {
content: '';
position: absolute;
left: 0;
top: 0.62em;
width: 5px;
height: 5px;
border-radius: var(--radius-pill);
background: var(--portal);
opacity: 0.75;
.mod__facts--shared {
display: grid;
gap: 1.4rem;
margin-top: 2.25rem;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.mod__caps-note {
margin: 1rem 0 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--shared section + section {
margin-top: 0;
}
.mod__facts p {
@@ -395,10 +395,4 @@ const installPaths = [
gap: 0.7rem;
margin-top: 1.75rem;
}
@media (max-width: 860px) {
.mod__example {
grid-template-columns: minmax(0, 1fr);
}
}
</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 ' +
'us, no service of ours in the middle, and no copy of anything on our side — because ' +
'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'),
},
{
@@ -79,6 +81,7 @@ const sections = [
'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, ' +
'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'),
},
];
@@ -131,6 +134,11 @@ const sections = [
<h2>{section.heading}</h2>
<p class="legal-sec__who">{section.controller}</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>
<ul class="legal-rows">
@@ -304,6 +312,11 @@ const sections = [
color: var(--muted);
}
.legal-sec__link {
margin: 0.75rem 0 0;
font-size: 0.95rem;
}
.legal-rows {
display: grid;
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;
justify-content: flex-start;
row-gap: 0.15rem;
column-gap: 0.5rem;
padding-block: 0.55rem;
min-height: 0;
}
@@ -236,12 +237,16 @@ svg {
gap: 0;
/* 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. */
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 {
padding-inline: 0.45rem;
font-size: 0.86rem;
padding-inline: 0.3rem;
font-size: 0.84rem;
}
/* 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;
* - 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;
* - a row that claims we collect or share something contradicts the premise the whole
* page rests on, and would be a real disclosure defect rather than a typo;
* - a row that claims the app shares something contradicts the premise the whole page
* 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
* inconsistency a reviewer finds and a developer never does.
*
@@ -32,6 +33,9 @@ import {
assertScopeNonEmpty,
collected,
collectedIn,
deletionRow,
PLAY_DATA_TYPES,
PLAY_PURPOSES,
playRows,
} from '../src/data/collection.mjs';
import { legal } from '../src/data/legal.mjs';
@@ -74,38 +78,102 @@ describe('the Play Data Safety mapping', () => {
it('answers every mapped question completely', () => {
for (const row of playRows()) {
const { category, type, answer, because, collected: isCollected, shared } = row.play;
assert.ok(category?.trim() && type?.trim(), `${row.id} has no console category/type`);
const { types, answer, because, collected: isCollected, shared } = row.play;
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.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`);
}
});
/*
* 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.
*
* "We operate no server the app talks to" is the premise of /privacy section 2, of the
* generated declaration, and of the argument for why the app needs no account with us.
* If that ever stops being true — a telemetry endpoint, a crash reporter, a hosted
* directory of deployments — the honest change is a `collected: true` row AND a rewrite
* of the page's second section. This test makes the first impossible without noticing
* the second, by failing with the reason rather than the diff.
* What the app sends is collected in Play's sense, and declared so: it leaves the phone
* for the deployment the user chose. What stays true is the premise of /privacy section 2,
* that none of it reaches us and none of it is handed on. A row that says otherwise — a
* telemetry endpoint, a crash reporter, a hosted directory of deployments — means that
* premise has changed, and the page has to change with it rather than gaining a row that
* contradicts its own lede.
*/
it('holds the premise the whole section rests on', () => {
for (const row of playRows()) {
assert.equal(
row.play.collected,
row.play.shared,
false,
`${row.id} says we collect it. If that is now true, /privacy section 2's premise — ` +
'that we operate no server the app talks to — has changed, and the page has to ' +
'change with it rather than gaining a row that contradicts its own lede.'
`${row.id} says the app shares it. If that is now true, /privacy section 2's ` +
'premise — that the app talks only to the deployment the user chose — has changed.'
);
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', () => {
it('is stated in the consent sentence the row records', () => {
assert.match(