glitchless-mcp 0.13.0 → 0.14.0

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-mcp",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "mcpName": "io.github.glitchless-gg/glitchless",
5
5
  "description": "Coding agents can build a game. They can't see anyone play it. Glitchless lets them. The MCP server for Glitchless, game observability for coding agents: Claude Code, Codex, Cursor and others read real players' stutters, crashes, custom metrics and ranked findings in Unity, Godot, Unreal, Three.js, Phaser and GameMaker games, build the game's own dashboard, and run playtest bots.",
6
6
  "keywords": [
package/src/context.js CHANGED
@@ -9,7 +9,7 @@ import path from 'node:path';
9
9
  import { McpServer } from '@modelcontextprotocol/server';
10
10
  import { z } from 'zod';
11
11
 
12
- export const VERSION = '0.13.0';
12
+ export const VERSION = '0.14.0';
13
13
 
14
14
  // Where `glitchless-mcp login` keeps its workspace key: { url, token, workspace: { id, name }, scopes }.
15
15
  export const CREDENTIALS_FILE = path.join(process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config'), 'glitchless', 'credentials.json');
@@ -267,7 +267,15 @@ function instructions(remote) {
267
267
 
268
268
  // An issue in a list: with `resolved` or `came_back` when the game's owner resolved it (glitchless_resolve_error).
269
269
  export function slimIssue(i) {
270
- return { fingerprint: i.fingerprint, kind: i.kind, message: i.message, location: i.location, count: i.count, sessions: i.sessions, sessions_pct: i.sessions_pct, levels: i.levels, versions: i.versions, first_version: i.first_version, last_seen: new Date(i.last_seen).toISOString(), ...(i.resolved ? { resolved: i.resolved } : {}), ...(i.came_back ? { came_back: i.came_back } : {}) };
270
+ return { fingerprint: i.fingerprint, kind: i.kind, message: i.message, location: i.location, count: i.count, sessions: i.sessions, sessions_pct: i.sessions_pct, levels: i.levels, versions: i.versions, first_version: i.first_version, last_seen: new Date(i.last_seen).toISOString(), ...(i.no_players ? { no_players: i.no_players } : {}), ...(i.resolved ? { resolved: i.resolved } : {}), ...(i.came_back ? { came_back: i.came_back } : {}) };
271
+ }
272
+
273
+ // An issue no player hit (the errors query's no_players: its sessions by kind), in a line, or ''.
274
+ const TEST_KINDS = { synthetic: 'synthetic (bots, playtests, store test phones)', tester: 'tester', simulated: 'simulated', dev_builds: 'on dev builds' };
275
+ export function noPlayersLine(i) {
276
+ if (!i.no_players) return '';
277
+ const kinds = Object.entries(i.no_players).map(([k, n]) => `${n} ${TEST_KINDS[k] ?? k}`);
278
+ return `No player hit it${kinds.length ? `: its sessions were ${kinds.join(', ')}` : ', only test sessions'}. Check that it can happen on players' devices before changing code for it.`;
271
279
  }
272
280
 
273
281
  export function slimGroup(g) {
package/src/tools/core.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // The built-in reads: which games report, findings, headline numbers, frame time, errors, levels,
2
2
  // death hotspots and one session in detail.
3
3
  import { z } from 'zod';
4
- import { base, query, resolveService, range, reply, common, tool, slimIssue, slimGroup, filters, isWorkspace, workspaceGames, workspaceIntake, agent, SETUP_URL } from '../context.js';
4
+ import { base, query, resolveService, range, reply, common, tool, slimIssue, noPlayersLine, slimGroup, filters, isWorkspace, workspaceGames, workspaceIntake, agent, SETUP_URL } from '../context.js';
5
5
 
6
6
  tool('glitchless_list_games', 'List the games: with a workspace key, every game in the workspace (its id, name, client token and the services reporting to it); with a key for one game, its services, versions, environments and when they were last seen.', {}, async () => {
7
7
  if (isWorkspace()) {
@@ -78,7 +78,7 @@ tool(
78
78
 
79
79
  tool(
80
80
  'glitchless_get_error',
81
- "Error Tracking for a game. Without a fingerprint: the open error issues ranked by sessions affected, any that came back first (`came_back`: resolved by the game's owner, then fired again in a later version: which, since when, and the note), and then, apart, the ones resolved (`resolved`: when, the newest version it had been seen in, the note). With a fingerprint: the full issue — message, location, stack trace, affected levels/versions, occurrence counts and breadcrumbs (the game events right before it fired), and whether it is resolved or came back. For a minified web build whose source maps were uploaded (glitchless-sourcemaps), location and stack are the original ones, `frames` gives each frame with its line of code, and `minified` what the browser reported. glitchless_resolve_error resolves one.",
81
+ "Error Tracking for a game. Without a fingerprint: the open error issues ranked by sessions affected, any that came back first (`came_back`: resolved by the game's owner, then hit by players again in a later version: which, since when, and the note), and then, apart, the ones resolved (`resolved`: when, the newest version it had been seen in, the note). With a fingerprint: the full issue — message, location, stack trace, affected levels/versions, occurrence counts and breadcrumbs (the game events right before it fired), and whether it is resolved or came back. An issue no player hit has `no_players`, its sessions by kind (synthetic: bots, playtests and store test phones such as Google Play's pre-launch ones; tester; dev_builds): check that it can happen on players' devices before fixing it. For a minified web build whose source maps were uploaded (glitchless-sourcemaps), location and stack are the original ones, `frames` gives each frame with its line of code, and `minified` what the browser reported. glitchless_resolve_error resolves one.",
82
82
  { ...common, fingerprint: z.string().optional().describe('Issue fingerprint from the list or from glitchless_triage') },
83
83
  async ({ service, hours, fingerprint, ...f }) => {
84
84
  const svc = await resolveService(service);
@@ -87,13 +87,15 @@ tool(
87
87
  const open = issues.filter((i) => !i.resolved).map(slimIssue);
88
88
  const resolved = issues.filter((i) => i.resolved).map(slimIssue);
89
89
  const back = open.filter((i) => i.came_back).length;
90
- return reply(`${open.length} open error issue(s) in ${svc}${back ? `, ${back} of them back after being resolved` : ''}${resolved.length ? `; ${resolved.length} resolved (left out of glitchless_triage)` : ''}`, resolved.length ? { open, resolved } : open);
90
+ const tests = open.filter((i) => i.no_players).length;
91
+ return reply(`${open.length} open error issue(s) in ${svc}${back ? `, ${back} of them back after being resolved` : ''}${tests ? `, ${tests} hit by no player (only test phones, bots, testers or dev builds: no_players)` : ''}${resolved.length ? `; ${resolved.length} resolved (left out of glitchless_triage)` : ''}`, resolved.length ? { open, resolved } : open);
91
92
  }
92
93
  const issue = issues.find((i) => i.fingerprint === fingerprint || i.fingerprint?.startsWith(fingerprint));
93
94
  if (!issue) return reply(`No issue ${fingerprint} in ${svc} in this window. Known issues:`, issues.map(slimIssue));
94
95
  const { series, ...rest } = issue;
95
96
  const state = issue.came_back ? ` — resolved${issue.came_back.resolved.version ? ` in ${issue.came_back.resolved.version}` : ''}, and came back in ${issue.came_back.version}` : issue.resolved ? ` — resolved${issue.resolved.version ? ` (newest version then: ${issue.resolved.version})` : ''}${issue.resolved.note ? `: ${issue.resolved.note}` : ''}` : '';
96
- return reply(`Error issue ${issue.fingerprint} in ${svc}${state}`, rest);
97
+ const tests = noPlayersLine(issue);
98
+ return reply(`Error issue ${issue.fingerprint} in ${svc}${state}${tests ? `. ${tests}` : ''}`, rest);
97
99
  },
98
100
  );
99
101
 
@@ -116,24 +116,26 @@ act(
116
116
 
117
117
  act(
118
118
  'glitchless_resolve_error',
119
- "Resolve an error issue, as in Sentry: the game's owner has fixed it or accepts it (a GPU driver's error on test phones, one the newest build fixed). The Errors page hides it, glitchless_get_error lists it apart, and glitchless_triage, the overview and the weekly summary leave it out. It comes back by itself if it fires again in a version later than the newest it had been seen in (any_version: in any version, the old builds included), first in the list and new to the new_error alert. fingerprint is the issue's from glitchless_get_error or glitchless_triage (error-<fingerprint>), or the start of one. Resolving one again (one that came back) starts over from now. clear: true unresolves it. Without fingerprint, lists the game's resolved errors. Only the person's say-so resolves an error: ask before resolving one. Needs an Owner's or Admin's key, as alert settings do.",
119
+ "Resolve an error issue, as in Sentry: the game's owner has fixed it or accepts it (a GPU driver's error on test phones, one the newest build fixed). The Errors page hides it, glitchless_get_error lists it apart, and glitchless_triage, the overview and the weekly summary leave it out. It comes back by itself if players hit it again in a version later than the newest players had hit it in (any_version: in any version, the old builds included), first in the list and new to the new_error alert. Store test phones (Google Play runs each upload on its own before release), bots, testers and dev builds don't bring it back unless all_sessions is true. fingerprint is the issue's from glitchless_get_error or glitchless_triage (error-<fingerprint>), or the start of one. Resolving one again (one that came back) starts over from now. clear: true unresolves it. Without fingerprint, lists the game's resolved errors. Only the person's say-so resolves an error: ask before resolving one. Needs an Owner's or Admin's key, as alert settings do.",
120
120
  {
121
121
  fingerprint: z.string().optional().describe('The issue\'s fingerprint, e.g. "9803ec1a", or the start of one'),
122
122
  note: z.string().optional().describe('Why, in a few words (200 characters at most), e.g. "Google Play\'s test phones on SwiftShader"'),
123
123
  any_version: z.boolean().optional().describe('Come back if it fires again in any version, not only a later one'),
124
+ all_sessions: z.boolean().optional().describe("Come back when any session fires it (store test phones, bots, testers, dev builds), not only a player's"),
124
125
  clear: z.boolean().optional().describe('Unresolve it'),
125
126
  },
126
- async ({ fingerprint, note, any_version, clear, game }) => {
127
+ async ({ fingerprint, note, any_version, all_sessions, clear, game }) => {
127
128
  const pid = await projectFor(game);
128
129
  if (!fingerprint) {
129
130
  const { resolved } = await agent('GET', `/games/${pid}/resolved`);
130
131
  return reply(resolved.length ? `${resolved.length} resolved error(s), hidden on the Errors page and left out of triage until they come back:` : 'No resolved errors.', resolved);
131
132
  }
132
133
  const fp = fingerprint.replace(/^error-/, '');
133
- const { resolved } = await agent('POST', `/games/${pid}/resolved`, clear ? { fingerprint: fp, clear: true } : { fingerprint: fp, note, any_version });
134
+ const { resolved } = await agent('POST', `/games/${pid}/resolved`, clear ? { fingerprint: fp, clear: true } : { fingerprint: fp, note, any_version, all_sessions });
134
135
  if (clear) return reply(`${fp} is open again: the Errors page and glitchless_triage show it.`, resolved);
135
136
  const e = resolved.find((x) => x.fingerprint.startsWith(fp));
136
- return reply(`Resolved ${e.fingerprint}. It comes back if it fires again ${e.any ? 'in any version' : e.version ? `in a version after ${e.version}` : 'at all'}. Resolved errors:`, resolved);
137
+ const who = e.all_sessions ? 'any session fires it' : 'a player hits it';
138
+ return reply(`Resolved ${e.fingerprint}. It comes back if ${who} again ${e.any ? 'in any version' : e.version ? `in a version after ${e.version}` : 'at all'}. Resolved errors:`, resolved);
137
139
  },
138
140
  // Resolving again starts it over, and clear unresolves one.
139
141
  { title: 'Resolve error', annotations: { destructiveHint: true, idempotentHint: false } },