@chrischall/warapp-mcp 0.22.1 → 0.23.1

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.
Files changed (72) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +49 -3
  4. package/dist/analysis/coalition.js +3 -2
  5. package/dist/analysis/outlook.js +42 -2
  6. package/dist/analysis/plan/captures.js +3 -1
  7. package/dist/analysis/plan/relations.js +1 -1
  8. package/dist/analysis/plan/report.js +2 -2
  9. package/dist/analysis/plan/targets.js +48 -12
  10. package/dist/analysis/plan/threats.js +55 -2
  11. package/dist/analysis/planner.js +2 -1
  12. package/dist/analysis/relations.js +40 -7
  13. package/dist/bundle.js +10250 -3744
  14. package/dist/chat.js +93 -3
  15. package/dist/clans.js +308 -0
  16. package/dist/forums.js +70 -0
  17. package/dist/friends.js +83 -0
  18. package/dist/index.js +1 -1
  19. package/dist/invite-code.js +46 -0
  20. package/dist/join-color.js +23 -13
  21. package/dist/ladders.js +360 -0
  22. package/dist/mail.js +295 -0
  23. package/dist/my-games.js +18 -1
  24. package/dist/notifications.js +22 -4
  25. package/dist/open-games.js +29 -2
  26. package/dist/outlook-log.js +1 -0
  27. package/dist/protocol/bundle.js +4 -4
  28. package/dist/protocol/codec.js +1 -1
  29. package/dist/protocol/methods.js +690 -8
  30. package/dist/protocol/rpc.js +28 -3
  31. package/dist/push/socketio.js +2 -2
  32. package/dist/quickmatch.js +264 -0
  33. package/dist/surrender-pending.js +62 -2
  34. package/dist/templates.js +451 -0
  35. package/dist/tools/boot-player.js +165 -0
  36. package/dist/tools/calibration-harness.js +8 -1
  37. package/dist/tools/calibration.js +14 -2
  38. package/dist/tools/chat.js +19 -0
  39. package/dist/tools/clan-writes.js +208 -0
  40. package/dist/tools/clans.js +181 -0
  41. package/dist/tools/end-game-common.js +49 -0
  42. package/dist/tools/forums.js +535 -0
  43. package/dist/tools/friends.js +50 -0
  44. package/dist/tools/game.js +21 -3
  45. package/dist/tools/index.js +39 -0
  46. package/dist/tools/invites.js +347 -0
  47. package/dist/tools/join-game.js +4 -4
  48. package/dist/tools/ladders.js +418 -0
  49. package/dist/tools/leave-game.js +85 -27
  50. package/dist/tools/live-context.js +2 -2
  51. package/dist/tools/mail.js +600 -0
  52. package/dist/tools/my-games.js +50 -6
  53. package/dist/tools/notifications.js +12 -3
  54. package/dist/tools/nudge.js +178 -0
  55. package/dist/tools/quickmatch.js +481 -0
  56. package/dist/tools/react.js +177 -0
  57. package/dist/tools/relations.js +3 -2
  58. package/dist/tools/session.js +6 -2
  59. package/dist/tools/team-surrender.js +206 -0
  60. package/dist/tools/templates.js +342 -0
  61. package/dist/tools/tournaments.js +495 -0
  62. package/dist/tools/turn.js +4 -1
  63. package/dist/tools/vote-to-end.js +142 -0
  64. package/dist/tools/write-kit.js +22 -1
  65. package/dist/tournaments.js +321 -0
  66. package/dist/trend.js +1 -0
  67. package/dist/version.js +1 -1
  68. package/manifest.json +190 -2
  69. package/mint.yaml +3 -4
  70. package/package.json +1 -1
  71. package/server.json +2 -2
  72. package/skills/warapp-mcp/SKILL.md +39 -6
