mobridge-mcp 0.12.2 → 0.12.3

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/integrity.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "buildId": "b704084-20261111144850",
3
- "bundleSha256": "18462deb2ccc5e554561c36e95c56306e321fb113d2fce01e61e897b260a4665"
2
+ "buildId": "e558381-20261112010515",
3
+ "bundleSha256": "a67ba72ee21c569329d03fb389e7d7c2e0ccf76de9f408ba502183bffcb6a975"
4
4
  }
package/loader.cjs CHANGED
@@ -14,7 +14,7 @@ const os = require("node:os");
14
14
  const path = require("node:path");
15
15
  const crypto = require("node:crypto");
16
16
 
17
- const BUILD_ID = "b704084-20261111144850"; // pack-npx stamps the real build id
17
+ const BUILD_ID = "e558381-20261112010515"; // pack-npx stamps the real build id
18
18
  const ROOT = __dirname; // package root (loader.cjs sits here)
19
19
  const DIST = path.join(ROOT, "dist");
20
20
  const BUNDLE = path.join(DIST, "main.obf.cjs");
@@ -62,6 +62,18 @@ function cachedJscPath() {
62
62
  return { dir, file: path.join(dir, "main.jsc") };
63
63
  }
64
64
 
65
+ // Each release compiles an ~8 MB .jsc into its own directory; nothing removed the older ones. Runs only right after a fresh compile.
66
+ function pruneStaleBytecode(keepDir) {
67
+ try {
68
+ const parent = path.dirname(keepDir);
69
+ for (const name of fs.readdirSync(parent)) {
70
+ const dir = path.join(parent, name);
71
+ // A day of grace: another installed version used in parallel keeps its cache instead of the two deleting each other's.
72
+ if (dir !== keepDir && Date.now() - fs.statSync(dir).mtimeMs > 86_400_000) fs.rmSync(dir, { recursive: true, force: true });
73
+ }
74
+ } catch { /* best effort: a stale cache is only wasted disk */ }
75
+ }
76
+
65
77
  function loadViaBytecode() {
66
78
  let bytenode;
67
79
  try { bytenode = require("bytenode"); } catch { return false; } // no bytenode -> fallback JS
@@ -70,6 +82,7 @@ function loadViaBytecode() {
70
82
  if (!fs.existsSync(file)) {
71
83
  fs.mkdirSync(dir, { recursive: true });
72
84
  bytenode.compileFile({ filename: BUNDLE, output: file }); // compiled against the user's own Node
85
+ pruneStaleBytecode(dir);
73
86
  }
74
87
  injectNodePath();
75
88
  require(file);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobridge-mcp",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "MoBridge MCP — a stdio MCP server exposing on-device Android UIs as fast semantic read / observe / find / act / verify tools plus screenshots. Ships an installer that wires it into Claude Code, Claude Desktop, Cursor and Codex.",
5
5
  "keywords": [
6
6
  "mcp",