Skip to content

Commit ba18a9f

Browse files
phasenullclaude
andauthored
Docs sweep: README matches main (2026-11-15) (#22)
Checked against the code on main during the docs sweep for www.typetorch.dev: commands, flags, env vars, versions and removed features. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent abbdb65 commit ba18a9f

2 files changed

Lines changed: 62 additions & 35 deletions

File tree

‎README.md‎

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ it and run `bun install`.
4747
"typeRoots": ["node_modules/@rbxts", "node_modules/@typetorch"],
4848
"types": ["types", "compiler-types"],
4949
"plugins": [
50-
// Optional, first when present: $print/$warn with file and line (what every TypeTorch repo uses).
50+
// Optional, first when present: $print/$warn with file and line. @typetorch/transformer 0.3.2+ has the same
51+
// macros built in (`@typetorch/transformer/macros`; it also expands calls typed by rbxts-transform-debug).
5152
{ "transform": "rbxts-transform-debug", "environmentRequires": {} },
5253
{ "transform": "@typetorch/transformer" }
5354
]
@@ -179,25 +180,30 @@ return the generation's stop function, which the kernel calls on a swap.
179180
work the same way; see the transformer's README.
180181
- **UI:** `observeElement(trove, tag, (instance, elementTrove) => ...)`, `isRealFrame`, `popIn` / `popOut` / `bump`
181182
(UIScale, never Size tweens) and `PopupQueue` (one modal at a time).
182-
- **Dev menu:** devs (Studio, project members, dev badge) get a DEV button, `Ctrl+Shift+D` and `/tt dev`: artifact
183+
- **Dev menu:** devs (Studio, project members, dev badge) get a DEV button (in Roblox's top-bar row since 0.6.2,
184+
`GuiService.TopbarInset`, so it never covers a game's top-left HUD), `Ctrl+Shift+D` and `/tt dev`: artifact
183185
(with how long the server and client generations have run, the server's uptime and the build's age), server status,
184186
logs (server, own client, other players' clients), client and server dex, network stats, module state, a branch and
185187
build picker (Server > Branch) and a Claude prompt. The sidebar, top to bottom: Artifact, Server, Network, Modules,
186188
Manage, Logs, Dex, Claude. The window can be dragged by its header and resized from its corner (double-tap the
187189
header to reset).
188-
- **Command palette (`Ctrl+K`, `Cmd+K` on a Mac, or the search button in the menu header):** opens the dev menu if it
189-
is closed and searches every command the dev may run now (fuzzy: `swb` finds *Switch branch*). Up / Down pick,
190+
- **Command palette (framework 0.5.7; `Ctrl+K`, `Cmd+K` on a Mac, or the search button in the menu header):** opens
191+
the dev menu if it is closed and searches every command the dev may run now (fuzzy, every word against the title,
192+
keywords or group: `swdev` finds *Switch to dev branch*). Up / Down pick,
190193
Enter runs, Shift+Enter opens a page in a split, Escape closes; recent commands come first on an empty query. Never
191194
fires while typing in chat or a text box. Commands: open any page; split right / down, open the pane in a new window,
192-
close it, dock all windows; Reload, Roll back, switch branch, load a build here, join a server on a branch or build
193-
(the Branch tab's rules and words, `devtools/build-actions.ts`), New server and Join a listed server (owners); find a
194-
player by name, display name or UserId and open them in Manage > Players or their Kick / Ban card (owners); copy the
195-
job id, artifact id, commit, branch or place version (the copy popup); "Experiment <name>: use <variant>" / "clear my
196-
variant" (Server > Experiments, below); "Ask Claude: ..." puts the query in the Claude draft. Anything that swaps what runs on the server takes a second Enter or tap to confirm. The kernel and the server
197-
re-check every request. Core: `devtools/commands.ts` (pure, Lune-tested by `scripts/test-commands.luau`).
195+
close it, dock all windows; Switch to dev branch, Reload, Roll back, Migrate all players to a new server, switch
196+
branch, load a build here, join a server on a branch or build (the Branch tab's rules and words,
197+
`devtools/build-actions.ts`, `devtools/palette-rules.ts`), New server and Join a listed server (owners); find a
198+
player by name, display name or UserId and open them in Manage > Players or their Kick / Ban card, or Teleport to /
199+
Bring / Respawn them (owners, Manage > Players' permissions); copy the
200+
job id, artifact id, commit, branch or place version (the copy popup); `Experiment <name>: use <variant>` / "clear my
201+
variant" (Server > Experiments, below); "Ask Claude: ..." puts the query in the Claude draft. Anything that swaps
202+
what runs on the server arms on the first Enter or tap and runs on a second one within 4 s. The kernel and the
203+
server re-check every request. Core: `devtools/commands.ts` (pure, Lune-tested by `scripts/test-commands.luau`).
198204
- **Server > Experiments (framework 0.7.1): your own variant.** Every analytics experiment the game asked about for
199205
you, the variant you're in and why (random, forced by the settings, or your pick), a button per variant to pick it
200-
for yourself, and Clear; the palette has the same as "Experiment <name>: use <variant>". Devs where the dev-only
206+
for yourself, and Clear; the palette has the same as `Experiment <name>: use <variant>`. Devs where the dev-only
201207
tools are open to them (dev rules, or owners on a server an owner switched), owners everywhere: the same rule as
202208
Modules > State, re-checked by the server and by the analytics engine (`analytics/dev-control.ts`). It only ever
203209
changes your own variant, at most one change a second. The pick is stored in the analytics DataStore
@@ -210,12 +216,12 @@ return the generation's stop function, which the kernel calls on a swap.
210216
last minute's average, its slowest second and the physics FPS (`59.9 avg, 52.0 min, physics 60`; the warning colour
211217
under 50 on average). Older kernels show `needs kernel 0.4.2`. The same numbers ride on fleet heartbeats (the
212218
explorer's fleet table).
213-
- **Devtools reach devs only (kernel 0.5.6+):** the kernel leaves `devtools` off the shared client tree of a framework
214-
with `devtools/on-demand.ts`. `runtime/devtools-loader.ts` then clones the folder, minus the server-only modules, into
219+
- **Devtools reach devs only (framework and kernel 0.5.6+):** the kernel leaves `devtools` off the shared client tree
220+
of a framework with `devtools/on-demand.ts`. `runtime/devtools-loader.ts` then clones the folder, minus the server-only modules, into
215221
each dev's PlayerGui (join, each generation, dev status changes), and that client copies it into its own tree and
216222
starts it. On older kernels the folder stays in the tree as before. A failure costs a dev the menu, with a warning, and
217223
never the generation.
218-
- **Dev-only tools (framework 0.4.1, `devtools/access.ts`):** Claude, Logs > Upload, Dex edits on the server, Network
224+
- **Dev-only tools (framework 0.5.0, `devtools/access.ts`):** Claude, Logs > Upload, Dex edits on the server, Network
219225
packet blocking and the hot-swap sound work under dev rules (private, reserved and Studio servers on a dev branch)
220226
for every dev, and on a public server an owner switched to a dev branch (Server > Branch) for owners only. Everywhere
221227
else the menu is read-only, with a short reason: "Dev branch only", "Owners only on public servers", "Owner-switched
@@ -600,11 +606,11 @@ const variant = analytics.experiment("onboarding", ["short", "long"]); // same a
600606
economy are server-authoritative): on the client they warn once and send nothing, and the server refuses them from
601607
clients.
602608
- **Options** (all on by default): `sessions` (joins, leaves, device, join source, account age bucket, Premium,
603-
country, the player policy, device trust, friends in the server, first-ever vs returning, days since the last visit), `tech` (FPS, ping, memory, load
604-
time, client and server errors, swaps and rollbacks, leaves within 60 s of a swap), `zones` (parts or models tagged
605-
`TTZone`, named by a `Name` attribute or the instance name), `screens` (ScreenGuis in PlayerGui, GuiObjects tagged
606-
`TTScreen`), `recording` (the first-ever session in detail), `fleet` (kernel 0.3.2 heartbeats and deploy reports),
607-
`identity` (one `{ pid, uid }` row per session to the dev's own server, below). `settings` (server only) replaces the
609+
country, language (`locale`), the player policy, device trust, friends in the server, first-ever vs returning, days
610+
since the last visit), `tech` (FPS, ping, memory, load time, client and server errors, swaps and rollbacks, leaves
611+
within 60 s of a swap), `zones` (parts or models tagged `TTZone`, named by a `Name` attribute or the instance name),
612+
`screens` (ScreenGuis in PlayerGui, GuiObjects tagged `TTScreen`), `recording` (the first-ever session in detail),
613+
`fleet` (kernel 0.3.2 heartbeats and deploy reports), `identity` (one `{ pid, uid }` row per session to the dev's own server, below). `settings` (server only) replaces the
608614
signed settings' `analytics`, for tests, Studio and kernels before 0.3.8.
609615
- **Positions on events** (for map layers): `px`, `py`, `pz` props (studs, rounded to 0.1) from a character's root
610616
part. Per call: `track(player, name, props, { position: true })` (the event's player; on the client the local
@@ -667,17 +673,22 @@ const variant = analytics.experiment("onboarding", ["short", "long"]); // same a
667673
when the player is alone) intersected with the players there, not a web call per player.
668674

669675
**Settings, framework 0.4.0 / kernel 0.4.0 (plans/21):** the record's `backend` = `{ url, key, analytics?: { flushSeconds,
670-
recordShare, recordSeconds, positions, joinLaunchPrefix, joinData } }` (`typetorch backend setup`) is the whole sink: DuckDB at `<url>/v1/ingest` with the one key (Basin
671-
identities to `<url>/v1/identity`). The old `analytics` value below is read while `backend` is missing, and stays the
672-
way to a Basin sink. The engine also tells the kernel each player's pid (`setAnalyticsId`: the kernel's error reports
673-
count affected players by pid, never by name) and counts its own DataStore and HTTP requests for the budget view (dev
674-
menu **Server > Budget**: bars per Roblox limit for the player count, who spends it, the DataStore budget left, memory).
676+
recordShare, recordSeconds, positions, techEvery, experiments, joinLaunchPrefix, joinData } }` is the whole sink: DuckDB
677+
at `<url>/v1/ingest` with the one key (Basin identities to `<url>/v1/identity`). `typetorch backend setup` writes it
678+
(`--flush-seconds`, `--record-share`; `writeBackendSettings()` in `@typetorch/backend` runs it, and `bun run local`
679+
too), and `typetorch experiment` writes `experiments`. The other dials (`recordSeconds`, `positions`, `techEvery`,
680+
`joinLaunchPrefix`, `joinData`) have no CLI writer yet: `backend setup` keeps them when the record has them, and
681+
`positions` can be set in code with the engine option. The old `analytics` value below is read while `backend` is
682+
missing, and stays the way to a Basin sink. The engine also tells the kernel each player's pid (`setAnalyticsId`: the
683+
kernel's error reports count affected players by pid, never by name) and counts its own DataStore and HTTP requests
684+
for the budget view (dev menu **Server > Budget**: bars per Roblox limit for the player count, who spends it, the
685+
DataStore budget left, memory).
675686

676687
**Settings** (server only, never sent to clients): the signed settings record's `analytics` field (kernel 0.3.8,
677-
plans/20), derived from `backend` by `typetorch backend setup` (`writeBackendSettings()` in `@typetorch/backend` runs it, and
678-
`bun run local` too). Every new copy applies live within seconds (the CLI pings servers). A Basin sink has no CLI writer
679-
since CLI 0.9: `backend setup` replaces it. Before kernel 0.3.8
680-
there are no settings unless the game passes `new AnalyticsEngine({ settings })`:
688+
plans/20), which `typetorch backend setup` also writes, derived from `backend`, for frameworks before 0.4. Every new
689+
copy applies live within seconds (the CLI pings servers). A Basin sink has no CLI writer since CLI 0.9 (`typetorch
690+
settings set analytics` points to `backend setup`). Before kernel 0.3.8 there are no settings unless the game passes
691+
`new AnalyticsEngine({ settings })`:
681692

682693
```json
683694
{ "backend": "basin", "events": "https://<stream-id>.ingest.cloudflare.com",
@@ -746,10 +757,13 @@ bun run build # rbxtsc --type package -> out/
746757
`test-explorer-core` (Dex), `test-toolbox-sanitize` (the Creator Store sanitizer), `test-sha256` (SHA-256 / HMAC in util and the
747758
pairing-code fingerprint), `test-notifications` (the launch token with the contract's shared vector, intent checks,
748759
the queue: batches of 200, rev order, a swap's handover), `test-notify-server` (the notifications server against
749-
mocked services), `test-analytics-join` (the join row's metadata; no other player's UserId) and `test-feedback`
760+
mocked services), `test-analytics-join` (the join row's metadata; no other player's UserId), `test-feedback`
750761
(`feedback()`: the scale config, rating normalisation, text sanitising and caps with multi-byte text, rate limits, the
751-
row's shape; run from framework/: `lune run scripts/test-feedback.luau out/`). `node scripts/check-self-calls.mjs out` flags compiled functions that call themselves on their first
752-
lines (after `bun run build`).
762+
row's shape; run from framework/: `lune run scripts/test-feedback.luau out/`), `test-commands` (the command
763+
palette's core and its branch / build rules) and `test-devtools-loader` (who gets the devtools copy and when a client
764+
starts it). `node scripts/check-self-calls.mjs out` flags compiled functions that call themselves on their first
765+
lines, and `node scripts/check-devtools-split.mjs out` checks that a non-dev client's tree never reaches `devtools`
766+
and that a dev's copy holds everything its client imports (both after `bun run build`).
753767
- **Package contents:** only `out/` (no `.tsbuildinfo`), `README.md` and `LICENSE`; check with `bun pm pack --dry-run`.
754768
- **Explorer class icons:** `assets/class-icons.png` (kept locally, not in the repo: it is Roblox's own texture) is
755769
the client's `content/textures/ClassImages.PNG` (a 2352x16 strip) repacked into a 32-column grid, because live
@@ -763,7 +777,7 @@ Publishing is tag-only, from CI (`.github/workflows/publish.yml`), with npm trus
763777

764778
```sh
765779
# first commit src/version.ts set to the new version (npm version needs a clean tree)
766-
npm version 0.5.6 -m "release %s"
780+
npm version <x.y.z> -m "release %s"
767781
git push origin main --follow-tags
768782
```
769783

‎src/analytics/SCHEMA.md‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,24 @@ start, i.e. the row's `t`). Time is the running sum of `dt`.
149149

150150
## Sink settings
151151

152-
The signed settings record's `analytics` field (kernel 0.3.8, plans/20; server-only; before 0.3.8 the ConfigService key
153-
`TypeTorchAnalytics`), a JSON object, written with `typetorch settings set analytics -` (JSON on stdin; the analytics
154-
repo's `bun run local` does it). Every new signed copy applies at once, so dials change live (the CLI pings servers).
152+
Server-only, from the signed settings record (kernel 0.3.8, plans/20; before 0.3.8 the ConfigService key
153+
`TypeTorchAnalytics`). Every new signed copy applies at once, so dials change live (the CLI pings servers).
155154
`new AnalyticsEngine({ settings })` replaces it (tests, Studio, kernels before 0.3.8).
156155

156+
- **`backend`** (kernel 0.4.0 / framework 0.4.0, plans/21) = `{ url, key, analytics? }` is the sink: `duckdb` at
157+
`<url>/v1/ingest` with `key` as the token, and the dials below from `backend.analytics`. It is written by
158+
`typetorch backend setup` (CLI 0.9+; `--flush-seconds`, `--record-share`), which `@typetorch/backend`'s
159+
`writeBackendSettings()` and `bun run local` run. `typetorch experiment` writes `backend.analytics.experiments`.
160+
- **`analytics`** (the object below) is read while `backend` is missing, and whenever it names a `basin` sink
161+
(`backend` can't describe Basin streams). `backend setup` also derives a `duckdb` copy of it for frameworks before
162+
0.4. CLI 0.9 removed `typetorch settings set analytics` (it now points to `backend setup`), so a Basin sink has no CLI
163+
writer.
164+
- **No CLI writer yet** for `recordSeconds`, `positions`, `techEvery`, `joinData` and `joinLaunchPrefix`: they keep
165+
their defaults unless the record already holds them (`backend setup` keeps the existing `backend.analytics` fields),
166+
or the game passes `new AnalyticsEngine({ settings })`. `positions` can also be set in code with the engine option of
167+
the same name. `identity` and `identityToken` (Basin only) live in the old `analytics` value, which has no CLI writer
168+
either.
169+
157170
```json
158171
{
159172
"backend": "basin",

0 commit comments

Comments
 (0)