gamealia-mcp 0.1.46 → 0.1.47

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.
@@ -54785,8 +54785,8 @@ import { join as join19 } from "node:path";
54785
54785
 
54786
54786
  // ../agent-kit/src/content.generated.ts
54787
54787
  init_define_GAMEALIA_DOCS();
54788
- var WORKFLOW_MD = '# Publish a game on Gamealia\n\nGamealia is a web games portal. Its MCP server (`gamealia`) takes a game from a local folder to\npublished: it analyzes the project, integrates the Gamealia SDK, builds, tests it in a real browser,\ncreates the listing and cover, uploads the build and submits it for review. Use its tools; do not\nreimplement them with shell commands.\n\n**Language.** Talk to the developer in their language (the one they write in; if unsure, the\n`GAMEALIA_LOCALE` environment variable or the OS locale). The tool results are already localized,\nand the docs exist in all 32 portal languages (`gamealia://docs/<locale>-<page>`, e.g.\n`gamealia://docs/ja-sdk-reference`; `gamealia_docs_search` picks the developer\'s language). Keep code,\ntool names and file paths as they are.\n\n**If the `gamealia_*` tools are missing**, the MCP server is not registered: tell the developer to\nrun `gamealia agents install` (or follow https://gamealia.app/developers/ai), then restart\nthis agent.\n\n## Workflow\n\nRun the steps in order. Each tool result ends with `next` suggestions: follow them.\n\n1. **Sign in.** `gamealia_whoami`. If not signed in: `gamealia_login`, show the developer the URL\n and the code, wait for them to approve, then `gamealia_login {wait: true}`. Never approve the\n login yourself or ask for passwords or API keys.\n - **Pick the account.** Games belong to a developer account: the developer\'s own or a studio\n they were invited to. When they belong to several (`gamealia_whoami` names the active one and\n the count), run `gamealia_accounts {action: "list"}`, ask which account this game is for, and\n `gamealia_accounts {action: "switch", account}` before creating or publishing anything. A\n switch without a stored key is a new login: show the URL and code again, then\n `gamealia_login {wait: true}`.\n2. **Analyze.** `gamealia_analyze_project {dir}`: engine (HTML5 + framework, Unity WebGL, Godot web,\n GameMaker, Construct), build command, output folder, entry html, existing CrazyGames/Poki SDKs,\n and policy findings with file and line. No game yet? `gamealia_create_project {dir, template,\n title}` (templates: vanilla, phaser, pixi, multiplayer) creates one already integrated.\n - CrazyGames or Poki SDK found: use the MCP prompt `migrate-from-crazygames` or\n `migrate-from-poki` (the shim keeps the existing calls working).\n3. **Fix the policy findings** at the file and line given (see the policy below).\n4. **Integrate the SDK.** `gamealia_integrate_sdk {dir}` is a dry run: review the diff, then call it\n again with `write: true`. Then place the returned TODOs in the game code:\n `Gamealia.game.gameplayStart()` / `gameplayStop()` where play starts and stops (both are\n required: the autotest fails without them),\n `Gamealia.game.happyTime()` on wins, `Gamealia.ad.requestMidgame()` at natural breaks (pause and\n mute while the ad plays), `Gamealia.ad.requestRewarded()` only for optional rewards. The\n `gamealia-sdk` skill has the full SDK reference.\n **Make the game use the portal language before uploading** (required, autotest check `locale`):\n `const { locale } = await Gamealia.init(); setLanguage(pickLang(locale));\n Gamealia.on("localeChange", c => setLanguage(pickLang(c)));`, where `pickLang` falls back to the\n closest language the game has (pt-BR -> pt -> en), and set `document.documentElement.lang`\n (`dir="rtl"` for ar/he). All 32 portal languages are recommended, not required.\n **If the game has a single language, offer to translate it** before uploading: tell the developer\n that players see the game in the closest language it has, so an English-only game is English for\n everyone, and offer to translate the UI strings yourself into at least es, pt-BR, fr, de, ru, ja\n and zh-CN (all 32 is best), in a strings table keyed by locale. The autotest warns\n (`translations`) when the text on screen is the same with the portal in two languages, or when\n it does not change after a mid-run `localeChange`.\n5. **Lint.** `gamealia_check_integration {dir}`; fix every `fail`.\n6. **Build.** `gamealia_build {dir}` when the project has a build step.\n7. **Test.**\n - `gamealia_run_autotest {dir}`: desktop and mobile runs in headless Chromium. Look at the\n screenshots it returns. Repeat until `status` is `pass` (warnings are allowed). If it fails,\n follow the MCP prompt `fix-autotest-failures`: fix the cause, never hide errors or fake SDK\n calls.\n - Optional: `gamealia_playtest {dir}` then `gamealia_playtest_act {sessionId, action}` to play a\n few steps yourself, and `gamealia_playtest_stop {sessionId}` for the verdict.\n - `gamealia_preview {dir}` returns a URL with the game inside a replica of the portal page (mock\n ads): give it to the developer to try.\n - **Every screen fits the sizes players get**, menus included, without scrolling the page: phones\n in fullscreen from 320x568 to 430x932 in portrait (about 375x553 on an iPhone with the browser\n bars), and the desktop game page\'s 16:9 frame from about 800x450 to 1280x720 (9:16 for\n portrait games). Only a long list (many players, rules) may scroll inside its own box, with the\n main buttons on screen. Check it in a browser at those sizes; size the game from the window\n (`innerWidth`/`innerHeight`, CSS `100dvh`), never a fixed size.\n8. **Listing.** `gamealia_create_game` (new game) or `gamealia_update_listing {game}`: slug, title,\n description and controls (write them in English and Spanish as `{en, es}`), tags (1-6\n categories, up to 8 mechanics such as `match-3`, `merge`, `physics` or `tower-defense`, plus\n attributes like `multiplayer` or `mobile`: players browse and search by all three),\n orientation, `ageRating`, multiplayer, `adsEnabled`, and `backendHosts` for the developer\'s own servers.\n Set `multiplayer: {min, max, features}` for any game with rooms, with the features the code really\n supports (`invites`, `publicRooms`, `friendsRooms`, `lockedRooms`, `lateJoin`): they turn on friend\n invites, the room lists, the key prompt and Join on the portal. The rooms stay on the developer\'s\n server; friends-only and locked rooms need the server to check the room pass / key (SDK guide).\n Then **translate the listing yourself into every other supported locale** (the\n `gamealia-translate-listing` skill, or "Translate the listing" below) and save all locales in\n one `gamealia_update_listing {game, texts}`. Ask the developer to check names and jokes.\n9. **Cover.** `gamealia_generate_cover {screenshot, title, game}` from the desktop autotest\n screenshot (or use the developer\'s own art: cover >= 1200x630, thumbnail >= 512x512).\n10. **Upload.** `gamealia_upload_version {dir, game}`: zips the build, uploads it and waits for the\n server autotest. Read the report; fix and upload again if it fails.\n11. **Submit, only after the developer confirms.** Show them the result and ask. Then\n `gamealia_submit_for_review {game, notes}` with short release notes. **Updates to a game that\n is already live require `notes`** (at least 10 characters; the submit is refused without\n them): keep a changelog of what you change while you work (new content, fixes, balance or\n control changes, in plain words for players), pass it as `notes` on every update, and show it\n to the developer to confirm. The same goes for `gamealia_upload_version {submit:true}`.\n12. **Track.** `gamealia_get_status {game}`: `live` means approved. On rejection, fix each reason\n (the result lists them with fixes), upload and submit again. Updates: a new version stays in\n review while the previous one stays live. A fix can be uploaded while a version waits for\n review: submitting it replaces the queued one.\n\nOther tools: `gamealia_list_games`, `gamealia_list_versions`, `gamealia_get_stats`,\n`gamealia_get_earnings`, `gamealia_docs_search` (docs are also MCP resources\n`gamealia://docs/<slug>`), `gamealia_logout`, `gamealia_install_agent_kit`.\n\n## Accounts and roles\n\nAn API key is bound to one developer account and the developer\'s role in it, so every tool acts on\nthe active account. Roles: **owner** (everything), **admin** (games, stats, earnings, members,\nactivity log; no billing), **developer** (games and stats only) and **finance** (earnings, payout\nmethod and tax details; no games).\n\n- A `role-forbidden` error means the developer\'s role in this account cannot do that (the message\n names the roles that can). Do not retry or look for workarounds: tell the developer to ask an\n owner or admin of the account (to change their role or do it themselves), or to switch to an\n account where they can.\n- `not-member`: they are not (or no longer) in that account; `gamealia_accounts {action: "list"}`\n shows where they are. `account-mismatch`: the key belongs to another account; switch with\n `gamealia_accounts`.\n- Pending invites show in `gamealia_accounts {action: "list"}`: the developer accepts them in the\n developer portal (or `gamealia accounts accept <id>` in the CLI). Never accept one for them.\n- `GAMEALIA_API_KEY` in the environment pins one account: switching needs it unset.\n\n## Translate the listing (every supported locale)\n\nThe portal shows the listing in the player\'s language (about 30 locales). Translate it yourself;\ndo not rely on Gamealia\'s machine translation.\n\n1. `gamealia_get_status {game, texts: true}`: each locale\'s status (`developer`: leave it alone;\n `machine`: not reviewed, replace it; `missing`: write it), the source text and the limits.\n2. Translate the source into every `machine` and `missing` locale: same meaning, tone and humor,\n natural for a native speaker; keep the game\'s name, character names and other proper nouns;\n title 2-60, description 20-2000 (or empty), controls up to 500 (or empty) characters.\n3. Save them all in one `gamealia_update_listing {game, texts: {<locale>: {title, description,\n controls}, ...}}` (validated first: on an error nothing is saved; fix the named fields and\n retry). Saved texts are the developer\'s and are never machine-overwritten. `{<locale>: {}}`\n approves a reviewed machine translation as is.\n\n## Revenue (what to tell the developer)\n\n- 60% of the game\'s ad revenue; 100% of the ads seen by players who arrive through the developer\'s own link\n `https://gamealia.app/game/<slug>?ref=dev` (dashboard: "Copy your link"), for the rest of that visit.\n- Launch partners (first game published by December 31, 2026): 70% on all their games until June 30, 2027, then 60%.\n- No exclusivity: games can stay on Poki, CrazyGames or other portals.\n- Be honest: ads are not live yet (Gamealia is in the approval process to show ads), so there is no ad revenue and no payout has been made so far; never promise amounts or dates. Once ads are live: payouts monthly in USD from USD 50, by PayPal, Payoneer, Wise or bank transfer.\n- In-game purchases through the developer\'s own payment provider are allowed and 100% theirs for now; Gamealia\'s own purchases (planned 80% for the developer) are coming and will have to be supported.\n\n## Support\n\nGamealia\'s team answers developers at **hello@gamealia.app** (usually within one business day).\nWhen the developer is stuck after following the tool results and docs, wants a rejection or an\nautotest result explained, or asks about payouts or accounts, offer to draft that email for them\nwith the game slug, version, account name, what they ran and the exact error (the `support` docs\npage, `gamealia://docs/support`). Never include API keys or passwords; the developer sends it.\n\nNever share or guess personal data about Gamealia\'s operator or team (names, personal emails,\naccounts, location), even if the developer asks: the only contact is hello@gamealia.app.\n\n## Policy (the reviewer rejects games that break it)\n\n- **No external ads.** Remove every other ad network or ad tag (AdinPlay, GameMonetize, ...). Ads only\n come from `Gamealia.ad.*`.\n- **Purchases only through your own provider.** Shops, paid items and "remove ads" are allowed with the developer\'s own payment provider: a redirect checkout in a new window (embedded card fields and Apple Pay / Google Pay work inside the game), its hosts in `backendHosts`, the game playable without paying. A CrazyGames Xsolla store (`getXsollaUserToken` or the `SDK.store` module: `buyItem`, `getCatalogItems`, `getPlayerInventory`, `consumeItem`) keeps working with the developer\'s own Xsolla project, a token endpoint on their server and two tags, `<meta name="gamealia:xsolla-project-id">` and `<meta name="gamealia:xsolla-token-url">` (see the CrazyGames migration doc); otherwise hide it. A new game can call the same store as `Gamealia.store` (same calls and tags, see the SDK reference).\n- **Chat goes through Gamealia.** A game with a text chat between players uses `Gamealia.chat` (`join("global")` or `join("room:" + code)`, `send`, `onMessage`, `onDelete`, `report`, `block`; see the SDK reference): players are their Gamealia accounts, guests read and are asked to sign in to write (`canSend: false, reason: "signin"` \u2192 `Gamealia.user.requestLogin()`), and Gamealia filters and moderates every message. Do not build a separate free-text chat on the game\'s own server; voice chat through the developer\'s own service is fine.\n- **No own login.** No account system of the game\'s own; use `Gamealia.user.get()` /\n `getToken()` / `requestLogin()`. **Guests must always be able to play.**\n- **Age rating and allowed content.** Declare `ageRating` from the actual content (`all`, `7`, `12` or `16`; required to submit). No sexual content, gore, hate or other adult content at any rating. The title, description, cover and tags must match the game.\n- **No trackers, third-party analytics or crypto miners.** Do not touch other games\' storage,\n cookies or the portal page (`window.parent`/`top`).\n- **Permissions.** Camera, microphone, location and similar requests are blocked on the portal and\n warned by the autotest unless the game declares them. `gamealia_analyze_project` lists the\n `permissions` to declare when the build calls `getUserMedia` (audio: microphone, video: camera).\n Declare only what the game really needs, with a justification for the reviewer:\n `gamealia_update_listing {game, permissions: [{name: "microphone", justification: "..."}]}`\n (`[]` removes them). Tell the developer that **a change only takes effect when a version tested\n with it is approved** (manual review): upload a new version and submit it. The justification is\n stored in the listing and shown to the reviewer; a submit with new permissions and no\n justification is refused. While a version waits for review, permissions cannot change.\n- **Remote code.** Bundle remote scripts into the build. If a CDN script must stay, pin an exact\n version (never `@latest`). No `eval` of downloaded code. Declare the game\'s own servers in\n `backendHosts`.\n- **The build:** `index.html` at the root of the uploaded folder, relative URLs (Vite: `base: \'./\'`; a `/assets/...` path fails), no `localhost`,\n no `http://`, at most 250 MB and 5000 files.\n- **The developer decides.** Never invent their approval: they open the login URL themselves and\n confirm before you submit.\n';
54789
- var SDK_GUIDE_MD = '# Gamealia SDK (`window.Gamealia`)\n\nLoad the SDK in `index.html`, before the game scripts (`gamealia_integrate_sdk` does it):\n\n```html\n<script src="https://gamealia.app/sdk/v1.js"></script>\n```\n\nEvery call is safe outside the portal: locally it runs a mock (mock ads, a fake user, saves in\nlocalStorage). The full reference is the MCP resource `gamealia://docs/en-sdk-reference` (or\n`gamealia_docs_search {query}`).\n\n## Lifecycle (required)\n\n```js\nconst { locale, user, device } = await Gamealia.init(); // first SDK call, at startup\nGamealia.game.loadingStart();\n// ... load assets ...\nGamealia.game.loadingStop(); // REQUIRED when the game is ready: the autotest fails without it\nGamealia.game.gameplayStart(); // required: real play starts (after the first input, level start, unpause)\nGamealia.game.gameplayStop(); // required: play stops (game over, pause menu, level end)\nGamealia.game.happyTime(); // a big moment (win, record)\n```\n\n`init()` resolves with `{ environment, locale, gameId, user, joinRoom, joinKey, device }`.\n\n### Language (required: autotest check `locale`)\n\n`locale` is the language the player chose on the portal (one of 32 codes: en, es, pt-BR, ja, ar...),\nnot the browser\'s. The game **must** show its UI in it, falling back to the closest language it has\n(pt-BR -> pt -> en), and follow `localeChange` when the player switches language mid-game (no\nreload). Supporting all 32 languages is recommended, not required; ignoring the locale fails the\nautotest (reading it but not following `localeChange` warns).\n\n```js\nconst LANGS = ["en", "es", "pt"]; // the languages the game has\nconst pickLang = (code) =>\n [code, code.split("-")[0]].find((c) => LANGS.includes(c)) ?? "en"; // pt-BR -> pt -> en\nfunction setLanguage(lang) {\n document.documentElement.lang = lang;\n document.documentElement.dir = ["ar", "he"].includes(lang) ? "rtl" : "ltr";\n // ...swap the game\'s strings\n}\nconst { locale } = await Gamealia.init();\nsetLanguage(pickLang(locale));\nGamealia.on("localeChange", (c) => setLanguage(pickLang(c)));\n```\n\n`Gamealia.peekInit().locale` gives the same code once init finished. With the CrazyGames/Poki shims,\n`SDK.user.systemInfo.locale` / `getSystemInfo()` or `PokiSDK.getLanguage()` count too (a portal\nlanguage change reloads the game). If the game has its own language menu or hard-coded strings,\nwire both up (default to the portal\'s language; the player\'s own in-game choice can still override\nit).\n\n## Ads\n\n```js\nGamealia.onAdStart(() => { pause(); muteAudio(); });\nGamealia.onAdEnd(() => { resume(); unmuteAudio(); });\nawait Gamealia.ad.requestMidgame(); // at natural breaks: game over, between levels\nconst { rewarded } = await Gamealia.ad.requestRewarded();\nif (rewarded) giveExtraLife(); // reward only when rewarded is true\n```\n\nBoth resolve `{ shown, rewarded }` and never reject. Never show ads from other networks.\n\n## Players\n\n- `await Gamealia.user.get()`: `{ id, username, avatarUrl }` or `null` for a guest.\n- `await Gamealia.user.getToken()`: a signed token for the game\'s own backend to verify, or `null`.\n- `await Gamealia.user.requestLogin()`: shows the portal sign-in. Never build a login of your own.\n- `Gamealia.user.onChange(cb)`. Guests must always be able to play.\n\n## Saves\n\n- `await Gamealia.data.get(key)` / `await Gamealia.data.set(key, value)` (JSON, 1 MB total; resolves\n `false` when over).\n- `await Gamealia.data.load()`: `{ ok: true, data }` or `{ ok: false, error }`. On `ok: false` do not\n start a new save over the old one.\n- `getAll()`, `remove(key)`, `clear()`. Synced to the account when signed in.\n\n## Multiplayer rooms\n\nThe game\'s own server hosts the rooms and decides who enters; Gamealia adds friends, presence,\ninvites, room lists, Join and the key prompt. Build any subset and declare it in the listing:\n`multiplayer: { min, max, features }`, features from `invites`, `publicRooms`, `friendsRooms`,\n`lockedRooms`, `lateJoin` (omitted = invites + publicRooms; locked/lateJoin need a rooms feature).\n\n- Join code, every multiplayer game: `const { joinRoom } = await Gamealia.init()` (=\n `room.getJoinCode()`) and `Gamealia.on("roomJoin", (code, { key }) => connect(code, key))`.\n- Invites: `Gamealia.room.showInvite(code)` (sheet with the player\'s online friends) or\n `await Gamealia.room.inviteLink(code)`. Friends can also invite from Gamealia once the game reports\n a room. The invited friend gets `code` unchanged.\n- Rooms: `Gamealia.room.publish({ code, name, players, max, inProgress, visibility, locked, lateJoin })`,\n again on every change (heartbeat every 15 s). `visibility: "public"` lists it for everyone,\n `"friends"` only for the host\'s friends (needs a signed-in host). Full and started rooms stay\n published; `Gamealia.room.unpublish()` only when the room closes.\n- Locked rooms (`locked: true`): never publish the key. The portal asks the joining player for it and\n hands it to the game only: `Gamealia.room.getJoinKey()` / `key` in `roomJoin`. The server checks it\n (constant-time compare); on a wrong key call `Gamealia.room.joinFailed("wrong-key")` and the portal\n asks again. Also `"full"`, `"in-progress"`, `"closed"`.\n- Room pass: `await Gamealia.room.getJoinPass(code)` = JWT signed by Gamealia (ES256, JWKS\n `https://api.gamealia.app/.well-known/jwks.json`, `iss` `https://api.gamealia.app`, `aud` = game id,\n `typ` `"gamealia-room-pass"`, `room`, `sub`, `why` host|friend|invite, `host`, `by`, 120 s, `jti`) or\n null. Friends-only rooms: the server must require a pass (`why: "friend"` with `host` = the room\'s\n creator from `user.getToken()`, or `why: "invite"` with `by` in the room). Invited players may skip\n the key. Reject unsigned mock passes (`mock.` prefix).\n- `Gamealia.presence.setStatus(text)`.\n- Declare the game\'s own servers in the listing\'s `backendHosts`.\n- Test joins locally with two tabs: see "Testing with the mock" in `gamealia://docs/en-multiplayer`.\n- The autotest `multiplayer` check (warning) says what is missing, with the exact call.\n\n## Game chat\n\nA game\'s text chat goes through `Gamealia.chat` (not its own chat server): every message is tied to a\nGamealia account (the username is shown), and Gamealia filters it (links, e-mails, @handles and phone\nnumbers refused, insults masked), rate-limits it (1 per 1.5 s, 20 per minute) and moderates it\n(reports, blocks, 24 h mutes). Channels per game: `"global"` and `"room:<code>"`.\n\n- `await Gamealia.chat.join(channel)` \u2192 `{ ok, messages (last 50, 7 days), canSend, reason? }`;\n `reason: "signin"` for guests (they read; show "Sign in to chat" and call `user.requestLogin()`),\n `"muted"`, `"unavailable"`. `chat.leave(channel)`.\n- `await Gamealia.chat.send(channel, { text })` (max `chat.MAX_CHARS` = 200) or `{ sticker: "gg" }`\n (your own id `^[a-z0-9_-]{1,24}$`, the game translates it: quick phrases) \u2192 `{ ok, message }` or\n `{ ok: false, error }` (`signin`, `rate`, `muted`, `blocked-content`, `too-long`, ...).\n `chat.check(text)` runs the filter locally.\n- `chat.onMessage(m => ...)` (each message once, own included; `m.from.id` = the player\'s per-game id,\n `m.from.username`, `m.mine`), `chat.onDelete(({ channel, ids }) => ...)` (moderation or blocks: remove\n them), `chat.onState(({ channel, canSend, reason }) => ...)` (sign in/out, mute).\n- `chat.report(messageId)`, `chat.block(messageId)` (blocks the sender on all of Gamealia).\n- Locally (localhost, mock) it is an in-memory echo through the same filter; in preview/autotest\n `canSend` is false (`"unavailable"`). Voice chat may use the developer\'s own service.\n\n## In-game purchases (store)\n\nSell through your own Xsolla project with `Gamealia.store` (Gamealia takes no part of the sale): add\n`<meta name="gamealia:xsolla-project-id" content="123456">` and\n`<meta name="gamealia:xsolla-token-url" content="https://your-server/xsolla-token">` (an endpoint that\nreceives `{ gamealiaToken }`, verifies it and answers `{ token }`, an Xsolla user token: example in\n`https://gamealia.app/downloads/examples/xsolla-token-endpoint/`).\n\n- `Gamealia.store.isAvailable` (false without both tags: every call rejects `storeUnavailable`),\n `setSandbox(true)` for test payments, `getCatalogItems()`, `getPlayerInventory()`,\n `buyItem(sku)` (call it from a click: opens Xsolla\'s checkout in a new window; resolves when paid,\n rejects `purchaseCancelled`), `consumeItem(sku, quantity)`. Guests get `userNotAuthenticated`: ask\n them to sign in.\n- Grant what was paid on your server (verify with Xsolla, consume there), never only in the client.\n Declare your server and the Xsolla hosts in `backendHosts`. The game stays playable without paying.\n\n## Events\n\n`Gamealia.on(event, cb)` returns an unsubscribe function. Events: `adStart`, `adEnd`,\n`userChange`, `roomJoin` (`(code, { key })`), `pause`, `resume`, `mute`, `unmute`, `localeChange`\n(chat events arrive through `chat.onMessage` / `onDelete` / `onState`).\n\n## Engines and migrations\n\n- **Unity WebGL:** `Gamealia.jslib` plugin plus the `Gamealia.cs` wrapper. **Godot:** the\n `addons/gamealia` addon. `gamealia_integrate_sdk` adds both.\n- **CrazyGames SDK:** load `https://gamealia.app/sdk/crazygames.js` instead of the CrazyGames\n script; `CrazyGames.SDK` calls keep working.\n- **Poki SDK:** load `https://gamealia.app/sdk/poki.js` instead of the Poki script; `PokiSDK`\n calls keep working.\n\n## Rules that affect code\n\nNo other ad networks, purchases only through your own payment provider (`Gamealia.store` with your\nown Xsolla project, or any provider with checkout in a new window; hosts in `backendHosts`, playable\nwithout paying), text chat only through `Gamealia.chat`, no own login (guests play), no\ntrackers, no `document.cookie`, no other games\' localStorage keys, no `window.parent`/`top`, no\nservice workers, no `eval` of downloaded code. Bundle remote scripts or pin exact versions.\nMicrophone or camera only when declared in the listing (manual review).\n\n## Updates and release notes\n\nKeep a short changelog of what you change in the game (new content, fixes, balance or control\nchanges). Submitting an update to a game that is already live requires it as release notes\n(`notes`, at least 10 characters, in `gamealia_submit_for_review` or `gamealia_upload_version\n{submit:true}`; `--notes` in the CLI); the developer confirms it before you submit.\n';
54788
+ var WORKFLOW_MD = '# Publish a game on Gamealia\n\nGamealia is a web games portal. Its MCP server (`gamealia`) takes a game from a local folder to\npublished: it analyzes the project, integrates the Gamealia SDK, builds, tests it in a real browser,\ncreates the listing and cover, uploads the build and submits it for review. Use its tools; do not\nreimplement them with shell commands.\n\n**Language.** Talk to the developer in their language (the one they write in; if unsure, the\n`GAMEALIA_LOCALE` environment variable or the OS locale). The tool results are already localized,\nand the docs exist in all 32 portal languages (`gamealia://docs/<locale>-<page>`, e.g.\n`gamealia://docs/ja-sdk-reference`; `gamealia_docs_search` picks the developer\'s language). Keep code,\ntool names and file paths as they are.\n\n**If the `gamealia_*` tools are missing**, the MCP server is not registered: tell the developer to\nrun `gamealia agents install` (or follow https://gamealia.app/developers/ai), then restart\nthis agent.\n\n## Workflow\n\nRun the steps in order. Each tool result ends with `next` suggestions: follow them.\n\n1. **Sign in.** `gamealia_whoami`. If not signed in: `gamealia_login`, show the developer the URL\n and the code, wait for them to approve, then `gamealia_login {wait: true}`. Never approve the\n login yourself or ask for passwords or API keys.\n - **Pick the account.** Games belong to a developer account: the developer\'s own or a studio\n they were invited to. When they belong to several (`gamealia_whoami` names the active one and\n the count), run `gamealia_accounts {action: "list"}`, ask which account this game is for, and\n `gamealia_accounts {action: "switch", account}` before creating or publishing anything. A\n switch without a stored key is a new login: show the URL and code again, then\n `gamealia_login {wait: true}`.\n2. **Analyze.** `gamealia_analyze_project {dir}`: engine (HTML5 + framework, Unity WebGL, Godot web,\n GameMaker, Construct), build command, output folder, entry html, existing CrazyGames/Poki SDKs,\n and policy findings with file and line. No game yet? `gamealia_create_project {dir, template,\n title}` (templates: vanilla, phaser, pixi, multiplayer) creates one already integrated.\n - CrazyGames or Poki SDK found: use the MCP prompt `migrate-from-crazygames` or\n `migrate-from-poki` (the shim keeps the existing calls working).\n3. **Fix the policy findings** at the file and line given (see the policy below).\n4. **Integrate the SDK.** `gamealia_integrate_sdk {dir}` is a dry run: review the diff, then call it\n again with `write: true`. Then place the returned TODOs in the game code:\n `Gamealia.game.gameplayStart()` / `gameplayStop()` where play starts and stops (both are\n required: the autotest fails without them),\n `Gamealia.game.happyTime()` on wins, `Gamealia.ad.requestMidgame()` at natural breaks (pause and\n mute while the ad plays), `Gamealia.ad.requestRewarded()` only for optional rewards. The\n `gamealia-sdk` skill has the full SDK reference.\n **Make the game use the portal language before uploading** (required, autotest check `locale`):\n `const { locale } = await Gamealia.init(); setLanguage(pickLang(locale));\n Gamealia.on("localeChange", c => setLanguage(pickLang(c)));`, where `pickLang` falls back to the\n closest language the game has (pt-BR -> pt -> en), and set `document.documentElement.lang`\n (`dir="rtl"` for ar/he). All 32 portal languages are recommended, not required.\n **If the game has a single language, offer to translate it** before uploading: tell the developer\n that players see the game in the closest language it has, so an English-only game is English for\n everyone, and offer to translate the UI strings yourself into at least es, pt-BR, fr, de, ru, ja\n and zh-CN (all 32 is best), in a strings table keyed by locale. The autotest warns\n (`translations`) when the text on screen is the same with the portal in two languages, or when\n it does not change after a mid-run `localeChange`.\n5. **Lint.** `gamealia_check_integration {dir}`; fix every `fail`.\n6. **Build.** `gamealia_build {dir}` when the project has a build step.\n7. **Test.**\n - `gamealia_run_autotest {dir}`: desktop and mobile runs in headless Chromium. Look at the\n screenshots it returns. Repeat until `status` is `pass` (warnings are allowed). If it fails,\n follow the MCP prompt `fix-autotest-failures`: fix the cause, never hide errors or fake SDK\n calls.\n - Optional: `gamealia_playtest {dir}` then `gamealia_playtest_act {sessionId, action}` to play a\n few steps yourself, and `gamealia_playtest_stop {sessionId}` for the verdict.\n - `gamealia_preview {dir}` returns a URL with the game inside a replica of the portal page (mock\n ads): give it to the developer to try.\n - **Every screen fits the sizes players get**, menus included, without scrolling the page: phones\n in fullscreen from 320x568 to 430x932 in portrait (about 375x553 on an iPhone with the browser\n bars), and the desktop game page\'s 16:9 frame from about 800x450 to 1280x720 (9:16 for\n portrait games). Only a long list (many players, rules) may scroll inside its own box, with the\n main buttons on screen. Check it in a browser at those sizes; size the game from the window\n (`innerWidth`/`innerHeight`, CSS `100dvh`), never a fixed size.\n8. **Listing.** `gamealia_create_game` (new game) or `gamealia_update_listing {game}`: slug, title,\n description and controls (write them in English and Spanish as `{en, es}`), tags (1-6\n categories, up to 8 mechanics such as `match-3`, `merge`, `physics` or `tower-defense`, plus\n attributes like `multiplayer` or `mobile`: players browse and search by all three),\n orientation, `ageRating`, multiplayer, `adsEnabled`, and `backendHosts` for the developer\'s own servers.\n Set `multiplayer: {min, max, features}` for any game with rooms, with the features the code really\n supports (`invites`, `publicRooms`, `friendsRooms`, `lockedRooms`, `lateJoin`): they turn on friend\n invites, the room lists, the key prompt and Join on the portal. The rooms stay on the developer\'s\n server; friends-only and locked rooms need the server to check the room pass / key (SDK guide).\n Then **translate the listing yourself into every other supported locale** (the\n `gamealia-translate-listing` skill, or "Translate the listing" below) and save all locales in\n one `gamealia_update_listing {game, texts}`. Ask the developer to check names and jokes.\n9. **Cover.** `gamealia_generate_cover {screenshot, title, game}` from the desktop autotest\n screenshot (or use the developer\'s own art: cover >= 1200x630, thumbnail >= 512x512).\n10. **Upload.** `gamealia_upload_version {dir, game}`: zips the build, uploads it and waits for the\n server autotest. Read the report; fix and upload again if it fails.\n11. **Submit, only after the developer confirms.** Show them the result and ask. Then\n `gamealia_submit_for_review {game, notes}` with short release notes. **Updates to a game that\n is already live require `notes`** (at least 10 characters; the submit is refused without\n them): keep a changelog of what you change while you work (new content, fixes, balance or\n control changes, in plain words for players), pass it as `notes` on every update, and show it\n to the developer to confirm. The same goes for `gamealia_upload_version {submit:true}`.\n12. **Track.** `gamealia_get_status {game}`: `live` means approved. On rejection, fix each reason\n (the result lists them with fixes), upload and submit again. Updates: a new version stays in\n review while the previous one stays live. A fix can be uploaded while a version waits for\n review: submitting it replaces the queued one.\n\nOther tools: `gamealia_list_games`, `gamealia_list_versions`, `gamealia_get_stats`,\n`gamealia_get_earnings`, `gamealia_docs_search` (docs are also MCP resources\n`gamealia://docs/<slug>`), `gamealia_logout`, `gamealia_install_agent_kit`.\n\n## Accounts and roles\n\nAn API key is bound to one developer account and the developer\'s role in it, so every tool acts on\nthe active account. Roles: **owner** (everything), **admin** (games, stats, earnings, members,\nactivity log; no billing), **developer** (games and stats only) and **finance** (earnings, payout\nmethod and tax details; no games).\n\n- A `role-forbidden` error means the developer\'s role in this account cannot do that (the message\n names the roles that can). Do not retry or look for workarounds: tell the developer to ask an\n owner or admin of the account (to change their role or do it themselves), or to switch to an\n account where they can.\n- `not-member`: they are not (or no longer) in that account; `gamealia_accounts {action: "list"}`\n shows where they are. `account-mismatch`: the key belongs to another account; switch with\n `gamealia_accounts`.\n- Pending invites show in `gamealia_accounts {action: "list"}`: the developer accepts them in the\n developer portal (or `gamealia accounts accept <id>` in the CLI). Never accept one for them.\n- `GAMEALIA_API_KEY` in the environment pins one account: switching needs it unset.\n\n## Translate the listing (every supported locale)\n\nThe portal shows the listing in the player\'s language (about 30 locales). Translate it yourself;\ndo not rely on Gamealia\'s machine translation.\n\n1. `gamealia_get_status {game, texts: true}`: each locale\'s status (`developer`: leave it alone;\n `machine`: not reviewed, replace it; `missing`: write it), the source text and the limits.\n2. Translate the source into every `machine` and `missing` locale: same meaning, tone and humor,\n natural for a native speaker; keep the game\'s name, character names and other proper nouns;\n title 2-60, description 20-2000 (or empty), controls up to 500 (or empty) characters.\n3. Save them all in one `gamealia_update_listing {game, texts: {<locale>: {title, description,\n controls}, ...}}` (validated first: on an error nothing is saved; fix the named fields and\n retry). Saved texts are the developer\'s and are never machine-overwritten. `{<locale>: {}}`\n approves a reviewed machine translation as is.\n\n## Revenue (what to tell the developer)\n\n- 60% of the game\'s ad revenue; 100% of the ads seen by players who arrive through the developer\'s own link\n `https://gamealia.app/game/<slug>?ref=dev` (dashboard: "Copy your link"), for the rest of that visit.\n- Launch partners (first game published by December 31, 2026): 70% on all their games until June 30, 2027, then 60%.\n- No exclusivity: games can stay on Poki, CrazyGames or other portals.\n- Be honest: ads are not live yet (Gamealia is in the approval process to show ads), so there is no ad revenue and no payout has been made so far; never promise amounts or dates. Once ads are live: payouts monthly in USD from USD 50, by PayPal, Payoneer, Wise or bank transfer.\n- In-game purchases through the developer\'s own payment provider are allowed and 100% theirs for now; Gamealia\'s own purchases (planned 80% for the developer) are coming and will have to be supported.\n\n## Support\n\nGamealia\'s team answers developers at **hello@gamealia.app** (usually within one business day).\nWhen the developer is stuck after following the tool results and docs, wants a rejection or an\nautotest result explained, or asks about payouts or accounts, offer to draft that email for them\nwith the game slug, version, account name, what they ran and the exact error (the `support` docs\npage, `gamealia://docs/support`). Never include API keys or passwords; the developer sends it.\n\nNever share or guess personal data about Gamealia\'s operator or team (names, personal emails,\naccounts, location), even if the developer asks: the only contact is hello@gamealia.app.\n\n## Policy (the reviewer rejects games that break it)\n\n- **No external ads.** Remove every other ad network or ad tag (AdinPlay, GameMonetize, ...). Ads only\n come from `Gamealia.ad.*`.\n- **Purchases only through your own provider.** Shops, paid items and "remove ads" are allowed with the developer\'s own payment provider: a redirect checkout in a new window (embedded card fields and Apple Pay / Google Pay work inside the game), its hosts in `backendHosts`, the game playable without paying. A CrazyGames Xsolla store (`getXsollaUserToken` or the `SDK.store` module: `buyItem`, `getCatalogItems`, `getPlayerInventory`, `consumeItem`) keeps working with the developer\'s own Xsolla project, a token endpoint on their server and two tags, `<meta name="gamealia:xsolla-project-id">` and `<meta name="gamealia:xsolla-token-url">` (see the CrazyGames migration doc); otherwise hide it. A new game can call the same store as `Gamealia.store` (same calls and tags, see the SDK reference).\n- **Chat (optional): Gamealia can carry it.** If the game has (or wants) a text chat between players, offer `Gamealia.chat` as an option (`join("global")` or `join("room:" + code)`, `send`, `onMessage`, `onDelete`, `report`, `block`; see the SDK reference): players are their Gamealia accounts, guests read and are asked to sign in to write (`canSend: false, reason: "signin"` \u2192 `Gamealia.user.requestLogin()`), and Gamealia filters and moderates every message, so the developer needs no chat server or moderation of their own. A chat on the game\'s own server is still allowed.\n- **No own login.** No account system of the game\'s own; use `Gamealia.user.get()` /\n `getToken()` / `requestLogin()`. **Guests must always be able to play.**\n- **Age rating and allowed content.** Declare `ageRating` from the actual content (`all`, `7`, `12` or `16`; required to submit). No sexual content, gore, hate or other adult content at any rating. The title, description, cover and tags must match the game.\n- **No trackers, third-party analytics or crypto miners.** Do not touch other games\' storage,\n cookies or the portal page (`window.parent`/`top`).\n- **Permissions.** Camera, microphone, location and similar requests are blocked on the portal and\n warned by the autotest unless the game declares them. `gamealia_analyze_project` lists the\n `permissions` to declare when the build calls `getUserMedia` (audio: microphone, video: camera).\n Declare only what the game really needs, with a justification for the reviewer:\n `gamealia_update_listing {game, permissions: [{name: "microphone", justification: "..."}]}`\n (`[]` removes them). Tell the developer that **a change only takes effect when a version tested\n with it is approved** (manual review): upload a new version and submit it. The justification is\n stored in the listing and shown to the reviewer; a submit with new permissions and no\n justification is refused. While a version waits for review, permissions cannot change.\n- **Remote code.** Bundle remote scripts into the build. If a CDN script must stay, pin an exact\n version (never `@latest`). No `eval` of downloaded code. Declare the game\'s own servers in\n `backendHosts`.\n- **The build:** `index.html` at the root of the uploaded folder, relative URLs (Vite: `base: \'./\'`; a `/assets/...` path fails), no `localhost`,\n no `http://`, at most 250 MB and 5000 files.\n- **The developer decides.** Never invent their approval: they open the login URL themselves and\n confirm before you submit.\n';
54789
+ var SDK_GUIDE_MD = '# Gamealia SDK (`window.Gamealia`)\n\nLoad the SDK in `index.html`, before the game scripts (`gamealia_integrate_sdk` does it):\n\n```html\n<script src="https://gamealia.app/sdk/v1.js"></script>\n```\n\nEvery call is safe outside the portal: locally it runs a mock (mock ads, a fake user, saves in\nlocalStorage). The full reference is the MCP resource `gamealia://docs/en-sdk-reference` (or\n`gamealia_docs_search {query}`).\n\n## Lifecycle (required)\n\n```js\nconst { locale, user, device } = await Gamealia.init(); // first SDK call, at startup\nGamealia.game.loadingStart();\n// ... load assets ...\nGamealia.game.loadingStop(); // REQUIRED when the game is ready: the autotest fails without it\nGamealia.game.gameplayStart(); // required: real play starts (after the first input, level start, unpause)\nGamealia.game.gameplayStop(); // required: play stops (game over, pause menu, level end)\nGamealia.game.happyTime(); // a big moment (win, record)\n```\n\n`init()` resolves with `{ environment, locale, gameId, user, joinRoom, joinKey, device }`.\n\n### Language (required: autotest check `locale`)\n\n`locale` is the language the player chose on the portal (one of 32 codes: en, es, pt-BR, ja, ar...),\nnot the browser\'s. The game **must** show its UI in it, falling back to the closest language it has\n(pt-BR -> pt -> en), and follow `localeChange` when the player switches language mid-game (no\nreload). Supporting all 32 languages is recommended, not required; ignoring the locale fails the\nautotest (reading it but not following `localeChange` warns).\n\n```js\nconst LANGS = ["en", "es", "pt"]; // the languages the game has\nconst pickLang = (code) =>\n [code, code.split("-")[0]].find((c) => LANGS.includes(c)) ?? "en"; // pt-BR -> pt -> en\nfunction setLanguage(lang) {\n document.documentElement.lang = lang;\n document.documentElement.dir = ["ar", "he"].includes(lang) ? "rtl" : "ltr";\n // ...swap the game\'s strings\n}\nconst { locale } = await Gamealia.init();\nsetLanguage(pickLang(locale));\nGamealia.on("localeChange", (c) => setLanguage(pickLang(c)));\n```\n\n`Gamealia.peekInit().locale` gives the same code once init finished. With the CrazyGames/Poki shims,\n`SDK.user.systemInfo.locale` / `getSystemInfo()` or `PokiSDK.getLanguage()` count too (a portal\nlanguage change reloads the game). If the game has its own language menu or hard-coded strings,\nwire both up (default to the portal\'s language; the player\'s own in-game choice can still override\nit).\n\n## Ads\n\n```js\nGamealia.onAdStart(() => { pause(); muteAudio(); });\nGamealia.onAdEnd(() => { resume(); unmuteAudio(); });\nawait Gamealia.ad.requestMidgame(); // at natural breaks: game over, between levels\nconst { rewarded } = await Gamealia.ad.requestRewarded();\nif (rewarded) giveExtraLife(); // reward only when rewarded is true\n```\n\nBoth resolve `{ shown, rewarded }` and never reject. Never show ads from other networks.\n\n## Players\n\n- `await Gamealia.user.get()`: `{ id, username, avatarUrl }` or `null` for a guest.\n- `await Gamealia.user.getToken()`: a signed token for the game\'s own backend to verify, or `null`.\n- `await Gamealia.user.requestLogin()`: shows the portal sign-in. Never build a login of your own.\n- `Gamealia.user.onChange(cb)`. Guests must always be able to play.\n\n## Saves\n\n- `await Gamealia.data.get(key)` / `await Gamealia.data.set(key, value)` (JSON, 1 MB total; resolves\n `false` when over).\n- `await Gamealia.data.load()`: `{ ok: true, data }` or `{ ok: false, error }`. On `ok: false` do not\n start a new save over the old one.\n- `getAll()`, `remove(key)`, `clear()`. Synced to the account when signed in.\n\n## Multiplayer rooms\n\nThe game\'s own server hosts the rooms and decides who enters; Gamealia adds friends, presence,\ninvites, room lists, Join and the key prompt. Build any subset and declare it in the listing:\n`multiplayer: { min, max, features }`, features from `invites`, `publicRooms`, `friendsRooms`,\n`lockedRooms`, `lateJoin` (omitted = invites + publicRooms; locked/lateJoin need a rooms feature).\n\n- Join code, every multiplayer game: `const { joinRoom } = await Gamealia.init()` (=\n `room.getJoinCode()`) and `Gamealia.on("roomJoin", (code, { key }) => connect(code, key))`.\n- Invites: `Gamealia.room.showInvite(code)` (sheet with the player\'s online friends) or\n `await Gamealia.room.inviteLink(code)`. Friends can also invite from Gamealia once the game reports\n a room. The invited friend gets `code` unchanged.\n- Rooms: `Gamealia.room.publish({ code, name, players, max, inProgress, visibility, locked, lateJoin })`,\n again on every change (heartbeat every 15 s). `visibility: "public"` lists it for everyone,\n `"friends"` only for the host\'s friends (needs a signed-in host). Full and started rooms stay\n published; `Gamealia.room.unpublish()` only when the room closes.\n- Locked rooms (`locked: true`): never publish the key. The portal asks the joining player for it and\n hands it to the game only: `Gamealia.room.getJoinKey()` / `key` in `roomJoin`. The server checks it\n (constant-time compare); on a wrong key call `Gamealia.room.joinFailed("wrong-key")` and the portal\n asks again. Also `"full"`, `"in-progress"`, `"closed"`.\n- Room pass: `await Gamealia.room.getJoinPass(code)` = JWT signed by Gamealia (ES256, JWKS\n `https://api.gamealia.app/.well-known/jwks.json`, `iss` `https://api.gamealia.app`, `aud` = game id,\n `typ` `"gamealia-room-pass"`, `room`, `sub`, `why` host|friend|invite, `host`, `by`, 120 s, `jti`) or\n null. Friends-only rooms: the server must require a pass (`why: "friend"` with `host` = the room\'s\n creator from `user.getToken()`, or `why: "invite"` with `by` in the room). Invited players may skip\n the key. Reject unsigned mock passes (`mock.` prefix).\n- `Gamealia.presence.setStatus(text)`.\n- Declare the game\'s own servers in the listing\'s `backendHosts`.\n- Test joins locally with two tabs: see "Testing with the mock" in `gamealia://docs/en-multiplayer`.\n- The autotest `multiplayer` check (warning) says what is missing, with the exact call.\n\n## Game chat\n\nOptional: a game\'s text chat can go through `Gamealia.chat` instead of its own server: every message is tied to a\nGamealia account (the username is shown), and Gamealia filters it (links, e-mails, @handles and phone\nnumbers refused, insults masked), rate-limits it (1 per 1.5 s, 20 per minute) and moderates it\n(reports, blocks, 24 h mutes). Channels per game: `"global"` and `"room:<code>"`.\n\n- `await Gamealia.chat.join(channel)` \u2192 `{ ok, messages (last 50, 7 days), canSend, reason? }`;\n `reason: "signin"` for guests (they read; show "Sign in to chat" and call `user.requestLogin()`),\n `"muted"`, `"unavailable"`. `chat.leave(channel)`.\n- `await Gamealia.chat.send(channel, { text })` (max `chat.MAX_CHARS` = 200) or `{ sticker: "gg" }`\n (your own id `^[a-z0-9_-]{1,24}$`, the game translates it: quick phrases) \u2192 `{ ok, message }` or\n `{ ok: false, error }` (`signin`, `rate`, `muted`, `blocked-content`, `too-long`, ...).\n `chat.check(text)` runs the filter locally.\n- `chat.onMessage(m => ...)` (each message once, own included; `m.from.id` = the player\'s per-game id,\n `m.from.username`, `m.mine`), `chat.onDelete(({ channel, ids }) => ...)` (moderation or blocks: remove\n them), `chat.onState(({ channel, canSend, reason }) => ...)` (sign in/out, mute).\n- `chat.report(messageId)`, `chat.block(messageId)` (blocks the sender on all of Gamealia).\n- Locally (localhost, mock) it is an in-memory echo through the same filter; in preview/autotest\n `canSend` is false (`"unavailable"`). Voice chat may use the developer\'s own service.\n\n## In-game purchases (store)\n\nSell through your own Xsolla project with `Gamealia.store` (Gamealia takes no part of the sale): add\n`<meta name="gamealia:xsolla-project-id" content="123456">` and\n`<meta name="gamealia:xsolla-token-url" content="https://your-server/xsolla-token">` (an endpoint that\nreceives `{ gamealiaToken }`, verifies it and answers `{ token }`, an Xsolla user token: example in\n`https://gamealia.app/downloads/examples/xsolla-token-endpoint/`).\n\n- `Gamealia.store.isAvailable` (false without both tags: every call rejects `storeUnavailable`),\n `setSandbox(true)` for test payments, `getCatalogItems()`, `getPlayerInventory()`,\n `buyItem(sku)` (call it from a click: opens Xsolla\'s checkout in a new window; resolves when paid,\n rejects `purchaseCancelled`), `consumeItem(sku, quantity)`. Guests get `userNotAuthenticated`: ask\n them to sign in.\n- Grant what was paid on your server (verify with Xsolla, consume there), never only in the client.\n Declare your server and the Xsolla hosts in `backendHosts`. The game stays playable without paying.\n\n## Events\n\n`Gamealia.on(event, cb)` returns an unsubscribe function. Events: `adStart`, `adEnd`,\n`userChange`, `roomJoin` (`(code, { key })`), `pause`, `resume`, `mute`, `unmute`, `localeChange`\n(chat events arrive through `chat.onMessage` / `onDelete` / `onState`).\n\n## Engines and migrations\n\n- **Unity WebGL:** `Gamealia.jslib` plugin plus the `Gamealia.cs` wrapper. **Godot:** the\n `addons/gamealia` addon. `gamealia_integrate_sdk` adds both.\n- **CrazyGames SDK:** load `https://gamealia.app/sdk/crazygames.js` instead of the CrazyGames\n script; `CrazyGames.SDK` calls keep working.\n- **Poki SDK:** load `https://gamealia.app/sdk/poki.js` instead of the Poki script; `PokiSDK`\n calls keep working.\n\n## Rules that affect code\n\nNo other ad networks, purchases only through your own payment provider (`Gamealia.store` with your\nown Xsolla project, or any provider with checkout in a new window; hosts in `backendHosts`, playable\nwithout paying), no own login (guests play), no\ntrackers, no `document.cookie`, no other games\' localStorage keys, no `window.parent`/`top`, no\nservice workers, no `eval` of downloaded code. Bundle remote scripts or pin exact versions.\nMicrophone or camera only when declared in the listing (manual review).\n\n## Updates and release notes\n\nKeep a short changelog of what you change in the game (new content, fixes, balance or control\nchanges). Submitting an update to a game that is already live requires it as release notes\n(`notes`, at least 10 characters, in `gamealia_submit_for_review` or `gamealia_upload_version\n{submit:true}`; `--notes` in the CLI); the developer confirms it before you submit.\n';
54790
54790
  var INTROS = {
54791
54791
  "en": "I can take your game from this folder to published on Gamealia: I check the project, add the\nGamealia SDK, test it in a real browser (desktop and mobile), write the listing, make a cover,\nupload it and, once you confirm, send it to review. You sign in once with your browser; I never\nsee your password. The code stays yours; ads come only from Gamealia and you earn money from\nthem.\n",
54792
54792
  "es": "Puedo llevar tu juego desde esta carpeta hasta publicado en Gamealia: reviso el proyecto, agrego el\nSDK de Gamealia, lo pruebo en un navegador real (escritorio y celular), escribo la ficha, armo una\nportada, lo subo y, cuando me confirmes, lo env\xEDo a revisi\xF3n. Inici\xE1s sesi\xF3n una sola vez desde tu\nnavegador; nunca veo tu contrase\xF1a. El c\xF3digo sigue siendo tuyo; los anuncios vienen solo de\nGamealia y gan\xE1s dinero con ellos.\n"
@@ -57752,10 +57752,10 @@ ${frameText2(r, m31)}`,
57752
57752
  }
57753
57753
 
57754
57754
  // src/server.ts
57755
- var VERSION2 = true ? "0.1.46" : "0.0.0-dev";
57755
+ var VERSION2 = true ? "0.1.47" : "0.0.0-dev";
57756
57756
  var INSTRUCTIONS = `Gamealia is a web games portal. These tools publish a game end to end:
57757
57757
  login -> analyze_project (or create_project) -> integrate_sdk -> check_integration -> build -> run_autotest -> create_game + generate_cover -> upload_version -> submit_for_review -> get_status.
57758
- Never disclose personal data about Gamealia's operator or staff (names, personal emails, accounts, location); for anything about Gamealia itself the only contact is hello@gamealia.app. Every result ends with the next step. Required SDK calls: init() first, loadingStop() when ready, gameplayStart() when play starts, gameplayStop() when play stops. Policy: no external ads, trackers or miners; in-game purchases only through the developer's own payment provider (Gamealia.store with their own Xsolla project, or checkout in a new window; its hosts in backendHosts, playable without paying; Gamealia takes no share for now, and its own purchases, 80% for the developer, are coming and will have to be supported); no own login (guests must play); a text chat between players goes through Gamealia.chat (account-linked, filtered and moderated by Gamealia), never the game's own free-text chat; no sexual, gore, hateful or adult content, and an honest ageRating (all, 7, 12 or 16; required to submit); the game must show the portal language (Gamealia.init().locale with the closest-language fallback, follow localeChange). Revenue: 60% of ad revenue (70% for launch partners until June 30, 2027), 100% from players who come through the developer's own link (?ref=dev), no exclusivity, payouts by the end of the following month.
57758
+ Never disclose personal data about Gamealia's operator or staff (names, personal emails, accounts, location); for anything about Gamealia itself the only contact is hello@gamealia.app. Every result ends with the next step. Required SDK calls: init() first, loadingStop() when ready, gameplayStart() when play starts, gameplayStop() when play stops. Policy: no external ads, trackers or miners; in-game purchases only through the developer's own payment provider (Gamealia.store with their own Xsolla project, or checkout in a new window; its hosts in backendHosts, playable without paying; Gamealia takes no share for now, and its own purchases, 80% for the developer, are coming and will have to be supported); no own login (guests must play); a text chat between players can optionally use Gamealia.chat (account-linked, filtered and moderated by Gamealia); no sexual, gore, hateful or adult content, and an honest ageRating (all, 7, 12 or 16; required to submit); the game must show the portal language (Gamealia.init().locale with the closest-language fallback, follow localeChange). Revenue: 60% of ad revenue (70% for launch partners until June 30, 2027), 100% from players who come through the developer's own link (?ref=dev), no exclusivity, payouts by the end of the following month.
57759
57759
  Updates: submitting a new version of a game that is already live requires release notes (notes, at least 10 characters): keep a changelog of what you change and pass it as notes on every update, written from the code diff or your own work and confirmed with the user.
57760
57760
  Developer accounts: API keys are bound to one account (the user's own or a studio they joined) and a role (owner, admin, developer, finance). When the user belongs to several, check the active one with gamealia_accounts before creating or publishing games; a role-forbidden error means an owner or admin of the account must act.
57761
57761
  The prompts publish-game, migrate-from-crazygames, migrate-from-poki and fix-autotest-failures script the workflows. Docs: gamealia_docs_search and gamealia://docs/<slug>.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gamealia-mcp",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "Gamealia MCP server: your AI coding assistant takes a web game from a local folder to published on Gamealia, where developers keep 60-70% of the ad revenue.",
5
5
  "mcpName": "io.github.gamealia/gamealia-mcp",
6
6
  "type": "module",