glitchless-dsh 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glitchless-dsh",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Let your agent understand your players. Glitchless for DeepSeek Harness: game observability tools over MCP (ranked findings, frame times, errors, where players quit, each game's own dashboard) and skills that add Glitchless to a game in Unity, Godot, Unreal, Three.js and more, design its dashboard and fix what players hit.",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"type": "module",
|
|
@@ -122,8 +122,8 @@ quarter of a million characters. `upload: true` asks for a link from any server.
|
|
|
122
122
|
| type | fields |
|
|
123
123
|
| --- | --- |
|
|
124
124
|
| `stat` | `metric` (sessions, players, avg_session_s, median_session_s, crash_free_pct, error_free_pct, frame_p95, avg_fps, hitches_per_min, errors, deaths, rage_quit_pct, hours_played, players_now: playing now, whatever the range; runs; for a multiplayer game ping_p50, ping_p95, loss_pct, disconnects_per_hour, disconnect_pct; with servers in server mode servers_now, server_tick_p95, server_crash_free_pct, players_per_server; with `zone` (a zone's name from `setZone`) zone_time_pct, its share of play time, and zone_median_s, the median time in it of the sessions that went there), or `event` with an optional `per`: another event (a percentage), `$players` / `$sessions` (the share of them that sent it: conversion) or `$hours` (per hour played: matches per hour; `deaths` and `errors` take it too). With `sum` (a numeric attribute), it adds that up instead, and `per: "$players"` gives it per player, `"$hours"` per hour played (gold per hour). `rate`: the share of the events where a flag holds (`"won"`) or a word is sent (`"result=win"`), with `expect` for a rate the game intends; `avg`: a numeric attribute's average; `of` with `quantile` (1 to 99) and `unit`: one percentile (the median match). Instead of `event`, `first` (an event: the median seconds from a session's start to its first one, or `quantile`) or `never` (an event: the share of ended sessions that never sent it), 31 days or less. A money stat in Robux takes `devex: true`: an estimate in dollars at Roblox's DevEx rate under it, always labelled one |
|
|
125
|
-
| `series` | `event`, optional `by` (split by an attribute, or `$version` / `$level` / `$zone`, or the sessions' `$platform` / `$browser` / `$device_tier` / `$link` / `$graphics` or a property, `$rank`), `limit`, `sum`, `rate` or `avg`, `per: "$hours"` |
|
|
126
|
-
| `breakdown` | `event`, `by`, `limit`, `sum` (each value's sum, largest first). `by` can split the sessions themselves: `$platform` (Windows, macOS, Linux, Steam Deck, iOS, Android, Web…; a Roblox game's Computer, Phone, Tablet, Xbox, PlayStation, VR), `$browser` (Chrome, Safari, Firefox, Edge…; a native build shows as "Godot app", a web build of an engine as "Unity web build") or `$device_tier` (High-end, Mid-range, Low-end GPU, Software rendering, high to low), `$link` (Wi-Fi, Mobile data, Wired), `$graphics` (the graphics setting: a `graphics` property the game sets, else what the SDK read itself, Roblox's Graphics Quality as Automatic or 1 to 10; Automatic first, then low to high), or a property the game sets (`$rank`, `$class`; sessions without it are "(none)"). Without `event` it counts the sessions in each, and their players when the game sends player IDs. Ranges of 31 days or less. With `rate` (`"won"`, `"result=win"`) or `avg`, each row's rate with its likely range (or its average) next to the overall one: `min` leaves out rows of fewer events (default 30 for a rate), `expect` draws the rate the game intends (a gacha's published odds, as a percentage: 0.6), `order` is `rate` (default), `count` or `value` (heat 0, 1, 2). Any breakdown takes `order: "value"` (the values' own order: streak day 1, 2 … 10) or `"count"`. `per: "$hours"` makes each row per hour played. By a list attribute (a deck), each element is a row. With `sum` in Robux, `devex: true` gives each row and the total an estimate in dollars. `by: "$zone"` without `event`: the time played in each zone, most first (share of play time, sessions that went there, their median time; time outside every zone is "(none)"), any range |
|
|
125
|
+
| `series` | `event`, optional `by` (split by an attribute, or `$version` / `$level` / `$zone`, or the sessions' `$platform` / `$browser` / `$device_tier` / `$link` / `$graphics` / `$site` or a property, `$rank`), `limit`, `sum`, `rate` or `avg`, `per: "$hours"` |
|
|
126
|
+
| `breakdown` | `event`, `by`, `limit`, `sum` (each value's sum, largest first). `by` can split the sessions themselves: `$platform` (Windows, macOS, Linux, Steam Deck, iOS, Android, Web…; a Roblox game's Computer, Phone, Tablet, Xbox, PlayStation, VR), `$browser` (Chrome, Safari, Firefox, Edge…; a native build shows as "Godot app", a web build of an engine as "Unity web build") or `$device_tier` (High-end, Mid-range, Low-end GPU, Software rendering, high to low), `$link` (Wi-Fi, Mobile data, Wired), `$graphics` (the graphics setting: a `graphics` property the game sets, else what the SDK read itself, Roblox's Graphics Quality as Automatic or 1 to 10; Automatic first, then low to high), `$site` (where a web game was played: itch.io, CrazyGames, Poki, Newgrounds, GX.games, localhost, or the game's own site; "(none)" for a native build or an engine's web build, which don't send their page), or a property the game sets (`$rank`, `$class`; sessions without it are "(none)"). Without `event` it counts the sessions in each, and their players when the game sends player IDs. Ranges of 31 days or less. With `rate` (`"won"`, `"result=win"`) or `avg`, each row's rate with its likely range (or its average) next to the overall one: `min` leaves out rows of fewer events (default 30 for a rate), `expect` draws the rate the game intends (a gacha's published odds, as a percentage: 0.6), `order` is `rate` (default), `count` or `value` (heat 0, 1, 2). Any breakdown takes `order: "value"` (the values' own order: streak day 1, 2 … 10) or `"count"`. `per: "$hours"` makes each row per hour played. By a list attribute (a deck), each element is a row. With `sum` in Robux, `devex: true` gives each row and the total an estimate in dollars. `by: "$zone"` without `event`: the time played in each zone, most first (share of play time, sessions that went there, their median time; time outside every zone is "(none)"), any range |
|
|
127
127
|
| `distribution` | `event`, `of` (a numeric attribute), optional `by` (an attribute, `$version`, `$level`, a session split), `limit` (rows, up to 8), `bins` (bars, up to 40), `unit` (`"s"` shows minutes and hours; or the game's word, `"floors"`). How it spreads: half under, 1 in 10 over, and a histogram |
|
|
128
128
|
| `funnel` | `steps`: events in order, comma-separated |
|
|
129
129
|
| `levels` | `label`: what the game calls a level ("Stop", "Puzzle", "Wave"); shows each one's median clear time and the slowest 1 in 10, and the attempts a disconnect ended. `by` splits each level's attempts: an attribute of its `levelStart` (`"tier"`, `"party_size"`, a list such as `"build"`), a property (`"$class"`) or a split; `level` keeps one level; `count: "runs"` counts each run once at each level it reached |
|
|
@@ -135,7 +135,8 @@ quarter of a million characters. `upload: true` asks for a link from any server.
|
|
|
135
135
|
| `frame_time` | none: p50 and p95 over time against players' screens; `by: "$zone"` or `"$level"`: a row per zone or level with its p50, p95, frames over budget, hitches per minute and share of play time, most played first (`limit`, up to 20) |
|
|
136
136
|
| `findings`, `errors`, `deaths`, `events`, `reports` | none (`limit` for findings, errors and reports; `by` and `level` for deaths, as on `levels`) |
|
|
137
137
|
| `retention` | `limit`: how many of the latest first-seen days (default 14); `by` a property (`$spender`): each value's D1, D7 and D30. Needs player IDs: a game in anonymous mode gets a panel saying to turn install mode on, except a Roblox game connected to Roblox, whose panel shows Roblox's own retention |
|
|
138
|
-
| `store_revenue` | `measure` (required): `revenue`, `per_player`, `by_day`, `by_version` or `by_country` (a world map of installs or revenue by country with the countries ranked: installs, revenue, purchases; `show: "revenue"` opens it on revenue; size `l`); RevenueCat's `installs`, `active_users`, `mrr`, `actives`, `trials`, `players_by_day` and `by_store` (revenue in the App Store and Google Play next to the iOS and Android sessions measured); Stripe's `refunds`, `customers` (new paying customers) and `by_product`; Roblox's (in Robux) `installs` (new users), `active_users` (daily active users), `players_by_day` and `retention` (D1, D7, D30 by cohort day, size `m`), no `by_version
|
|
138
|
+
| `store_revenue` | `measure` (required): `revenue`, `per_player`, `by_day`, `by_version` or `by_country` (a world map of installs or revenue by country with the countries ranked: installs, revenue, purchases; `show: "revenue"` opens it on revenue; size `l`); RevenueCat's `installs`, `active_users`, `mrr`, `actives`, `trials`, `players_by_day` and `by_store` (revenue in the App Store and Google Play next to the iOS and Android sessions measured); Stripe's `refunds`, `customers` (new paying customers) and `by_product`; Roblox's (in Robux) `installs` (new users), `active_users` (daily active users), `players_by_day` and `retention` (D1, D7, D30 by cohort day, size `m`), no `by_version`; itch.io's earnings: `revenue`, `per_player`, `by_day` only. `store`: `revenuecat`, `stripe`, `roblox` or `itch` (default: the first connected). Real revenue from RevenueCat or the game's own Stripe account, Roblox's Robux or itch.io's earnings, for a game connected to it in Glitchless Cloud |
|
|
139
|
+
| `store_sales` | `store` (`steam` or `itch`): what the store counted by day. Steam: units, returns and wishlists. itch.io: its page as a funnel, page views → browser plays (the sessions Glitchless measured on itch.io) → downloads → purchases, with earnings; for a web game on itch.io, put it first on its itch.io page next to a `breakdown` by `$site` |
|
|
139
140
|
| `store_score` | `store` (`app_store`, `google_play`, `steam` or `roblox`): a store's rating, one small panel per store. The average stars of the written reviews synced in the window and how many, next to Apple's own rating on the App Store. Google Play has no API for its overall rating, so its panel is the reviews' average and says so. Roblox has no reviews: its thumbs up and down, favorites and visits |
|
|
140
141
|
| `positions` | `level`, or `zone` (what the game passes to `setZone`), or neither: every position and death in the game, for a hub with no levels; `show`: `deaths` (default), `path` or `both`, `bin`: a bin's width in world units (default about a hundredth of the place). Where players died there, counted per bin, and where they went on a coarser grid, over the place's background: one panel per place |
|
|
141
142
|
| `table` | `event` (required), `columns` (up to 12: attributes, `$time`, `$version`, `$platform`, `$level`, `$session`; `{ "key": "duration_s", "unit": "s" }` for a unit; default the event's own attributes, up to 8), `group_by` (an attribute, `$version`, `$level` or `$platform`), `sort` (`"-score"`: highest first; default newest first), `of` (a number whose lowest, average and highest each group shows), `limit` (rows a group, up to 100; default 20). The event's events one by one, size `l` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: instrument
|
|
3
|
-
description: Add Glitchless observability to a game (Unity 6.0+, Godot 4.5+, Unreal Engine 5.8 or 5.9, Three.js or React Three Fiber, Roblox, Phaser 3 or 4, Babylon.js, PlayCanvas or GameMaker 2024.2+). Frame-time percentiles, hitch attribution, errors, gameplay events, level heatmaps, and tools that let coding agents measure the running game. Use when the user wants telemetry, analytics, performance monitoring or "observability" in a game, or asks to add Glitchless.
|
|
3
|
+
description: Add Glitchless observability to a game (Unity 6.0+, Godot 4.5+, Unreal Engine 5.8 or 5.9, Three.js or React Three Fiber, Roblox, Phaser 3 or 4, Babylon.js, PlayCanvas or GameMaker 2024.2+), also in a Reddit post (Devvit Web). Frame-time percentiles, hitch attribution, errors, gameplay events, level heatmaps, and tools that let coding agents measure the running game. Use when the user wants telemetry, analytics, performance monitoring or "observability" in a game, or asks to add Glitchless.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Instrument a game with Glitchless
|
|
@@ -22,9 +22,11 @@ have a way to measure the running game before and after a change.
|
|
|
22
22
|
| `@babylonjs/core` or `babylonjs` in package.json, or a `<script>` that loads Babylon.js | Babylon.js 5+ | [references/babylon.md](references/babylon.md) |
|
|
23
23
|
| `playcanvas` in package.json, a PlayCanvas Editor project (scripts using `pc.createScript` or `pc.Script`), or a `<script>` that loads PlayCanvas | PlayCanvas 2.x | [references/playcanvas.md](references/playcanvas.md) |
|
|
24
24
|
| a `*.yyp` file | GameMaker 2024.2+ | [references/gamemaker.md](references/gamemaker.md) |
|
|
25
|
+
| `devvit.json` (a game in a Reddit post, Devvit Web), whatever its client is made with | Reddit, with the client's engine | [references/reddit.md](references/reddit.md) first, then the client's engine's file |
|
|
25
26
|
|
|
26
|
-
Read only the file for this game's engine
|
|
27
|
-
levels and events, bots and measuring, and checking it works. Apply these
|
|
27
|
+
Read only the file for this game's engine (for a game in a Reddit post, reddit.md and then its client's): each one
|
|
28
|
+
walks through reading the game, installing, levels and events, bots and measuring, and checking it works. Apply these
|
|
29
|
+
settings first.
|
|
28
30
|
|
|
29
31
|
Settings, for every engine:
|
|
30
32
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Reddit
|
|
2
|
+
|
|
3
|
+
Part of the `instrument` skill. Apply its settings first (section 0 of [SKILL.md](../SKILL.md): the
|
|
4
|
+
intake URL and client token, privacy, bots, testers and the version), and finish with its last two
|
|
5
|
+
sections: the game's own metrics and dashboard, and the report.
|
|
6
|
+
|
|
7
|
+
For a game in a Reddit post, on Reddit's Developer Platform (Devvit Web): `devvit.json` at the root, `src/client`
|
|
8
|
+
(a web game, or a Unity or Godot web build) and `src/server` (the app's Node server, Hono in Reddit's templates). The
|
|
9
|
+
game in the post may fetch only its own app's `/api/` routes, so it sends to `/api/glitchless`, and the app's server
|
|
10
|
+
passes that on with `glitchless/devvit`, adding the subreddit and the post. Set up that relay here, then the game with
|
|
11
|
+
its engine's steps.
|
|
12
|
+
|
|
13
|
+
## 1. Let the app's server reach Glitchless (first: Reddit reviews it)
|
|
14
|
+
|
|
15
|
+
In `devvit.json`, merged into what's there:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
"permissions": { "http": { "enable": true, "domains": ["api.glitchless.gg"] } }
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Reddit reviews a new domain when the app is next playtested or uploaded, usually in 1 to 2 business days; until
|
|
22
|
+
then the relay answers 502 and the SDKs keep the batches. Reddit games send to Glitchless Cloud: Reddit approves
|
|
23
|
+
documented APIs, not a server on the developer's own domain, and a playtest runs on Reddit's servers, which can't reach
|
|
24
|
+
`localhost`. With no Glitchless Cloud workspace, say so and stop here.
|
|
25
|
+
|
|
26
|
+
## 2. Mount the relay in the app's server
|
|
27
|
+
|
|
28
|
+
In the app's folder: `npm install glitchless` (0.8.0 or later, the first with the relay). It has no dependencies and goes into the server's bundle. In Reddit's
|
|
29
|
+
templates the API routes are `src/server/routes/api.ts`, mounted at `/api`:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { context } from '@devvit/web/server';
|
|
33
|
+
import { glitchlessRelay } from 'glitchless/devvit';
|
|
34
|
+
|
|
35
|
+
const glitchless = glitchlessRelay({ clientToken: '<the game client token>', context });
|
|
36
|
+
api.all('/glitchless/*', (c) => glitchless.fetch(c.req.raw));
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
On the app itself (no `/api` sub-router) it's `app.all('/api/glitchless/*', …)`. Node's own server (the hello-world
|
|
40
|
+
template): first thing in its request handler, `if (req.url?.startsWith('/api/glitchless/')) return glitchless.node(req, res);`.
|
|
41
|
+
Express: `app.use('/api/glitchless', glitchless.node)`. The intake defaults to `https://api.glitchless.gg`; pass
|
|
42
|
+
`intake` only if `glitchless_create_game` gave another.
|
|
43
|
+
|
|
44
|
+
## 3. Send from the game to `/api/glitchless`
|
|
45
|
+
|
|
46
|
+
Set the game up with its engine's steps (they follow this part when the files named the engine; otherwise call
|
|
47
|
+
`glitchless_create_game` again with `engine` and `files: ["devvit.json"]`), with these changes:
|
|
48
|
+
|
|
49
|
+
- intake URL `/api/glitchless`, a path on the post's own page: `intake: '/api/glitchless'` (web games); Unity
|
|
50
|
+
`Intake = "/api/glitchless"`; Godot `Glitchless.init("<game-id>", version, "prod", "/api/glitchless")`. The client
|
|
51
|
+
token stays in the init as the steps show.
|
|
52
|
+
- A web game installs `glitchless` in the client too (the same package).
|
|
53
|
+
|
|
54
|
+
In a post the SDKs send the batches left as the page goes by the page's own fetch, which carries the app's token (a
|
|
55
|
+
beacon can't), keep the `webmcp.dev` widget out, and draw the overlay under the post's Content-Security-Policy. A Godot
|
|
56
|
+
export's HTML shell has an inline script: if the post stays blank and the console says an inline script was refused,
|
|
57
|
+
move it into a `.js` file next to the page. Unreal web builds aren't tested in a post yet. GameMaker can't send from a
|
|
58
|
+
post yet: its HTML5 runner's `http_request` doesn't carry the app's token, and the GameMaker SDK can't add it; say so.
|
|
59
|
+
|
|
60
|
+
## 4. Privacy, and what Reddit asks for
|
|
61
|
+
|
|
62
|
+
- Every session through Reddit is anonymous: the relay drops a stored player ID (install mode becomes anonymous;
|
|
63
|
+
Reddit also clears a post's browser storage with each app version, so the ID wouldn't last), and replaces the
|
|
64
|
+
playing redditor's username and user IDs with `<redditor>` wherever the game put them. Still, never pass a Reddit
|
|
65
|
+
username, user ID, snoovatar or flair to Glitchless (properties, events, errors). For players coming back, Reddit's
|
|
66
|
+
own numbers answer: the app's Analytics tab and Devvit Journeys (step 5).
|
|
67
|
+
- The player's off switch is kept in browser storage, which an app update clears: a game with the setting keeps the
|
|
68
|
+
choice itself (Redis, per user, through its own `/api/` route) and calls `setEnabled` with it at start.
|
|
69
|
+
- Devvit's rules ask for an app README written for players, with a "Fetch Domains" section, and links to the app's
|
|
70
|
+
own Terms and Privacy Policy in its details on developers.reddit.com (Reddit's own policies aren't accepted). Add this
|
|
71
|
+
to `README.md`:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
## Fetch Domains
|
|
75
|
+
|
|
76
|
+
- `api.glitchless.gg`: Glitchless (https://www.glitchless.gg), which measures how the game runs and is played. The
|
|
77
|
+
app's server sends it how each play session ran (frame times, loading time, errors), what happened in the game
|
|
78
|
+
(levels started and finished, the game's own events), the browser, OS and screen size, and the subreddit and post
|
|
79
|
+
it was played in. No Reddit username, user ID or other personal data is sent, and nothing ties one session to
|
|
80
|
+
another. API: https://github.com/glitchless-gg/glitchless/blob/main/docs/SPEC.md
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The game's privacy policy says the same to players, linking Glitchless's (https://www.glitchless.gg/privacy.html).
|
|
84
|
+
The Terms are the user's own; Glitchless's (https://www.glitchless.gg/terms.html) are between them and Glitchless.
|
|
85
|
+
|
|
86
|
+
## 5. Devvit Journeys, from the same places
|
|
87
|
+
|
|
88
|
+
Reddit's Journeys feed its Analytics tab and its hackathons' judging. Offer to fire them where the game calls
|
|
89
|
+
Glitchless (`"journeys": true` in `devvit.json`'s permissions, and Reddit's telemetry router on the server, as its
|
|
90
|
+
Journeys docs show; nothing personal in `action`):
|
|
91
|
+
|
|
92
|
+
```js
|
|
93
|
+
import { telemetry } from '@devvit/analytics/client/reddit';
|
|
94
|
+
telemetry.appReady(); // the first frame
|
|
95
|
+
glitchless.levelStart(day); telemetry.startJourney(); // the player's Play, never the page load
|
|
96
|
+
telemetry.progress({ progress: 0.6, action: 'checkpoint' }); // 0 to 1
|
|
97
|
+
glitchless.levelComplete(day, { score }); telemetry.endJourney({ complete: true, game: { win: true, score } });
|
|
98
|
+
glitchless.levelFail(day); telemetry.endJourney({ complete: false, game: { win: false, score } });
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## 6. Verify
|
|
102
|
+
|
|
103
|
+
`npm run dev` (a playtest) prints a URL; open it, play a level, and leave the post. Then `glitchless_session` lists
|
|
104
|
+
the session with the properties `subreddit` and `post`. Nothing yet: in the browser's network tab, a 502 from
|
|
105
|
+
`/api/glitchless/v1/intake` means Reddit hasn't approved `api.glitchless.gg` yet (or the server can't reach it); a
|
|
106
|
+
404 means the relay isn't mounted at that path; a 401 or 403, that the client token isn't the relay's.
|
|
@@ -22,7 +22,7 @@ Add one line to `dependencies` in `Packages/manifest.json`:
|
|
|
22
22
|
"gg.glitchless.sdk": "https://github.com/glitchless-gg/glitchless.git?path=unity/Packages/gg.glitchless.sdk"
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Unity resolves it the next time the Editor has focus. Pin a release by adding `#gg.glitchless.sdk/v0.7.
|
|
25
|
+
Unity resolves it the next time the Editor has focus. Pin a release by adding `#gg.glitchless.sdk/v0.7.3`.
|
|
26
26
|
|
|
27
27
|
## 3. Initialize, without touching a scene file
|
|
28
28
|
|