gamealia-mcp 0.1.26 → 0.1.27

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.
@@ -38593,6 +38593,26 @@ function jsRules(code, offset, ctx) {
38593
38593
  }
38594
38594
  aliases.delete("localStorage");
38595
38595
  aliases.delete("sessionStorage");
38596
+ const bundledModules = /* @__PURE__ */ new Set();
38597
+ const gumWrappers = [];
38598
+ const isGum = (v) => !!v && /^(?:webkit|moz)?getUserMedia$/i.test(v);
38599
+ for (let i = 0; i < T.length; i++) {
38600
+ const x = T[i];
38601
+ if (x.type === "str" && k.isP(i + 1, ":") && (k.isId(i + 2, "function") || k.isP(i + 2, "[") && k.isId(i + 3, "function")) && /\.(?:m?js|json)$/i.test(x.value))
38602
+ bundledModules.add(x.value.replace(/^.*\//, "").toLowerCase());
38603
+ let fn = -1;
38604
+ if ((x.type === "id" || x.type === "str") && isGum(x.value) && k.isP(i + 1, ":") && k.isId(i + 2, "function")) fn = i + 2;
38605
+ else if (x.type === "id" && isGum(x.value) && k.isProp(i) && k.isP(i + 1, "=") && k.isId(i + 2, "function")) fn = i + 2;
38606
+ else if (x.type === "str" && isGum(x.value) && k.isP(i - 1, "[") && k.isP(i + 1, "]") && k.isP(i + 2, "=") && k.isId(i + 3, "function")) fn = i + 3;
38607
+ else if (x.type === "id" && x.value === "function" && T[i + 1]?.type === "id" && /getUserMedia$/i.test(T[i + 1].value)) fn = i;
38608
+ if (fn < 0) continue;
38609
+ let o = fn + 1;
38610
+ while (o < T.length && o < fn + 6 && !k.isP(o, "(")) o++;
38611
+ if (!k.isP(o, "(")) continue;
38612
+ const body = k.close(o) + 1;
38613
+ if (k.isP(body, "{")) gumWrappers.push([body, k.close(body)]);
38614
+ }
38615
+ const inGumWrapper = (i) => gumWrappers.some(([a, b]) => i > a && i < b);
38596
38616
  const enumeration = (i, what) => prefixFiltered(k, i) ? hit("cross_game_storage", "suspicious", i, `${what} enumerates shared storage (filtered by a prefix; verify it only touches the game's own keys)`) : hit("cross_game_storage", "critical", i, `${what} enumerates storage shared by every game on the CDN origin`);
38597
38617
  const evalCall = (name, callee, open2) => {
38598
38618
  const end = k.close(open2);
@@ -38693,7 +38713,7 @@ function jsRules(code, offset, ctx) {
38693
38713
  hit("exfiltration", "suspicious", urlArg, `${x.value}() to ${u2.host}, which is not a declared backend host`);
38694
38714
  }
38695
38715
  }
38696
- if (x.value === "getUserMedia" && k.isP(i + 1, "(")) hit("permissions", "suspicious", i, "getUserMedia (camera/microphone)");
38716
+ if (x.value === "getUserMedia" && k.isP(i + 1, "(") && !inGumWrapper(i)) hit("permissions", "suspicious", i, "getUserMedia (camera/microphone)");
38697
38717
  const m31 = k.member(i + 1);
38698
38718
  if (m31 && k.isP(m31.next, "(")) {
38699
38719
  if (x.value === "geolocation" && (m31.name === "getCurrentPosition" || m31.name === "watchPosition")) hit("permissions", "suspicious", i, `geolocation.${m31.name}`);
@@ -38752,6 +38772,7 @@ function jsRules(code, offset, ctx) {
38752
38772
  if (next && (CMP.has(next.value) || next.value === "+" || next.value === ":")) continue;
38753
38773
  const call = k.enclosingCall(i);
38754
38774
  if (call && (MSG_CALLS.has(call.name) || STR_METHODS.has(call.name) || MODULE_CALLS.has(call.name))) continue;
38775
+ if (bundledModules.has(x.value.replace(/^.*\//, "").toLowerCase())) continue;
38755
38776
  const ref = x.value.replace(/^(\.\/)+/, "");
38756
38777
  const resolved = resolveRef2(dirOf2(ctx.file), x.value);
38757
38778
  const ext = /\.([a-z0-9]+)$/i.exec(ref)[1].toLowerCase();
@@ -56930,7 +56951,7 @@ ${frameText(r, m31)}`,
56930
56951
  }
56931
56952
 
56932
56953
  // src/server.ts
56933
- var VERSION2 = true ? "0.1.26" : "0.0.0-dev";
56954
+ var VERSION2 = true ? "0.1.27" : "0.0.0-dev";
56934
56955
  var INSTRUCTIONS = `Gamealia is a web games portal. These tools publish a game end to end:
56935
56956
  login -> analyze_project (or create_project) -> integrate_sdk -> check_integration -> build -> run_autotest -> create_game + generate_cover -> upload_version -> submit_for_review -> get_status.
56936
56957
  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, gameplayStop() when play stops. Policy: no external ads, trackers or miners; in-game purchases only through the developer's own payment provider (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); all-ages content; 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gamealia-mcp",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
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",