@@ -0,0 +1,342 @@
1
+ // warapp_list_templates, warapp_get_template and warapp_create_game (#635): war.app's game templates
2
+ // (GetTemplates 134, GetTemplatesByID 135, GetTemplate 138), the member free-mod-game status
3
+ // (GetFreeModGameStatus 266, new in 6.09) and creating a game from a template (CreateGame 33, with
4
+ // CreateGameInviteCode 294 for a game joined by an invite link). Every layout is read from the client bundle
5
+ // and golden-pinned, UNVERIFIED live (docs/WEB-PROTOCOL.md "Templates and creating games").
6
+ //
7
+ // A game is created only from a template, with only its name changed: the template's settings are sent as the
8
+ // bytes war.app gave them (src/templates.ts), never re-encoded, so no custom setting is offered. Template, game
9
+ // and owner names are their creators' words: shown through `untrustedText`, never as instructions. Creating a
10
+ // game invites the players named (each gets an invitation), so it is confirm-gated; the preview names everyone
11
+ // by id. AddToInviteList / RemoveFromInviteList (56/57) are not used: the web client never sends them, so there
12
+ // is no writer to read, and they are the account's own invite list, not a game's invitations.
13
+ import { CONFIRM_INJECTION_RULE, McpToolError, toolAnnotations } from '@chrischall/mcp-utils';
14
+ import { z } from 'zod';
15
+ import { holdsSeat } from '../player-states.js';
16
+ import { AI_INVITE, FREE_MOD_GAME_STATE, INVITE_CODE, MAX_TEMPLATE_IDS, Method, OPEN_SEAT_INVITE, readCreateGameReturn, readFreeModGameStatus, readGameInviteCode, TEMPLATE_NOT_FOUND, writeCreateGameInviteCodeParams, writeCreateGameParams, writeGetTemplateParams, writeGetTemplatesByIdParams, writeGetTemplatesParams, } from '../protocol/methods.js';
17
+ import { WarappServerError } from '../protocol/rpc.js';
18
+ import { buildStartSettings, checkGameName, createRefusals, MAX_GAME_NAME, readTemplateInfos, templateView, verifyStartSettings, walkTemplate, } from '../templates.js';
19
+ import { inGameId } from '../live.js';
20
+ import { readAnnotations, respond, UNTRUSTED_PREVIEW_NOTE, untrustedDescription, untrustedText } from './common.js';
21
+ import { mintMeta } from './hints.js';
22
+ import { failureText, requireApprovedAccount, writeAccount } from './live-context.js';
23
+ import { accountUnknown, defineGatedWrite, refuse, sendAndVerify } from './write-kit.js';
24
+ import { BRIDGE_NOTE } from './live.js';
25
+ /** Every answer says so: nothing here has been checked against a real reply. */
26
+ export const TEMPLATES_UNVERIFIED = "Read from war.app's client code, UNVERIFIED live: the template reads, the free-mod-game status and creating a " +
27
+ 'game have not been checked against a real reply yet.';
28
+ /** The most seats one create invites here (war.app's own cap is in the template's settings; it refuses more). */
29
+ export const MAX_CREATE_SEATS = 40;
30
+ /** The most characters of a template description shown. */
31
+ const DESCRIPTION_MAX = 500;
32
+ /** Read one template: refused when war.app holds none by that id. */
33
+ async function readTemplate(ctx, templateId) {
34
+ let walked;
35
+ try {
36
+ const env = await ctx.rpc.call('GetTemplate', Method.GetTemplate, (w) => writeGetTemplateParams(w, templateId));
37
+ walked = walkTemplate(await ctx.bundle(), env.body);
38
+ }
39
+ catch (e) {
40
+ if (e instanceof WarappServerError && TEMPLATE_NOT_FOUND.has(e.code))
41
+ walked = null;
42
+ else
43
+ throw e;
44
+ }
45
+ if (walked === null) {
46
+ refuse(`war.app holds no template ${templateId} (it may have been deleted by its creator).`, 'List your templates with warapp_list_templates.');
47
+ }
48
+ return walked;
49
+ }
50
+ /** The free-mod-game status, shown as the client words it; `null` when the read failed (`error` says why). */
51
+ async function freeModGame(ctx) {
52
+ try {
53
+ const env = await ctx.rpc.call('GetFreeModGameStatus', Method.GetFreeModGameStatus);
54
+ const s = readFreeModGameStatus(env.body);
55
+ if (!s)
56
+ return { status: null };
57
+ return {
58
+ state: FREE_MOD_GAME_STATE[s.state] ?? String(s.state),
59
+ coinsPerPlayer: s.coinsPerPlayer,
60
+ gameId: s.gameId,
61
+ gameName: s.gameName === null ? null : untrustedText(s.gameName),
62
+ availableAgain: s.availableAgain?.toISOString() ?? null,
63
+ };
64
+ }
65
+ catch (e) {
66
+ return { status: null, error: failureText(e) };
67
+ }
68
+ }
69
+ /** A template as a tool shows it: its creator's words delimited. */
70
+ function shownTemplate(w) {
71
+ const v = templateView(w);
72
+ return {
73
+ ...v,
74
+ templateName: v.templateName === null ? null : untrustedText(v.templateName),
75
+ description: v.description === null ? null : untrustedText(v.description, DESCRIPTION_MAX),
76
+ gameName: v.gameName === null ? null : untrustedText(v.gameName),
77
+ };
78
+ }
79
+ const modsOf = (w) => (Array.isArray(w.settings.Mods) ? w.settings.Mods.length : 0);
80
+ const templateIdArg = z.coerce.number().int().min(1).max(2_147_483_647).describe('The template id (warapp_list_templates lists yours).');
81
+ const playerIdArg = z.union([z.string().regex(/^\d{5,20}$/), z.number().int().positive()]);
82
+ export function registerTemplateTools(server, ctx) {
83
+ server.registerTool('warapp_list_templates', {
84
+ title: 'List war.app game templates',
85
+ description: untrustedDescription("War.app (Warzone) game templates: your own saved templates (war.app's GetTemplates, the client's \"My " +
86
+ 'Templates"), or the templates with the given `ids` (GetTemplatesByID). Each: `id` (what warapp_get_template ' +
87
+ 'and warapp_create_game take), `name` and `description` (their creators\' words, delimited), `mapId`, ' +
88
+ '`category` and `fog`. `free_mod_game: true` also reads your free-mod-game status (GetFreeModGameStatus: a ' +
89
+ 'non-member creates one mod game a week free — `Available`, `Reserved` by a game until it starts, or `Used` — ' +
90
+ `and pays \`coinsPerPlayer\` otherwise). ${BRIDGE_NOTE} Read-only. ${TEMPLATES_UNVERIFIED}`),
91
+ _meta: mintMeta('lookup', ['my templates', 'game templates', 'warzone templates', 'free mod game']),
92
+ annotations: readAnnotations('List war.app game templates'),
93
+ inputSchema: z.object({
94
+ ids: z.array(templateIdArg).min(1).max(MAX_TEMPLATE_IDS).optional().describe('Template ids to read (default: your own saved templates).'),
95
+ free_mod_game: z.boolean().optional().describe('Also read your free-mod-game status (default false).'),
96
+ }),
97
+ }, async ({ ids, free_mod_game }) => {
98
+ const env = ids
99
+ ? await ctx.rpc.call('GetTemplatesByID', Method.GetTemplatesByID, (w) => writeGetTemplatesByIdParams(w, ids))
100
+ : await ctx.rpc.call('GetTemplates', Method.GetTemplates, (w) => writeGetTemplatesParams(w));
101
+ const templates = readTemplateInfos(await ctx.bundle(), env.body).map((t) => ({
102
+ ...t,
103
+ name: t.name === null ? null : untrustedText(t.name),
104
+ description: t.description === null ? null : untrustedText(t.description, DESCRIPTION_MAX),
105
+ }));
106
+ const mod = free_mod_game ? await freeModGame(ctx) : undefined;
107
+ return respond(undefined, ['compact'], () => ({
108
+ source: ids ? 'ids' : 'mine',
109
+ templates,
110
+ count: templates.length,
111
+ ...(mod ? { freeModGame: mod } : {}),
112
+ unverified: TEMPLATES_UNVERIFIED,
113
+ }));
114
+ });
115
+ server.registerTool('warapp_get_template', {
116
+ title: 'Show a war.app game template',
117
+ description: untrustedDescription("One war.app (Warzone) game template with its settings (war.app's GetTemplate): the map, the game name it " +
118
+ 'gives, teams, and the settings read by the same normalizer GameFeed\'s are (kill rates, luck, fog, move ' +
119
+ 'order, distribution, base income, cards in play, the army cap, Local Deployment, Commanders, mods, ' +
120
+ 'overridden bonuses), boot times, real time, ranked, a coin entry fee, a custom scenario, open-seat rules; ' +
121
+ '`cannotCreate` says what stops warapp_create_game using it (a custom scenario, a coin fee, a single-player ' +
122
+ 'template). A template with mods also shows your free-mod-game status. Names and the description are their ' +
123
+ `creators' words, delimited. ${BRIDGE_NOTE} Read-only. ${TEMPLATES_UNVERIFIED}`),
124
+ _meta: mintMeta('lookup', ['template settings', 'show template', 'what does this template use']),
125
+ annotations: readAnnotations('Show a war.app game template'),
126
+ inputSchema: z.object({ template_id: templateIdArg }),
127
+ }, async ({ template_id }) => {
128
+ const walked = await readTemplate(ctx, template_id);
129
+ const mod = modsOf(walked) > 0 ? await freeModGame(ctx) : undefined;
130
+ return respond(undefined, ['compact'], () => ({
131
+ template: shownTemplate(walked),
132
+ ...(mod ? { freeModGame: mod } : {}),
133
+ unverified: TEMPLATES_UNVERIFIED,
134
+ }));
135
+ });
136
+ defineGatedWrite(server, {
137
+ title: 'Create a war.app game from a template',
138
+ _meta: mintMeta('change', ['create game', 'new game from template', 'start a game', 'invite players to a game']),
139
+ }, {
140
+ name: 'warapp_create_game',
141
+ description: "Create a war.app (Warzone) game from a template (war.app's CreateGame), with its settings exactly as the " +
142
+ 'template has them — only the game `name` can be changed (1–50 characters; default the template\'s); no ' +
143
+ 'other setting can be customised here. The game invites you, the `invite` players (GameFeed player ids, ' +
144
+ 'each with an optional `team`), `open_seats` open seats and `ai_seats` AIs (at least two seats in all); or, ' +
145
+ 'with `invite_link: true`, none of them: war.app makes an invite code (CreateGameInviteCode) that anyone ' +
146
+ 'given it joins by, returned as `inviteCode`. Every invited player gets an invitation, and the name shows to ' +
147
+ 'them. Refuses a template with a custom scenario, a coin entry fee or prize, or a single-player level. The ' +
148
+ 'preview spells out the settings and names every seat by id. Always as the signed-in war.app account; ' +
149
+ 'reports `created` with the new `gameId` once GameFeed shows you seated in it, `unconfirmed` when war.app ' +
150
+ 'gave an id it does not show yet, or `unknown` when war.app did not answer (check warapp_my_games: never ' +
151
+ `create again blindly). ${BRIDGE_NOTE} ${TEMPLATES_UNVERIFIED} ${CONFIRM_INJECTION_RULE}`,
152
+ annotations: toolAnnotations({
153
+ title: 'Create a war.app game',
154
+ readOnly: false,
155
+ destructive: true,
156
+ idempotent: false,
157
+ openWorld: true,
158
+ }),
159
+ inputSchema: z.object({
160
+ template_id: templateIdArg,
161
+ name: z.string().min(1).max(200).optional().describe(`The game's name (1–${MAX_GAME_NAME} characters). Default: the template's.`),
162
+ invite: z
163
+ .array(z.object({ player: playerIdArg.describe('A GameFeed player id (invite token).'), team: z.number().int().min(-1).max(100).optional() }))
164
+ .max(MAX_CREATE_SEATS)
165
+ .optional()
166
+ .describe('Players to invite, by GameFeed player id, each with an optional team (default -1: none).'),
167
+ open_seats: z.number().int().min(0).max(MAX_CREATE_SEATS).optional().describe('Open seats anyone may take (default 0).'),
168
+ ai_seats: z.number().int().min(0).max(MAX_CREATE_SEATS).optional().describe('AI seats (default 0).'),
169
+ my_team: z.number().int().min(-1).max(100).optional().describe('Your own team (default -1: none).'),
170
+ invite_link: z
171
+ .boolean()
172
+ .optional()
173
+ .describe('Create the game joined by an invite code instead of an invite list (default false). Takes no invite, open or AI seats.'),
174
+ }),
175
+ async plan({ template_id, name, invite, open_seats, ai_seats, my_team, invite_link }) {
176
+ const identity = await ctx.myIdentity({ fresh: true });
177
+ if (identity === undefined)
178
+ throw accountUnknown(ctx);
179
+ const { token: me, inGameId: myInGame } = identity;
180
+ const inviteLink = invite_link ?? false;
181
+ if (inviteLink && (invite?.length || open_seats || ai_seats)) {
182
+ refuse('An invite-link game takes no invite list, open seats or AIs (war.app sends none with a code), so nothing was sent.', 'Pass either invite_link or the seats.');
183
+ }
184
+ const walked = await readTemplate(ctx, template_id);
185
+ const refusals = createRefusals(walked);
186
+ if (refusals.length) {
187
+ refuse(`Template ${template_id} uses ${refusals.join(', ')}, which this tool cannot create a game with, so nothing was sent.`, 'Create it in war.app instead.');
188
+ }
189
+ const view = templateView(walked);
190
+ let gameName;
191
+ try {
192
+ gameName = checkGameName(name ?? view.gameName ?? '');
193
+ }
194
+ catch (e) {
195
+ refuse(`${e.message} Nothing was sent.`, `Pass a \`name\` of 1–${MAX_GAME_NAME} characters.`);
196
+ }
197
+ const players = [];
198
+ if (!inviteLink) {
199
+ players.push({ invite: String(myInGame), team: my_team ?? -1 });
200
+ const seen = new Set([myInGame]);
201
+ for (const i of invite ?? []) {
202
+ const feed = String(i.player);
203
+ const id = inGameId({ id: Number(feed), feedId: feed });
204
+ if (seen.has(id))
205
+ refuse(`Player ${feed} is listed twice (or is you), so nothing was sent.`, 'List each player once; you are always seated.');
206
+ seen.add(id);
207
+ players.push({ invite: String(id), team: i.team ?? -1 });
208
+ }
209
+ for (let k = 0; k < (open_seats ?? 0); k++)
210
+ players.push({ invite: OPEN_SEAT_INVITE, team: -1 });
211
+ for (let k = 0; k < (ai_seats ?? 0); k++)
212
+ players.push({ invite: AI_INVITE, team: -1 });
213
+ if (players.length < 2)
214
+ refuse('A game needs at least two seats (you and one more), so nothing was sent.', 'Pass `invite`, `open_seats`, `ai_seats` or `invite_link: true`.');
215
+ if (players.length > MAX_CREATE_SEATS)
216
+ refuse(`At most ${MAX_CREATE_SEATS} seats can be created here, so nothing was sent.`, 'Invite fewer players.');
217
+ }
218
+ const teamsOf = typeof walked.template.AtStartDivideIntoTeamsOf === 'number' ? walked.template.AtStartDivideIntoTeamsOf : 0;
219
+ // Built and decoded again by the bundle's own reader now, so a template this server would send wrongly is
220
+ // refused before the preview (the invite code, made at execute, is re-checked there).
221
+ const input = { templateId: template_id, name: gameName, inviteCode: null };
222
+ verifyStartSettings(await ctx.bundle(), buildStartSettings(walked, input), walked, input);
223
+ const mod = modsOf(walked) > 0 ? await freeModGame(ctx) : undefined;
224
+ const feedOf = new Map((invite ?? []).map((i) => [String(inGameId({ id: Number(i.player), feedId: String(i.player) })), String(i.player)]));
225
+ const seats = players.map((p) => ({
226
+ seat: p.invite === OPEN_SEAT_INVITE ? 'open' : p.invite === AI_INVITE ? 'AI' : p.invite === String(myInGame) ? 'you' : 'player',
227
+ ...(feedOf.has(p.invite) ? { player: feedOf.get(p.invite) } : p.invite === String(myInGame) ? { player: String(me) } : {}),
228
+ team: p.team,
229
+ }));
230
+ const invited = seats.filter((s) => s.seat === 'player').map((s) => s.player);
231
+ const shown = shownTemplate(walked);
232
+ return {
233
+ gate: {
234
+ action: 'warapp.create_game',
235
+ summary: `Create a war.app game from template ${template_id} on map ${view.mapId ?? 'unknown'}` +
236
+ (inviteLink
237
+ ? ', joined by an invite code war.app makes'
238
+ : `, seating you${invited.length ? ` and inviting players ${invited.join(', ')}` : ''}` +
239
+ `${open_seats ? `, with ${open_seats} open seat(s)` : ''}${ai_seats ? `, with ${ai_seats} AI(s)` : ''}`),
240
+ account: writeAccount(me),
241
+ target: template_id,
242
+ payload: { method: 'CreateGame', templateId: template_id, players, teamsOf, inviteLink, name: gameName },
243
+ willSend: { template: template_id, name: untrustedText(gameName), seats: players.length, inviteLink },
244
+ preview: {
245
+ warning: 'This creates a real war.app game: every invited player gets an invitation and sees its name, and you ' +
246
+ 'are expected to play it. The settings are the template\'s, unchanged but for the name.' +
247
+ (modsOf(walked) > 0 ? ' The template uses mods: a mod game is free once a week for a non-member, else it costs coins (see freeModGame).' : ''),
248
+ account: String(me),
249
+ name: untrustedText(gameName),
250
+ seats,
251
+ ...(inviteLink ? { inviteLink: true } : {}),
252
+ teamsOf,
253
+ template: shown,
254
+ ...(mod ? { freeModGame: mod } : {}),
255
+ unverified: TEMPLATES_UNVERIFIED,
256
+ untrusted: UNTRUSTED_PREVIEW_NOTE,
257
+ },
258
+ },
259
+ state: {
260
+ me,
261
+ templateId: template_id,
262
+ name: gameName,
263
+ teamsOf,
264
+ players,
265
+ inviteLink,
266
+ walked,
267
+ },
268
+ };
269
+ },
270
+ async execute(state) {
271
+ await requireApprovedAccount(ctx, writeAccount(state.me));
272
+ const { walked } = state;
273
+ let inviteCode = null;
274
+ if (state.inviteLink) {
275
+ try {
276
+ const env = await ctx.rpc.call('CreateGameInviteCode', Method.CreateGameInviteCode, (w) => writeCreateGameInviteCodeParams(w));
277
+ inviteCode = readGameInviteCode(env.body)?.code ?? null;
278
+ }
279
+ catch (e) {
280
+ throw new McpToolError(`war.app did not give an invite code (${failureText(e)}), so no game was created.`, {
281
+ kind: 'unknown',
282
+ hint: 'Retry, or create the game in war.app.',
283
+ });
284
+ }
285
+ if (inviteCode === null || !INVITE_CODE.test(inviteCode)) {
286
+ throw new McpToolError('war.app answered with no usable invite code, so no game was created.', { kind: 'unknown', hint: 'Retry, or create the game in war.app.' });
287
+ }
288
+ }
289
+ const input = { templateId: state.templateId, name: state.name, inviteCode };
290
+ const settings = buildStartSettings(walked, input);
291
+ verifyStartSettings(await ctx.bundle(), settings, walked, input);
292
+ let ret;
293
+ const code = inviteCode ? { inviteCode } : {};
294
+ const check = 'Check warapp_my_games before creating the game again.';
295
+ return sendAndVerify({
296
+ send: async () => {
297
+ const env = await ctx.rpc.call('CreateGame', Method.CreateGame, (w) => writeCreateGameParams(w, { players: state.inviteLink ? [] : state.players, teamsOf: state.teamsOf, settings }));
298
+ try {
299
+ ret = readCreateGameReturn(env.body);
300
+ }
301
+ catch {
302
+ // An unreadable reply: the game is looked for below.
303
+ }
304
+ },
305
+ unanswered: (failure) => ({
306
+ status: 'unknown',
307
+ outcome: 'unknown',
308
+ ...code,
309
+ warning: `war.app did not confirm the game (${failure}), so it may have been created. ${check}`,
310
+ }),
311
+ readBack: async () => {
312
+ if (!ret)
313
+ throw new Error('war.app gave no game id');
314
+ const game = await ctx.client.getGame(ret.gameId, { map: false });
315
+ return game.players.some((p) => p.id === state.me && holdsSeat(p.state));
316
+ },
317
+ unreadable: (failure) => ({
318
+ status: 'unconfirmed',
319
+ outcome: 'unconfirmed',
320
+ ...(ret ? { gameId: ret.gameId } : {}),
321
+ ...code,
322
+ warning: `war.app accepted the request, but the game could not be read back (${failure}). ${check}`,
323
+ }),
324
+ classify: (seated) => seated
325
+ ? {
326
+ status: 'created',
327
+ outcome: 'confirmed',
328
+ gameId: ret.gameId,
329
+ ...code,
330
+ ...(ret.vacationEnded ? { vacationEnded: true } : {}),
331
+ }
332
+ : {
333
+ status: 'unconfirmed',
334
+ outcome: 'unconfirmed',
335
+ gameId: ret.gameId,
336
+ ...code,
337
+ warning: `war.app answered with game ${ret.gameId}, but GameFeed does not show you seated in it yet. ${check}`,
338
+ },
339
+ });
340
+ },
341
+ });
342
+ }